A simple compiler for the language specifications provided in Language Specifications.pdf.
- gcc
- nasm (for compiling the asm file)
- Lexical Analyzer
- Syntax Analyzer (Parser)
- Abstract Syntax Tree Constructor
- Symbol Table Generator
- Type Checker (static type checking)
- Semantic Analyzer
- Code Generator (WIP (Krappa))
All libraries and data structures used in any of the modules can be found in Utils. The header files for each module contains relevant documentation.
All instructions for compiling are defined in the Makefile. Simply run make
.
./compiler <path_to_testcase_file> code.asm
nasm -f elf64 code.asm && gcc -no-pie code.o && ./a.out