[antlr-interest] Complaints about BaseAST implementation

Terence Parr parrt at cs.usfca.edu
Wed Oct 12 08:02:58 PDT 2005


On Oct 12, 2005, at 5:57 AM, Micheal J wrote:
> Perhaps BaseAST simply implements common algorithms for the  
> CommonASTxxxx
> classes. Anyone is free to design a new AST-Node class that  
> implements the
> behaviour specified in the AST interface.

Correct and correct. :)  BaseAST was meant simply to abstract out the  
child-sibling tree part so anybody could subclass to add fields like  
string and token type etc...  If you don't want a child-sibling, then  
implement AST.

That said, ANTLR 2 is a mess built under duress in my part time.   
ANTLR3 is much better designed.  The v3 overview slides I'm building  
for the workshop look good :)

Ter



More information about the antlr-interest mailing list