WACC Compiler

Imperial College London

Posted by Solan Manivannan on September 28, 2016

The stages of a compiler.

Developed a compiler for the WACC language. Contributed to both the frontĀ­end (syntactic and semantic analysis) and backĀ­end (code generation, optimisations and extension).

This was a project started from complete scratch, with no starter code provided. It was up to us to decide on the languages and technologies used, though with the recommendation of ANTLR (Another Tool For Language Recognition) for the lexer. Looking back, I think this was a very successful project in terms of the amount of knowledge we gained of compilers and programming design. We were rewarded with really high grades throughout the project, which was a testament to our efforts and progress. I would like to go into more depth, but I feel that the final report talks about this in great detail.

For this project I managed to write a script using Python that would act as our test suite for both the front-end and back-end tasks. This was a great sign at the time showing how much progress I had gained as a programmer over the past year. I had never written anything in Python before, let alone a test suite script for a project, and so this was a great feeling. Just something noteworthy to include on this page.

Click here to view GitHub page, which includes a reference to the final report.