The REPL (read, eval, print, loop) can be useful both for learning about langur and for development.

Build and run the REPL from /langur/repl/main.go. Within this source file, you can determine what you want the REPL to return by editing the Go constants (which appear something like what are shown below).

const ( PROMPT = ">> " printLexTokens = false printParseTokenRepresentation = true printParseNodes = true printCompiledInstructions = false printCompiledConstants = false printVmResult = true )

minimal execution

Minimal execution may be used to test early stages of development of a feature.

If you do not print the VM result, the VM will not be run.

If you do not print comipiled instructions or constants or the VM result, the compiler will not be executed.

If you do not print parsed token representations or nodes or any of the above, the parser will not be executed.

REPL commands

exit cleanly exits the REPL
list lists built-in functions with descriptions
reset resets the environment for the REPL