|Jamie Quigley 1f6a3540c1||6 days ago|
|clox-pp||12 months ago|
|cpplox||1 year ago|
|hslox||6 days ago|
|rclox||2 months ago|
|.gitignore||2 months ago|
|LICENCE||1 year ago|
|readme.md||2 months ago|
This repo contains multiple (incomplete) implementations of a Lox interpreter. Lox is a language designed by Bob Nystrom for his book Crafting Interpreters.
cpplox is a tree-walk interpreter for Lox, written in C++. This is the only of the four that is
It has very bad performance, due not only to the design, but also to the fact that it uses far too
std::shared_ptr and other inefficient patterns.
clox-pp is a C++ implementation of a bytecode interpreter, like
rclox is an implementation of a code-generating interpreter (somewhat similar to
clox), in Rust
It uses a Rust
enum for the instructions, rather than bytecode. This has the effect that jumps
can have distance
usize (usually 64 bits), rather than 16 bits.
This one is in Haskell. The parser is implemented using Megaparsec, a parser-combinators library.
This is also WIP.
My code here is available under the terms of the GNU GPL, version 3.0.
Much of the code in
clox-pp (and to a lesser extent
rclox) is very similar to
the code from the book, which is available
here under the MIT licence.