[antlr-interest] Evaluator bailing out early?
Olivier Lefevre
lefevrol at yahoo.com
Mon Feb 18 21:09:08 PST 2008
I was using a test rig, not ANTLRWorks, but yes I was calling prog()
> If you add an EOF to the prog rule you should get an error as the
> rule will be forced to handle ALL the tokens for a match to be made.
I see. That is sorta like bracketing regex strings with '^' and '$' to
force the entire input string to be matched, correct?
> I often make a special rule, for example test_rule, where I add the EOF token.
Good idea. That works for test rigs, too. Why would you _not_ want to match
the entire input, though?
Thanks again,
-- O.L.
More information about the antlr-interest
mailing list