What does the project do?
An end-to-end compiler for a subset of C, called mini-C. This involved two major stages:
- Parsing the code to form an Abstract Syntax Tree.
- Generating machine code from this AST that can be executed.
This was a huge amount of work, as the language involved quite a lot of features and we had to build the whole lot.
How is it made?
The project uses LLVM for code generation, which requires a thorough knowledge of all the statements and blocks to fit them together into code. The AST generation required a good understanding of C++, a language I had not used before.
What have I learnt?
- C++ (well, far from proficiency, but a decent start).
- LLVM and code generation.
- Time management.