A modern compiler written in python for the Squirrel language created by us. Check Language Manual for more information.
- Supports three levels of optimization such as elimination of redundant LOAD/STORE operations, repeated and unused labels, redundant goto statements and also performs dead-code elimination.
- Supports multi-dimensional arrays and recursion.
- Supports boolean expressions occurring on the RHS of an equation.
- Supports method overriding.
- Supports implicit and explicit type casting.
- Provides support for compiling multiple .sq files in a single command with configurable level of optimization.
- Provides an in-built library called math.acorn.
- Provides detailed semantic error messages.
The project is organized into various folders:
main.py is the starting point for the compilation.
Test cases, Language Manual, Standard Library
The remaining folders correspond to each of the phases of the compilation: Lexical Analysis, Syntax and Semantic Analysis
- Clone the repository in
$ROOT
- Open a terminal in the
$ROOT
directory - Create a Python virtual environment using
$ python -m venv env
- Activate the environment using
- On Windows:
$ source env/Scripts/activate
- On Mac/Linux:
$ source env/bin/activate
- Install the requirements using
$ pip install -r requirements.txt
- Install the local packages using
$ pip install -e .
- Install SPIM for your operating system to run the output produced
- Debeshee
- Aashrith
- Kranthi
- Shreetesh