[antlr-interest] C# Target Poll

Micheal J open.zone at virgin.net
Mon May 19 10:31:05 PDT 2008


Hi,

> > > And on a related topic, it puzzled me a bit when I had to 
> reference 
> > > "Antlr3.Runtime.dll" and then use the namespace 
> "Antlr.Runtime" in 
> > > the code.  There's a bit of a disconnect there; generally the 
> > > assembly names tend to match the root namespace name 
> (either in full 
> > > or squashed form).
> > 
> > If you use ST-integration in your grammars you will need
> > - StringTemplate.dll  (ST#)
> > - antlr.runtime.dll   (an ST# dependency)
> > - Antlr3.Runtime.dll  (renamed to avoid conflict & 
> brilliantly avoids 
> > clashing with Antlr4.Runtime.dll!)
> 
> What is the Antlr3.Utilities used for?

Currently houses the 'DOTTreeGenerator' class with a dependency on ST. The
split into two assemblies means unless a project uses 'DOTTreeGenerator' or
ST-integration in grammmar, there is no dependency on ST, just
Antlr3.Runtime.

> > Could have renamed the namespaces too I guess but, we thought it 
> > better to leave (most other targets use antlr not antlr3)...
> > 
> > Micheal
> 
> Well, this time you shouldn't have followed the majority. The 
> problem is that Antlr4.Runtime.dll can't be used in 
> concurrency with Antlr3.Runtime.dll due to namespace clashes. 
> Well, users can use assembly aliases to solve that problem 
> but it could be done without user interaction. And yes, I 
> truly believe that someday ANLTR 3 and ANTLR 4 end up being 
> used together in some project.

Can't argue with the reasoning. It was a close decision iirc. For ANTLR4,
there is the option of swap the ST lexer/parser for handcoded ones... ;-)

Micheal

-----------------------
The best way to contact me is via the list/forum. My time is very limited. 



More information about the antlr-interest mailing list