-
Notifications
You must be signed in to change notification settings - Fork 0
/
IntermediateDef.h
59 lines (53 loc) · 1002 Bytes
/
IntermediateDef.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// GROUP 39
// AKANKSHYA MISHRA 2016A7PS0026P
// NARAPAREDDY BHAVANA 2016A7PS0034P
// KARABEE BATTA 2016A7PS0052P
// AASTHA KATARIA 2016A7PS0062P
#ifndef SYM_INCLUDED
#include "SymbolTable.h"
#define SYM_INCLUDED
#endif
typedef int LABEL;
typedef int TEMP;
typedef struct IntermediateDef IntermediateDef;
typedef struct label label;
typedef struct arg{
int flag;
union{
hash_ele* hElem;
TEMP t;
label *L; //TRUE is stored in arg1, FALSE in arg2
int num;
float rnum;
int width;
}u;
}arg;
typedef struct op{
int flag;
union{
TAG tag;
TOKEN tkname;
}u;
}op;
typedef struct{
int flag;
union{
TEMP t; //temporary
LABEL l;
}u;
}result;
typedef struct label{
int flag;
union{
LABEL l;
char *dataDef;
}u;
}label;
typedef struct quadruple{
arg* a1;
arg* a2;
op* operand;
result *res;
label *L;
struct quadruple* next;
}quadruple;