python implementation of the Lox programming language
Clone the repository
$ git clone https://github.com/SujayKarpur/plox.git
$ cd ploxSet up and activate a python virtual environment
$ python3 -m venv venv
$ source venv/bin/activateExecute the build script
$ ./build/build.shRun plox in the desired mode
$ plox [script] [--debug] [--optimize] [--time]Lox (from the book Crafting Interpreters) is a dynamically typed, high level scripting language designed to be easy to understand and implement.
This project is a treewalk interpreter for my version of Lox, with a handcrafted lexer and recursive descent parser.
Crafting Interpreters
Compilers Principles, Techniques, and Tools
PLY documentation
- Improve runtime error handling (print line containing error and show column)
- Finish README
- Make list indices lvalues, ie support statements like
variable[i] = value; - Improve documentation and readability
- Add functional programming constructs like decorators, generators, and pattern matching
- Implement a way to import and reuse code across different plox scripts & add a standard library
