summaryrefslogtreecommitdiffstats
path: root/figs
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2017-01-12 23:29:46 +0100
committerDavid A. Madore <david+git@madore.org>2017-01-12 23:29:46 +0100
commit8133bc2845d446d850a28eba6df8098a1da4e921 (patch)
treee8c6bb1d2c087a6d64dfa27222dadc995ccaecc4 /figs
parent92d71034af1cf33a9237e8687e20b89ca0d35821 (diff)
downloadinf105-8133bc2845d446d850a28eba6df8098a1da4e921.tar.gz
inf105-8133bc2845d446d850a28eba6df8098a1da4e921.tar.bz2
inf105-8133bc2845d446d850a28eba6df8098a1da4e921.zip
Continue writing about the dangling else ambiguity.
Diffstat (limited to 'figs')
-rw-r--r--figs/ex2p1a.dot36
-rw-r--r--figs/ex2p1b.dot36
2 files changed, 72 insertions, 0 deletions
diff --git a/figs/ex2p1a.dot b/figs/ex2p1a.dot
new file mode 100644
index 0000000..fbf84b0
--- /dev/null
+++ b/figs/ex2p1a.dot
@@ -0,0 +1,36 @@
+graph ex2p1a {
+ node [texmode="math",shape="none"];
+ I0 [label="I"];
+ C0 [label="C"];
+ if0 [label="if",texlbl="$\mathtt{if}$"];
+ E0 [label="E"];
+ then0 [label="then",texlbl="$\mathtt{then}$"];
+ I1 [label="I"];
+ happy [label="happy",texlbl="$\mathtt{happy}$"];
+ C1 [label="C"];
+ if1 [label="if",texlbl="$\mathtt{if}$"];
+ E1 [label="E"];
+ then1 [label="then",texlbl="$\mathtt{then}$"];
+ I2 [label="I"];
+ else1 [label="else",texlbl="$\mathtt{else}$"];
+ I3 [label="I"];
+ trippy [label="trippy",texlbl="$\mathtt{trippy}$"];
+ foo [label="foo",texlbl="$\mathtt{foo}$"];
+ bar [label="bar",texlbl="$\mathtt{bar}$"];
+ I0 -- C0;
+ C0 -- if0;
+ C0 -- E0;
+ C0 -- then0;
+ C0 -- I1;
+ E0 -- happy;
+ I1 -- C1;
+ C1 -- if1;
+ C1 -- E1;
+ C1 -- then1;
+ C1 -- I2;
+ C1 -- else1;
+ C1 -- I3;
+ E1 -- trippy;
+ I2 -- foo;
+ I3 -- bar;
+}
diff --git a/figs/ex2p1b.dot b/figs/ex2p1b.dot
new file mode 100644
index 0000000..79ad50c
--- /dev/null
+++ b/figs/ex2p1b.dot
@@ -0,0 +1,36 @@
+graph ex2p1b {
+ node [texmode="math",shape="none"];
+ I0 [label="I"];
+ C0 [label="C"];
+ if0 [label="if",texlbl="$\mathtt{if}$"];
+ E0 [label="E"];
+ then0 [label="then",texlbl="$\mathtt{then}$"];
+ I1 [label="I"];
+ else0 [label="else",texlbl="$\mathtt{else}$"];
+ I4 [label="I"];
+ happy [label="happy",texlbl="$\mathtt{happy}$"];
+ C1 [label="C"];
+ if1 [label="if",texlbl="$\mathtt{if}$"];
+ E1 [label="E"];
+ then1 [label="then",texlbl="$\mathtt{then}$"];
+ I2 [label="I"];
+ bar [label="bar",texlbl="$\mathtt{bar}$"];
+ trippy [label="trippy",texlbl="$\mathtt{trippy}$"];
+ foo [label="foo",texlbl="$\mathtt{foo}$"];
+ I0 -- C0;
+ C0 -- if0;
+ C0 -- E0;
+ C0 -- then0;
+ C0 -- I1;
+ C0 -- else0;
+ C0 -- I4;
+ E0 -- happy;
+ I1 -- C1;
+ I4 -- bar;
+ C1 -- if1;
+ C1 -- E1;
+ C1 -- then1;
+ C1 -- I2;
+ E1 -- trippy;
+ I2 -- foo;
+}