DEADSOFTWARE

Что-то там тестировалось с массивами...
[dsw-obn.git] / test.c
1 #include "oberon.h"
2 #include "generator.h"
3 #include <assert.h>
5 static const char source[] =
6 "MODULE Test;"
7 "TYPE"
8 " Int = INTEGER;"
9 " PArray2D = POINTER TO Array2D;"
10 " Array2D = ARRAY 3 OF ARRAY 3 OF INTEGER;"
11 " PAP2D = ARRAY 4 OF POINTER TO ARRAY 5 OF INTEGER;"
12 " Object = POINTER TO ObjectDesc;"
13 " ObjectDesc = RECORD"
14 " value : Array2D;"
15 " value2 : PArray2D;"
16 " doStuff : Proc;"
17 " next : Object;"
18 " END;"
19 " Proc = PROCEDURE(self : Object; i : Int);"
20 "VAR"
21 " i : Int;"
22 " a2 : Array2D;"
23 " p2 : PArray2D;"
24 " po : Object;"
25 " do : ObjectDesc;"
26 " stuffProc : Proc;"
27 " pap2 : PAP2D;"
28 " "
29 "BEGIN;"
30 "END Test."
31 ;
33 static oberon_context_t * ctx;
34 static oberon_module_t * mod;
36 int
37 main(int argc, char ** argv)
38 {
39 ctx = oberon_create_context();
40 mod = oberon_compile_module(ctx, source);
41 //mod -> begin();
42 oberon_generator_dump(ctx, "dump.txt");
43 oberon_destroy_context(ctx);
44 return 0;
45 }