https://github.com/timcsy/lambda
https://github.com/timcsy/lambda
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/timcsy/lambda
- Owner: timcsy
- Created: 2020-10-06T10:03:25.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-06T10:03:49.000Z (about 5 years ago)
- Last Synced: 2025-06-28T15:47:00.896Z (6 months ago)
- Language: C++
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lambda Calculus Interpreter
Reference:
- https://en.wikipedia.org/wiki/Lambda_calculus_definition#Syntax_definition_in_BNF
- https://ruslanspivak.com/lsbasi-part1/
- https://tromp.github.io/cl/Binary_lambda_calculus.html
- https://cs.stackexchange.com/questions/109954/writing-a-grammar-for-lambda-calculus
- https://stackoverflow.com/questions/22390641/read-file-by-bits-c
## BNF used for Normal Lambda Calculus in this project
```
::=
|
::= ( )
|
::= (^[\^\.\(\)\s])+
::= ^ .
::=
| ( | )
```
## BNF used for De Bruijn indexed Lambda Calculus in this project
```
::=
|
::= ( )
|
::= [0-9]+
::= ^
::=
| ( | )
```
## BNF used for Binary Lambda Calculus in this project
```
::= 00
| 01
| 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 [...]] < type
> whatever you want
> to type
> EOF
```