summaryrefslogtreecommitdiff
path: root/chapter03/docs/03-grammar.md
diff options
context:
space:
mode:
Diffstat (limited to 'chapter03/docs/03-grammar.md')
-rw-r--r--chapter03/docs/03-grammar.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/chapter03/docs/03-grammar.md b/chapter03/docs/03-grammar.md
index 2a6d4c1b..14a7d5fa 100644
--- a/chapter03/docs/03-grammar.md
+++ b/chapter03/docs/03-grammar.md
@@ -10,7 +10,7 @@ program
statement
: returnStatement
| declStatement
- | blockStatment
+ | blockStatment
| expressionStatement
| metaStatement
;
@@ -38,11 +38,11 @@ returnStatement
expression
: additiveExpression
;
-
+
additiveExpression
- : multiplicativeExpression (('+' | '-') multiplicativeExpression)*
+ : multiplicativeExpression (('+' | '-') multiplicativeExpression)*
;
-
+
multiplicativeExpression
: unaryExpression (('*' | '/') unaryExpression)*
;
@@ -62,11 +62,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
+```