X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Ftest.c;h=53be5869213c0d3ee4a5e3e7fcd30639cf82ea59;hb=2a0d7e7fbb7dcccc65f98301a0627ee47c755f2f;hp=1c3c8e39347533eb9db1d0b2e289f0348f77b693;hpb=9e6d0f74f74926a9c73d15418c2e9668689061f2;p=dsw-obn.git diff --git a/src/test.c b/src/test.c index 1c3c8e3..53be586 100644 --- a/src/test.c +++ b/src/test.c @@ -7,40 +7,31 @@ static char source_test[] = "(* Main module *)" "MODULE Test;" - "IMPORT Out;" - "TYPE Ar = ARRAY OF ARRAY OF INTEGER;" - "VAR a : POINTER TO Ar;" + "VAR" + " x : INTEGER;" + " z : BOOLEAN;" "" - "PROCEDURE Ax(VAR x : POINTER TO Ar);" - "BEGIN" - " x[0, 0] := 777;" - "END Ax;" + "PROCEDURE Tier(a, b :INTEGER);" + "END Tier;" "" "BEGIN;" - " NEW(a, 2, 2);" - " a[0, 0] := 666;" - " Out.Open;" - " Out.Int(a[0, 0], 0);" - " Out.Ln;" - "" - " Ax(a);" -// " Out.Int(a[0, 0], 0);" -// " Out.Ln;" + " x := x + 1;" + " z := TRUE;" "END Test." ; static char source_out[] = "MODULE Out;" - "(* Interface to outer program ;) *)" - "VAR" - " Open- : PROCEDURE;" +// "(* Interface to outer program ;) *)" +// "VAR" +// " Open- : PROCEDURE;" // " Char- : PROCEDURE(ch : CHAR);" // " String- : PROCEDURE(str : ARRAY OF CHAR)" // " Int- : PROCEDURE(i, n : LONGINT);" - " Int- : PROCEDURE(i, n : INTEGER);" - " Real- : PROCEDURE(x : REAL; n : INTEGER);" +// " Int- : PROCEDURE(i, n : INTEGER);" +// " Real- : PROCEDURE(x : REAL; n : INTEGER);" // " LongReal- : PROCEDURE(x : LONGREAL; n : INTEGER);" - " Ln- : PROCEDURE;" +// " Ln- : PROCEDURE;" "END Out." ; @@ -131,11 +122,11 @@ main(int argc, char ** argv) oberon_generate_code(ctx); - init_system_modules(); +// init_system_modules(); - oberon_generator_dump(ctx, "dump.txt"); +// oberon_generator_dump(ctx, "dump.txt"); - start_module(); +// start_module(); oberon_destroy_context(ctx); return 0;