[antlr-interest] RFE: warn if root rule is missing (no EOF)
Olivier Lefevre
lefevrol at yahoo.com
Thu Feb 21 06:40:05 PST 2008
Loring Craymer wrote:
> Usually, it is not the "not adding EOF" that is a beginner's mistake, it is the structuring of a grammar to require an explicit EOF. That is, the top level rule depends on a stop marker, such as "}", to terminate, and processing may stop before an EOF is reached. The only time your grammar needs an EOF is to consume tokens from such a stop marker to the end of file; I find that rare.
Not so. See the "Evaluator bailing out early?" thread for a counterexample.
-- O.L.
More information about the antlr-interest
mailing list