Skip to content
/ lory Public

A tree walk interpreter for Lox

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

amal064/lory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lory

Lory is a work-in-progress interpreter for the Lox programming language written in rust. This project is inspired by the book Crafting Interpreters by Bob Nystorm, and is being developed while reading the book.

Overview

Lox is a dynamically typed programming language with a C-like syntax. It features standard programming language constructs such as variables, control structures, functions, classes, and closures.

To execute Lox programs, Lory utilizes a tree walk interpreter approach, which involves walking through an abstract syntax tree (AST) to execute the program. While tree walk interpreters are straightforward and easy to implement, they may not be the most efficient interpreter type for larger programs.

Progress

At present, Lory is work-in-progress and is not sufficiently developed to be run as an interpreter.

  • Scanning
  • Parsing
  • Tree Walk Interpreting
  • Variables
  • Control Flow
  • Functions
  • Resolution
  • Classes
  • Inheritance
  • Lists
  • Loops

Testing

The interpreter is tested using the insta crate, which compares the interpreter's output against expected reference values (snapshots). Tests are adapted from the test suite in the Crafting Interpreters repository.

To run all tests, use the following command:

cargo test

License

This code is licensed under either of the following, at your option:

About

A tree walk interpreter for Lox

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages