From e043ee06a51a8d8c68f8cb0984d4f7bd8915bea8 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 29 May 2012 22:42:25 +1000 Subject: First attempt a range parser - likely not correct. --- impl/systems/range-test | 1 + impl/systems/size-ten | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 impl/systems/range-test (limited to 'impl/systems') diff --git a/impl/systems/range-test b/impl/systems/range-test new file mode 100644 index 0000000..c2ac047 --- /dev/null +++ b/impl/systems/range-test @@ -0,0 +1 @@ +x = max([0, 1], -x + [-1, 1]) diff --git a/impl/systems/size-ten b/impl/systems/size-ten index 71ee74a..9ef3135 100644 --- a/impl/systems/size-ten +++ b/impl/systems/size-ten @@ -1,3 +1,3 @@ -x1 = max(0, min(x1-1, x2)) -x2 = max(0, 5+x1, x1) -x3 = max(0, 1+x3, 0+x1) +x1 = max([0,0], min(x1-[1,1], x2)) +x2 = max([0,0], [5,5]+x1, x1) +x3 = max([0,0], [1,1]+x3, [0,0]+x1) -- cgit v1.2.3