[antlr-interest] the EOF token not in the Index of the definitive reference
Johannes Luber
jaluber at gmx.de
Wed Jun 6 06:21:37 PDT 2007
Henri De Feraudy wrote:
> Hi All,
> Just out of curiosity I typed in the token EOF in a grammar, while
> inside AntlrWorks. Lo and behold it was not "rejected" by underlining it
> with a red squigly line. Whatsmore it did not seem to raise an error
> when generating the code.
> Now it does not appear in the index of the definitive reference.
> I guess it can make or break a grammar, or am I wrong?
EOF means End Of File and is used to disambiguate rules in the case, one
can't determine the starter rule. See
<http://www.antlr.org/wiki/display/ANTLR3/Quick+Starter+on+Parser+Grammars+-+No+Past+Experience+Required>
for a discussion in the Grammar Ambiguities section.
Best regards,
Johannes Luber
More information about the antlr-interest
mailing list