[antlr-interest] How to write '\v' in antlr grammar?
zai-qiang.leng at sybase.com
zai-qiang.leng at sybase.com
Thu Mar 27 00:25:17 PST 2003
Hi,
I have following lexer rules,
protected
ESC
: '~'!
(
'n' {$setText('\n');}
| 'r' {$setText('\r');}
| 'v' {$setText('\v');} //If I
change the '\v' to ''(empty char), all is ok.
| 't' {$setText('\t');}
| 'f' {$setText('\f');}
| 'b' {$setText('\b');}
| ('0'..'2') (Digit) (Digit)
);
but when I compile it via antlr, I got following errors:
NTLR Parser Generator Version 2.7.1 1989-2000 jGuru.com
error: Token stream error reading
grammar(s):antlr.TokenStreamRecognitionException: unexpected char: v
TokenStreamException: unexpected char: v
Error executing c:\winnt\system32\cmd.exe.
Can anyone tell me how to solve this?
Thanks
Zaiqiang
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list