-
Notifications
You must be signed in to change notification settings - Fork 4
/
scopeDef.h
98 lines (64 loc) · 1.46 KB
/
scopeDef.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
Batch no. 82
AUTHORS :
Pranjal Gupta (2013B4A7470P)
Tanaya Jha (2013B3A7304P)
*/
#ifndef RESET
#define RESET "\033[0m"
#endif
#ifndef BOLDBLACK
#define BOLDBLACK "\033[1m\033[30m" /* Bold Black */
#endif
#ifndef BOLDRED
#define BOLDRED "\033[1m\033[31m" /* Bold Red */
#endif
#ifndef BOLDGREEN
#define BOLDGREEN "\033[1m\033[32m" /* Bold Green */
#endif
#ifndef BOLDYELLOW
#define BOLDYELLOW "\033[1m\033[33m" /* Bold Yellow */
#endif
#ifndef BOLDBLUE
#define BOLDBLUE "\033[1m\033[34m" /* Bold Blue */
#endif
#ifndef BOLDMAGENTA
#define BOLDMAGENTA "\033[1m\033[35m" /* Bold Magenta */
#endif
#ifndef BOLDCYAN
#define BOLDCYAN "\033[1m\033[36m" /* Bold Cyan */
#endif
#ifndef BOLDWHITE
#define BOLDWHITE "\033[1m\033[37m" /* Bold White */
#endif
#ifndef _scopeStruct
#define _scopeStruct
typedef struct se symbolEntry;
typedef struct sy symbolScope;
struct se {
char identifier[25];
// 1 : variable , 2 : function only def , 3 : input parameter , 4 : output , 5 : function only dec, 6 : function def & dec
int usage;
char type[25];
int isArray;
int startInd;
int endInd;
int lineInit;
int linesUsed[25];
int linesUsedNum;
symbolScope * scope;
symbolEntry * next;
char temporary[5];
int offset;
int width;
};
struct sy {
char stamp[25];
symbolScope * parent;
symbolScope * childL;
symbolScope * childR;
symbolScope * next;
symbolScope * prev;
symbolEntry * seHead;
};
#endif