[antlr-interest] Problem "debugging" ANTLR error messages.

Gavin Lambert antlr at mirality.co.nz
Wed Feb 3 11:03:49 PST 2010


At 02:16 4/02/2010, Søren Andersen wrote:
 >I'm toying with a Java-like language for fun, and I'm having a
 >problem with ANTLR crashing when trying to use it.
[...]
 >[14:14:32] error(10):  internal error: Exception test.g:19:64:
 >unexpected char:
 >0xA0 at org.antlr.grammar.v2.ANTLRLexer.nextToken(ANTLRLexer.java:347)
 >: unexpected stream error from parsing test.g

Char 0xA0 is a non-breaking-space, suggesting 
that you copy-pasted the rule from a webpage or 
something else that inserted them.  Try retyping 
the spaces as "real" spaces and it should fix the 
problem.  (The column index should tell you where 
the problem character is.)



More information about the antlr-interest mailing list