-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathy.tab.h
More file actions
180 lines (162 loc) · 3.88 KB
/
y.tab.h
File metadata and controls
180 lines (162 loc) · 3.88 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
ADD = 258,
SUB = 259,
MUL = 260,
DIV = 261,
MOD = 262,
AND = 263,
OR = 264,
NOT = 265,
PRINT = 266,
RET = 267,
START_COMMENT = 268,
END_COMMENT = 269,
CPLUS_COMMENT = 270,
I_CONST = 271,
F_CONST = 272,
S_CONST = 273,
TRUE = 274,
FALSE = 275,
INC = 276,
DEC = 277,
MT = 278,
LT = 279,
MTE = 280,
LTE = 281,
EQ = 282,
NE = 283,
ID = 284,
INT = 285,
FLOAT = 286,
BOOL = 287,
STRING = 288,
VOID = 289,
SEMICOLON = 290,
LB = 291,
RB = 292,
LCB = 293,
RCB = 294,
LSB = 295,
RSB = 296,
COMMA = 297,
ASGN = 298,
ADDASGN = 299,
SUBASGN = 300,
MULASGN = 301,
DIVASGN = 302,
MODASGN = 303,
IF = 304,
ELSE = 305,
FOR = 306,
WHILE = 307
};
#endif
/* Tokens. */
#define ADD 258
#define SUB 259
#define MUL 260
#define DIV 261
#define MOD 262
#define AND 263
#define OR 264
#define NOT 265
#define PRINT 266
#define RET 267
#define START_COMMENT 268
#define END_COMMENT 269
#define CPLUS_COMMENT 270
#define I_CONST 271
#define F_CONST 272
#define S_CONST 273
#define TRUE 274
#define FALSE 275
#define INC 276
#define DEC 277
#define MT 278
#define LT 279
#define MTE 280
#define LTE 281
#define EQ 282
#define NE 283
#define ID 284
#define INT 285
#define FLOAT 286
#define BOOL 287
#define STRING 288
#define VOID 289
#define SEMICOLON 290
#define LB 291
#define RB 292
#define LCB 293
#define RCB 294
#define LSB 295
#define RSB 296
#define COMMA 297
#define ASGN 298
#define ADDASGN 299
#define SUBASGN 300
#define MULASGN 301
#define DIVASGN 302
#define MODASGN 303
#define IF 304
#define ELSE 305
#define FOR 306
#define WHILE 307
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
#line 117 "compiler_hw3.y" /* yacc.c:1909 */
struct atom {
int i_val;
double f_val;
char* string_val;
char type[30];
int id_reg;
}atom;
#line 168 "y.tab.h" /* yacc.c:1909 */
};
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
extern YYSTYPE yylval;
int yyparse (void);
#endif /* !YY_YY_Y_TAB_H_INCLUDED */