[antlr-interest] two requests
dmitry.lizorkin at gmail.com
Wed Oct 3 03:18:46 PDT 2007
1. When both a rewriting rule and a ^ operator suffix in the matching part
are presented, e.g,
: G_IDENTIFIER ':'^ -> ^(AST_FIELD G_IDENTIFIER)
ANTLR reports a very non-obvious (at least for me) error message:
error(10): internal error: test.g : java.lang.IllegalArgumentException:
Can't find template tokenRefRuleRootTrack.st
The meaning behind this error message is quite hard to locate, as niether
the initial reason for the problem nor the line number within the grammar
are reported. Could the error message for this case be improved in the
future versions of ANTLR ?
2. If the following rewriting rule is written
: ('a'..'z' | 'A'..'Z') ('a'..'z' | 'A'..'Z' | '0'..'9' | '_')*
-> ^(AST_ID G_IDENTIFIER)
ANTLR crashes with a java.lang.NullPointerException. The rewriting rule
above may be syntactically/semantically incorrect, but I
definitely would not expect ANTLR to crash in the case. Could this be a kind
of a bug?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the antlr-interest