Skip to content

Why parser ignores single quotes? #4049

Answered by kaby76
eugenelepekhin asked this question in Q&A
Discussion options

You must be logged in to vote

The parser syntax error count (here) isn't incremented for lexer errors. The lexer is a different recognizer than the parser, but doesn't seem to keep a similar error counter, which is rather confusing. The way I deal with this is to replace the error listeners for both the parser and lexer with my own error listeners, which have completely independent error counters that I can use.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@eugenelepekhin
Comment options

Answer selected by eugenelepekhin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants