> > So I think the right thing for me to do is to study the generated code
> > for rewrites and mimic the use of the adaptor APIs to link up the
> > trees correctly.
> 
> Yes - this is what I was getting at basically.
> 
> Jim

It turned out that it was not useful studying the generated code.
However, I ended up solving my problems by using
adaptor.addChild(parent, adaptor.dupTree(child)) whenever splicing a
tree created earlier in a parse into a new parent.  This is probably
overkill, with a lot of extra copying of subtrees, but it seemed
cleanest and guaranteed to work correctly.

-- 
Franklin

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