23 lines
355 B
BNF
23 lines
355 B
BNF
MODULE ::= INSTR*
|
|
INSTR ::=
|
|
| EXPR semicolon
|
|
| ASSIGN semicolon
|
|
| ASSIGN_IF semicolon
|
|
| ASSIGN_ADD semicolon
|
|
ASSIGN ::= ident assign EXPR
|
|
ASSIGN_IF ::= ident assign_if EXPR
|
|
ASSIGN_ADD ::= ident assign_add EXPR
|
|
EXPR ::= LITERAL
|
|
LITERAL ::=
|
|
| BUILTIN
|
|
| ARRAY
|
|
| ident
|
|
BUILTIN ::=
|
|
| bool
|
|
| float
|
|
| int
|
|
| string
|
|
| symbol
|
|
|
|
ARRAY ::= osquare EXPR* csquare
|