2 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
4 * This file is generated automatically from 'compilers/imcc/imcc.y'
5 * by tools/build/fixup_gen_file.pl.
7 * Any changes made here will be lost!
10 /* HEADERIZER HFILE: none */
13 /* A Bison parser, made by GNU Bison 2.4.1. */
15 /* Skeleton implementation for Bison's Yacc-like parsers in C
17 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
18 Free Software Foundation, Inc.
20 This program is free software: you can redistribute it and/or modify
21 it under the terms of the GNU General Public License as published by
22 the Free Software Foundation, either version 3 of the License, or
23 (at your option) any later version.
25 This program is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 GNU General Public License for more details.
30 You should have received a copy of the GNU General Public License
31 along with this program. If not, see <http://www.gnu.org/licenses/>. */
33 /* As a special exception, you may create a larger work that contains
34 part or all of the Bison parser skeleton and distribute that work
35 under terms of your choice, so long as that work isn't itself a
36 parser generator using the skeleton or a modified version thereof
37 as a parser skeleton. Alternatively, if you modify or redistribute
38 the parser skeleton itself, you may (at your option) remove this
39 special exception, which will cause the skeleton and the resulting
40 Bison output files to be licensed under the GNU General Public
41 License without this special exception.
43 This special exception was added by the Free Software Foundation in
44 version 2.2 of Bison. */
46 /* C LALR(1) parser skeleton written by Richard Stallman, by
47 simplifying the original so-called "semantic" parser. */
49 /* All symbols defined below should begin with yy or YY, to avoid
50 infringing on user name space. This should be done even for local
51 variables, as they might otherwise be expanded by user macros.
52 There are some unavoidable exceptions within include files to
53 define necessary library symbols; they are noted "INFRINGES ON
54 USER NAME SPACE" below. */
56 /* Identify Bison output. */
60 #define YYBISON_VERSION "2.4.1"
63 #define YYSKELETON_NAME "yacc.c"
74 /* Using locations. */
75 #define YYLSP_NEEDED 0
79 /* Copy the first part of user declarations. */
81 /* Line 189 of yacc.c */
82 #line 1 "compilers/imcc/imcc.y"
87 * Intermediate Code Compiler for Parrot.
89 * Copyright (C) 2002 Melvin Smith <melvin.smith@mindspring.com>
90 * Copyright (C) 2002-2010, Parrot Foundation.
92 * Grammar of the PIR language parser.
105 #include "parrot/dynext.h"
106 #include "pmc/pmc_callcontext.h"
109 #include "optimizer.h"
111 /* prevent declarations of malloc() and free() in the generated parser. */
113 #define YYFREE(Ptr) do { /* empty */; } while (YYID (0))
116 # define YYENABLE_NLS 0
119 #ifndef YYLTYPE_IS_TRIVIAL
120 # define YYLTYPE_IS_TRIVIAL 0
123 /* HEADERIZER HFILE: compilers/imcc/imc.h */
125 /* HEADERIZER BEGIN: static */
126 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
128 static void add_pcc_named_arg(PARROT_INTERP
,
129 ARGMOD(SymReg
*cur_call
),
130 ARGMOD(SymReg
*name
),
131 ARGMOD(SymReg
*value
))
132 __attribute__nonnull__(1)
133 __attribute__nonnull__(2)
134 __attribute__nonnull__(3)
135 __attribute__nonnull__(4)
136 FUNC_MODIFIES(*cur_call
)
138 FUNC_MODIFIES(*value
);
140 static void add_pcc_named_arg_var(PARROT_INTERP
,
141 ARGMOD(SymReg
*cur_call
),
142 ARGMOD(SymReg
*name
),
143 ARGMOD(SymReg
*value
))
144 __attribute__nonnull__(1)
145 __attribute__nonnull__(2)
146 __attribute__nonnull__(3)
147 __attribute__nonnull__(4)
148 FUNC_MODIFIES(*cur_call
)
150 FUNC_MODIFIES(*value
);
152 static void add_pcc_named_param(PARROT_INTERP
,
153 ARGMOD(SymReg
*cur_call
),
154 ARGMOD(SymReg
*name
),
155 ARGMOD(SymReg
*value
))
156 __attribute__nonnull__(1)
157 __attribute__nonnull__(2)
158 __attribute__nonnull__(3)
159 __attribute__nonnull__(4)
160 FUNC_MODIFIES(*cur_call
)
162 FUNC_MODIFIES(*value
);
164 static void add_pcc_named_result(PARROT_INTERP
,
165 ARGMOD(SymReg
*cur_call
),
166 ARGMOD(SymReg
*name
),
167 ARGMOD(SymReg
*value
))
168 __attribute__nonnull__(1)
169 __attribute__nonnull__(2)
170 __attribute__nonnull__(3)
171 __attribute__nonnull__(4)
172 FUNC_MODIFIES(*cur_call
)
174 FUNC_MODIFIES(*value
);
176 static void add_pcc_named_return(PARROT_INTERP
,
177 ARGMOD(SymReg
*cur_call
),
178 ARGMOD(SymReg
*name
),
179 ARGMOD(SymReg
*value
))
180 __attribute__nonnull__(1)
181 __attribute__nonnull__(2)
182 __attribute__nonnull__(3)
183 __attribute__nonnull__(4)
184 FUNC_MODIFIES(*cur_call
)
186 FUNC_MODIFIES(*value
);
188 static void adv_named_set(PARROT_INTERP
, ARGIN(const char *name
))
189 __attribute__nonnull__(1)
190 __attribute__nonnull__(2);
192 static void adv_named_set_u(PARROT_INTERP
, ARGIN(const char *name
))
193 __attribute__nonnull__(1)
194 __attribute__nonnull__(2);
196 static void begin_return_or_yield(PARROT_INTERP
, int yield
)
197 __attribute__nonnull__(1);
199 static void clear_state(PARROT_INTERP
)
200 __attribute__nonnull__(1);
202 static void do_loadlib(PARROT_INTERP
, ARGIN(const char *lib
))
203 __attribute__nonnull__(1)
204 __attribute__nonnull__(2);
206 PARROT_WARN_UNUSED_RESULT
207 PARROT_CAN_RETURN_NULL
208 static Instruction
* func_ins(PARROT_INTERP
,
209 ARGMOD(IMC_Unit
*unit
),
211 ARGIN(const char *op
),
216 __attribute__nonnull__(1)
217 __attribute__nonnull__(2)
218 __attribute__nonnull__(3)
219 __attribute__nonnull__(4)
220 __attribute__nonnull__(5)
224 PARROT_WARN_UNUSED_RESULT
225 PARROT_CAN_RETURN_NULL
226 static Instruction
* iINDEXFETCH(PARROT_INTERP
,
227 ARGMOD(IMC_Unit
*unit
),
231 __attribute__nonnull__(1)
232 __attribute__nonnull__(2)
233 __attribute__nonnull__(3)
234 __attribute__nonnull__(4)
235 __attribute__nonnull__(5)
236 FUNC_MODIFIES(*unit
);
238 PARROT_WARN_UNUSED_RESULT
239 PARROT_CAN_RETURN_NULL
240 static Instruction
* iINDEXSET(PARROT_INTERP
,
241 ARGMOD(IMC_Unit
*unit
),
245 __attribute__nonnull__(1)
246 __attribute__nonnull__(2)
247 __attribute__nonnull__(3)
248 __attribute__nonnull__(4)
249 __attribute__nonnull__(5)
250 FUNC_MODIFIES(*unit
);
252 PARROT_WARN_UNUSED_RESULT
253 PARROT_CANNOT_RETURN_NULL
254 static Instruction
* iLABEL(PARROT_INTERP
,
255 ARGMOD_NULLOK(IMC_Unit
*unit
),
257 __attribute__nonnull__(1)
258 __attribute__nonnull__(3)
262 PARROT_WARN_UNUSED_RESULT
263 PARROT_CAN_RETURN_NULL
264 static const char * inv_op(ARGIN(const char *op
))
265 __attribute__nonnull__(1);
267 PARROT_IGNORABLE_RESULT
268 PARROT_CANNOT_RETURN_NULL
269 static Instruction
* iSUBROUTINE(PARROT_INTERP
,
270 ARGMOD_NULLOK(IMC_Unit
*unit
),
272 __attribute__nonnull__(1)
273 __attribute__nonnull__(3)
277 PARROT_IGNORABLE_RESULT
278 PARROT_CAN_RETURN_NULL
279 static Instruction
* MK_I(PARROT_INTERP
,
280 ARGMOD(IMC_Unit
*unit
),
281 ARGIN(const char *fmt
),
284 __attribute__nonnull__(1)
285 __attribute__nonnull__(2)
286 __attribute__nonnull__(3)
287 FUNC_MODIFIES(*unit
);
289 PARROT_WARN_UNUSED_RESULT
290 PARROT_CAN_RETURN_NULL
291 static Instruction
* mk_pmc_const(PARROT_INTERP
,
292 ARGMOD(IMC_Unit
*unit
),
293 ARGIN(const char *type
),
294 ARGMOD(SymReg
*left
),
295 ARGIN(const char *constant
))
296 __attribute__nonnull__(1)
297 __attribute__nonnull__(2)
298 __attribute__nonnull__(3)
299 __attribute__nonnull__(4)
300 __attribute__nonnull__(5)
302 FUNC_MODIFIES(*left
);
304 PARROT_WARN_UNUSED_RESULT
305 PARROT_CAN_RETURN_NULL
306 static Instruction
* mk_pmc_const_named(PARROT_INTERP
,
307 ARGMOD(IMC_Unit
*unit
),
308 ARGIN(const char *name
),
309 ARGMOD(SymReg
*left
),
310 ARGIN(const char *constant
))
311 __attribute__nonnull__(1)
312 __attribute__nonnull__(2)
313 __attribute__nonnull__(3)
314 __attribute__nonnull__(4)
315 __attribute__nonnull__(5)
317 FUNC_MODIFIES(*left
);
319 PARROT_WARN_UNUSED_RESULT
320 PARROT_CANNOT_RETURN_NULL
321 static SymReg
* mk_sub_address_fromc(PARROT_INTERP
, ARGIN(const char *name
))
322 __attribute__nonnull__(1)
323 __attribute__nonnull__(2);
325 PARROT_WARN_UNUSED_RESULT
326 PARROT_CANNOT_RETURN_NULL
327 static SymReg
* mk_sub_address_u(PARROT_INTERP
, ARGIN(const char *name
))
328 __attribute__nonnull__(1)
329 __attribute__nonnull__(2);
331 static void set_lexical(PARROT_INTERP
,
333 ARGMOD(SymReg
*name
))
334 __attribute__nonnull__(1)
335 __attribute__nonnull__(2)
336 __attribute__nonnull__(3)
338 FUNC_MODIFIES(*name
);
340 #define ASSERT_ARGS_add_pcc_named_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
341 PARROT_ASSERT_ARG(interp) \
342 , PARROT_ASSERT_ARG(cur_call) \
343 , PARROT_ASSERT_ARG(name) \
344 , PARROT_ASSERT_ARG(value))
345 #define ASSERT_ARGS_add_pcc_named_arg_var __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
346 PARROT_ASSERT_ARG(interp) \
347 , PARROT_ASSERT_ARG(cur_call) \
348 , PARROT_ASSERT_ARG(name) \
349 , PARROT_ASSERT_ARG(value))
350 #define ASSERT_ARGS_add_pcc_named_param __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
351 PARROT_ASSERT_ARG(interp) \
352 , PARROT_ASSERT_ARG(cur_call) \
353 , PARROT_ASSERT_ARG(name) \
354 , PARROT_ASSERT_ARG(value))
355 #define ASSERT_ARGS_add_pcc_named_result __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
356 PARROT_ASSERT_ARG(interp) \
357 , PARROT_ASSERT_ARG(cur_call) \
358 , PARROT_ASSERT_ARG(name) \
359 , PARROT_ASSERT_ARG(value))
360 #define ASSERT_ARGS_add_pcc_named_return __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
361 PARROT_ASSERT_ARG(interp) \
362 , PARROT_ASSERT_ARG(cur_call) \
363 , PARROT_ASSERT_ARG(name) \
364 , PARROT_ASSERT_ARG(value))
365 #define ASSERT_ARGS_adv_named_set __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
366 PARROT_ASSERT_ARG(interp) \
367 , PARROT_ASSERT_ARG(name))
368 #define ASSERT_ARGS_adv_named_set_u __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
369 PARROT_ASSERT_ARG(interp) \
370 , PARROT_ASSERT_ARG(name))
371 #define ASSERT_ARGS_begin_return_or_yield __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
372 PARROT_ASSERT_ARG(interp))
373 #define ASSERT_ARGS_clear_state __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
374 PARROT_ASSERT_ARG(interp))
375 #define ASSERT_ARGS_do_loadlib __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
376 PARROT_ASSERT_ARG(interp) \
377 , PARROT_ASSERT_ARG(lib))
378 #define ASSERT_ARGS_func_ins __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
379 PARROT_ASSERT_ARG(interp) \
380 , PARROT_ASSERT_ARG(unit) \
381 , PARROT_ASSERT_ARG(lhs) \
382 , PARROT_ASSERT_ARG(op) \
383 , PARROT_ASSERT_ARG(r))
384 #define ASSERT_ARGS_iINDEXFETCH __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
385 PARROT_ASSERT_ARG(interp) \
386 , PARROT_ASSERT_ARG(unit) \
387 , PARROT_ASSERT_ARG(r0) \
388 , PARROT_ASSERT_ARG(r1) \
389 , PARROT_ASSERT_ARG(r2))
390 #define ASSERT_ARGS_iINDEXSET __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
391 PARROT_ASSERT_ARG(interp) \
392 , PARROT_ASSERT_ARG(unit) \
393 , PARROT_ASSERT_ARG(r0) \
394 , PARROT_ASSERT_ARG(r1) \
395 , PARROT_ASSERT_ARG(r2))
396 #define ASSERT_ARGS_iLABEL __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
397 PARROT_ASSERT_ARG(interp) \
398 , PARROT_ASSERT_ARG(r0))
399 #define ASSERT_ARGS_inv_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
400 PARROT_ASSERT_ARG(op))
401 #define ASSERT_ARGS_iSUBROUTINE __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
402 PARROT_ASSERT_ARG(interp) \
403 , PARROT_ASSERT_ARG(r))
404 #define ASSERT_ARGS_MK_I __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
405 PARROT_ASSERT_ARG(interp) \
406 , PARROT_ASSERT_ARG(unit) \
407 , PARROT_ASSERT_ARG(fmt))
408 #define ASSERT_ARGS_mk_pmc_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
409 PARROT_ASSERT_ARG(interp) \
410 , PARROT_ASSERT_ARG(unit) \
411 , PARROT_ASSERT_ARG(type) \
412 , PARROT_ASSERT_ARG(left) \
413 , PARROT_ASSERT_ARG(constant))
414 #define ASSERT_ARGS_mk_pmc_const_named __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
415 PARROT_ASSERT_ARG(interp) \
416 , PARROT_ASSERT_ARG(unit) \
417 , PARROT_ASSERT_ARG(name) \
418 , PARROT_ASSERT_ARG(left) \
419 , PARROT_ASSERT_ARG(constant))
420 #define ASSERT_ARGS_mk_sub_address_fromc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
421 PARROT_ASSERT_ARG(interp) \
422 , PARROT_ASSERT_ARG(name))
423 #define ASSERT_ARGS_mk_sub_address_u __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
424 PARROT_ASSERT_ARG(interp) \
425 , PARROT_ASSERT_ARG(name))
426 #define ASSERT_ARGS_set_lexical __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
427 PARROT_ASSERT_ARG(interp) \
428 , PARROT_ASSERT_ARG(r) \
429 , PARROT_ASSERT_ARG(name))
430 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
431 /* HEADERIZER END: static */
435 #define YYERROR_VERBOSE 1
438 * We use a pure parser with the interpreter as a parameter. However this still
439 * doesn't make the parser reentrant, as there are too many globals around.
443 * Choosing instructions for Parrot is pretty easy since many are
452 =item C<static Instruction * MK_I(PARROT_INTERP, IMC_Unit *unit, const char
455 build and emitb instruction by INS. fmt may contain:
463 NOTE: Most usage of this function is with
464 IMCC_INFO(interp)->cur_unit, but there are some
465 exceptions. Thus, we can't easily factorize that piece of
472 PARROT_IGNORABLE_RESULT
473 PARROT_CAN_RETURN_NULL
475 MK_I(PARROT_INTERP
, ARGMOD(IMC_Unit
*unit
), ARGIN(const char *fmt
), int n
, ...)
482 SymReg
*r
[IMCC_MAX_FIX_REGS
];
485 for (p
= opname
, q
= fmt
; *q
&& *q
!= ' ';)
493 fprintf(stderr
, "op '%s' format '%s' (%d)\n", opname
, fmt
?:"", n
);
497 for (i
= 0; i
< n
; ++i
) {
498 r
[i
] = va_arg(ap
, SymReg
*);
501 return INS(interp
, unit
, opname
, fmt
, r
, n
,
502 IMCC_INFO(interp
)->keyvec
, 1);
507 =item C<static Instruction* mk_pmc_const(PARROT_INTERP, IMC_Unit *unit, const
508 char *type, SymReg *left, const char *constant)>
514 PARROT_WARN_UNUSED_RESULT
515 PARROT_CAN_RETURN_NULL
517 mk_pmc_const(PARROT_INTERP
, ARGMOD(IMC_Unit
*unit
), ARGIN(const char *type
),
518 ARGMOD(SymReg
*left
), ARGIN(const char *constant
))
520 ASSERT_ARGS(mk_pmc_const
)
521 const int type_enum
= atoi(type
);
522 const int ascii
= (*constant
== '\'' || *constant
== '"');
527 if (left
->type
== VTADDRESS
) { /* IDENTIFIER */
528 if (IMCC_INFO(interp
)->state
->pasm_file
) {
529 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
530 "Ident as PMC constant",
531 " %s\n", left
->name
);
533 left
->type
= VTIDENTIFIER
;
538 /* strip delimiters */
539 name
= mem_sys_strdup(constant
+ 1);
540 name
[strlen(name
) - 1] = 0;
543 name
= mem_sys_strdup(constant
);
548 case enum_class_Coroutine
:
549 rhs
= mk_const(interp
, name
, 'p');
552 rhs
->type
|= VT_ENCODED
;
554 rhs
->usage
|= U_FIXUP
| U_SUBID_LOOKUP
;
557 rhs
= mk_const(interp
, name
, 'P');
562 rhs
->pmc_type
= type_enum
;
566 return INS(interp
, unit
, "set_p_pc", "", r
, 2, 0, 1);
571 =item C<static Instruction* mk_pmc_const_named(PARROT_INTERP, IMC_Unit *unit,
572 const char *name, SymReg *left, const char *constant)>
578 PARROT_WARN_UNUSED_RESULT
579 PARROT_CAN_RETURN_NULL
581 mk_pmc_const_named(PARROT_INTERP
, ARGMOD(IMC_Unit
*unit
),
582 ARGIN(const char *name
), ARGMOD(SymReg
*left
), ARGIN(const char *constant
))
584 ASSERT_ARGS(mk_pmc_const_named
)
588 const int ascii
= (*constant
== '\'' || *constant
== '"');
589 char *unquoted_name
= mem_sys_strdup(name
+ 1);
590 size_t name_length
= strlen(unquoted_name
) - 1;
592 unquoted_name
[name_length
] = 0;
594 if (left
->type
== VTADDRESS
) { /* IDENTIFIER */
595 if (IMCC_INFO(interp
)->state
->pasm_file
) {
596 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
597 "Ident as PMC constant",
598 " %s\n", left
->name
);
600 left
->type
= VTIDENTIFIER
;
605 /* strip delimiters */
606 const_name
= mem_sys_strdup(constant
+ 1);
607 const_name
[strlen(const_name
) - 1] = 0;
610 const_name
= mem_sys_strdup(constant
);
613 if ((strncmp(unquoted_name
, "Sub", name_length
) == 0)
614 || (strncmp(unquoted_name
, "Coroutine", name_length
) == 0)) {
615 rhs
= mk_const(interp
, const_name
, 'p');
618 rhs
->type
|= VT_ENCODED
;
620 rhs
->usage
|= U_FIXUP
| U_SUBID_LOOKUP
;
623 rhs
= mk_const(interp
, const_name
, 'P');
627 rhs
->pmc_type
= Parrot_pmc_get_type_str(interp
,
628 Parrot_str_new(interp
, unquoted_name
, name_length
));
630 mem_sys_free(unquoted_name
);
631 mem_sys_free(const_name
);
633 return INS(interp
, unit
, "set_p_pc", "", r
, 2, 0, 1);
638 =item C<static Instruction* func_ins(PARROT_INTERP, IMC_Unit *unit, SymReg *lhs,
639 const char *op, SymReg **r, int n, int keyv, int emit)>
645 PARROT_WARN_UNUSED_RESULT
646 PARROT_CAN_RETURN_NULL
648 func_ins(PARROT_INTERP
, ARGMOD(IMC_Unit
*unit
), ARGIN(SymReg
*lhs
), ARGIN(const char *op
),
649 ARGMOD(SymReg
**r
), int n
, int keyv
, int emit
)
651 ASSERT_ARGS(func_ins
)
653 /* shift regs up by 1 */
654 for (i
= n
- 1; i
>= 0; --i
)
659 return INS(interp
, unit
, op
, "", r
, n
+1, keyv
, emit
);
664 =item C<static void clear_state(PARROT_INTERP)>
671 clear_state(PARROT_INTERP
)
673 ASSERT_ARGS(clear_state
)
674 IMCC_INFO(interp
) -> nargs
= 0;
675 IMCC_INFO(interp
) -> keyvec
= 0;
680 =item C<Instruction * INS_LABEL(PARROT_INTERP, IMC_Unit *unit, SymReg *r0, int
687 PARROT_WARN_UNUSED_RESULT
688 PARROT_CANNOT_RETURN_NULL
690 INS_LABEL(PARROT_INTERP
, ARGMOD_NULLOK(IMC_Unit
*unit
), ARGMOD(SymReg
*r0
), int emit
)
692 ASSERT_ARGS(INS_LABEL
)
694 Instruction
* const ins
= _mk_instruction("", "%s:", 1, &r0
, 0);
699 emitb(interp
, unit
, ins
);
706 =item C<static Instruction * iLABEL(PARROT_INTERP, IMC_Unit *unit, SymReg *r0)>
712 PARROT_WARN_UNUSED_RESULT
713 PARROT_CANNOT_RETURN_NULL
715 iLABEL(PARROT_INTERP
, ARGMOD_NULLOK(IMC_Unit
*unit
), ARGMOD(SymReg
*r0
))
718 Instruction
* const i
= INS_LABEL(interp
, unit
, r0
, 1);
719 i
->line
= IMCC_INFO(interp
)->line
;
727 =item C<static Instruction * iSUBROUTINE(PARROT_INTERP, IMC_Unit *unit, SymReg
734 PARROT_IGNORABLE_RESULT
735 PARROT_CANNOT_RETURN_NULL
737 iSUBROUTINE(PARROT_INTERP
, ARGMOD_NULLOK(IMC_Unit
*unit
), ARGMOD(SymReg
*r
))
739 ASSERT_ARGS(iSUBROUTINE
)
740 Instruction
* const i
= iLABEL(interp
, unit
, r
);
742 r
->type
= (r
->type
& VT_ENCODED
) ? VT_PCC_SUB
|VT_ENCODED
: VT_PCC_SUB
;
743 r
->pcc_sub
= mem_gc_allocate_zeroed_typed(interp
, pcc_sub_t
);
745 IMCC_INFO(interp
)->cur_call
= r
;
746 i
->line
= IMCC_INFO(interp
)->line
;
748 add_namespace(interp
, unit
);
754 =item C<static Instruction * iINDEXFETCH(PARROT_INTERP, IMC_Unit *unit, SymReg
755 *r0, SymReg *r1, SymReg *r2)>
763 PARROT_WARN_UNUSED_RESULT
764 PARROT_CAN_RETURN_NULL
766 iINDEXFETCH(PARROT_INTERP
, ARGMOD(IMC_Unit
*unit
), ARGIN(SymReg
*r0
), ARGIN(SymReg
*r1
),
769 ASSERT_ARGS(iINDEXFETCH
)
770 IMCC_INFO(interp
) -> keyvec
|= KEY_BIT(2);
771 return MK_I(interp
, unit
, "set %s, %s[%s]", 3, r0
, r1
, r2
);
776 =item C<static Instruction * iINDEXSET(PARROT_INTERP, IMC_Unit *unit, SymReg
777 *r0, SymReg *r1, SymReg *r2)>
785 PARROT_WARN_UNUSED_RESULT
786 PARROT_CAN_RETURN_NULL
788 iINDEXSET(PARROT_INTERP
, ARGMOD(IMC_Unit
*unit
), ARGIN(SymReg
*r0
), ARGIN(SymReg
*r1
),
791 ASSERT_ARGS(iINDEXSET
)
792 if (r0
->set
== 'P') {
793 IMCC_INFO(interp
)->keyvec
|= KEY_BIT(1);
794 MK_I(interp
, unit
, "set %s[%s], %s", 3, r0
, r1
, r2
);
797 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
798 "unsupported indexed set op\n");
805 =item C<static const char * inv_op(const char *op)>
811 PARROT_WARN_UNUSED_RESULT
812 PARROT_CAN_RETURN_NULL
814 inv_op(ARGIN(const char *op
))
818 return get_neg_op(op
, &n
);
823 =item C<Instruction * IMCC_create_itcall_label(PARROT_INTERP)>
829 PARROT_WARN_UNUSED_RESULT
830 PARROT_CANNOT_RETURN_NULL
832 IMCC_create_itcall_label(PARROT_INTERP
)
834 ASSERT_ARGS(IMCC_create_itcall_label
)
839 snprintf(name
, sizeof (name
), "%cpcc_sub_call_%d", IMCC_INTERNAL_CHAR
,
840 IMCC_INFO(interp
)->cnr
++);
842 r
= mk_pcc_sub(interp
, name
, 0);
843 i
= iLABEL(interp
, IMCC_INFO(interp
)->cur_unit
, r
);
844 i
->type
= ITCALL
| ITPCCSUB
;
846 IMCC_INFO(interp
)->cur_call
= r
;
853 =item C<static SymReg * mk_sub_address_fromc(PARROT_INTERP, const char *name)>
859 PARROT_WARN_UNUSED_RESULT
860 PARROT_CANNOT_RETURN_NULL
862 mk_sub_address_fromc(PARROT_INTERP
, ARGIN(const char *name
))
864 ASSERT_ARGS(mk_sub_address_fromc
)
865 /* name is a quoted sub name */
869 /* interpolate only if the first character is a double-quote */
871 STRING
*unescaped
= Parrot_str_unescape(interp
, name
, '"', NULL
);
872 name_copy
= Parrot_str_to_cstring(interp
, unescaped
);
875 name_copy
= mem_sys_strdup(name
);
876 name_copy
[ strlen(name
) - 1 ] = 0;
879 r
= mk_sub_address(interp
, name_copy
+ 1);
880 mem_sys_free(name_copy
);
887 =item C<static SymReg * mk_sub_address_u(PARROT_INTERP, const char *name)>
893 PARROT_WARN_UNUSED_RESULT
894 PARROT_CANNOT_RETURN_NULL
896 mk_sub_address_u(PARROT_INTERP
, ARGIN(const char *name
))
898 ASSERT_ARGS(mk_sub_address_u
)
899 SymReg
* const r
= mk_sub_address(interp
, name
);
900 r
->type
|= VT_ENCODED
;
907 =item C<void IMCC_itcall_sub(PARROT_INTERP, SymReg *sub)>
914 IMCC_itcall_sub(PARROT_INTERP
, ARGIN(SymReg
*sub
))
916 ASSERT_ARGS(IMCC_itcall_sub
)
917 IMCC_INFO(interp
)->cur_call
->pcc_sub
->sub
= sub
;
919 if (IMCC_INFO(interp
)->cur_obj
) {
920 if (IMCC_INFO(interp
)->cur_obj
->set
!= 'P')
921 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
, "object isn't a PMC");
923 IMCC_INFO(interp
)->cur_call
->pcc_sub
->object
=
924 IMCC_INFO(interp
)->cur_obj
;
925 IMCC_INFO(interp
)->cur_obj
= NULL
;
928 if (IMCC_INFO(interp
)->cur_call
->pcc_sub
->sub
->pmc_type
== enum_class_NCI
)
929 IMCC_INFO(interp
)->cur_call
->pcc_sub
->flags
|= isNCI
;
931 if (IMCC_INFO(interp
)->cur_unit
->type
== IMC_PCCSUB
)
932 IMCC_INFO(interp
)->cur_unit
->instructions
->symregs
[0]->pcc_sub
->calls_a_sub
|= 1;
938 =item C<static void begin_return_or_yield(PARROT_INTERP, int yield)>
945 begin_return_or_yield(PARROT_INTERP
, int yield
)
947 ASSERT_ARGS(begin_return_or_yield
)
949 Instruction
* const ins
= IMCC_INFO(interp
)->cur_unit
->instructions
;
952 if (!ins
|| !ins
->symregs
[0] || !(ins
->symregs
[0]->type
& VT_PCC_SUB
))
953 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
954 "yield or return directive outside pcc subroutine\n");
956 ins
->symregs
[0]->pcc_sub
->calls_a_sub
= 1 | ITPCCYIELD
;
957 snprintf(name
, sizeof (name
), yield
? "%cpcc_sub_yield_%d" : "%cpcc_sub_ret_%d",
958 IMCC_INTERNAL_CHAR
, IMCC_INFO(interp
)->cnr
++);
959 interp
->imc_info
->sr_return
= mk_pcc_sub(interp
, name
, 0);
960 i
= iLABEL(interp
, IMCC_INFO(interp
)->cur_unit
, interp
->imc_info
->sr_return
);
961 i
->type
= yield
? ITPCCSUB
| ITLABEL
| ITPCCYIELD
: ITPCCSUB
| ITLABEL
;
962 interp
->imc_info
->asm_state
= yield
? AsmInYield
: AsmInReturn
;
967 =item C<static void set_lexical(PARROT_INTERP, SymReg *r, SymReg *name)>
974 set_lexical(PARROT_INTERP
, ARGMOD(SymReg
*r
), ARGMOD(SymReg
*name
))
976 ASSERT_ARGS(set_lexical
)
978 r
->usage
|= U_LEXICAL
;
981 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
982 "register %s already declared as lexical %s", r
->name
, name
->name
);
984 /* chain all names in r->reg */
987 name
->usage
|= U_LEXICAL
;
994 =item C<static void add_pcc_named_arg(PARROT_INTERP, SymReg *cur_call, SymReg
995 *name, SymReg *value)>
1002 add_pcc_named_arg(PARROT_INTERP
,
1003 ARGMOD(SymReg
*cur_call
),
1004 ARGMOD(SymReg
*name
),
1005 ARGMOD(SymReg
*value
))
1007 ASSERT_ARGS(add_pcc_named_arg
)
1008 name
->type
|= VT_NAMED
;
1010 add_pcc_arg(interp
, cur_call
, name
);
1011 add_pcc_arg(interp
, cur_call
, value
);
1016 =item C<static void add_pcc_named_arg_var(PARROT_INTERP, SymReg *cur_call,
1017 SymReg *name, SymReg *value)>
1024 add_pcc_named_arg_var(PARROT_INTERP
,
1025 ARGMOD(SymReg
*cur_call
),
1026 ARGMOD(SymReg
*name
),
1027 ARGMOD(SymReg
*value
))
1029 ASSERT_ARGS(add_pcc_named_arg_var
)
1030 name
->type
|= VT_NAMED
;
1031 add_pcc_arg(interp
, cur_call
, name
);
1032 add_pcc_arg(interp
, cur_call
, value
);
1037 =item C<static void add_pcc_named_result(PARROT_INTERP, SymReg *cur_call, SymReg
1038 *name, SymReg *value)>
1045 add_pcc_named_result(PARROT_INTERP
,
1046 ARGMOD(SymReg
*cur_call
),
1047 ARGMOD(SymReg
*name
),
1048 ARGMOD(SymReg
*value
))
1050 ASSERT_ARGS(add_pcc_named_result
)
1051 name
->type
|= VT_NAMED
;
1053 add_pcc_result(interp
, cur_call
, name
);
1054 add_pcc_result(interp
, cur_call
, value
);
1059 =item C<static void add_pcc_named_param(PARROT_INTERP, SymReg *cur_call, SymReg
1060 *name, SymReg *value)>
1067 add_pcc_named_param(PARROT_INTERP
,
1068 ARGMOD(SymReg
*cur_call
),
1069 ARGMOD(SymReg
*name
),
1070 ARGMOD(SymReg
*value
))
1072 ASSERT_ARGS(add_pcc_named_param
)
1073 name
->type
|= VT_NAMED
;
1075 add_pcc_arg(interp
, cur_call
, name
);
1076 add_pcc_arg(interp
, cur_call
, value
);
1081 =item C<static void add_pcc_named_return(PARROT_INTERP, SymReg *cur_call, SymReg
1082 *name, SymReg *value)>
1089 add_pcc_named_return(PARROT_INTERP
,
1090 ARGMOD(SymReg
*cur_call
),
1091 ARGMOD(SymReg
*name
),
1092 ARGMOD(SymReg
*value
))
1094 ASSERT_ARGS(add_pcc_named_return
)
1095 name
->type
|= VT_NAMED
;
1097 add_pcc_result(interp
, cur_call
, name
);
1098 add_pcc_result(interp
, cur_call
, value
);
1103 =item C<static void adv_named_set(PARROT_INTERP, const char *name)>
1105 Sets the name of the current named argument.
1107 C<adv_named_set_u> is the Unicode version of this function.
1114 adv_named_set(PARROT_INTERP
, ARGIN(const char *name
))
1116 ASSERT_ARGS(adv_named_set
)
1117 if (IMCC_INFO(interp
)->adv_named_id
)
1118 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
1119 "Named parameter with more than one name.\n");
1121 IMCC_INFO(interp
)->adv_named_id
= mk_const(interp
, name
, 'S');
1125 adv_named_set_u(PARROT_INTERP
, ARGIN(const char *name
))
1127 ASSERT_ARGS(adv_named_set_u
)
1128 if (IMCC_INFO(interp
)->adv_named_id
)
1129 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
1130 "Named parameter with more than one name.\n");
1132 IMCC_INFO(interp
)->adv_named_id
= mk_const(interp
, name
, 'U');
1137 =item C<static void do_loadlib(PARROT_INTERP, const char *lib)>
1144 do_loadlib(PARROT_INTERP
, ARGIN(const char *lib
))
1146 ASSERT_ARGS(do_loadlib
)
1147 STRING
* const s
= Parrot_str_unescape(interp
, lib
+ 1, '"', NULL
);
1148 PMC
*ignored
= Parrot_load_lib(interp
, s
, NULL
);
1150 Parrot_register_HLL_lib(interp
, s
);
1153 /* HEADERIZER STOP */
1157 /* Line 189 of yacc.c */
1158 #line 1148 "compilers/imcc/imcparser.c"
1160 /* Enabling traces. */
1165 /* Enabling verbose error messages. */
1166 #ifdef YYERROR_VERBOSE
1167 # undef YYERROR_VERBOSE
1168 # define YYERROR_VERBOSE 1
1170 # define YYERROR_VERBOSE 0
1173 /* Enabling the token table. */
1174 #ifndef YYTOKEN_TABLE
1175 # define YYTOKEN_TABLE 0
1181 # define YYTOKENTYPE
1182 /* Put the tokens into the symbol table, so that GDB and other debuggers
1222 CONCAT_ASSIGN
= 295,
1251 SHIFT_RIGHT_U
= 324,
1261 PCC_BEGIN_RETURN
= 334,
1262 PCC_END_RETURN
= 335,
1263 PCC_BEGIN_YIELD
= 336,
1264 PCC_END_YIELD
= 337,
1278 VTABLE_METHOD
= 351,
1280 SUB_INSTANCE_OF
= 353,
1308 #define LOW_PREC 258
1319 #define SET_RETURN 269
1320 #define SET_YIELD 270
1321 #define ADV_FLAT 271
1322 #define ADV_SLURPY 272
1323 #define ADV_OPTIONAL 273
1324 #define ADV_OPT_FLAG 274
1325 #define ADV_NAMED 275
1326 #define ADV_ARROW 276
1328 #define ADV_INVOCANT 278
1329 #define ADV_CALL_SIG 279
1330 #define NAMESPACE 280
1331 #define DOT_METHOD 281
1337 #define ANNOTATE 287
1340 #define GLOBAL_CONST 290
1341 #define PLUS_ASSIGN 291
1342 #define MINUS_ASSIGN 292
1343 #define MUL_ASSIGN 293
1344 #define DIV_ASSIGN 294
1345 #define CONCAT_ASSIGN 295
1346 #define BAND_ASSIGN 296
1347 #define BOR_ASSIGN 297
1348 #define BXOR_ASSIGN 298
1350 #define FDIV_ASSIGN 300
1351 #define MOD_ASSIGN 301
1352 #define SHR_ASSIGN 302
1353 #define SHL_ASSIGN 303
1354 #define SHR_U_ASSIGN 304
1355 #define SHIFT_LEFT 305
1356 #define SHIFT_RIGHT 306
1362 #define RELOP_EQ 312
1363 #define RELOP_NE 313
1364 #define RELOP_GT 314
1365 #define RELOP_GTE 315
1366 #define RELOP_LT 316
1367 #define RELOP_LTE 317
1370 #define TAILCALL 320
1372 #define GET_RESULTS 322
1374 #define SHIFT_RIGHT_U 324
1380 #define PCC_BEGIN 330
1382 #define PCC_CALL 332
1384 #define PCC_BEGIN_RETURN 334
1385 #define PCC_END_RETURN 335
1386 #define PCC_BEGIN_YIELD 336
1387 #define PCC_END_YIELD 337
1388 #define NCI_CALL 338
1389 #define METH_CALL 339
1390 #define INVOCANT 340
1394 #define IMMEDIATE 344
1395 #define POSTCOMP 345
1399 #define NEED_LEX 349
1401 #define VTABLE_METHOD 351
1403 #define SUB_INSTANCE_OF 353
1405 #define NS_ENTRY 355
1406 #define UNIQUE_REG 356
1414 #define IDENTIFIER 364
1421 #define USTRINGC 371
1422 #define PARROT_OP 372
1424 #define LINECOMMENT 374
1425 #define FILECOMMENT 375
1432 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1433 typedef union YYSTYPE
1436 /* Line 214 of yacc.c */
1437 #line 1075 "compilers/imcc/imcc.y"
1447 /* Line 214 of yacc.c */
1448 #line 1438 "compilers/imcc/imcparser.c"
1450 # define YYSTYPE_IS_TRIVIAL 1
1451 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
1452 # define YYSTYPE_IS_DECLARED 1
1456 /* Copy the second part of user declarations. */
1459 /* Line 264 of yacc.c */
1460 #line 1450 "compilers/imcc/imcparser.c"
1467 typedef YYTYPE_UINT8 yytype_uint8
;
1469 typedef unsigned char yytype_uint8
;
1473 typedef YYTYPE_INT8 yytype_int8
;
1474 #elif (defined __STDC__ || defined __C99__FUNC__ \
1475 || defined __cplusplus || defined _MSC_VER)
1476 typedef signed char yytype_int8
;
1478 typedef short int yytype_int8
;
1481 #ifdef YYTYPE_UINT16
1482 typedef YYTYPE_UINT16 yytype_uint16
;
1484 typedef unsigned short int yytype_uint16
;
1488 typedef YYTYPE_INT16 yytype_int16
;
1490 typedef short int yytype_int16
;
1494 # ifdef __SIZE_TYPE__
1495 # define YYSIZE_T __SIZE_TYPE__
1496 # elif defined size_t
1497 # define YYSIZE_T size_t
1498 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1499 || defined __cplusplus || defined _MSC_VER)
1500 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1501 # define YYSIZE_T size_t
1503 # define YYSIZE_T unsigned int
1507 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1512 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1513 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1517 # define YY_(msgid) msgid
1521 /* Suppress unused-variable warnings by "using" E. */
1522 #if ! defined lint || defined __GNUC__
1523 # define YYUSE(e) ((void) (e))
1525 # define YYUSE(e) /* empty */
1528 /* Identity function, used to suppress warnings about constant conditions. */
1530 # define YYID(n) (n)
1532 #if (defined __STDC__ || defined __C99__FUNC__ \
1533 || defined __cplusplus || defined _MSC_VER)
1546 #if ! defined yyoverflow || YYERROR_VERBOSE
1548 /* The parser invokes alloca or malloc; define the necessary symbols. */
1550 # ifdef YYSTACK_USE_ALLOCA
1551 # if YYSTACK_USE_ALLOCA
1553 # define YYSTACK_ALLOC __builtin_alloca
1554 # elif defined __BUILTIN_VA_ARG_INCR
1555 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1557 # define YYSTACK_ALLOC __alloca
1558 # elif defined _MSC_VER
1559 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1560 # define alloca _alloca
1562 # define YYSTACK_ALLOC alloca
1563 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1564 || defined __cplusplus || defined _MSC_VER)
1565 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1567 # define _STDLIB_H 1
1574 # ifdef YYSTACK_ALLOC
1575 /* Pacify GCC's `empty if-body' warning. */
1576 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1577 # ifndef YYSTACK_ALLOC_MAXIMUM
1578 /* The OS might guarantee only one guard page at the bottom of the stack,
1579 and a page size can be as small as 4096 bytes. So we cannot safely
1580 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1581 to allow for a few compiler-allocated temporary stack slots. */
1582 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1585 # define YYSTACK_ALLOC YYMALLOC
1586 # define YYSTACK_FREE YYFREE
1587 # ifndef YYSTACK_ALLOC_MAXIMUM
1588 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1590 # if (defined __cplusplus && ! defined _STDLIB_H \
1591 && ! ((defined YYMALLOC || defined malloc) \
1592 && (defined YYFREE || defined free)))
1593 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1595 # define _STDLIB_H 1
1599 # define YYMALLOC malloc
1600 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1601 || defined __cplusplus || defined _MSC_VER)
1602 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
1606 # define YYFREE free
1607 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1608 || defined __cplusplus || defined _MSC_VER)
1609 void free (void *); /* INFRINGES ON USER NAME SPACE */
1613 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1616 #if (! defined yyoverflow \
1617 && (! defined __cplusplus \
1618 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1620 /* A type that is properly aligned for any stack member. */
1623 yytype_int16 yyss_alloc
;
1627 /* The size of the maximum gap between one aligned stack and the next. */
1628 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1630 /* The size of an array large to enough to hold all stacks, each with
1632 # define YYSTACK_BYTES(N) \
1633 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1634 + YYSTACK_GAP_MAXIMUM)
1636 /* Copy COUNT objects from FROM to TO. The source and destination do
1639 # if defined __GNUC__ && 1 < __GNUC__
1640 # define YYCOPY(To, From, Count) \
1641 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1643 # define YYCOPY(To, From, Count) \
1647 for (yyi = 0; yyi < (Count); yyi++) \
1648 (To)[yyi] = (From)[yyi]; \
1654 /* Relocate STACK from its old location to the new one. The
1655 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1656 elements in the stack, and YYPTR gives the new location of the
1657 stack. Advance YYPTR to a properly aligned location for the next
1659 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1662 YYSIZE_T yynewbytes; \
1663 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1664 Stack = &yyptr->Stack_alloc; \
1665 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1666 yyptr += yynewbytes / sizeof (*yyptr); \
1672 /* YYFINAL -- State number of the termination state. */
1674 /* YYLAST -- Last index in YYTABLE. */
1677 /* YYNTOKENS -- Number of terminals. */
1678 #define YYNTOKENS 140
1679 /* YYNNTS -- Number of nonterminals. */
1681 /* YYNRULES -- Number of rules. */
1682 #define YYNRULES 339
1683 /* YYNRULES -- Number of states. */
1684 #define YYNSTATES 545
1686 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1687 #define YYUNDEFTOK 2
1688 #define YYMAXUTOK 377
1690 #define YYTRANSLATE(YYX) \
1691 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1693 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1694 static const yytype_uint8 yytranslate
[] =
1696 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1697 4, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1698 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1699 2, 2, 2, 130, 2, 2, 2, 136, 137, 2,
1700 127, 128, 134, 133, 2, 132, 2, 135, 2, 2,
1701 2, 2, 2, 2, 2, 2, 2, 2, 2, 139,
1702 2, 124, 2, 2, 2, 2, 2, 2, 2, 2,
1703 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1704 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1705 2, 125, 2, 126, 2, 2, 2, 2, 2, 2,
1706 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1707 129, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1708 2, 2, 2, 2, 138, 2, 131, 2, 2, 2,
1709 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1710 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1711 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1712 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1713 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1714 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1715 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1716 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1717 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1718 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1719 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1720 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1721 2, 2, 2, 2, 2, 2, 1, 2, 3, 5,
1722 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1723 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1724 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1725 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
1726 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1727 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1728 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1729 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1730 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1731 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1732 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
1733 116, 117, 118, 119, 120, 121, 122, 123
1737 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1739 static const yytype_uint16 yyprhs
[] =
1741 0, 0, 3, 5, 7, 10, 12, 14, 16, 18,
1742 21, 23, 25, 27, 30, 34, 40, 44, 49, 52,
1743 53, 60, 61, 68, 69, 76, 78, 80, 82, 85,
1744 89, 92, 94, 96, 98, 100, 102, 103, 107, 108,
1745 113, 116, 121, 122, 124, 125, 130, 131, 133, 137,
1746 141, 144, 145, 146, 147, 158, 159, 161, 165, 166,
1747 170, 174, 179, 184, 189, 191, 196, 198, 203, 205,
1748 210, 215, 217, 222, 223, 227, 229, 231, 233, 235,
1749 237, 239, 241, 245, 246, 248, 249, 259, 260, 263,
1750 264, 268, 269, 271, 273, 276, 278, 280, 282, 284,
1751 286, 288, 290, 292, 294, 296, 298, 300, 302, 304,
1752 310, 314, 318, 322, 326, 332, 338, 339, 343, 346,
1753 347, 351, 355, 356, 361, 362, 365, 367, 369, 371,
1754 373, 378, 383, 385, 387, 388, 394, 396, 397, 403,
1755 404, 407, 411, 412, 415, 419, 423, 427, 428, 434,
1756 436, 438, 439, 441, 445, 449, 455, 457, 460, 461,
1757 464, 467, 469, 471, 473, 475, 476, 478, 481, 483,
1758 485, 489, 492, 494, 498, 501, 502, 504, 506, 508,
1759 509, 514, 519, 524, 525, 532, 534, 535, 542, 545,
1760 548, 551, 554, 556, 558, 560, 562, 563, 565, 567,
1761 569, 571, 573, 577, 582, 588, 595, 602, 610, 614,
1762 615, 625, 627, 629, 631, 635, 637, 639, 641, 643,
1763 645, 647, 649, 651, 653, 655, 657, 659, 661, 663,
1764 665, 667, 669, 671, 673, 675, 677, 679, 681, 683,
1765 685, 687, 688, 694, 698, 700, 702, 704, 706, 708,
1766 710, 712, 714, 716, 718, 720, 722, 724, 729, 731,
1767 733, 735, 737, 741, 745, 749, 753, 754, 760, 761,
1768 765, 767, 773, 777, 781, 784, 785, 788, 790, 792,
1769 794, 799, 804, 807, 811, 817, 819, 823, 824, 826,
1770 828, 835, 841, 846, 851, 858, 864, 866, 868, 870,
1771 872, 874, 876, 878, 880, 882, 884, 885, 887, 891,
1772 893, 895, 900, 904, 906, 908, 910, 912, 914, 916,
1773 918, 920, 922, 924, 926, 927, 930, 931, 934, 936,
1774 940, 942, 944, 946, 948, 950, 952, 954, 956, 958
1777 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1778 static const yytype_int16 yyrhs
[] =
1780 141, 0, -1, 142, -1, 143, -1, 142, 143, -1,
1781 163, -1, 148, -1, 165, -1, 160, -1, 112, 4,
1782 -1, 144, -1, 145, -1, 4, -1, 147, 4, -1,
1783 98, 114, 4, -1, 8, 115, 73, 114, 4, -1,
1784 9, 114, 4, -1, 33, 114, 73, 265, -1, 7,
1785 114, -1, -1, 32, 149, 224, 110, 124, 265, -1,
1786 -1, 32, 151, 115, 256, 124, 153, -1, -1, 32,
1787 152, 114, 256, 124, 153, -1, 114, -1, 117, -1,
1788 155, -1, 154, 155, -1, 213, 156, 4, -1, 112,
1789 4, -1, 121, -1, 120, -1, 163, -1, 150, -1,
1790 144, -1, -1, 157, 118, 159, -1, -1, 79, 158,
1791 187, 103, -1, 14, 257, -1, 31, 114, 73, 111,
1792 -1, -1, 250, -1, -1, 104, 161, 162, 105, -1,
1793 -1, 154, -1, 26, 164, 4, -1, 125, 258, 126,
1794 -1, 125, 126, -1, -1, -1, -1, 28, 166, 253,
1795 167, 187, 4, 168, 169, 182, 74, -1, -1, 4,
1796 -1, 169, 170, 4, -1, -1, 5, 171, 172, -1,
1797 224, 110, 196, -1, 96, 127, 180, 128, -1, 94,
1798 127, 114, 128, -1, 94, 127, 110, 128, -1, 97,
1799 -1, 97, 127, 114, 128, -1, 92, -1, 92, 127,
1800 153, 128, -1, 101, -1, 101, 127, 153, 128, -1,
1801 99, 127, 114, 128, -1, 100, -1, 100, 127, 153,
1802 128, -1, -1, 180, 73, 181, -1, 181, -1, 53,
1803 -1, 54, -1, 56, -1, 55, -1, 110, -1, 114,
1804 -1, 125, 258, 126, -1, -1, 210, -1, -1, 76,
1805 4, 184, 191, 186, 190, 185, 193, 77, -1, -1,
1806 215, 4, -1, -1, 86, 257, 4, -1, -1, 188,
1807 -1, 189, -1, 188, 189, -1, 88, -1, 89, -1,
1808 87, -1, 90, -1, 91, -1, 93, -1, 95, -1,
1809 173, -1, 174, -1, 175, -1, 176, -1, 177, -1,
1810 178, -1, 179, -1, 78, 257, 73, 257, 4, -1,
1811 78, 257, 4, -1, 84, 257, 4, -1, 85, 249,
1812 4, -1, 85, 114, 4, -1, 85, 249, 73, 257,
1813 4, -1, 85, 114, 73, 257, 4, -1, -1, 191,
1814 192, 4, -1, 11, 239, -1, -1, 193, 194, 4,
1815 -1, 64, 249, 196, -1, -1, 30, 195, 224, 218,
1816 -1, -1, 196, 197, -1, 18, -1, 19, -1, 20,
1817 -1, 21, -1, 21, 127, 114, 128, -1, 21, 127,
1818 117, 128, -1, 102, -1, 25, -1, -1, 80, 4,
1819 199, 202, 81, -1, 206, -1, -1, 82, 4, 201,
1820 203, 83, -1, -1, 202, 4, -1, 202, 204, 4,
1821 -1, -1, 203, 4, -1, 203, 205, 4, -1, 15,
1822 257, 240, -1, 16, 257, 240, -1, -1, 208, 127,
1823 207, 209, 128, -1, 65, -1, 67, -1, -1, 239,
1824 -1, 114, 22, 257, -1, 209, 73, 239, -1, 209,
1825 73, 114, 22, 257, -1, 212, -1, 210, 212, -1,
1826 -1, 211, 216, -1, 112, 4, -1, 121, -1, 120,
1827 -1, 145, -1, 146, -1, -1, 214, -1, 214, 215,
1828 -1, 215, -1, 103, -1, 213, 220, 4, -1, 1,
1829 4, -1, 218, -1, 217, 73, 218, -1, 110, 219,
1830 -1, -1, 102, -1, 226, -1, 244, -1, -1, 30,
1831 221, 224, 217, -1, 31, 114, 73, 249, -1, 31,
1832 117, 73, 249, -1, -1, 32, 222, 224, 110, 124,
1833 265, -1, 150, -1, -1, 36, 223, 224, 110, 124,
1834 265, -1, 66, 236, -1, 10, 255, -1, 118, 250,
1835 -1, 14, 257, -1, 236, -1, 183, -1, 198, -1,
1836 200, -1, -1, 53, -1, 54, -1, 55, -1, 56,
1837 -1, 110, -1, 249, 124, 257, -1, 249, 124, 228,
1838 257, -1, 249, 124, 257, 229, 257, -1, 249, 124,
1839 257, 125, 258, 126, -1, 249, 125, 258, 126, 124,
1840 257, -1, 249, 124, 129, 225, 125, 258, 126, -1,
1841 249, 124, 236, -1, -1, 127, 227, 243, 128, 124,
1842 235, 127, 238, 128, -1, 230, -1, 232, -1, 234,
1843 -1, 249, 124, 14, -1, 130, -1, 131, -1, 132,
1844 -1, 132, -1, 133, -1, 134, -1, 135, -1, 136,
1845 -1, 45, -1, 69, -1, 123, -1, 58, -1, 59,
1846 -1, 60, -1, 61, -1, 62, -1, 63, -1, 51,
1847 -1, 52, -1, 70, -1, 71, -1, 72, -1, 57,
1848 -1, 137, -1, 138, -1, 131, -1, -1, 68, 231,
1849 127, 243, 128, -1, 249, 233, 257, -1, 37, -1,
1850 38, -1, 39, -1, 40, -1, 47, -1, 46, -1,
1851 41, -1, 42, -1, 43, -1, 44, -1, 48, -1,
1852 49, -1, 50, -1, 249, 124, 118, 159, -1, 110,
1853 -1, 114, -1, 117, -1, 249, -1, 249, 122, 254,
1854 -1, 249, 122, 117, -1, 249, 122, 114, -1, 249,
1855 122, 249, -1, -1, 235, 237, 127, 238, 128, -1,
1856 -1, 238, 73, 239, -1, 239, -1, 238, 73, 114,
1857 22, 257, -1, 257, 22, 257, -1, 114, 22, 257,
1858 -1, 257, 240, -1, -1, 240, 241, -1, 17, -1,
1859 21, -1, 25, -1, 21, 127, 117, 128, -1, 21,
1860 127, 114, 128, -1, 249, 196, -1, 243, 73, 242,
1861 -1, 243, 73, 114, 22, 249, -1, 242, -1, 114,
1862 22, 249, -1, -1, 246, -1, 245, -1, 13, 257,
1863 248, 257, 10, 255, -1, 13, 14, 257, 10, 255,
1864 -1, 13, 257, 247, 255, -1, 12, 257, 247, 255,
1865 -1, 12, 257, 248, 257, 10, 255, -1, 12, 14,
1866 257, 10, 255, -1, 73, -1, 10, -1, 58, -1,
1867 59, -1, 60, -1, 61, -1, 62, -1, 63, -1,
1868 119, -1, 264, -1, -1, 251, -1, 251, 73, 252,
1869 -1, 252, -1, 256, -1, 249, 125, 258, 126, -1,
1870 125, 260, 126, -1, 254, -1, 114, -1, 117, -1,
1871 110, -1, 118, -1, 110, -1, 118, -1, 255, -1,
1872 257, -1, 249, -1, 265, -1, -1, 259, 262, -1,
1873 -1, 261, 262, -1, 263, -1, 262, 139, 263, -1,
1874 257, -1, 106, -1, 107, -1, 108, -1, 109, -1,
1875 111, -1, 115, -1, 116, -1, 114, -1, 117, -1
1878 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1879 static const yytype_uint16 yyrline
[] =
1881 0, 1170, 1170, 1174, 1175, 1179, 1180, 1181, 1187, 1193,
1882 1194, 1195, 1196, 1200, 1201, 1210, 1216, 1224, 1236, 1249,
1883 1249, 1258, 1258, 1265, 1265, 1274, 1275, 1279, 1280, 1284,
1884 1285, 1286, 1287, 1288, 1289, 1290, 1293, 1293, 1302, 1301,
1885 1314, 1318, 1331, 1335, 1339, 1339, 1351, 1353, 1357, 1372,
1886 1376, 1381, 1385, 1389, 1380, 1401, 1402, 1403, 1416, 1416,
1887 1420, 1446, 1450, 1456, 1465, 1471, 1480, 1486, 1495, 1501,
1888 1510, 1518, 1523, 1534, 1537, 1542, 1550, 1551, 1552, 1553,
1889 1554, 1565, 1576, 1579, 1581, 1586, 1585, 1618, 1619, 1623,
1890 1624, 1628, 1629, 1633, 1634, 1638, 1639, 1640, 1641, 1642,
1891 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1655,
1892 1660, 1664, 1669, 1673, 1677, 1682, 1691, 1692, 1696, 1701,
1893 1702, 1710, 1711, 1711, 1726, 1727, 1731, 1732, 1733, 1734,
1894 1735, 1736, 1737, 1738, 1743, 1743, 1746, 1754, 1754, 1760,
1895 1761, 1766, 1774, 1775, 1780, 1788, 1792, 1797, 1796, 1809,
1896 1810, 1814, 1815, 1825, 1830, 1840, 1849, 1850, 1862, 1866,
1897 1868, 1869, 1870, 1871, 1872, 1876, 1877, 1881, 1882, 1886,
1898 1897, 1898, 1909, 1916, 1925, 1935, 1936, 1941, 1942, 1943,
1899 1943, 1959, 1976, 1989, 1989, 1996, 1997, 1997, 2003, 2009,
1900 2013, 2025, 2026, 2027, 2028, 2029, 2030, 2034, 2035, 2036,
1901 2037, 2041, 2054, 2056, 2058, 2060, 2062, 2067, 2070, 2077,
1902 2076, 2085, 2086, 2087, 2088, 2096, 2097, 2098, 2102, 2103,
1903 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113,
1904 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123,
1905 2124, 2130, 2129, 2141, 2146, 2147, 2148, 2149, 2150, 2151,
1906 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2163, 2174, 2175,
1907 2176, 2177, 2183, 2197, 2203, 2209, 2215, 2214, 2223, 2224,
1908 2234, 2244, 2251, 2256, 2266, 2270, 2271, 2275, 2276, 2277,
1909 2280, 2281, 2285, 2289, 2299, 2305, 2315, 2320, 2324, 2325,
1910 2329, 2333, 2337, 2344, 2348, 2352, 2359, 2360, 2364, 2365,
1911 2366, 2367, 2368, 2369, 2373, 2374, 2378, 2379, 2383, 2384,
1912 2388, 2389, 2396, 2403, 2404, 2405, 2409, 2410, 2414, 2415,
1913 2419, 2420, 2424, 2425, 2429, 2429, 2441, 2441, 2453, 2454,
1914 2462, 2469, 2470, 2471, 2472, 2473, 2477, 2478, 2479, 2480
1918 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1919 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1920 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1921 static const char *const yytname
[] =
1923 "$end", "error", "$undefined", "LOW_PREC", "'\\n'", "PARAM", "SOL",
1924 "HLL", "TK_LINE", "TK_FILE", "GOTO", "ARG", "IF", "UNLESS", "PNULL",
1925 "SET_RETURN", "SET_YIELD", "ADV_FLAT", "ADV_SLURPY", "ADV_OPTIONAL",
1926 "ADV_OPT_FLAG", "ADV_NAMED", "ADV_ARROW", "NEW", "ADV_INVOCANT",
1927 "ADV_CALL_SIG", "NAMESPACE", "DOT_METHOD", "SUB", "SYM", "LOCAL",
1928 "LEXICAL", "CONST", "ANNOTATE", "INC", "DEC", "GLOBAL_CONST",
1929 "PLUS_ASSIGN", "MINUS_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN",
1930 "CONCAT_ASSIGN", "BAND_ASSIGN", "BOR_ASSIGN", "BXOR_ASSIGN", "FDIV",
1931 "FDIV_ASSIGN", "MOD_ASSIGN", "SHR_ASSIGN", "SHL_ASSIGN", "SHR_U_ASSIGN",
1932 "SHIFT_LEFT", "SHIFT_RIGHT", "INTV", "FLOATV", "STRINGV", "PMCV",
1933 "LOG_XOR", "RELOP_EQ", "RELOP_NE", "RELOP_GT", "RELOP_GTE", "RELOP_LT",
1934 "RELOP_LTE", "RESULT", "RETURN", "TAILCALL", "YIELDT", "GET_RESULTS",
1935 "POW", "SHIFT_RIGHT_U", "LOG_AND", "LOG_OR", "COMMA", "ESUB", "DOTDOT",
1936 "PCC_BEGIN", "PCC_END", "PCC_CALL", "PCC_SUB", "PCC_BEGIN_RETURN",
1937 "PCC_END_RETURN", "PCC_BEGIN_YIELD", "PCC_END_YIELD", "NCI_CALL",
1938 "METH_CALL", "INVOCANT", "MAIN", "LOAD", "INIT", "IMMEDIATE", "POSTCOMP",
1939 "METHOD", "ANON", "OUTER", "NEED_LEX", "MULTI", "VTABLE_METHOD",
1940 "LOADLIB", "SUB_INSTANCE_OF", "SUBID", "NS_ENTRY", "UNIQUE_REG", "LABEL",
1941 "EMIT", "EOM", "IREG", "NREG", "SREG", "PREG", "IDENTIFIER", "REG",
1942 "MACRO", "ENDM", "STRINGC", "INTC", "FLOATC", "USTRINGC", "PARROT_OP",
1943 "VAR", "LINECOMMENT", "FILECOMMENT", "DOT", "CONCAT", "'='", "'['",
1944 "']'", "'('", "')'", "'n'", "'!'", "'~'", "'-'", "'+'", "'*'", "'/'",
1945 "'%'", "'&'", "'|'", "';'", "$accept", "program", "compilation_units",
1946 "compilation_unit", "pragma", "location_directive", "annotate_directive",
1947 "hll_def", "constdef", "$@1", "pmc_const", "$@2", "$@3", "any_string",
1948 "pasmcode", "pasmline", "pasm_inst", "$@4", "$@5", "pasm_args", "emit",
1949 "$@6", "opt_pasmcode", "class_namespace", "maybe_ns", "sub", "$@7",
1950 "$@8", "$@9", "sub_params", "sub_param", "$@10", "sub_param_type_def",
1951 "multi", "outer", "vtable", "method", "ns_entry_name", "instanceof",
1952 "subid", "multi_types", "multi_type", "sub_body", "pcc_sub_call", "@11",
1953 "opt_label", "opt_invocant", "sub_proto", "sub_proto_list", "proto",
1954 "pcc_call", "pcc_args", "pcc_arg", "pcc_results", "pcc_result", "$@12",
1955 "paramtype_list", "paramtype", "pcc_ret", "$@13", "pcc_yield", "$@14",
1956 "pcc_returns", "pcc_yields", "pcc_return", "pcc_set_yield",
1957 "pcc_return_many", "$@15", "return_or_yield", "var_returns",
1958 "statements", "helper_clear_state", "statement", "labels", "_labels",
1959 "label", "instruction", "id_list", "id_list_id", "opt_unique_reg",
1960 "labeled_inst", "$@16", "$@17", "$@18", "type", "classname",
1961 "assignment", "@19", "un_op", "bin_op", "get_results", "@20",
1962 "op_assign", "assign_op", "func_assign", "the_sub", "sub_call", "@21",
1963 "arglist", "arg", "argtype_list", "argtype", "result", "targetlist",
1964 "conditional_statement", "unless_statement", "if_statement",
1965 "comma_or_goto", "relop", "target", "vars", "_vars", "_var_or_i",
1966 "sub_label_op_c", "sub_label_op", "label_op", "var_or_i", "var",
1967 "keylist", "$@22", "keylist_force", "$@23", "_keylist", "key", "reg",
1973 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1975 static const yytype_uint16 yytoknum
[] =
1977 0, 256, 257, 258, 10, 259, 260, 261, 262, 263,
1978 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
1979 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
1980 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
1981 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
1982 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
1983 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
1984 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
1985 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
1986 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
1987 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
1988 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
1989 374, 375, 376, 377, 61, 91, 93, 40, 41, 110,
1990 33, 126, 45, 43, 42, 47, 37, 38, 124, 59
1994 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1995 static const yytype_uint16 yyr1
[] =
1997 0, 140, 141, 142, 142, 143, 143, 143, 143, 143,
1998 143, 143, 143, 144, 144, 145, 145, 146, 147, 149,
1999 148, 151, 150, 152, 150, 153, 153, 154, 154, 155,
2000 155, 155, 155, 155, 155, 155, 157, 156, 158, 156,
2001 156, 156, 156, 159, 161, 160, 162, 162, 163, 164,
2002 164, 166, 167, 168, 165, 169, 169, 169, 171, 170,
2003 172, 173, 174, 174, 175, 175, 176, 176, 177, 177,
2004 178, 179, 179, 180, 180, 180, 181, 181, 181, 181,
2005 181, 181, 181, 182, 182, 184, 183, 185, 185, 186,
2006 186, 187, 187, 188, 188, 189, 189, 189, 189, 189,
2007 189, 189, 189, 189, 189, 189, 189, 189, 189, 190,
2008 190, 190, 190, 190, 190, 190, 191, 191, 192, 193,
2009 193, 194, 195, 194, 196, 196, 197, 197, 197, 197,
2010 197, 197, 197, 197, 199, 198, 198, 201, 200, 202,
2011 202, 202, 203, 203, 203, 204, 205, 207, 206, 208,
2012 208, 209, 209, 209, 209, 209, 210, 210, 211, 212,
2013 212, 212, 212, 212, 212, 213, 213, 214, 214, 215,
2014 216, 216, 217, 217, 218, 219, 219, 220, 220, 221,
2015 220, 220, 220, 222, 220, 220, 223, 220, 220, 220,
2016 220, 220, 220, 220, 220, 220, 220, 224, 224, 224,
2017 224, 225, 226, 226, 226, 226, 226, 226, 226, 227,
2018 226, 226, 226, 226, 226, 228, 228, 228, 229, 229,
2019 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2020 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
2021 229, 231, 230, 232, 233, 233, 233, 233, 233, 233,
2022 233, 233, 233, 233, 233, 233, 233, 234, 235, 235,
2023 235, 235, 235, 235, 235, 235, 237, 236, 238, 238,
2024 238, 238, 238, 238, 239, 240, 240, 241, 241, 241,
2025 241, 241, 242, 243, 243, 243, 243, 243, 244, 244,
2026 245, 245, 245, 246, 246, 246, 247, 247, 248, 248,
2027 248, 248, 248, 248, 249, 249, 250, 250, 251, 251,
2028 252, 252, 252, 253, 253, 253, 254, 254, 255, 255,
2029 256, 256, 257, 257, 259, 258, 261, 260, 262, 262,
2030 263, 264, 264, 264, 264, 264, 265, 265, 265, 265
2033 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2034 static const yytype_uint8 yyr2
[] =
2036 0, 2, 1, 1, 2, 1, 1, 1, 1, 2,
2037 1, 1, 1, 2, 3, 5, 3, 4, 2, 0,
2038 6, 0, 6, 0, 6, 1, 1, 1, 2, 3,
2039 2, 1, 1, 1, 1, 1, 0, 3, 0, 4,
2040 2, 4, 0, 1, 0, 4, 0, 1, 3, 3,
2041 2, 0, 0, 0, 10, 0, 1, 3, 0, 3,
2042 3, 4, 4, 4, 1, 4, 1, 4, 1, 4,
2043 4, 1, 4, 0, 3, 1, 1, 1, 1, 1,
2044 1, 1, 3, 0, 1, 0, 9, 0, 2, 0,
2045 3, 0, 1, 1, 2, 1, 1, 1, 1, 1,
2046 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
2047 3, 3, 3, 3, 5, 5, 0, 3, 2, 0,
2048 3, 3, 0, 4, 0, 2, 1, 1, 1, 1,
2049 4, 4, 1, 1, 0, 5, 1, 0, 5, 0,
2050 2, 3, 0, 2, 3, 3, 3, 0, 5, 1,
2051 1, 0, 1, 3, 3, 5, 1, 2, 0, 2,
2052 2, 1, 1, 1, 1, 0, 1, 2, 1, 1,
2053 3, 2, 1, 3, 2, 0, 1, 1, 1, 0,
2054 4, 4, 4, 0, 6, 1, 0, 6, 2, 2,
2055 2, 2, 1, 1, 1, 1, 0, 1, 1, 1,
2056 1, 1, 3, 4, 5, 6, 6, 7, 3, 0,
2057 9, 1, 1, 1, 3, 1, 1, 1, 1, 1,
2058 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2059 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2060 1, 0, 5, 3, 1, 1, 1, 1, 1, 1,
2061 1, 1, 1, 1, 1, 1, 1, 4, 1, 1,
2062 1, 1, 3, 3, 3, 3, 0, 5, 0, 3,
2063 1, 5, 3, 3, 2, 0, 2, 1, 1, 1,
2064 4, 4, 2, 3, 5, 1, 3, 0, 1, 1,
2065 6, 5, 4, 4, 6, 5, 1, 1, 1, 1,
2066 1, 1, 1, 1, 1, 1, 0, 1, 3, 1,
2067 1, 4, 3, 1, 1, 1, 1, 1, 1, 1,
2068 1, 1, 1, 1, 0, 2, 0, 2, 1, 3,
2069 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2072 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2073 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2074 means the default is an error. */
2075 static const yytype_uint16 yydefact
[] =
2077 0, 12, 0, 0, 0, 0, 51, 19, 0, 44,
2078 0, 0, 2, 3, 10, 11, 0, 6, 8, 5,
2079 7, 18, 0, 0, 324, 0, 0, 0, 0, 165,
2080 9, 1, 4, 13, 0, 16, 50, 0, 0, 48,
2081 316, 314, 315, 317, 52, 313, 197, 198, 199, 200,
2082 0, 14, 21, 169, 0, 32, 31, 35, 34, 165,
2083 27, 0, 33, 36, 166, 168, 0, 49, 331, 332,
2084 333, 334, 335, 338, 336, 337, 339, 304, 322, 330,
2085 325, 328, 305, 323, 91, 0, 0, 0, 30, 28,
2086 45, 0, 0, 38, 0, 0, 167, 15, 0, 97,
2087 95, 96, 98, 99, 66, 100, 0, 101, 0, 64,
2088 0, 71, 68, 102, 103, 104, 105, 106, 107, 108,
2089 0, 92, 93, 0, 0, 0, 40, 0, 91, 29,
2090 306, 329, 0, 0, 73, 0, 0, 0, 0, 53,
2091 94, 20, 318, 319, 320, 0, 321, 0, 0, 0,
2092 326, 37, 322, 43, 307, 309, 310, 25, 26, 0,
2093 0, 0, 76, 77, 79, 78, 80, 81, 324, 0,
2094 75, 0, 0, 0, 0, 55, 0, 0, 41, 39,
2095 0, 0, 324, 0, 67, 63, 62, 0, 0, 61,
2096 65, 70, 72, 69, 56, 158, 22, 24, 312, 327,
2097 0, 308, 82, 74, 58, 0, 0, 162, 161, 163,
2098 164, 0, 0, 158, 0, 156, 311, 0, 0, 160,
2099 57, 54, 157, 0, 196, 159, 59, 0, 0, 171,
2100 0, 0, 0, 0, 179, 0, 183, 186, 149, 0,
2101 150, 241, 0, 0, 0, 258, 259, 260, 306, 209,
2102 185, 193, 194, 195, 136, 0, 0, 177, 211, 212,
2103 213, 266, 192, 178, 289, 288, 261, 124, 17, 189,
2104 0, 0, 0, 0, 191, 0, 0, 0, 0, 0,
2105 188, 261, 0, 85, 134, 137, 190, 287, 147, 170,
2106 0, 244, 245, 246, 247, 250, 251, 252, 253, 249,
2107 248, 254, 255, 256, 0, 0, 324, 0, 60, 0,
2108 297, 298, 299, 300, 301, 302, 303, 296, 0, 0,
2109 0, 0, 0, 0, 0, 0, 0, 0, 287, 116,
2110 139, 142, 0, 285, 0, 124, 151, 268, 264, 263,
2111 265, 262, 214, 338, 339, 306, 0, 215, 216, 217,
2112 0, 208, 322, 202, 0, 243, 126, 127, 128, 129,
2113 133, 132, 125, 0, 293, 0, 0, 292, 0, 175,
2114 180, 172, 181, 182, 0, 0, 0, 89, 0, 0,
2115 0, 0, 0, 282, 338, 0, 152, 275, 338, 0,
2116 270, 275, 257, 201, 0, 203, 223, 232, 233, 237,
2117 226, 227, 228, 229, 230, 231, 224, 234, 235, 236,
2118 225, 324, 240, 218, 219, 220, 221, 222, 238, 239,
2119 0, 0, 0, 295, 0, 291, 0, 176, 174, 0,
2120 0, 0, 242, 0, 0, 0, 0, 140, 0, 135,
2121 0, 143, 0, 138, 0, 286, 0, 283, 0, 0,
2122 0, 148, 274, 0, 0, 267, 0, 324, 0, 204,
2123 0, 0, 0, 294, 290, 173, 184, 187, 118, 0,
2124 0, 0, 0, 87, 117, 275, 141, 275, 144, 0,
2125 0, 153, 338, 154, 277, 278, 279, 276, 273, 338,
2126 269, 272, 0, 205, 206, 130, 131, 90, 0, 0,
2127 0, 0, 119, 0, 145, 146, 284, 268, 0, 0,
2128 0, 207, 110, 0, 111, 113, 0, 112, 0, 0,
2129 88, 0, 155, 0, 0, 271, 0, 0, 0, 122,
2130 0, 86, 0, 210, 281, 280, 109, 115, 114, 0,
2131 124, 120, 0, 121, 123
2134 /* YYDEFGOTO[NTERM-NUM]. */
2135 static const yytype_int16 yydefgoto
[] =
2137 -1, 11, 12, 13, 14, 15, 210, 16, 17, 27,
2138 58, 86, 87, 159, 59, 60, 94, 95, 128, 151,
2139 18, 29, 61, 19, 25, 20, 26, 84, 175, 195,
2140 211, 217, 226, 113, 114, 115, 116, 117, 118, 119,
2141 169, 170, 212, 251, 329, 502, 435, 120, 121, 122,
2142 473, 377, 436, 519, 532, 539, 308, 362, 252, 330,
2143 253, 331, 378, 379, 440, 444, 254, 336, 255, 385,
2144 213, 214, 215, 63, 64, 65, 225, 370, 371, 428,
2145 256, 275, 278, 279, 50, 394, 257, 287, 350, 420,
2146 258, 282, 259, 307, 260, 261, 262, 290, 389, 390,
2147 452, 487, 333, 334, 263, 264, 265, 318, 319, 78,
2148 153, 154, 155, 44, 45, 144, 156, 146, 37, 38,
2149 180, 181, 80, 81, 82, 83
2152 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2154 #define YYPACT_NINF -424
2155 static const yytype_int16 yypact
[] =
2157 212, -424, -90, -80, -21, -28, -424, -424, 9, -424,
2158 118, 151, 212, -424, -424, -424, 149, -424, -424, -424,
2159 -424, -424, 93, 153, 32, 163, 154, 125, 171, 180,
2160 -424, -424, -424, -424, 68, -424, -424, 66, 441, -424,
2161 -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
2162 94, -424, 89, -424, 204, -424, -424, -424, -424, 247,
2163 -424, 104, -424, 13, 108, -424, 209, -424, -424, -424,
2164 -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
2165 75, -424, -424, -424, 483, 91, 103, 114, -424, -424,
2166 -424, 441, 115, -424, 226, 113, -424, -424, 441, -424,
2167 -424, -424, -424, -424, 106, -424, 109, -424, 119, 121,
2168 122, 123, 124, -424, -424, -424, -424, -424, -424, -424,
2169 231, 483, -424, 74, 255, 255, -424, 172, 483, -424,
2170 426, -424, -40, -69, 387, 141, 142, -40, -40, -424,
2171 -424, -424, -424, -424, -424, 133, -424, 134, 152, 159,
2172 -424, -424, 145, -424, 193, -424, -424, -424, -424, 146,
2173 147, 148, -424, -424, -424, -424, -424, -424, -424, -58,
2174 -424, 160, 161, 162, 174, 273, -40, -40, -424, -424,
2175 156, 441, -424, 426, -424, -424, -424, 165, 387, -424,
2176 -424, -424, -424, -424, -424, 29, -424, -424, -424, 75,
2177 177, -424, -424, -424, -424, 166, 283, -424, -424, -424,
2178 -424, 300, 232, 34, 18, -424, -424, 125, 234, -424,
2179 -424, -424, -424, 304, 229, -424, -424, 203, 74, -424,
2180 -85, 272, 320, 441, -424, -7, 24, -424, -424, 535,
2181 -424, -424, 313, 314, 315, -424, -424, -424, 426, -424,
2182 -424, -424, -424, -424, -424, 194, 318, -424, -424, -424,
2183 -424, -424, -424, -424, -424, -424, 444, -424, -424, -424,
2184 441, 164, 441, 164, -424, 125, 250, 253, 125, 125,
2185 -424, 205, 215, -424, -424, -424, -424, 549, -424, -424,
2186 227, -424, -424, -424, -424, -424, -424, -424, -424, -424,
2187 -424, -424, -424, -424, 396, 54, -424, 441, 38, 322,
2188 -424, -424, -424, -424, -424, -424, -424, -424, -85, 441,
2189 339, -85, 441, 243, 222, 222, 245, 248, 549, -424,
2190 -424, -424, 335, -424, -47, -424, 479, 493, -424, -424,
2191 -424, -424, -424, 233, 249, 426, 265, -424, -424, -424,
2192 441, -424, -18, 393, 251, -424, -424, -424, -424, 257,
2193 -424, -424, -424, -85, -424, 375, -85, -424, 380, 290,
2194 321, -424, -424, -424, 269, 274, -37, 2, 8, 4,
2195 222, 558, 275, 38, 379, -33, -424, -424, 381, -27,
2196 -424, 383, -424, -424, 281, -424, -424, -424, -424, -424,
2197 -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
2198 -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
2199 441, 284, 84, -424, -85, -424, -85, -424, -424, 243,
2200 74, 74, -424, 441, 441, -12, 403, -424, 441, -424,
2201 405, -424, 441, -424, 409, -424, 392, -424, 535, 441,
2202 507, -424, 131, 441, 521, -424, 441, -424, 271, -424,
2203 441, 289, 291, -424, -424, -424, -424, -424, -424, 416,
2204 441, 441, 567, 108, -424, -424, -424, -424, -424, 222,
2205 294, -424, 401, -424, -424, 297, -424, -424, -424, 408,
2206 -424, -424, 299, -424, -424, -424, -424, -424, 5, 442,
2207 6, 17, -424, 443, 131, 131, -424, 493, 441, 85,
2208 441, -424, -424, 441, -424, -424, 441, -424, 441, 41,
2209 -424, -22, -424, 329, 330, -424, 445, 455, 456, -424,
2210 222, -424, 457, -424, -424, -424, -424, -424, -424, 125,
2211 -424, -424, 243, 38, -424
2214 /* YYPGOTO[NTERM-NUM]. */
2215 static const yytype_int16 yypgoto
[] =
2217 -424, -424, -424, 436, 10, -166, -424, -424, -424, -424,
2218 242, -424, -424, -62, -424, 412, -424, -424, -424, 128,
2219 -424, -424, -424, 23, -424, -424, -424, -424, -424, -424,
2220 -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
2221 -424, 279, -424, -424, -424, -424, -424, 340, -424, 353,
2222 -424, -424, -424, -424, -424, -424, -330, -424, -424, -424,
2223 -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
2224 -424, -424, 263, 282, -424, -63, -424, -424, -423, -424,
2225 -424, -424, -424, -424, -214, -424, -424, -424, -424, -424,
2226 -424, -424, -424, -424, -424, 31, -225, -424, -30, -320,
2227 -344, -424, 117, 167, -424, -424, -424, 216, 235, -128,
2228 252, -424, 316, -424, 207, -219, -8, -38, -164, -424,
2229 -424, -424, 328, 419, -424, -116
2232 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2233 positive, shift that token. If negative, reduce the rule which
2234 number is the opposite. If zero, do what YYDEFACT says.
2235 If YYTABLE_NINF, syntax error. */
2236 #define YYTABLE_NINF -262
2237 static const yytype_int16 yytable
[] =
2239 79, 96, 152, 227, 187, 383, 465, 141, 441, 512,
2240 515, 269, 437, 433, 280, 188, 386, -42, 200, 223,
2241 442, 517, -165, 438, 21, 142, 381, 91, -165, 209,
2242 -165, -165, -165, 143, 204, 22, 381, 3, 4, 57,
2243 450, 160, 3, 4, 92, 161, 454, 209, -165, -165,
2244 -165, 454, 62, 126, -165, 152, 356, 357, 358, 359,
2245 79, 323, 205, 360, 326, 327, 470, 205, 342, 57,
2246 189, 529, 471, 472, 157, 173, 174, 158, 513, 516,
2247 351, 382, 62, -165, -165, -165, -165, 443, 434, 439,
2248 518, 432, 93, 23, -165, 451, 266, 24, -165, 364,
2249 -165, 455, 367, -83, 304, 530, 533, 276, -84, -261,
2250 277, 281, 268, 468, 196, 197, 145, 147, 531, 544,
2251 152, 53, 30, 28, -165, -165, -165, -165, -165, -165,
2252 483, 504, -165, 505, 490, -165, -165, -165, -23, -21,
2253 361, 206, 354, 79, 423, -165, 206, 425, 484, 207,
2254 208, 31, 485, 33, 207, 208, 486, 35, 36, 335,
2255 68, 69, 70, 71, 245, 72, 34, 39, 343, 74,
2256 75, 344, 345, 77, 310, 51, 340, 352, 46, 47,
2257 48, 49, 66, 346, 347, 348, 349, 2, 73, 74,
2258 75, 76, 67, 271, 273, 274, 372, 373, 461, 523,
2259 335, 462, 524, -23, 85, 463, 5, 464, 88, 90,
2260 543, 53, 52, 97, 98, 123, 1, 152, 124, 2,
2261 3, 4, 311, 312, 313, 314, 315, 316, 125, 127,
2262 129, 130, 309, 132, 320, 139, 133, 317, 5, 230,
2263 6, 231, 232, 233, 7, 148, 134, 458, 135, 136,
2264 137, 138, 445, 335, 2, 171, 172, 176, 177, 234,
2265 235, 236, 179, 178, 40, 237, 183, 353, 41, 355,
2266 182, 42, 43, 5, 184, 185, 186, 194, 8, 52,
2267 218, 365, 198, 53, 368, -46, 270, 219, 190, 191,
2268 192, 202, 54, 492, 238, 239, 240, 241, 387, 391,
2269 55, 56, 193, 216, 220, 242, 221, 228, 229, 243,
2270 8, 244, 395, 267, 466, 467, 9, 283, 284, 285,
2271 281, 288, 289, 324, 10, 542, 325, 304, 68, 69,
2272 70, 71, 363, 72, 272, 68, 69, 70, 71, 245,
2273 72, 77, 328, 246, 501, 8, 247, 248, 77, 366,
2274 53, 506, -47, 369, 337, 374, 249, 380, 375, 54,
2275 -259, 68, 69, 70, 71, 142, 72, 55, 56, 73,
2276 74, 75, 76, 143, 77, 393, -260, 421, 68, 69,
2277 70, 71, 459, 72, 422, 424, 73, 74, 75, 76,
2278 426, 77, 427, 430, 429, 387, 469, 493, 431, 448,
2279 475, 449, 540, 453, 477, 456, 457, 474, 460, 476,
2280 503, 481, 387, 478, 479, 488, 387, 495, 491, 496,
2281 497, 507, 494, 508, 509, 511, 68, 69, 70, 71,
2282 510, 72, 498, 499, 73, 74, 75, 76, 396, 77,
2283 162, 163, 164, 165, 397, 398, 514, 520, 32, 536,
2284 399, 400, 401, 402, 403, 404, 405, 534, 535, 537,
2285 538, 541, 406, 407, 408, 409, 250, 203, 149, 391,
2286 522, 89, 525, 392, 140, 526, 222, 521, 527, 480,
2287 528, 291, 292, 293, 294, 295, 296, 297, 298, 321,
2288 299, 300, 301, 302, 303, 376, 224, 166, 447, 201,
2289 286, 167, 68, 69, 70, 71, 40, 72, 322, 199,
2290 338, 341, 168, 339, 43, 77, 410, 131, 411, 0,
2291 0, 0, 0, 0, 412, 413, 414, 415, 416, 417,
2292 418, 419, 68, 69, 70, 71, 142, 72, 0, 0,
2293 73, 74, 75, 76, 143, 77, 0, 68, 69, 70,
2294 71, 150, 72, 0, 0, 73, 74, 75, 76, 0,
2295 77, 0, 0, 0, 0, 0, 304, 0, 305, 306,
2296 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
2297 109, 0, 110, 111, 112, 68, 69, 70, 71, 0,
2298 72, 0, 0, 384, 74, 75, 76, 0, 77, 68,
2299 69, 70, 71, 0, 72, 0, 0, 388, 74, 75,
2300 76, 0, 77, 68, 69, 70, 71, 0, 72, 0,
2301 0, 482, 74, 75, 76, 0, 77, 68, 69, 70,
2302 71, 0, 72, 0, 0, 489, 74, 75, 76, 0,
2303 77, 68, 69, 70, 71, 245, 72, 0, 0, 246,
2304 0, 0, 247, 0, 77, 68, 69, 70, 71, 0,
2305 72, 0, 0, 332, 68, 69, 70, 71, 77, 72,
2306 0, 0, 446, 68, 69, 70, 71, 77, 72, 0,
2307 0, 500, 0, 0, 0, 0, 77
2310 static const yytype_int16 yycheck
[] =
2312 38, 64, 130, 217, 168, 335, 429, 123, 4, 4,
2313 4, 230, 4, 11, 239, 73, 336, 4, 182, 1,
2314 16, 4, 4, 15, 114, 110, 73, 14, 10, 195,
2315 12, 13, 14, 118, 5, 115, 73, 8, 9, 29,
2316 73, 110, 8, 9, 31, 114, 73, 213, 30, 31,
2317 32, 73, 29, 91, 36, 183, 18, 19, 20, 21,
2318 98, 275, 33, 25, 278, 279, 78, 33, 14, 59,
2319 128, 30, 84, 85, 114, 137, 138, 117, 73, 73,
2320 305, 128, 59, 65, 66, 67, 68, 83, 86, 81,
2321 73, 128, 79, 114, 76, 128, 224, 125, 80, 318,
2322 82, 128, 321, 74, 122, 64, 128, 114, 74, 127,
2323 117, 239, 228, 433, 176, 177, 124, 125, 77, 542,
2324 248, 103, 4, 114, 106, 107, 108, 109, 110, 111,
2325 450, 475, 114, 477, 454, 117, 118, 119, 114, 115,
2326 102, 112, 306, 181, 363, 127, 112, 366, 17, 120,
2327 121, 0, 21, 4, 120, 121, 25, 4, 126, 287,
2328 106, 107, 108, 109, 110, 111, 73, 4, 114, 115,
2329 116, 117, 118, 119, 10, 4, 304, 305, 53, 54,
2330 55, 56, 114, 129, 130, 131, 132, 7, 114, 115,
2331 116, 117, 126, 231, 232, 233, 324, 325, 114, 114,
2332 328, 117, 117, 114, 110, 424, 26, 426, 4, 105,
2333 540, 103, 32, 4, 139, 124, 4, 345, 115, 7,
2334 8, 9, 58, 59, 60, 61, 62, 63, 114, 114,
2335 4, 118, 270, 127, 272, 4, 127, 73, 26, 10,
2336 28, 12, 13, 14, 32, 73, 127, 411, 127, 127,
2337 127, 127, 380, 381, 7, 114, 114, 124, 124, 30,
2338 31, 32, 103, 111, 110, 36, 73, 305, 114, 307,
2339 125, 117, 118, 26, 128, 128, 128, 4, 98, 32,
2340 114, 319, 126, 103, 322, 105, 14, 4, 128, 128,
2341 128, 126, 112, 457, 65, 66, 67, 68, 336, 337,
2342 120, 121, 128, 126, 4, 76, 74, 73, 4, 80,
2343 98, 82, 350, 110, 430, 431, 104, 4, 4, 4,
2344 448, 127, 4, 73, 112, 539, 73, 122, 106, 107,
2345 108, 109, 10, 111, 14, 106, 107, 108, 109, 110,
2346 111, 119, 127, 114, 472, 98, 117, 118, 119, 10,
2347 103, 479, 105, 110, 127, 110, 127, 22, 110, 112,
2348 127, 106, 107, 108, 109, 110, 111, 120, 121, 114,
2349 115, 116, 117, 118, 119, 110, 127, 126, 106, 107,
2350 108, 109, 420, 111, 127, 10, 114, 115, 116, 117,
2351 10, 119, 102, 124, 73, 433, 434, 126, 124, 124,
2352 438, 22, 530, 22, 442, 22, 125, 4, 124, 4,
2353 473, 449, 450, 4, 22, 453, 454, 128, 456, 128,
2354 4, 127, 460, 22, 127, 126, 106, 107, 108, 109,
2355 22, 111, 470, 471, 114, 115, 116, 117, 45, 119,
2356 53, 54, 55, 56, 51, 52, 4, 4, 12, 4,
2357 57, 58, 59, 60, 61, 62, 63, 128, 128, 4,
2358 4, 4, 69, 70, 71, 72, 224, 188, 128, 507,
2359 508, 59, 510, 345, 121, 513, 213, 507, 516, 448,
2360 518, 37, 38, 39, 40, 41, 42, 43, 44, 273,
2361 46, 47, 48, 49, 50, 328, 214, 110, 381, 183,
2362 248, 114, 106, 107, 108, 109, 110, 111, 273, 181,
2363 114, 304, 125, 117, 118, 119, 123, 98, 125, -1,
2364 -1, -1, -1, -1, 131, 132, 133, 134, 135, 136,
2365 137, 138, 106, 107, 108, 109, 110, 111, -1, -1,
2366 114, 115, 116, 117, 118, 119, -1, 106, 107, 108,
2367 109, 125, 111, -1, -1, 114, 115, 116, 117, -1,
2368 119, -1, -1, -1, -1, -1, 122, -1, 124, 125,
2369 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
2370 97, -1, 99, 100, 101, 106, 107, 108, 109, -1,
2371 111, -1, -1, 114, 115, 116, 117, -1, 119, 106,
2372 107, 108, 109, -1, 111, -1, -1, 114, 115, 116,
2373 117, -1, 119, 106, 107, 108, 109, -1, 111, -1,
2374 -1, 114, 115, 116, 117, -1, 119, 106, 107, 108,
2375 109, -1, 111, -1, -1, 114, 115, 116, 117, -1,
2376 119, 106, 107, 108, 109, 110, 111, -1, -1, 114,
2377 -1, -1, 117, -1, 119, 106, 107, 108, 109, -1,
2378 111, -1, -1, 114, 106, 107, 108, 109, 119, 111,
2379 -1, -1, 114, 106, 107, 108, 109, 119, 111, -1,
2380 -1, 114, -1, -1, -1, -1, 119
2383 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2384 symbol of state STATE-NUM. */
2385 static const yytype_uint16 yystos
[] =
2387 0, 4, 7, 8, 9, 26, 28, 32, 98, 104,
2388 112, 141, 142, 143, 144, 145, 147, 148, 160, 163,
2389 165, 114, 115, 114, 125, 164, 166, 149, 114, 161,
2390 4, 0, 143, 4, 73, 4, 126, 258, 259, 4,
2391 110, 114, 117, 118, 253, 254, 53, 54, 55, 56,
2392 224, 4, 32, 103, 112, 120, 121, 144, 150, 154,
2393 155, 162, 163, 213, 214, 215, 114, 126, 106, 107,
2394 108, 109, 111, 114, 115, 116, 117, 119, 249, 257,
2395 262, 263, 264, 265, 167, 110, 151, 152, 4, 155,
2396 105, 14, 31, 79, 156, 157, 215, 4, 139, 87,
2397 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
2398 99, 100, 101, 173, 174, 175, 176, 177, 178, 179,
2399 187, 188, 189, 124, 115, 114, 257, 114, 158, 4,
2400 118, 263, 127, 127, 127, 127, 127, 127, 127, 4,
2401 189, 265, 110, 118, 255, 256, 257, 256, 73, 187,
2402 125, 159, 249, 250, 251, 252, 256, 114, 117, 153,
2403 110, 114, 53, 54, 55, 56, 110, 114, 125, 180,
2404 181, 114, 114, 153, 153, 168, 124, 124, 111, 103,
2405 260, 261, 125, 73, 128, 128, 128, 258, 73, 128,
2406 128, 128, 128, 128, 4, 169, 153, 153, 126, 262,
2407 258, 252, 126, 181, 5, 33, 112, 120, 121, 145,
2408 146, 170, 182, 210, 211, 212, 126, 171, 114, 4,
2409 4, 74, 212, 1, 213, 216, 172, 224, 73, 4,
2410 10, 12, 13, 14, 30, 31, 32, 36, 65, 66,
2411 67, 68, 76, 80, 82, 110, 114, 117, 118, 127,
2412 150, 183, 198, 200, 206, 208, 220, 226, 230, 232,
2413 234, 235, 236, 244, 245, 246, 249, 110, 265, 255,
2414 14, 257, 14, 257, 257, 221, 114, 117, 222, 223,
2415 236, 249, 231, 4, 4, 4, 250, 227, 127, 4,
2416 237, 37, 38, 39, 40, 41, 42, 43, 44, 46,
2417 47, 48, 49, 50, 122, 124, 125, 233, 196, 257,
2418 10, 58, 59, 60, 61, 62, 63, 73, 247, 248,
2419 257, 247, 248, 224, 73, 73, 224, 224, 127, 184,
2420 199, 201, 114, 242, 243, 249, 207, 127, 114, 117,
2421 249, 254, 14, 114, 117, 118, 129, 130, 131, 132,
2422 228, 236, 249, 257, 258, 257, 18, 19, 20, 21,
2423 25, 102, 197, 10, 255, 257, 10, 255, 257, 110,
2424 217, 218, 249, 249, 110, 110, 243, 191, 202, 203,
2425 22, 73, 128, 196, 114, 209, 239, 257, 114, 238,
2426 239, 257, 159, 110, 225, 257, 45, 51, 52, 57,
2427 58, 59, 60, 61, 62, 63, 69, 70, 71, 72,
2428 123, 125, 131, 132, 133, 134, 135, 136, 137, 138,
2429 229, 126, 127, 255, 10, 255, 10, 102, 219, 73,
2430 124, 124, 128, 11, 86, 186, 192, 4, 15, 81,
2431 204, 4, 16, 83, 205, 249, 114, 242, 124, 22,
2432 73, 128, 240, 22, 73, 128, 22, 125, 258, 257,
2433 124, 114, 117, 255, 255, 218, 265, 265, 239, 257,
2434 78, 84, 85, 190, 4, 257, 4, 257, 4, 22,
2435 235, 257, 114, 239, 17, 21, 25, 241, 257, 114,
2436 239, 257, 258, 126, 257, 128, 128, 4, 257, 257,
2437 114, 249, 185, 215, 240, 240, 249, 127, 22, 127,
2438 22, 126, 4, 73, 4, 4, 73, 4, 73, 193,
2439 4, 238, 257, 114, 117, 257, 257, 257, 257, 30,
2440 64, 77, 194, 128, 128, 128, 4, 4, 4, 195,
2441 249, 4, 224, 196, 218
2444 #define yyerrok (yyerrstatus = 0)
2445 #define yyclearin (yychar = YYEMPTY)
2446 #define YYEMPTY (-2)
2449 #define YYACCEPT goto yyacceptlab
2450 #define YYABORT goto yyabortlab
2451 #define YYERROR goto yyerrorlab
2454 /* Like YYERROR except do call yyerror. This remains here temporarily
2455 to ease the transition to the new meaning of YYERROR, for GCC.
2456 Once GCC version 2 has supplanted version 1, this can go. */
2458 #define YYFAIL goto yyerrlab
2460 #define YYRECOVERING() (!!yyerrstatus)
2462 #define YYBACKUP(Token, Value) \
2464 if (yychar == YYEMPTY && yylen == 1) \
2468 yytoken = YYTRANSLATE (yychar); \
2474 yyerror (yyscanner, interp, YY_("syntax error: cannot back up")); \
2481 #define YYERRCODE 256
2484 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2485 If N is 0, then set CURRENT to the empty location which ends
2486 the previous symbol: RHS[0] (always defined). */
2488 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2489 #ifndef YYLLOC_DEFAULT
2490 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2494 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2495 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2496 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2497 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2501 (Current).first_line = (Current).last_line = \
2502 YYRHSLOC (Rhs, 0).last_line; \
2503 (Current).first_column = (Current).last_column = \
2504 YYRHSLOC (Rhs, 0).last_column; \
2510 /* YY_LOCATION_PRINT -- Print the location on the stream.
2511 This macro was not mandated originally: define only if we know
2512 we won't break user code: when these are the locations we know. */
2514 #ifndef YY_LOCATION_PRINT
2515 # if YYLTYPE_IS_TRIVIAL
2516 # define YY_LOCATION_PRINT(File, Loc) \
2517 fprintf (File, "%d.%d-%d.%d", \
2518 (Loc).first_line, (Loc).first_column, \
2519 (Loc).last_line, (Loc).last_column)
2521 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2526 /* YYLEX -- calling `yylex' with the right arguments. */
2529 # define YYLEX yylex (&yylval, YYLEX_PARAM)
2531 # define YYLEX yylex (&yylval, yyscanner, interp)
2534 /* Enable debugging if requested. */
2538 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2539 # define YYFPRINTF fprintf
2542 # define YYDPRINTF(Args) \
2548 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2552 YYFPRINTF (stderr, "%s ", Title); \
2553 yy_symbol_print (stderr, \
2554 Type, Value, yyscanner, interp); \
2555 YYFPRINTF (stderr, "\n"); \
2560 /*--------------------------------.
2561 | Print this symbol on YYOUTPUT. |
2562 `--------------------------------*/
2565 #if (defined __STDC__ || defined __C99__FUNC__ \
2566 || defined __cplusplus || defined _MSC_VER)
2568 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, void *yyscanner
, Parrot_Interp interp
)
2571 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yyscanner
, interp
)
2574 YYSTYPE
const * const yyvaluep
;
2576 Parrot_Interp interp
;
2584 if (yytype
< YYNTOKENS
)
2585 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
2597 /*--------------------------------.
2598 | Print this symbol on YYOUTPUT. |
2599 `--------------------------------*/
2601 #if (defined __STDC__ || defined __C99__FUNC__ \
2602 || defined __cplusplus || defined _MSC_VER)
2604 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, void *yyscanner
, Parrot_Interp interp
)
2607 yy_symbol_print (yyoutput
, yytype
, yyvaluep
, yyscanner
, interp
)
2610 YYSTYPE
const * const yyvaluep
;
2612 Parrot_Interp interp
;
2615 if (yytype
< YYNTOKENS
)
2616 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
2618 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
2620 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yyscanner
, interp
);
2621 YYFPRINTF (yyoutput
, ")");
2624 /*------------------------------------------------------------------.
2625 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2627 `------------------------------------------------------------------*/
2629 #if (defined __STDC__ || defined __C99__FUNC__ \
2630 || defined __cplusplus || defined _MSC_VER)
2632 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
2635 yy_stack_print (yybottom
, yytop
)
2636 yytype_int16
*yybottom
;
2637 yytype_int16
*yytop
;
2640 YYFPRINTF (stderr
, "Stack now");
2641 for (; yybottom
<= yytop
; yybottom
++)
2643 int yybot
= *yybottom
;
2644 YYFPRINTF (stderr
, " %d", yybot
);
2646 YYFPRINTF (stderr
, "\n");
2649 # define YY_STACK_PRINT(Bottom, Top) \
2652 yy_stack_print ((Bottom), (Top)); \
2656 /*------------------------------------------------.
2657 | Report that the YYRULE is going to be reduced. |
2658 `------------------------------------------------*/
2660 #if (defined __STDC__ || defined __C99__FUNC__ \
2661 || defined __cplusplus || defined _MSC_VER)
2663 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
, void *yyscanner
, Parrot_Interp interp
)
2666 yy_reduce_print (yyvsp
, yyrule
, yyscanner
, interp
)
2670 Parrot_Interp interp
;
2673 int yynrhs
= yyr2
[yyrule
];
2675 unsigned long int yylno
= yyrline
[yyrule
];
2676 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
2678 /* The symbols being reduced. */
2679 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
2681 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
2682 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
2683 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
2684 , yyscanner
, interp
);
2685 YYFPRINTF (stderr
, "\n");
2689 # define YY_REDUCE_PRINT(Rule) \
2692 yy_reduce_print (yyvsp, Rule, yyscanner, interp); \
2695 /* Nonzero means print parse trace. It is left uninitialized so that
2696 multiple parsers can coexist. */
2698 #else /* !YYDEBUG */
2699 # define YYDPRINTF(Args)
2700 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
2701 # define YY_STACK_PRINT(Bottom, Top)
2702 # define YY_REDUCE_PRINT(Rule)
2703 #endif /* !YYDEBUG */
2706 /* YYINITDEPTH -- initial size of the parser's stacks. */
2708 # define YYINITDEPTH 200
2711 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2712 if the built-in stack extension method is used).
2714 Do not make this value too large; the results are undefined if
2715 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2716 evaluated with infinite-precision integer arithmetic. */
2719 # define YYMAXDEPTH 10000
2727 # if defined __GLIBC__ && defined _STRING_H
2728 # define yystrlen strlen
2730 /* Return the length of YYSTR. */
2731 #if (defined __STDC__ || defined __C99__FUNC__ \
2732 || defined __cplusplus || defined _MSC_VER)
2734 yystrlen (const char *yystr
)
2742 for (yylen
= 0; yystr
[yylen
]; yylen
++)
2750 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2751 # define yystpcpy stpcpy
2753 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2755 #if (defined __STDC__ || defined __C99__FUNC__ \
2756 || defined __cplusplus || defined _MSC_VER)
2758 yystpcpy (char *yydest
, const char *yysrc
)
2761 yystpcpy (yydest
, yysrc
)
2767 const char *yys
= yysrc
;
2769 while ((*yyd
++ = *yys
++) != '\0')
2778 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2779 quotes and backslashes, so that it's suitable for yyerror. The
2780 heuristic is that double-quoting is unnecessary unless the string
2781 contains an apostrophe, a comma, or backslash (other than
2782 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2783 null, do not copy; instead, return the length of what the result
2786 yytnamerr (char *yyres
, const char *yystr
)
2791 char const *yyp
= yystr
;
2798 goto do_not_strip_quotes
;
2802 goto do_not_strip_quotes
;
2815 do_not_strip_quotes
: ;
2819 return yystrlen (yystr
);
2821 return yystpcpy (yyres
, yystr
) - yyres
;
2825 /* Copy into YYRESULT an error message about the unexpected token
2826 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2827 including the terminating null byte. If YYRESULT is null, do not
2828 copy anything; just return the number of bytes that would be
2829 copied. As a special case, return 0 if an ordinary "syntax error"
2830 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2831 size calculation. */
2833 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
2835 int yyn
= yypact
[yystate
];
2837 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
2841 int yytype
= YYTRANSLATE (yychar
);
2842 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
2843 YYSIZE_T yysize
= yysize0
;
2845 int yysize_overflow
= 0;
2846 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
2847 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
2851 /* This is so xgettext sees the translatable formats that are
2852 constructed on the fly. */
2853 YY_("syntax error, unexpected %s");
2854 YY_("syntax error, unexpected %s, expecting %s");
2855 YY_("syntax error, unexpected %s, expecting %s or %s");
2856 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2857 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2861 static char const yyunexpected
[] = "syntax error, unexpected %s";
2862 static char const yyexpecting
[] = ", expecting %s";
2863 static char const yyor
[] = " or %s";
2864 char yyformat
[sizeof yyunexpected
2865 + sizeof yyexpecting
- 1
2866 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
2867 * (sizeof yyor
- 1))];
2868 char const *yyprefix
= yyexpecting
;
2870 /* Start YYX at -YYN if negative to avoid negative indexes in
2872 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
2874 /* Stay within bounds of both yycheck and yytname. */
2875 int yychecklim
= YYLAST
- yyn
+ 1;
2876 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
2879 yyarg
[0] = yytname
[yytype
];
2880 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
2882 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
2883 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
2885 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
2889 yyformat
[sizeof yyunexpected
- 1] = '\0';
2892 yyarg
[yycount
++] = yytname
[yyx
];
2893 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
2894 yysize_overflow
|= (yysize1
< yysize
);
2896 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
2900 yyf
= YY_(yyformat
);
2901 yysize1
= yysize
+ yystrlen (yyf
);
2902 yysize_overflow
|= (yysize1
< yysize
);
2905 if (yysize_overflow
)
2906 return YYSIZE_MAXIMUM
;
2910 /* Avoid sprintf, as that infringes on the user's name space.
2911 Don't have undefined behavior even if the translation
2912 produced a string with the wrong number of "%s"s. */
2913 char *yyp
= yyresult
;
2915 while ((*yyp
= *yyf
) != '\0')
2917 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
2919 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
2932 #endif /* YYERROR_VERBOSE */
2935 /*-----------------------------------------------.
2936 | Release the memory associated to this symbol. |
2937 `-----------------------------------------------*/
2940 #if (defined __STDC__ || defined __C99__FUNC__ \
2941 || defined __cplusplus || defined _MSC_VER)
2943 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, void *yyscanner
, Parrot_Interp interp
)
2946 yydestruct (yymsg
, yytype
, yyvaluep
, yyscanner
, interp
)
2951 Parrot_Interp interp
;
2960 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
2970 /* Prevent warnings from -Wmissing-prototypes. */
2971 #ifdef YYPARSE_PARAM
2972 #if defined __STDC__ || defined __cplusplus
2973 int yyparse (void *YYPARSE_PARAM
);
2977 #else /* ! YYPARSE_PARAM */
2978 #if defined __STDC__ || defined __cplusplus
2979 int yyparse (void *yyscanner
, Parrot_Interp interp
);
2983 #endif /* ! YYPARSE_PARAM */
2989 /*-------------------------.
2990 | yyparse or yypush_parse. |
2991 `-------------------------*/
2993 #ifdef YYPARSE_PARAM
2994 #if (defined __STDC__ || defined __C99__FUNC__ \
2995 || defined __cplusplus || defined _MSC_VER)
2997 yyparse (void *YYPARSE_PARAM
)
3000 yyparse (YYPARSE_PARAM
)
3001 void *YYPARSE_PARAM
;
3003 #else /* ! YYPARSE_PARAM */
3004 #if (defined __STDC__ || defined __C99__FUNC__ \
3005 || defined __cplusplus || defined _MSC_VER)
3007 yyparse (void *yyscanner
, Parrot_Interp interp
)
3010 yyparse (yyscanner
, interp
)
3012 Parrot_Interp interp
;
3016 /* The lookahead symbol. */
3019 /* The semantic value of the lookahead symbol. */
3022 /* Number of syntax errors so far. */
3026 /* Number of tokens to shift before error messages enabled. */
3029 /* The stacks and their tools:
3030 `yyss': related to states.
3031 `yyvs': related to semantic values.
3033 Refer to the stacks thru separate pointers, to allow yyoverflow
3034 to reallocate them elsewhere. */
3036 /* The state stack. */
3037 yytype_int16 yyssa
[YYINITDEPTH
];
3039 yytype_int16
*yyssp
;
3041 /* The semantic value stack. */
3042 YYSTYPE yyvsa
[YYINITDEPTH
];
3046 YYSIZE_T yystacksize
;
3050 /* Lookahead token as an internal (translated) token number. */
3052 /* The variables used to return semantic value and location from the
3057 /* Buffer for error messages, and its allocated size. */
3059 char *yymsg
= yymsgbuf
;
3060 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
3063 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3065 /* The number of symbols on the RHS of the reduced rule.
3066 Keep to zero when no symbol should be popped. */
3072 yystacksize
= YYINITDEPTH
;
3074 YYDPRINTF ((stderr
, "Starting parse\n"));
3079 yychar
= YYEMPTY
; /* Cause a token to be read. */
3081 /* Initialize stack pointers.
3082 Waste one element of value and location stack
3083 so that they stay on the same level as the state stack.
3084 The wasted elements are never initialized. */
3090 /*------------------------------------------------------------.
3091 | yynewstate -- Push a new state, which is found in yystate. |
3092 `------------------------------------------------------------*/
3094 /* In all cases, when you get here, the value and location stacks
3095 have just been pushed. So pushing a state here evens the stacks. */
3101 if (yyss
+ yystacksize
- 1 <= yyssp
)
3103 /* Get the current used size of the three stacks, in elements. */
3104 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
3108 /* Give user a chance to reallocate the stack. Use copies of
3109 these so that the &'s don't force the real ones into
3111 YYSTYPE
*yyvs1
= yyvs
;
3112 yytype_int16
*yyss1
= yyss
;
3114 /* Each stack pointer address is followed by the size of the
3115 data in use in that stack, in bytes. This used to be a
3116 conditional around just the two extra args, but that might
3117 be undefined if yyoverflow is a macro. */
3118 yyoverflow (YY_("memory exhausted"),
3119 &yyss1
, yysize
* sizeof (*yyssp
),
3120 &yyvs1
, yysize
* sizeof (*yyvsp
),
3126 #else /* no yyoverflow */
3127 # ifndef YYSTACK_RELOCATE
3128 goto yyexhaustedlab
;
3130 /* Extend the stack our own way. */
3131 if (YYMAXDEPTH
<= yystacksize
)
3132 goto yyexhaustedlab
;
3134 if (YYMAXDEPTH
< yystacksize
)
3135 yystacksize
= YYMAXDEPTH
;
3138 yytype_int16
*yyss1
= yyss
;
3139 union yyalloc
*yyptr
=
3140 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
3142 goto yyexhaustedlab
;
3143 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
3144 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
3145 # undef YYSTACK_RELOCATE
3147 YYSTACK_FREE (yyss1
);
3150 #endif /* no yyoverflow */
3152 yyssp
= yyss
+ yysize
- 1;
3153 yyvsp
= yyvs
+ yysize
- 1;
3155 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
3156 (unsigned long int) yystacksize
));
3158 if (yyss
+ yystacksize
- 1 <= yyssp
)
3162 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
3164 if (yystate
== YYFINAL
)
3174 /* Do appropriate processing given the current state. Read a
3175 lookahead token if we need one and don't already have one. */
3177 /* First try to decide what to do without reference to lookahead token. */
3178 yyn
= yypact
[yystate
];
3179 if (yyn
== YYPACT_NINF
)
3182 /* Not known => get a lookahead token if don't already have one. */
3184 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
3185 if (yychar
== YYEMPTY
)
3187 YYDPRINTF ((stderr
, "Reading a token: "));
3191 if (yychar
<= YYEOF
)
3193 yychar
= yytoken
= YYEOF
;
3194 YYDPRINTF ((stderr
, "Now at end of input.\n"));
3198 yytoken
= YYTRANSLATE (yychar
);
3199 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
3202 /* If the proper action on seeing token YYTOKEN is to reduce or to
3203 detect an error, take that action. */
3205 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
3210 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
3216 /* Count tokens shifted since error; after three, turn off error
3221 /* Shift the lookahead token. */
3222 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
3224 /* Discard the shifted token. */
3233 /*-----------------------------------------------------------.
3234 | yydefault -- do the default action for the current state. |
3235 `-----------------------------------------------------------*/
3237 yyn
= yydefact
[yystate
];
3243 /*-----------------------------.
3244 | yyreduce -- Do a reduction. |
3245 `-----------------------------*/
3247 /* yyn is the number of a rule to reduce with. */
3250 /* If YYLEN is nonzero, implement the default value of the action:
3253 Otherwise, the following line sets YYVAL to garbage.
3254 This behavior is undocumented and Bison
3255 users should not rely upon it. Assigning to YYVAL
3256 unconditionally makes the parser a bit smaller, and it avoids a
3257 GCC warning that YYVAL may be used uninitialized. */
3258 yyval
= yyvsp
[1-yylen
];
3261 YY_REDUCE_PRINT (yyn
);
3266 /* Line 1455 of yacc.c */
3267 #line 1170 "compilers/imcc/imcc.y"
3268 { if (yynerrs
) YYABORT
; (yyval
.i
) = 0; }
3273 /* Line 1455 of yacc.c */
3274 #line 1179 "compilers/imcc/imcc.y"
3275 { (yyval
.i
) = (yyvsp
[(1) - (1)].i
); }
3280 /* Line 1455 of yacc.c */
3281 #line 1180 "compilers/imcc/imcc.y"
3282 { (yyval
.i
) = (yyvsp
[(1) - (1)].i
); }
3287 /* Line 1455 of yacc.c */
3288 #line 1182 "compilers/imcc/imcc.y"
3290 (yyval
.i
) = (yyvsp
[(1) - (1)].i
);
3291 imc_close_unit(interp
, IMCC_INFO(interp
)->cur_unit
);
3292 IMCC_INFO(interp
)->cur_unit
= 0;
3298 /* Line 1455 of yacc.c */
3299 #line 1188 "compilers/imcc/imcc.y"
3301 (yyval
.i
) = (yyvsp
[(1) - (1)].i
);
3302 imc_close_unit(interp
, IMCC_INFO(interp
)->cur_unit
);
3303 IMCC_INFO(interp
)->cur_unit
= 0;
3309 /* Line 1455 of yacc.c */
3310 #line 1193 "compilers/imcc/imcc.y"
3316 /* Line 1455 of yacc.c */
3317 #line 1194 "compilers/imcc/imcc.y"
3323 /* Line 1455 of yacc.c */
3324 #line 1195 "compilers/imcc/imcc.y"
3330 /* Line 1455 of yacc.c */
3331 #line 1196 "compilers/imcc/imcc.y"
3337 /* Line 1455 of yacc.c */
3338 #line 1200 "compilers/imcc/imcc.y"
3344 /* Line 1455 of yacc.c */
3345 #line 1202 "compilers/imcc/imcc.y"
3348 do_loadlib(interp
, (yyvsp
[(2) - (3)].s
));
3349 mem_sys_free((yyvsp
[(2) - (3)].s
));
3355 /* Line 1455 of yacc.c */
3356 #line 1211 "compilers/imcc/imcc.y"
3358 IMCC_INFO(interp
)->line
= atoi((yyvsp
[(2) - (5)].s
));
3359 /* set_filename() frees the STRINGC */
3360 set_filename(interp
, (yyvsp
[(4) - (5)].s
));
3366 /* Line 1455 of yacc.c */
3367 #line 1217 "compilers/imcc/imcc.y"
3369 /* set_filename() frees the STRINGC */
3370 set_filename(interp
, (yyvsp
[(2) - (3)].s
));
3376 /* Line 1455 of yacc.c */
3377 #line 1225 "compilers/imcc/imcc.y"
3379 /* We'll want to store an entry while emitting instructions, so just
3380 * store annotation like it's an instruction. */
3381 SymReg
* const key
= mk_const(interp
, (yyvsp
[(2) - (4)].s
), 'S');
3382 (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, ".annotate", 2, key
, (yyvsp
[(4) - (4)].sr
));
3383 mem_sys_free((yyvsp
[(2) - (4)].s
));
3389 /* Line 1455 of yacc.c */
3390 #line 1237 "compilers/imcc/imcc.y"
3392 STRING
* const hll_name
= Parrot_str_unescape(interp
, (yyvsp
[(2) - (2)].s
) + 1, '"', NULL
);
3393 Parrot_pcc_set_HLL(interp
, CURRENT_CONTEXT(interp
),
3394 Parrot_register_HLL(interp
, hll_name
));
3396 IMCC_INFO(interp
)->cur_namespace
= NULL
;
3397 mem_sys_free((yyvsp
[(2) - (2)].s
));
3404 /* Line 1455 of yacc.c */
3405 #line 1249 "compilers/imcc/imcc.y"
3406 { IMCC_INFO(interp
)->is_def
= 1; }
3411 /* Line 1455 of yacc.c */
3412 #line 1250 "compilers/imcc/imcc.y"
3414 mk_const_ident(interp
, (yyvsp
[(4) - (6)].s
), (yyvsp
[(3) - (6)].t
), (yyvsp
[(6) - (6)].sr
), 1);
3415 mem_sys_free((yyvsp
[(4) - (6)].s
));
3416 IMCC_INFO(interp
)->is_def
= 0;
3422 /* Line 1455 of yacc.c */
3423 #line 1258 "compilers/imcc/imcc.y"
3424 { IMCC_INFO(interp
)->is_def
= 1; }
3429 /* Line 1455 of yacc.c */
3430 #line 1259 "compilers/imcc/imcc.y"
3432 (yyval
.i
) = mk_pmc_const(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(3) - (6)].s
), (yyvsp
[(4) - (6)].sr
), (yyvsp
[(6) - (6)].s
));
3433 mem_sys_free((yyvsp
[(6) - (6)].s
));
3434 IMCC_INFO(interp
)->is_def
= 0;
3440 /* Line 1455 of yacc.c */
3441 #line 1265 "compilers/imcc/imcc.y"
3442 { IMCC_INFO(interp
)->is_def
= 1; }
3447 /* Line 1455 of yacc.c */
3448 #line 1266 "compilers/imcc/imcc.y"
3450 (yyval
.i
) = mk_pmc_const_named(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(3) - (6)].s
), (yyvsp
[(4) - (6)].sr
), (yyvsp
[(6) - (6)].s
));
3451 mem_sys_free((yyvsp
[(3) - (6)].s
));
3452 mem_sys_free((yyvsp
[(6) - (6)].s
));
3453 IMCC_INFO(interp
)->is_def
= 0;
3459 /* Line 1455 of yacc.c */
3460 #line 1284 "compilers/imcc/imcc.y"
3466 /* Line 1455 of yacc.c */
3467 #line 1285 "compilers/imcc/imcc.y"
3473 /* Line 1455 of yacc.c */
3474 #line 1286 "compilers/imcc/imcc.y"
3480 /* Line 1455 of yacc.c */
3481 #line 1287 "compilers/imcc/imcc.y"
3487 /* Line 1455 of yacc.c */
3488 #line 1288 "compilers/imcc/imcc.y"
3489 { (yyval
.i
) = (yyvsp
[(1) - (1)].i
); }
3494 /* Line 1455 of yacc.c */
3495 #line 1293 "compilers/imcc/imcc.y"
3496 { clear_state(interp
); }
3501 /* Line 1455 of yacc.c */
3502 #line 1295 "compilers/imcc/imcc.y"
3504 (yyval
.i
) = INS(interp
, IMCC_INFO(interp
)->cur_unit
,
3505 (yyvsp
[(2) - (3)].s
), 0, IMCC_INFO(interp
)->regs
,
3506 IMCC_INFO(interp
)->nargs
, IMCC_INFO(interp
) -> keyvec
, 1);
3507 mem_sys_free((yyvsp
[(2) - (3)].s
));
3513 /* Line 1455 of yacc.c */
3514 #line 1302 "compilers/imcc/imcc.y"
3516 imc_close_unit(interp
, IMCC_INFO(interp
)->cur_unit
);
3517 IMCC_INFO(interp
)->cur_unit
= imc_open_unit(interp
, IMC_PASM
);
3523 /* Line 1455 of yacc.c */
3524 #line 1307 "compilers/imcc/imcc.y"
3526 (yyval
.i
) = iSUBROUTINE(interp
,
3527 IMCC_INFO(interp
)->cur_unit
,
3528 mk_sub_label(interp
, (yyvsp
[(4) - (4)].s
)));
3529 IMCC_INFO(interp
)->cur_call
->pcc_sub
->pragma
= (yyvsp
[(3) - (4)].t
);
3530 mem_sys_free((yyvsp
[(4) - (4)].s
));
3536 /* Line 1455 of yacc.c */
3537 #line 1315 "compilers/imcc/imcc.y"
3539 (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, "null", 1, (yyvsp
[(2) - (2)].sr
));
3545 /* Line 1455 of yacc.c */
3546 #line 1319 "compilers/imcc/imcc.y"
3548 char *name
= mem_sys_strdup((yyvsp
[(2) - (4)].s
) + 1);
3549 SymReg
*r
= mk_pasm_reg(interp
, (yyvsp
[(4) - (4)].s
));
3551 name
[strlen(name
) - 1] = 0;
3552 n
= mk_const(interp
, name
, 'S');
3553 set_lexical(interp
, r
, n
);
3556 mem_sys_free((yyvsp
[(2) - (4)].s
));
3557 mem_sys_free((yyvsp
[(4) - (4)].s
));
3563 /* Line 1455 of yacc.c */
3564 #line 1331 "compilers/imcc/imcc.y"
3570 /* Line 1455 of yacc.c */
3571 #line 1339 "compilers/imcc/imcc.y"
3572 { IMCC_INFO(interp
)->cur_unit
= imc_open_unit(interp
, IMC_PASM
); }
3577 /* Line 1455 of yacc.c */
3578 #line 1342 "compilers/imcc/imcc.y"
3580 /* if (optimizer_level & OPT_PASM)
3581 imc_compile_unit(interp, IMCC_INFO(interp)->cur_unit);
3590 /* Line 1455 of yacc.c */
3591 #line 1358 "compilers/imcc/imcc.y"
3595 if (IMCC_INFO(interp
)->state
->pasm_file
&& IMCC_INFO(interp
)->cur_namespace
) {
3596 imc_close_unit(interp
, IMCC_INFO(interp
)->cur_unit
);
3599 IMCC_INFO(interp
)->cur_namespace
= (yyvsp
[(2) - (3)].sr
);
3601 IMCC_INFO(interp
)->cur_unit
= imc_open_unit(interp
, IMC_PASM
);
3607 /* Line 1455 of yacc.c */
3608 #line 1373 "compilers/imcc/imcc.y"
3610 (yyval
.sr
) = (yyvsp
[(2) - (3)].sr
);
3616 /* Line 1455 of yacc.c */
3617 #line 1376 "compilers/imcc/imcc.y"
3618 { (yyval
.sr
) = NULL
; }
3623 /* Line 1455 of yacc.c */
3624 #line 1381 "compilers/imcc/imcc.y"
3626 IMCC_INFO(interp
)->cur_unit
= imc_open_unit(interp
, IMC_PCCSUB
);
3632 /* Line 1455 of yacc.c */
3633 #line 1385 "compilers/imcc/imcc.y"
3635 iSUBROUTINE(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(3) - (3)].sr
));
3641 /* Line 1455 of yacc.c */
3642 #line 1389 "compilers/imcc/imcc.y"
3644 IMCC_INFO(interp
)->cur_call
->pcc_sub
->pragma
= (yyvsp
[(5) - (6)].t
);
3645 if (!IMCC_INFO(interp
)->cur_unit
->instructions
->symregs
[0]->subid
) {
3646 IMCC_INFO(interp
)->cur_unit
->instructions
->symregs
[0]->subid
= mem_sys_strdup(
3647 IMCC_INFO(interp
)->cur_unit
->instructions
->symregs
[0]->name
);
3654 /* Line 1455 of yacc.c */
3655 #line 1397 "compilers/imcc/imcc.y"
3656 { (yyval
.i
) = 0; IMCC_INFO(interp
)->cur_call
= NULL
; }
3661 /* Line 1455 of yacc.c */
3662 #line 1401 "compilers/imcc/imcc.y"
3668 /* Line 1455 of yacc.c */
3669 #line 1402 "compilers/imcc/imcc.y"
3675 /* Line 1455 of yacc.c */
3676 #line 1404 "compilers/imcc/imcc.y"
3678 if (IMCC_INFO(interp
)->adv_named_id
) {
3679 add_pcc_named_param(interp
, IMCC_INFO(interp
)->cur_call
,
3680 IMCC_INFO(interp
)->adv_named_id
, (yyvsp
[(2) - (3)].sr
));
3681 IMCC_INFO(interp
)->adv_named_id
= NULL
;
3684 add_pcc_arg(interp
, IMCC_INFO(interp
)->cur_call
, (yyvsp
[(2) - (3)].sr
));
3690 /* Line 1455 of yacc.c */
3691 #line 1416 "compilers/imcc/imcc.y"
3692 { IMCC_INFO(interp
)->is_def
= 1; }
3697 /* Line 1455 of yacc.c */
3698 #line 1416 "compilers/imcc/imcc.y"
3699 { (yyval
.sr
) = (yyvsp
[(3) - (3)].sr
); IMCC_INFO(interp
)->is_def
= 0; }
3704 /* Line 1455 of yacc.c */
3705 #line 1421 "compilers/imcc/imcc.y"
3707 if ((yyvsp
[(3) - (3)].t
) & VT_UNIQUE_REG
)
3708 (yyval
.sr
) = mk_ident_ur(interp
, (yyvsp
[(2) - (3)].s
), (yyvsp
[(1) - (3)].t
));
3709 else if ((yyvsp
[(3) - (3)].t
) & VT_OPT_FLAG
&& (yyvsp
[(1) - (3)].t
) != 'I') {
3711 switch ((yyvsp
[(1) - (3)].t
)) {
3712 case 'N': type
= "num"; break;
3713 case 'S': type
= "string"; break;
3714 case 'P': type
= "pmc"; break;
3715 default: type
= "strange"; break;
3718 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
3719 ":opt_flag parameter must be of type 'I', not '%s'", type
);
3722 (yyval
.sr
) = mk_ident(interp
, (yyvsp
[(2) - (3)].s
), (yyvsp
[(1) - (3)].t
));
3723 (yyval
.sr
)->type
|= (yyvsp
[(3) - (3)].t
);
3724 mem_sys_free((yyvsp
[(2) - (3)].s
));
3730 /* Line 1455 of yacc.c */
3731 #line 1446 "compilers/imcc/imcc.y"
3737 /* Line 1455 of yacc.c */
3738 #line 1451 "compilers/imcc/imcc.y"
3741 IMCC_INFO(interp
)->cur_unit
->outer
= mk_sub_address_fromc(interp
, (yyvsp
[(3) - (4)].s
));
3742 mem_sys_free((yyvsp
[(3) - (4)].s
));
3748 /* Line 1455 of yacc.c */
3749 #line 1457 "compilers/imcc/imcc.y"
3752 IMCC_INFO(interp
)->cur_unit
->outer
= mk_const(interp
, (yyvsp
[(3) - (4)].s
), 'S');
3753 mem_sys_free((yyvsp
[(3) - (4)].s
));
3759 /* Line 1455 of yacc.c */
3760 #line 1466 "compilers/imcc/imcc.y"
3762 (yyval
.t
) = P_VTABLE
;
3763 IMCC_INFO(interp
)->cur_unit
->vtable_name
= NULL
;
3764 IMCC_INFO(interp
)->cur_unit
->is_vtable_method
= 1;
3770 /* Line 1455 of yacc.c */
3771 #line 1472 "compilers/imcc/imcc.y"
3773 (yyval
.t
) = P_VTABLE
;
3774 IMCC_INFO(interp
)->cur_unit
->vtable_name
= (yyvsp
[(3) - (4)].s
);
3775 IMCC_INFO(interp
)->cur_unit
->is_vtable_method
= 1;
3781 /* Line 1455 of yacc.c */
3782 #line 1481 "compilers/imcc/imcc.y"
3784 (yyval
.t
) = P_METHOD
;
3785 IMCC_INFO(interp
)->cur_unit
->method_name
= NULL
;
3786 IMCC_INFO(interp
)->cur_unit
->is_method
= 1;
3792 /* Line 1455 of yacc.c */
3793 #line 1487 "compilers/imcc/imcc.y"
3795 (yyval
.t
) = P_METHOD
;
3796 IMCC_INFO(interp
)->cur_unit
->method_name
= (yyvsp
[(3) - (4)].s
);
3797 IMCC_INFO(interp
)->cur_unit
->is_method
= 1;
3803 /* Line 1455 of yacc.c */
3804 #line 1496 "compilers/imcc/imcc.y"
3806 (yyval
.t
) = P_NSENTRY
;
3807 IMCC_INFO(interp
)->cur_unit
->ns_entry_name
= NULL
;
3808 IMCC_INFO(interp
)->cur_unit
->has_ns_entry_name
= 1;
3814 /* Line 1455 of yacc.c */
3815 #line 1502 "compilers/imcc/imcc.y"
3817 (yyval
.t
) = P_NSENTRY
;
3818 IMCC_INFO(interp
)->cur_unit
->ns_entry_name
= (yyvsp
[(3) - (4)].s
);
3819 IMCC_INFO(interp
)->cur_unit
->has_ns_entry_name
= 1;
3825 /* Line 1455 of yacc.c */
3826 #line 1511 "compilers/imcc/imcc.y"
3829 IMCC_INFO(interp
)->cur_unit
->instance_of
= (yyvsp
[(3) - (4)].s
);
3835 /* Line 1455 of yacc.c */
3836 #line 1519 "compilers/imcc/imcc.y"
3839 IMCC_INFO(interp
)->cur_unit
->subid
= NULL
;
3845 /* Line 1455 of yacc.c */
3846 #line 1524 "compilers/imcc/imcc.y"
3849 IMCC_INFO(interp
)->cur_unit
->subid
= mk_const(interp
, (yyvsp
[(3) - (4)].s
), 'S');
3850 IMCC_INFO(interp
)->cur_unit
->instructions
->symregs
[0]->subid
= str_dup_remove_quotes((yyvsp
[(3) - (4)].s
));
3851 mem_sys_free((yyvsp
[(3) - (4)].s
));
3857 /* Line 1455 of yacc.c */
3858 #line 1534 "compilers/imcc/imcc.y"
3860 add_pcc_multi(interp
, IMCC_INFO(interp
)->cur_call
, NULL
);
3866 /* Line 1455 of yacc.c */
3867 #line 1538 "compilers/imcc/imcc.y"
3870 add_pcc_multi(interp
, IMCC_INFO(interp
)->cur_call
, (yyvsp
[(3) - (3)].sr
));
3876 /* Line 1455 of yacc.c */
3877 #line 1543 "compilers/imcc/imcc.y"
3880 add_pcc_multi(interp
, IMCC_INFO(interp
)->cur_call
, (yyvsp
[(1) - (1)].sr
));
3886 /* Line 1455 of yacc.c */
3887 #line 1550 "compilers/imcc/imcc.y"
3888 { (yyval
.sr
) = mk_const(interp
, "INTVAL", 'S'); }
3893 /* Line 1455 of yacc.c */
3894 #line 1551 "compilers/imcc/imcc.y"
3895 { (yyval
.sr
) = mk_const(interp
, "FLOATVAL", 'S'); }
3900 /* Line 1455 of yacc.c */
3901 #line 1552 "compilers/imcc/imcc.y"
3902 { (yyval
.sr
) = mk_const(interp
, "PMC", 'S'); }
3907 /* Line 1455 of yacc.c */
3908 #line 1553 "compilers/imcc/imcc.y"
3909 { (yyval
.sr
) = mk_const(interp
, "STRING", 'S'); }
3914 /* Line 1455 of yacc.c */
3915 #line 1555 "compilers/imcc/imcc.y"
3918 if (strcmp((yyvsp
[(1) - (1)].s
), "_") != 0)
3919 r
= mk_const(interp
, (yyvsp
[(1) - (1)].s
), 'S');
3921 r
= mk_const(interp
, "PMC", 'S');
3923 mem_sys_free((yyvsp
[(1) - (1)].s
));
3930 /* Line 1455 of yacc.c */
3931 #line 1566 "compilers/imcc/imcc.y"
3934 if (strcmp((yyvsp
[(1) - (1)].s
), "_") != 0)
3935 r
= mk_const(interp
, (yyvsp
[(1) - (1)].s
), 'S');
3937 r
= mk_const(interp
, "PMC", 'S');
3939 mem_sys_free((yyvsp
[(1) - (1)].s
));
3946 /* Line 1455 of yacc.c */
3947 #line 1576 "compilers/imcc/imcc.y"
3948 { (yyval
.sr
) = (yyvsp
[(2) - (3)].sr
); }
3953 /* Line 1455 of yacc.c */
3954 #line 1586 "compilers/imcc/imcc.y"
3960 snprintf(name
, sizeof (name
), "%cpcc_sub_call_%d",
3961 IMCC_INTERNAL_CHAR
, IMCC_INFO(interp
)->cnr
++);
3962 (yyval
.sr
) = r
= mk_pcc_sub(interp
, name
, 0);
3963 /* this mid rule action has the semantic value of the
3965 * This is used below to append args & results
3967 i
= iLABEL(interp
, IMCC_INFO(interp
)->cur_unit
, r
);
3968 IMCC_INFO(interp
)->cur_call
= r
;
3971 * if we are inside a pcc_sub mark the sub as doing a
3972 * sub call; the sub is in r[0] of the first ins
3974 r1
= IMCC_INFO(interp
)->cur_unit
->instructions
->symregs
[0];
3975 if (r1
&& r1
->pcc_sub
)
3976 r1
->pcc_sub
->calls_a_sub
|= 1;
3982 /* Line 1455 of yacc.c */
3983 #line 1614 "compilers/imcc/imcc.y"
3984 { (yyval
.i
) = 0; IMCC_INFO(interp
)->cur_call
= NULL
; }
3989 /* Line 1455 of yacc.c */
3990 #line 1618 "compilers/imcc/imcc.y"
3991 { (yyval
.i
) = NULL
; IMCC_INFO(interp
)->cur_call
->pcc_sub
->label
= 0; }
3996 /* Line 1455 of yacc.c */
3997 #line 1619 "compilers/imcc/imcc.y"
3998 { (yyval
.i
) = NULL
; IMCC_INFO(interp
)->cur_call
->pcc_sub
->label
= 1; }
4003 /* Line 1455 of yacc.c */
4004 #line 1623 "compilers/imcc/imcc.y"
4005 { (yyval
.i
) = NULL
; }
4010 /* Line 1455 of yacc.c */
4011 #line 1624 "compilers/imcc/imcc.y"
4012 { (yyval
.i
) = NULL
; IMCC_INFO(interp
)->cur_call
->pcc_sub
->object
= (yyvsp
[(2) - (3)].sr
); }
4017 /* Line 1455 of yacc.c */
4018 #line 1628 "compilers/imcc/imcc.y"
4024 /* Line 1455 of yacc.c */
4025 #line 1633 "compilers/imcc/imcc.y"
4026 { (yyval
.t
) = (yyvsp
[(1) - (1)].t
); }
4031 /* Line 1455 of yacc.c */
4032 #line 1634 "compilers/imcc/imcc.y"
4033 { (yyval
.t
) = (yyvsp
[(1) - (2)].t
) | (yyvsp
[(2) - (2)].t
); }
4038 /* Line 1455 of yacc.c */
4039 #line 1638 "compilers/imcc/imcc.y"
4040 { (yyval
.t
) = P_LOAD
; }
4045 /* Line 1455 of yacc.c */
4046 #line 1639 "compilers/imcc/imcc.y"
4047 { (yyval
.t
) = P_INIT
; }
4052 /* Line 1455 of yacc.c */
4053 #line 1640 "compilers/imcc/imcc.y"
4054 { (yyval
.t
) = P_MAIN
; }
4059 /* Line 1455 of yacc.c */
4060 #line 1641 "compilers/imcc/imcc.y"
4061 { (yyval
.t
) = P_IMMEDIATE
; }
4066 /* Line 1455 of yacc.c */
4067 #line 1642 "compilers/imcc/imcc.y"
4068 { (yyval
.t
) = P_POSTCOMP
; }
4073 /* Line 1455 of yacc.c */
4074 #line 1643 "compilers/imcc/imcc.y"
4075 { (yyval
.t
) = P_ANON
; }
4080 /* Line 1455 of yacc.c */
4081 #line 1644 "compilers/imcc/imcc.y"
4082 { (yyval
.t
) = P_NEED_LEX
; }
4087 /* Line 1455 of yacc.c */
4088 #line 1656 "compilers/imcc/imcc.y"
4090 add_pcc_sub(IMCC_INFO(interp
)->cur_call
, (yyvsp
[(2) - (5)].sr
));
4091 add_pcc_cc(IMCC_INFO(interp
)->cur_call
, (yyvsp
[(4) - (5)].sr
));
4097 /* Line 1455 of yacc.c */
4098 #line 1661 "compilers/imcc/imcc.y"
4100 add_pcc_sub(IMCC_INFO(interp
)->cur_call
, (yyvsp
[(2) - (3)].sr
));
4106 /* Line 1455 of yacc.c */
4107 #line 1665 "compilers/imcc/imcc.y"
4109 add_pcc_sub(IMCC_INFO(interp
)->cur_call
, (yyvsp
[(2) - (3)].sr
));
4110 IMCC_INFO(interp
)->cur_call
->pcc_sub
->flags
|= isNCI
;
4116 /* Line 1455 of yacc.c */
4117 #line 1670 "compilers/imcc/imcc.y"
4119 add_pcc_sub(IMCC_INFO(interp
)->cur_call
, (yyvsp
[(2) - (3)].sr
));
4125 /* Line 1455 of yacc.c */
4126 #line 1674 "compilers/imcc/imcc.y"
4128 add_pcc_sub(IMCC_INFO(interp
)->cur_call
, mk_const(interp
, (yyvsp
[(2) - (3)].s
), 'S'));
4134 /* Line 1455 of yacc.c */
4135 #line 1678 "compilers/imcc/imcc.y"
4137 add_pcc_sub(IMCC_INFO(interp
)->cur_call
, (yyvsp
[(2) - (5)].sr
));
4138 add_pcc_cc(IMCC_INFO(interp
)->cur_call
, (yyvsp
[(4) - (5)].sr
));
4144 /* Line 1455 of yacc.c */
4145 #line 1683 "compilers/imcc/imcc.y"
4147 add_pcc_sub(IMCC_INFO(interp
)->cur_call
, mk_const(interp
, (yyvsp
[(2) - (5)].s
), 'S'));
4148 add_pcc_cc(IMCC_INFO(interp
)->cur_call
, (yyvsp
[(4) - (5)].sr
));
4154 /* Line 1455 of yacc.c */
4155 #line 1691 "compilers/imcc/imcc.y"
4161 /* Line 1455 of yacc.c */
4162 #line 1692 "compilers/imcc/imcc.y"
4163 { add_pcc_arg(interp
, IMCC_INFO(interp
)->cur_call
, (yyvsp
[(2) - (3)].sr
)); }
4168 /* Line 1455 of yacc.c */
4169 #line 1696 "compilers/imcc/imcc.y"
4170 { (yyval
.sr
) = (yyvsp
[(2) - (2)].sr
); }
4175 /* Line 1455 of yacc.c */
4176 #line 1701 "compilers/imcc/imcc.y"
4182 /* Line 1455 of yacc.c */
4183 #line 1703 "compilers/imcc/imcc.y"
4185 if ((yyvsp
[(2) - (3)].sr
))
4186 add_pcc_result(interp
, IMCC_INFO(interp
)->cur_call
, (yyvsp
[(2) - (3)].sr
));
4192 /* Line 1455 of yacc.c */
4193 #line 1710 "compilers/imcc/imcc.y"
4194 { (yyval
.sr
) = (yyvsp
[(2) - (3)].sr
); (yyval
.sr
)->type
|= (yyvsp
[(3) - (3)].t
); }
4199 /* Line 1455 of yacc.c */
4200 #line 1711 "compilers/imcc/imcc.y"
4201 { IMCC_INFO(interp
)->is_def
= 1; }
4206 /* Line 1455 of yacc.c */
4207 #line 1712 "compilers/imcc/imcc.y"
4209 IdList
* const l
= (yyvsp
[(4) - (4)].idlist
);
4212 ignored
= mk_ident_ur(interp
, l
->id
, (yyvsp
[(3) - (4)].t
));
4214 ignored
= mk_ident(interp
, l
->id
, (yyvsp
[(3) - (4)].t
));
4216 IMCC_INFO(interp
)->is_def
= 0;
4223 /* Line 1455 of yacc.c */
4224 #line 1726 "compilers/imcc/imcc.y"
4230 /* Line 1455 of yacc.c */
4231 #line 1727 "compilers/imcc/imcc.y"
4232 { (yyval
.t
) = (yyvsp
[(1) - (2)].t
) | (yyvsp
[(2) - (2)].t
); }
4237 /* Line 1455 of yacc.c */
4238 #line 1731 "compilers/imcc/imcc.y"
4239 { (yyval
.t
) = VT_FLAT
; }
4244 /* Line 1455 of yacc.c */
4245 #line 1732 "compilers/imcc/imcc.y"
4246 { (yyval
.t
) = VT_OPTIONAL
; }
4251 /* Line 1455 of yacc.c */
4252 #line 1733 "compilers/imcc/imcc.y"
4253 { (yyval
.t
) = VT_OPT_FLAG
; }
4258 /* Line 1455 of yacc.c */
4259 #line 1734 "compilers/imcc/imcc.y"
4260 { (yyval
.t
) = VT_NAMED
; }
4265 /* Line 1455 of yacc.c */
4266 #line 1735 "compilers/imcc/imcc.y"
4267 { adv_named_set(interp
, (yyvsp
[(3) - (4)].s
)); (yyval
.t
) = 0; mem_sys_free((yyvsp
[(3) - (4)].s
)); }
4272 /* Line 1455 of yacc.c */
4273 #line 1736 "compilers/imcc/imcc.y"
4274 { adv_named_set_u(interp
, (yyvsp
[(3) - (4)].s
)); (yyval
.t
) = 0; mem_sys_free((yyvsp
[(3) - (4)].s
)); }
4279 /* Line 1455 of yacc.c */
4280 #line 1737 "compilers/imcc/imcc.y"
4281 { (yyval
.t
) = VT_UNIQUE_REG
; }
4286 /* Line 1455 of yacc.c */
4287 #line 1738 "compilers/imcc/imcc.y"
4288 { (yyval
.t
) = VT_CALL_SIG
; }
4293 /* Line 1455 of yacc.c */
4294 #line 1743 "compilers/imcc/imcc.y"
4295 { begin_return_or_yield(interp
, 0); }
4300 /* Line 1455 of yacc.c */
4301 #line 1745 "compilers/imcc/imcc.y"
4302 { (yyval
.i
) = 0; IMCC_INFO(interp
)->asm_state
= AsmDefault
; }
4307 /* Line 1455 of yacc.c */
4308 #line 1747 "compilers/imcc/imcc.y"
4310 IMCC_INFO(interp
)->asm_state
= AsmDefault
;
4317 /* Line 1455 of yacc.c */
4318 #line 1754 "compilers/imcc/imcc.y"
4319 { begin_return_or_yield(interp
, 1); }
4324 /* Line 1455 of yacc.c */
4325 #line 1756 "compilers/imcc/imcc.y"
4326 { (yyval
.i
) = 0; IMCC_INFO(interp
)->asm_state
= AsmDefault
; }
4331 /* Line 1455 of yacc.c */
4332 #line 1760 "compilers/imcc/imcc.y"
4338 /* Line 1455 of yacc.c */
4339 #line 1762 "compilers/imcc/imcc.y"
4341 if ((yyvsp
[(1) - (2)].sr
))
4342 add_pcc_result(interp
, IMCC_INFO(interp
)->sr_return
, (yyvsp
[(1) - (2)].sr
));
4348 /* Line 1455 of yacc.c */
4349 #line 1767 "compilers/imcc/imcc.y"
4351 if ((yyvsp
[(2) - (3)].sr
))
4352 add_pcc_result(interp
, IMCC_INFO(interp
)->sr_return
, (yyvsp
[(2) - (3)].sr
));
4358 /* Line 1455 of yacc.c */
4359 #line 1774 "compilers/imcc/imcc.y"
4365 /* Line 1455 of yacc.c */
4366 #line 1776 "compilers/imcc/imcc.y"
4368 if ((yyvsp
[(1) - (2)].sr
))
4369 add_pcc_result(interp
, IMCC_INFO(interp
)->sr_return
, (yyvsp
[(1) - (2)].sr
));
4375 /* Line 1455 of yacc.c */
4376 #line 1781 "compilers/imcc/imcc.y"
4378 if ((yyvsp
[(2) - (3)].sr
))
4379 add_pcc_result(interp
, IMCC_INFO(interp
)->sr_return
, (yyvsp
[(2) - (3)].sr
));
4385 /* Line 1455 of yacc.c */
4386 #line 1788 "compilers/imcc/imcc.y"
4387 { (yyval
.sr
) = (yyvsp
[(2) - (3)].sr
); (yyval
.sr
)->type
|= (yyvsp
[(3) - (3)].t
); }
4392 /* Line 1455 of yacc.c */
4393 #line 1792 "compilers/imcc/imcc.y"
4394 { (yyval
.sr
) = (yyvsp
[(2) - (3)].sr
); (yyval
.sr
)->type
|= (yyvsp
[(3) - (3)].t
); }
4399 /* Line 1455 of yacc.c */
4400 #line 1797 "compilers/imcc/imcc.y"
4402 if (IMCC_INFO(interp
)->asm_state
== AsmDefault
)
4403 begin_return_or_yield(interp
, (yyvsp
[(1) - (2)].t
));
4409 /* Line 1455 of yacc.c */
4410 #line 1802 "compilers/imcc/imcc.y"
4412 IMCC_INFO(interp
)->asm_state
= AsmDefault
;
4419 /* Line 1455 of yacc.c */
4420 #line 1809 "compilers/imcc/imcc.y"
4426 /* Line 1455 of yacc.c */
4427 #line 1810 "compilers/imcc/imcc.y"
4433 /* Line 1455 of yacc.c */
4434 #line 1814 "compilers/imcc/imcc.y"
4440 /* Line 1455 of yacc.c */
4441 #line 1816 "compilers/imcc/imcc.y"
4443 if (IMCC_INFO(interp
)->adv_named_id
) {
4444 add_pcc_named_return(interp
, IMCC_INFO(interp
)->sr_return
,
4445 IMCC_INFO(interp
)->adv_named_id
, (yyvsp
[(1) - (1)].sr
));
4446 IMCC_INFO(interp
)->adv_named_id
= NULL
;
4449 add_pcc_result(interp
, IMCC_INFO(interp
)->sr_return
, (yyvsp
[(1) - (1)].sr
));
4455 /* Line 1455 of yacc.c */
4456 #line 1826 "compilers/imcc/imcc.y"
4458 SymReg
* const name
= mk_const(interp
, (yyvsp
[(1) - (3)].s
), 'S');
4459 add_pcc_named_return(interp
, IMCC_INFO(interp
)->sr_return
, name
, (yyvsp
[(3) - (3)].sr
));
4465 /* Line 1455 of yacc.c */
4466 #line 1831 "compilers/imcc/imcc.y"
4468 if (IMCC_INFO(interp
)->adv_named_id
) {
4469 add_pcc_named_return(interp
, IMCC_INFO(interp
)->sr_return
,
4470 IMCC_INFO(interp
)->adv_named_id
, (yyvsp
[(3) - (3)].sr
));
4471 IMCC_INFO(interp
)->adv_named_id
= NULL
;
4474 add_pcc_result(interp
, IMCC_INFO(interp
)->sr_return
, (yyvsp
[(3) - (3)].sr
));
4480 /* Line 1455 of yacc.c */
4481 #line 1841 "compilers/imcc/imcc.y"
4483 SymReg
* const name
= mk_const(interp
, (yyvsp
[(3) - (5)].s
), 'S');
4484 add_pcc_named_return(interp
, IMCC_INFO(interp
)->sr_return
, name
, (yyvsp
[(5) - (5)].sr
));
4490 /* Line 1455 of yacc.c */
4491 #line 1862 "compilers/imcc/imcc.y"
4492 { clear_state(interp
); }
4497 /* Line 1455 of yacc.c */
4498 #line 1867 "compilers/imcc/imcc.y"
4499 { (yyval
.i
) = (yyvsp
[(2) - (2)].i
); }
4504 /* Line 1455 of yacc.c */
4505 #line 1868 "compilers/imcc/imcc.y"
4511 /* Line 1455 of yacc.c */
4512 #line 1869 "compilers/imcc/imcc.y"
4518 /* Line 1455 of yacc.c */
4519 #line 1870 "compilers/imcc/imcc.y"
4525 /* Line 1455 of yacc.c */
4526 #line 1871 "compilers/imcc/imcc.y"
4532 /* Line 1455 of yacc.c */
4533 #line 1872 "compilers/imcc/imcc.y"
4534 { (yyval
.i
) = (yyvsp
[(1) - (1)].i
); }
4539 /* Line 1455 of yacc.c */
4540 #line 1876 "compilers/imcc/imcc.y"
4541 { (yyval
.i
) = NULL
; }
4546 /* Line 1455 of yacc.c */
4547 #line 1887 "compilers/imcc/imcc.y"
4549 Instruction
* const i
= iLABEL(interp
, IMCC_INFO(interp
)->cur_unit
, mk_local_label(interp
, (yyvsp
[(1) - (1)].s
)));
4550 mem_sys_free((yyvsp
[(1) - (1)].s
));
4557 /* Line 1455 of yacc.c */
4558 #line 1897 "compilers/imcc/imcc.y"
4559 { (yyval
.i
) = (yyvsp
[(2) - (3)].i
); }
4564 /* Line 1455 of yacc.c */
4565 #line 1899 "compilers/imcc/imcc.y"
4567 if (yynerrs
>= PARROT_MAX_RECOVER_ERRORS
) {
4568 IMCC_warning(interp
, "Too many errors. Correct some first.\n");
4577 /* Line 1455 of yacc.c */
4578 #line 1910 "compilers/imcc/imcc.y"
4580 IdList
* const l
= (yyvsp
[(1) - (1)].idlist
);
4588 /* Line 1455 of yacc.c */
4589 #line 1917 "compilers/imcc/imcc.y"
4591 IdList
* const l
= (yyvsp
[(3) - (3)].idlist
);
4592 l
->next
= (yyvsp
[(1) - (3)].idlist
);
4599 /* Line 1455 of yacc.c */
4600 #line 1926 "compilers/imcc/imcc.y"
4602 IdList
* const l
= mem_gc_allocate_n_zeroed_typed(interp
, 1, IdList
);
4603 l
->id
= (yyvsp
[(1) - (2)].s
);
4604 l
->unique_reg
= (yyvsp
[(2) - (2)].t
);
4611 /* Line 1455 of yacc.c */
4612 #line 1935 "compilers/imcc/imcc.y"
4618 /* Line 1455 of yacc.c */
4619 #line 1936 "compilers/imcc/imcc.y"
4625 /* Line 1455 of yacc.c */
4626 #line 1943 "compilers/imcc/imcc.y"
4627 { IMCC_INFO(interp
)->is_def
= 1; }
4632 /* Line 1455 of yacc.c */
4633 #line 1944 "compilers/imcc/imcc.y"
4635 IdList
*l
= (yyvsp
[(4) - (4)].idlist
);
4639 mk_ident_ur(interp
, l
->id
, (yyvsp
[(3) - (4)].t
));
4641 mk_ident(interp
, l
->id
, (yyvsp
[(3) - (4)].t
));
4644 mem_sys_free(l1
->id
);
4647 IMCC_INFO(interp
)->is_def
= 0; (yyval
.i
) = 0;
4653 /* Line 1455 of yacc.c */
4654 #line 1960 "compilers/imcc/imcc.y"
4656 if ((yyvsp
[(4) - (4)].sr
)->set
!= 'P') {
4657 mem_sys_free((yyvsp
[(2) - (4)].s
));
4658 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
4659 "Cannot use %c register with .lex", (yyvsp
[(4) - (4)].sr
)->set
);
4663 char *name
= mem_sys_strdup((yyvsp
[(2) - (4)].s
) + 1);
4664 name
[strlen(name
) - 1] = 0;
4665 n
= mk_const(interp
, name
, 'S');
4666 set_lexical(interp
, (yyvsp
[(4) - (4)].sr
), n
); (yyval
.i
) = 0;
4667 mem_sys_free((yyvsp
[(2) - (4)].s
));
4675 /* Line 1455 of yacc.c */
4676 #line 1977 "compilers/imcc/imcc.y"
4678 if ((yyvsp
[(4) - (4)].sr
)->set
!= 'P') {
4679 mem_sys_free((yyvsp
[(2) - (4)].s
));
4680 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
4681 "Cannot use %c register with .lex", (yyvsp
[(4) - (4)].sr
)->set
);
4684 SymReg
*n
= mk_const(interp
, (yyvsp
[(2) - (4)].s
), 'U');
4685 set_lexical(interp
, (yyvsp
[(4) - (4)].sr
), n
); (yyval
.i
) = 0;
4686 mem_sys_free((yyvsp
[(2) - (4)].s
));
4693 /* Line 1455 of yacc.c */
4694 #line 1989 "compilers/imcc/imcc.y"
4695 { IMCC_INFO(interp
)->is_def
= 1; }
4700 /* Line 1455 of yacc.c */
4701 #line 1990 "compilers/imcc/imcc.y"
4703 mk_const_ident(interp
, (yyvsp
[(4) - (6)].s
), (yyvsp
[(3) - (6)].t
), (yyvsp
[(6) - (6)].sr
), 0);
4704 IMCC_INFO(interp
)->is_def
= 0;
4705 mem_sys_free((yyvsp
[(4) - (6)].s
));
4711 /* Line 1455 of yacc.c */
4712 #line 1997 "compilers/imcc/imcc.y"
4713 { IMCC_INFO(interp
)->is_def
= 1; }
4718 /* Line 1455 of yacc.c */
4719 #line 1998 "compilers/imcc/imcc.y"
4721 mk_const_ident(interp
, (yyvsp
[(4) - (6)].s
), (yyvsp
[(3) - (6)].t
), (yyvsp
[(6) - (6)].sr
), 1);
4722 IMCC_INFO(interp
)->is_def
= 0;
4723 mem_sys_free((yyvsp
[(4) - (6)].s
));
4729 /* Line 1455 of yacc.c */
4730 #line 2004 "compilers/imcc/imcc.y"
4733 IMCC_INFO(interp
)->cur_call
->pcc_sub
->flags
|= isTAIL_CALL
;
4734 IMCC_INFO(interp
)->cur_call
= NULL
;
4740 /* Line 1455 of yacc.c */
4741 #line 2010 "compilers/imcc/imcc.y"
4743 (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, "branch", 1, (yyvsp
[(2) - (2)].sr
));
4749 /* Line 1455 of yacc.c */
4750 #line 2014 "compilers/imcc/imcc.y"
4752 (yyval
.i
) = INS(interp
,
4753 IMCC_INFO(interp
)->cur_unit
,
4754 (yyvsp
[(1) - (2)].s
),
4756 IMCC_INFO(interp
)->regs
,
4757 IMCC_INFO(interp
)->nargs
,
4758 IMCC_INFO(interp
)->keyvec
,
4760 mem_sys_free((yyvsp
[(1) - (2)].s
));
4766 /* Line 1455 of yacc.c */
4767 #line 2025 "compilers/imcc/imcc.y"
4768 { (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, "null", 1, (yyvsp
[(2) - (2)].sr
)); }
4773 /* Line 1455 of yacc.c */
4774 #line 2026 "compilers/imcc/imcc.y"
4775 { (yyval
.i
) = 0; IMCC_INFO(interp
)->cur_call
= NULL
; }
4780 /* Line 1455 of yacc.c */
4781 #line 2027 "compilers/imcc/imcc.y"
4787 /* Line 1455 of yacc.c */
4788 #line 2030 "compilers/imcc/imcc.y"
4794 /* Line 1455 of yacc.c */
4795 #line 2034 "compilers/imcc/imcc.y"
4796 { (yyval
.t
) = 'I'; }
4801 /* Line 1455 of yacc.c */
4802 #line 2035 "compilers/imcc/imcc.y"
4803 { (yyval
.t
) = 'N'; }
4808 /* Line 1455 of yacc.c */
4809 #line 2036 "compilers/imcc/imcc.y"
4810 { (yyval
.t
) = 'S'; }
4815 /* Line 1455 of yacc.c */
4816 #line 2037 "compilers/imcc/imcc.y"
4817 { (yyval
.t
) = 'P'; }
4822 /* Line 1455 of yacc.c */
4823 #line 2042 "compilers/imcc/imcc.y"
4825 /* there'd normally be a mem_sys_strdup() here, but the lexer already
4826 * copied the string, so it's safe to use directly */
4827 if ((IMCC_INFO(interp
)->cur_pmc_type
= Parrot_pmc_get_type_str(interp
,
4828 Parrot_str_new(interp
, (yyvsp
[(1) - (1)].s
), 0))) <= 0) {
4829 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
4830 "Unknown PMC type '%s'\n", (yyvsp
[(1) - (1)].s
));
4837 /* Line 1455 of yacc.c */
4838 #line 2055 "compilers/imcc/imcc.y"
4839 { (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, "set", 2, (yyvsp
[(1) - (3)].sr
), (yyvsp
[(3) - (3)].sr
)); }
4844 /* Line 1455 of yacc.c */
4845 #line 2057 "compilers/imcc/imcc.y"
4846 { (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(3) - (4)].s
), 2, (yyvsp
[(1) - (4)].sr
), (yyvsp
[(4) - (4)].sr
)); }
4851 /* Line 1455 of yacc.c */
4852 #line 2059 "compilers/imcc/imcc.y"
4853 { (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(4) - (5)].s
), 3, (yyvsp
[(1) - (5)].sr
), (yyvsp
[(3) - (5)].sr
), (yyvsp
[(5) - (5)].sr
)); }
4858 /* Line 1455 of yacc.c */
4859 #line 2061 "compilers/imcc/imcc.y"
4860 { (yyval
.i
) = iINDEXFETCH(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(1) - (6)].sr
), (yyvsp
[(3) - (6)].sr
), (yyvsp
[(5) - (6)].sr
)); }
4865 /* Line 1455 of yacc.c */
4866 #line 2063 "compilers/imcc/imcc.y"
4867 { (yyval
.i
) = iINDEXSET(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(1) - (6)].sr
), (yyvsp
[(3) - (6)].sr
), (yyvsp
[(6) - (6)].sr
)); }
4872 /* Line 1455 of yacc.c */
4873 #line 2068 "compilers/imcc/imcc.y"
4874 { (yyval
.i
) = iNEW(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(1) - (7)].sr
), (yyvsp
[(4) - (7)].s
), (yyvsp
[(6) - (7)].sr
), 1); }
4879 /* Line 1455 of yacc.c */
4880 #line 2071 "compilers/imcc/imcc.y"
4882 add_pcc_result(interp
, (yyvsp
[(3) - (3)].i
)->symregs
[0], (yyvsp
[(1) - (3)].sr
));
4883 IMCC_INFO(interp
)->cur_call
= NULL
;
4890 /* Line 1455 of yacc.c */
4891 #line 2077 "compilers/imcc/imcc.y"
4893 (yyval
.i
) = IMCC_create_itcall_label(interp
);
4899 /* Line 1455 of yacc.c */
4900 #line 2081 "compilers/imcc/imcc.y"
4902 IMCC_itcall_sub(interp
, (yyvsp
[(6) - (9)].sr
));
4903 IMCC_INFO(interp
)->cur_call
= NULL
;
4909 /* Line 1455 of yacc.c */
4910 #line 2089 "compilers/imcc/imcc.y"
4912 (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, "null", 1, (yyvsp
[(1) - (3)].sr
));
4918 /* Line 1455 of yacc.c */
4919 #line 2096 "compilers/imcc/imcc.y"
4920 { (yyval
.s
) = (char *)"not"; }
4925 /* Line 1455 of yacc.c */
4926 #line 2097 "compilers/imcc/imcc.y"
4927 { (yyval
.s
) = (char *)"bnot"; }
4932 /* Line 1455 of yacc.c */
4933 #line 2098 "compilers/imcc/imcc.y"
4934 { (yyval
.s
) = (char *)"neg"; }
4939 /* Line 1455 of yacc.c */
4940 #line 2102 "compilers/imcc/imcc.y"
4941 { (yyval
.s
) = (char *)"sub"; }
4946 /* Line 1455 of yacc.c */
4947 #line 2103 "compilers/imcc/imcc.y"
4948 { (yyval
.s
) = (char *)"add"; }
4953 /* Line 1455 of yacc.c */
4954 #line 2104 "compilers/imcc/imcc.y"
4955 { (yyval
.s
) = (char *)"mul"; }
4960 /* Line 1455 of yacc.c */
4961 #line 2105 "compilers/imcc/imcc.y"
4962 { (yyval
.s
) = (char *)"div"; }
4967 /* Line 1455 of yacc.c */
4968 #line 2106 "compilers/imcc/imcc.y"
4969 { (yyval
.s
) = (char *)"mod"; }
4974 /* Line 1455 of yacc.c */
4975 #line 2107 "compilers/imcc/imcc.y"
4976 { (yyval
.s
) = (char *)"fdiv"; }
4981 /* Line 1455 of yacc.c */
4982 #line 2108 "compilers/imcc/imcc.y"
4983 { (yyval
.s
) = (char *)"pow"; }
4988 /* Line 1455 of yacc.c */
4989 #line 2109 "compilers/imcc/imcc.y"
4990 { (yyval
.s
) = (char *)"concat"; }
4995 /* Line 1455 of yacc.c */
4996 #line 2110 "compilers/imcc/imcc.y"
4997 { (yyval
.s
) = (char *)"iseq"; }
5002 /* Line 1455 of yacc.c */
5003 #line 2111 "compilers/imcc/imcc.y"
5004 { (yyval
.s
) = (char *)"isne"; }
5009 /* Line 1455 of yacc.c */
5010 #line 2112 "compilers/imcc/imcc.y"
5011 { (yyval
.s
) = (char *)"isgt"; }
5016 /* Line 1455 of yacc.c */
5017 #line 2113 "compilers/imcc/imcc.y"
5018 { (yyval
.s
) = (char *)"isge"; }
5023 /* Line 1455 of yacc.c */
5024 #line 2114 "compilers/imcc/imcc.y"
5025 { (yyval
.s
) = (char *)"islt"; }
5030 /* Line 1455 of yacc.c */
5031 #line 2115 "compilers/imcc/imcc.y"
5032 { (yyval
.s
) = (char *)"isle"; }
5037 /* Line 1455 of yacc.c */
5038 #line 2116 "compilers/imcc/imcc.y"
5039 { (yyval
.s
) = (char *)"shl"; }
5044 /* Line 1455 of yacc.c */
5045 #line 2117 "compilers/imcc/imcc.y"
5046 { (yyval
.s
) = (char *)"shr"; }
5051 /* Line 1455 of yacc.c */
5052 #line 2118 "compilers/imcc/imcc.y"
5053 { (yyval
.s
) = (char *)"lsr"; }
5058 /* Line 1455 of yacc.c */
5059 #line 2119 "compilers/imcc/imcc.y"
5060 { (yyval
.s
) = (char *)"and"; }
5065 /* Line 1455 of yacc.c */
5066 #line 2120 "compilers/imcc/imcc.y"
5067 { (yyval
.s
) = (char *)"or"; }
5072 /* Line 1455 of yacc.c */
5073 #line 2121 "compilers/imcc/imcc.y"
5074 { (yyval
.s
) = (char *)"xor"; }
5079 /* Line 1455 of yacc.c */
5080 #line 2122 "compilers/imcc/imcc.y"
5081 { (yyval
.s
) = (char *)"band"; }
5086 /* Line 1455 of yacc.c */
5087 #line 2123 "compilers/imcc/imcc.y"
5088 { (yyval
.s
) = (char *)"bor"; }
5093 /* Line 1455 of yacc.c */
5094 #line 2124 "compilers/imcc/imcc.y"
5095 { (yyval
.s
) = (char *)"bxor"; }
5100 /* Line 1455 of yacc.c */
5101 #line 2130 "compilers/imcc/imcc.y"
5103 (yyval
.i
) = IMCC_create_itcall_label(interp
);
5104 (yyval
.i
)->type
&= ~ITCALL
;
5105 (yyval
.i
)->type
|= ITRESULT
;
5111 /* Line 1455 of yacc.c */
5112 #line 2135 "compilers/imcc/imcc.y"
5118 /* Line 1455 of yacc.c */
5119 #line 2142 "compilers/imcc/imcc.y"
5120 { (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(2) - (3)].s
), 2, (yyvsp
[(1) - (3)].sr
), (yyvsp
[(3) - (3)].sr
)); }
5125 /* Line 1455 of yacc.c */
5126 #line 2146 "compilers/imcc/imcc.y"
5127 { (yyval
.s
) = (char *)"add"; }
5132 /* Line 1455 of yacc.c */
5133 #line 2147 "compilers/imcc/imcc.y"
5134 { (yyval
.s
) = (char *)"sub"; }
5139 /* Line 1455 of yacc.c */
5140 #line 2148 "compilers/imcc/imcc.y"
5141 { (yyval
.s
) = (char *)"mul"; }
5146 /* Line 1455 of yacc.c */
5147 #line 2149 "compilers/imcc/imcc.y"
5148 { (yyval
.s
) = (char *)"div"; }
5153 /* Line 1455 of yacc.c */
5154 #line 2150 "compilers/imcc/imcc.y"
5155 { (yyval
.s
) = (char *)"mod"; }
5160 /* Line 1455 of yacc.c */
5161 #line 2151 "compilers/imcc/imcc.y"
5162 { (yyval
.s
) = (char *)"fdiv"; }
5167 /* Line 1455 of yacc.c */
5168 #line 2152 "compilers/imcc/imcc.y"
5169 { (yyval
.s
) = (char *)"concat"; }
5174 /* Line 1455 of yacc.c */
5175 #line 2153 "compilers/imcc/imcc.y"
5176 { (yyval
.s
) = (char *)"band"; }
5181 /* Line 1455 of yacc.c */
5182 #line 2154 "compilers/imcc/imcc.y"
5183 { (yyval
.s
) = (char *)"bor"; }
5188 /* Line 1455 of yacc.c */
5189 #line 2155 "compilers/imcc/imcc.y"
5190 { (yyval
.s
) = (char *)"bxor"; }
5195 /* Line 1455 of yacc.c */
5196 #line 2156 "compilers/imcc/imcc.y"
5197 { (yyval
.s
) = (char *)"shr"; }
5202 /* Line 1455 of yacc.c */
5203 #line 2157 "compilers/imcc/imcc.y"
5204 { (yyval
.s
) = (char *)"shl"; }
5209 /* Line 1455 of yacc.c */
5210 #line 2158 "compilers/imcc/imcc.y"
5211 { (yyval
.s
) = (char *)"lsr"; }
5216 /* Line 1455 of yacc.c */
5217 #line 2164 "compilers/imcc/imcc.y"
5219 (yyval
.i
) = func_ins(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(1) - (4)].sr
), (yyvsp
[(3) - (4)].s
),
5220 IMCC_INFO(interp
) -> regs
,
5221 IMCC_INFO(interp
) -> nargs
,
5222 IMCC_INFO(interp
) -> keyvec
, 1);
5223 mem_sys_free((yyvsp
[(3) - (4)].s
));
5229 /* Line 1455 of yacc.c */
5230 #line 2174 "compilers/imcc/imcc.y"
5231 { (yyval
.sr
) = mk_sub_address(interp
, (yyvsp
[(1) - (1)].s
)); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5236 /* Line 1455 of yacc.c */
5237 #line 2175 "compilers/imcc/imcc.y"
5238 { (yyval
.sr
) = mk_sub_address_fromc(interp
, (yyvsp
[(1) - (1)].s
)); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5243 /* Line 1455 of yacc.c */
5244 #line 2176 "compilers/imcc/imcc.y"
5245 { (yyval
.sr
) = mk_sub_address_u(interp
, (yyvsp
[(1) - (1)].s
)); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5250 /* Line 1455 of yacc.c */
5251 #line 2178 "compilers/imcc/imcc.y"
5253 (yyval
.sr
) = (yyvsp
[(1) - (1)].sr
);
5254 if ((yyvsp
[(1) - (1)].sr
)->set
!= 'P')
5255 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
, "Sub isn't a PMC");
5261 /* Line 1455 of yacc.c */
5262 #line 2184 "compilers/imcc/imcc.y"
5264 /* disallow bareword method names; SREG name constants are fine */
5265 const char * const name
= (yyvsp
[(3) - (3)].sr
)->name
;
5266 if (!((yyvsp
[(3) - (3)].sr
)->type
& VTREG
)) {
5267 if (*name
!= '\'' || *name
!= '\"')
5268 IMCC_fataly(interp
, EXCEPTION_SYNTAX_ERROR
,
5269 "Bareword method name '%s' not allowed in PIR",
5270 (yyvsp
[(3) - (3)].sr
)->name
);
5273 IMCC_INFO(interp
)->cur_obj
= (yyvsp
[(1) - (3)].sr
);
5274 (yyval
.sr
) = (yyvsp
[(3) - (3)].sr
);
5280 /* Line 1455 of yacc.c */
5281 #line 2198 "compilers/imcc/imcc.y"
5283 IMCC_INFO(interp
)->cur_obj
= (yyvsp
[(1) - (3)].sr
);
5284 (yyval
.sr
) = mk_const(interp
, (yyvsp
[(3) - (3)].s
), 'U');
5285 mem_sys_free((yyvsp
[(3) - (3)].s
));
5291 /* Line 1455 of yacc.c */
5292 #line 2204 "compilers/imcc/imcc.y"
5294 IMCC_INFO(interp
)->cur_obj
= (yyvsp
[(1) - (3)].sr
);
5295 (yyval
.sr
) = mk_const(interp
, (yyvsp
[(3) - (3)].s
), 'S');
5296 mem_sys_free((yyvsp
[(3) - (3)].s
));
5302 /* Line 1455 of yacc.c */
5303 #line 2209 "compilers/imcc/imcc.y"
5304 { IMCC_INFO(interp
)->cur_obj
= (yyvsp
[(1) - (3)].sr
); (yyval
.sr
) = (yyvsp
[(3) - (3)].sr
); }
5309 /* Line 1455 of yacc.c */
5310 #line 2215 "compilers/imcc/imcc.y"
5312 (yyval
.i
) = IMCC_create_itcall_label(interp
);
5313 IMCC_itcall_sub(interp
, (yyvsp
[(1) - (1)].sr
));
5319 /* Line 1455 of yacc.c */
5320 #line 2219 "compilers/imcc/imcc.y"
5321 { (yyval
.i
) = (yyvsp
[(2) - (5)].i
); }
5326 /* Line 1455 of yacc.c */
5327 #line 2223 "compilers/imcc/imcc.y"
5333 /* Line 1455 of yacc.c */
5334 #line 2225 "compilers/imcc/imcc.y"
5337 if (IMCC_INFO(interp
)->adv_named_id
) {
5338 add_pcc_named_arg(interp
, IMCC_INFO(interp
)->cur_call
, IMCC_INFO(interp
)->adv_named_id
, (yyvsp
[(3) - (3)].sr
));
5339 IMCC_INFO(interp
)->adv_named_id
= NULL
;
5342 add_pcc_arg(interp
, IMCC_INFO(interp
)->cur_call
, (yyvsp
[(3) - (3)].sr
));
5348 /* Line 1455 of yacc.c */
5349 #line 2235 "compilers/imcc/imcc.y"
5352 if (IMCC_INFO(interp
)->adv_named_id
) {
5353 add_pcc_named_arg(interp
, IMCC_INFO(interp
)->cur_call
, IMCC_INFO(interp
)->adv_named_id
, (yyvsp
[(1) - (1)].sr
));
5354 IMCC_INFO(interp
)->adv_named_id
= NULL
;
5357 add_pcc_arg(interp
, IMCC_INFO(interp
)->cur_call
, (yyvsp
[(1) - (1)].sr
));
5363 /* Line 1455 of yacc.c */
5364 #line 2245 "compilers/imcc/imcc.y"
5367 add_pcc_named_arg(interp
, IMCC_INFO(interp
)->cur_call
,
5368 mk_const(interp
, (yyvsp
[(3) - (5)].s
), 'S'), (yyvsp
[(5) - (5)].sr
));
5369 mem_sys_free((yyvsp
[(3) - (5)].s
));
5375 /* Line 1455 of yacc.c */
5376 #line 2252 "compilers/imcc/imcc.y"
5379 add_pcc_named_arg_var(interp
, IMCC_INFO(interp
)->cur_call
, (yyvsp
[(1) - (3)].sr
), (yyvsp
[(3) - (3)].sr
));
5385 /* Line 1455 of yacc.c */
5386 #line 2257 "compilers/imcc/imcc.y"
5389 add_pcc_named_arg(interp
, IMCC_INFO(interp
)->cur_call
,
5390 mk_const(interp
, (yyvsp
[(1) - (3)].s
), 'S'), (yyvsp
[(3) - (3)].sr
));
5391 mem_sys_free((yyvsp
[(1) - (3)].s
));
5397 /* Line 1455 of yacc.c */
5398 #line 2266 "compilers/imcc/imcc.y"
5399 { (yyval
.sr
) = (yyvsp
[(1) - (2)].sr
); (yyval
.sr
)->type
|= (yyvsp
[(2) - (2)].t
); }
5404 /* Line 1455 of yacc.c */
5405 #line 2270 "compilers/imcc/imcc.y"
5411 /* Line 1455 of yacc.c */
5412 #line 2271 "compilers/imcc/imcc.y"
5413 { (yyval
.t
) = (yyvsp
[(1) - (2)].t
) | (yyvsp
[(2) - (2)].t
); }
5418 /* Line 1455 of yacc.c */
5419 #line 2275 "compilers/imcc/imcc.y"
5420 { (yyval
.t
) = VT_FLAT
; }
5425 /* Line 1455 of yacc.c */
5426 #line 2276 "compilers/imcc/imcc.y"
5427 { (yyval
.t
) = VT_NAMED
; }
5432 /* Line 1455 of yacc.c */
5433 #line 2277 "compilers/imcc/imcc.y"
5434 { (yyval
.t
) = VT_CALL_SIG
; }
5439 /* Line 1455 of yacc.c */
5440 #line 2280 "compilers/imcc/imcc.y"
5441 { adv_named_set_u(interp
, (yyvsp
[(3) - (4)].s
)); (yyval
.t
) = 0; }
5446 /* Line 1455 of yacc.c */
5447 #line 2281 "compilers/imcc/imcc.y"
5448 { adv_named_set(interp
, (yyvsp
[(3) - (4)].s
)); (yyval
.t
) = 0; }
5453 /* Line 1455 of yacc.c */
5454 #line 2285 "compilers/imcc/imcc.y"
5455 { (yyval
.sr
) = (yyvsp
[(1) - (2)].sr
); (yyval
.sr
)->type
|= (yyvsp
[(2) - (2)].t
); }
5460 /* Line 1455 of yacc.c */
5461 #line 2290 "compilers/imcc/imcc.y"
5464 if (IMCC_INFO(interp
)->adv_named_id
) {
5465 add_pcc_named_result(interp
, IMCC_INFO(interp
)->cur_call
, IMCC_INFO(interp
)->adv_named_id
, (yyvsp
[(3) - (3)].sr
));
5466 IMCC_INFO(interp
)->adv_named_id
= NULL
;
5469 add_pcc_result(interp
, IMCC_INFO(interp
)->cur_call
, (yyvsp
[(3) - (3)].sr
));
5475 /* Line 1455 of yacc.c */
5476 #line 2300 "compilers/imcc/imcc.y"
5478 add_pcc_named_result(interp
, IMCC_INFO(interp
)->cur_call
,
5479 mk_const(interp
, (yyvsp
[(3) - (5)].s
), 'S'), (yyvsp
[(5) - (5)].sr
));
5480 mem_sys_free((yyvsp
[(3) - (5)].s
));
5486 /* Line 1455 of yacc.c */
5487 #line 2306 "compilers/imcc/imcc.y"
5490 if (IMCC_INFO(interp
)->adv_named_id
) {
5491 add_pcc_named_result(interp
, IMCC_INFO(interp
)->cur_call
, IMCC_INFO(interp
)->adv_named_id
, (yyvsp
[(1) - (1)].sr
));
5492 IMCC_INFO(interp
)->adv_named_id
= NULL
;
5495 add_pcc_result(interp
, IMCC_INFO(interp
)->cur_call
, (yyvsp
[(1) - (1)].sr
));
5501 /* Line 1455 of yacc.c */
5502 #line 2316 "compilers/imcc/imcc.y"
5504 add_pcc_named_result(interp
, IMCC_INFO(interp
)->cur_call
, mk_const(interp
, (yyvsp
[(1) - (3)].s
), 'S'), (yyvsp
[(3) - (3)].sr
));
5505 mem_sys_free((yyvsp
[(1) - (3)].s
));
5511 /* Line 1455 of yacc.c */
5512 #line 2320 "compilers/imcc/imcc.y"
5518 /* Line 1455 of yacc.c */
5519 #line 2324 "compilers/imcc/imcc.y"
5520 { (yyval
.i
) = (yyvsp
[(1) - (1)].i
); }
5525 /* Line 1455 of yacc.c */
5526 #line 2325 "compilers/imcc/imcc.y"
5527 { (yyval
.i
) = (yyvsp
[(1) - (1)].i
); }
5532 /* Line 1455 of yacc.c */
5533 #line 2330 "compilers/imcc/imcc.y"
5535 (yyval
.i
) =MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, inv_op((yyvsp
[(3) - (6)].s
)), 3, (yyvsp
[(2) - (6)].sr
), (yyvsp
[(4) - (6)].sr
), (yyvsp
[(6) - (6)].sr
));
5541 /* Line 1455 of yacc.c */
5542 #line 2334 "compilers/imcc/imcc.y"
5544 (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, "unless_null", 2, (yyvsp
[(3) - (5)].sr
), (yyvsp
[(5) - (5)].sr
));
5550 /* Line 1455 of yacc.c */
5551 #line 2338 "compilers/imcc/imcc.y"
5553 (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, "unless", 2, (yyvsp
[(2) - (4)].sr
), (yyvsp
[(4) - (4)].sr
));
5559 /* Line 1455 of yacc.c */
5560 #line 2345 "compilers/imcc/imcc.y"
5562 (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, "if", 2, (yyvsp
[(2) - (4)].sr
), (yyvsp
[(4) - (4)].sr
));
5568 /* Line 1455 of yacc.c */
5569 #line 2349 "compilers/imcc/imcc.y"
5571 (yyval
.i
) =MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, (yyvsp
[(3) - (6)].s
), 3, (yyvsp
[(2) - (6)].sr
), (yyvsp
[(4) - (6)].sr
), (yyvsp
[(6) - (6)].sr
));
5577 /* Line 1455 of yacc.c */
5578 #line 2353 "compilers/imcc/imcc.y"
5580 (yyval
.i
) = MK_I(interp
, IMCC_INFO(interp
)->cur_unit
, "if_null", 2, (yyvsp
[(3) - (5)].sr
), (yyvsp
[(5) - (5)].sr
));
5586 /* Line 1455 of yacc.c */
5587 #line 2359 "compilers/imcc/imcc.y"
5593 /* Line 1455 of yacc.c */
5594 #line 2360 "compilers/imcc/imcc.y"
5600 /* Line 1455 of yacc.c */
5601 #line 2364 "compilers/imcc/imcc.y"
5602 { (yyval
.s
) = (char *)"eq"; }
5607 /* Line 1455 of yacc.c */
5608 #line 2365 "compilers/imcc/imcc.y"
5609 { (yyval
.s
) = (char *)"ne"; }
5614 /* Line 1455 of yacc.c */
5615 #line 2366 "compilers/imcc/imcc.y"
5616 { (yyval
.s
) = (char *)"gt"; }
5621 /* Line 1455 of yacc.c */
5622 #line 2367 "compilers/imcc/imcc.y"
5623 { (yyval
.s
) = (char *)"ge"; }
5628 /* Line 1455 of yacc.c */
5629 #line 2368 "compilers/imcc/imcc.y"
5630 { (yyval
.s
) = (char *)"lt"; }
5635 /* Line 1455 of yacc.c */
5636 #line 2369 "compilers/imcc/imcc.y"
5637 { (yyval
.s
) = (char *)"le"; }
5642 /* Line 1455 of yacc.c */
5643 #line 2378 "compilers/imcc/imcc.y"
5644 { (yyval
.sr
) = NULL
; }
5649 /* Line 1455 of yacc.c */
5650 #line 2379 "compilers/imcc/imcc.y"
5651 { (yyval
.sr
) = (yyvsp
[(1) - (1)].sr
); }
5656 /* Line 1455 of yacc.c */
5657 #line 2383 "compilers/imcc/imcc.y"
5658 { (yyval
.sr
) = IMCC_INFO(interp
)->regs
[0]; }
5663 /* Line 1455 of yacc.c */
5664 #line 2388 "compilers/imcc/imcc.y"
5665 { IMCC_INFO(interp
)->regs
[IMCC_INFO(interp
)->nargs
++] = (yyvsp
[(1) - (1)].sr
); }
5670 /* Line 1455 of yacc.c */
5671 #line 2390 "compilers/imcc/imcc.y"
5673 IMCC_INFO(interp
) -> regs
[IMCC_INFO(interp
)->nargs
++] = (yyvsp
[(1) - (4)].sr
);
5674 IMCC_INFO(interp
) -> keyvec
|= KEY_BIT(IMCC_INFO(interp
)->nargs
);
5675 IMCC_INFO(interp
) -> regs
[IMCC_INFO(interp
)->nargs
++] = (yyvsp
[(3) - (4)].sr
);
5676 (yyval
.sr
) = (yyvsp
[(1) - (4)].sr
);
5682 /* Line 1455 of yacc.c */
5683 #line 2397 "compilers/imcc/imcc.y"
5685 IMCC_INFO(interp
) -> regs
[IMCC_INFO(interp
)->nargs
++] = (yyvsp
[(2) - (3)].sr
);
5686 (yyval
.sr
) = (yyvsp
[(2) - (3)].sr
);
5692 /* Line 1455 of yacc.c */
5693 #line 2404 "compilers/imcc/imcc.y"
5694 { (yyval
.sr
) = mk_sub_address_fromc(interp
, (yyvsp
[(1) - (1)].s
)); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5699 /* Line 1455 of yacc.c */
5700 #line 2405 "compilers/imcc/imcc.y"
5701 { (yyval
.sr
) = mk_sub_address_u(interp
, (yyvsp
[(1) - (1)].s
)); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5706 /* Line 1455 of yacc.c */
5707 #line 2409 "compilers/imcc/imcc.y"
5708 { (yyval
.sr
) = mk_sub_address(interp
, (yyvsp
[(1) - (1)].s
)); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5713 /* Line 1455 of yacc.c */
5714 #line 2410 "compilers/imcc/imcc.y"
5715 { (yyval
.sr
) = mk_sub_address(interp
, (yyvsp
[(1) - (1)].s
)); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5720 /* Line 1455 of yacc.c */
5721 #line 2414 "compilers/imcc/imcc.y"
5722 { (yyval
.sr
) = mk_label_address(interp
, (yyvsp
[(1) - (1)].s
)); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5727 /* Line 1455 of yacc.c */
5728 #line 2415 "compilers/imcc/imcc.y"
5729 { (yyval
.sr
) = mk_label_address(interp
, (yyvsp
[(1) - (1)].s
)); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5734 /* Line 1455 of yacc.c */
5735 #line 2429 "compilers/imcc/imcc.y"
5737 IMCC_INFO(interp
)->nkeys
= 0;
5743 /* Line 1455 of yacc.c */
5744 #line 2433 "compilers/imcc/imcc.y"
5746 (yyval
.sr
) = link_keys(interp
,
5747 IMCC_INFO(interp
)->nkeys
,
5748 IMCC_INFO(interp
)->keys
, 0);
5754 /* Line 1455 of yacc.c */
5755 #line 2441 "compilers/imcc/imcc.y"
5757 IMCC_INFO(interp
)->nkeys
= 0;
5763 /* Line 1455 of yacc.c */
5764 #line 2445 "compilers/imcc/imcc.y"
5766 (yyval
.sr
) = link_keys(interp
,
5767 IMCC_INFO(interp
)->nkeys
,
5768 IMCC_INFO(interp
)->keys
, 1);
5774 /* Line 1455 of yacc.c */
5775 #line 2453 "compilers/imcc/imcc.y"
5776 { IMCC_INFO(interp
)->keys
[IMCC_INFO(interp
)->nkeys
++] = (yyvsp
[(1) - (1)].sr
); }
5781 /* Line 1455 of yacc.c */
5782 #line 2455 "compilers/imcc/imcc.y"
5784 IMCC_INFO(interp
)->keys
[IMCC_INFO(interp
)->nkeys
++] = (yyvsp
[(3) - (3)].sr
);
5785 (yyval
.sr
) = IMCC_INFO(interp
)->keys
[0];
5791 /* Line 1455 of yacc.c */
5792 #line 2463 "compilers/imcc/imcc.y"
5794 (yyval
.sr
) = (yyvsp
[(1) - (1)].sr
);
5800 /* Line 1455 of yacc.c */
5801 #line 2469 "compilers/imcc/imcc.y"
5802 { (yyval
.sr
) = mk_symreg(interp
, (yyvsp
[(1) - (1)].s
), 'I'); }
5807 /* Line 1455 of yacc.c */
5808 #line 2470 "compilers/imcc/imcc.y"
5809 { (yyval
.sr
) = mk_symreg(interp
, (yyvsp
[(1) - (1)].s
), 'N'); }
5814 /* Line 1455 of yacc.c */
5815 #line 2471 "compilers/imcc/imcc.y"
5816 { (yyval
.sr
) = mk_symreg(interp
, (yyvsp
[(1) - (1)].s
), 'S'); }
5821 /* Line 1455 of yacc.c */
5822 #line 2472 "compilers/imcc/imcc.y"
5823 { (yyval
.sr
) = mk_symreg(interp
, (yyvsp
[(1) - (1)].s
), 'P'); }
5828 /* Line 1455 of yacc.c */
5829 #line 2473 "compilers/imcc/imcc.y"
5830 { (yyval
.sr
) = mk_pasm_reg(interp
, (yyvsp
[(1) - (1)].s
)); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5835 /* Line 1455 of yacc.c */
5836 #line 2477 "compilers/imcc/imcc.y"
5837 { (yyval
.sr
) = mk_const(interp
, (yyvsp
[(1) - (1)].s
), 'I'); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5842 /* Line 1455 of yacc.c */
5843 #line 2478 "compilers/imcc/imcc.y"
5844 { (yyval
.sr
) = mk_const(interp
, (yyvsp
[(1) - (1)].s
), 'N'); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5849 /* Line 1455 of yacc.c */
5850 #line 2479 "compilers/imcc/imcc.y"
5851 { (yyval
.sr
) = mk_const(interp
, (yyvsp
[(1) - (1)].s
), 'S'); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5856 /* Line 1455 of yacc.c */
5857 #line 2480 "compilers/imcc/imcc.y"
5858 { (yyval
.sr
) = mk_const(interp
, (yyvsp
[(1) - (1)].s
), 'U'); mem_sys_free((yyvsp
[(1) - (1)].s
)); }
5863 /* Line 1455 of yacc.c */
5864 #line 5854 "compilers/imcc/imcparser.c"
5867 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
5871 YY_STACK_PRINT (yyss
, yyssp
);
5875 /* Now `shift' the result of the reduction. Determine what state
5876 that goes to, based on the state we popped back to and the rule
5877 number reduced by. */
5881 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
5882 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
5883 yystate
= yytable
[yystate
];
5885 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
5890 /*------------------------------------.
5891 | yyerrlab -- here on detecting error |
5892 `------------------------------------*/
5894 /* If not already recovering from an error, report this error. */
5898 #if ! YYERROR_VERBOSE
5899 yyerror (yyscanner
, interp
, YY_("syntax error"));
5902 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
5903 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
5905 YYSIZE_T yyalloc
= 2 * yysize
;
5906 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
5907 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
5908 if (yymsg
!= yymsgbuf
)
5909 YYSTACK_FREE (yymsg
);
5910 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
5912 yymsg_alloc
= yyalloc
;
5916 yymsg_alloc
= sizeof yymsgbuf
;
5920 if (0 < yysize
&& yysize
<= yymsg_alloc
)
5922 (void) yysyntax_error (yymsg
, yystate
, yychar
);
5923 yyerror (yyscanner
, interp
, yymsg
);
5927 yyerror (yyscanner
, interp
, YY_("syntax error"));
5929 goto yyexhaustedlab
;
5937 if (yyerrstatus
== 3)
5939 /* If just tried and failed to reuse lookahead token after an
5940 error, discard it. */
5942 if (yychar
<= YYEOF
)
5944 /* Return failure if at end of input. */
5945 if (yychar
== YYEOF
)
5950 yydestruct ("Error: discarding",
5951 yytoken
, &yylval
, yyscanner
, interp
);
5956 /* Else will try to reuse lookahead token after shifting the error
5961 /*---------------------------------------------------.
5962 | yyerrorlab -- error raised explicitly by YYERROR. |
5963 `---------------------------------------------------*/
5966 /* Pacify compilers like GCC when the user code never invokes
5967 YYERROR and the label yyerrorlab therefore never appears in user
5969 if (/*CONSTCOND*/ 0)
5972 /* Do not reclaim the symbols of the rule which action triggered
5976 YY_STACK_PRINT (yyss
, yyssp
);
5981 /*-------------------------------------------------------------.
5982 | yyerrlab1 -- common code for both syntax error and YYERROR. |
5983 `-------------------------------------------------------------*/
5985 yyerrstatus
= 3; /* Each real token shifted decrements this. */
5989 yyn
= yypact
[yystate
];
5990 if (yyn
!= YYPACT_NINF
)
5993 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
6001 /* Pop the current state because it cannot handle the error token. */
6006 yydestruct ("Error: popping",
6007 yystos
[yystate
], yyvsp
, yyscanner
, interp
);
6010 YY_STACK_PRINT (yyss
, yyssp
);
6016 /* Shift the error token. */
6017 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
6023 /*-------------------------------------.
6024 | yyacceptlab -- YYACCEPT comes here. |
6025 `-------------------------------------*/
6030 /*-----------------------------------.
6031 | yyabortlab -- YYABORT comes here. |
6032 `-----------------------------------*/
6037 #if !defined(yyoverflow) || YYERROR_VERBOSE
6038 /*-------------------------------------------------.
6039 | yyexhaustedlab -- memory exhaustion comes here. |
6040 `-------------------------------------------------*/
6042 yyerror (yyscanner
, interp
, YY_("memory exhausted"));
6048 if (yychar
!= YYEMPTY
)
6049 yydestruct ("Cleanup: discarding lookahead",
6050 yytoken
, &yylval
, yyscanner
, interp
);
6051 /* Do not reclaim the symbols of the rule which action triggered
6052 this YYABORT or YYACCEPT. */
6054 YY_STACK_PRINT (yyss
, yyssp
);
6055 while (yyssp
!= yyss
)
6057 yydestruct ("Cleanup: popping",
6058 yystos
[*yyssp
], yyvsp
, yyscanner
, interp
);
6063 YYSTACK_FREE (yyss
);
6066 if (yymsg
!= yymsgbuf
)
6067 YYSTACK_FREE (yymsg
);
6069 /* Make sure YYID is used. */
6070 return YYID (yyresult
);
6075 /* Line 1675 of yacc.c */
6076 #line 2486 "compilers/imcc/imcc.y"
6079 /* I need this prototype somewhere... */
6080 char *yyget_text(yyscan_t yyscanner
);
6082 /* I do not like this function, but, atm, it is the only way I can
6083 * make the code in yyerror work without segfault on some specific
6086 /* int yyholds_char(yyscan_t yyscanner); */
6088 int yyerror(void *yyscanner
, PARROT_INTERP
, const char *s
)
6090 /* If the error occurr in the end of the buffer (I mean, the last
6091 * token was already read), yyget_text will return a pointer
6092 * outside the bison buffer, and thus, not "accessible" by
6093 * us. This means it may segfault. */
6094 const char * const chr
= yyget_text((yyscan_t
)yyscanner
);
6096 /* IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, s); */
6097 /* --- This was called before, not sure if I should call some
6098 similar function that does not die like this one. */
6100 /* Basically, if current token is a newline, it mean the error was
6101 * before the newline, and thus, line is the line *after* the
6102 * error. Instead of duplicating code for both cases (the 'newline' and
6103 * non-newline case, do the test twice; efficiency is not important when
6104 * we have an error anyway. */
6105 if (!at_eof(yyscanner
)) {
6106 IMCC_warning(interp
, "error:imcc:%s", s
);
6108 /* don't print the current token if it is a newline */
6110 IMCC_warning(interp
, " ('%s')", chr
);
6112 IMCC_print_inc(interp
);
6115 /* scanner is at EOF; just to be sure, don't print "current" token */
6117 IMCC_warning(interp
, "error:imcc:%s", s
);
6118 IMCC_print_inc(interp
);
6131 * c-file-style: "parrot"
6133 * vim: expandtab shiftwidth=4: