yacc reduce/reduce conflict question
Jeffrey W Percival
jwp at larry.sal.wisc.edu
Tue Sep 5 11:18:28 AEST 1989
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:
279: reduce/reduce conflict (red'ns 128 and 151 ) on INCLUDE
state 279
cmd_parameter : MNEMONIC = MNEMONIC_ (128)
arg : MNEMONIC_ (151)
. reduce 128
Now, why is there a reduction ambiguity at the indicated spot? I mean,
one rule has an equal sign, and the other doesn't. Surely yacc knows
whether two things separated by '=' or a single thing has been read.
What is the problem here (or what could be my next step in reasoning it out)?
--
Jeff Percival (jwp at larry.sal.wisc.edu)
More information about the Comp.unix.wizards
mailing list