diff options
Diffstat (limited to 'src/Grasp/Examples')
-rw-r--r-- | src/Grasp/Examples/add.grasp | 14 | ||||
-rw-r--r-- | src/Grasp/Examples/add_empty.grasp | 8 | ||||
-rw-r--r-- | src/Grasp/Examples/cat.grasp | 29 | ||||
-rw-r--r-- | src/Grasp/Examples/del.grasp | 7 | ||||
-rw-r--r-- | src/Grasp/Examples/div.grasp | 16 | ||||
-rw-r--r-- | src/Grasp/Examples/div_empty.grasp | 10 | ||||
-rw-r--r-- | src/Grasp/Examples/getc_stdin.grasp | 10 | ||||
-rw-r--r-- | src/Grasp/Examples/mod.grasp | 14 | ||||
-rw-r--r-- | src/Grasp/Examples/mul.grasp | 16 | ||||
-rw-r--r-- | src/Grasp/Examples/mul_empty.grasp | 8 | ||||
-rw-r--r-- | src/Grasp/Examples/new.grasp | 10 | ||||
-rw-r--r-- | src/Grasp/Examples/new_next.grasp | 11 | ||||
-rw-r--r-- | src/Grasp/Examples/putc_stdout.grasp | 8 | ||||
-rw-r--r-- | src/Grasp/Examples/putc_stdout_multi.grasp | 12 | ||||
-rw-r--r-- | src/Grasp/Examples/ret_empty.grasp | 6 | ||||
-rw-r--r-- | src/Grasp/Examples/set.grasp | 12 | ||||
-rw-r--r-- | src/Grasp/Examples/set_empty.grasp | 6 | ||||
-rw-r--r-- | src/Grasp/Examples/set_multi.grasp | 12 | ||||
-rw-r--r-- | src/Grasp/Examples/sub.grasp | 16 | ||||
-rw-r--r-- | src/Grasp/Examples/sub_empty.grasp | 10 |
20 files changed, 235 insertions, 0 deletions
diff --git a/src/Grasp/Examples/add.grasp b/src/Grasp/Examples/add.grasp new file mode 100644 index 0000000..a480768 --- /dev/null +++ b/src/Grasp/Examples/add.grasp @@ -0,0 +1,14 @@ +digraph { + 1 [label="add"] + 2 [label="grasp:main"] + 3 [label="1"] + 4 [label="2.3"] + 5 [label="out1"] + 6 [label="out2"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="arg"] + 1 -> 4 [label="arg"] + 1 -> 5 [label="out"] + 1 -> 6 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/add_empty.grasp b/src/Grasp/Examples/add_empty.grasp new file mode 100644 index 0000000..ec624ef --- /dev/null +++ b/src/Grasp/Examples/add_empty.grasp @@ -0,0 +1,8 @@ +digraph { + 1 [label="add"] + 2 [label="grasp:main"] + 3 [label="out"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/cat.grasp b/src/Grasp/Examples/cat.grasp new file mode 100644 index 0000000..f629ac1 --- /dev/null +++ b/src/Grasp/Examples/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 diff --git a/src/Grasp/Examples/del.grasp b/src/Grasp/Examples/del.grasp new file mode 100644 index 0000000..b57e146 --- /dev/null +++ b/src/Grasp/Examples/del.grasp @@ -0,0 +1,7 @@ +digraph { + 1 [label="del"] + 2 [label="grasp:main"] + + 1 -> 2 [label="name"] + 1 -> 1 [label="tail"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/div.grasp b/src/Grasp/Examples/div.grasp new file mode 100644 index 0000000..a8633e0 --- /dev/null +++ b/src/Grasp/Examples/div.grasp @@ -0,0 +1,16 @@ +digraph { + 1 [label="div"] + 2 [label="grasp:main"] + 3 [label="15"] + 4 [label="2"] + 5 [label="3"] + 6 [label="out1"] + 7 [label="out2"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="left"] + 1 -> 4 [label="right"] + 1 -> 5 [label="right"] + 1 -> 6 [label="out"] + 1 -> 7 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/div_empty.grasp b/src/Grasp/Examples/div_empty.grasp new file mode 100644 index 0000000..a00d983 --- /dev/null +++ b/src/Grasp/Examples/div_empty.grasp @@ -0,0 +1,10 @@ +digraph { + 1 [label="div"] + 2 [label="grasp:main"] + 3 [label="15"] + 4 [label="out"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="left"] + 1 -> 4 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/getc_stdin.grasp b/src/Grasp/Examples/getc_stdin.grasp new file mode 100644 index 0000000..2e50326 --- /dev/null +++ b/src/Grasp/Examples/getc_stdin.grasp @@ -0,0 +1,10 @@ +digraph { + 1 [label="getc"] + 2 [label="grasp:main"] + 3 [label="out1"] + 4 [label="out2"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="out"] + 1 -> 4 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/mod.grasp b/src/Grasp/Examples/mod.grasp new file mode 100644 index 0000000..c48c9ba --- /dev/null +++ b/src/Grasp/Examples/mod.grasp @@ -0,0 +1,14 @@ +digraph { + 1 [label="mod"] + 2 [label="grasp:main"] + 3 [label="10"] + 4 [label="4"] + 5 [label="out1"] + 6 [label="out2"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="left"] + 1 -> 4 [label="right"] + 1 -> 5 [label="out"] + 1 -> 6 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/mul.grasp b/src/Grasp/Examples/mul.grasp new file mode 100644 index 0000000..ad2baef --- /dev/null +++ b/src/Grasp/Examples/mul.grasp @@ -0,0 +1,16 @@ +digraph { + 1 [label="mul"] + 2 [label="grasp:main"] + 3 [label="2"] + 4 [label="5.3"] + 5 [label="3"] + 6 [label="out1"] + 7 [label="out2"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="arg"] + 1 -> 4 [label="arg"] + 1 -> 5 [label="arg"] + 1 -> 6 [label="out"] + 1 -> 7 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/mul_empty.grasp b/src/Grasp/Examples/mul_empty.grasp new file mode 100644 index 0000000..cbb06bc --- /dev/null +++ b/src/Grasp/Examples/mul_empty.grasp @@ -0,0 +1,8 @@ +digraph { + 1 [label="mul"] + 2 [label="grasp:main"] + 3 [label="out"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/new.grasp b/src/Grasp/Examples/new.grasp new file mode 100644 index 0000000..959e5c8 --- /dev/null +++ b/src/Grasp/Examples/new.grasp @@ -0,0 +1,10 @@ +digraph { + 1 [label="new"] + 2 [label="grasp:main"] + 3 [label="test"] + + 1 -> 2 [label="name"] + 1 -> 1 [label="tail"] + 1 -> 1 [label="head"] + 1 -> 3 [label="label"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/new_next.grasp b/src/Grasp/Examples/new_next.grasp new file mode 100644 index 0000000..9d5a442 --- /dev/null +++ b/src/Grasp/Examples/new_next.grasp @@ -0,0 +1,11 @@ +digraph { + 1 [label="new"] + 2 [label="grasp:main"] + 3 [label="next"] + 4 [label="set"] + + 1 -> 2 [label="name"] + 1 -> 1 [label="tail"] + 1 -> 4 [label="head"] + 1 -> 3 [label="label"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/putc_stdout.grasp b/src/Grasp/Examples/putc_stdout.grasp new file mode 100644 index 0000000..14c7d92 --- /dev/null +++ b/src/Grasp/Examples/putc_stdout.grasp @@ -0,0 +1,8 @@ +digraph { + 1 [label="putc"] + 2 [label="grasp:main"] + 3 [label="100"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="in"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/putc_stdout_multi.grasp b/src/Grasp/Examples/putc_stdout_multi.grasp new file mode 100644 index 0000000..0ddc692 --- /dev/null +++ b/src/Grasp/Examples/putc_stdout_multi.grasp @@ -0,0 +1,12 @@ +digraph { + 1 [label="putc"] + 2 [label="grasp:main"] + 3 [label="100"] + 4 [label="101"] + 5 [label="102"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="in"] + 1 -> 4 [label="in"] + 1 -> 5 [label="in"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/ret_empty.grasp b/src/Grasp/Examples/ret_empty.grasp new file mode 100644 index 0000000..4a85da6 --- /dev/null +++ b/src/Grasp/Examples/ret_empty.grasp @@ -0,0 +1,6 @@ +digraph { + 1 [label="ret"]; + 2 [label="grasp:main"]; + + 1 -> 2 [label="name"]; +}
\ No newline at end of file diff --git a/src/Grasp/Examples/set.grasp b/src/Grasp/Examples/set.grasp new file mode 100644 index 0000000..7d3ee98 --- /dev/null +++ b/src/Grasp/Examples/set.grasp @@ -0,0 +1,12 @@ +digraph { + 1 [label="set"] + 2 [label="grasp:main"] + 3 [label="abc"] + 4 [label="out1"] + 5 [label="out2"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="in"] + 1 -> 4 [label="out"] + 1 -> 5 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/set_empty.grasp b/src/Grasp/Examples/set_empty.grasp new file mode 100644 index 0000000..94be1c8 --- /dev/null +++ b/src/Grasp/Examples/set_empty.grasp @@ -0,0 +1,6 @@ +digraph { + 1 [label="set"] + 2 [label="grasp:main"] + + 1 -> 2 [label="name"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/set_multi.grasp b/src/Grasp/Examples/set_multi.grasp new file mode 100644 index 0000000..a2a8acb --- /dev/null +++ b/src/Grasp/Examples/set_multi.grasp @@ -0,0 +1,12 @@ +digraph { + 1 [label="set"] + 2 [label="grasp:main"] + 3 [label="abc"] + 4 [label="def"] + 5 [label="out"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="in"] + 1 -> 4 [label="in"] + 1 -> 5 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/sub.grasp b/src/Grasp/Examples/sub.grasp new file mode 100644 index 0000000..9d379ec --- /dev/null +++ b/src/Grasp/Examples/sub.grasp @@ -0,0 +1,16 @@ +digraph { + 1 [label="sub"] + 2 [label="grasp:main"] + 3 [label="10"] + 4 [label="2"] + 5 [label="2.1"] + 6 [label="out1"] + 7 [label="out2"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="left"] + 1 -> 4 [label="right"] + 1 -> 5 [label="right"] + 1 -> 6 [label="out"] + 1 -> 7 [label="out"] +}
\ No newline at end of file diff --git a/src/Grasp/Examples/sub_empty.grasp b/src/Grasp/Examples/sub_empty.grasp new file mode 100644 index 0000000..74ad7f0 --- /dev/null +++ b/src/Grasp/Examples/sub_empty.grasp @@ -0,0 +1,10 @@ +digraph { + 1 [label="sub"] + 2 [label="grasp:main"] + 3 [label="10"] + 4 [label="out"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="left"] + 1 -> 4 [label="out"] +}
\ No newline at end of file |