[antlr-interest] How to duplicate a subtree into a tree

Bryan Ewbank ewbank at gmail.com
Wed Feb 1 14:22:50 PST 2006


You must first /copy/ the tree, not just use it twice.  In C++ there's
a duptree method available that does this.  I don't know, but assume
there is something similar, in java-land.

On 1/31/06, duboimat at iro.umontreal.ca <duboimat at iro.umontreal.ca> wrote:
> Hello,
>
> I would like to know how to duplicate a subtree to build a new one.
> When I add two time the same subtree in a new one, my computer will stuck
>
> like
> klo.addChild(kl.getFirstChild());
> klo.addChild(kl.getFirstChild());
>
> thank you
> Mat
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>


More information about the antlr-interest mailing list