-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypetable.h
37 lines (31 loc) · 1.22 KB
/
typetable.h
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
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
//For Type Table
struct typeTable{
char *name; //type name
int size;
struct Fieldlist *fields; //pointer to the head of fields list
struct typeTable *next; // pointer to the next type table entry
};
//For Field List in Type Table
struct Fieldlist{
char *name; //name of the field
struct typeTable *type; //pointer to type table entry of the field's type
struct Fieldlist *next; //pointer to the next field
};
//Type Table Global Variables//
struct typeTable * typeTableHead;
struct typeTable * typeTableTail;
//Type Table Functions//
void createTypeTableHead(char * type,int size);
void addNewTypeTableEntry(char * type,int size);
void makeBasicTypeTable();
struct typeTable * newTypeTuple();
int getDataTypeSize(char *dataType);
//struct typeTable * getTypeTuple(char * name);
struct typeTable * getTypeTuple(char * dataType);
struct typeTable * installType(char * name,struct Fieldlist * fields);
int getAttributeBinding(char * name,struct typeTable * type);
struct Fieldlist * installFieldList(char * name,struct typeTable * typeTuple);