23 lines
429 B
BNF
23 lines
429 B
BNF
PROG ::= (INSTR (EOI+ INSTR)*)?
|
|
|
|
INSTR ::= EXPR
|
|
| assert EXPR
|
|
| assert_static_fail EXPR
|
|
|
|
EXPR ::= IMP
|
|
|
|
IMP ::= OR (imp OR)?
|
|
OR ::= AND (or AND)*
|
|
AND ::= EQ (and EQ)*
|
|
|
|
EQ ::= CMP ((eq | ne) CMP)?
|
|
CMP ::= TERM ((lt | le | gt | ge) TERM)?
|
|
|
|
TERM ::= FACTOR ((add | sub) FACTOR)*
|
|
FACTOR ::= UNOP ((mul | div | mod) UNOP)*
|
|
|
|
UNOP ::= (add | sub | not)? POW
|
|
POW ::= GROUP (pow GROUP)?
|
|
GROUP ::= BASE | opar EXPR cpar
|
|
BASE ::= int | bool
|