Skip to content

QYUbit/lamb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lamb

Lamb is a labda-calculus interpreter written in go.

Usage

Build lamb from source (you need to clone this repo)

go build -o bin/lamb.exe ./cmd/lamb

Run (and print results to stdout)

./bin/lamb.exe path/to/input

Run (and write results into an output file)

./bin/lamb.exe path/to/input path/to/output

Note: you can use a slash "/" instead of writing the greek "λ" letter.

Repo Guide

Project Structure:

  • internal/ast Defines the Abstract Syntax Tree (AST)
  • internal/interpreter Handles the evaluation of AST nodes
  • internal/lexer Scans and tokenizes the input string
  • internal/parser Constructs an AST by reading the tokens
  • internal/token Contains the definitions for the tokens

Roadmap & Limitations

  • 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

License

MIT

About

Simple lambda calculus interpreter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages