add strictness
[lambda.git] / grammar.txt
index fd36183..1fab941 100644 (file)
@@ -1,10 +1,12 @@
-program     := declaration* term
-declaration := func '=' term ';'
+program     := term ';' program
+             | declaration ';' program
+declaration := func strictident+ '=' term ';'
 term        := appterm term
              | appterm
 appterm     := func
              | ident
-             | '\' ident+ '.' term
+             | '\' strictident+ '.' term
              | '(' term ')'
+strictident := '!'? ident
 func        := 'A' | 'B' | ... | 'Z'
 ident       := 'a' | 'b' | ... | 'z'