help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

conflict but no shift/reduce


From: Arnaud ANDRE
Subject: conflict but no shift/reduce
Date: Mon, 21 Apr 2003 22:22:20 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313

Hi, I need some help for conflicts I read in my y.output.
At the beginning of the file I see dozens messages like this :

Conflict in state 65 between rule 47 and token OR resolved as reduce.
Conflict in state 65 between rule 47 and token AND resolved as reduce.
Conflict in state 65 between rule 47 and token MORE resolved as reduce.
Conflict in state 65 between rule 47 and token LESS resolved as reduce.
Conflict in state 65 between rule 47 and token EQUAL resolved as reduce.
Conflict in state 65 between rule 47 and token PLUS resolved as reduce.
Conflict in state 65 between rule 47 and token MINUS resolved as reduce.
Conflict in state 65 between rule 47 and token TIMES resolved as reduce.
Conflict in state 89 between rule 46 and token OR resolved as reduce.
Conflict in state 89 between rule 46 and token AND resolved as reduce.
Conflict in state 89 between rule 46 and token MORE resolved as shift.
Conflict in state 89 between rule 46 and token LESS resolved as shift.
Conflict in state 89 between rule 46 and token EQUAL resolved as shift.
Conflict in state 89 between rule 46 and token PLUS resolved as shift.
Conflict in state 89 between rule 46 and token MINUS resolved as shift.
Conflict in state 89 between rule 46 and token TIMES resolved as shift.
( a lot more )

What the hell does that mean? I clearly see what are shift/reduce and reduce/reduce
conflicts, but that?
For more information( only for the first few lines :-) ) :
Rule 47 :
47 231 ExprD -> NOT ExprD
and state 65 :
state 65

   ExprD  ->  ExprD . PLUS ExprD   (rule 40)
   ExprD  ->  ExprD . TIMES ExprD   (rule 41)
   ExprD  ->  ExprD . MINUS ExprD   (rule 42)
   ExprD  ->  ExprD . AND ExprD   (rule 45)
   ExprD  ->  ExprD . OR ExprD   (rule 46)
   ExprD  ->  NOT ExprD .   (rule 47)
   ExprD  ->  ExprD . LESS ExprD   (rule 48)
   ExprD  ->  ExprD . MORE ExprD   (rule 49)
   ExprD  ->  ExprD . EQUAL ExprD   (rule 50)


   $default    reduce using rule 47 (ExprD)

and finally my token list :
%token <y_string> ID
%token <y_integer> NUMBER
%token TRUE FALSE
%token PROGRAM VAR BEG END SKIP DOT PROC
%token INTEGER BOOLEAN
%token COLON AFFECT SCOLON COMMA
%token READ WRITE
%token ARRAY OF
%token IF THEN ELSE FI
%token WHILE DO OD
%token LBRACKET RBRACKET
%token LPAR RPAR

%left OR AND
%nonassoc MORE LESS EQUAL
%left PLUS MINUS
%left TIMES
%right NOT

I really really don't understand....If anyone could enlighten me :-/

Thanks a lot,

Arnaud ANDRE








reply via email to

[Prev in Thread] Current Thread [Next in Thread]