Saviio / mini-c

F# implementation of a Mini-C compiler targeting MSIL

Home Page:http://timjones.tw/blog/archive/2014/04/13/writing-a-minic-to-msil-compiler-in-fsharp-part-0-introduction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

GUI

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.

Screenshot

Acknowledgements

  • 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.

License

Mini-C is released under the MIT License.

About

F# implementation of a Mini-C compiler targeting MSIL

http://timjones.tw/blog/archive/2014/04/13/writing-a-minic-to-msil-compiler-in-fsharp-part-0-introduction


Languages

Language:F# 71.5%Language:C# 28.4%Language:PowerShell 0.1%