The following project was completed in partial fulfilment of the undergraduate course at BITS Pilani: Compiler Construction (CS F363). We build a compiler for a custom language, ERPLAG (similar to C), whose specifications are outlined here. The compiler has been implemented in C with the following components
- Lexer
- Parser
- Abstract Syntax Tree
- Symmbol Table
- Type checker and Semanntic Analysis
- Code Generation for NASM
- Run
make
from within the Stage2 directory, this will generate executables for the aforementioned stages - nasm -f elf32 code.asm -o code.o
- gcc -m32 code.o -o code.out
- ./code.out
For a detailed understanding of the components refer to our documentation here
You should have the following dependencies installed:
- NASM >= 2.0.1.
- gcc >= 5.0.0