[antlr-interest] Expression evaluator error [v3 wiki]

Terence Parr parrt at cs.usfca.edu
Wed Nov 29 08:32:29 PST 2006


On Nov 29, 2006, at 4:06 AM, Kay Roepke wrote:

>
> On 29. Nov 2006, at 12:57 , Kay Roepke wrote:
>
>> Ouch. Changing the offending line to
>>
>>    |   '(' e=expr ')' {$value = $e.value;}
>>
>> works as expected. I'll investigate.
>
> Turns out that ANTLR only checks for predefined attributes when  
> using $expr.value without a label.
> $expr.tree etc. work.
> The question is, whether we want to allow return values to be  
> accessed that way, too.
> Going the route with the label always works.

This works in latest antlr...perhaps 3.0b5 isn't up to date  
enough...we must have fixed a bug ;)

Grab latest build from the depot browser.

Ter



More information about the antlr-interest mailing list