Lox language implemented in OCaml.
- Learn about compiler front ends and interpreters.
- Play and learn with OCaml and its ecosystem. Note, this implementation diverge slightly from the book ; OCaml idiomatic code is quite different from Java (used for the original implementation).
- Keep the same learning philosophy as in the book: abstain of using tools like Lex or Yacc and do "everything by hand".
Build with Dune:
$ dune build @install
$ dune exec saumon
Install with Opam:
$ # cd project/root/folder
$ opam install .
Test with:
$ dune runtest
To use saumon in interactive mode, simply run:
$ saumon
To interpret a file, use:
$ saumon <filename>
Travis CI: https://travis-ci.org/ludwigpacifici/saumon
- A Tree-Walk Interpreter: https://github.com/ludwigpacifici/saumon/projects/1
- A Bytecode Virtual Machine: https://github.com/ludwigpacifici/saumon/projects/2
- Designed by Bob Nystrom, A handbook for making programming languages.
- Inspired by Rulox.
See LICENSE.