[antlr-interest] accessing parent node in order to replace
Micheal J
open.zone at virgin.net
Thu May 31 13:22:39 PDT 2007
Hi,
You could pass some information/attributes up from production_b that
production_a then takes into account when deciding what sort of tree to
build.
Micheal
-----------------------
The best way to contact me is via the list/forum. My time is very limited.
-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Pam L Sampson
Sent: 31 May 2007 21:16
To: antlr-interest at antlr.org
Subject: [antlr-interest] accessing parent node in order to replace
I would like to build a tree where in some cases I want the parent node
removed and replaced with a different tree. My question is how do I access
the parent node of the tree I am currently building. For example:
production_a
: token production_b
//tree built here
;
production_b
: token
//now here I would like to replace the tree built in production_a
//with a new tree for production_b but only in some cases
//how do I replace the previous subtree with the new one?
;
=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070531/eb52cea7/attachment.html
More information about the antlr-interest
mailing list