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

Kay Roepke kroepke at classdump.org
Wed Nov 29 04:06:47 PST 2006


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.

-k
-- 
Kay Röpke
http://classdump.org/






More information about the antlr-interest mailing list