Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 1.94 KB

README.md

File metadata and controls

67 lines (52 loc) · 1.94 KB

roku-compiler

This repository stores the implementation of the compiler for the roku programming language.

Getting started

What is it?

A compiler for a simple "domestic" programming language inspired by Avatar: The Last Airbender.

What it isn't?

  • An official compiler.
  • A compiler for a day-to-day use programming language.

Status

The current status of this project is DONE. This includes:

  • Lexical analyser
  • Syntax analyser
  • Semantic analyser
  • Middle code tuples

Version

This repository stores v1.0 of the roku compiler.

Prerequisites

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

Usage

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.

What everything means

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

Authors

Developed by The Boomeraangs. Copyright © 2018, Alfa Venegas, Daniel Ortega and Erick Durán. CETYS Universidad.

License

Released under the GNU GENERAL PUBLIC LICENSE.