/tiny-compiler

Context free grammar compiler and executor written for learning purposes.

Primary LanguagePythonMIT LicenseMIT

Tiny Compiler

Author

Created by Kirill Rodriguez on 08/2015.

Program

This program is a tiny compiler for c-like syntax language. It uses a simple if-else automata to tokenize the code, Earley parser algorithm to parse into a tree, compiler to translate the tree into virtual machine instructions, which are then executed.

The program poorly supports pydoc and only runs in verbose mode.

Usage

To run the program (runs only in verbose mode), use the following command:

python main.py < source < syntax_clike

References