This repository has been archived by the owner. It is now read-only.
F# implementation of a Mini-C compiler targeting MSIL
F# C# PowerShell
Switch branches/tags
Nothing to show
Clone or download
Latest commit d7f1032 Jan 8, 2014
Failed to load latest commit information.
docs Add readme Jan 8, 2014
src Upgrade to VS2013 Jan 8, 2014
.gitattributes Initial commit with empty projects Jan 17, 2013
.gitignore Initial commit with empty projects Jan 17, 2013 Add readme Jan 8, 2014

Mini-C Compiler

This is a compiler for a subset of the C programming language. The compiler is written in F# and targets Microsoft Intermediate Language (MSIL). It was written so that I could teach myself F#. If you're interested in doing the same thing, you may find it useful.


I wrote a simple GUI to visualize the compilation process. The Abstract Syntax Tree (AST) and Microsoft Intermediate Language (MSIL) panels update in real-time when you change the source code.



  • I got the grammar for this particular subset of C from this paper, which looks like a university course assignment.
  • Tim Robinson's blog series on writing a Lisp compiler in F# was very useful. Although the source languages are different, I was still able to use many of his ideas for my implementation.


Mini-C is released under the MIT License.