#include "oberon.h" #include static oberon_type_t integer = { "INTEGER", OBERON_TYPE_INTEGER, sizeof(int) }; static oberon_type_t boolean = { "BOOLEAN", OBERON_TYPE_BOOLEAN, sizeof(int) }; static const char source[] = "MODULE Test;" "VAR" " k : INTEGER;" " i : INTEGER;" " b : BOOLEAN;" "BEGIN" " k := 10;" " i := k;" " b := TRUE;" "END Test." ; static oberon_context_t * ctx; static oberon_module_t * mod; int main(int argc, char ** argv) { ctx = oberon_create_context(); oberon_register_global_type(ctx, &integer); oberon_register_global_type(ctx, &boolean); mod = oberon_compile_module(ctx, source); oberon_destroy_context(ctx); return 0; }