diff options
| -rw-r--r-- | examples/Makefile | 1 | ||||
| -rw-r--r-- | examples/cat.ccl | 7 | ||||
| -rw-r--r-- | examples/in/cat | 5 | ||||
| -rw-r--r-- | examples/out/cat | 10 |
4 files changed, 23 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile index ee0946a..ae9337f 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,3 +1,4 @@ +TESTS += cat TESTS += cnt TESTS += fac TESTS += fib diff --git a/examples/cat.ccl b/examples/cat.ccl new file mode 100644 index 0000000..2f4028f --- /dev/null +++ b/examples/cat.ccl @@ -0,0 +1,7 @@ +^=c / create variable for storing input +^- / push -1 (EOF) on the stack +_ ( + >c / input + c?#; / if c is -1 then exit + <c / output +) diff --git a/examples/in/cat b/examples/in/cat new file mode 100644 index 0000000..b1dcb20 --- /dev/null +++ b/examples/in/cat @@ -0,0 +1,5 @@ +this is +the test +let us also take +maybe some +кириллица :3 diff --git a/examples/out/cat b/examples/out/cat new file mode 100644 index 0000000..bf661e9 --- /dev/null +++ b/examples/out/cat @@ -0,0 +1,10 @@ +this is +the test +let us also take +maybe some +кириллица :3 +Globals: + c=-1 +Functions: +Stack: + -1 |