The main motivation behind the C# implementation of the Tool is outside
the "normal" realm of usage. Now that the C# port is available, I am
able to reference it from other .NET assemblies and make use of various
features, such as:

I can dynamically create a parser for a grammar file and run it to get
an AST. This operation is very fast since the NFA/DFA converter and
CodeGen tree walkers are skipped. My Visual Studio integration makes use
of this ability to provide precise IntelliSense information without any
UI delay.

Overall I really use the C# port for these things:
1. Easier integration in Visual Studio's build system
2. Accuracy and performance in grammar analysis tools (which I happen to
also integrate with Visual Studio)
3. As a sandbox for new feature ideas and testing optimization
possibilities

My codegen stage internals do differ slightly from the Java version (a
couple extra optimizations), but holds true to the grammar spec itself.
Even for the cases where I think the grammar spec has a couple bugs I've
made sure to not deviate from it (one with tree wildcards and one with
rewrites referencing the enclosing rule). If this work exceeds the scope
of what you want to keep track of in P4, that's absolutely fine as well;
there are other sites it can be hosted as an independent project. :) I
just think you deserve the first call on it since it encapsulates 95%
your work to 5% mine.

//depot/code/antlr/main/toolcs works as well.

Thanks,
Sam

-----Original Message-----
From: Terence Parr [mailto:[email protected]] 
Sent: Friday, March 06, 2009 3:50 PM
To: Sam Harwell
Cc: Jim Idle; [email protected]
Subject: Re: [antlr-dev] Source control for C# ports


On Mar 6, 2009, at 1:40 PM, Sam Harwell wrote:

> //depot/code/antlrcs works for me as well. I would even prefer the  
> isolation in a way, but made the other suggestion earlier based on  
> patterns I saw in the existing folder structure.

Yeah, the isolation is probably a good idea given that it doesn't use  
Java antlr tool etc...

>
> Prof. Parr, did you get a chance to think about this? I believe I  
> have my port up-to-date with the tree filter parser work for both  
> the Java and CSharp3 runtimes.

Wow! you're fast! Do you have a day job? Or, are you neglecting your  
school projects to work on ANTLR? ;)

We should figure out how to integrate your work into the mainline  
though. Have you discussed with Johannes about integrating your  
runtimes etc...? Is he doing version 1 and two and you are doing C# 3?  
If so, maybe that should go into the main antlr area, right?

The C# version of the tool itself should definitely go in a different  
area...well, what about //depot/code/antlr/main/toolcs similar to // 
depot/code/antlr/main/tool for the Java version?

We should be careful that we don't splinter the ANTLR metalanguage  
with two different implementations. Can you remind me of your  
motivation behind putting the tool itself in C#? It integrated better  
with VisualStudio or something, right?

Ter
_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org/mailman/listinfo/antlr-dev

Reply via email to