Skip to content

miksaraj/iqalox.poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iqalox (Proof of Concept)

This is a tree-walk interpretation implementation of Iqalox language in Python. It is a proof of concept preceding the proper bytecode compiler implementation.

"Iqalox" is a play on the Kalaallisut word for Arctic char, Eqaluk, and Lox from Bob Nystrom's Crafting Interpreters. The language presented here is based on Nystrom's Lox but mutated and extended to suit the author's preferences and interests.

You will find the syntax grammar in langspec. The lexical grammar and precedence rules are presented below.

Please note: Iqalox is in planning phase, so no implementation has been written as of yet.

Lexical Grammar

NUMBER          → DIGIT+ ( "." DIGIT+ )? ;
STRING          → '"' <any char except '"'>* '"' | "'" <any char except "'">* "'" ;
IDENTIFIER      → ALPHA ( ALPHA | DIGIT )* ;
ALPHA           → 'a' ... 'z' | 'A' ... 'Z' | '_' ;
DIGIT           → '0' ... '9' ;

Precedence Rules

Name Operators Associates
Unary ! - Right
Increment ++ -- Right
Multiplication / * % Left
Addition - + Left
Comparison > >= < <= Left
Equality == != Left
Ternary ? : Right
Comma , Left

About

A tree-walk interpretation implementation of Iqalox language in Python as a proof-of-concept

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages