Skip to content

timcsy/lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lambda Calculus Interpreter

Reference:

BNF used for Normal Lambda Calculus in this project

<expr> ::= <abs>
         | <app>
<item> ::= ( <expr> )
         | <var>
<var> ::= (^[\^\.\(\)\s])+
<abs> ::= ^ <var> . <expr>
<app> ::= <item>
        | <app> (<abs> | <item>)

BNF used for De Bruijn indexed Lambda Calculus in this project

<expr> ::= <abs>
         | <app>
<item> ::= ( <expr> )
         | <var>
<var> ::= [0-9]+
<abs> ::= ^ <expr>
<app> ::= <item>
        | <app> (<abs> | <item>)

BNF used for Binary Lambda Calculus in this project

<expr> ::= 00 <expr>
         | 01 <expr> <expr>
         | 1+0

Ussage

Note

l lambda calculus
i De Bruijn indexed lambda calculus
bt Binary Lambda Calculus in text format
b Binary Lambda Calculus in binary format

From (l, i, bt, b) convert to (l, i, bt, b)

bin/lc [--i=type] [input file [...]] [--o=type] [output file [...]]

with std input

bin/lc [--i=x] [input file [...]] [--o=y] [output file [...]] <<EOF
> type
> whatever you want
> to type
> EOF

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published