Bootstrapping C# compiler

Posted by

This is very cool. Mike Stall has released the source for a C# compiler, written completely in C#!

I remember taking a Compilers class back in Uni (not that long ago, really) and I have a copy of The Dragon Book on my bookshelf (I even read most of it during my compilers course!). So writing my own compiler has always seemed quite interesting to me.

This one includes a hand-writer lexer and parser (no mean feat, that!) for most of the C# grammer (and it shouldn't be impossible hard to add the rest). There are some lexer and parser generators for .NET (for example, C# Tools is one, though I haven't really tried it myself yet).

If I ever get some free time (yeah, right) I might take a closer look!

blog comments powered by Disqus