[antlr-interest] C Target: setUcaseLA bug?

Jim Idle jimi at temporal-wave.com
Thu Apr 15 13:00:53 PDT 2010



> -----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





More information about the antlr-interest mailing list