Yacc mystery errors

Andrew Klossner andrew at orca.UUCP
Tue Jul 16 20:03:50 AEST 1985


The yacc error message "rule not reduced" means that yacc determined
that no program would ever parse using that rule.  This is usually
because either the left hand side of that rule does not appear in any
right hand side or because you have shift/reduce or reduce/reduce
errors.  You should always clear up all your */reduce errors before
worrying about "rule not reduced" errors.

(It's bad practice to leave the shift/reduce errors in and trust yacc
to do the right thing; you can almost always eliminate the error
without rewriting the grammar by specifying additional precedence.)

  -=- Andrew Klossner   (decvax!tektronix!orca!andrew)       [UUCP]
                        (orca!andrew.tektronix at csnet-relay)  [ARPA]



More information about the Comp.unix mailing list