[antlr-interest] java question with regards to AST classes

Eric Mahurin eric_mahurin at yahoo.com
Thu Aug 19 11:32:14 PDT 2004


Anybody out there familar with java 1.5's latest generics/templates
feature?

To support various options for my AST construction, I would like to be
able to have a class inherit from a variable class.  So, I would like
to make a class something like this:

class IntAST extents <T> {
 ...
}

When I use this class for an object, then I would specify T:

IntAST<OrderedAST>
IntAST<SeparatedAST>
IntAST<BaseAST>

It seems like the new generic feature should support this, but I don't
see how.  Anybody know?  Or is their a better place to ask this question?

Eric




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list