An attempt at writing a lambda calculus compiler in C for educational purposes.
$ sudo apt-get install gcc-multilib # for <assert.h>
$ make
While it would be fun to dive immediately into the compilation process for a lambda calculus, I think we need to first examine how a lambda calculus interpreter works to get a feel for the dynamics and semantics of the language.
<var> ::= [a-zA-Z0-9]*
<lambda> ::= (\<var>.<expression>)
<application> ::= (<expression> <expression>)
<expression> ::= <var> | <lambda> | <application>
What's written above is the BNF
for our lambda calculus. Essentially, it's saying that our language is composed
of var
, lambda
, application
, and expression
terms.