I did some more debugging. It seems that is exactly the case - during node construction:
-> ^(BIN_EXPR<BinaryExpression>[$o.text, $addExpr.tree, $e.tree]>) $addExpr.tree is not assigned yet. It gets reassigned later. Thanks for the pointer. I am gonna post a new subject. Tomasz --- On Sat, 8/8/09, Gavin Lambert <[email protected]> wrote: From: Gavin Lambert <[email protected]> Subject: Re: [antlr-interest] could not even do k=1 for decision xx; reason: timed out To: "Tomasz Jastrzebski" <[email protected]>, "antlr-interest" <[email protected]> Date: Saturday, August 8, 2009, 9:56 PM 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. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
