diff options
| author | 2024-08-24 04:18:28 +0800 | |
|---|---|---|
| committer | 2024-08-24 04:18:28 +0800 | |
| commit | e897791330f0b36d61cd85ab5a1015d6194a35de (patch) | |
| tree | 8faa8ea7f4c9bcadbccc5af9e6f19ab0b2b1621c /grammar.bnf | |
| parent | Added fancier tuple argument specs. (diff) | |
| download | orang-e897791330f0b36d61cd85ab5a1015d6194a35de.tar.gz orang-e897791330f0b36d61cd85ab5a1015d6194a35de.tar.xz orang-e897791330f0b36d61cd85ab5a1015d6194a35de.zip | |
Added array access.
Diffstat (limited to 'grammar.bnf')
| -rw-r--r-- | grammar.bnf | 4 |
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)* ','? ')'; | |||
| 10 | expression ::= binary-expression | unary-expression; | 10 | expression ::= binary-expression | unary-expression; |
| 11 | unary-expression ::= unop+ simple-expression; | 11 | unary-expression ::= unop+ simple-expression; |
| 12 | binary-expression ::= call-expression (binop call-expression)*; | 12 | binary-expression ::= call-expression (binop call-expression)*; |
| 13 | call-expression ::= simple-expression+; | 13 | call-expression ::= member-access-expression+; |
| 14 | binop ::= '*' | '/' | '+' | '-' | '?=' | '/=' | '>' | '>=' | '<' | '<='; | 14 | binop ::= '*' | '/' | '+' | '-' | '?=' | '/=' | '>' | '>=' | '<' | '<='; |
| 15 | unop ::= '+' | '-' | '!'; | 15 | unop ::= '+' | '-' | '!'; |
| 16 | member-access-expression ::= simple-expression (member-access)*; | ||
| 17 | member-access ::= '.[' expression ']'; | ||
| 16 | simple-expression ::= '(' expression ')' | 18 | simple-expression ::= '(' expression ')' |
| 17 | | 'true' | 'false' | 19 | | 'true' | 'false' |
| 18 | | INTEGER | 20 | | INTEGER |