This repo is a collection of my implementations of the Lox interpreter from the book Crafting Interpreters, by Bob Nystrom.
I don't know if I will complete any of the implementations, but I want to attempt to implement it in as many languages as possible to be able to compare the languages across each step of the process, and with the hopes that it makes it easier for anyone looking to build their own interpreter to have a point of reference for starting.
Legend | |
---|---|
In Progress | ๐ง |
Complete | โ |
Stuck / Need Help |
Full recoded playlist on YouTube.
Phase / Chapter | Elm (elm-lox) | Haskell (haskell-lox) |
---|---|---|
Scanning | โ https://www.youtube.com/watch?v=dA10oUBGk0A | โ https://www.youtube.com/watch?v=ZVCcKUmwEtI |
Representing Code | ||
Parsing Expressions | ||
Evaluating Expressions | ||
Statements and State | ||
Control Flow | ||
Functions | ||
Resolving and Binding | ||
Classes | ||
Inheritance |
TBD
When implementing the Scanner, use the scanner_*.lox
files in the order:
scanner_minimal.lox
scanner_with_operators.lox
scanner_with_whitespace.lox
scanner_with_comments.lox
scanner_with_strings.lox
scanner_with_numbers.lox
scanner_with_identifiers.lox