summaryrefslogtreecommitdiff
path: root/chapter07/docs/07-grammar.md
diff options
context:
space:
mode:
Diffstat (limited to 'chapter07/docs/07-grammar.md')
-rw-r--r--chapter07/docs/07-grammar.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/chapter07/docs/07-grammar.md b/chapter07/docs/07-grammar.md
index 50a2a129..29a730b6 100644
--- a/chapter07/docs/07-grammar.md
+++ b/chapter07/docs/07-grammar.md
@@ -10,7 +10,7 @@ program
statement
: returnStatement
| declStatement
- | blockStatment
+ | blockStatment
| expressionStatement
| ifStatement
| whileStatement
@@ -48,15 +48,15 @@ returnStatement
expression
: comparisonExpression
;
-
+
comparisonExpression
: additiveExpression (('==' | '!='| '>'| '<'| '>='| '<=') additiveExpression)*
;
-
+
additiveExpression
- : multiplicativeExpression (('+' | '-') multiplicativeExpression)*
+ : multiplicativeExpression (('+' | '-') multiplicativeExpression)*
;
-
+
multiplicativeExpression
: unaryExpression (('*' | '/') unaryExpression)*
;
@@ -78,11 +78,11 @@ INTEGER_LITERAL
: [1-9][0-9]*
| [0]
;
-
+
IDENTIFIER
: NON_DIGIT (NON_DIGIT | DIGIT)*
;
-
+
NON_DIGIT: [a-zA-Z_];
DEC_DIGIT: [0-9];
-``` \ No newline at end of file
+```