[antlr-interest] TreeAdaptor
    Terence Parr 
    parrt at cs.usfca.edu
       
    Fri Aug 11 11:35:32 PDT 2006
    
    
  
On Aug 10, 2006, at 7:15 AM, Emond Papegaaij wrote:
> Hello
>
> I'm trying to implement my own version of the TreeAdaptor  
> interface, but
> have a few questions:
>
> What is the 'getUniqueID' used for? Is it supposed to simply return a
> unique number for every node? As the Javadoc states using 'hashCode 
> ()' is
> dangerous. Maybe 'System.identityHashCode()' is an option?
Didn't know about that!  Sweet...yes, that is it.  We need this for  
sending events to the debugger.  Added to list.
> What are the 'getChild(int i)' and 'getChildCount()' methods  
> supposed to
> do? They are not being used anywhere. On which children do they  
> operate?
> Maybe an additional method argument 'Object node' needs to be added?
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
    
    
More information about the antlr-interest
mailing list