Hello.
I'm writing to ask how I can access a token tree on rewrite rules. Let
me explain the situation. I have a couple of rules that look like
this:

firstRule :
    A^ {$A.tree.doSomething();} secondRule
  | B^ {$B.tree.doSomething();} thirdRule
;

secondRule :
    C { $C.tree.doSomething();} optionalRule? USELESS fourthRule* USELESS
    -> optionalRule? ^(C fourthRule*);

The thing works for the first rule (it call the doSomething() method
of the tree) but it doesn't on the second one because the tree is
null. I've read the code generated by ANTLR and I've realized that on
rewrite rules it creates the trees for the taken later on. Is there a
way to access those trees?

Thanks and sorry for my misspelling.

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.

Reply via email to