summaryrefslogtreecommitdiff
path: root/grammar.bnf
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2024-08-24 04:18:28 +0800
committerGravatar Uko Kokņevičs2024-08-24 04:18:28 +0800
commite897791330f0b36d61cd85ab5a1015d6194a35de (patch)
tree8faa8ea7f4c9bcadbccc5af9e6f19ab0b2b1621c /grammar.bnf
parentAdded fancier tuple argument specs. (diff)
downloadorang-e897791330f0b36d61cd85ab5a1015d6194a35de.tar.gz
orang-e897791330f0b36d61cd85ab5a1015d6194a35de.tar.xz
orang-e897791330f0b36d61cd85ab5a1015d6194a35de.zip
Added array access.
Diffstat (limited to 'grammar.bnf')
-rw-r--r--grammar.bnf4
1 files changed, 3 insertions, 1 deletions
diff --git a/grammar.bnf b/grammar.bnf
index 30b48f6..3dcb1c6 100644
--- a/grammar.bnf
+++ b/grammar.bnf
@@ -10,9 +10,11 @@ arg-spec-tuple ::= '(' ')' | '(' arg-spec ',' arg-spec (',' arg-spec)* ','? ')';
10expression ::= binary-expression | unary-expression; 10expression ::= binary-expression | unary-expression;
11unary-expression ::= unop+ simple-expression; 11unary-expression ::= unop+ simple-expression;
12binary-expression ::= call-expression (binop call-expression)*; 12binary-expression ::= call-expression (binop call-expression)*;
13call-expression ::= simple-expression+; 13call-expression ::= member-access-expression+;
14binop ::= '*' | '/' | '+' | '-' | '?=' | '/=' | '>' | '>=' | '<' | '<='; 14binop ::= '*' | '/' | '+' | '-' | '?=' | '/=' | '>' | '>=' | '<' | '<=';
15unop ::= '+' | '-' | '!'; 15unop ::= '+' | '-' | '!';
16member-access-expression ::= simple-expression (member-access)*;
17member-access ::= '.[' expression ']';
16simple-expression ::= '(' expression ')' 18simple-expression ::= '(' expression ')'
17 | 'true' | 'false' 19 | 'true' | 'false'
18 | INTEGER 20 | INTEGER