diff options
Diffstat (limited to 'chapter03/docs')
| -rw-r--r-- | chapter03/docs/03-grammar.md | 72 | ||||
| -rw-r--r-- | chapter03/docs/03-graph1.gv | 33 | ||||
| -rw-r--r-- | chapter03/docs/03-graph1.svg | 131 | ||||
| -rw-r--r-- | chapter03/docs/03-graph2.gv | 29 | ||||
| -rw-r--r-- | chapter03/docs/03-graph2.svg | 130 | ||||
| -rw-r--r-- | chapter03/docs/03-graph3.gv | 28 | ||||
| -rw-r--r-- | chapter03/docs/03-graph3.svg | 120 |
7 files changed, 543 insertions, 0 deletions
diff --git a/chapter03/docs/03-grammar.md b/chapter03/docs/03-grammar.md new file mode 100644 index 00000000..2a6d4c1b --- /dev/null +++ b/chapter03/docs/03-grammar.md @@ -0,0 +1,72 @@ +# Grammar for Chapter 1 + +```antlrv4 +grammar SimpleLanguage; + +program + : statement+ EOF + ; + +statement + : returnStatement + | declStatement + | blockStatment + | expressionStatement + | metaStatement + ; + +metaStatement + : '#showGraph' ';' + ; + +expressionStatement + : IDENTIFIER '=' expression ';' + ; + +blockStatement + : '{' statement+ '}' + ; + +declStatement + : 'int' IDENTIFIER '=' expression ';' + ; + +returnStatement + : 'return' expression ';' + ; + +expression + : additiveExpression + ; + +additiveExpression + : multiplicativeExpression (('+' | '-') multiplicativeExpression)* + ; + +multiplicativeExpression + : unaryExpression (('*' | '/') unaryExpression)* + ; + +unaryExpression + : ('-') unaryExpression + | primaryExpression + ; + +primaryExpression + : IDENTIFIER + | INTEGER_LITERAL + | '(' expression ')' + ; + +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/chapter03/docs/03-graph1.gv b/chapter03/docs/03-graph1.gv new file mode 100644 index 00000000..5983f622 --- /dev/null +++ b/chapter03/docs/03-graph1.gv @@ -0,0 +1,33 @@ +digraph chapter03 { + rankdir=BT; + subgraph cluster_Nodes { + Start1 [ shape=box style=filled fillcolor=yellow label="Start" ]; + Con_2 [ label="#1" ]; + Con_3 [ label="#2" ]; + Con_5 [ label="#3" ]; + Add6 [ label="Add" ]; + } + node [shape=plaintext]; + subgraph cluster_0 { + scope0 [label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="aqua">0</TD><TD PORT="scope0_a">a</TD><TD PORT="scope0_b">b</TD><TD PORT="scope0_c">c</TD></TR> + </TABLE>>]; + subgraph cluster_1 { + scope1 [label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="aqua">1</TD><TD PORT="scope1_b">b</TD></TR> + </TABLE>>]; + } + } + Con_2 -> Start1 [style=dotted]; + Con_3 -> Start1 [style=dotted]; + Con_5 -> Start1 [style=dotted]; + Add6 -> Con_2; + Add6 -> Con_5; + edge [style=dashed color=cornflowerblue]; + scope0:scope0_a -> Con_2; + scope0:scope0_b -> Con_3; + scope0:scope0_c -> Add6; + scope1:scope1_b -> Con_5; +} diff --git a/chapter03/docs/03-graph1.svg b/chapter03/docs/03-graph1.svg new file mode 100644 index 00000000..364cd42c --- /dev/null +++ b/chapter03/docs/03-graph1.svg @@ -0,0 +1,131 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Generated by graphviz version 2.43.0 (0) + --> +<!-- Title: chapter03 Pages: 1 --> +<svg width="238pt" height="300pt" + viewBox="0.00 0.00 238.00 300.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 296)"> +<title>chapter03</title> +<polygon fill="white" stroke="transparent" points="-4,4 -4,-296 234,-296 234,4 -4,4"/> +<g id="clust1" class="cluster"> +<title>cluster_Nodes</title> +<polygon fill="none" stroke="black" points="8,-88 8,-284 222,-284 222,-88 8,-88"/> +</g> +<g id="clust2" class="cluster"> +<title>cluster_0</title> +<polygon fill="none" stroke="black" points="36,-8 36,-76 210,-76 210,-8 36,-8"/> +</g> +<g id="clust3" class="cluster"> +<title>cluster_1</title> +<polygon fill="none" stroke="black" points="132,-16 132,-68 202,-68 202,-16 132,-16"/> +</g> +<!-- Start1 --> +<g id="node1" class="node"> +<title>Start1</title> +<polygon fill="yellow" stroke="black" points="142,-276 88,-276 88,-240 142,-240 142,-276"/> +<text text-anchor="middle" x="115" y="-254.3" font-family="Times,serif" font-size="14.00">Start</text> +</g> +<!-- Con_2 --> +<g id="node2" class="node"> +<title>Con_2</title> +<ellipse fill="none" stroke="black" cx="43" cy="-186" rx="27" ry="18"/> +<text text-anchor="middle" x="43" y="-182.3" font-family="Times,serif" font-size="14.00">#1</text> +</g> +<!-- Con_2->Start1 --> +<g id="edge1" class="edge"> +<title>Con_2->Start1</title> +<path fill="none" stroke="black" stroke-dasharray="1,5" d="M57.57,-201.17C66.92,-210.25 79.3,-222.29 90.17,-232.86"/> +<polygon fill="black" stroke="black" points="87.79,-235.43 97.4,-239.89 92.67,-230.41 87.79,-235.43"/> +</g> +<!-- Con_3 --> +<g id="node3" class="node"> +<title>Con_3</title> +<ellipse fill="none" stroke="black" cx="115" cy="-186" rx="27" ry="18"/> +<text text-anchor="middle" x="115" y="-182.3" font-family="Times,serif" font-size="14.00">#2</text> +</g> +<!-- Con_3->Start1 --> +<g id="edge2" class="edge"> +<title>Con_3->Start1</title> +<path fill="none" stroke="black" stroke-dasharray="1,5" d="M115,-204.3C115,-212.02 115,-221.29 115,-229.89"/> +<polygon fill="black" stroke="black" points="111.5,-229.9 115,-239.9 118.5,-229.9 111.5,-229.9"/> +</g> +<!-- Con_5 --> +<g id="node4" class="node"> +<title>Con_5</title> +<ellipse fill="none" stroke="black" cx="187" cy="-186" rx="27" ry="18"/> +<text text-anchor="middle" x="187" y="-182.3" font-family="Times,serif" font-size="14.00">#3</text> +</g> +<!-- Con_5->Start1 --> +<g id="edge3" class="edge"> +<title>Con_5->Start1</title> +<path fill="none" stroke="black" stroke-dasharray="1,5" d="M172.43,-201.17C163.08,-210.25 150.7,-222.29 139.83,-232.86"/> +<polygon fill="black" stroke="black" points="137.33,-230.41 132.6,-239.89 142.21,-235.43 137.33,-230.41"/> +</g> +<!-- Add6 --> +<g id="node5" class="node"> +<title>Add6</title> +<ellipse fill="none" stroke="black" cx="138" cy="-114" rx="28.7" ry="18"/> +<text text-anchor="middle" x="138" y="-110.3" font-family="Times,serif" font-size="14.00">Add</text> +</g> +<!-- Add6->Con_2 --> +<g id="edge4" class="edge"> +<title>Add6->Con_2</title> +<path fill="none" stroke="black" d="M120.13,-128.17C105.58,-138.89 84.84,-154.17 68.53,-166.18"/> +<polygon fill="black" stroke="black" points="66.44,-163.38 60.47,-172.13 70.59,-169.01 66.44,-163.38"/> +</g> +<!-- Add6->Con_5 --> +<g id="edge5" class="edge"> +<title>Add6->Con_5</title> +<path fill="none" stroke="black" d="M149.12,-130.88C155.32,-139.74 163.17,-150.96 170.12,-160.88"/> +<polygon fill="black" stroke="black" points="167.32,-162.99 175.93,-169.18 173.06,-158.98 167.32,-162.99"/> +</g> +<!-- scope0 --> +<g id="node6" class="node"> +<title>scope0</title> +<polygon fill="aqua" stroke="transparent" points="53,-31 53,-52 69,-52 69,-31 53,-31"/> +<polygon fill="none" stroke="black" points="53,-31 53,-52 69,-52 69,-31 53,-31"/> +<text text-anchor="start" x="56" y="-37.8" font-family="Times,serif" font-size="14.00">0</text> +<polygon fill="none" stroke="black" points="69,-31 69,-52 84,-52 84,-31 69,-31"/> +<text text-anchor="start" x="72" y="-37.8" font-family="Times,serif" font-size="14.00">a</text> +<polygon fill="none" stroke="black" points="84,-31 84,-52 100,-52 100,-31 84,-31"/> +<text text-anchor="start" x="87" y="-37.8" font-family="Times,serif" font-size="14.00">b</text> +<polygon fill="none" stroke="black" points="100,-31 100,-52 114,-52 114,-31 100,-31"/> +<text text-anchor="start" x="103" y="-37.8" font-family="Times,serif" font-size="14.00">c</text> +</g> +<!-- scope0->Con_2 --> +<g id="edge6" class="edge"> +<title>scope0:scope0_a->Con_2</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M76,-53C76,-90.54 63.29,-132.33 53.64,-158.64"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="50.27,-157.66 50,-168.25 56.81,-160.14 50.27,-157.66"/> +</g> +<!-- scope0->Con_3 --> +<g id="edge7" class="edge"> +<title>scope0:scope0_b->Con_3</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M92,-53C92,-88.29 93.39,-97.33 100,-132 101.65,-140.68 104.07,-150 106.48,-158.37"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="103.14,-159.42 109.37,-168 109.85,-157.41 103.14,-159.42"/> +</g> +<!-- scope0->Add6 --> +<g id="edge8" class="edge"> +<title>scope0:scope0_c->Add6</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M107,-53C107,-65.88 112.71,-78.75 119.22,-89.25"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="116.52,-91.5 125.03,-97.81 122.31,-87.57 116.52,-91.5"/> +</g> +<!-- scope1 --> +<g id="node7" class="node"> +<title>scope1</title> +<polygon fill="aqua" stroke="transparent" points="151,-31 151,-52 167,-52 167,-31 151,-31"/> +<polygon fill="none" stroke="black" points="151,-31 151,-52 167,-52 167,-31 151,-31"/> +<text text-anchor="start" x="154" y="-37.8" font-family="Times,serif" font-size="14.00">1</text> +<polygon fill="none" stroke="black" points="167,-31 167,-52 183,-52 183,-31 167,-31"/> +<text text-anchor="start" x="170" y="-37.8" font-family="Times,serif" font-size="14.00">b</text> +</g> +<!-- scope1->Con_5 --> +<g id="edge9" class="edge"> +<title>scope1:scope1_b->Con_5</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M175,-53C175,-89.4 179.58,-131.23 183.08,-157.87"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="179.64,-158.52 184.46,-167.96 186.58,-157.58 179.64,-158.52"/> +</g> +</g> +</svg> diff --git a/chapter03/docs/03-graph2.gv b/chapter03/docs/03-graph2.gv new file mode 100644 index 00000000..c6c55028 --- /dev/null +++ b/chapter03/docs/03-graph2.gv @@ -0,0 +1,29 @@ +digraph chapter03 { + rankdir=BT; + subgraph cluster_Nodes { + Start1 [ shape=box style=filled fillcolor=yellow label="Start" ]; + Con_2 [ label="#1" ]; + Con_3 [ label="#2" ]; + Con_5 [ label="#3" ]; + Add6 [ label="Add" ]; + Return7 [ shape=box style=filled fillcolor=yellow label="Return" ]; + } + node [shape=plaintext]; + subgraph cluster_0 { + scope0 [label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="aqua">0</TD><TD PORT="scope0_a">a</TD><TD PORT="scope0_b">b</TD><TD PORT="scope0_c">c</TD></TR> + </TABLE>>]; + } + Con_2 -> Start1 [style=dotted]; + Con_3 -> Start1 [style=dotted]; + Con_5 -> Start1 [style=dotted]; + Add6 -> Con_2; + Add6 -> Con_5; + Return7 -> Start1 [color=red]; + Return7 -> Add6; + edge [style=dashed color=cornflowerblue]; + scope0:scope0_a -> Con_2; + scope0:scope0_b -> Con_3; + scope0:scope0_c -> Add6; +} diff --git a/chapter03/docs/03-graph2.svg b/chapter03/docs/03-graph2.svg new file mode 100644 index 00000000..4ab5a8b6 --- /dev/null +++ b/chapter03/docs/03-graph2.svg @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Generated by graphviz version 2.43.0 (0) + --> +<!-- Title: chapter03 Pages: 1 --> +<svg width="360pt" height="292pt" + viewBox="0.00 0.00 360.00 292.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 288)"> +<title>chapter03</title> +<polygon fill="white" stroke="transparent" points="-4,4 -4,-288 356,-288 356,4 -4,4"/> +<g id="clust1" class="cluster"> +<title>cluster_Nodes</title> +<polygon fill="none" stroke="black" points="8,-8 8,-276 242,-276 242,-8 8,-8"/> +</g> +<g id="clust2" class="cluster"> +<title>cluster_0</title> +<polygon fill="none" stroke="black" points="250,-8 250,-60 344,-60 344,-8 250,-8"/> +</g> +<!-- Start1 --> +<g id="node1" class="node"> +<title>Start1</title> +<polygon fill="yellow" stroke="black" points="126,-268 72,-268 72,-232 126,-232 126,-268"/> +<text text-anchor="middle" x="99" y="-246.3" font-family="Times,serif" font-size="14.00">Start</text> +</g> +<!-- Con_2 --> +<g id="node2" class="node"> +<title>Con_2</title> +<ellipse fill="none" stroke="black" cx="135" cy="-178" rx="27" ry="18"/> +<text text-anchor="middle" x="135" y="-174.3" font-family="Times,serif" font-size="14.00">#1</text> +</g> +<!-- Con_2->Start1 --> +<g id="edge1" class="edge"> +<title>Con_2->Start1</title> +<path fill="none" stroke="black" stroke-dasharray="1,5" d="M126.65,-195.24C122.46,-203.39 117.27,-213.47 112.53,-222.69"/> +<polygon fill="black" stroke="black" points="109.27,-221.38 107.81,-231.88 115.49,-224.58 109.27,-221.38"/> +</g> +<!-- Con_3 --> +<g id="node3" class="node"> +<title>Con_3</title> +<ellipse fill="none" stroke="black" cx="207" cy="-178" rx="27" ry="18"/> +<text text-anchor="middle" x="207" y="-174.3" font-family="Times,serif" font-size="14.00">#2</text> +</g> +<!-- Con_3->Start1 --> +<g id="edge2" class="edge"> +<title>Con_3->Start1</title> +<path fill="none" stroke="black" stroke-dasharray="1,5" d="M188.19,-191.19C173.23,-200.89 151.89,-214.72 133.84,-226.42"/> +<polygon fill="black" stroke="black" points="131.77,-223.59 125.28,-231.97 135.58,-229.46 131.77,-223.59"/> +</g> +<!-- Con_5 --> +<g id="node4" class="node"> +<title>Con_5</title> +<ellipse fill="none" stroke="black" cx="63" cy="-178" rx="27" ry="18"/> +<text text-anchor="middle" x="63" y="-174.3" font-family="Times,serif" font-size="14.00">#3</text> +</g> +<!-- Con_5->Start1 --> +<g id="edge3" class="edge"> +<title>Con_5->Start1</title> +<path fill="none" stroke="black" stroke-dasharray="1,5" d="M71.35,-195.24C75.54,-203.39 80.73,-213.47 85.47,-222.69"/> +<polygon fill="black" stroke="black" points="82.51,-224.58 90.19,-231.88 88.73,-221.38 82.51,-224.58"/> +</g> +<!-- Add6 --> +<g id="node5" class="node"> +<title>Add6</title> +<ellipse fill="none" stroke="black" cx="89" cy="-106" rx="28.7" ry="18"/> +<text text-anchor="middle" x="89" y="-102.3" font-family="Times,serif" font-size="14.00">Add</text> +</g> +<!-- Add6->Con_2 --> +<g id="edge4" class="edge"> +<title>Add6->Con_2</title> +<path fill="none" stroke="black" d="M99.44,-122.88C105.2,-131.66 112.48,-142.74 118.96,-152.58"/> +<polygon fill="black" stroke="black" points="116.19,-154.74 124.6,-161.18 122.04,-150.9 116.19,-154.74"/> +</g> +<!-- Add6->Con_5 --> +<g id="edge5" class="edge"> +<title>Add6->Con_5</title> +<path fill="none" stroke="black" d="M82.84,-123.59C79.84,-131.66 76.16,-141.57 72.79,-150.65"/> +<polygon fill="black" stroke="black" points="69.5,-149.45 69.3,-160.04 76.06,-151.89 69.5,-149.45"/> +</g> +<!-- Return7 --> +<g id="node6" class="node"> +<title>Return7</title> +<polygon fill="yellow" stroke="black" points="96,-52 30,-52 30,-16 96,-16 96,-52"/> +<text text-anchor="middle" x="63" y="-30.3" font-family="Times,serif" font-size="14.00">Return</text> +</g> +<!-- Return7->Start1 --> +<g id="edge6" class="edge"> +<title>Return7->Start1</title> +<path fill="none" stroke="red" d="M51.87,-52.38C33.84,-82.96 2.57,-147.69 27,-196 34.7,-211.23 49.06,-223.15 62.94,-231.8"/> +<polygon fill="red" stroke="red" points="61.52,-235.02 71.92,-237.01 65.03,-228.96 61.52,-235.02"/> +</g> +<!-- Return7->Add6 --> +<g id="edge7" class="edge"> +<title>Return7->Add6</title> +<path fill="none" stroke="black" d="M69.43,-52.3C72.4,-60.3 75.99,-69.98 79.29,-78.85"/> +<polygon fill="black" stroke="black" points="76.06,-80.22 82.83,-88.38 82.63,-77.78 76.06,-80.22"/> +</g> +<!-- scope0 --> +<g id="node7" class="node"> +<title>scope0</title> +<polygon fill="aqua" stroke="transparent" points="267,-23 267,-44 283,-44 283,-23 267,-23"/> +<polygon fill="none" stroke="black" points="267,-23 267,-44 283,-44 283,-23 267,-23"/> +<text text-anchor="start" x="270" y="-29.8" font-family="Times,serif" font-size="14.00">0</text> +<polygon fill="none" stroke="black" points="283,-23 283,-44 298,-44 298,-23 283,-23"/> +<text text-anchor="start" x="286" y="-29.8" font-family="Times,serif" font-size="14.00">a</text> +<polygon fill="none" stroke="black" points="298,-23 298,-44 314,-44 314,-23 298,-23"/> +<text text-anchor="start" x="301" y="-29.8" font-family="Times,serif" font-size="14.00">b</text> +<polygon fill="none" stroke="black" points="314,-23 314,-44 328,-44 328,-23 314,-23"/> +<text text-anchor="start" x="317" y="-29.8" font-family="Times,serif" font-size="14.00">c</text> +</g> +<!-- scope0->Con_2 --> +<g id="edge8" class="edge"> +<title>scope0:scope0_a->Con_2</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M290,-45C290,-77.9 208.02,-132.76 163.3,-160.24"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="161.36,-157.33 154.63,-165.51 164.99,-163.31 161.36,-157.33"/> +</g> +<!-- scope0->Con_3 --> +<g id="edge9" class="edge"> +<title>scope0:scope0_b->Con_3</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M306,-45C306,-93.23 263.17,-135.12 233.85,-158.15"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="231.47,-155.56 225.62,-164.4 235.7,-161.14 231.47,-155.56"/> +</g> +<!-- scope0->Add6 --> +<g id="edge10" class="edge"> +<title>scope0:scope0_c->Add6</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M321,-45C321,-86.77 178.12,-76.36 138,-88 132.99,-89.45 127.75,-91.12 122.62,-92.82"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="121.34,-89.56 113.02,-96.11 123.61,-96.18 121.34,-89.56"/> +</g> +</g> +</svg> diff --git a/chapter03/docs/03-graph3.gv b/chapter03/docs/03-graph3.gv new file mode 100644 index 00000000..da30744b --- /dev/null +++ b/chapter03/docs/03-graph3.gv @@ -0,0 +1,28 @@ +digraph chapter03 { + rankdir=BT; + subgraph cluster_Nodes { + Start1 [ shape=box style=filled fillcolor=yellow label="Start" ]; + Con_2 [ label="#1" ]; + Con_19 [ label="#8" ]; + Con_3 [ label="#2" ]; + Return20 [ shape=box style=filled fillcolor=yellow label="Return" ]; + Con_4 [ label="#3" ]; + Con_5 [ label="#4" ]; + } + node [shape=plaintext]; + subgraph cluster_0 { + scope0 [label=< + <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> + <TR><TD BGCOLOR="aqua">0</TD><TD PORT="scope0_y0">y0</TD><TD PORT="scope0_x0">x0</TD><TD PORT="scope0_y1">y1</TD><TD PORT="scope0_x1">x1</TD></TR> + </TABLE>>]; + } + Con_19 -> Start1 [style=dotted]; + Return20 -> Start1 [color=red]; + Return20 -> Con_19; + edge [style=dashed color=cornflowerblue]; + scope0:scope0_y0 -> Con_3; + scope0:scope0_x0 -> Con_2; + scope0:scope0_y1 -> Con_5; + scope0:scope0_x1 -> Con_4; +} + diff --git a/chapter03/docs/03-graph3.svg b/chapter03/docs/03-graph3.svg new file mode 100644 index 00000000..3900b93d --- /dev/null +++ b/chapter03/docs/03-graph3.svg @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<!-- Generated by graphviz version 2.43.0 (0) + --> +<!-- Title: chapter03 Pages: 1 --> +<svg width="394pt" height="292pt" + viewBox="0.00 0.00 394.00 292.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 288)"> +<title>chapter03</title> +<polygon fill="white" stroke="transparent" points="-4,4 -4,-288 390,-288 390,4 -4,4"/> +<g id="clust1" class="cluster"> +<title>cluster_Nodes</title> +<polygon fill="none" stroke="black" points="8,-80 8,-276 378,-276 378,-80 8,-80"/> +</g> +<g id="clust2" class="cluster"> +<title>cluster_0</title> +<polygon fill="none" stroke="black" points="115,-8 115,-60 259,-60 259,-8 115,-8"/> +</g> +<!-- Start1 --> +<g id="node1" class="node"> +<title>Start1</title> +<polygon fill="yellow" stroke="black" points="220,-268 166,-268 166,-232 220,-232 220,-268"/> +<text text-anchor="middle" x="193" y="-246.3" font-family="Times,serif" font-size="14.00">Start</text> +</g> +<!-- Con_2 --> +<g id="node2" class="node"> +<title>Con_2</title> +<ellipse fill="none" stroke="black" cx="343" cy="-106" rx="27" ry="18"/> +<text text-anchor="middle" x="343" y="-102.3" font-family="Times,serif" font-size="14.00">#1</text> +</g> +<!-- Con_19 --> +<g id="node3" class="node"> +<title>Con_19</title> +<ellipse fill="none" stroke="black" cx="216" cy="-178" rx="27" ry="18"/> +<text text-anchor="middle" x="216" y="-174.3" font-family="Times,serif" font-size="14.00">#8</text> +</g> +<!-- Con_19->Start1 --> +<g id="edge1" class="edge"> +<title>Con_19->Start1</title> +<path fill="none" stroke="black" stroke-dasharray="1,5" d="M210.43,-195.95C207.84,-203.82 204.7,-213.38 201.8,-222.21"/> +<polygon fill="black" stroke="black" points="198.47,-221.13 198.68,-231.72 205.12,-223.32 198.47,-221.13"/> +</g> +<!-- Con_3 --> +<g id="node4" class="node"> +<title>Con_3</title> +<ellipse fill="none" stroke="black" cx="271" cy="-106" rx="27" ry="18"/> +<text text-anchor="middle" x="271" y="-102.3" font-family="Times,serif" font-size="14.00">#2</text> +</g> +<!-- Return20 --> +<g id="node5" class="node"> +<title>Return20</title> +<polygon fill="yellow" stroke="black" points="226,-124 160,-124 160,-88 226,-88 226,-124"/> +<text text-anchor="middle" x="193" y="-102.3" font-family="Times,serif" font-size="14.00">Return</text> +</g> +<!-- Return20->Start1 --> +<g id="edge2" class="edge"> +<title>Return20->Start1</title> +<path fill="none" stroke="red" d="M187.59,-124.47C184.7,-134.71 181.45,-147.96 180,-160 178.08,-175.88 178.08,-180.12 180,-196 181.02,-204.47 182.93,-213.53 184.98,-221.72"/> +<polygon fill="red" stroke="red" points="181.64,-222.77 187.59,-231.53 188.4,-220.97 181.64,-222.77"/> +</g> +<!-- Return20->Con_19 --> +<g id="edge3" class="edge"> +<title>Return20->Con_19</title> +<path fill="none" stroke="black" d="M198.69,-124.3C201.25,-132.1 204.33,-141.49 207.18,-150.17"/> +<polygon fill="black" stroke="black" points="203.93,-151.49 210.38,-159.9 210.58,-149.3 203.93,-151.49"/> +</g> +<!-- Con_4 --> +<g id="node6" class="node"> +<title>Con_4</title> +<ellipse fill="none" stroke="black" cx="115" cy="-106" rx="27" ry="18"/> +<text text-anchor="middle" x="115" y="-102.3" font-family="Times,serif" font-size="14.00">#3</text> +</g> +<!-- Con_5 --> +<g id="node7" class="node"> +<title>Con_5</title> +<ellipse fill="none" stroke="black" cx="43" cy="-106" rx="27" ry="18"/> +<text text-anchor="middle" x="43" y="-102.3" font-family="Times,serif" font-size="14.00">#4</text> +</g> +<!-- scope0 --> +<g id="node8" class="node"> +<title>scope0</title> +<polygon fill="aqua" stroke="transparent" points="131,-23 131,-44 147,-44 147,-23 131,-23"/> +<polygon fill="none" stroke="black" points="131,-23 131,-44 147,-44 147,-23 131,-23"/> +<text text-anchor="start" x="134" y="-29.8" font-family="Times,serif" font-size="14.00">0</text> +<polygon fill="none" stroke="black" points="147,-23 147,-44 171,-44 171,-23 147,-23"/> +<text text-anchor="start" x="150" y="-29.8" font-family="Times,serif" font-size="14.00">y0</text> +<polygon fill="none" stroke="black" points="171,-23 171,-44 195,-44 195,-23 171,-23"/> +<text text-anchor="start" x="174" y="-29.8" font-family="Times,serif" font-size="14.00">x0</text> +<polygon fill="none" stroke="black" points="195,-23 195,-44 219,-44 219,-23 195,-23"/> +<text text-anchor="start" x="198" y="-29.8" font-family="Times,serif" font-size="14.00">y1</text> +<polygon fill="none" stroke="black" points="219,-23 219,-44 243,-44 243,-23 219,-23"/> +<text text-anchor="start" x="222" y="-29.8" font-family="Times,serif" font-size="14.00">x1</text> +</g> +<!-- scope0->Con_2 --> +<g id="edge5" class="edge"> +<title>scope0:scope0_x0->Con_2</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M183,-45C183,-102.26 255.22,-55.55 307,-80 310.61,-81.71 314.26,-83.76 317.77,-85.96"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="315.88,-88.9 326.13,-91.56 319.78,-83.09 315.88,-88.9"/> +</g> +<!-- scope0->Con_3 --> +<g id="edge4" class="edge"> +<title>scope0:scope0_y0->Con_3</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M159,-45C159,-82.19 202.71,-61.55 235,-80 238.3,-81.89 241.68,-83.99 244.99,-86.15"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="243.22,-89.18 253.46,-91.9 247.15,-83.39 243.22,-89.18"/> +</g> +<!-- scope0->Con_4 --> +<g id="edge7" class="edge"> +<title>scope0:scope0_x1->Con_4</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M231,-45C231,-83.81 184.88,-61.06 151,-80 147.51,-81.95 143.94,-84.15 140.47,-86.42"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="138.44,-83.57 132.14,-92.09 142.37,-89.35 138.44,-83.57"/> +</g> +<!-- scope0->Con_5 --> +<g id="edge6" class="edge"> +<title>scope0:scope0_y1->Con_5</title> +<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M207,-45C207,-103.98 132.44,-55.04 79,-80 75.38,-81.69 71.73,-83.74 68.22,-85.93"/> +<polygon fill="cornflowerblue" stroke="cornflowerblue" points="66.21,-83.06 59.85,-91.53 70.11,-88.87 66.21,-83.06"/> +</g> +</g> +</svg> |
