[antlr-interest] case in-sensitive literals

Andrew Deren andrew at adersoftware.com
Fri Mar 14 13:12:10 PST 2003


So what does that mean? Am I doing something wrong?
Is the option caseSensitiveLiterals working properly or do I have to
overload testLiteralsTable to make it work?
Andrew

----- Original Message -----
From: <mzukowski at yci.com>
To: <antlr-interest at yahoogroups.com>
Sent: Friday, March 14, 2003 10:00 AM
Subject: RE: [antlr-interest] case in-sensitive literals


> The issue used to be that "AND" would be put in the literals table, but
> everything coming through would have been normalized to lower case, so
"and"
> would be looked up an missing.  I sent Ter a patch for that.  From your
> previous post it sounds like that normalization wasn't even happening
before
> testing the literals table.
>
> Monty
>
> -----Original Message-----
> From: Andrew Deren [mailto:andrew at adersoftware.com]
> Sent: Friday, March 14, 2003 7:56 AM
> To: antlr-interest at yahoogroups.com
> Subject: Re: [antlr-interest] case in-sensitive literals
>
>
> I thought I had 2.7.2. I looked at the install.html and it says 2.7.2.
> In my grammar I have "and" lower case, and it would only accept lower
case.
> Thanks.
>
> ----- Original Message -----
> From: <mzukowski at yci.com>
> To: <antlr-interest at yahoogroups.com>
> Sent: Friday, March 14, 2003 9:35 AM
> Subject: RE: [antlr-interest] case in-sensitive literals
>
>
> > 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/
> >
> >
> >
> >
>
>
>
>
>
> 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/
>
>
>
>



 

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



More information about the antlr-interest mailing list