X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=test.c;h=960bef8ce45254f4e7c788f012ec2e5fd7623c62;hb=3376c57aa304940b405940c6463df71c7c1c7f01;hp=0837de4ef28f6ba05ca3dbe8f4c191e95fd0caa5;hpb=390a7e053165954865bc013a7c7057982c206453;p=dsw-obn.git diff --git a/test.c b/test.c index 0837de4..960bef8 100644 --- a/test.c +++ b/test.c @@ -1,16 +1,22 @@ #include "oberon.h" +#include "generator.h" #include static const char source[] = "MODULE Test;" + "TYPE" + " MyArr = ARRAY 3 OF INTEGER;" + " MyArrPtr = POINTER TO MyArr;" + " MyRec = POINTER TO MyRecDesc;" + " MyRecDesc = RECORD next : POINTER TO MyRecDesc END;" + "" "VAR" - " k : INTEGER;" - " i : INTEGER;" - " b : BOOLEAN;" + " a : MyArr;" + " b : MyArrPtr;" + " c : MyRec;" + " d : MyRecDesc;" + "" "BEGIN" - " k := -10 + 1;" - " i := k;" - " b := ~TRUE OR FALSE;" "END Test." ; @@ -22,6 +28,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; }