# What I want to do

I am trying to define a LL(1) grammar of the lambda-calculus.

# What I did

Here is the grammar:

1. $Term \to Abs$
2. $Term \to App$
3. $Abs \to \lambda \ id \ . \ Term$
4. $App \to Var \ AppSeq$
5. $AppSeq \to App$
6. $AppSeq \to \epsilon$
7. $Var \to id$
8. $Var \to (\ Term \ )$

Here are the FIRST sets:

• $FIRST(Term) = \{ \lambda, id, ( \}$
• $FIRST(Abs) = \{ \lambda \}$
• $FIRST(App) = \{ id, ( \}$
• $FIRST(AppSeq) = \{ id, (, \epsilon \}$
• $FIRST(Var) = \{ id, ( \}$

• $FOLLOW(Term) = \{ \$, ) \}$•$FOLLOW(Abs) = \{ \$, ) \}$
• $FOLLOW(App) = \{ \$, ) \}$•$FOLLOW(AppSeq) = \{ \$, ) \}$