All Projects → cwbriones → rlox

cwbriones / rlox

Licence: MIT License
A rust interpreter for the Lox language

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to rlox

rlox
Lox Interpreter/REPL written in Rust
Stars: ✭ 31 (+82.35%)
Mutual labels:  lox-language, lox
slox
Swift implementation of a Lox interpreter
Stars: ✭ 39 (+129.41%)
Mutual labels:  lox-language, lox
kolasu
Kotlin Language Support – AST Library
Stars: ✭ 45 (+164.71%)
Mutual labels:  interpreters
tiny-lang
tiny-lang — A different programming language. Supports a bunch of spoken languages.
Stars: ✭ 26 (+52.94%)
Mutual labels:  interpreters
lua-in-rust
The Lua programming language, implemented in Rust.
Stars: ✭ 76 (+347.06%)
Mutual labels:  interpreters
sai
Staged Abstract Interpreters
Stars: ✭ 58 (+241.18%)
Mutual labels:  interpreters
compiler-course-unipi
Lab of the course Languages, Compilers and Interpreters (Cod. 653AA) @ UNIPI
Stars: ✭ 18 (+5.88%)
Mutual labels:  interpreters
locks-py
Python implementation of locks, which is an imperative, dynamically typed, procedure oriented scripting language based on the lox programming language.
Stars: ✭ 29 (+70.59%)
Mutual labels:  lox
types-and-programming-languages
C++ Implementations of programming languages and type systems studied in "Types and Programming Languages" by Benjamin C. Pierce..
Stars: ✭ 32 (+88.24%)
Mutual labels:  interpreters
Laythe
A gradually typed language originally based on the crafting interpreters series
Stars: ✭ 58 (+241.18%)
Mutual labels:  crafting-interpreters
clox
A virtual machine and a tree-walk interpreter for the Lox programming language in C89 🌀
Stars: ✭ 38 (+123.53%)
Mutual labels:  lox-language
rulox
Implementation in Rust of lox, the language described in Crafting Interpreters
Stars: ✭ 58 (+241.18%)
Mutual labels:  lox
Craftinginterpreters
Repository for the book "Crafting Interpreters"
Stars: ✭ 4,298 (+25182.35%)
Mutual labels:  lox
Jquery.terminal
jQuery Terminal Emulator - JavaScript library for creating web-based terminals with custom commands
Stars: ✭ 2,623 (+15329.41%)
Mutual labels:  interpreters
Learning Sicp
MIT视频公开课《计算机程序的构造和解释》中文化项目及课程学习资料搜集。
Stars: ✭ 9,059 (+53188.24%)
Mutual labels:  interpreters

rlox

Following along with the book Crafting Interpreters, in Rust.

An overview of the language can be found here.

In general, I try to follow the book as close as possible conceptually. That said, this is also an exercise in idiomatic Rust and so things can differ greatly from the Java implementation. Namely sum types and pattern matching see heavy use, with a few macro invocations sprinked in as well.

VM

A version of the clox VM (using the mostly same bytecode) can be found in the vm branch.

It's still a work in progress, seeming more like a straight C to rust port in some places. This will see another pass of optimizations and "rustification" at some later point. The implementation of UpValues in particular is a mess, since Rust's borrow checker is not aware of the lifetime of stack variables.

License

This code is available under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].