Add grammar of language to repo
Preliminary, work in progress
This commit is contained in:
21
Grammar
Normal file
21
Grammar
Normal 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> :=
|
||||
|
||||
|
||||
Reference in New Issue
Block a user