X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=test.c;h=2c2966752c60839008da78f4ce6eec82f9154e3a;hb=518cba11c21426f922afef90048f5f9c8130fed2;hp=0837de4ef28f6ba05ca3dbe8f4c191e95fd0caa5;hpb=390a7e053165954865bc013a7c7057982c206453;p=dsw-obn.git diff --git a/test.c b/test.c index 0837de4..2c29667 100644 --- a/test.c +++ b/test.c @@ -1,16 +1,21 @@ #include "oberon.h" +#include "generator.h" #include static const char source[] = "MODULE Test;" "VAR" - " k : INTEGER;" " i : INTEGER;" - " b : BOOLEAN;" - "BEGIN" - " k := -10 + 1;" - " i := k;" - " b := ~TRUE OR FALSE;" + " j : INTEGER;" + "" + "PROCEDURE Tier(VAR x : INTEGER);" + "BEGIN;" + " x := i;" + "END Tier;" + "" + "BEGIN;" + " i := 666;" + " Tier(j);" "END Test." ; @@ -22,6 +27,8 @@ 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; }