[antlr-interest] Lexer code not generated as expected?

Peter Boughton boughtonp at gmail.com
Tue Dec 15 11:25:24 PST 2009


> You have to be more specific with the lexer here if you want that kind of behavior

I don't get why?


The ANTLR book mentions auto-backtracking (which seems to be what is
*not* happening here), and which can be turned on with "options
{backtrack=true;}"

Would that not solve this problem?
If so, are there any issues (aside from performance) that might be a
reason not to have this turned on?

It certainly seems a general approach of "take the easy path, then
optimise proven slow parts, as required" is more favourable than
adding this complexity.


More information about the antlr-interest mailing list