From 8133bc2845d446d850a28eba6df8098a1da4e921 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Thu, 12 Jan 2017 23:29:46 +0100 Subject: Continue writing about the dangling else ambiguity. --- figs/ex2p1a.dot | 36 ++++++++++++++++++++++++++++++++++++ figs/ex2p1b.dot | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 figs/ex2p1a.dot create mode 100644 figs/ex2p1b.dot (limited to 'figs') 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; +} -- cgit v1.2.3