In this term project, we implement a compiler for the SnuPL/2 language. The compiler accepts SnuPL/2 source code as an input and outputs to Intel assembly code.
SnuPL/2 is an imperative procedural language closely related to the Oberon programming language. While SnuPL/2 does not support all standard features of a programming language such as floating point, user-defined data types, or pointer types, the language is complex enough to illustrate the basic concepts of a compiler.
Refer to the SnuPL/2 language specification.
The project is split into the following phases:
Phase | Topic |
---|---|
1 | Lexical Analysis |
2 | Syntax Analysis |
3 | Semantic Analysis |
4 | [Intermediate Code Generation] |
5 | Code Generation |
6 | Project Report |