[antlr-interest] TreeAdaptor

Emond Papegaaij e.papegaaij at student.utwente.nl
Thu Aug 10 07:15:38 PDT 2006


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?

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?

Best regards,
Emond Papegaaij


More information about the antlr-interest mailing list