Add grammar
authorMart Lubbers <mart@martlubbers.net>
Thu, 17 May 2018 13:48:16 +0000 (15:48 +0200)
committerMart Lubbers <mart@martlubbers.net>
Thu, 17 May 2018 13:48:16 +0000 (15:48 +0200)
grammar.txt [new file with mode: 0644]

diff --git a/grammar.txt b/grammar.txt
new file mode 100644 (file)
index 0000000..fd36183
--- /dev/null
@@ -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'