I wrote this project for Compiler course at Shahid Beheshti University Summer 2021. Java, PGen, ANTLR are the tools that I've leveraged to do this project. list of features is at the end of this document; It shows the current features of the compiler, and the features that need to be done. The syntax is fairly simple. here's a sample:
In Releases section, you can find the latest exe, jar, and probably bash scripts to compile.
- Binary Expression
- Unary Expression
- Comparators
- Bool, Int, Real, Array data types.
- If else conditional statement
- For while loops
- Single class
- Main function
- Id assignment
- Array assignment
- Output int and string
- Input int
- len function array
- pre -- ++
- post -- ++
- break, continue
- len function string
- dynamic strings
- print function for all data types
- input function for all data types
- function in the class no args no return
- function in the class no args with return
- function in the class with args
- multiple class
- class ref assignment
- class function