Greg Smolyn schrieb:
> Hi, I just gave that a try and it doesn't come out right at all.
>
> Try compiling it-- you'll see that it's missing the variable
> introduction for $h.Count
>
> In mF_UNICODEDIGITS, it should be creating an IToken or ITree h, as well
> as IList list_h. This was what ANTLR 3.1.1 did. However, it does not,
> and so $h.Count cannot be compiled, because there is no variable to be
> put in the place for $h!
>
> The list_h was there before and is the list that h is supposed to get
> added to.
Ah, I didn't notice that. I've managed to trace the cause down to a line
which ended up in the wrong template. I'll look into another release to
fix that problem.
Johannes
>
>
> On 10-Mar-09, at 2:36 PM, Johannes Luber wrote:
>>
>> 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
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---