[antlr-interest] C Target: setUcaseLA bug?

Brian Catlin BrianC at sannas.org
Thu Apr 15 18:52:58 PDT 2010


Thank you Jim!  

I guess I don't understand when ANTLR3_INLINE_INPUT_ASCII is needed, and the
implications thereof.

I certainly appreciate all the hard work you have been putting into the C
target, and the support you've provided

 -Brian

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Jim Idle
Sent: Friday, April 16, 2010 04:01
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] C Target: setUcaseLA bug?



> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest- 
> bounces at antlr.org] On Behalf Of Brian Catlin
> Sent: Wednesday, April 14, 2010 7:54 PM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] C Target: setUcaseLA bug?
> 
> Is setUcaseLA known to work in ANTLR3c-3.2?  

Works for me, I just tried it. There must be something else going on. Are
you sure you are looking at the debugger correctly? Are you tracing in to
the upper case version of LA?

> At the beginning of my
> generated lexer routine mTokens, it switches on LA(1) trying to build 
> a token, but LA(1) is returning the lowercase input character.  As you 
> can see below, I call setUcaseLA immediately after the input stream 
> was created.

> 
> @lexer::header
> 
> {
> 
> #define     ANTLR3_INLINE_INPUT_ASCII
> 
> }


Can you see your problem if I highlight the above line? ;-) You are not
calling LA, as you have told the lexer to use inline input code and not call
the input routines.

Jim




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