[antlr-interest] new Tree interfaces

Terence Parr parrt at cs.usfca.edu
Mon Sep 5 09:02:05 PDT 2011


Yeah,First-time cleaning everything up and then slowly thinking about how generics get integrated. Is truly astounding just how wide the fanout is when you add a generic type. it ripples through all the classes. ugh. From the users point of view, however, it should look clean.

Ter
On Sep 4, 2011, at 11:47 PM, Bart Kiers wrote:

> Hi Ter, others,
> 
> Perhaps generics could be introduced in v4?
> 
> public interface Tree<T> {
> 	Tree<T> getParent();
> 	T getPayload();
> 	Tree<T> getChild(int i);
> 	int getChildCount();
> 	String toStringTree();
> }
> Regards,
> Bart
> 
> 
> On Sun, Sep 4, 2011 at 11:47 PM, Terence Parr <parrt at cs.usfca.edu> wrote:
> btw,If you want to take a look at the clean new tree interface:
> 
> http://www.antlr.org/depot/antlr4/main/runtime/Java/src/org/antlr/v4/runtime/tree/Tree.java
> 
> then sub interfaces
> 
> http://www.antlr.org/depot/antlr4/main/runtime/Java/src/org/antlr/v4/runtime/tree/SyntaxTree.java
> http://www.antlr.org/depot/antlr4/main/runtime/Java/src/org/antlr/v4/runtime/tree/ParseTree.java
> http://www.antlr.org/depot/antlr4/main/runtime/Java/src/org/antlr/v4/runtime/tree/AST.java
> 
> ...
> 
> Ter
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
> 



More information about the antlr-interest mailing list