[antlr-interest] The NOT (~) Operator
mail at ghost23.de
Sat Apr 12 01:10:47 PDT 2008
i have a problem with a grammar error message, i don't understand.
I have this grammar (reduced to the relevant bit):
: TAB* ~NEWLINE;
: '\r'? '\n';
TAB : '\t';
Checking the grammar with ANTLRWorks gives me this error:
simpletest.g:0:0: syntax error: buildnfa: <AST>:6:11: unexpected AST node: ?
The problem seems to relate to the "~NEWLINE", because if i delete it, i
get no error. Also, if i change the "INDENTATION" to a parser rule
"indentation", i get no error, but that is not an option for me.
Can someone explain to me, what the reason behind this error is?
More information about the antlr-interest