[antlr-interest] DMQL Grammar - ANTLR Eats Characters

Gavin Lambert antlr at mirality.co.nz
Fri Mar 20 12:55:18 PDT 2009


At 07:31 21/03/2009, Terence Parr wrote:
 >Hi. ANTLR generates lexer's, parsers, tree parsers with the same 

 >code generator and all of those derive from a single base class. 

 >all three can backtrack :) in the case of the lexer, though,
 >it's not the kind of backtracking you see in lex.

Doesn't backtracking require support from the code-generation 
templates, though?  It was my impression that the templates for 
the lexer don't contain the necessary pieces to actually do the 
backtracking, even though the base class does.

(Besides which, it never seems to want to backtrack all the way to 
mTOKENS.)



More information about the antlr-interest mailing list