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


_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to