[antlr-interest] my next easy question.. :)
clocKwize
clockwize at blueyonder.co.uk
Sun Jan 9 14:52:01 PST 2005
hi..again
STR_LIT : '"' (ESCAPES | ~('"'|'\\'| NEWLINE))* '"';
protected
NEWLINE
options {paraphrase = "a new line";}
: ('\n'
|'\r'
);
i want the paraphrase so it gives me a nice message if they have a new
line inside the string etc, but i can't put a rule inside the invert
rule, because it only likes 'a' | 'b' | 'c' or ranges, as a matter of
fact, even if i do ~(NEWLINE)
protected
NEWLINE: '\n' | '\r';
which is the same as ~('\n' | '\r') it doesn't like it...
Thank you
Mike
More information about the antlr-interest
mailing list