This repository stores the implementation of the compiler for the roku programming language.
A compiler for a simple "domestic" programming language inspired by Avatar: The Last Airbender.
- An official compiler.
- A compiler for a day-to-day use programming language.
The current status of this project is DONE. This includes:
- Lexical analyser
- Syntax analyser
- Semantic analyser
- Middle code tuples
This repository stores v1.0 of the roku compiler.
This compiler was implemented using Python 3 (3.7.0) and it is designed for it. You will need to have this installed prior to usage, along with the click library. To install this, use the following command:
pip install click
To compile using the roku compiler, use the following command:
python roku.py [OPTIONS] SOURCE_FILE
Options can be used to track each of the steps of the compiling process. For example, use:
python roku.py --ast ../tests/test_source.fang
This will compile the input source file and print the corresponding generated abstract syntax tree.
Terminals | Actual meaning |
---|---|
zhuli | data type for integers |
appa | data type for floating (get it?) point value |
koi | data type for boolean values |
tui, la | true, false (yin and yang, push and pull) |
scroll | data type for strings of characters |
wan | data type for individual characters |
sokka | null value |
bend | for function declarations |
agni, kai | if, else |
avatar | for loop (cycle) |
raava | while loop (bigger cycle) |
cabbage | loop breaking |
yipyip | return |
energy | reserved word for the main block |
Developed by The Boomeraangs. Copyright © 2018, Alfa Venegas, Daniel Ortega and Erick Durán. CETYS Universidad.
Released under the GNU GENERAL PUBLIC LICENSE.