Hi,
as an exercise, I'd like to write a compiler for .net for a very small
language. I'd like to know where I could find documents about CIL/CLR
and how to start such a project. I already wrote compilers for real
processors, so what I need is information about CIL/CLR, file formats
all those things.
Your help would be very appreciated.
Best,
David

Signature
_______________________________________________________________________
David Bellot
GFI Informatique
Work: +33 (0)4 97 12 85 89
Cell: +33 (0)6 88 23 23 73
Web: http://david.bellot.free.fr
AIM/ICQ: ddb02
Jon Shemitz - 05 Oct 2006 19:08 GMT
> as an exercise, I'd like to write a compiler for .net for a very small
> language. I'd like to know where I could find documents about CIL/CLR
> and how to start such a project. I already wrote compilers for real
> processors, so what I need is information about CIL/CLR, file formats
> all those things.
For a small exercise, I'd look at Reflection.Emit. It has opcode
summaries, and it takes care of file format details for you.

Signature
.NET 2.0 for Delphi Programmers www.midnightbeach.com/.net
Delphi skills make .NET easy to learn Great reviews & good sales.
Mattias Sjögren - 05 Oct 2006 20:45 GMT
David,
>I already wrote compilers for real
>processors, so what I need is information about CIL/CLR, file formats
>all those things.
The CLI spec has all that.
http://www.ecma-international.org/publications/standards/Ecma-335.htm
There are also some good books you may want to read
"Compiling for the .NET Common Language Runtime" by John Gough
"Inside Microsoft .NET IL Assembler" by Serge Lidin
Mattias

Signature
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Greg Young - 08 Oct 2006 20:09 GMT
Actually Serge has a new edition out.
http://www.amazon.com/Expert-NET-2-0-IL-Assembler/dp/1590596463
Cheers,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
> David,
>
[quoted text clipped - 12 lines]
>
> Mattias
agapeton@gmail.com - 07 Oct 2006 06:04 GMT
Joe Duffy did a talk on this... called "Write a compiler in one hour"
http://www.bluebytesoftware.com/blog/PermaLink,guid,a8abcdce-bd63-4d1c-8bca-2cea
99f4eb53.aspx
> Hi,
>
[quoted text clipped - 17 lines]
> Web: http://david.bellot.free.fr
> AIM/ICQ: ddb02