summaryrefslogtreecommitdiff
path: root/grammar.bnf
diff options
context:
space:
mode:
Diffstat (limited to 'grammar.bnf')
-rw-r--r--grammar.bnf5
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
3program ::= (statement ';'?)*; 3program ::= (statement ';'?)*;
4statement ::= definition | expression; 4statement ::= definition | expression;
5definition ::= 'def' def-spec '=' expression; 5definition ::= 'def' def-spec '=' expression
6 | 'def' '_' '=' expression;
6def-spec ::= IDENTIFIER arg-spec*; 7def-spec ::= IDENTIFIER arg-spec*;
7arg-spec ::= IDENTIFIER | '(' ')'; 8arg-spec ::= IDENTIFIER | '(' ')' | '_';
8expression ::= binary-expression | unary-expression; 9expression ::= binary-expression | unary-expression;
9unary-expression ::= unop+ simple-expression; 10unary-expression ::= unop+ simple-expression;
10binary-expression ::= call-expression (binop call-expression)*; 11binary-expression ::= call-expression (binop call-expression)*;