summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2014-04-29 20:55:45 +1000
committerJed Barber <jjbarber@y7mail.com>2014-04-29 20:55:45 +1000
commit31f0b61e67079a048f30d316efbd937a8b0fbdd3 (patch)
tree8c63b87c5fcf55703c21e6b70c9d94cced84fd25 /src
parentf67e758cf871bed55ec2438f4436da919c726a01 (diff)
Example grasp program: cat
Diffstat (limited to 'src')
-rw-r--r--src/Grasp/cat.grasp29
1 files changed, 29 insertions, 0 deletions
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