[antlr-interest] pushed antlr build with tree rewriting and composite grammars (java)
David Holroyd
dave at badgers-in-foil.co.uk
Sat Jan 12 10:53:56 PST 2008
On Thu, Jan 10, 2008 at 04:39:54PM -0800, Terence Parr wrote:
> http://www.antlr.org/download/build/antlr-2008-01-10.16.tar.gz
I'm having a go at upgrading from 3.0.
First little thing I notice is that I need to implement some additional
methods in TreeAdaptor. The only non-obvious thing is the intention
of,
setChildIndex(Object,int)
should this result in the child actually changing position? i.e. given
(TREE A B C)
a call to
setChildIndex(A, 1);
would give
(TREE B A C)
? Or is this just for bookkeeping, and the child is already at this
location?
Maybe my problem is I'm not sure why CommonTree records 'childIndex' and
does,
public int getChildIndex() {
return childIndex;
}
rather than just something like,
public int getChildIndex() {
return parent.children.indexOf(this);
}
ta,
dave
--
http://david.holroyd.me.uk/
More information about the antlr-interest
mailing list