-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Dennis Kuhnert edited this page Feb 6, 2017
·
1 revision
<prog> ::= \dots `:\\n' <stat-list>
<stat-list> ::= <statement> <stat-list> | <return>
<statement> ::= <ide> `=' <expr> `\\n' 1
<return> ::= `return' <expr> `\\n' 2
<expr> ::= `if' <expr> <comparator> <expr> `then' <expr> `else' <expr> `fi' 3
| <expr> `+' <term> 4
| <expr> `-' <term> 5
| <term> 6
<term> ::= <factor> `*' <term> 7
| <factor> `/' <term> 8
| <factor> 9
<factor> ::= <expr> `**' <num> 10
| `(' <expr> `)' 11
| <ide> 12
| <num> 13
<comparator> ::= `<' | `<=' | `==' | `>=' | `>'
<num> ::= `d' <num> | `d' 14
<ide> ::= `l' <trail> | `l' 15
<trail> ::= `d' <trail> | `l' <trail> | `d' 16 | `l' 17