summaryrefslogtreecommitdiff
path: root/chapter06/docs
diff options
context:
space:
mode:
Diffstat (limited to 'chapter06/docs')
-rw-r--r--chapter06/docs/06-grammar.md16
-rw-r--r--chapter06/docs/06-graph1-post.gv2
-rw-r--r--chapter06/docs/06-graph1-pre.gv2
-rw-r--r--chapter06/docs/06-graph2-post.gv2
-rw-r--r--chapter06/docs/06-graph3-nonconst.gv2
-rw-r--r--chapter06/docs/06-graph3-true.gv2
-rw-r--r--chapter06/docs/build-graphs.sh1
-rw-r--r--chapter06/docs/lattice.gv2
8 files changed, 14 insertions, 15 deletions
diff --git a/chapter06/docs/06-grammar.md b/chapter06/docs/06-grammar.md
index ea779a5a..4cf1cac6 100644
--- a/chapter06/docs/06-grammar.md
+++ b/chapter06/docs/06-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
+```
diff --git a/chapter06/docs/06-graph1-post.gv b/chapter06/docs/06-graph1-post.gv
index 59214346..31480991 100644
--- a/chapter06/docs/06-graph1-post.gv
+++ b/chapter06/docs/06-graph1-post.gv
@@ -26,4 +26,4 @@ return 1;
Stop3 -> Return13[taillabel=0 color=red];
Return13 -> Start2:p0[taillabel=0 color=red];
Return13 -> Con_12[taillabel=1];
-} \ No newline at end of file
+}
diff --git a/chapter06/docs/06-graph1-pre.gv b/chapter06/docs/06-graph1-pre.gv
index b04fa2f9..2bfdd23d 100644
--- a/chapter06/docs/06-graph1-pre.gv
+++ b/chapter06/docs/06-graph1-pre.gv
@@ -49,4 +49,4 @@ return 1;
Region14 -> If7:p1[taillabel=2 color=red];
Return16 -> Region14[taillabel=0 color=red];
Return16 -> Con_15[taillabel=1];
-} \ No newline at end of file
+}
diff --git a/chapter06/docs/06-graph2-post.gv b/chapter06/docs/06-graph2-post.gv
index dacd80fd..61ae2ca1 100644
--- a/chapter06/docs/06-graph2-post.gv
+++ b/chapter06/docs/06-graph2-post.gv
@@ -30,4 +30,4 @@ return a;
Return17 -> Start2:p0[taillabel=0 color=red];
Return17 -> Con_13[taillabel=1];
Stop3 -> Return17[taillabel=0 color=red];
-} \ No newline at end of file
+}
diff --git a/chapter06/docs/06-graph3-nonconst.gv b/chapter06/docs/06-graph3-nonconst.gv
index 0746be85..7cd4e8e2 100644
--- a/chapter06/docs/06-graph3-nonconst.gv
+++ b/chapter06/docs/06-graph3-nonconst.gv
@@ -83,4 +83,4 @@ return a+b;
Add24 -> Phi_a22[taillabel=2];
Return25 -> Region21[taillabel=0 color=red];
Return25 -> Add24[taillabel=1];
-} \ No newline at end of file
+}
diff --git a/chapter06/docs/06-graph3-true.gv b/chapter06/docs/06-graph3-true.gv
index 8fdcc5df..9739169c 100644
--- a/chapter06/docs/06-graph3-true.gv
+++ b/chapter06/docs/06-graph3-true.gv
@@ -32,4 +32,4 @@ return a+b;
Stop3 -> Return29[taillabel=0 color=red];
Return29 -> Start2:p0[taillabel=0 color=red];
Return29 -> Con_28[taillabel=1];
-} \ No newline at end of file
+}
diff --git a/chapter06/docs/build-graphs.sh b/chapter06/docs/build-graphs.sh
index 44d2de3a..6b3f5bb2 100644
--- a/chapter06/docs/build-graphs.sh
+++ b/chapter06/docs/build-graphs.sh
@@ -10,4 +10,3 @@ dot -Tsvg 06-graph4-nonconst.gv > 06-graph4-nonconst.svg
dot -Tsvg 06-graph4-true.gv > 06-graph4-true.svg
dot -Tsvg 06-graph4-arg2.gv > 06-graph4-arg2.svg
dot -Tsvg lattice.gv > lattice.svg
-
diff --git a/chapter06/docs/lattice.gv b/chapter06/docs/lattice.gv
index 2cf27452..e533ad4a 100644
--- a/chapter06/docs/lattice.gv
+++ b/chapter06/docs/lattice.gv
@@ -61,4 +61,4 @@ digraph Lattice {
INT_MAX; TUPLE}
{rank=same; INT_BOT; CTRL}
{rank=same; BOT;}
-} \ No newline at end of file
+}