-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlexerDef.h
79 lines (54 loc) · 1.67 KB
/
lexerDef.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
/*
Batch no. 82
AUTHORS :
Pranjal Gupta (2013B4A7470P)
Tanaya Jha (2013B3A7304P)
*/
#ifndef RESET
#define RESET "\033[0m"
#endif
#ifndef BOLDBLACK
// for bold text, black colored
#define BOLDBLACK "\033[1m\033[30m"
#endif
#ifndef BOLDRED
// for bold text, red colored
#define BOLDRED "\033[1m\033[31m"
#endif
#ifndef BOLDGREEN
// for bold text, green colored
#define BOLDGREEN "\033[1m\033[32m"
#endif
#ifndef BOLDYELLOW
// for bold text, yellow colored
#define BOLDYELLOW "\033[1m\033[33m"
#endif
#ifndef BOLDBLUE
// for bold text, blue colored
#define BOLDBLUE "\033[1m\033[34m"
#endif
#ifndef BOLDMAGENTA
// for bold text, magenta colored
#define BOLDMAGENTA "\033[1m\033[35m"
#endif
#ifndef BOLDCYAN
// for bold text, cyan colored
#define BOLDCYAN "\033[1m\033[36m"
#endif
#ifndef BOLDWHITE
// for bold text, white colored
#define BOLDWHITE "\033[1m\033[37m"
#endif
#ifndef _token
#define _token
typedef struct {
int id;
char val[30];
char lxm[25];
int lno;
} token;
#endif
#ifndef _tokenToNumMapping
#define _tokenToNumMapping
static char * ref[] = {/*0*/"DECLARE", "MODULE", "PRINT", "USE", "DRIVER", "PROGRAM", "WITH", "TAKES", "INPUT", "PARAMETERS",/*10*/ "AND", "RETURNS", "OR", "FOR", "INTEGER", "REAL", "BOOLEAN", "ARRAY", "START", "END",/*20*/ "GET_VALUE", "IN", "SWITCH", "TRUE", "FALSE", "CASE", "BREAK", "DEFAULT", "WHILE", "OF",/*30*/ "ID", "NUM", "RNUM", "EMPTY", "PLUS", "MINUS", "MUL", "DIV", "LT", "LE",/*40*/ "GT", "GE", "NE", "EQ", "DEF", "ENDDEF", "COLON", "RANGEOP", "SEMICOL", "COMMA",/*50*/ "ASSIGNOP", "SQBC", "SQBO", "BO", "BC", "COMMENTMARK", "ERROR", "EOF", "DRIVERDEF", "DRIVERENDDEF", "", "", "", ""};
#endif