Mike Stall has released his C# compiler thats written in C# to the world.
For anybody looking for the full source to a bootstrapping C# compiler, today’s your lucky day.
A while ago (back in 2001 before we shipped v1.0), I wrote a C# compiler called “Blue”. I know it’s 3.5 years after I wrote it, but I figured releasing it now was better late then never. Some fast facts:
– It’s written 100% in C#.
– It uses Reflection to import all references and Reflection.Emit to emit the IL.
– Everything (particularly the parser and lexer) were written by hand.
– It has the standard compiler pipeline as described in the dragon book.
– It produces verifiable IL (you can run PEVerify on the output and it passes).
This is where I’m supposed to act like a big tough programmer and say I’ll add a bunch of features to it. I’ll pass; but if someone would add some new features that would be great 😀