[antlr-interest] antlr.TokenWithIndex (and others) should be an interface

charlweed charlweed at yahoo.com
Sun Aug 8 15:09:11 PDT 2004


Hi,
I love TokenStreamRewriteEngine but it uses antlr.TokenWithIndex, and
TokenWithIndex is neither an interface nor an Adbstract class. I
already use a token that is a subclass of CommonHiddenStreamToken, but
I want to also use it in TokenStreamRewriteEngine.

The only solution was to re-implement TokenStreamRewriteEngine , and
replace all the references to antlr.TokenWithIndex with a reference to
an iterface with the same signature.

So it seems to me that almost all the Token classes should be
interfaces, and there should be a handful of default implementations.
That way we can easily extend tokens without the hassle of re-coding
other classes in antlr.

Charlweed



 
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