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 " MyArr = ARRAY 3 OF INTEGER;"
9 " MyArrPtr = POINTER TO MyArr;"
10 " MyRec = POINTER TO MyRecDesc;"
11 " MyRecDesc = RECORD next : POINTER TO MyRecDesc END;"
12 ""
13 "VAR"
14 " a : MyArr;"
15 " b : MyArrPtr;"
16 " c : MyRec;"
17 " d : MyRecDesc;"
18 ""
19 "BEGIN"
20 "END Test."
21 ;
23 static oberon_context_t * ctx;
24 static oberon_module_t * mod;
26 int
27 main(int argc, char ** argv)
28 {
29 ctx = oberon_create_context();
30 mod = oberon_compile_module(ctx, source);
31 //mod -> begin();
32 oberon_generator_dump(ctx, "dump.txt");
33 oberon_destroy_context(ctx);
34 return 0;
35 }