[antlr-interest] case in-sensitive literals

mzukowski at yci.com mzukowski at yci.com
Fri Mar 14 07:35:58 PST 2003


Try putting "and" in instead.  I think antlr normalizes to lower case.  I
thought this was a bug that was fixed in 2.7.2, is that what you are using?

Monty

-----Original Message-----
From: Andrew Deren [mailto:andrew at adersoftware.com]
Sent: Thursday, March 13, 2003 4:53 PM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] case in-sensitive literals


I need my literals in grammar to not be case sensitive.
I set the option: caseSensitive=false in lexer, and
caseSensitiveLiterals=false but it still doesn't work.
What I'm trying to accomplish is to have in parser:
andExpr : otherExpr "and" otherExpr
but have it work for either "and" or "AND" or any other combination.
I have more of those literals (or, is, not, etc)
It looks like when I put "AND" in the program, lexer matches Token.ID
Thanks,
Andrew



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list