/
print.h
91 lines (84 loc) · 1.15 KB
/
print.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
#ifndef _PRINT_H
#define _PRINT_H
char* nodeText[] = {
"DEFAULT",
"IDENT",
"SCALAR",
"STORAGE",
"POINTER",
"ARRAY",
"FUNCTION",
"NUMBER",
"BINARY OP",
"UNARY OP",
"ASSIGN",
"IF",
"IF-ELSE",
"FOR",
"WHILE",
"FUNCTION CALL",
"JUMP",
"LIST ITEM",
"STRING"
};
char* scalarText[] = {
"void",
"float", "double", "long double",
"signed", "unsigned",
"char", "short", "int", "long", "long long",0,
"unsigned char",0, "unsigned short",0, "unsigned int",0, "unsigned long",0, "unsigned long long"
};
char* binopText[] = {
"MULT_OP",
"DIV_OP",
"MOD_OP",
"PLUS_OP",
"MINUS_OP",
"SHL_OP",
"SHR_OP",
"LT_OP",
"GT_OP",
"LTEQ_OP",
"GTEQ_OP",
"EQEQ_OP",
"NOTEQ_OP",
"AND_OP",
"XOR_OP",
"IOR_OP",
"LOGOR_OP",
"LOGAND_OP"
};
char* unopText[] = {
"PREINC_OP",
"POSTINC_OP",
"PREDEC_OP",
"POSTDEC_OP",
"ADDR_OP",
"DEREF_OP",
"POS_OP",
"NEG_OP",
"NOT_OP",
"LOGNOT_OP",
"SIZEOF_OP"
};
char* assignText[] = {
"EQ_OP",
"TIMESEQ_OP",
"DIVEQ_OP",
"MODEQ_OP",
"PLUSEQ_OP",
"MINUSEQ_OP",
"SHLEQ_OP",
"SHREQ_OP",
"ANDEQ_OP",
"OREQ_OP",
"XOREQ_OP"
};
char* storageText[] = {
"TYPEDEF",
"EXTERN",
"AUTO",
"STATIC",
"REGISTER"
};
#endif