[antlr-interest] C TARGET: Strange No Viable Exception

register register72 at gmail.com
Mon Mar 26 10:28:31 PDT 2012

Hi all,
I have an antlr generated C  lexer that keeps on throwing several  "No
Viable Exceptions" just at the end of the file. I have developed the
grammar in AntlrWorks and the Java Lexer doesn't have any trouble at all.
The  ANTLR3_EXCEPTION struct passed to the "

displayRecognitionError" method does not carry any useful information:

- expecting, token and expectingSet are all null
- there is a mysmatch between the type and name field: type is 3

However it seems that the grammar is always able to complete a successful
parse of the files. I have made several attempts with various input and the
results I get are always correct. Still this "No Viable Exceptions" is
pretty annoying.
How could I debug this issue?


More information about the antlr-interest mailing list