[antlr-interest] Re: Case sensitivity

Serafettin Senturk serafettin_sentuerk at intergral.com
Wed Aug 24 01:17:51 PDT 2005


 yeah, thanks Benjamin. After i did "caseSensitiveLiterals=false" in my
lexer grammar, i can recognize double quoted strings in the parser rules
without case sensitivity.

  Regards,
 Serafettin



-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org]On Behalf Of Benjamin Niemann
Sent: 29 April 2005 19:33
To: antlr-interest at antlr.org
Subject: [antlr-interest] Re: Case sensitivity


Serafettin Senturk wrote:
>   Does anybody know if we can apply the case sensitivity to Parser
>   grammar.
> Actually, I write "caseSensitive=false" in my lexer grammar, then it
> works. But when i do it in my parser, it does not work. Is there any one
> who knows how to make it in another way in Parser grammar?

Do you refer to literals - double quoted strings in parser rules? To make
these case insensitive, you have to set the option
caseSensitiveLiterals=false for the lexer (As Micheal said, only the lexer
handles the 'raw' text. Literals in parser rules are automagically copied
into the lexer's literal table).

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/





More information about the antlr-interest mailing list