[antlr-interest] v3.1.2 breakage in Lexer with +=
Johannes Luber
jaluber at gmx.de
Tue Mar 10 14:36:13 PDT 2009
Greg Smolyn schrieb:
> Hi,
>
> I just upgraded from Antlr 3.1.1 to 3.1.2, and have discovered that a
> simple construct in my lexer no longer compiles:
>
> fragment F_HEXDIGIT
> : '0'..'9' | 'a'..'f' | 'A'..'F'
> ;
>
> fragment F_UNICODEDIGITS
> : (h+=F_HEXDIGIT)+ {$h.Count <= 6}?
> ;
>
>
> In 3.1.1 this works fine, but in 3.1.2, the "h" is not defined inside
> the generated function!
>
> Is this a bug or am I doing something wrong? I'm using the CSharp2
> generator and the output=AST option.
>
> -greg
Not sure why it doesn't work for you, but with the attached grammar the
generated code seems to be ok. Maybe you look for a variable named "h",
but instead there is one named "list_h".
Johannes
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TestList.g
Url: http://www.antlr.org/pipermail/antlr-interest/attachments/20090310/aa9f96d6/attachment.pl
More information about the antlr-interest
mailing list