[antlr-interest] caseSensitive = false in C taget ??

Jim Idle jimi at temporal-wave.com
Fri Oct 16 03:50:29 PDT 2009


There is. Please read the documentation otherwise there is little point in me writing it ;-)

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Indhu Bharathi
> Sent: Tuesday, October 13, 2009 4:28 PM
> To: Þðóøêèí Ìèõàèë; antlr-interest at antlr.org
> Subject: Re: [antlr-interest] caseSensitive = false in C taget ??
> 
> 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
> 
> 
> 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