wgi is a minimal (and somewhat rough) prototype implementation of WG as a command-line interpreter.
- Go 1.20 or later.
- ANTLR v4 runtime library for Go (on
$GOPATH). - Output directory of
go installon$PATH.
To generate parsers and install:
make generate-parser
make installOr to use the pre-generated parser:
make install-pregen-parser wgi [options] path/to/file.wg-v: Print verbose output.-eval=N: Type check and attempt to evaluate WG program for N (≥ 0) steps, or -1 to evaluate to value.-compile: Compile to LWG, type check and print LWG to stdout.-eval-lwg=N: Compile to LWG, type check and attempt to evaluate for N (≥ 0) steps, or -1 to evaluate to value.-lolli=-1: Type check, then attempt to run WG program and LWG compilation to termination and check their final values correspond.
wgi -v -eval=10 examples/wg/hello/hello.wgRun all tests:
make testRemove generated files and binaries:
make clean