[antlr-interest] could not even do k=1 for decision xx; reason: timed out

Gavin Lambert antlr at mirality.co.nz
Sat Aug 8 18:56:14 PDT 2009


At 13:48 9/08/2009, Tomasz Jastrzebski wrote:
>I tried replacing:
>-> ^($o $addExpr $e)
>with:
>-> ^(BIN_EXPR<BinaryExpression>[$o.text, $addExpr, $e.tree]>) // 
>instead of $addExpr.tree
>but the tool (at least ver 3.1.1) dooes not allow this - 
>error(117): missing attribute access on rule scope. Anyway, 
>$addExpr is of type addExpr_return.
>
>I do not know. This may be a bug.

Maybe.  It does make a certain amount of sense for the 
intermediate tree result to not yet be assigned to the .tree 
field, though.  But there ought to be some way to get at it.

I guess in the meantime you could just hack in the variable name 
it uses in the generated code to track it (look near the end of 
the method to see what gets assigned to the .tree of 
addExpr_return).  Not ideal, but it should get you by.



More information about the antlr-interest mailing list