Why parser ignores single quotes? #4049
-
Hi,
And the parser file FusionParser.g4:
When I parse the following text:
I am getting a valid parse tree: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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. |
Beta Was this translation helpful? Give feedback.
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.