yvshri / tiny-c-compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tiny C Compiler

This implementation aims to build a compiler for the language 'Tiny'. It is a subset of the C programming language. The project is an assignment for the course 'Compilers' at Vrije Universiteit Brussel, given by Professor Dirk Vermeir.

More details about the language spec can be found here: --> http://tinf2.vub.ac.be/~dvermeir/courses/compilers/tiny.html

Tools

The tools used are JFlex and CUP. These are alternatives to Flex and Bison which use Java instead of C.

Compiling

There is a makefile present that will create the lexer and the parser. Otherwise an IDE is recommended (I used IntelliJ).

Executing

The code can be built into a jar file using an IDE. Otherwise, the program expects 2 parameters. First of all an input file (.c) and an output file.

Important notice

This project has an extremely high WTF/minute value. No seriously. So it is far from what I want it to be. Nor am I very proud of the code quality.

About


Languages

Language:Java 97.9%Language:Lex 1.3%Language:C 0.5%Language:Makefile 0.3%Language:Shell 0.0%