From: Mart Lubbers Date: Thu, 17 May 2018 13:48:16 +0000 (+0200) Subject: Add grammar X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=b001661a8a1430e0c3e2af2bf0a4cda35f90648b;p=lambda.git Add grammar --- diff --git a/grammar.txt b/grammar.txt new file mode 100644 index 0000000..fd36183 --- /dev/null +++ b/grammar.txt @@ -0,0 +1,10 @@ +program := declaration* term +declaration := func '=' term ';' +term := appterm term + | appterm +appterm := func + | ident + | '\' ident+ '.' term + | '(' term ')' +func := 'A' | 'B' | ... | 'Z' +ident := 'a' | 'b' | ... | 'z'