Skip to content

Files

Latest commit

b9839ad · Dec 29, 2024

History

History
20 lines (13 loc) · 668 Bytes

README.md

File metadata and controls

20 lines (13 loc) · 668 Bytes

PyLox/Olox

All code is based on the book "Crafting Interpreters" by Robert Nystrom.

I originally set out to do this entirely in Odin. However, I decided to implement the Tree-walk interpreter in Python instead. The Python interpreter code is in the tree_walk directory. Much of the object oriented design for the tree-walk interpreter was not a great fit for Odin which was why I decided for a simple Python implementation.

That said, I will be porting the second half of the book to Odin for the bytecode interpreter.

Running Tree-walk Interpreter

Lox File

python3 tree_walk/lox.py <file.lox>

REPL

python3 tree_walk/lox.py