-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypeExtractorDef.h
49 lines (40 loc) · 939 Bytes
/
typeExtractorDef.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
/*
* Group no. 50
* Aniruddha Mahajan -------- 2017A7PS0145P
* Ravindra Singh Shekhawat - 2017A7PS0146P
* Shreyas Srikrishna ------- 2017A7PS0162P
* Chetan Sharma ------------ 2017A7PS0182P
*/
#ifndef typeExtractorDef
#define typeExtractorDef
typedef enum PrimitiveType{
integer,
real,
boolean,
}PrimitiveType;
typedef struct ArrayType{
PrimitiveType t;
int low;
int high;
char left[21];
char right[21];
}ArrayType;
typedef union VariableType{
PrimitiveType primitiveType;
ArrayType arrayType;
}VariableType;
typedef enum VariableTypeTag{
primitive,
array
}VariableTypeTag;
typedef struct Typeof{
VariableType type;
VariableTypeTag tag;
}Typeof;
typedef struct FunctionType{
Typeof* inputList; //array of types of input parameters
Typeof* outputList; //array of types of output parameters
int noOfInputs;
int noOfOutputs;
}FunctionType;
#endif