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