2024-03-18 17:20:40 +00:00
|
|
|
MODULE ::= EXPR*
|
|
|
|
EXPR ::=
|
2024-03-19 07:56:41 +00:00
|
|
|
| IN
|
2024-03-18 17:20:40 +00:00
|
|
|
| ASSERT
|
|
|
|
ASSERT ::= (assert_eq|assert_ne) tuple
|
2024-03-19 07:56:41 +00:00
|
|
|
IN ::= OR (in OR)?
|
2024-03-19 06:11:28 +00:00
|
|
|
OR ::= AND (or AND)*
|
|
|
|
AND ::= TERM (and TERM)*
|
2024-03-18 17:20:40 +00:00
|
|
|
TERM ::= FACTOR ((add|sub) FACTOR)*
|
|
|
|
FACTOR ::= USUB ((mul|div|mod) USUB)*
|
2024-03-19 06:11:28 +00:00
|
|
|
USUB ::= sub* NOT
|
|
|
|
NOT ::= not* POW
|
2024-03-18 17:20:40 +00:00
|
|
|
POW ::= LITERAL (pow LITERAL)?
|
|
|
|
LITERAL ::=
|
|
|
|
| BUILTIN
|
|
|
|
| TUPLE
|
2024-03-19 07:56:41 +00:00
|
|
|
| INDEX
|
2024-03-18 17:20:40 +00:00
|
|
|
| opar EXPR cpar
|
2024-03-19 07:56:41 +00:00
|
|
|
INDEX ::=
|
2024-03-19 13:23:11 +00:00
|
|
|
| (TUPLE|str) osquare (EXPR (comma EXPR)*)? csquare
|
2024-03-18 17:20:40 +00:00
|
|
|
TUPLE ::=
|
|
|
|
| opar EXPR+ cpar
|
2024-03-19 13:23:11 +00:00
|
|
|
BUILTIN ::= num | bool | str
|