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
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---
grammar TestList;
options{
language=CSharp2;
}
rule
: DIGIT
;
DIGIT
: F_UNICODEDIGITS
;
fragment F_HEXDIGIT
: '0'..'9' | 'a'..'f' | 'A'..'F'
;
fragment F_UNICODEDIGITS
: (h+=F_HEXDIGIT)+ {$h.Count <= 6}?
;
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address