Name Mode Size
c2p 040000
.gitignore 100644 0 kb
Makefile 100644 1 kb
README.txt 100644 1 kb
build 100755 0 kb
c2p.py 100644 0 kb
report.pdf 100644 77 kb
report.tex 100644 2 kb
runtests.py 100644 0 kb
test 100755 0 kb
README.txt
A C to P-code compiler project by Christophe Verdonck and Stein de Groof INSTALLING /RUNNING A makefile is provided for building and testing the project. In absence of the make utility the equivalent commands are given below: make parser Generates the parser classes using antlr java -jar c2p/src/parser/antlr-4.6-complete.jar -Dlanguage=Python3 c2p/src/parser/C.g4 -visitor make test runs the automatic test script verifying mostly semantic checks python3 runtests.py -v make all run both above commands make clean removes generated files The c2p.py script will take a C-file and compile it into a P-file on the condition the parser classes have been built using the above command. syntax: python3 c2p.py cfile.c pfile.p TESTING Test files are located in c2p/tests/testfiles organised in subdirectories by feature and given descriptive names. All the tests are run automatically by the test script, except for the one under 'codegen', as the results of those can not easily be verified automatically. SOURCE The source for the compiler can be found under c2p/src.