• Feeds

    Subscribe in a reader

  • Ads

Source code for a bootstrapping C# compiler

Thisis pretty cool – Mike Stall hasposted the source code for Blue, a C# compiler written in C#. It’s not acomplete implementation of the language, but it does bootstrap (it’scapable of compiling itself). I’m interested in cracking it open andtaking a look at the lexer/parser implementation, and finally seeing areal-world example of Reflection.Emit…

In the mean time, check out Mike’swriteup or just go download the sourceyourself.

 

#1 Brian Vargas on 2.07.2005 at 5:55 AM

Steve,While I know there's always a chance you'll get fired from looking at an Open Source project, the Mono project has had a self-hosting C# compiler, including 2.0 features, for quite awhile now.http://mono-project.comBrian

#2 Steve Maine on 2.07.2005 at 11:25 AM

Both very good points. Although I will officialy deny having any independent recollection of such an event [:)], I've looked at both of those before. The thing that caught my eye about Blue was it's small size -- it's a lot more tractable that either Mono or Rotor, just because there's less of it to deal with.Although both the Mono and Rotor compilers are *much* more robust.