[antlr-interest] lexer error cont

Felix Dorner felix_do at web.de
Thu May 22 11:12:19 PDT 2008


Hey,

is it correct that the Lexer  doesn't count errors? I look in 3.1.b1 
org.antlr.runtime.Lexer.reportError(). which overrides 
BaseRecognizer.reportError(), with comments:

 *  If you override, make sure to update syntaxErrors if you care about 
that.

So I just override again in my personal lexer? The use case is: It's 
really cool that Antlr successfully recovers in some cases, but I _want 
to know about that. Rather than overriding, I thought I check for the 
error count in the lexer.


Felix


More information about the antlr-interest mailing list