[antlr-interest] TreeAdaptor
Terence Parr
parrt at cs.usfca.edu
Mon Aug 14 08:38:27 PDT 2006
On Aug 14, 2006, at 5:41 AM, Sean Walton wrote:
>> doh! Changed to:
>>
>> /** Get a child 0..n-1 node */
>> public Object getChild(Object t, int i);
>>
>> /** How many children? If 0, then this is a leaf node */
>> public int getChildCount(Object t);
>>
>> Change 2870.
>>
>> Ter
>>
> You know, this wasn't necessary. The 'getChild()' and
> 'getChildCount()' methods simply *used to* operate on the current
> node, because the child can be a parent to a different child. The
> new method looks more like a static call, because it is now
> independent (i.e., 'static') from the current node, resolving
> getChild() through 't' and not the current instance. If that is
> the case, it is a more confusing interface than the first.
Hi Sean. There is no such thing as "current node". To what do you
refer?
Ter
More information about the antlr-interest
mailing list