Skip to content
/ Lox Public

C++ implementation of the Lox interpreter in Crafting Interpreters.

Notifications You must be signed in to change notification settings

lllllv/Lox

Repository files navigation

A Tree-walk Lox Interpreter

C++ implementation of the Lox interpreter in Crafting Interpreters. The original implementation in the book is in Java.

Build and Usages

To build the project, CMake 3.8 or higher is required.

mkdir build && cd build
cmake .. && make

Execute a Lox source file:

./LoxInterpreter <filename>

Start a REPL:

./LoxInterpreter

The Lox Programming Language

Lox is a dynamically typed, lexical scoping language supports automatic memory management. It also supports classes and inheritance. More details about Lox can be found in this page.

About The Book

Crafting Interpreters contains everything you need to implement a full-featured, efficient scripting language. You’ll learn both high-level concepts around parsing and semantics and gritty details like bytecode representation and garbage collection. Your brain will light up with new ideas, and your hands will get dirty and calloused. It’s a blast.

About

C++ implementation of the Lox interpreter in Crafting Interpreters.

Topics

Resources

Stars

Watchers

Forks

Languages