[antlr-interest] case in-sensitive literals

Andrew Deren andrew at adersoftware.com
Thu Mar 13 16:52:38 PST 2003


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/ 



More information about the antlr-interest mailing list