help-bison
[Top][All Lists]
Advanced

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

Re: conflict but no shift/reduce


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

Haaa :-)
Thanks a lot for the info, I didn't actually see the "resolved", I was
consentrated on the "conflict" :-) If it is totally normal, then I'll have a
night of sleep :)

Thx,

Arnaud ANDRE

Carl Cerecke wrote:

Arnaud ANDRE wrote:

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 )


All the above conflicts are *resolved*.
In other words, bison has figured out which action is correct
for which token, and made that choice. Only unresolved
conflicts are a problem.

How did it figure out which action was right? I'm not going
to go into the details, but it uses the precedences you
supplied (see below) to decide which action to take.

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


I think there is more info in the manual.

Cheers,
Carl.









reply via email to

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