[antlr-interest] '%' in action (bug?)
Junkman
j at junkwallah.org
Thu Jun 3 13:54:45 PDT 2010
Greetings,
The following grammar generates invalid string template error (146):
---------------------------------
grammar Test;
@lexer::members {
int x = 1234 \% 1;
}
TOKEN : 'bogus' ;
stmt :
( . )+
;
---------------------------------
For @lexer::members action, the modulo operator ('%') causes the error -
escaping with backslash doesn't help.
No problem for @parser::members.
A bug?
More information about the antlr-interest
mailing list