[Mono-devel-list] ICodeParser && Mono

A Rafael D Teixeira rafaelteixeirabr at hotmail.com
Wed Feb 4 15:11:47 EST 2004


>From: "Christian Birkl" <wingman at techmonkeys.org>
>
>Hi all,
>
>Is there something equivalent to Microsoft.CSharp namespace in Mono?

Sure, that namespace is in the System Assembly (System.dll) [pay attention 
to msdn documentation, please]

>I can't find any in the current class/ directory in recent cvs.

It's in mcs/class/System/Microsoft.CSharp/   [that is our convention to 
place source files]

>I'm specifically interested in Microsoft.CSharp.CSharpProvider. I'd like to
>do some code analysing stuff via ICodeProvider, which can create a
>CodeCompileUnit via .CreateParser().Parse(). This would be a much nicer
>way than doing the parsing on my own. But unfortuntly .CreateParser() is
>defined to *always* return null.

If so, Mono implementation will do the same...

>It would be nice if Mono would break
>this MS behaviour (or somehow provide a second .CreateParser() method.).

If needed we can expose a class/method in another namespace AND assembly.

>My second question is wether mcs (mono c# compiler) internally actually
>uses System.CodeDom for its code creation or not.

Well, you are confusing things, mcs is a compiler it just compiles C# code.

C# code generation is done by the Microsoft.CSharp.CSharpCodeProvider, and 
is used, for example, in System.Web to generate classes from aspx pages.

>And if yes, how can i access the CodeDom created by the parser?

No, you instantiate de CodeDom classes to create code not the reverse. More 
a parser would generate a lot more information than what is possible to 
represent in the CodeDom format...

>Regards,
>
>	Christian

Regards,

Rafael Teixeira
Brazilian Polymath
Mono Hacker since 16 Jul 2001
MonoBrasil Founding Member - Membro Fundador do MonoBrasil
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/

_________________________________________________________________
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br




More information about the Mono-devel-list mailing list