Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mikestaub/pascal-compiler

A small compiler for a subset of the Pascal programming language.
https://github.com/mikestaub/pascal-compiler

Last synced: about 1 month ago
JSON representation

A small compiler for a subset of the Pascal programming language.

Awesome Lists containing this project

README

        

I have completed the pascal compiler assignment to about 90%. I have Three Address Codes generated for all of the assigned grammar, as well as multidimensional arrays and infinitely nested functions.
I have assembly code generating for everything but arrays and function calls. I have a good understanding how to go about doing it, but I have run out of time.

I have included a file called TESTFILE.p to demonstrate what code I CAN generate thus far.

To build the compiler just run the make command.
To run the compiler: ./compiler FINALTEST.p > output.s <-- need the redirection meta character, as the compiler just calls printf()
gcc output.s
./a.out