[antlr-interest] caseSensitive = false in C taget ??
Indhu Bharathi
indhu.b at s7software.com
Tue Oct 13 03:57:31 PDT 2009
AFAIK, there is no shortcut.
You will have to write something like
HELLO : ( ('H'|'h') ('E'|'e') ('L'|'l') ('L'|'l') ('O'|'o') )
;
You can make it more readable using fragments.
HELLO : H E L L O
fragment H: ('H'|'h')
fragment E: ('E'|'e')
fragment L: ('L'|'l')
fragment O: ('O'|'o')
If you don't care about case in the complete text, you can consider creating
your own Stream subclassing StringStream or write a wrapper on top of it and
emit all characters in lower case. Then you parser needs to handle only
lower case.
Cheers, Indhu
-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of ??????? ??????
Sent: Tuesday, October 13, 2009 4:07 PM
To: antlr-interest at antlr.org
Subject: [antlr-interest] caseSensitive = false in C taget ??
this option doesn't work. But i want to use it... what can i do?
--
Best regards,
Michael
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list