The detail of project can be found in Compiler Design Principles Project
In This Project , Me (Mohammad Mahdi Mohajer) and my Colleague (Mohammad Derakhshan) decided to implement this compiler with generating instructions for MIPS Architecture.
- C/C++
- Flex(Fast Lexical Analyzer Generator)
- GNU Bison/Yacc(Yet another compiler compiler)
- Essential Parts
- Supporting Main Function
- Supporting Other Functions
- Supporting Control Flow Statements e.g. :
(if/else/elseif)
- Supporting Loops
- Supporting Variables Declaration and Assignment
- Supporting Scopes of Functions and Variables
- Supporting Error Handling
- Optional Parts
- For Loop
- Global Variables
-
break
andcontinue
in loops - Arrays , like :
int a[10]