[antlr-interest] Modifying AST

Dan Delorey antlr at deloreyfamily.org
Sat May 10 09:36:50 PDT 2008


I don't know if this is the preferred method, but I've used
adaptor.dupTree()<http://www.antlr.org/api/Java/interfaceorg_1_1antlr_1_1runtime_1_1tree_1_1_tree_adaptor.html#ae053199c6552b68362d3a8b8d964d22>and
adaptor.becomeRoot()<http://www.antlr.org/api/Java/interfaceorg_1_1antlr_1_1runtime_1_1tree_1_1_tree_adaptor.html#2caa60c49f05e8fb8d7541755b086ce5>to
accomplish that.

On Sat, May 10, 2008 at 2:24 AM, erandi lakshika <erasuru at gmail.com> wrote:

> I am dealing with a AST of a language and I want to insert multiple
> sub-trees of an AST into my original AST at multiple nodes. For that I want
> to make copies of the subtree. How can I do this?
>
> --
> Regards
> -Erandi-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080510/8b2b2664/attachment.html 


More information about the antlr-interest mailing list