| Visitor to simplify a grammar. This visitor folds nested choices
and sequences into the embedding choice or sequence, eliminates
choices and sequences with only one alternative or element (with
the exception of the top-level choice of a production), and reduces
repetitions and options to their simplest form. It also reduces
trivial character classes and string literals to character
literals. Note that the resulting grammar may violate the
requirements of
CodeGenerator code generation .
author: Robert Grimm version: $Revision: 1.54 $ |