[antlr-interest] Re: C# port of 2.7.2

micheal_jor open.zone at virgin.net
Thu Mar 14 16:07:41 PST 2002


--- In antlr-interest at y..., "Smith, Eric V." <ericsmith at w...> wrote:

> > I'm already working on the 2.7.2a2 port Eric. Along with an 
updated 
> > 2.7.1 using ideas from the work you were kind enough to share. 
I'm 
> > trying to ensure that the debugging stuff is also supported for 
C#.
> ...
> 
> Wow, excellent.  How far along are you?  Any way I can help?

I am well advanced but, I am having to constantly re-evaluate what 
can be accomplished in the time I can afford without ending up 
porting all of ANTLR to C# (it wouldn't take much more effort believe 
me) ;-)

The class interdependency graph is really bad. To support the Tool 
class for instance requires porting over 20-25 other classes that I 
have no need for otherwise. Including CodeGenerator (which depends on 
another boatload of classes). 

I hope ANTLR develops into a system build out of co-operating 
interfaces (I almost started to refactor ANTLR blind along those 
lines but given my relative lack of familiarity with it's deepest 
secrets and my reluctance to do this in Java, I came to my senses).

> > Perhaps if you elaborate?. I must admt I gave up on any big re-
orgs 
> > until I'm more familiar with Antlr's internals.
> 
> I'm thinking something along the lines of the CLR's CodeDOM model.  
It's
> an abstract code generation model with things like
> CodeConditionStatement that represents an "if" statement,

That would be really useful but I fear ANTLR itself needs to be re-
architected as a system of co-operating entities modelled as 
interfaces and not as classes. Having to support 20 "accidental" 
referenced interfaces is a walk in the park compared to 20 non-
trivial classes. Especially if you don't actually *use* the classes 
for anything.

> It's clearly a lot of
> work and might require cleaning up the runtime interfaces as well.

Definitely!. I hope I am able to return to this with a view to 
actually doing something in the near future.

Micheal


 

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



More information about the antlr-interest mailing list