summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/data.h
blob: b17ea6d6650b281cd472acf397b15676d01f84d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef PGF_DATA_H
#define PGF_DATA_H

typedef int BindType;

#include "expr.h"
#include "type.h"

struct _String {
  int len;
  unsigned int chars[];
};

struct _CId {
  int len;
  char chars[];
};

typedef struct _CIdList {
  int count;
  CId names[];
} *CIdList;

typedef struct _AbsCat {
  CId name;
  Context hypos;
  CIdList funs;
} *AbsCat;

typedef struct _AbsCats {
  int count;
  struct _AbsCat lst[];
} *AbsCats;

typedef struct _AbsFun {
  CId name;
  Type ty;
  int arrity;
  Equations equs;
} *AbsFun;

typedef struct _AbsFuns {
  int count;
  struct _AbsFun lst[];
} *AbsFuns;

struct _Flag {
  CId name;
  Literal value;
} ;

typedef struct _Flags {
  int count;
  struct _Flag values[];
} *Flags;

typedef struct _Abstract {
  CId name;
  Flags flags;
  AbsFuns funs;
  AbsCats cats;
} *Abstract;

typedef struct _Concrete {
  CId name;
  Flags flags;
} *Concrete;

struct _PGF {
  Flags flags;
  int   nConcr;
  struct _Abstract abstract;
  struct _Concrete concretes[];
};

#endif