summaryrefslogtreecommitdiff
path: root/chapter05/docs/05-grammar.md
diff options
context:
space:
mode:
Diffstat (limited to 'chapter05/docs/05-grammar.md')
-rw-r--r--chapter05/docs/05-grammar.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/chapter05/docs/05-grammar.md b/chapter05/docs/05-grammar.md
index 9af39c05..65be4bf7 100644
--- a/chapter05/docs/05-grammar.md
+++ b/chapter05/docs/05-grammar.md
@@ -10,7 +10,7 @@ program
statement
: returnStatement
| declStatement
- | blockStatment
+ | blockStatment
| expressionStatement
| ifStatement
| metaStatement
@@ -43,15 +43,15 @@ returnStatement
expression
: comparisonExpression
;
-
+
comparisonExpression
: additiveExpression (('==' | '!='| '>'| '<'| '>='| '<=') additiveExpression)*
;
-
+
additiveExpression
- : multiplicativeExpression (('+' | '-') multiplicativeExpression)*
+ : multiplicativeExpression (('+' | '-') multiplicativeExpression)*
;
-
+
multiplicativeExpression
: unaryExpression (('*' | '/') unaryExpression)*
;
@@ -73,11 +73,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
+```