From 6b96ddc43ce994ef402a19b106c283e571d45219 Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Fri, 24 Jan 2014 13:23:21 +0100 Subject: [PATCH] samples renamed to more logical names --- samples/{sample1.mj => eratos.mj} | 0 samples/{sample-ext.mj => pos-neg.mj} | 0 samples/sample.mj | 30 ------------ samples/sample0-h1.wsl | 41 ---------------- samples/sample0.wsl | 68 -------------------------- samples/{sample0.mj => while-print.mj} | 0 6 files changed, 139 deletions(-) rename samples/{sample1.mj => eratos.mj} (100%) rename samples/{sample-ext.mj => pos-neg.mj} (100%) delete mode 100644 samples/sample.mj delete mode 100644 samples/sample0-h1.wsl delete mode 100644 samples/sample0.wsl rename samples/{sample0.mj => while-print.mj} (100%) diff --git a/samples/sample1.mj b/samples/eratos.mj similarity index 100% rename from samples/sample1.mj rename to samples/eratos.mj diff --git a/samples/sample-ext.mj b/samples/pos-neg.mj similarity index 100% rename from samples/sample-ext.mj rename to samples/pos-neg.mj diff --git a/samples/sample.mj b/samples/sample.mj deleted file mode 100644 index 8442ca8..0000000 --- a/samples/sample.mj +++ /dev/null @@ -1,30 +0,0 @@ -program P - final int size = 10; - class Table { - int[] pos; - int[] neg; - } - Table val; -{ - void main() - int x, i; - { //---------- Initialize val - val = new Table; - val.pos = new int[size]; val.neg = new int[size]; - i = 0; - while (i < size) { - val.pos[i] = 0; val.neg[i] = 0; - i++; - } - //---------- Read values - read(x); - while (x != 0) { - if (0 <= x && x < size) { - val.pos[x]++; - } else if (-size < x && x < 0) { - val.neg[-x]++; - } - read(x); - } - } -} diff --git a/samples/sample0-h1.wsl b/samples/sample0-h1.wsl deleted file mode 100644 index 905cb16..0000000 --- a/samples/sample0-h1.wsl +++ /dev/null @@ -1,41 +0,0 @@ -C:" This file automatically converted from microjava bytecode"; -C:" with mjc2wsl v 0.1"; -VAR < tempa := 0, tempb := 0, tempres :=0, -loc0 := 0, loc1 := 0, loc2 := 0, loc3 := 0, - estack := < >, t_e_m_p := 0 > : - ACTIONS A_S_start: - A_S_start == - -C:" enter not fully procesed yet"; -estack := <0 > ++ estack; -loc0 := HEAD(estack); estack := TAIL(estack); -CALL a19 END -a19 == -estack := ++ estack; -estack := <5 > ++ estack; -tempa := HEAD(estack); estack := TAIL(estack); -tempb := HEAD(estack); estack := TAIL(estack); -C:" IF CALL 13"; -IF tempb >= tempa THEN CALL a34 FI; -estack := ++ estack; -estack := <0 > ++ estack; -tempa := HEAD(estack); estack := TAIL(estack); -tempa := HEAD(estack); estack := TAIL(estack); -PRINT(tempa); -estack := ++ estack; -estack := <1 > ++ estack; -tempa := HEAD(estack); estack := TAIL(estack); -tempb := HEAD(estack); estack := TAIL(estack); -tempres := tempb + tempa; -estack := ++ estack; -loc0 := HEAD(estack); estack := TAIL(estack); -C:" CALL -12"; -CALL a19 END -a34 == -C:" exit not fully procesed yet"; -C:" return not fully procesed yet"; -CALL Z -END -ENDACTIONS; -SKIP -ENDVAR diff --git a/samples/sample0.wsl b/samples/sample0.wsl deleted file mode 100644 index 7fcb024..0000000 --- a/samples/sample0.wsl +++ /dev/null @@ -1,68 +0,0 @@ -C:" This file automatically converted from microjava bytecode"; -C:" with mjc2wsl v 0.1.2"; -VAR < tempa := 0, tempb := 0, tempres :=0, -loc0 := 0, loc1 := 0, loc2 := 0, loc3 := 0, - estack := < >, t_e_m_p := 0 > : -SKIP; - ACTIONS A_S_start: - A_S_start == CALL a14 END -a14 == -C:" enter not fully procesed yet"; -CALL a17 END -a17 == -estack := <0 > ++ estack; -CALL a18 END -a18 == -loc0 := HEAD(estack); estack := TAIL(estack); -CALL a19 END -a19 == -estack := ++ estack; -CALL a20 END -a20 == -estack := <5 > ++ estack; -CALL a21 END -a21 == -tempa := HEAD(estack); estack := TAIL(estack); -tempb := HEAD(estack); estack := TAIL(estack); -IF tempb >= tempa THEN CALL a34 FI; -CALL a24 END -a24 == -estack := ++ estack; -CALL a25 END -a25 == -estack := <0 > ++ estack; -CALL a26 END -a26 == -tempa := HEAD(estack); estack := TAIL(estack); -tempb := HEAD(estack); estack := TAIL(estack); -PRINT(tempb); -CALL a27 END -a27 == -estack := ++ estack; -CALL a28 END -a28 == -estack := <1 > ++ estack; -CALL a29 END -a29 == -tempa := HEAD(estack); estack := TAIL(estack); -tempb := HEAD(estack); estack := TAIL(estack); -tempres := tempb + tempa; -estack := ++ estack; -CALL a30 END -a30 == -loc0 := HEAD(estack); estack := TAIL(estack); -CALL a31 END -a31 == -CALL a19; -CALL a34 END -a34 == -C:" exit not fully procesed yet"; -CALL a35 END -a35 == -C:" return not fully procesed yet"; -CALL Z; -SKIP END -ENDACTIONS; - -SKIP -ENDVAR diff --git a/samples/sample0.mj b/samples/while-print.mj similarity index 100% rename from samples/sample0.mj rename to samples/while-print.mj -- 2.25.1