amrtgaber / cs453-compiler

C-- compiler for cs453

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cs453-compiler

This was my project when I took the cs-453 compiler class at University of Arizona in 2010 from professor Saumya Debray.

C--

The langauge compiled is called C-- because it is a subset of C (like how C++ is a superset of C). The scanner and parser are a combination of lex and yacc and the compiled code is mips assembly. It can handle reading in and printing out integers & strings as well as conditionals, loops, function calls and even recursion. That means, interestingly enough, that the langauge is turing complete and it's possible to write a basic turing machine in it (trust me I did!).

About

C-- compiler for cs453


Languages

Language:Yacc 68.4%Language:C 23.9%Language:Assembly 3.2%Language:Lex 1.8%Language:C++ 1.7%Language:Makefile 0.7%Language:Shell 0.2%