X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=test.c;h=432307f51ba6e983b25400f43e593e2e8e555fdf;hb=7bff9378302d5e23c6e9eabe7e6edc8034dcd562;hp=da6a8041e833c307ff423b8411513067390e8c53;hpb=90ad7d921e60c24b11bc08cd173c0e1c80f9b06d;p=dsw-obn.git diff --git a/test.c b/test.c index da6a804..432307f 100644 --- a/test.c +++ b/test.c @@ -1,23 +1,32 @@ #include "oberon.h" +#include "generator.h" #include static const char source[] = "MODULE Test;" + "TYPE" + " Int = INTEGER;" + " PArray2D = POINTER TO Array2D;" + " Array2D = ARRAY 3 OF ARRAY 3 OF INTEGER;" + " PAP2D = ARRAY 4 OF POINTER TO ARRAY 5 OF INTEGER;" + " Object = POINTER TO ObjectDesc;" + " ObjectDesc = RECORD" + " value : Array2D;" + " value2 : PArray2D;" + " doStuff : Proc;" + " next : Object;" + " END;" + " Proc = PROCEDURE(self : Object; i : Int);" "VAR" - " k : INTEGER;" - " i : INTEGER;" - " b : BOOLEAN;" - "" - "PROCEDURE Tier;" - "BEGIN" - " k := 314;" - "END Tier;" - "" - "BEGIN" - " k := 1;" - " i := k;" - " b := TRUE;" - " Tier;" + " i : Int;" + " a2 : Array2D;" + " p2 : PArray2D;" + " po : Object;" + " do : ObjectDesc;" + " stuffProc : Proc;" + " pap2 : PAP2D;" + " " + "BEGIN;" "END Test." ; @@ -30,6 +39,7 @@ main(int argc, char ** argv) ctx = oberon_create_context(); mod = oberon_compile_module(ctx, source); //mod -> begin(); + oberon_generator_dump(ctx, "dump.txt"); oberon_destroy_context(ctx); return 0; }