regymm / CminusC

CminusC the simplified C compiler -- refined from the USTC compiler course.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler Cminus

It was programming homework for the principles and techniques of compilers course in USTC: the main task is to write a compiler for simplified C language, cminus.

I cleaned up the source code so the structure is now better for further development.

Compile

mkdir build
cd build
cmake ..
make

Run

./cminusc ../testcase/gcd.cminus
../testcase/gcd
(input 45 150)
(output 15)

For the original project, see CompilersHomework (Which is now private. Email me if you need).

I do not own all these code: some are by my teammates and the teaching assistants.

About

CminusC the simplified C compiler -- refined from the USTC compiler course.


Languages

Language:C++ 63.5%Language:Yacc 17.9%Language:C 9.0%Language:Lex 7.1%Language:CMake 2.5%