[antlr-interest] gUnit test cases and Windows paths

Gavin Lambert antlr at mirality.co.nz
Sun Jan 18 00:24:32 PST 2009


At 21:11 18/01/2009, David Peckham wrote:
 >I assumed that ~NEWLINE+ would match anything up to the end of
 >the line. Thanks for the tip about forcing gUnit to display the
 >error message.

When you use ~ in a parser rule, it means "any token but these" -- 
so the lexer must still produce valid tokens for whatever it is 
you want to match.

If you want to match any character at all (not caring about 
tokens), then you have to do it in the lexer.



More information about the antlr-interest mailing list