Lamb is a labda-calculus interpreter written in go.
Build lamb from source (you need to clone this repo)
go build -o bin/lamb.exe ./cmd/lambRun (and print results to stdout)
./bin/lamb.exe path/to/inputRun (and write results into an output file)
./bin/lamb.exe path/to/input path/to/outputNote: you can use a slash "/" instead of writing the greek "λ" letter.
Project Structure:
internal/astDefines the Abstract Syntax Tree (AST)internal/interpreterHandles the evaluation of AST nodesinternal/lexerScans and tokenizes the input stringinternal/parserConstructs an AST by reading the tokensinternal/tokenContains the definitions for the tokens
- At the moment evaluations are based only on beta-reduction (no alpha and theta evaluations yet)
- The interpreter won't terminate for non-terminating lambda expression (will run forever)
- There is no way to visualize evaluations
MIT