Since I'm interested in formal languages I've decided to write a simple
compiler for .NET for my studies.
I would like to be able to use the .NET class library too (especially
windows forms).

Could you give me an idea where should I start from? Probably I have to
qualify myself as a beginner, so too advanced stuff might be not clear
to me yet. What would you recommend in that case?

Thank you!

Re: How to write a compiler for .NET? by Thomas

Thomas
Sun Jul 13 10:45:07 CDT 2003

> so too advanced stuff might be not clear to me yet.

I'm not sure, but writing a compiler always was 'advanced stuff'...

For .NET compilers, it is best to start learning
the CLR and MSIL:
http://www.gotdotnet.com/team/lang/




--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/



Re: How to write a compiler for .NET? by Gabriele

Gabriele
Mon Jul 14 08:14:56 CDT 2003

Zingam,

Thomas and Jay gave you reference to good material, so you want to check
those out to begin with. I am working on a compiler targeting the .NET
Framework too, and if you already have some experience with writing
compilers you shouldn't have too many problems. The MSIL is very powerful
and way easier to target than a regular CPU.

I would recommend you to read John Gough "Compiling for the .NET Common
Language Runtime (CLR)"
(http://www.phptr.com/browse/product.asp?product_id={1590B1B8-35AB-484B-B231
-6D40E8D2A60D}), it's a little too much academic here and there but it was a
great source of information. I would also recommend you to read Jason Bock
"CIL Programming: Under the Hood of .NET"
(http://www.apress.com/book/bookDisplay.html?bID=88) if you are interested
in the results produced by different compilers (mainly C# and VB.NET), which
can be a good source of tips.

Don't forget the good old ILDASM (part of the .NET Framework SDK), and Lutz
Roeder "Reflector for .NET" (http://www.aisto.com/roeder/dotnet/). Reverse
engineering is very useful when you are not sure how to implement a
particular feature of your language.

HTH,

Gabriele

"Zingam" <hr_hristov@hotmail.com> wrote in message
news:OSR%23h$USDHA.1976@TK2MSFTNGP10.phx.gbl...
> Since I'm interested in formal languages I've decided to write a simple
> compiler for .NET for my studies.
> I would like to be able to use the .NET class library too (especially
> windows forms).
>
> Could you give me an idea where should I start from? Probably I have to
> qualify myself as a beginner, so too advanced stuff might be not clear
> to me yet. What would you recommend in that case?
>
> Thank you!
>
>
>



Re: How to write a compiler for .NET? by Zingam

Zingam
Mon Jul 14 13:12:32 CDT 2003

thank you everyone!!!