summaryrefslogtreecommitdiff
path: root/chapter05/docs/05-graph1.svg
diff options
context:
space:
mode:
authordibyendumajumdar <mobile@majumdar.org.uk>2023-10-28 12:13:35 +0100
committerDibyendu Majumdar <dibyendumajumdar@users.noreply.github.com>2023-11-01 18:56:50 +0000
commitd438edc542ae524c69cd0a5259c76313cf3abc76 (patch)
tree580234f9759ea4d22907b00e1310fdd9d4a5de39 /chapter05/docs/05-graph1.svg
parent45f134cfdb467c2f8fe4b9c352902775ecc31547 (diff)
downloadSimple-d438edc542ae524c69cd0a5259c76313cf3abc76.tar.gz
Simple-d438edc542ae524c69cd0a5259c76313cf3abc76.zip
Add writeup of if statement parsing
Diffstat (limited to 'chapter05/docs/05-graph1.svg')
-rw-r--r--chapter05/docs/05-graph1.svg220
1 files changed, 220 insertions, 0 deletions
diff --git a/chapter05/docs/05-graph1.svg b/chapter05/docs/05-graph1.svg
new file mode 100644
index 00000000..488a71cb
--- /dev/null
+++ b/chapter05/docs/05-graph1.svg
@@ -0,0 +1,220 @@
+<?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: chapter05 Pages: 1 -->
+<svg width="471pt" height="356pt"
+ viewBox="0.00 0.00 471.00 356.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 352)">
+<title>chapter05</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-352 467,-352 467,4 -4,4"/>
+<g id="clust1" class="cluster">
+<title>cluster_Nodes</title>
+<polygon fill="none" stroke="black" points="89,-88 89,-340 419,-340 419,-88 89,-88"/>
+</g>
+<g id="clust2" class="cluster">
+<title>cluster_Scope20_0</title>
+<polygon fill="none" stroke="black" points="8,-8 8,-76 208,-76 208,-8 8,-8"/>
+</g>
+<g id="clust3" class="cluster">
+<title>cluster_Scope20_1</title>
+<polygon fill="none" stroke="black" points="16,-16 16,-68 86,-68 86,-16 16,-16"/>
+</g>
+<g id="clust4" class="cluster">
+<title>cluster_Scope21_0</title>
+<polygon fill="none" stroke="black" points="255,-8 255,-76 455,-76 455,-8 255,-8"/>
+</g>
+<g id="clust5" class="cluster">
+<title>cluster_Scope21_1</title>
+<polygon fill="none" stroke="black" points="263,-16 263,-68 333,-68 333,-16 263,-16"/>
+</g>
+<!-- Start1 -->
+<g id="node1" class="node">
+<title>Start1</title>
+<polygon fill="yellow" stroke="transparent" points="178,-303 178,-328 259,-328 259,-303 178,-303"/>
+<polygon fill="none" stroke="black" points="178,-303 178,-328 259,-328 259,-303 178,-303"/>
+<text text-anchor="start" x="200" y="-311.8" font-family="Times,serif" font-size="14.00">Start</text>
+<polygon fill="none" stroke="black" points="178,-272 178,-303 259,-303 259,-272 178,-272"/>
+<polygon fill="yellow" stroke="transparent" points="183,-277 183,-298 223,-298 223,-277 183,-277"/>
+<polygon fill="none" stroke="black" points="183,-277 183,-298 223,-298 223,-277 183,-277"/>
+<text text-anchor="start" x="186" y="-283.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+<polygon fill="none" stroke="black" points="223,-277 223,-298 254,-298 254,-277 223,-277"/>
+<text text-anchor="start" x="226" y="-283.8" font-family="Times,serif" font-size="14.00">arg</text>
+</g>
+<!-- Con_5 -->
+<g id="node2" class="node">
+<title>Con_5</title>
+<ellipse fill="none" stroke="black" cx="312" cy="-300" rx="27" ry="18"/>
+<text text-anchor="middle" x="312" y="-296.3" font-family="Times,serif" font-size="14.00">#1</text>
+</g>
+<!-- EQNode6 -->
+<g id="node3" class="node">
+<title>EQNode6</title>
+<ellipse fill="none" stroke="black" cx="271" cy="-214" rx="49.29" ry="18"/>
+<text text-anchor="middle" x="271" y="-210.3" font-family="Times,serif" font-size="14.00">EQNode</text>
+</g>
+<!-- EQNode6&#45;&gt;Start1 -->
+<g id="edge1" class="edge">
+<title>EQNode6&#45;&gt;Start1:p1</title>
+<path fill="none" stroke="black" d="M256.87,-231.41C250.04,-240.69 242.75,-253.02 240.07,-265.99"/>
+<polygon fill="black" stroke="black" points="236.58,-265.69 239,-276 243.54,-266.43 236.58,-265.69"/>
+</g>
+<!-- EQNode6&#45;&gt;Con_5 -->
+<g id="edge2" class="edge">
+<title>EQNode6&#45;&gt;Con_5</title>
+<path fill="none" stroke="black" d="M279.3,-232C285.1,-243.88 292.94,-259.96 299.5,-273.39"/>
+<polygon fill="black" stroke="black" points="296.46,-275.15 303.99,-282.6 302.75,-272.08 296.46,-275.15"/>
+</g>
+<!-- If7 -->
+<g id="node4" class="node">
+<title>If7</title>
+<polygon fill="yellow" stroke="transparent" points="181,-131 181,-156 275,-156 275,-131 181,-131"/>
+<polygon fill="none" stroke="black" points="181,-131 181,-156 275,-156 275,-131 181,-131"/>
+<text text-anchor="start" x="222.5" y="-139.8" font-family="Times,serif" font-size="14.00">If</text>
+<polygon fill="none" stroke="black" points="181,-100 181,-131 275,-131 275,-100 181,-100"/>
+<polygon fill="yellow" stroke="transparent" points="186,-105 186,-126 226,-126 226,-105 186,-105"/>
+<polygon fill="none" stroke="black" points="186,-105 186,-126 226,-126 226,-105 186,-105"/>
+<text text-anchor="start" x="189" y="-111.8" font-family="Times,serif" font-size="14.00">True</text>
+<polygon fill="yellow" stroke="transparent" points="226,-105 226,-126 270,-126 270,-105 226,-105"/>
+<polygon fill="none" stroke="black" points="226,-105 226,-126 270,-126 270,-105 226,-105"/>
+<text text-anchor="start" x="229" y="-111.8" font-family="Times,serif" font-size="14.00">False</text>
+</g>
+<!-- If7&#45;&gt;Start1 -->
+<g id="edge3" class="edge">
+<title>If7&#45;&gt;Start1:p0</title>
+<path fill="none" stroke="red" d="M219.54,-160.28C212.88,-187.44 204.51,-228.22 203.18,-265.97"/>
+<polygon fill="red" stroke="red" points="199.68,-265.94 203,-276 206.68,-266.06 199.68,-265.94"/>
+</g>
+<!-- If7&#45;&gt;EQNode6 -->
+<g id="edge4" class="edge">
+<title>If7&#45;&gt;EQNode6</title>
+<path fill="none" stroke="black" d="M244.01,-160.28C248.52,-169.09 253.38,-178.58 257.71,-187.04"/>
+<polygon fill="black" stroke="black" points="254.66,-188.76 262.33,-196.07 260.89,-185.57 254.66,-188.76"/>
+</g>
+<!-- Con_11 -->
+<g id="node5" class="node">
+<title>Con_11</title>
+<ellipse fill="none" stroke="black" cx="384" cy="-300" rx="27" ry="18"/>
+<text text-anchor="middle" x="384" y="-296.3" font-family="Times,serif" font-size="14.00">#2</text>
+</g>
+<!-- Add12 -->
+<g id="node6" class="node">
+<title>Add12</title>
+<ellipse fill="none" stroke="black" cx="367" cy="-214" rx="28.7" ry="18"/>
+<text text-anchor="middle" x="367" y="-210.3" font-family="Times,serif" font-size="14.00">Add</text>
+</g>
+<!-- Add12&#45;&gt;Start1 -->
+<g id="edge5" class="edge">
+<title>Add12&#45;&gt;Start1:p1</title>
+<path fill="none" stroke="black" d="M345.25,-226.01C326.31,-235.99 298.43,-251.6 276,-268 269.65,-272.64 267.95,-278.9 264.5,-282.95"/>
+<polygon fill="black" stroke="black" points="262.82,-279.86 255,-287 265.57,-286.29 262.82,-279.86"/>
+</g>
+<!-- Add12&#45;&gt;Con_11 -->
+<g id="edge6" class="edge">
+<title>Add12&#45;&gt;Con_11</title>
+<path fill="none" stroke="black" d="M370.44,-232C372.77,-243.5 375.89,-258.93 378.55,-272.08"/>
+<polygon fill="black" stroke="black" points="375.15,-272.92 380.56,-282.03 382.01,-271.53 375.15,-272.92"/>
+</g>
+<!-- Con_13 -->
+<g id="node7" class="node">
+<title>Con_13</title>
+<ellipse fill="none" stroke="black" cx="124" cy="-300" rx="27" ry="18"/>
+<text text-anchor="middle" x="124" y="-296.3" font-family="Times,serif" font-size="14.00">#3</text>
+</g>
+<!-- Sub14 -->
+<g id="node8" class="node">
+<title>Sub14</title>
+<ellipse fill="none" stroke="black" cx="155" cy="-214" rx="28.7" ry="18"/>
+<text text-anchor="middle" x="155" y="-210.3" font-family="Times,serif" font-size="14.00">Sub</text>
+</g>
+<!-- Sub14&#45;&gt;Start1 -->
+<g id="edge7" class="edge">
+<title>Sub14&#45;&gt;Start1:p1</title>
+<path fill="none" stroke="black" d="M177.07,-225.84C197.1,-236.27 224.99,-252.48 235.13,-266.39"/>
+<polygon fill="black" stroke="black" points="232.02,-268.03 239,-276 238.51,-265.42 232.02,-268.03"/>
+</g>
+<!-- Sub14&#45;&gt;Con_13 -->
+<g id="edge8" class="edge">
+<title>Sub14&#45;&gt;Con_13</title>
+<path fill="none" stroke="black" d="M148.88,-231.6C144.54,-243.33 138.65,-259.3 133.69,-272.76"/>
+<polygon fill="black" stroke="black" points="130.29,-271.85 130.11,-282.44 136.86,-274.27 130.29,-271.85"/>
+</g>
+<!-- Scope20_0 -->
+<g id="node9" class="node">
+<title>Scope20_0</title>
+<polygon fill="cyan" stroke="transparent" points="105,-31 105,-52 121,-52 121,-31 105,-31"/>
+<polygon fill="none" stroke="black" points="105,-31 105,-52 121,-52 121,-31 105,-31"/>
+<text text-anchor="start" x="108" y="-37.8" font-family="Times,serif" font-size="14.00">0</text>
+<polygon fill="none" stroke="black" points="121,-31 121,-52 161,-52 161,-31 121,-31"/>
+<text text-anchor="start" x="124" y="-37.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+<polygon fill="none" stroke="black" points="161,-31 161,-52 192,-52 192,-31 161,-31"/>
+<text text-anchor="start" x="164" y="-37.8" font-family="Times,serif" font-size="14.00">arg</text>
+</g>
+<!-- Scope20_0&#45;&gt;Start1 -->
+<g id="edge10" class="edge">
+<title>Scope20_0:Scope20_0_arg&#45;&gt;Start1:p1</title>
+<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M177,-53C177,-61.62 118.7,-187.55 117,-196 113.84,-211.69 107.8,-218.91 117,-232 147.93,-276.04 227.44,-225.96 237.87,-266.02"/>
+<polygon fill="cornflowerblue" stroke="cornflowerblue" points="234.39,-266.46 239,-276 241.35,-265.67 234.39,-266.46"/>
+</g>
+<!-- Scope20_0&#45;&gt;If7 -->
+<g id="edge9" class="edge">
+<title>Scope20_0:Scope20_0_$ctrl&#45;&gt;If7:p1</title>
+<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M141,-53C141,-101.77 232.71,-58.8 246.32,-93.95"/>
+<polygon fill="cornflowerblue" stroke="cornflowerblue" points="242.9,-94.71 248,-104 249.8,-93.56 242.9,-94.71"/>
+</g>
+<!-- Scope20_1 -->
+<g id="node10" class="node">
+<title>Scope20_1</title>
+<polygon fill="cyan" stroke="transparent" points="36,-31 36,-52 52,-52 52,-31 36,-31"/>
+<polygon fill="none" stroke="black" points="36,-31 36,-52 52,-52 52,-31 36,-31"/>
+<text text-anchor="start" x="39" y="-37.8" font-family="Times,serif" font-size="14.00">1</text>
+<polygon fill="none" stroke="black" points="52,-31 52,-52 67,-52 67,-31 52,-31"/>
+<text text-anchor="start" x="55" y="-37.8" font-family="Times,serif" font-size="14.00">a</text>
+</g>
+<!-- Scope20_1&#45;&gt;Sub14 -->
+<g id="edge11" class="edge">
+<title>Scope20_1:Scope20_1_a&#45;&gt;Sub14</title>
+<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M60,-53C60,-109.34 104.1,-163.18 132.2,-191.77"/>
+<polygon fill="cornflowerblue" stroke="cornflowerblue" points="129.75,-194.27 139.31,-198.82 134.67,-189.29 129.75,-194.27"/>
+</g>
+<!-- Scope21_0 -->
+<g id="node11" class="node">
+<title>Scope21_0</title>
+<polygon fill="cyan" stroke="transparent" points="352,-31 352,-52 368,-52 368,-31 352,-31"/>
+<polygon fill="none" stroke="black" points="352,-31 352,-52 368,-52 368,-31 352,-31"/>
+<text text-anchor="start" x="355" y="-37.8" font-family="Times,serif" font-size="14.00">0</text>
+<polygon fill="none" stroke="black" points="368,-31 368,-52 408,-52 408,-31 368,-31"/>
+<text text-anchor="start" x="371" y="-37.8" font-family="Times,serif" font-size="14.00">$ctrl</text>
+<polygon fill="none" stroke="black" points="408,-31 408,-52 439,-52 439,-31 408,-31"/>
+<text text-anchor="start" x="411" y="-37.8" font-family="Times,serif" font-size="14.00">arg</text>
+</g>
+<!-- Scope21_0&#45;&gt;Start1 -->
+<g id="edge13" class="edge">
+<title>Scope21_0:Scope21_0_arg&#45;&gt;Start1:p1</title>
+<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M424,-53C424,-133 456.67,-170.92 405,-232 366.55,-277.44 328.13,-239.26 276,-268 269.11,-271.8 267.55,-278.27 264.27,-282.59"/>
+<polygon fill="cornflowerblue" stroke="cornflowerblue" points="262.53,-279.54 255,-287 265.53,-285.86 262.53,-279.54"/>
+</g>
+<!-- Scope21_0&#45;&gt;If7 -->
+<g id="edge12" class="edge">
+<title>Scope21_0:Scope21_0_$ctrl&#45;&gt;If7:p0</title>
+<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M388,-53C388,-77.87 360.63,-68.25 337,-76 312.25,-84.12 230.52,-76.68 210.47,-94.63"/>
+<polygon fill="cornflowerblue" stroke="cornflowerblue" points="207.15,-93.47 206,-104 213.46,-96.48 207.15,-93.47"/>
+</g>
+<!-- Scope21_1 -->
+<g id="node12" class="node">
+<title>Scope21_1</title>
+<polygon fill="cyan" stroke="transparent" points="283,-31 283,-52 299,-52 299,-31 283,-31"/>
+<polygon fill="none" stroke="black" points="283,-31 283,-52 299,-52 299,-31 283,-31"/>
+<text text-anchor="start" x="286" y="-37.8" font-family="Times,serif" font-size="14.00">1</text>
+<polygon fill="none" stroke="black" points="299,-31 299,-52 314,-52 314,-31 299,-31"/>
+<text text-anchor="start" x="302" y="-37.8" font-family="Times,serif" font-size="14.00">a</text>
+</g>
+<!-- Scope21_1&#45;&gt;Add12 -->
+<g id="edge14" class="edge">
+<title>Scope21_1:Scope21_1_a&#45;&gt;Add12</title>
+<path fill="none" stroke="cornflowerblue" stroke-dasharray="5,2" d="M307,-53C307,-103.54 333.58,-157.68 351.35,-188.24"/>
+<polygon fill="cornflowerblue" stroke="cornflowerblue" points="348.42,-190.15 356.55,-196.94 354.42,-186.56 348.42,-190.15"/>
+</g>
+</g>
+</svg>