Closed fraschfn closed 10 years ago
Warning 155 is correct in this case. Your -> channel
command references a constant which is declared in a target-language-specific syntax that ANTLR cannot understand. When using the lexer interpreter (either directly, or indirectly through something like the ANTLRWorks 2 lexer debugger), lexer commands which report this warning will not be executed.
We cannot reproduce the other issue in the current form. Please provide a complete example of the problem along with the version of ANTLR you are using, and reopen the issue.
I assume predicates are ignored as well.
Does the testrig also use the interpreter?
Btw. I'm using version 2.2.2.
The Run in TestRig command does not use the interpreter. It uses the Java target to compile the lexer and parser, and then runs the TestRig
command on the result.
When using named channels the IDE issues warning 155 (unrecognized constant value) although the constant is defined. This prevents the associated parser to run the testrig. The parser/lexer works fine when using VS (I drop the "final" for C#).