gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
improved the translator; manual (h1) version of sample0 worked as it should
[mjc2wsl.git] / samples / sample0-h1.wsl
diff --git a/samples/sample0-h1.wsl b/samples/sample0-h1.wsl
new file mode 100644 (file)
index 0000000..905cb16
--- /dev/null
@@ -0,0 +1,41 @@
+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 := <loc0 > ++ 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 := <loc0 > ++ estack;
+estack := <0 > ++ estack;
+tempa := HEAD(estack); estack := TAIL(estack);
+tempa := HEAD(estack); estack := TAIL(estack);
+PRINT(tempa);
+estack := <loc0 > ++ estack;
+estack := <1 > ++ estack;
+tempa := HEAD(estack); estack := TAIL(estack);
+tempb := HEAD(estack); estack := TAIL(estack);
+tempres := tempb + tempa;
+estack := <tempres > ++ 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
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner