This repository has been archived on 2024-03-07. You can view files and clone it, but cannot push or open issues/pull-requests.
xmk/doc/grammar.bnf

22 lines
346 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
ARRAY ::= osquare EXPR* csquare