program := declaration* term declaration := func '=' term ';' term := appterm term | appterm appterm := func | ident | '\' ident+ '.' term | '(' term ')' func := 'A' | 'B' | ... | 'Z' ident := 'a' | 'b' | ... | 'z'