[antlr-interest] a range as single token?
Bart Kiers
bkiers at gmail.com
Sat Jan 15 03:17:12 PST 2011
>
> i also noticed that following works just fine:
> lines : line (NEWLINE line)*;
> line : CHAR*;
> NEWLINE : '\r'? '\n';
> CHAR : '\u0020'..'\u007F';
Yes, because you are now using the range operator inside a lexer rule (I
presume you know the difference between parser- and lexer rules?).
> is there a way i can make a rule token is a sequence of values as
> opposing a sequence of tokens?
>
I don't know what you mean by that.
Regards,
Bart.
More information about the antlr-interest
mailing list