diff options
Diffstat (limited to 'grammar.bnf')
| -rw-r--r-- | grammar.bnf | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/grammar.bnf b/grammar.bnf index 9ddaffc..0ac58f9 100644 --- a/grammar.bnf +++ b/grammar.bnf | |||
| @@ -2,9 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | program ::= (statement ';'?)*; | 3 | program ::= (statement ';'?)*; |
| 4 | statement ::= definition | expression; | 4 | statement ::= definition | expression; |
| 5 | definition ::= 'def' def-spec '=' expression; | 5 | definition ::= 'def' def-spec '=' expression |
| 6 | | 'def' '_' '=' expression; | ||
| 6 | def-spec ::= IDENTIFIER arg-spec*; | 7 | def-spec ::= IDENTIFIER arg-spec*; |
| 7 | arg-spec ::= IDENTIFIER | '(' ')'; | 8 | arg-spec ::= IDENTIFIER | '(' ')' | '_'; |
| 8 | expression ::= binary-expression | unary-expression; | 9 | expression ::= binary-expression | unary-expression; |
| 9 | unary-expression ::= unop+ simple-expression; | 10 | unary-expression ::= unop+ simple-expression; |
| 10 | binary-expression ::= call-expression (binop call-expression)*; | 11 | binary-expression ::= call-expression (binop call-expression)*; |