Silvertrousers / C_Compiler_Coursework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C_Compiler_Coursework

This project was done as coursework for a 2nd year Language Processing Module. The aim was to build an ANSI C to python converter the coude for which is located in the translator folder and then to build a an ANSI C to MIPS 1 compiler the code for which is located in the compiler folder.

Contributors

Cyrus Goodarzi Github: Silvertrousers

Garham Amos Kwon Github: Drakvor

Build and use Instructions

The program is built using the command:

make bin/c_compiler

The translator function is invoked using the flag --translate, with the source file and output file specified on the command line:

bin/c_compiler --translate [source-file.c] -o [dest-file.py]

The compilation function is invoked using the flag -S, with the source file and output file specified on the command line:

bin/c_compiler -S [source-file.c] -o [dest-file.s]

Command-line arguments should always be in the above order, and there should be no spaces in source or destination paths.

Coursework Specifications

The specifications provided by the lecturer in charge of this coursework are provided as follows: -General -C to Python Translator -Problem scope and templates for C to python translation -C to MIPS 1 compiler

These can alose be located in the READMES folder.

About


Languages

Language:C++ 73.7%Language:Yacc 14.9%Language:C 4.8%Language:Assembly 3.6%Language:Shell 1.7%Language:Lex 1.0%Language:Makefile 0.3%Language:Java 0.0%Language:Python 0.0%