Add grammar of language to repo

Preliminary, work in progress
This commit is contained in:
greg 2015-07-21 03:32:16 -07:00
parent 9f4330889a
commit 1e9cd551a6

21
Grammar Normal file
View File

@ -0,0 +1,21 @@
<program> := <statements> EOF
<statements> := <statement>
| <statement> SEP <statements>
<statement> := let <id> = <expr>
| <expr>
<expr> := if <expr> then <statements> end
| if <expr> then <statements> else <statements> end
| while <expr> SEP <statements> end
| <binexpr>
| <number>
| <id>
<binexpr> :=