Hi Jim,
Thank you very much for your reply. I tried with the .tree solution you suggested, but got errors like "error C2440: 'type cast' : cannot convert from 'p_return' to 'pANTLR3_COMMON_TOKEN'." I can see that you are trying to use the common token structure, but the way to get the common token of current node doesn't seem to work. Is there anything I did wrong? Do you have any idea why it's not working? Thanks again. Linlin From: [email protected] [mailto:[email protected]] On Behalf Of Jim Idle Sent: 09 May 2009 17:49 Cc: [email protected] Subject: Re: [antlr-interest] How to pass the current node to the action? Xie, Linlin wrote: Sorry, I didn't give a subject to my last question. Below is the details, can anybody help me out? I presume that you mean: p: r1 r2 In which case you need to use one of: $tree $p.tree $p $r1.tree $r2.tree But I can't tell you which from the code you show, but you should be able to work that out. Also, don't forget the search on the ANTLR home page, or the Wiki Jim --~--~---------~--~----~------------~-------~--~----~ 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
