The project consists of several crates:
lex
houses the lexer and lexing constructs, such asStringLiteral
,NumberLiteral
andIdent
syn
contains the parser and language constructs definition as rust structserror
a hierarchy of error types common in different lua runtimesast_vm
a runtime that executes AST coming directly from the parser (syn
)reggie
a register based VM and an optimizing compilernon_empty
a Vec that cannot be emptytest_util
just a few helper structs/functions for testingtests
integration tests and benchmarks
cargo run --bin reggie
to launch REPL of register based VM (relevant version)cargo run --bin reggie <filename>
to execute file in register based VMcargo run --bin reggiec
will compile lua module from stdin and display internal bytecode and metadatacargo run --bin ast_vm
to launch REPL of AST interpretorcargo run --bin ast_vm <filename
to execute file in AST interpretor