-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtoken.h
56 lines (48 loc) · 811 Bytes
/
token.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
#ifndef COMPILER_LAB_TOKEN_H
#define COMPILER_LAB_TOKEN_H
enum yytokentype {
num_INT = 258,
num_FLOAT = 259,
Y_ID = 260,
Y_INT = 261,
Y_VOID = 262,
Y_CONST = 263,
Y_IF = 264,
Y_ELSE = 265,
Y_WHILE = 266,
Y_BREAK = 267,
Y_CONTINUE = 268,
Y_RETURN = 269,
Y_ADD = 270,
Y_SUB = 271,
Y_MUL = 272,
Y_DIV = 273,
Y_MODULO = 274,
Y_LESS = 275,
Y_LESSEQ = 276,
Y_GREAT = 277,
Y_GREATEQ = 278,
Y_NOTEQ = 279,
Y_EQ = 280,
Y_NOT = 281,
Y_AND = 282,
Y_OR = 283,
Y_ASSIGN = 284,
Y_LPAR = 285,
Y_RPAR = 286,
Y_LBRACKET = 287,
Y_RBRACKET = 288,
Y_LSQUARE = 289,
Y_RSQUARE = 290,
Y_COMMA = 291,
Y_SEMICOLON = 292,
Y_FLOAT = 293
};
typedef union _YYLVAL{
int token;
int int_value;
float float_value;
char* id_name;
}_YYLVAL;
extern _YYLVAL yylval;
#endif //COMPILER_LAB_TOKEN_H