-
Notifications
You must be signed in to change notification settings - Fork 138
/
imcparser.h
309 lines (287 loc) · 6.94 KB
/
imcparser.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
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
/* ex: set ro ft=c:
* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
*
* This file is generated automatically from 'compilers/imcc/imcc.y'
* by tools/build/fixup_gen_file.pl.
*
* Any changes made here will be lost!
*
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
/* A Bison parser, made by GNU Bison 2.5. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2011 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. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
LOW_PREC = 258,
PARAM = 259,
SOL = 260,
HLL = 261,
GOTO = 262,
ARG = 263,
IF = 264,
UNLESS = 265,
PNULL = 266,
SET_RETURN = 267,
SET_YIELD = 268,
ADV_FLAT = 269,
ADV_SLURPY = 270,
ADV_OPTIONAL = 271,
ADV_OPT_FLAG = 272,
ADV_NAMED = 273,
ADV_ARROW = 274,
ADV_INVOCANT = 275,
ADV_CALL_SIG = 276,
NAMESPACE = 277,
DOT_METHOD = 278,
SUB = 279,
SYM = 280,
LOCAL = 281,
LEXICAL = 282,
CONST = 283,
ANNOTATE = 284,
GLOBAL_CONST = 285,
PLUS_ASSIGN = 286,
MINUS_ASSIGN = 287,
MUL_ASSIGN = 288,
DIV_ASSIGN = 289,
CONCAT_ASSIGN = 290,
BAND_ASSIGN = 291,
BOR_ASSIGN = 292,
BXOR_ASSIGN = 293,
FDIV = 294,
FDIV_ASSIGN = 295,
MOD_ASSIGN = 296,
SHR_ASSIGN = 297,
SHL_ASSIGN = 298,
SHR_U_ASSIGN = 299,
SHIFT_LEFT = 300,
SHIFT_RIGHT = 301,
INTV = 302,
FLOATV = 303,
STRINGV = 304,
PMCV = 305,
LOG_XOR = 306,
RELOP_EQ = 307,
RELOP_NE = 308,
RELOP_GT = 309,
RELOP_GTE = 310,
RELOP_LT = 311,
RELOP_LTE = 312,
RESULT = 313,
RETURN = 314,
TAILCALL = 315,
YIELDT = 316,
GET_RESULTS = 317,
POW = 318,
SHIFT_RIGHT_U = 319,
LOG_AND = 320,
LOG_OR = 321,
COMMA = 322,
ESUB = 323,
DOTDOT = 324,
PCC_BEGIN = 325,
PCC_END = 326,
PCC_CALL = 327,
PCC_SUB = 328,
PCC_BEGIN_RETURN = 329,
PCC_END_RETURN = 330,
PCC_BEGIN_YIELD = 331,
PCC_END_YIELD = 332,
INVOCANT = 333,
MAIN = 334,
LOAD = 335,
INIT = 336,
IMMEDIATE = 337,
POSTCOMP = 338,
METHOD = 339,
ANON = 340,
OUTER = 341,
NEED_LEX = 342,
MULTI = 343,
SUBTAG = 344,
VTABLE_METHOD = 345,
LOADLIB = 346,
SUB_INSTANCE_OF = 347,
SUBID = 348,
NS_ENTRY = 349,
LABEL = 350,
EMIT = 351,
EOM = 352,
IREG = 353,
NREG = 354,
SREG = 355,
PREG = 356,
IDENTIFIER = 357,
REG = 358,
MACRO = 359,
ENDM = 360,
STRINGC = 361,
INTC = 362,
FLOATC = 363,
USTRINGC = 364,
PARROT_OP = 365,
VAR = 366,
LINECOMMENT = 367,
FILECOMMENT = 368,
DOT = 369,
CONCAT = 370
};
#endif
/* Tokens. */
#define LOW_PREC 258
#define PARAM 259
#define SOL 260
#define HLL 261
#define GOTO 262
#define ARG 263
#define IF 264
#define UNLESS 265
#define PNULL 266
#define SET_RETURN 267
#define SET_YIELD 268
#define ADV_FLAT 269
#define ADV_SLURPY 270
#define ADV_OPTIONAL 271
#define ADV_OPT_FLAG 272
#define ADV_NAMED 273
#define ADV_ARROW 274
#define ADV_INVOCANT 275
#define ADV_CALL_SIG 276
#define NAMESPACE 277
#define DOT_METHOD 278
#define SUB 279
#define SYM 280
#define LOCAL 281
#define LEXICAL 282
#define CONST 283
#define ANNOTATE 284
#define GLOBAL_CONST 285
#define PLUS_ASSIGN 286
#define MINUS_ASSIGN 287
#define MUL_ASSIGN 288
#define DIV_ASSIGN 289
#define CONCAT_ASSIGN 290
#define BAND_ASSIGN 291
#define BOR_ASSIGN 292
#define BXOR_ASSIGN 293
#define FDIV 294
#define FDIV_ASSIGN 295
#define MOD_ASSIGN 296
#define SHR_ASSIGN 297
#define SHL_ASSIGN 298
#define SHR_U_ASSIGN 299
#define SHIFT_LEFT 300
#define SHIFT_RIGHT 301
#define INTV 302
#define FLOATV 303
#define STRINGV 304
#define PMCV 305
#define LOG_XOR 306
#define RELOP_EQ 307
#define RELOP_NE 308
#define RELOP_GT 309
#define RELOP_GTE 310
#define RELOP_LT 311
#define RELOP_LTE 312
#define RESULT 313
#define RETURN 314
#define TAILCALL 315
#define YIELDT 316
#define GET_RESULTS 317
#define POW 318
#define SHIFT_RIGHT_U 319
#define LOG_AND 320
#define LOG_OR 321
#define COMMA 322
#define ESUB 323
#define DOTDOT 324
#define PCC_BEGIN 325
#define PCC_END 326
#define PCC_CALL 327
#define PCC_SUB 328
#define PCC_BEGIN_RETURN 329
#define PCC_END_RETURN 330
#define PCC_BEGIN_YIELD 331
#define PCC_END_YIELD 332
#define INVOCANT 333
#define MAIN 334
#define LOAD 335
#define INIT 336
#define IMMEDIATE 337
#define POSTCOMP 338
#define METHOD 339
#define ANON 340
#define OUTER 341
#define NEED_LEX 342
#define MULTI 343
#define SUBTAG 344
#define VTABLE_METHOD 345
#define LOADLIB 346
#define SUB_INSTANCE_OF 347
#define SUBID 348
#define NS_ENTRY 349
#define LABEL 350
#define EMIT 351
#define EOM 352
#define IREG 353
#define NREG 354
#define SREG 355
#define PREG 356
#define IDENTIFIER 357
#define REG 358
#define MACRO 359
#define ENDM 360
#define STRINGC 361
#define INTC 362
#define FLOATC 363
#define USTRINGC 364
#define PARROT_OP 365
#define VAR 366
#define LINECOMMENT 367
#define FILECOMMENT 368
#define DOT 369
#define CONCAT 370
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
{
/* Line 2068 of yacc.c */
#line 1032 "compilers/imcc/imcc.y"
IdList * idlist;
int t;
char * s;
SymReg * sr;
Instruction *i;
/* Line 2068 of yacc.c */
#line 290 "compilers/imcc/imcparser.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif