This repository has been archived on 2024-03-07. You can view files and clone it, but cannot push or open issues/pull-requests.
2023-09-27 18:18:05 +00:00
|
|
|
PROG ::= INSTR*
|
2023-09-27 21:05:04 +00:00
|
|
|
INSTR ::=
|
|
|
|
| DIR
|
|
|
|
| EXPR semicolon
|
|
|
|
|
2023-09-27 18:18:05 +00:00
|
|
|
DIR ::= hash ident EXPR
|
2023-09-27 21:05:04 +00:00
|
|
|
|
|
|
|
EXPR ::=
|
|
|
|
| ADDSUB
|
|
|
|
|
|
|
|
ADDSUB ::= MULDIVMOD ((add|sub) MULDIVMOD)*
|
|
|
|
MULDIVMOD ::= LITERAL ((mul|div|mod) LITERAL)*
|
|
|
|
|
|
|
|
LITERAL ::=
|
|
|
|
| ident
|
|
|
|
| int
|