[antlr-interest] OO design question

Terence Parr parrt at jguru.com
Thu Jun 13 15:11:11 PDT 2002

On Thursday, June 13, 2002, at 02:55  PM, Greg Vaughn wrote:
> I've been a lurker on this list for a while now and still haven't had
> the time to dig into ANTLR like I've wanted, but I have done a few
> things with AspectJ, so I'll put in my 2 cents.
> This sounds like a prime candidate for aspects. With an Analyzer aspect,
> you could change the code in all the lookahead() methods of
> GrammarElement subclasses at "weave" time. You could even make the
> method abstract and let the aspect create concrete subclasses that
> implement lookahead() however the Analyzer needs it. You may end up with
> a nasty switch in the aspect, but the price is only paid at "weave"
> time. Alternatively you could specify different joinpoints for each of
> the subclasses to treat them separately to avoid the switch.
> Greg Vaughn
> Delphi Consultants, LLC
> gvaughn at delphis.com

Hi Greg, I'll look at AspectJ.  I actually don't care about the switch 
as long as I don't generate it, right?  The vtable polymorphism is just 
a glorified switch anyway (that I don't have to generate nor look at).

Now i wonder if we can get iContract merged with AspectJ and really have 
something!  How stable is AspectJ out of curiosity?

Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org


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

More information about the antlr-interest mailing list