Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.
/ lox-c Public archive

A compiler and bytecode vm for the programming language lox in C99.

Notifications You must be signed in to change notification settings

gaultier/lox-c

Repository files navigation

lox-c

A compiler and bytecode vm for the programming language lox.

Quickstart

Prerequisites:

  • A C99 compiler
  • POSIX Make
$ make lox-release
$ ./lox-release run test/hello_world.lox
$ printf "(12 + 2) * 3" | ./lox-release run -
$ ./lox-release dump test/hello_world.lox

Development

Recommended setup

Additional prerequisites:

  • GNU parallel (optional, only to run the tests)
# With Address Sanitizer:
$ make lox-debug
# Or without:
$ make lox-debug SANITIZER=""
$ ./lox-debug
# Test
$ ./test.sh

Docker

make docker

Major differences with the official implementation

  • Strings are not interned

License

MIT