This repository is an RPython implementation for Lox. Read more at https://craftinginterpreters.com/
This code base is built with RPython and PyPy 2.7. Please download PyPy repository and put it at the root.
wget https://downloads.python.org/pypy/pypy2.7-v7.3.14-src.tar.bz2
tar xf pypy2.7-v7.3.14-src.tar.bz2 && mv pypy2.7-v7.3.14-src pypy
PyPy 2.7 is based on Python 2.7. Please install Python 2.7 instead of Python 3.x.
You can use Makefile
to build rlox-jit
and rlox-interp
.
rlox-jit
supports meta-tracing compialtion and runs faster for loop-heavy programs for example.
make targetlox-jit
rlox-interp
is an interpreter compiled by RPython.
make targetlox-interp
- Chapter 16
- Chapter 17
- Chapter 18
- Chapter 19
- Chapter 20
- Skip this chapter because we can use built-in hash tables
- Chapter 21
- Chapter 22
- Chapter 23
- Chapter 24
- Finished 24.5.1 (2023/12/27)
- Chapter 25
- Chapter 26
- Chapter 27
- Chapter 28
- Chapter 29
- Chapter 30