[antlr-interest] ANTLR 3.0.1 C# target
Johannes Luber
JALuber at gmx.de
Mon May 19 16:04:36 PDT 2008
> Hello!
>
> I have a small problem with C# code generator. The generator produces
> code with using declarations. This may cause name clashes with different
> classes. In my project the System.Type clashes with my own Type class.
> The simple workaround is to write:
>
> using Type = My.Own.Type;
>
> but this won't work for Stack if someone ever needs to use that name.
> Surely one could use the fully qualified name, but couldn't the
> generated code do that? So I'd like to suggest removing the using
> declarations.
>
>
>
> Stefan Chrobot
Just that I understand you correctly: Instead "using IList = System.Collections.IList;" you want to have "System.Collections.IList" everywhere. Would using the new partial class-feature of CSharp2 help already? IIRC, different partial class files can have different using statements, even the same alias for different things.
Johannes
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
More information about the antlr-interest
mailing list