[antlr-interest] [C target] lexer errors not counted

Tomas Potrusil potrto at centrum.cz
Thu Jun 18 06:54:22 PDT 2009


Hello,

I've found that lexer errors are not counted. After I invoke my parser
I look at the lxr->pLexer->rec->state->errorCount variable to see
whether there were some lexer errors. But even though there are some
the counter doesn't change. For the parser errors the counting looks
good. It seems to me that in antlr3lexer.c on line 262 [runtime
version 3.1.4 beta], the following is missing:
lexer->rec->state->errorCount++;

I added that to my local copy of runtime and now it behaves as expected.

Regards,
Tomas


More information about the antlr-interest mailing list