Skip to content
/ LoxPy Public

craftinginterpreters's jlox implementation on python

License

Notifications You must be signed in to change notification settings

HETHAT/LoxPy

Repository files navigation

LoxPy

An implementation of jlox from part II of Crafting Interpreters, written in python.

Requiremnts

  • Python3.10 or higher

Usage

After cloning the repository and navigating to the working directory:

git clone https://github.com/HETHAT/LoxPy
cd LoxPy

You can run the interpreter in prompt mode with:

python3 ./src/lox.py

To run a specific file, use:

python3 ./src/lox.py example.lox

Replace "example.lox" with the path to your Lox file.

Example

$ python3 ./src/lox
> var name = "Med";
> "Hello, " + name
Hello, Med
> -(1 + 2) * (6 / 3)
-6

More examples available here.

About

craftinginterpreters's jlox implementation on python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages