From 31f0b61e67079a048f30d316efbd937a8b0fbdd3 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 29 Apr 2014 20:55:45 +1000 Subject: Example grasp program: cat --- src/Grasp/cat.grasp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/Grasp/cat.grasp (limited to 'src') diff --git a/src/Grasp/cat.grasp b/src/Grasp/cat.grasp new file mode 100644 index 0000000..f629ac1 --- /dev/null +++ b/src/Grasp/cat.grasp @@ -0,0 +1,29 @@ +digraph { + 1 [label="getc"]; + 2 [label="grasp:main"]; + 3 [label="c"]; + 4 [label="add"]; + 5 [label="1"]; + 6 [label="c+1"]; + 7 [label="del"]; + 8 [label="next"]; + 9 [label="new"]; + 10 [label="putc"]; + + 1 -> 2 [label="name"]; + 1 -> 3 [label="out"]; + 1 -> 4 [label="next"]; + 4 -> 5 [label="arg"]; + 4 -> 3 [label="arg"]; + 4 -> 6 [label="out"]; + 4 -> 7 [label="next"]; + 7 -> 8 [label="label"]; + 7 -> 9 [label="next"]; + 7 -> 9 [label="tail"]; + 9 -> 6 [label="cond"]; + 9 -> 9 [label="tail"]; + 9 -> 8 [label="label"]; + 9 -> 10 [label="head"]; + 10 -> 3 [label="in"]; + 10 -> 1 [label="next"]; +} \ No newline at end of file -- cgit