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 " Matrix = ARRAY 3, 4 OF INTEGER;"
9 "VAR"
10 " m : Matrix;"
11 "BEGIN;"
12 " m[2, 3] := 0;"
13 "END Test."
14 ;
16 static oberon_context_t * ctx;
17 static oberon_module_t * mod;
19 int
20 main(int argc, char ** argv)
21 {
22 ctx = oberon_create_context();
23 mod = oberon_compile_module(ctx, source);
24 //mod -> begin();
25 oberon_generator_dump(ctx, "dump.txt");
26 oberon_destroy_context(ctx);
27 return 0;
28 }