|
From: | Hans Aberg |
Subject: | Re: Interpreting shift/reduce conflicts from .output file |
Date: | Wed, 15 Jun 2005 20:22:07 +0200 |
At 17:05 +0000 2005/06/15, Frans Englich wrote:
> > 72 SequenceType: ItemType .> 73 | ItemType . STAR > 74 | ItemType . PLUS > 75 | ItemType . QUESTION_MARK > > PLUS shift, and go to state 134 > STAR shift, and go to state 135 > QUESTION_MARK shift, and go to state 136 > > PLUS [reduce using rule 72 (SequenceType)] > STAR [reduce using rule 72 (SequenceType)]> > $default reduce using rule 72 (SequenceType)
The precedence shift/reduce resolving system works so that it looks at the token immediately before the "." in the reduce rule, and the token immediately after the "." in the shift rule, and use the defined token precedences (%left, etc.) to make a choice. If your rules are not on this simple form, it will not work. So then you may decide to rewrite your grammar.
-- Hans Aberg
[Prev in Thread] | Current Thread | [Next in Thread] |