Go to file
2025-02-11 10:16:46 +01:00
java document java interpretere 2025-02-11 10:16:46 +01:00
rust add synchronize to rust 2025-02-10 14:45:11 +01:00
.gitignore rust skeleton 2025-02-06 11:34:46 +01:00
README.md add ast generator in java 2025-02-08 10:21:26 +01:00

Crafting Interpreters

Implementing Crafting interpreters for the FHNW PL-Circle.

All dependencies for running the respective implementations are specified in the flake.nix files within the project folders (look for the key buildInputs). Though my recommendation is to use the provided nix flakes.

Java Implementation

Implementation of the tree-walk interpreter in java after the book.

Run mvn package to create an executable jar file in the target directory and mvn exec:java@jlox to get a repl.

Run mvn exec:java@generate-ast to generate the expression class.

Rust implementation

Implementation of the tree-walk interpreter in rust.

Use cargo run -- <ARGS> to run the interpreter directly from the source code. Specify needed arguments in place of <ARGS>.

Usage: rox <COMMAND>

Commands:
  compile  Compile a Lox source file
  repl     Run a Lox REPL
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version