diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2025-01-22 00:25:22 +0100 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2025-01-22 00:25:22 +0100 |
commit | a04777a20e60857f880775c3c6ed23c6d1e72eca (patch) | |
tree | d5302638c8569a4d0905ef1fd4ef1b4e39e6a2de /grammar.ebnf | |
parent | Feature: Add support for while statements (diff) | |
download | interpreter-a04777a20e60857f880775c3c6ed23c6d1e72eca.tar.gz interpreter-a04777a20e60857f880775c3c6ed23c6d1e72eca.tar.bz2 interpreter-a04777a20e60857f880775c3c6ed23c6d1e72eca.zip |
Feature: Add support for division and multiplication
Diffstat (limited to 'grammar.ebnf')
-rw-r--r-- | grammar.ebnf | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/grammar.ebnf b/grammar.ebnf index 890ba2d..700147e 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -18,7 +18,9 @@ Expression ::= EqualityExpression | AdditiveExpression | FunctionDefinition EqualityExpression ::= AdditiveExpression "==" AdditiveExpression -AdditiveExpression ::= UnaryExpression (("+" | "-") UnaryExpression)* +AdditiveExpression ::= MultiplicativeExpression (("+" | "-") MultiplicativeExpression)* + +MultiplicativeExpression ::= UnaryExpression (("*" | "/") UnaryExpression)* UnaryExpression ::= "!" UnaryExpression | PrimaryExpression |