yacc reduce/reduce conflict question

Dave Jones djones at megatest.UUCP
Wed Sep 6 08:04:56 AEST 1989


>From article <718 at larry.sal.wisc.edu>, by jwp at larry.sal.wisc.edu (Jeffrey W Percival):
> I am using yacc (for the first time) to parse a special purpose
> language, and am doing pretty good, so far.  I am confused on
> something, though, and much pondering has failed to illuminate me.
> 
> I hope the following yacc output fragment is enough to sketch the problem:
> 
> [ yacc output fragment omited. ]

The fragment you posted is not enough. Try removing as much as you can
from the grammar while still keeping the reduce/reduce message. If it's
not obvious at that point, you might try posting the smaller grammar here.

I would recommmend that you study up on LR parsing. The "dragon book" by Aho
and Ullman is an old favorite.


    Good luck,

    Dave Jones



More information about the Comp.unix.wizards mailing list