eyacc \- modified yacc allowing much improved error recovery
converts a context-free grammar into a set of
tables for a simple automaton which executes an LR(1) parsing
The grammar may be ambiguous;
specified precedence rules are used to break ambiguities.
which must be compiled by the C compiler
and loaded with any other routines
is prepared, which contains a description of the parsing tables
conflicts generated by ambiguities in the grammar.
is a slightly but significantly modification of an old version of
The most important change is that
fully enumerates test actions in its parser when an error token
is in the look-ahead set.
This prevents the parser from making undesirable reductions
when an error occurs before the error is detected.
also uses a different encoding for the action tables to allow the
Because of the change in enumerating look-aheads,
there are more frequently a series of `test' states
test states are encoded as the arithmetic inverse
of the value of the token to be tested for.
This allows a much tighter inner loop in the parser and
more than compensates for the extra tests required.
(Of course, the same change could be made to the tables of
and it would then run significantly faster than
but error recovery of the kind performed using
would not be possible without the enumerated look-aheads.)
the recognition of a form-feed as a white space character,
increased table size so as to handle larger grammars,
and a change of the code for the error action (from 0 to 1)
because of the change in the testing outlined above.
For this reason it is not possible to use the standard
This would be pointless in any case,
because a different set of recovery routines is needed.
`LR Parsing', by A. V. Aho and S. C. Johnson, Computing Surveys, June, 1974.
`The YACC Compiler-compiler', internal memorandum.
`Practical syntactic error recovery', by Susan L. Graham and Stephen P. Rhodes,
modifications by Charles Haley and William Joy.
The number of reduce-reduce and shift-reduce conflicts
is reported on the standard output;
a more detailed report is