[antlr-interest] How to change AST node order in Java ?

Jaak Niit jack at icefire.ee
Mon Nov 12 17:54:55 PST 2007


Hi,

Is there solution to change AST node order in Java ?

If current node have children A, B, C, D and I want to change order to 
A, D, B, C.
BaseTree has methods deleteChild(int i) and addChild(Tree t),
but addChild(int offset, Tree t) is missing.

I want to write something like
BaseTree D = t.getChild(3);
t.deleteChild(3);
t.addChild(1,D);

So problem is how to add node in middle of list.

-- 
# Jaak Niit 



More information about the antlr-interest mailing list