From e897791330f0b36d61cd85ab5a1015d6194a35de Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sat, 24 Aug 2024 04:18:28 +0800 Subject: Added array access. --- grammar.bnf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'grammar.bnf') 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)* ','? ')'; expression ::= binary-expression | unary-expression; unary-expression ::= unop+ simple-expression; binary-expression ::= call-expression (binop call-expression)*; -call-expression ::= simple-expression+; +call-expression ::= member-access-expression+; binop ::= '*' | '/' | '+' | '-' | '?=' | '/=' | '>' | '>=' | '<' | '<='; unop ::= '+' | '-' | '!'; +member-access-expression ::= simple-expression (member-access)*; +member-access ::= '.[' expression ']'; simple-expression ::= '(' expression ')' | 'true' | 'false' | INTEGER -- cgit v1.2.3