[svn:parrot] r46524 - in branches/codestring: . compilers/imcc config/auto/zlib config/gen/makefiles include/parrot lib/Parrot/OpTrans lib/Parrot/Pmc2c lib/Parrot/Pmc2c/PMC ports/fedora/2.3.0 ports/suse/2.2.0 runtime/parrot/include runtime/parrot/library/Test src/dynoplibs src/dynpmc src/interp src/pmc src/runcore src/string src/string/charset t/compilers/imcc/syn t/library t/oo t/src tools/dev tools/docs
coke at svn.parrot.org
coke at svn.parrot.org
Tue May 11 23:17:50 UTC 2010
Author: coke
Date: Tue May 11 23:17:48 2010
New Revision: 46524
URL: https://trac.parrot.org/parrot/changeset/46524
Log:
merge latest from trunk
Added:
branches/codestring/t/library/test_builder_done_testing.t
- copied unchanged from r46523, trunk/t/library/test_builder_done_testing.t
Modified:
branches/codestring/ (props changed)
branches/codestring/DEPRECATED.pod
branches/codestring/MANIFEST
branches/codestring/NEWS
branches/codestring/compilers/imcc/debug.c
branches/codestring/compilers/imcc/debug.h
branches/codestring/compilers/imcc/imc.c
branches/codestring/compilers/imcc/imc.h
branches/codestring/compilers/imcc/imcc.l
branches/codestring/compilers/imcc/imcc.y
branches/codestring/compilers/imcc/imclexer.c
branches/codestring/compilers/imcc/imcparser.c
branches/codestring/compilers/imcc/imcparser.h
branches/codestring/compilers/imcc/instructions.c
branches/codestring/compilers/imcc/main.c
branches/codestring/compilers/imcc/parser.h
branches/codestring/compilers/imcc/parser_util.c
branches/codestring/compilers/imcc/pbc.c
branches/codestring/compilers/imcc/reg_alloc.c
branches/codestring/compilers/imcc/sets.c
branches/codestring/compilers/imcc/symreg.c
branches/codestring/compilers/imcc/symreg.h
branches/codestring/config/auto/zlib/ (props changed)
branches/codestring/config/gen/makefiles/root.in
branches/codestring/include/parrot/runcore_trace.h (props changed)
branches/codestring/include/parrot/string_funcs.h
branches/codestring/lib/Parrot/OpTrans/C.pm
branches/codestring/lib/Parrot/Pmc2c/Method.pm
branches/codestring/lib/Parrot/Pmc2c/PMC/Object.pm
branches/codestring/lib/Parrot/Pmc2c/PMCEmitter.pm
branches/codestring/ports/fedora/2.3.0/ (props changed)
branches/codestring/ports/suse/2.2.0/ (props changed)
branches/codestring/runtime/parrot/include/test_more.pir
branches/codestring/runtime/parrot/library/Test/Builder.pir
branches/codestring/runtime/parrot/library/Test/More.pir
branches/codestring/src/dynoplibs/Rules.in
branches/codestring/src/dynpmc/Rules.in
branches/codestring/src/interp/inter_create.c (props changed)
branches/codestring/src/pmc/object.pmc
branches/codestring/src/pmc/string.pmc
branches/codestring/src/runcore/cores.c (props changed)
branches/codestring/src/runcore/trace.c (props changed)
branches/codestring/src/string/api.c
branches/codestring/src/string/charset/ascii.c
branches/codestring/src/string/charset/iso-8859-1.c
branches/codestring/src/string/charset/unicode.c
branches/codestring/t/compilers/imcc/syn/objects.t
branches/codestring/t/oo/vtableoverride.t
branches/codestring/t/src/embed.t (props changed)
branches/codestring/tools/dev/checkdepend.pl
branches/codestring/tools/dev/mk_gitignore.pl (props changed)
branches/codestring/tools/dev/mk_language_shell.pl
branches/codestring/tools/docs/filename_and_chapter.pl
Modified: branches/codestring/DEPRECATED.pod
==============================================================================
--- branches/codestring/DEPRECATED.pod Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/DEPRECATED.pod Tue May 11 23:17:48 2010 (r46524)
@@ -124,6 +124,12 @@
L<http://trac.parrot.org/parrot/ticket/1606>
+=item Method unescape on String [experimental]
+
+This is a helper method for testing of Parrot_str_unescape_string.
+
+L<https://trac.parrot.org/parrot/ticket/1628>
+
=back
=head1 Opcodes
@@ -330,6 +336,13 @@
L<https://trac.parrot.org/parrot/ticket/1588>
+=item Parrot_str_unescape_string [experimental]
+
+This function is an experimental addition to enhance and maybe replace
+Parrot_str_unescape
+
+L<https://trac.parrot.org/parrot/ticket/1628>
+
=back
=head1 Compiler tools
Modified: branches/codestring/MANIFEST
==============================================================================
--- branches/codestring/MANIFEST Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/MANIFEST Tue May 11 23:17:48 2010 (r46524)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Thu May 6 12:11:46 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Mon May 10 19:33:08 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -1669,6 +1669,7 @@
t/library/tap_parser.t [test]
t/library/tcl_glob.t [test]
t/library/tcl_lib.t [test]
+t/library/test_builder_done_testing.t [test]
t/library/test_builder_tester.t [test]
t/library/test_class.t [test]
t/library/test_more.t [test]
Modified: branches/codestring/NEWS
==============================================================================
--- branches/codestring/NEWS Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/NEWS Tue May 11 23:17:48 2010 (r46524)
@@ -1,8 +1,16 @@
# $Id$
New in 2.4.0
+- Core
+ + Various long-standing bugs in IMCC were fixed
+ + STRINGs are now immutable.
- Deprecations
+ Tools to distribute on CPAN were removed
+- Tests
+ + Many tests for the extend/embed interface were added
+ + done_testing() is now implemented in Test::More
+- Miscellaneous
+ + Six Parrot-related projects accepted to GSoC
New in 2.3.0
- Core
Modified: branches/codestring/compilers/imcc/debug.c
==============================================================================
--- branches/codestring/compilers/imcc/debug.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/debug.c Tue May 11 23:17:48 2010 (r46524)
@@ -105,35 +105,6 @@
/*
-=item C<void IMCC_fataly_standalone(PARROT_INTERP, int code, const char *fmt,
-...)>
-
-Prints an error message and exits Parrot. This is not a recoverable
-error.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_DOES_NOT_RETURN
-void
-IMCC_fataly_standalone(PARROT_INTERP, int code, ARGIN(const char *fmt), ...)
-{
- ASSERT_ARGS(IMCC_fataly_standalone)
-
- va_list ap;
-
- va_start(ap, fmt);
- fprintf(stderr, "error:imcc:");
- imcc_vfprintf(interp, Parrot_io_STDERR(interp), fmt, ap);
- va_end(ap);
- IMCC_print_inc(interp);
- Parrot_exit(interp, code);
-}
-
-/*
-
=item C<void IMCC_warning(PARROT_INTERP, const char *fmt, ...)>
Prints a warning message, but does not throw an exception and does not
Modified: branches/codestring/compilers/imcc/debug.h
==============================================================================
--- branches/codestring/compilers/imcc/debug.h Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/debug.h Tue May 11 23:17:48 2010 (r46524)
@@ -60,15 +60,6 @@
__attribute__nonnull__(3);
PARROT_EXPORT
-PARROT_DOES_NOT_RETURN
-void IMCC_fataly_standalone(PARROT_INTERP,
- int code,
- ARGIN(const char *fmt),
- ...)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-PARROT_EXPORT
void IMCC_info(PARROT_INTERP, int level, ARGIN(const char *fmt), ...)
__attribute__nonnull__(1)
__attribute__nonnull__(3);
@@ -112,9 +103,6 @@
#define ASSERT_ARGS_IMCC_fataly __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(fmt))
-#define ASSERT_ARGS_IMCC_fataly_standalone __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(fmt))
#define ASSERT_ARGS_IMCC_info __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(fmt))
Modified: branches/codestring/compilers/imcc/imc.c
==============================================================================
--- branches/codestring/compilers/imcc/imc.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/imc.c Tue May 11 23:17:48 2010 (r46524)
@@ -257,10 +257,6 @@
ASSERT_ARGS(imc_free_unit)
imc_info_t * const imc = IMCC_INFO(interp);
-#if IMC_TRACE_HIGH
- fprintf(stderr, "imc_free_unit()\n");
-#endif
-
free_reglist(unit);
/* and cfg ... */
Modified: branches/codestring/compilers/imcc/imc.h
==============================================================================
--- branches/codestring/compilers/imcc/imc.h Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/imc.h Tue May 11 23:17:48 2010 (r46524)
@@ -56,8 +56,11 @@
#define IMCC_THROW(a, x) longjmp((a), (x))
-#define IMCC_FATAL_EXCEPTION 1
-#define IMCC_FATALY_EXCEPTION 2
+enum {
+ IMCC_FATAL_EXCEPTION = 1,
+ IMCC_FATALY_EXCEPTION = 2,
+ IMCC_PARSEFAIL_EXCEPTION = 3,
+};
#define N_ELEMENTS(x) (sizeof (x)/sizeof ((x)[0]))
@@ -621,9 +624,6 @@
#define IMCC_INFO(i) (((Parrot_Interp)(i))->imc_info)
-#define IMC_TRACE 0
-#define IMC_TRACE_HIGH 0
-
/* main.c */
#define PBC_LOAD (1 << 0)
#define PBC_RUN (1 << 1)
Modified: branches/codestring/compilers/imcc/imcc.l
==============================================================================
--- branches/codestring/compilers/imcc/imcc.l Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/imcc.l Tue May 11 23:17:48 2010 (r46524)
@@ -41,7 +41,7 @@
#include "imc.h"
#include "parser.h"
-typedef struct yyguts_t yyguts_t;
+// typedef struct yyguts_t yyguts_t;
typedef struct parser_state_t parser_state_t;
/* parser state structure
@@ -1332,20 +1332,7 @@
emit_open(interp, 1, NULL);
- IMCC_TRY(IMCC_INFO(interp)->jump_buf, IMCC_INFO(interp)->error_code) {
- yyparse(yyscanner, interp);
- imc_compile_all_units(interp);
- }
-
- IMCC_CATCH(IMCC_FATAL_EXCEPTION) {
- IMCC_INFO(interp)->error_code = IMCC_FATAL_EXCEPTION;
- }
-
- IMCC_CATCH(IMCC_FATALY_EXCEPTION) {
- IMCC_INFO(interp)->error_code = IMCC_FATALY_EXCEPTION;
- }
-
- IMCC_END_TRY;
+ imcc_run_compilation(interp, yyscanner);
if (buffer)
yy_switch_to_buffer(buffer, yyscanner);
@@ -1361,10 +1348,24 @@
buffer = YY_CURRENT_BUFFER;
yy_scan_string(s, yyscanner);
+
emit_open(interp, 1, NULL);
+ imcc_run_compilation(interp, yyscanner);
+
+ if (buffer)
+ yy_switch_to_buffer(buffer, yyscanner);
+}
+
+void
+imcc_run_compilation(PARROT_INTERP, void *yyscanner) {
IMCC_TRY(IMCC_INFO(interp)->jump_buf, IMCC_INFO(interp)->error_code) {
- yyparse(yyscanner, interp);
+ if (yyparse(yyscanner, interp)) {
+ IMCC_INFO(interp)->error_code = IMCC_PARSEFAIL_EXCEPTION;
+ IMCC_INFO(interp)->error_message = string_from_literal(interp, "syntax error ... somewhere");
+ return;
+ }
+
imc_compile_all_units(interp);
}
@@ -1377,9 +1378,6 @@
}
IMCC_END_TRY;
-
- if (buffer)
- yy_switch_to_buffer(buffer, yyscanner);
}
void
Modified: branches/codestring/compilers/imcc/imcc.y
==============================================================================
--- branches/codestring/compilers/imcc/imcc.y Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/imcc.y Tue May 11 23:17:48 2010 (r46524)
@@ -1124,8 +1124,8 @@
%type <i> func_assign get_results
%type <i> opt_invocant
%type <i> annotate_directive
-%type <sr> target targetlist reg const var result pcc_set_yield
-%type <sr> keylist keylist_force _keylist key maybe_ns
+%type <sr> target targetlist reg const stringc var result pcc_set_yield
+%type <sr> keylist keylist_force _keylist key maybe_ns nslist _nslist
%type <sr> vars _vars var_or_i _var_or_i label_op sub_label_op sub_label_op_c
%type <i> pasmcode pasmline pasm_inst
%type <sr> pasm_args
@@ -1362,11 +1362,29 @@
;
maybe_ns:
- '[' keylist ']'
- {
- $$ = $2;
- }
- | '[' ']' { $$ = NULL; }
+ '[' nslist ']' { $$ = $2; }
+ | '[' ']' { $$ = NULL; }
+ ;
+
+nslist:
+ {
+ IMCC_INFO(interp)->nkeys = 0;
+ }
+ _nslist
+ {
+ $$ = link_keys(interp,
+ IMCC_INFO(interp)->nkeys,
+ IMCC_INFO(interp)->keys, 0);
+ }
+ ;
+
+_nslist:
+ stringc { IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = $1; }
+ | _nslist ';' stringc
+ {
+ IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = $3;
+ $$ = IMCC_INFO(interp)->keys[0];
+ }
;
sub:
@@ -2445,11 +2463,15 @@
| REG { $$ = mk_pasm_reg(interp, $1); mem_sys_free($1); }
;
+stringc:
+ STRINGC { $$ = mk_const(interp, $1, 'S'); mem_sys_free($1); }
+ | USTRINGC { $$ = mk_const(interp, $1, 'U'); mem_sys_free($1); }
+ ;
+
const:
INTC { $$ = mk_const(interp, $1, 'I'); mem_sys_free($1); }
| FLOATC { $$ = mk_const(interp, $1, 'N'); mem_sys_free($1); }
- | STRINGC { $$ = mk_const(interp, $1, 'S'); mem_sys_free($1); }
- | USTRINGC { $$ = mk_const(interp, $1, 'U'); mem_sys_free($1); }
+ | stringc { $$ = $1; }
;
Modified: branches/codestring/compilers/imcc/imclexer.c
==============================================================================
--- branches/codestring/compilers/imcc/imclexer.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/imclexer.c Tue May 11 23:17:48 2010 (r46524)
@@ -2466,7 +2466,7 @@
#include "imc.h"
#include "parser.h"
-typedef struct yyguts_t yyguts_t;
+// typedef struct yyguts_t yyguts_t;
typedef struct parser_state_t parser_state_t;
/* parser state structure
@@ -5820,20 +5820,7 @@
emit_open(interp, 1, NULL);
- IMCC_TRY(IMCC_INFO(interp)->jump_buf, IMCC_INFO(interp)->error_code) {
- yyparse(yyscanner, interp);
- imc_compile_all_units(interp);
- }
-
- IMCC_CATCH(IMCC_FATAL_EXCEPTION) {
- IMCC_INFO(interp)->error_code = IMCC_FATAL_EXCEPTION;
- }
-
- IMCC_CATCH(IMCC_FATALY_EXCEPTION) {
- IMCC_INFO(interp)->error_code = IMCC_FATALY_EXCEPTION;
- }
-
- IMCC_END_TRY;
+ imcc_run_compilation(interp, yyscanner);
if (buffer)
yy_switch_to_buffer(buffer,yyscanner);
@@ -5849,10 +5836,24 @@
buffer = YY_CURRENT_BUFFER;
yy_scan_string(s,yyscanner);
+
emit_open(interp, 1, NULL);
+ imcc_run_compilation(interp, yyscanner);
+
+ if (buffer)
+ yy_switch_to_buffer(buffer,yyscanner);
+}
+
+void
+imcc_run_compilation(PARROT_INTERP, void *yyscanner) {
IMCC_TRY(IMCC_INFO(interp)->jump_buf, IMCC_INFO(interp)->error_code) {
- yyparse(yyscanner, interp);
+ if (yyparse(yyscanner, interp)) {
+ IMCC_INFO(interp)->error_code = IMCC_PARSEFAIL_EXCEPTION;
+ IMCC_INFO(interp)->error_message = string_from_literal(interp, "syntax error ... somewhere");
+ return;
+ }
+
imc_compile_all_units(interp);
}
@@ -5865,9 +5866,6 @@
}
IMCC_END_TRY;
-
- if (buffer)
- yy_switch_to_buffer(buffer,yyscanner);
}
void
Modified: branches/codestring/compilers/imcc/imcparser.c
==============================================================================
--- branches/codestring/compilers/imcc/imcparser.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/imcparser.c Tue May 11 23:17:48 2010 (r46524)
@@ -9,13 +9,12 @@
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.2. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,7 +56,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -1148,7 +1147,7 @@
/* Line 189 of yacc.c */
-#line 1141 "compilers/imcc/imcparser.c"
+#line 1140 "compilers/imcc/imcparser.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -1432,7 +1431,7 @@
/* Line 214 of yacc.c */
-#line 1425 "compilers/imcc/imcparser.c"
+#line 1424 "compilers/imcc/imcparser.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -1444,7 +1443,7 @@
/* Line 264 of yacc.c */
-#line 1437 "compilers/imcc/imcparser.c"
+#line 1436 "compilers/imcc/imcparser.c"
#ifdef short
# undef short
@@ -1494,7 +1493,7 @@
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -1659,16 +1658,16 @@
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 31
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 642
+#define YYLAST 662
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 136
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 125
+#define YYNNTS 129
/* YYNRULES -- Number of rules. */
-#define YYNRULES 337
+#define YYNRULES 342
/* YYNRULES -- Number of states. */
-#define YYNSTATES 539
+#define YYNSTATES 545
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -1683,16 +1682,16 @@
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
4, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 126, 2, 2, 2, 132, 133, 2,
- 124, 125, 130, 129, 2, 128, 2, 131, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 135,
+ 2, 2, 2, 127, 2, 2, 2, 133, 134, 2,
+ 125, 126, 131, 130, 2, 129, 2, 132, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 124,
2, 121, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 122, 2, 123, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 134, 2, 127, 2, 2, 2,
+ 2, 2, 2, 2, 135, 2, 128, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -1730,136 +1729,138 @@
53, 60, 61, 68, 69, 76, 78, 80, 82, 85,
89, 92, 94, 96, 98, 100, 102, 103, 107, 108,
113, 116, 121, 122, 124, 125, 130, 131, 133, 137,
- 141, 144, 145, 146, 147, 158, 159, 162, 166, 167,
- 171, 175, 180, 185, 190, 192, 197, 199, 204, 206,
- 211, 216, 218, 223, 224, 228, 230, 232, 234, 236,
- 238, 240, 242, 246, 247, 249, 250, 260, 261, 264,
- 265, 269, 270, 272, 274, 277, 279, 281, 283, 285,
- 287, 289, 291, 293, 295, 297, 299, 301, 303, 305,
- 311, 315, 319, 323, 327, 333, 339, 340, 344, 347,
- 348, 352, 356, 357, 362, 363, 366, 368, 370, 372,
- 374, 379, 384, 386, 388, 389, 395, 397, 398, 404,
- 405, 408, 412, 413, 416, 420, 424, 428, 429, 435,
- 437, 439, 440, 442, 446, 450, 456, 458, 461, 462,
- 465, 468, 470, 472, 474, 476, 477, 479, 482, 484,
- 486, 490, 493, 495, 499, 502, 503, 505, 507, 509,
- 510, 515, 520, 525, 526, 533, 535, 536, 543, 546,
- 549, 552, 555, 557, 559, 561, 563, 564, 566, 568,
- 570, 572, 576, 581, 587, 594, 601, 605, 606, 616,
- 618, 620, 622, 626, 628, 630, 632, 634, 636, 638,
- 640, 642, 644, 646, 648, 650, 652, 654, 656, 658,
- 660, 662, 664, 666, 668, 670, 672, 674, 676, 678,
- 679, 685, 689, 691, 693, 695, 697, 699, 701, 703,
- 705, 707, 709, 711, 713, 715, 720, 722, 724, 726,
- 728, 732, 736, 740, 744, 745, 751, 752, 756, 758,
- 764, 768, 772, 775, 776, 779, 781, 783, 785, 790,
- 795, 798, 802, 808, 810, 814, 815, 817, 819, 826,
- 832, 837, 842, 849, 855, 857, 859, 861, 863, 865,
- 867, 869, 871, 873, 875, 876, 878, 882, 884, 886,
- 891, 895, 897, 899, 901, 903, 905, 907, 909, 911,
- 913, 915, 917, 918, 921, 922, 925, 927, 931, 933,
- 935, 937, 939, 941, 943, 945, 947, 949
+ 141, 144, 145, 148, 150, 154, 155, 156, 157, 168,
+ 169, 172, 176, 177, 181, 185, 190, 195, 200, 202,
+ 207, 209, 214, 216, 221, 226, 228, 233, 234, 238,
+ 240, 242, 244, 246, 248, 250, 252, 256, 257, 259,
+ 260, 270, 271, 274, 275, 279, 280, 282, 284, 287,
+ 289, 291, 293, 295, 297, 299, 301, 303, 305, 307,
+ 309, 311, 313, 315, 321, 325, 329, 333, 337, 343,
+ 349, 350, 354, 357, 358, 362, 366, 367, 372, 373,
+ 376, 378, 380, 382, 384, 389, 394, 396, 398, 399,
+ 405, 407, 408, 414, 415, 418, 422, 423, 426, 430,
+ 434, 438, 439, 445, 447, 449, 450, 452, 456, 460,
+ 466, 468, 471, 472, 475, 478, 480, 482, 484, 486,
+ 487, 489, 492, 494, 496, 500, 503, 505, 509, 512,
+ 513, 515, 517, 519, 520, 525, 530, 535, 536, 543,
+ 545, 546, 553, 556, 559, 562, 565, 567, 569, 571,
+ 573, 574, 576, 578, 580, 582, 586, 591, 597, 604,
+ 611, 615, 616, 626, 628, 630, 632, 636, 638, 640,
+ 642, 644, 646, 648, 650, 652, 654, 656, 658, 660,
+ 662, 664, 666, 668, 670, 672, 674, 676, 678, 680,
+ 682, 684, 686, 688, 689, 695, 699, 701, 703, 705,
+ 707, 709, 711, 713, 715, 717, 719, 721, 723, 725,
+ 730, 732, 734, 736, 738, 742, 746, 750, 754, 755,
+ 761, 762, 766, 768, 774, 778, 782, 785, 786, 789,
+ 791, 793, 795, 800, 805, 808, 812, 818, 820, 824,
+ 825, 827, 829, 836, 842, 847, 852, 859, 865, 867,
+ 869, 871, 873, 875, 877, 879, 881, 883, 885, 886,
+ 888, 892, 894, 896, 901, 905, 907, 909, 911, 913,
+ 915, 917, 919, 921, 923, 925, 927, 928, 931, 932,
+ 935, 937, 941, 943, 945, 947, 949, 951, 953, 955,
+ 957, 959, 961
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
137, 0, -1, 138, -1, 139, -1, 138, 139, -1,
- 159, -1, 144, -1, 161, -1, 156, -1, 109, 4,
+ 159, -1, 144, -1, 164, -1, 156, -1, 109, 4,
-1, 140, -1, 141, -1, 4, -1, 143, 4, -1,
95, 111, 4, -1, 8, 112, 70, 111, 4, -1,
- 9, 111, 4, -1, 32, 111, 70, 260, -1, 7,
- 111, -1, -1, 31, 145, 220, 107, 121, 260, -1,
- -1, 31, 147, 112, 251, 121, 149, -1, -1, 31,
- 148, 111, 251, 121, 149, -1, 111, -1, 114, -1,
- 151, -1, 150, 151, -1, 209, 152, 4, -1, 109,
+ 9, 111, 4, -1, 32, 111, 70, 264, -1, 7,
+ 111, -1, -1, 31, 145, 223, 107, 121, 264, -1,
+ -1, 31, 147, 112, 254, 121, 149, -1, -1, 31,
+ 148, 111, 254, 121, 149, -1, 111, -1, 114, -1,
+ 151, -1, 150, 151, -1, 212, 152, 4, -1, 109,
4, -1, 118, -1, 117, -1, 159, -1, 146, -1,
140, -1, -1, 153, 115, 155, -1, -1, 76, 154,
- 183, 100, -1, 14, 252, -1, 30, 111, 70, 108,
- -1, -1, 245, -1, -1, 101, 157, 158, 102, -1,
- -1, 150, -1, 25, 160, 4, -1, 122, 253, 123,
- -1, 122, 123, -1, -1, -1, -1, 27, 162, 248,
- 163, 183, 4, 164, 165, 178, 71, -1, -1, 165,
- 4, -1, 165, 166, 4, -1, -1, 5, 167, 168,
- -1, 220, 107, 192, -1, 93, 124, 176, 125, -1,
- 91, 124, 111, 125, -1, 91, 124, 107, 125, -1,
- 94, -1, 94, 124, 111, 125, -1, 89, -1, 89,
- 124, 149, 125, -1, 98, -1, 98, 124, 149, 125,
- -1, 96, 124, 111, 125, -1, 97, -1, 97, 124,
- 149, 125, -1, -1, 176, 70, 177, -1, 177, -1,
+ 186, 100, -1, 14, 255, -1, 30, 111, 70, 108,
+ -1, -1, 248, -1, -1, 101, 157, 158, 102, -1,
+ -1, 150, -1, 25, 160, 4, -1, 122, 161, 123,
+ -1, 122, 123, -1, -1, 162, 163, -1, 263, -1,
+ 163, 124, 263, -1, -1, -1, -1, 27, 165, 251,
+ 166, 186, 4, 167, 168, 181, 71, -1, -1, 168,
+ 4, -1, 168, 169, 4, -1, -1, 5, 170, 171,
+ -1, 223, 107, 195, -1, 93, 125, 179, 126, -1,
+ 91, 125, 111, 126, -1, 91, 125, 107, 126, -1,
+ 94, -1, 94, 125, 111, 126, -1, 89, -1, 89,
+ 125, 149, 126, -1, 98, -1, 98, 125, 149, 126,
+ -1, 96, 125, 111, 126, -1, 97, -1, 97, 125,
+ 149, 126, -1, -1, 179, 70, 180, -1, 180, -1,
50, -1, 51, -1, 53, -1, 52, -1, 107, -1,
- 111, -1, 122, 253, 123, -1, -1, 206, -1, -1,
- 73, 4, 180, 187, 182, 186, 181, 189, 74, -1,
- -1, 211, 4, -1, -1, 83, 252, 4, -1, -1,
- 184, -1, 185, -1, 184, 185, -1, 85, -1, 86,
+ 111, -1, 122, 256, 123, -1, -1, 209, -1, -1,
+ 73, 4, 183, 190, 185, 189, 184, 192, 74, -1,
+ -1, 214, 4, -1, -1, 83, 255, 4, -1, -1,
+ 187, -1, 188, -1, 187, 188, -1, 85, -1, 86,
-1, 84, -1, 87, -1, 88, -1, 90, -1, 92,
- -1, 169, -1, 170, -1, 171, -1, 172, -1, 173,
- -1, 174, -1, 175, -1, 75, 252, 70, 252, 4,
- -1, 75, 252, 4, -1, 81, 252, 4, -1, 82,
- 244, 4, -1, 82, 111, 4, -1, 82, 244, 70,
- 252, 4, -1, 82, 111, 70, 252, 4, -1, -1,
- 187, 188, 4, -1, 11, 234, -1, -1, 189, 190,
- 4, -1, 61, 244, 192, -1, -1, 29, 191, 220,
- 214, -1, -1, 192, 193, -1, 18, -1, 19, -1,
- 20, -1, 21, -1, 21, 124, 111, 125, -1, 21,
- 124, 114, 125, -1, 99, -1, 24, -1, -1, 77,
- 4, 195, 198, 78, -1, 202, -1, -1, 79, 4,
- 197, 199, 80, -1, -1, 198, 4, -1, 198, 200,
- 4, -1, -1, 199, 4, -1, 199, 201, 4, -1,
- 15, 252, 235, -1, 16, 252, 235, -1, -1, 204,
- 124, 203, 205, 125, -1, 62, -1, 64, -1, -1,
- 234, -1, 111, 22, 252, -1, 205, 70, 234, -1,
- 205, 70, 111, 22, 252, -1, 208, -1, 206, 208,
- -1, -1, 207, 212, -1, 109, 4, -1, 118, -1,
- 117, -1, 141, -1, 142, -1, -1, 210, -1, 210,
- 211, -1, 211, -1, 100, -1, 209, 216, 4, -1,
- 1, 4, -1, 214, -1, 213, 70, 214, -1, 107,
- 215, -1, -1, 99, -1, 221, -1, 239, -1, -1,
- 29, 217, 220, 213, -1, 30, 111, 70, 244, -1,
- 30, 114, 70, 244, -1, -1, 31, 218, 220, 107,
- 121, 260, -1, 146, -1, -1, 33, 219, 220, 107,
- 121, 260, -1, 63, 231, -1, 10, 250, -1, 115,
- 245, -1, 14, 252, -1, 231, -1, 179, -1, 194,
- -1, 196, -1, -1, 50, -1, 51, -1, 52, -1,
- 53, -1, 244, 121, 252, -1, 244, 121, 223, 252,
- -1, 244, 121, 252, 224, 252, -1, 244, 121, 252,
- 122, 253, 123, -1, 244, 122, 253, 123, 121, 252,
- -1, 244, 121, 231, -1, -1, 124, 222, 238, 125,
- 121, 230, 124, 233, 125, -1, 225, -1, 227, -1,
- 229, -1, 244, 121, 14, -1, 126, -1, 127, -1,
- 128, -1, 128, -1, 129, -1, 130, -1, 131, -1,
- 132, -1, 42, -1, 66, -1, 120, -1, 55, -1,
+ -1, 172, -1, 173, -1, 174, -1, 175, -1, 176,
+ -1, 177, -1, 178, -1, 75, 255, 70, 255, 4,
+ -1, 75, 255, 4, -1, 81, 255, 4, -1, 82,
+ 247, 4, -1, 82, 111, 4, -1, 82, 247, 70,
+ 255, 4, -1, 82, 111, 70, 255, 4, -1, -1,
+ 190, 191, 4, -1, 11, 237, -1, -1, 192, 193,
+ 4, -1, 61, 247, 195, -1, -1, 29, 194, 223,
+ 217, -1, -1, 195, 196, -1, 18, -1, 19, -1,
+ 20, -1, 21, -1, 21, 125, 111, 126, -1, 21,
+ 125, 114, 126, -1, 99, -1, 24, -1, -1, 77,
+ 4, 198, 201, 78, -1, 205, -1, -1, 79, 4,
+ 200, 202, 80, -1, -1, 201, 4, -1, 201, 203,
+ 4, -1, -1, 202, 4, -1, 202, 204, 4, -1,
+ 15, 255, 238, -1, 16, 255, 238, -1, -1, 207,
+ 125, 206, 208, 126, -1, 62, -1, 64, -1, -1,
+ 237, -1, 111, 22, 255, -1, 208, 70, 237, -1,
+ 208, 70, 111, 22, 255, -1, 211, -1, 209, 211,
+ -1, -1, 210, 215, -1, 109, 4, -1, 118, -1,
+ 117, -1, 141, -1, 142, -1, -1, 213, -1, 213,
+ 214, -1, 214, -1, 100, -1, 212, 219, 4, -1,
+ 1, 4, -1, 217, -1, 216, 70, 217, -1, 107,
+ 218, -1, -1, 99, -1, 224, -1, 242, -1, -1,
+ 29, 220, 223, 216, -1, 30, 111, 70, 247, -1,
+ 30, 114, 70, 247, -1, -1, 31, 221, 223, 107,
+ 121, 264, -1, 146, -1, -1, 33, 222, 223, 107,
+ 121, 264, -1, 63, 234, -1, 10, 253, -1, 115,
+ 248, -1, 14, 255, -1, 234, -1, 182, -1, 197,
+ -1, 199, -1, -1, 50, -1, 51, -1, 52, -1,
+ 53, -1, 247, 121, 255, -1, 247, 121, 226, 255,
+ -1, 247, 121, 255, 227, 255, -1, 247, 121, 255,
+ 122, 256, 123, -1, 247, 122, 256, 123, 121, 255,
+ -1, 247, 121, 234, -1, -1, 125, 225, 241, 126,
+ 121, 233, 125, 236, 126, -1, 228, -1, 230, -1,
+ 232, -1, 247, 121, 14, -1, 127, -1, 128, -1,
+ 129, -1, 129, -1, 130, -1, 131, -1, 132, -1,
+ 133, -1, 42, -1, 66, -1, 120, -1, 55, -1,
56, -1, 57, -1, 58, -1, 59, -1, 60, -1,
48, -1, 49, -1, 67, -1, 68, -1, 69, -1,
- 54, -1, 133, -1, 134, -1, 127, -1, -1, 65,
- 226, 124, 238, 125, -1, 244, 228, 252, -1, 34,
+ 54, -1, 134, -1, 135, -1, 128, -1, -1, 65,
+ 229, 125, 241, 126, -1, 247, 231, 255, -1, 34,
-1, 35, -1, 36, -1, 37, -1, 44, -1, 43,
-1, 38, -1, 39, -1, 40, -1, 41, -1, 45,
- -1, 46, -1, 47, -1, 244, 121, 115, 155, -1,
- 107, -1, 111, -1, 114, -1, 244, -1, 244, 119,
- 249, -1, 244, 119, 114, -1, 244, 119, 111, -1,
- 244, 119, 244, -1, -1, 230, 232, 124, 233, 125,
- -1, -1, 233, 70, 234, -1, 234, -1, 233, 70,
- 111, 22, 252, -1, 252, 22, 252, -1, 111, 22,
- 252, -1, 252, 235, -1, -1, 235, 236, -1, 17,
- -1, 21, -1, 24, -1, 21, 124, 114, 125, -1,
- 21, 124, 111, 125, -1, 244, 192, -1, 238, 70,
- 237, -1, 238, 70, 111, 22, 244, -1, 237, -1,
- 111, 22, 244, -1, -1, 241, -1, 240, -1, 13,
- 252, 243, 252, 10, 250, -1, 13, 14, 252, 10,
- 250, -1, 13, 252, 242, 250, -1, 12, 252, 242,
- 250, -1, 12, 252, 243, 252, 10, 250, -1, 12,
- 14, 252, 10, 250, -1, 70, -1, 10, -1, 55,
+ -1, 46, -1, 47, -1, 247, 121, 115, 155, -1,
+ 107, -1, 111, -1, 114, -1, 247, -1, 247, 119,
+ 252, -1, 247, 119, 114, -1, 247, 119, 111, -1,
+ 247, 119, 247, -1, -1, 233, 235, 125, 236, 126,
+ -1, -1, 236, 70, 237, -1, 237, -1, 236, 70,
+ 111, 22, 255, -1, 255, 22, 255, -1, 111, 22,
+ 255, -1, 255, 238, -1, -1, 238, 239, -1, 17,
+ -1, 21, -1, 24, -1, 21, 125, 114, 126, -1,
+ 21, 125, 111, 126, -1, 247, 195, -1, 241, 70,
+ 240, -1, 241, 70, 111, 22, 247, -1, 240, -1,
+ 111, 22, 247, -1, -1, 244, -1, 243, -1, 13,
+ 255, 246, 255, 10, 253, -1, 13, 14, 255, 10,
+ 253, -1, 13, 255, 245, 253, -1, 12, 255, 245,
+ 253, -1, 12, 255, 246, 255, 10, 253, -1, 12,
+ 14, 255, 10, 253, -1, 70, -1, 10, -1, 55,
-1, 56, -1, 57, -1, 58, -1, 59, -1, 60,
- -1, 116, -1, 259, -1, -1, 246, -1, 246, 70,
- 247, -1, 247, -1, 251, -1, 244, 122, 253, 123,
- -1, 122, 255, 123, -1, 249, -1, 111, -1, 114,
- -1, 107, -1, 115, -1, 107, -1, 115, -1, 250,
- -1, 252, -1, 244, -1, 260, -1, -1, 254, 257,
- -1, -1, 256, 257, -1, 258, -1, 257, 135, 258,
- -1, 252, -1, 103, -1, 104, -1, 105, -1, 106,
- -1, 108, -1, 112, -1, 113, -1, 111, -1, 114,
- -1
+ -1, 116, -1, 262, -1, -1, 249, -1, 249, 70,
+ 250, -1, 250, -1, 254, -1, 247, 122, 256, 123,
+ -1, 122, 258, 123, -1, 252, -1, 111, -1, 114,
+ -1, 107, -1, 115, -1, 107, -1, 115, -1, 253,
+ -1, 255, -1, 247, -1, 264, -1, -1, 257, 260,
+ -1, -1, 259, 260, -1, 261, -1, 260, 124, 261,
+ -1, 255, -1, 103, -1, 104, -1, 105, -1, 106,
+ -1, 108, -1, 111, -1, 114, -1, 112, -1, 113,
+ -1, 263, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@@ -1870,35 +1871,36 @@
1242, 1251, 1251, 1258, 1258, 1267, 1268, 1272, 1273, 1277,
1278, 1279, 1280, 1281, 1282, 1283, 1286, 1286, 1295, 1294,
1307, 1311, 1324, 1328, 1332, 1332, 1344, 1346, 1350, 1365,
- 1369, 1374, 1378, 1382, 1373, 1394, 1395, 1396, 1409, 1409,
- 1413, 1438, 1442, 1448, 1457, 1463, 1472, 1478, 1487, 1493,
- 1502, 1510, 1515, 1526, 1529, 1534, 1542, 1543, 1544, 1545,
- 1546, 1557, 1568, 1571, 1573, 1578, 1577, 1608, 1609, 1613,
- 1614, 1618, 1619, 1623, 1624, 1628, 1629, 1630, 1631, 1632,
- 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1645,
- 1650, 1654, 1658, 1662, 1666, 1671, 1680, 1681, 1693, 1698,
- 1699, 1707, 1708, 1708, 1720, 1721, 1725, 1726, 1727, 1728,
- 1729, 1730, 1731, 1732, 1737, 1737, 1740, 1748, 1748, 1754,
- 1755, 1760, 1768, 1769, 1774, 1782, 1786, 1791, 1790, 1803,
- 1804, 1808, 1809, 1819, 1824, 1834, 1843, 1844, 1856, 1860,
- 1862, 1863, 1864, 1865, 1866, 1870, 1871, 1875, 1876, 1880,
- 1891, 1892, 1903, 1910, 1919, 1927, 1929, 1934, 1935, 1936,
- 1936, 1949, 1966, 1979, 1979, 1986, 1987, 1987, 1993, 1999,
- 2003, 2015, 2016, 2017, 2018, 2019, 2020, 2024, 2025, 2026,
- 2027, 2031, 2033, 2035, 2037, 2039, 2042, 2049, 2048, 2057,
- 2058, 2059, 2060, 2068, 2069, 2070, 2074, 2075, 2076, 2077,
- 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087,
- 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2102,
- 2101, 2113, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125,
- 2126, 2127, 2128, 2129, 2130, 2135, 2146, 2147, 2148, 2149,
- 2155, 2169, 2175, 2181, 2187, 2186, 2195, 2196, 2206, 2216,
- 2223, 2228, 2238, 2242, 2243, 2247, 2248, 2249, 2252, 2253,
- 2257, 2261, 2271, 2277, 2287, 2292, 2296, 2297, 2301, 2305,
- 2309, 2316, 2320, 2324, 2331, 2332, 2336, 2337, 2338, 2339,
- 2340, 2341, 2345, 2346, 2350, 2351, 2355, 2356, 2360, 2361,
- 2368, 2375, 2376, 2377, 2381, 2382, 2386, 2387, 2391, 2392,
- 2396, 2397, 2401, 2401, 2413, 2413, 2425, 2426, 2434, 2441,
- 2442, 2443, 2444, 2445, 2449, 2450, 2451, 2452
+ 1366, 1370, 1370, 1382, 1383, 1392, 1396, 1400, 1391, 1412,
+ 1413, 1414, 1427, 1427, 1431, 1456, 1460, 1466, 1475, 1481,
+ 1490, 1496, 1505, 1511, 1520, 1528, 1533, 1544, 1547, 1552,
+ 1560, 1561, 1562, 1563, 1564, 1575, 1586, 1589, 1591, 1596,
+ 1595, 1626, 1627, 1631, 1632, 1636, 1637, 1641, 1642, 1646,
+ 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656,
+ 1657, 1658, 1659, 1663, 1668, 1672, 1676, 1680, 1684, 1689,
+ 1698, 1699, 1711, 1716, 1717, 1725, 1726, 1726, 1738, 1739,
+ 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1755, 1755,
+ 1758, 1766, 1766, 1772, 1773, 1778, 1786, 1787, 1792, 1800,
+ 1804, 1809, 1808, 1821, 1822, 1826, 1827, 1837, 1842, 1852,
+ 1861, 1862, 1874, 1878, 1880, 1881, 1882, 1883, 1884, 1888,
+ 1889, 1893, 1894, 1898, 1909, 1910, 1921, 1928, 1937, 1945,
+ 1947, 1952, 1953, 1954, 1954, 1967, 1984, 1997, 1997, 2004,
+ 2005, 2005, 2011, 2017, 2021, 2033, 2034, 2035, 2036, 2037,
+ 2038, 2042, 2043, 2044, 2045, 2049, 2051, 2053, 2055, 2057,
+ 2060, 2067, 2066, 2075, 2076, 2077, 2078, 2086, 2087, 2088,
+ 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101,
+ 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111,
+ 2112, 2113, 2114, 2120, 2119, 2131, 2136, 2137, 2138, 2139,
+ 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2153,
+ 2164, 2165, 2166, 2167, 2173, 2187, 2193, 2199, 2205, 2204,
+ 2213, 2214, 2224, 2234, 2241, 2246, 2256, 2260, 2261, 2265,
+ 2266, 2267, 2270, 2271, 2275, 2279, 2289, 2295, 2305, 2310,
+ 2314, 2315, 2319, 2323, 2327, 2334, 2338, 2342, 2349, 2350,
+ 2354, 2355, 2356, 2357, 2358, 2359, 2363, 2364, 2368, 2369,
+ 2373, 2374, 2378, 2379, 2386, 2393, 2394, 2395, 2399, 2400,
+ 2404, 2405, 2409, 2410, 2414, 2415, 2419, 2419, 2431, 2431,
+ 2443, 2444, 2452, 2459, 2460, 2461, 2462, 2463, 2467, 2468,
+ 2472, 2473, 2474
};
#endif
@@ -1927,31 +1929,32 @@
"NS_ENTRY", "UNIQUE_REG", "LABEL", "EMIT", "EOM", "IREG", "NREG", "SREG",
"PREG", "IDENTIFIER", "REG", "MACRO", "ENDM", "STRINGC", "INTC",
"FLOATC", "USTRINGC", "PARROT_OP", "VAR", "LINECOMMENT", "FILECOMMENT",
- "DOT", "CONCAT", "'='", "'['", "']'", "'('", "')'", "'!'", "'~'", "'-'",
- "'+'", "'*'", "'/'", "'%'", "'&'", "'|'", "';'", "$accept", "program",
+ "DOT", "CONCAT", "'='", "'['", "']'", "';'", "'('", "')'", "'!'", "'~'",
+ "'-'", "'+'", "'*'", "'/'", "'%'", "'&'", "'|'", "$accept", "program",
"compilation_units", "compilation_unit", "pragma", "location_directive",
"annotate_directive", "hll_def", "constdef", "$@1", "pmc_const", "$@2",
"$@3", "any_string", "pasmcode", "pasmline", "pasm_inst", "$@4", "$@5",
"pasm_args", "emit", "$@6", "opt_pasmcode", "class_namespace",
- "maybe_ns", "sub", "$@7", "$@8", "$@9", "sub_params", "sub_param",
- "$@10", "sub_param_type_def", "multi", "outer", "vtable", "method",
- "ns_entry_name", "instanceof", "subid", "multi_types", "multi_type",
- "sub_body", "pcc_sub_call", "@11", "opt_label", "opt_invocant",
- "sub_proto", "sub_proto_list", "proto", "pcc_call", "pcc_args",
- "pcc_arg", "pcc_results", "pcc_result", "$@12", "paramtype_list",
- "paramtype", "pcc_ret", "$@13", "pcc_yield", "$@14", "pcc_returns",
- "pcc_yields", "pcc_return", "pcc_set_yield", "pcc_return_many", "$@15",
- "return_or_yield", "var_returns", "statements", "helper_clear_state",
- "statement", "labels", "_labels", "label", "instruction", "id_list",
- "id_list_id", "opt_unique_reg", "labeled_inst", "$@16", "$@17", "$@18",
- "type", "assignment", "@19", "un_op", "bin_op", "get_results", "@20",
- "op_assign", "assign_op", "func_assign", "the_sub", "sub_call", "@21",
- "arglist", "arg", "argtype_list", "argtype", "result", "targetlist",
+ "maybe_ns", "nslist", "$@7", "_nslist", "sub", "$@8", "$@9", "$@10",
+ "sub_params", "sub_param", "$@11", "sub_param_type_def", "multi",
+ "outer", "vtable", "method", "ns_entry_name", "instanceof", "subid",
+ "multi_types", "multi_type", "sub_body", "pcc_sub_call", "@12",
+ "opt_label", "opt_invocant", "sub_proto", "sub_proto_list", "proto",
+ "pcc_call", "pcc_args", "pcc_arg", "pcc_results", "pcc_result", "$@13",
+ "paramtype_list", "paramtype", "pcc_ret", "$@14", "pcc_yield", "$@15",
+ "pcc_returns", "pcc_yields", "pcc_return", "pcc_set_yield",
+ "pcc_return_many", "$@16", "return_or_yield", "var_returns",
+ "statements", "helper_clear_state", "statement", "labels", "_labels",
+ "label", "instruction", "id_list", "id_list_id", "opt_unique_reg",
+ "labeled_inst", "$@17", "$@18", "$@19", "type", "assignment", "@20",
+ "un_op", "bin_op", "get_results", "@21", "op_assign", "assign_op",
+ "func_assign", "the_sub", "sub_call", "@22", "arglist", "arg",
+ "argtype_list", "argtype", "result", "targetlist",
"conditional_statement", "unless_statement", "if_statement",
"comma_or_goto", "relop", "target", "vars", "_vars", "_var_or_i",
"sub_label_op_c", "sub_label_op", "label_op", "var_or_i", "var",
- "keylist", "$@22", "keylist_force", "$@23", "_keylist", "key", "reg",
- "const", 0
+ "keylist", "$@23", "keylist_force", "$@24", "_keylist", "key", "reg",
+ "stringc", "const", 0
};
#endif
@@ -1972,8 +1975,8 @@
344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
- 374, 61, 91, 93, 40, 41, 33, 126, 45, 43,
- 42, 47, 37, 38, 124, 59
+ 374, 61, 91, 93, 59, 40, 41, 33, 126, 45,
+ 43, 42, 47, 37, 38, 124
};
# endif
@@ -1985,35 +1988,36 @@
144, 147, 146, 148, 146, 149, 149, 150, 150, 151,
151, 151, 151, 151, 151, 151, 153, 152, 154, 152,
152, 152, 152, 155, 157, 156, 158, 158, 159, 160,
- 160, 162, 163, 164, 161, 165, 165, 165, 167, 166,
- 168, 169, 170, 170, 171, 171, 172, 172, 173, 173,
- 174, 175, 175, 176, 176, 176, 177, 177, 177, 177,
- 177, 177, 177, 178, 178, 180, 179, 181, 181, 182,
- 182, 183, 183, 184, 184, 185, 185, 185, 185, 185,
- 185, 185, 185, 185, 185, 185, 185, 185, 185, 186,
- 186, 186, 186, 186, 186, 186, 187, 187, 188, 189,
- 189, 190, 191, 190, 192, 192, 193, 193, 193, 193,
- 193, 193, 193, 193, 195, 194, 194, 197, 196, 198,
- 198, 198, 199, 199, 199, 200, 201, 203, 202, 204,
- 204, 205, 205, 205, 205, 205, 206, 206, 207, 208,
- 208, 208, 208, 208, 208, 209, 209, 210, 210, 211,
- 212, 212, 213, 213, 214, 215, 215, 216, 216, 217,
- 216, 216, 216, 218, 216, 216, 219, 216, 216, 216,
- 216, 216, 216, 216, 216, 216, 216, 220, 220, 220,
- 220, 221, 221, 221, 221, 221, 221, 222, 221, 221,
- 221, 221, 221, 223, 223, 223, 224, 224, 224, 224,
- 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
- 224, 224, 224, 224, 224, 224, 224, 224, 224, 226,
- 225, 227, 228, 228, 228, 228, 228, 228, 228, 228,
- 228, 228, 228, 228, 228, 229, 230, 230, 230, 230,
- 230, 230, 230, 230, 232, 231, 233, 233, 233, 233,
- 233, 233, 234, 235, 235, 236, 236, 236, 236, 236,
- 237, 238, 238, 238, 238, 238, 239, 239, 240, 240,
- 240, 241, 241, 241, 242, 242, 243, 243, 243, 243,
- 243, 243, 244, 244, 245, 245, 246, 246, 247, 247,
- 247, 248, 248, 248, 249, 249, 250, 250, 251, 251,
- 252, 252, 254, 253, 256, 255, 257, 257, 258, 259,
- 259, 259, 259, 259, 260, 260, 260, 260
+ 160, 162, 161, 163, 163, 165, 166, 167, 164, 168,
+ 168, 168, 170, 169, 171, 172, 173, 173, 174, 174,
+ 175, 175, 176, 176, 177, 178, 178, 179, 179, 179,
+ 180, 180, 180, 180, 180, 180, 180, 181, 181, 183,
+ 182, 184, 184, 185, 185, 186, 186, 187, 187, 188,
+ 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
+ 188, 188, 188, 189, 189, 189, 189, 189, 189, 189,
+ 190, 190, 191, 192, 192, 193, 194, 193, 195, 195,
+ 196, 196, 196, 196, 196, 196, 196, 196, 198, 197,
+ 197, 200, 199, 201, 201, 201, 202, 202, 202, 203,
+ 204, 206, 205, 207, 207, 208, 208, 208, 208, 208,
+ 209, 209, 210, 211, 211, 211, 211, 211, 211, 212,
+ 212, 213, 213, 214, 215, 215, 216, 216, 217, 218,
+ 218, 219, 219, 220, 219, 219, 219, 221, 219, 219,
+ 222, 219, 219, 219, 219, 219, 219, 219, 219, 219,
+ 219, 223, 223, 223, 223, 224, 224, 224, 224, 224,
+ 224, 225, 224, 224, 224, 224, 224, 226, 226, 226,
+ 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
+ 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
+ 227, 227, 227, 229, 228, 230, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 232,
+ 233, 233, 233, 233, 233, 233, 233, 233, 235, 234,
+ 236, 236, 236, 236, 236, 236, 237, 238, 238, 239,
+ 239, 239, 239, 239, 240, 241, 241, 241, 241, 241,
+ 242, 242, 243, 243, 243, 244, 244, 244, 245, 245,
+ 246, 246, 246, 246, 246, 246, 247, 247, 248, 248,
+ 249, 249, 250, 250, 250, 251, 251, 251, 252, 252,
+ 253, 253, 254, 254, 255, 255, 257, 256, 259, 258,
+ 260, 260, 261, 262, 262, 262, 262, 262, 263, 263,
+ 264, 264, 264
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -2024,35 +2028,36 @@
6, 0, 6, 0, 6, 1, 1, 1, 2, 3,
2, 1, 1, 1, 1, 1, 0, 3, 0, 4,
2, 4, 0, 1, 0, 4, 0, 1, 3, 3,
- 2, 0, 0, 0, 10, 0, 2, 3, 0, 3,
- 3, 4, 4, 4, 1, 4, 1, 4, 1, 4,
- 4, 1, 4, 0, 3, 1, 1, 1, 1, 1,
- 1, 1, 3, 0, 1, 0, 9, 0, 2, 0,
- 3, 0, 1, 1, 2, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
- 3, 3, 3, 3, 5, 5, 0, 3, 2, 0,
- 3, 3, 0, 4, 0, 2, 1, 1, 1, 1,
- 4, 4, 1, 1, 0, 5, 1, 0, 5, 0,
- 2, 3, 0, 2, 3, 3, 3, 0, 5, 1,
- 1, 0, 1, 3, 3, 5, 1, 2, 0, 2,
- 2, 1, 1, 1, 1, 0, 1, 2, 1, 1,
- 3, 2, 1, 3, 2, 0, 1, 1, 1, 0,
- 4, 4, 4, 0, 6, 1, 0, 6, 2, 2,
- 2, 2, 1, 1, 1, 1, 0, 1, 1, 1,
- 1, 3, 4, 5, 6, 6, 3, 0, 9, 1,
- 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
+ 2, 0, 2, 1, 3, 0, 0, 0, 10, 0,
+ 2, 3, 0, 3, 3, 4, 4, 4, 1, 4,
+ 1, 4, 1, 4, 4, 1, 4, 0, 3, 1,
+ 1, 1, 1, 1, 1, 1, 3, 0, 1, 0,
+ 9, 0, 2, 0, 3, 0, 1, 1, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 5, 3, 3, 3, 3, 5, 5,
+ 0, 3, 2, 0, 3, 3, 0, 4, 0, 2,
+ 1, 1, 1, 1, 4, 4, 1, 1, 0, 5,
+ 1, 0, 5, 0, 2, 3, 0, 2, 3, 3,
+ 3, 0, 5, 1, 1, 0, 1, 3, 3, 5,
+ 1, 2, 0, 2, 2, 1, 1, 1, 1, 0,
+ 1, 2, 1, 1, 3, 2, 1, 3, 2, 0,
+ 1, 1, 1, 0, 4, 4, 4, 0, 6, 1,
+ 0, 6, 2, 2, 2, 2, 1, 1, 1, 1,
+ 0, 1, 1, 1, 1, 3, 4, 5, 6, 6,
+ 3, 0, 9, 1, 1, 1, 3, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
- 5, 3, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 4, 1, 1, 1, 1,
- 3, 3, 3, 3, 0, 5, 0, 3, 1, 5,
- 3, 3, 2, 0, 2, 1, 1, 1, 4, 4,
- 2, 3, 5, 1, 3, 0, 1, 1, 6, 5,
- 4, 4, 6, 5, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 0, 1, 3, 1, 1, 4,
- 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 2, 0, 2, 1, 3, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 5, 3, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
+ 1, 1, 1, 1, 3, 3, 3, 3, 0, 5,
+ 0, 3, 1, 5, 3, 3, 2, 0, 2, 1,
+ 1, 1, 4, 4, 2, 3, 5, 1, 3, 0,
+ 1, 1, 6, 5, 4, 4, 6, 5, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
+ 3, 1, 1, 4, 3, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 2, 0, 2,
+ 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -2060,299 +2065,305 @@
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 0, 12, 0, 0, 0, 0, 51, 19, 0, 44,
+ 0, 12, 0, 0, 0, 0, 55, 19, 0, 44,
0, 0, 2, 3, 10, 11, 0, 6, 8, 5,
- 7, 18, 0, 0, 322, 0, 0, 0, 0, 165,
+ 7, 18, 0, 0, 51, 0, 0, 0, 0, 169,
9, 1, 4, 13, 0, 16, 50, 0, 0, 48,
- 314, 312, 313, 315, 52, 311, 197, 198, 199, 200,
- 0, 14, 21, 169, 0, 32, 31, 35, 34, 165,
- 27, 0, 33, 36, 166, 168, 0, 49, 329, 330,
- 331, 332, 333, 336, 334, 335, 337, 302, 320, 328,
- 323, 326, 303, 321, 91, 0, 0, 0, 30, 28,
- 45, 0, 0, 38, 0, 0, 167, 15, 0, 97,
- 95, 96, 98, 99, 66, 100, 0, 101, 0, 64,
- 0, 71, 68, 102, 103, 104, 105, 106, 107, 108,
- 0, 92, 93, 0, 0, 0, 40, 0, 91, 29,
- 304, 327, 0, 0, 73, 0, 0, 0, 0, 53,
- 94, 20, 316, 317, 318, 0, 319, 0, 0, 0,
- 324, 37, 320, 43, 305, 307, 308, 25, 26, 0,
- 0, 0, 76, 77, 79, 78, 80, 81, 322, 0,
- 75, 0, 0, 0, 0, 55, 0, 0, 41, 39,
- 0, 0, 322, 0, 67, 63, 62, 0, 0, 61,
- 65, 70, 72, 69, 158, 22, 24, 310, 325, 0,
- 306, 82, 74, 56, 58, 0, 0, 162, 161, 163,
- 164, 0, 0, 158, 0, 156, 309, 0, 0, 160,
- 57, 54, 157, 0, 196, 159, 59, 0, 0, 171,
- 0, 0, 0, 0, 179, 0, 183, 186, 149, 0,
- 150, 239, 0, 0, 0, 256, 257, 258, 304, 207,
- 185, 193, 194, 195, 136, 0, 0, 177, 209, 210,
- 211, 264, 192, 178, 287, 286, 259, 124, 17, 189,
- 0, 0, 0, 0, 191, 0, 0, 0, 0, 0,
- 188, 259, 0, 85, 134, 137, 190, 285, 147, 170,
- 0, 242, 243, 244, 245, 248, 249, 250, 251, 247,
- 246, 252, 253, 254, 0, 0, 322, 0, 60, 0,
- 295, 296, 297, 298, 299, 300, 301, 294, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 285, 116,
- 139, 142, 0, 283, 0, 124, 151, 266, 262, 261,
- 263, 260, 212, 336, 337, 304, 213, 214, 215, 0,
- 206, 320, 201, 0, 241, 126, 127, 128, 129, 133,
- 132, 125, 0, 291, 0, 0, 290, 0, 175, 180,
- 172, 181, 182, 0, 0, 0, 89, 0, 0, 0,
- 0, 0, 280, 336, 0, 152, 273, 336, 0, 268,
- 273, 255, 202, 221, 230, 231, 235, 224, 225, 226,
- 227, 228, 229, 222, 232, 233, 234, 223, 322, 238,
- 216, 217, 218, 219, 220, 236, 237, 0, 0, 0,
- 293, 0, 289, 0, 176, 174, 0, 0, 0, 240,
- 0, 0, 0, 0, 140, 0, 135, 0, 143, 0,
- 138, 0, 284, 0, 281, 0, 0, 0, 148, 272,
- 0, 0, 265, 0, 0, 203, 0, 0, 0, 292,
- 288, 173, 184, 187, 118, 0, 0, 0, 0, 87,
- 117, 273, 141, 273, 144, 0, 0, 153, 336, 154,
- 275, 276, 277, 274, 271, 336, 267, 270, 204, 205,
- 130, 131, 90, 0, 0, 0, 0, 119, 0, 145,
- 146, 282, 266, 0, 0, 0, 110, 0, 111, 113,
- 0, 112, 0, 0, 88, 0, 155, 0, 0, 269,
- 0, 0, 0, 122, 0, 86, 0, 208, 279, 278,
- 109, 115, 114, 0, 124, 120, 0, 121, 123
+ 318, 316, 317, 319, 56, 315, 201, 202, 203, 204,
+ 0, 14, 21, 173, 0, 32, 31, 35, 34, 169,
+ 27, 0, 33, 36, 170, 172, 0, 49, 338, 339,
+ 52, 53, 95, 0, 0, 0, 30, 28, 45, 0,
+ 0, 38, 0, 0, 171, 15, 0, 101, 99, 100,
+ 102, 103, 70, 104, 0, 105, 0, 68, 0, 75,
+ 72, 106, 107, 108, 109, 110, 111, 112, 0, 96,
+ 97, 0, 0, 0, 333, 334, 335, 336, 337, 340,
+ 341, 306, 324, 40, 307, 342, 325, 0, 95, 29,
+ 308, 54, 0, 0, 77, 0, 0, 0, 0, 57,
+ 98, 20, 320, 321, 322, 0, 323, 0, 0, 0,
+ 328, 37, 324, 43, 309, 311, 312, 25, 26, 0,
+ 0, 0, 80, 81, 83, 82, 84, 85, 326, 0,
+ 79, 0, 0, 0, 0, 59, 0, 0, 41, 39,
+ 0, 0, 326, 0, 71, 67, 66, 0, 0, 0,
+ 65, 69, 74, 76, 73, 162, 22, 24, 314, 332,
+ 329, 330, 0, 310, 86, 327, 78, 60, 62, 0,
+ 0, 166, 165, 167, 168, 0, 0, 162, 0, 160,
+ 0, 313, 0, 0, 164, 61, 58, 161, 0, 200,
+ 163, 331, 63, 0, 0, 175, 0, 0, 0, 0,
+ 183, 0, 187, 190, 153, 0, 154, 243, 0, 0,
+ 0, 260, 261, 262, 308, 211, 189, 197, 198, 199,
+ 140, 0, 0, 181, 213, 214, 215, 268, 196, 182,
+ 291, 290, 263, 128, 17, 193, 0, 0, 0, 0,
+ 195, 0, 0, 0, 0, 0, 192, 263, 0, 89,
+ 138, 141, 194, 289, 151, 174, 0, 246, 247, 248,
+ 249, 252, 253, 254, 255, 251, 250, 256, 257, 258,
+ 0, 0, 326, 0, 64, 0, 299, 300, 301, 302,
+ 303, 304, 305, 298, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 289, 120, 143, 146, 0, 287,
+ 0, 128, 155, 270, 266, 265, 267, 264, 216, 338,
+ 339, 308, 217, 218, 219, 0, 210, 324, 205, 0,
+ 245, 130, 131, 132, 133, 137, 136, 129, 0, 295,
+ 0, 0, 294, 0, 179, 184, 176, 185, 186, 0,
+ 0, 0, 93, 0, 0, 0, 0, 0, 284, 338,
+ 0, 156, 277, 338, 0, 272, 277, 259, 206, 225,
+ 234, 235, 239, 228, 229, 230, 231, 232, 233, 226,
+ 236, 237, 238, 227, 326, 242, 220, 221, 222, 223,
+ 224, 240, 241, 0, 0, 0, 297, 0, 293, 0,
+ 180, 178, 0, 0, 0, 244, 0, 0, 0, 0,
+ 144, 0, 139, 0, 147, 0, 142, 0, 288, 0,
+ 285, 0, 0, 0, 152, 276, 0, 0, 269, 0,
+ 0, 207, 0, 0, 0, 296, 292, 177, 188, 191,
+ 122, 0, 0, 0, 0, 91, 121, 277, 145, 277,
+ 148, 0, 0, 157, 338, 158, 279, 280, 281, 278,
+ 275, 338, 271, 274, 208, 209, 134, 135, 94, 0,
+ 0, 0, 0, 123, 0, 149, 150, 286, 270, 0,
+ 0, 0, 114, 0, 115, 117, 0, 116, 0, 0,
+ 92, 0, 159, 0, 0, 273, 0, 0, 0, 126,
+ 0, 90, 0, 212, 283, 282, 113, 119, 118, 0,
+ 128, 124, 0, 125, 127
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 11, 12, 13, 14, 15, 210, 16, 17, 27,
- 58, 86, 87, 159, 59, 60, 94, 95, 128, 151,
- 18, 29, 61, 19, 25, 20, 26, 84, 175, 194,
- 211, 217, 226, 113, 114, 115, 116, 117, 118, 119,
- 169, 170, 212, 251, 329, 497, 432, 120, 121, 122,
- 469, 376, 433, 513, 526, 533, 308, 361, 252, 330,
- 253, 331, 377, 378, 437, 441, 254, 336, 255, 384,
- 213, 214, 215, 63, 64, 65, 225, 369, 370, 425,
- 256, 275, 278, 279, 50, 257, 287, 349, 417, 258,
- 282, 259, 307, 260, 261, 262, 290, 388, 389, 449,
- 483, 333, 334, 263, 264, 265, 318, 319, 78, 153,
- 154, 155, 44, 45, 144, 156, 146, 37, 38, 180,
- 181, 80, 81, 82, 83
+ -1, 11, 12, 13, 14, 15, 214, 16, 17, 27,
+ 58, 74, 75, 159, 59, 60, 82, 83, 128, 151,
+ 18, 29, 61, 19, 25, 37, 38, 70, 20, 26,
+ 72, 175, 195, 215, 222, 232, 101, 102, 103, 104,
+ 105, 106, 107, 169, 170, 216, 257, 335, 503, 438,
+ 108, 109, 110, 475, 382, 439, 519, 532, 539, 314,
+ 367, 258, 336, 259, 337, 383, 384, 443, 447, 260,
+ 342, 261, 390, 217, 218, 219, 63, 64, 65, 230,
+ 375, 376, 431, 262, 281, 284, 285, 50, 263, 293,
+ 355, 423, 264, 288, 265, 313, 266, 267, 268, 296,
+ 394, 395, 455, 489, 339, 340, 269, 270, 271, 324,
+ 325, 122, 153, 154, 155, 44, 45, 144, 156, 146,
+ 187, 188, 180, 181, 200, 201, 124, 125, 126
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -424
+#define YYPACT_NINF -448
static const yytype_int16 yypact[] =
{
- 27, -424, -90, -80, -54, -47, -424, -424, -29, -424,
- 80, 134, 27, -424, -424, -424, 131, -424, -424, -424,
- -424, -424, 71, 142, 28, 154, -41, 197, 164, 12,
- -424, -424, -424, -424, 60, -424, -424, 51, 210, -424,
- -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- 77, -424, 81, -424, 194, -424, -424, -424, -424, 55,
- -424, 100, -424, 37, 127, -424, 231, -424, -424, -424,
- -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- 103, -424, -424, -424, 479, 133, 141, 144, -424, -424,
- -424, 210, 148, -424, 257, 150, -424, -424, 210, -424,
- -424, -424, -424, -424, 158, -424, 162, -424, 163, 173,
- 177, 178, 179, -424, -424, -424, -424, -424, -424, -424,
- 262, 479, -424, 182, 415, 415, -424, 208, 479, -424,
- 395, -424, -55, 58, 157, 196, 199, -55, -55, -424,
- -424, -424, -424, -424, -424, 167, -424, 184, 204, 220,
- -424, -424, 203, -424, 258, -424, -424, -424, -424, 202,
- 211, 212, -424, -424, -424, -424, -424, -424, -424, -57,
- -424, 214, 221, 223, 224, -424, -55, -55, -424, -424,
- 206, 210, -424, 395, -424, -424, -424, 222, 157, -424,
- -424, -424, -424, -424, 7, -424, -424, -424, 103, 235,
- -424, -424, -424, -424, -424, 239, 355, -424, -424, -424,
- -424, 362, 300, 153, 75, -424, -424, 197, 303, -424,
- -424, -424, -424, 370, 227, -424, -424, 271, 182, -424,
- -69, 117, 330, 210, -424, -42, 76, -424, -424, 169,
- -424, -424, 381, 383, 384, -424, -424, -424, 395, -424,
- -424, -424, -424, -424, -424, 266, 387, -424, -424, -424,
- -424, -424, -424, -424, -424, -424, 413, -424, -424, -424,
- 210, 156, 210, 156, -424, 197, 325, 328, 197, 197,
- -424, 280, 276, -424, -424, -424, -424, 278, -424, -424,
- 279, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- -424, -424, -424, -424, 316, 249, -424, 210, 4, 392,
- -424, -424, -424, -424, -424, -424, -424, -424, -69, 210,
- 394, -69, 210, 298, 264, 264, 304, 307, 278, -424,
- -424, -424, 385, -424, -30, -424, 433, 475, -424, -424,
- -424, -424, -424, 286, 292, 395, -424, -424, -424, 210,
- -424, 8, 428, 294, -424, -424, -424, -424, 301, -424,
- -424, -424, -69, -424, 416, -69, -424, 427, 340, 375,
- -424, -424, -424, 319, 334, -28, -2, 14, 10, 264,
- 517, 341, 4, 439, -25, -424, -424, 441, -7, -424,
- 444, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- -424, -424, -424, -424, -424, -424, -424, 210, 347, -20,
- -424, -69, -424, -69, -424, -424, 298, 182, 182, -424,
- 210, 210, 161, 467, -424, 210, -424, 469, -424, 210,
- -424, 471, -424, 456, -424, 169, 210, 489, -424, 132,
- 210, 503, -424, 210, 356, -424, 210, 364, 365, -424,
- -424, -424, -424, -424, -424, 476, 210, 210, 526, 127,
- -424, -424, -424, -424, -424, 264, 357, -424, 470, -424,
- -424, 367, -424, -424, -424, 482, -424, -424, -424, -424,
- -424, -424, -424, 13, 501, 23, 29, -424, 508, 132,
- 132, -424, 475, 210, 56, 210, -424, 210, -424, -424,
- 210, -424, 210, 86, -424, 1, -424, 368, 388, -424,
- 510, 511, 512, -424, 264, -424, 520, -424, -424, -424,
- -424, -424, -424, 197, -424, -424, 298, 4, -424
+ 69, -448, -70, -51, -44, -48, -448, -448, 22, -448,
+ 136, 150, 69, -448, -448, -448, 153, -448, -448, -448,
+ -448, -448, 91, 159, 51, 185, 200, 135, 191, 204,
+ -448, -448, -448, -448, 90, -448, -448, 99, -68, -448,
+ -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
+ 117, -448, 141, -448, 251, -448, -448, -448, -448, 234,
+ -448, 154, -448, 12, 160, -448, 257, -448, -448, -448,
+ 138, -448, 413, 151, 170, 162, -448, -448, -448, 189,
+ 164, -448, 279, 171, -448, -448, -68, -448, -448, -448,
+ -448, -448, 166, -448, 183, -448, 184, 187, 192, 193,
+ 194, -448, -448, -448, -448, -448, -448, -448, 281, 413,
+ -448, 101, 426, 426, -448, -448, -448, -448, -448, -448,
+ -448, -448, -448, -448, -448, -448, -448, 226, 413, -448,
+ 374, -448, 96, -24, -3, 199, 213, 96, 96, -448,
+ -448, -448, -448, -448, -448, 207, -448, 209, 217, 231,
+ -448, -448, 210, -448, 265, -448, -448, -448, -448, 211,
+ 212, 214, -448, -448, -448, -448, -448, -448, -448, -58,
+ -448, 215, 216, 219, 221, -448, 96, 96, -448, -448,
+ 225, 189, -448, 374, -448, -448, -448, 227, 189, -3,
+ -448, -448, -448, -448, -448, 19, -448, -448, -448, -448,
+ 230, -448, 232, -448, -448, 230, -448, -448, -448, 222,
+ 335, -448, -448, -448, -448, 345, 285, 172, 7, -448,
+ 189, -448, 135, 289, -448, -448, -448, -448, 356, 163,
+ -448, -448, -448, 254, 101, -448, -62, 284, 302, 189,
+ -448, 119, 127, -448, -448, 317, -448, -448, 359, 360,
+ 361, -448, -448, -448, 374, -448, -448, -448, -448, -448,
+ -448, 242, 364, -448, -448, -448, -448, -448, -448, -448,
+ -448, -448, 429, -448, -448, -448, 189, 161, 189, 161,
+ -448, 135, 299, 300, 135, 135, -448, 252, 247, -448,
+ -448, -448, -448, 519, -448, -448, 250, -448, -448, -448,
+ -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
+ 449, 40, -448, 189, 39, 366, -448, -448, -448, -448,
+ -448, -448, -448, -448, -62, 189, 369, -62, 189, 274,
+ 546, 546, 275, 277, 519, -448, -448, -448, 363, -448,
+ -35, -448, 463, 477, -448, -448, -448, -448, -448, 261,
+ 266, 374, -448, -448, -448, 189, -448, -40, 393, 276,
+ -448, -448, -448, -448, 278, -448, -448, -448, -62, -448,
+ 391, -62, -448, 394, 310, 341, -448, -448, -448, 296,
+ 298, 5, -1, 14, 9, 546, 528, 305, 39, 405,
+ 23, -448, -448, 414, 36, -448, 416, -448, -448, -448,
+ -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
+ -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
+ -448, -448, -448, 189, 319, 139, -448, -62, -448, -62,
+ -448, -448, 274, 101, 101, -448, 189, 189, 109, 439,
+ -448, 189, -448, 440, -448, 189, -448, 441, -448, 424,
+ -448, 317, 189, 491, -448, 263, 189, 505, -448, 189,
+ 331, -448, 189, 329, 330, -448, -448, -448, -448, -448,
+ -448, 453, 189, 189, 537, 160, -448, -448, -448, -448,
+ -448, 546, 333, -448, 461, -448, -448, 346, -448, -448,
+ -448, 462, -448, -448, -448, -448, -448, -448, -448, 27,
+ 487, 29, 35, -448, 488, 263, 263, -448, 477, 189,
+ 140, 189, -448, 189, -448, -448, 189, -448, 189, 105,
+ -448, 46, -448, 367, 368, -448, 504, 508, 510, -448,
+ 546, -448, 512, -448, -448, -448, -448, -448, -448, 135,
+ -448, -448, 274, 39, -448
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -424, -424, -424, 513, 18, -164, -424, -424, -424, -424,
- 309, -424, -424, 68, -424, 481, -424, -424, -424, 198,
- -424, -424, -424, 104, -424, -424, -424, -424, -424, -424,
- -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- -424, 354, -424, -424, -424, -424, -424, 423, -424, 431,
- -424, -424, -424, -424, -424, -424, -330, -424, -424, -424,
- -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- -424, -424, 361, 339, -424, -63, -424, -424, -419, -424,
- -424, -424, -424, -424, -214, -424, -424, -424, -424, -424,
- -424, -424, -424, -424, 109, -195, -424, 82, -328, -423,
- -424, 205, 254, -424, -424, -424, 317, 323, -128, 350,
- -424, 421, -424, 295, -220, 94, -38, -162, -424, -424,
- -424, 429, 514, -424, -119
+ -448, -448, -448, 483, -15, -161, -448, -448, -448, -448,
+ 288, -448, -448, 71, -448, 459, -448, -448, -448, 168,
+ -448, -448, -448, -7, -448, -448, -448, -448, -448, -448,
+ -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
+ -448, -448, -448, -448, 347, -448, -448, -448, -448, -448,
+ 392, -448, 434, -448, -448, -448, -448, -448, -448, -335,
+ -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
+ -448, -448, -448, -448, -448, 318, 326, -448, -63, -448,
+ -448, -417, -448, -448, -448, -448, -448, -219, -448, -448,
+ -448, -448, -448, -448, -448, -448, -448, 94, -181, -448,
+ 38, -333, -447, -448, 173, 224, -448, -448, -448, 268,
+ 270, -128, 307, -448, 379, -448, 260, -229, 132, -79,
+ -177, -448, -448, -448, 384, 353, -448, 43, -107
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -260
+#define YYTABLE_NINF -264
static const yytype_int16 yytable[] =
{
- 79, 96, 152, 227, 141, 382, 187, 461, 385, 430,
- 269, 203, 204, 188, 438, 3, 4, 506, 434, 2,
- 199, 21, 355, 356, 357, 358, 439, 509, 359, 435,
- 209, 1, 22, 511, 2, 3, 4, 5, 142, 205,
- 380, -42, 380, 52, 280, 447, 143, 57, 499, 209,
- 500, 91, 5, 126, 6, 152, 157, 23, 7, 158,
- 79, 323, 2, 451, 326, 327, 40, 92, 189, 276,
- 41, 451, 277, 42, 43, 24, 223, 57, -83, -165,
- 5, 431, 28, 507, 30, -165, 52, -165, -165, -165,
- 440, 457, 436, 510, 458, 381, 266, 429, 363, 512,
- 448, 366, 464, 360, -165, -165, -165, 8, -165, 268,
- 350, 281, 53, 93, -46, 523, 206, 538, 452, 479,
- 152, 54, 8, 486, 207, 208, 527, 304, 9, 55,
- 56, 270, -259, 62, 31, 33, 10, -165, -165, -165,
- -165, 34, 420, 79, 353, 422, 35, 524, -165, 480,
- 8, 36, -165, 481, -165, 53, 482, -47, 39, 335,
- 525, 3, 4, 62, 54, 160, 310, 517, 51, 161,
- 518, 66, 55, 56, 67, 53, 340, 351, -165, -165,
- -165, -165, -165, -165, 85, 205, -165, -23, -21, -165,
- -165, -165, -23, 271, 273, 274, 371, 372, 88, -165,
- 335, 459, 90, 460, 537, 173, 174, 162, 163, 164,
- 165, 311, 312, 313, 314, 315, 316, 152, 145, 147,
- 68, 69, 70, 71, -84, 72, 317, 53, 73, 74,
- 75, 76, 309, 77, 320, 97, 466, 230, 98, 231,
- 232, 233, 467, 468, 195, 196, 454, 46, 47, 48,
- 49, 442, 335, 124, 123, 125, 234, 235, 236, 127,
- 237, 129, 206, 342, 166, 130, 139, 352, 167, 354,
- 207, 208, 68, 69, 70, 71, 245, 72, 148, 168,
- 246, 364, 132, 247, 367, 77, 133, 134, 176, 238,
- 239, 240, 241, 73, 74, 75, 76, 135, 386, 390,
- 242, 136, 137, 138, 243, 177, 244, 171, 462, 463,
- 172, 392, 178, 68, 69, 70, 71, 281, 72, 536,
- 179, 73, 74, 75, 76, 182, 77, 184, 183, 197,
- 68, 69, 70, 71, 245, 72, 185, 186, 246, 190,
- 496, 247, 248, 77, 272, 201, 191, 501, 192, 193,
- 218, 249, 68, 69, 70, 71, 245, 72, 216, 219,
- 343, 74, 75, 344, 345, 77, 220, 68, 69, 70,
- 71, 221, 72, 228, 229, 346, 347, 348, 267, 455,
- 77, 68, 69, 70, 71, 283, 72, 284, 285, 332,
- 288, 289, 386, 465, 77, 324, 534, 471, 325, 304,
- 328, 473, 362, 337, 365, 368, 498, 379, 477, 386,
- -257, 373, 484, 386, 374, 487, -258, 418, 489, 68,
- 69, 70, 71, 40, 72, 419, 421, 338, 493, 494,
- 339, 43, 77, 68, 69, 70, 71, 423, 72, 424,
- 427, 73, 74, 75, 76, 426, 77, 291, 292, 293,
- 294, 295, 296, 297, 298, 428, 299, 300, 301, 302,
- 303, 446, 445, 450, 390, 516, 453, 519, 456, 520,
- 393, 470, 521, 472, 522, 474, 394, 395, 475, 488,
- 492, 502, 396, 397, 398, 399, 400, 401, 402, 490,
- 491, 504, 503, 528, 403, 404, 405, 406, 68, 69,
- 70, 71, 142, 72, 505, 508, 73, 74, 75, 76,
- 143, 77, 514, 529, 530, 531, 532, 150, 68, 69,
- 70, 71, 142, 72, 535, 32, 73, 74, 75, 76,
- 143, 77, 304, 250, 305, 306, 68, 69, 70, 71,
- 89, 72, 202, 391, 383, 74, 75, 76, 407, 77,
- 408, 149, 140, 224, 476, 409, 410, 411, 412, 413,
- 414, 415, 416, 99, 100, 101, 102, 103, 104, 105,
- 106, 107, 108, 109, 222, 110, 111, 112, 68, 69,
- 70, 71, 375, 72, 515, 444, 387, 74, 75, 76,
- 321, 77, 68, 69, 70, 71, 322, 72, 286, 341,
- 478, 74, 75, 76, 200, 77, 68, 69, 70, 71,
- 198, 72, 131, 0, 485, 74, 75, 76, 0, 77,
- 68, 69, 70, 71, 0, 72, 0, 0, 443, 68,
- 69, 70, 71, 77, 72, 0, 0, 495, 0, 0,
- 0, 0, 77
+ 123, 84, 152, 233, 141, 202, 388, 275, 228, 391,
+ 436, -169, 189, 444, 57, 467, -42, -169, 440, -169,
+ -169, -169, 62, 207, 208, 445, 79, 3, 4, 441,
+ 505, 512, 506, 515, 213, 386, -169, -169, -169, 517,
+ -169, 21, 80, 68, 57, 142, 69, 162, 163, 164,
+ 165, 209, 62, 143, 348, 152, 213, 361, 362, 363,
+ 364, 22, 329, 365, 286, 332, 333, 23, 190, -169,
+ -169, -169, -169, 1, 24, 386, 2, 3, 4, 310,
+ -169, 71, 437, 160, -169, -263, -169, 161, 81, 446,
+ -87, 387, 442, 453, 5, 369, 6, 513, 372, 516,
+ 7, 272, 199, 470, 166, 518, 457, 53, 167, 199,
+ -169, -169, -169, -169, -169, -169, 457, 287, -169, 168,
+ 485, -169, -169, -169, 492, 544, 152, 274, 210, 131,
+ 356, 435, -169, 28, 529, 359, 211, 212, 366, 426,
+ 30, 199, 428, 114, 115, 116, 117, 251, 118, 454,
+ 31, 349, 119, 120, 350, 351, 121, 33, 277, 279,
+ 280, 34, 458, 35, 8, 341, 530, 352, 353, 354,
+ 9, 316, 533, 236, 36, 237, 238, 239, 10, 531,
+ 3, 4, 346, 357, 472, 46, 47, 48, 49, 39,
+ 473, 474, 240, 241, 242, 51, 243, 315, 465, 326,
+ 466, 66, 377, 378, 209, 543, 341, 157, 173, 174,
+ 158, 2, 68, 119, 120, 69, 317, 318, 319, 320,
+ 321, 322, 67, 152, 73, 244, 245, 246, 247, 5,
+ 282, 323, 358, 283, 360, 52, 248, 460, -23, -21,
+ 249, 2, 250, -88, 145, 147, 370, 196, 197, 373,
+ 463, 523, -23, 464, 524, 76, 78, 448, 341, 5,
+ 53, 85, 86, 392, 396, 52, 114, 115, 116, 117,
+ 251, 118, 111, 113, 252, 127, 398, 253, 254, 121,
+ 486, 210, 112, 129, 487, 139, 130, 488, 255, 211,
+ 212, 132, 114, 115, 116, 117, 148, 118, 276, 8,
+ 68, 119, 120, 69, 53, 121, -46, 40, 133, 134,
+ 171, 41, 135, 54, 42, 43, 278, 136, 137, 138,
+ 542, 55, 56, 287, 172, 178, 468, 469, 176, 8,
+ 177, 179, 182, 223, 53, 183, -47, 184, 185, 224,
+ 186, 191, 192, 54, 461, 193, 502, 194, 198, 225,
+ 204, 55, 56, 507, 220, 221, 226, 392, 471, 234,
+ 235, 273, 477, 289, 290, 291, 479, 294, 295, 330,
+ 331, 310, 334, 483, 392, 343, 368, 490, 392, 371,
+ 493, 374, 379, 495, 380, 385, -261, 114, 115, 116,
+ 117, -262, 118, 499, 500, 68, 119, 120, 69, 424,
+ 121, 427, 540, 425, 429, 114, 115, 116, 117, 430,
+ 118, 432, 504, 68, 119, 120, 69, 433, 121, 434,
+ 114, 115, 116, 117, 251, 118, 451, 452, 252, 396,
+ 522, 253, 525, 121, 526, 399, 456, 527, 459, 528,
+ 462, 400, 401, 476, 478, 480, 481, 402, 403, 404,
+ 405, 406, 407, 408, 494, 496, 497, 498, 508, 409,
+ 410, 411, 412, 297, 298, 299, 300, 301, 302, 303,
+ 304, 510, 305, 306, 307, 308, 309, 114, 115, 116,
+ 117, 142, 118, 509, 511, 68, 119, 120, 69, 143,
+ 121, 514, 520, 534, 535, 32, 150, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 536, 98,
+ 99, 100, 537, 413, 538, 414, 541, 256, 77, 397,
+ 149, 415, 416, 417, 418, 419, 420, 421, 422, 114,
+ 115, 116, 117, 142, 118, 227, 206, 68, 119, 120,
+ 69, 143, 121, 140, 229, 482, 521, 327, 310, 328,
+ 311, 312, 114, 115, 116, 117, 40, 118, 381, 450,
+ 344, 292, 203, 345, 43, 121, 114, 115, 116, 117,
+ 347, 118, 205, 231, 389, 119, 120, 69, 0, 121,
+ 114, 115, 116, 117, 0, 118, 0, 0, 393, 119,
+ 120, 69, 0, 121, 114, 115, 116, 117, 0, 118,
+ 0, 0, 484, 119, 120, 69, 0, 121, 114, 115,
+ 116, 117, 0, 118, 0, 0, 491, 119, 120, 69,
+ 0, 121, 114, 115, 116, 117, 0, 118, 0, 0,
+ 338, 114, 115, 116, 117, 121, 118, 0, 0, 449,
+ 114, 115, 116, 117, 121, 118, 0, 0, 501, 114,
+ 115, 116, 117, 121, 118, 0, 0, 0, 0, 0,
+ 0, 0, 121
};
static const yytype_int16 yycheck[] =
{
- 38, 64, 130, 217, 123, 335, 168, 426, 336, 11,
- 230, 4, 5, 70, 4, 8, 9, 4, 4, 7,
- 182, 111, 18, 19, 20, 21, 16, 4, 24, 15,
- 194, 4, 112, 4, 7, 8, 9, 25, 107, 32,
- 70, 4, 70, 31, 239, 70, 115, 29, 471, 213,
- 473, 14, 25, 91, 27, 183, 111, 111, 31, 114,
- 98, 275, 7, 70, 278, 279, 107, 30, 125, 111,
- 111, 70, 114, 114, 115, 122, 1, 59, 71, 4,
- 25, 83, 111, 70, 4, 10, 31, 12, 13, 14,
- 80, 111, 78, 70, 114, 125, 224, 125, 318, 70,
- 125, 321, 430, 99, 29, 30, 31, 95, 33, 228,
- 305, 239, 100, 76, 102, 29, 109, 536, 125, 447,
- 248, 109, 95, 451, 117, 118, 125, 119, 101, 117,
- 118, 14, 124, 29, 0, 4, 109, 62, 63, 64,
- 65, 70, 362, 181, 306, 365, 4, 61, 73, 17,
- 95, 123, 77, 21, 79, 100, 24, 102, 4, 287,
- 74, 8, 9, 59, 109, 107, 10, 111, 4, 111,
- 114, 111, 117, 118, 123, 100, 304, 305, 103, 104,
- 105, 106, 107, 108, 107, 32, 111, 111, 112, 114,
- 115, 116, 111, 231, 232, 233, 324, 325, 4, 124,
- 328, 421, 102, 423, 534, 137, 138, 50, 51, 52,
- 53, 55, 56, 57, 58, 59, 60, 345, 124, 125,
- 103, 104, 105, 106, 71, 108, 70, 100, 111, 112,
- 113, 114, 270, 116, 272, 4, 75, 10, 135, 12,
- 13, 14, 81, 82, 176, 177, 408, 50, 51, 52,
- 53, 379, 380, 112, 121, 111, 29, 30, 31, 111,
- 33, 4, 109, 14, 107, 115, 4, 305, 111, 307,
- 117, 118, 103, 104, 105, 106, 107, 108, 70, 122,
- 111, 319, 124, 114, 322, 116, 124, 124, 121, 62,
- 63, 64, 65, 111, 112, 113, 114, 124, 336, 337,
- 73, 124, 124, 124, 77, 121, 79, 111, 427, 428,
- 111, 349, 108, 103, 104, 105, 106, 445, 108, 533,
- 100, 111, 112, 113, 114, 122, 116, 125, 70, 123,
- 103, 104, 105, 106, 107, 108, 125, 125, 111, 125,
- 468, 114, 115, 116, 14, 123, 125, 475, 125, 125,
- 111, 124, 103, 104, 105, 106, 107, 108, 123, 4,
- 111, 112, 113, 114, 115, 116, 4, 103, 104, 105,
- 106, 71, 108, 70, 4, 126, 127, 128, 107, 417,
- 116, 103, 104, 105, 106, 4, 108, 4, 4, 111,
- 124, 4, 430, 431, 116, 70, 524, 435, 70, 119,
- 124, 439, 10, 124, 10, 107, 469, 22, 446, 447,
- 124, 107, 450, 451, 107, 453, 124, 123, 456, 103,
- 104, 105, 106, 107, 108, 124, 10, 111, 466, 467,
- 114, 115, 116, 103, 104, 105, 106, 10, 108, 99,
- 121, 111, 112, 113, 114, 70, 116, 34, 35, 36,
- 37, 38, 39, 40, 41, 121, 43, 44, 45, 46,
- 47, 22, 121, 22, 502, 503, 22, 505, 121, 507,
- 42, 4, 510, 4, 512, 4, 48, 49, 22, 123,
- 4, 124, 54, 55, 56, 57, 58, 59, 60, 125,
- 125, 124, 22, 125, 66, 67, 68, 69, 103, 104,
- 105, 106, 107, 108, 22, 4, 111, 112, 113, 114,
- 115, 116, 4, 125, 4, 4, 4, 122, 103, 104,
- 105, 106, 107, 108, 4, 12, 111, 112, 113, 114,
- 115, 116, 119, 224, 121, 122, 103, 104, 105, 106,
- 59, 108, 188, 345, 111, 112, 113, 114, 120, 116,
- 122, 128, 121, 214, 445, 127, 128, 129, 130, 131,
- 132, 133, 134, 84, 85, 86, 87, 88, 89, 90,
- 91, 92, 93, 94, 213, 96, 97, 98, 103, 104,
- 105, 106, 328, 108, 502, 380, 111, 112, 113, 114,
- 273, 116, 103, 104, 105, 106, 273, 108, 248, 304,
- 111, 112, 113, 114, 183, 116, 103, 104, 105, 106,
- 181, 108, 98, -1, 111, 112, 113, 114, -1, 116,
- 103, 104, 105, 106, -1, 108, -1, -1, 111, 103,
- 104, 105, 106, 116, 108, -1, -1, 111, -1, -1,
+ 79, 64, 130, 222, 111, 182, 341, 236, 1, 342,
+ 11, 4, 70, 4, 29, 432, 4, 10, 4, 12,
+ 13, 14, 29, 4, 5, 16, 14, 8, 9, 15,
+ 477, 4, 479, 4, 195, 70, 29, 30, 31, 4,
+ 33, 111, 30, 111, 59, 107, 114, 50, 51, 52,
+ 53, 32, 59, 115, 14, 183, 217, 18, 19, 20,
+ 21, 112, 281, 24, 245, 284, 285, 111, 126, 62,
+ 63, 64, 65, 4, 122, 70, 7, 8, 9, 119,
+ 73, 38, 83, 107, 77, 125, 79, 111, 76, 80,
+ 71, 126, 78, 70, 25, 324, 27, 70, 327, 70,
+ 31, 229, 181, 436, 107, 70, 70, 100, 111, 188,
+ 103, 104, 105, 106, 107, 108, 70, 245, 111, 122,
+ 453, 114, 115, 116, 457, 542, 254, 234, 109, 86,
+ 311, 126, 125, 111, 29, 312, 117, 118, 99, 368,
+ 4, 220, 371, 103, 104, 105, 106, 107, 108, 126,
+ 0, 111, 112, 113, 114, 115, 116, 4, 237, 238,
+ 239, 70, 126, 4, 95, 293, 61, 127, 128, 129,
+ 101, 10, 126, 10, 123, 12, 13, 14, 109, 74,
+ 8, 9, 310, 311, 75, 50, 51, 52, 53, 4,
+ 81, 82, 29, 30, 31, 4, 33, 276, 427, 278,
+ 429, 111, 330, 331, 32, 540, 334, 111, 137, 138,
+ 114, 7, 111, 112, 113, 114, 55, 56, 57, 58,
+ 59, 60, 123, 351, 107, 62, 63, 64, 65, 25,
+ 111, 70, 311, 114, 313, 31, 73, 414, 111, 112,
+ 77, 7, 79, 71, 112, 113, 325, 176, 177, 328,
+ 111, 111, 111, 114, 114, 4, 102, 385, 386, 25,
+ 100, 4, 124, 342, 343, 31, 103, 104, 105, 106,
+ 107, 108, 121, 111, 111, 111, 355, 114, 115, 116,
+ 17, 109, 112, 4, 21, 4, 115, 24, 125, 117,
+ 118, 125, 103, 104, 105, 106, 70, 108, 14, 95,
+ 111, 112, 113, 114, 100, 116, 102, 107, 125, 125,
+ 111, 111, 125, 109, 114, 115, 14, 125, 125, 125,
+ 539, 117, 118, 451, 111, 108, 433, 434, 121, 95,
+ 121, 100, 122, 111, 100, 70, 102, 126, 126, 4,
+ 126, 126, 126, 109, 423, 126, 474, 126, 123, 4,
+ 123, 117, 118, 481, 124, 123, 71, 436, 437, 70,
+ 4, 107, 441, 4, 4, 4, 445, 125, 4, 70,
+ 70, 119, 125, 452, 453, 125, 10, 456, 457, 10,
+ 459, 107, 107, 462, 107, 22, 125, 103, 104, 105,
+ 106, 125, 108, 472, 473, 111, 112, 113, 114, 123,
+ 116, 10, 530, 125, 10, 103, 104, 105, 106, 99,
+ 108, 70, 475, 111, 112, 113, 114, 121, 116, 121,
+ 103, 104, 105, 106, 107, 108, 121, 22, 111, 508,
+ 509, 114, 511, 116, 513, 42, 22, 516, 22, 518,
+ 121, 48, 49, 4, 4, 4, 22, 54, 55, 56,
+ 57, 58, 59, 60, 123, 126, 126, 4, 125, 66,
+ 67, 68, 69, 34, 35, 36, 37, 38, 39, 40,
+ 41, 125, 43, 44, 45, 46, 47, 103, 104, 105,
+ 106, 107, 108, 22, 22, 111, 112, 113, 114, 115,
+ 116, 4, 4, 126, 126, 12, 122, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 4, 96,
+ 97, 98, 4, 120, 4, 122, 4, 229, 59, 351,
+ 128, 128, 129, 130, 131, 132, 133, 134, 135, 103,
+ 104, 105, 106, 107, 108, 217, 189, 111, 112, 113,
+ 114, 115, 116, 109, 218, 451, 508, 279, 119, 279,
+ 121, 122, 103, 104, 105, 106, 107, 108, 334, 386,
+ 111, 254, 183, 114, 115, 116, 103, 104, 105, 106,
+ 310, 108, 188, 220, 111, 112, 113, 114, -1, 116,
+ 103, 104, 105, 106, -1, 108, -1, -1, 111, 112,
+ 113, 114, -1, 116, 103, 104, 105, 106, -1, 108,
+ -1, -1, 111, 112, 113, 114, -1, 116, 103, 104,
+ 105, 106, -1, 108, -1, -1, 111, 112, 113, 114,
+ -1, 116, 103, 104, 105, 106, -1, 108, -1, -1,
+ 111, 103, 104, 105, 106, 116, 108, -1, -1, 111,
+ 103, 104, 105, 106, 116, 108, -1, -1, 111, 103,
+ 104, 105, 106, 116, 108, -1, -1, -1, -1, -1,
-1, -1, 116
};
@@ -2362,58 +2373,59 @@
{
0, 4, 7, 8, 9, 25, 27, 31, 95, 101,
109, 137, 138, 139, 140, 141, 143, 144, 156, 159,
- 161, 111, 112, 111, 122, 160, 162, 145, 111, 157,
- 4, 0, 139, 4, 70, 4, 123, 253, 254, 4,
- 107, 111, 114, 115, 248, 249, 50, 51, 52, 53,
- 220, 4, 31, 100, 109, 117, 118, 140, 146, 150,
- 151, 158, 159, 209, 210, 211, 111, 123, 103, 104,
- 105, 106, 108, 111, 112, 113, 114, 116, 244, 252,
- 257, 258, 259, 260, 163, 107, 147, 148, 4, 151,
- 102, 14, 30, 76, 152, 153, 211, 4, 135, 84,
- 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- 96, 97, 98, 169, 170, 171, 172, 173, 174, 175,
- 183, 184, 185, 121, 112, 111, 252, 111, 154, 4,
- 115, 258, 124, 124, 124, 124, 124, 124, 124, 4,
- 185, 260, 107, 115, 250, 251, 252, 251, 70, 183,
- 122, 155, 244, 245, 246, 247, 251, 111, 114, 149,
- 107, 111, 50, 51, 52, 53, 107, 111, 122, 176,
- 177, 111, 111, 149, 149, 164, 121, 121, 108, 100,
- 255, 256, 122, 70, 125, 125, 125, 253, 70, 125,
- 125, 125, 125, 125, 165, 149, 149, 123, 257, 253,
- 247, 123, 177, 4, 5, 32, 109, 117, 118, 141,
- 142, 166, 178, 206, 207, 208, 123, 167, 111, 4,
- 4, 71, 208, 1, 209, 212, 168, 220, 70, 4,
- 10, 12, 13, 14, 29, 30, 31, 33, 62, 63,
- 64, 65, 73, 77, 79, 107, 111, 114, 115, 124,
- 146, 179, 194, 196, 202, 204, 216, 221, 225, 227,
- 229, 230, 231, 239, 240, 241, 244, 107, 260, 250,
- 14, 252, 14, 252, 252, 217, 111, 114, 218, 219,
- 231, 244, 226, 4, 4, 4, 245, 222, 124, 4,
- 232, 34, 35, 36, 37, 38, 39, 40, 41, 43,
- 44, 45, 46, 47, 119, 121, 122, 228, 192, 252,
- 10, 55, 56, 57, 58, 59, 60, 70, 242, 243,
- 252, 242, 243, 220, 70, 70, 220, 220, 124, 180,
- 195, 197, 111, 237, 238, 244, 203, 124, 111, 114,
- 244, 249, 14, 111, 114, 115, 126, 127, 128, 223,
- 231, 244, 252, 253, 252, 18, 19, 20, 21, 24,
- 99, 193, 10, 250, 252, 10, 250, 252, 107, 213,
- 214, 244, 244, 107, 107, 238, 187, 198, 199, 22,
- 70, 125, 192, 111, 205, 234, 252, 111, 233, 234,
- 252, 155, 252, 42, 48, 49, 54, 55, 56, 57,
- 58, 59, 60, 66, 67, 68, 69, 120, 122, 127,
- 128, 129, 130, 131, 132, 133, 134, 224, 123, 124,
- 250, 10, 250, 10, 99, 215, 70, 121, 121, 125,
- 11, 83, 182, 188, 4, 15, 78, 200, 4, 16,
- 80, 201, 244, 111, 237, 121, 22, 70, 125, 235,
- 22, 70, 125, 22, 253, 252, 121, 111, 114, 250,
- 250, 214, 260, 260, 234, 252, 75, 81, 82, 186,
- 4, 252, 4, 252, 4, 22, 230, 252, 111, 234,
- 17, 21, 24, 236, 252, 111, 234, 252, 123, 252,
- 125, 125, 4, 252, 252, 111, 244, 181, 211, 235,
- 235, 244, 124, 22, 124, 22, 4, 70, 4, 4,
- 70, 4, 70, 189, 4, 233, 252, 111, 114, 252,
- 252, 252, 252, 29, 61, 74, 190, 125, 125, 125,
- 4, 4, 4, 191, 244, 4, 220, 192, 214
+ 164, 111, 112, 111, 122, 160, 165, 145, 111, 157,
+ 4, 0, 139, 4, 70, 4, 123, 161, 162, 4,
+ 107, 111, 114, 115, 251, 252, 50, 51, 52, 53,
+ 223, 4, 31, 100, 109, 117, 118, 140, 146, 150,
+ 151, 158, 159, 212, 213, 214, 111, 123, 111, 114,
+ 163, 263, 166, 107, 147, 148, 4, 151, 102, 14,
+ 30, 76, 152, 153, 214, 4, 124, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 96, 97,
+ 98, 172, 173, 174, 175, 176, 177, 178, 186, 187,
+ 188, 121, 112, 111, 103, 104, 105, 106, 108, 112,
+ 113, 116, 247, 255, 262, 263, 264, 111, 154, 4,
+ 115, 263, 125, 125, 125, 125, 125, 125, 125, 4,
+ 188, 264, 107, 115, 253, 254, 255, 254, 70, 186,
+ 122, 155, 247, 248, 249, 250, 254, 111, 114, 149,
+ 107, 111, 50, 51, 52, 53, 107, 111, 122, 179,
+ 180, 111, 111, 149, 149, 167, 121, 121, 108, 100,
+ 258, 259, 122, 70, 126, 126, 126, 256, 257, 70,
+ 126, 126, 126, 126, 126, 168, 149, 149, 123, 255,
+ 260, 261, 256, 250, 123, 260, 180, 4, 5, 32,
+ 109, 117, 118, 141, 142, 169, 181, 209, 210, 211,
+ 124, 123, 170, 111, 4, 4, 71, 211, 1, 212,
+ 215, 261, 171, 223, 70, 4, 10, 12, 13, 14,
+ 29, 30, 31, 33, 62, 63, 64, 65, 73, 77,
+ 79, 107, 111, 114, 115, 125, 146, 182, 197, 199,
+ 205, 207, 219, 224, 228, 230, 232, 233, 234, 242,
+ 243, 244, 247, 107, 264, 253, 14, 255, 14, 255,
+ 255, 220, 111, 114, 221, 222, 234, 247, 229, 4,
+ 4, 4, 248, 225, 125, 4, 235, 34, 35, 36,
+ 37, 38, 39, 40, 41, 43, 44, 45, 46, 47,
+ 119, 121, 122, 231, 195, 255, 10, 55, 56, 57,
+ 58, 59, 60, 70, 245, 246, 255, 245, 246, 223,
+ 70, 70, 223, 223, 125, 183, 198, 200, 111, 240,
+ 241, 247, 206, 125, 111, 114, 247, 252, 14, 111,
+ 114, 115, 127, 128, 129, 226, 234, 247, 255, 256,
+ 255, 18, 19, 20, 21, 24, 99, 196, 10, 253,
+ 255, 10, 253, 255, 107, 216, 217, 247, 247, 107,
+ 107, 241, 190, 201, 202, 22, 70, 126, 195, 111,
+ 208, 237, 255, 111, 236, 237, 255, 155, 255, 42,
+ 48, 49, 54, 55, 56, 57, 58, 59, 60, 66,
+ 67, 68, 69, 120, 122, 128, 129, 130, 131, 132,
+ 133, 134, 135, 227, 123, 125, 253, 10, 253, 10,
+ 99, 218, 70, 121, 121, 126, 11, 83, 185, 191,
+ 4, 15, 78, 203, 4, 16, 80, 204, 247, 111,
+ 240, 121, 22, 70, 126, 238, 22, 70, 126, 22,
+ 256, 255, 121, 111, 114, 253, 253, 217, 264, 264,
+ 237, 255, 75, 81, 82, 189, 4, 255, 4, 255,
+ 4, 22, 233, 255, 111, 237, 17, 21, 24, 239,
+ 255, 111, 237, 255, 123, 255, 126, 126, 4, 255,
+ 255, 111, 247, 184, 214, 238, 238, 247, 125, 22,
+ 125, 22, 4, 70, 4, 4, 70, 4, 70, 192,
+ 4, 236, 255, 111, 114, 255, 255, 255, 255, 29,
+ 61, 74, 193, 126, 126, 126, 4, 4, 4, 194,
+ 247, 4, 223, 195, 217
};
#define yyerrok (yyerrstatus = 0)
@@ -2428,9 +2440,18 @@
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -2487,7 +2508,7 @@
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -3238,28 +3259,28 @@
{
case 2:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1163 "compilers/imcc/imcc.y"
{ if (yynerrs) YYABORT; (yyval.i) = 0; }
break;
case 5:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1172 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 6:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1173 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 7:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1175 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
@@ -3270,7 +3291,7 @@
case 8:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1181 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
@@ -3281,42 +3302,42 @@
case 9:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1186 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 10:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1187 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 11:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1188 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 12:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1189 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 13:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1193 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 14:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1195 "compilers/imcc/imcc.y"
{
(yyval.i) = 0;
@@ -3327,7 +3348,7 @@
case 15:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1204 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->line = atoi((yyvsp[(2) - (5)].s));
@@ -3338,7 +3359,7 @@
case 16:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1210 "compilers/imcc/imcc.y"
{
/* set_filename() frees the STRINGC */
@@ -3348,7 +3369,7 @@
case 17:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1218 "compilers/imcc/imcc.y"
{
/* We'll want to store an entry while emitting instructions, so just
@@ -3361,7 +3382,7 @@
case 18:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1230 "compilers/imcc/imcc.y"
{
STRING * const hll_name = Parrot_str_unescape(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
@@ -3376,14 +3397,14 @@
case 19:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1242 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 20:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1243 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
@@ -3394,14 +3415,14 @@
case 21:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1251 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 22:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1252 "compilers/imcc/imcc.y"
{
(yyval.i) = mk_pmc_const(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s));
@@ -3412,14 +3433,14 @@
case 23:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1258 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 24:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1259 "compilers/imcc/imcc.y"
{
(yyval.i) = mk_pmc_const_named(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s));
@@ -3431,49 +3452,49 @@
case 29:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1277 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 30:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1278 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 31:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1279 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 32:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1280 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 33:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1281 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 36:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1286 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
case 37:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1288 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp, IMCC_INFO(interp)->cur_unit,
@@ -3485,7 +3506,7 @@
case 38:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1295 "compilers/imcc/imcc.y"
{
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3495,7 +3516,7 @@
case 39:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1300 "compilers/imcc/imcc.y"
{
(yyval.i) = iSUBROUTINE(interp,
@@ -3508,7 +3529,7 @@
case 40:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1308 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr));
@@ -3517,7 +3538,7 @@
case 41:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1312 "compilers/imcc/imcc.y"
{
char *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
@@ -3535,21 +3556,21 @@
case 42:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1324 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
case 44:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1332 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); }
break;
case 45:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1335 "compilers/imcc/imcc.y"
{
/* if (optimizer_level & OPT_PASM)
@@ -3562,7 +3583,7 @@
case 48:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1351 "compilers/imcc/imcc.y"
{
int re_open = 0;
@@ -3579,42 +3600,77 @@
case 49:
-/* Line 1455 of yacc.c */
-#line 1366 "compilers/imcc/imcc.y"
- {
- (yyval.sr) = (yyvsp[(2) - (3)].sr);
- }
+/* Line 1464 of yacc.c */
+#line 1365 "compilers/imcc/imcc.y"
+ { (yyval.sr) = (yyvsp[(2) - (3)].sr); }
break;
case 50:
-/* Line 1455 of yacc.c */
-#line 1369 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1366 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
case 51:
-/* Line 1455 of yacc.c */
-#line 1374 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1370 "compilers/imcc/imcc.y"
{
- IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB);
+ IMCC_INFO(interp)->nkeys = 0;
}
break;
case 52:
-/* Line 1455 of yacc.c */
-#line 1378 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1374 "compilers/imcc/imcc.y"
{
- iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr));
+ (yyval.sr) = link_keys(interp,
+ IMCC_INFO(interp)->nkeys,
+ IMCC_INFO(interp)->keys, 0);
}
break;
case 53:
-/* Line 1455 of yacc.c */
+/* Line 1464 of yacc.c */
#line 1382 "compilers/imcc/imcc.y"
+ { IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
+ break;
+
+ case 54:
+
+/* Line 1464 of yacc.c */
+#line 1384 "compilers/imcc/imcc.y"
+ {
+ IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
+ (yyval.sr) = IMCC_INFO(interp)->keys[0];
+ }
+ break;
+
+ case 55:
+
+/* Line 1464 of yacc.c */
+#line 1392 "compilers/imcc/imcc.y"
+ {
+ IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB);
+ }
+ break;
+
+ case 56:
+
+/* Line 1464 of yacc.c */
+#line 1396 "compilers/imcc/imcc.y"
+ {
+ iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr));
+ }
+ break;
+
+ case 57:
+
+/* Line 1464 of yacc.c */
+#line 1400 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(5) - (6)].t);
if (!IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid) {
@@ -3624,31 +3680,31 @@
}
break;
- case 54:
+ case 58:
-/* Line 1455 of yacc.c */
-#line 1390 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1408 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
- case 55:
+ case 59:
-/* Line 1455 of yacc.c */
-#line 1394 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1412 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 56:
+ case 60:
-/* Line 1455 of yacc.c */
-#line 1395 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1413 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 57:
+ case 61:
-/* Line 1455 of yacc.c */
-#line 1397 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1415 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call,
@@ -3660,24 +3716,24 @@
}
break;
- case 58:
+ case 62:
-/* Line 1455 of yacc.c */
-#line 1409 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1427 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
- case 59:
+ case 63:
-/* Line 1455 of yacc.c */
-#line 1409 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1427 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(3) - (3)].sr); IMCC_INFO(interp)->is_def = 0; }
break;
- case 60:
+ case 64:
-/* Line 1455 of yacc.c */
-#line 1414 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1432 "compilers/imcc/imcc.y"
{
if ((yyvsp[(3) - (3)].t) & VT_OPT_FLAG && (yyvsp[(1) - (3)].t) != 'I') {
const char *type;
@@ -3699,17 +3755,17 @@
}
break;
- case 61:
+ case 65:
-/* Line 1455 of yacc.c */
-#line 1438 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1456 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 62:
+ case 66:
-/* Line 1455 of yacc.c */
-#line 1443 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1461 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->outer = mk_sub_address_fromc(interp, (yyvsp[(3) - (4)].s));
@@ -3717,10 +3773,10 @@
}
break;
- case 63:
+ case 67:
-/* Line 1455 of yacc.c */
-#line 1449 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1467 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->outer = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3728,10 +3784,10 @@
}
break;
- case 64:
+ case 68:
-/* Line 1455 of yacc.c */
-#line 1458 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1476 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
IMCC_INFO(interp)->cur_unit->vtable_name = NULL;
@@ -3739,10 +3795,10 @@
}
break;
- case 65:
+ case 69:
-/* Line 1455 of yacc.c */
-#line 1464 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1482 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
IMCC_INFO(interp)->cur_unit->vtable_name = (yyvsp[(3) - (4)].s);
@@ -3750,10 +3806,10 @@
}
break;
- case 66:
+ case 70:
-/* Line 1455 of yacc.c */
-#line 1473 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1491 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
IMCC_INFO(interp)->cur_unit->method_name = NULL;
@@ -3761,10 +3817,10 @@
}
break;
- case 67:
+ case 71:
-/* Line 1455 of yacc.c */
-#line 1479 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1497 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
IMCC_INFO(interp)->cur_unit->method_name = (yyvsp[(3) - (4)].s);
@@ -3772,10 +3828,10 @@
}
break;
- case 68:
+ case 72:
-/* Line 1455 of yacc.c */
-#line 1488 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1506 "compilers/imcc/imcc.y"
{
(yyval.t) = P_NSENTRY;
IMCC_INFO(interp)->cur_unit->ns_entry_name = NULL;
@@ -3783,10 +3839,10 @@
}
break;
- case 69:
+ case 73:
-/* Line 1455 of yacc.c */
-#line 1494 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1512 "compilers/imcc/imcc.y"
{
(yyval.t) = P_NSENTRY;
IMCC_INFO(interp)->cur_unit->ns_entry_name = (yyvsp[(3) - (4)].s);
@@ -3794,30 +3850,30 @@
}
break;
- case 70:
+ case 74:
-/* Line 1455 of yacc.c */
-#line 1503 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1521 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->instance_of = (yyvsp[(3) - (4)].s);
}
break;
- case 71:
+ case 75:
-/* Line 1455 of yacc.c */
-#line 1511 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1529 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->subid = NULL;
}
break;
- case 72:
+ case 76:
-/* Line 1455 of yacc.c */
-#line 1516 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1534 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->subid = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3826,67 +3882,67 @@
}
break;
- case 73:
+ case 77:
-/* Line 1455 of yacc.c */
-#line 1526 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1544 "compilers/imcc/imcc.y"
{
add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, NULL);
}
break;
- case 74:
+ case 78:
-/* Line 1455 of yacc.c */
-#line 1530 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1548 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
}
break;
- case 75:
+ case 79:
-/* Line 1455 of yacc.c */
-#line 1535 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1553 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
}
break;
- case 76:
+ case 80:
-/* Line 1455 of yacc.c */
-#line 1542 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1560 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "INTVAL", 'S'); }
break;
- case 77:
+ case 81:
-/* Line 1455 of yacc.c */
-#line 1543 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1561 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); }
break;
- case 78:
+ case 82:
-/* Line 1455 of yacc.c */
-#line 1544 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1562 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "PMC", 'S'); }
break;
- case 79:
+ case 83:
-/* Line 1455 of yacc.c */
-#line 1545 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1563 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "STRING", 'S'); }
break;
- case 80:
+ case 84:
-/* Line 1455 of yacc.c */
-#line 1547 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1565 "compilers/imcc/imcc.y"
{
SymReg *r;
if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3899,10 +3955,10 @@
}
break;
- case 81:
+ case 85:
-/* Line 1455 of yacc.c */
-#line 1558 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1576 "compilers/imcc/imcc.y"
{
SymReg *r;
if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3915,17 +3971,17 @@
}
break;
- case 82:
+ case 86:
-/* Line 1455 of yacc.c */
-#line 1568 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1586 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); }
break;
- case 85:
+ case 89:
-/* Line 1455 of yacc.c */
-#line 1578 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1596 "compilers/imcc/imcc.y"
{
char name[128];
SymReg *r, *r1;
@@ -3949,188 +4005,188 @@
}
break;
- case 86:
+ case 90:
-/* Line 1455 of yacc.c */
-#line 1604 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1622 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
- case 87:
+ case 91:
-/* Line 1455 of yacc.c */
-#line 1608 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1626 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; }
break;
- case 88:
+ case 92:
-/* Line 1455 of yacc.c */
-#line 1609 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1627 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; }
break;
- case 89:
+ case 93:
-/* Line 1455 of yacc.c */
-#line 1613 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1631 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
- case 90:
+ case 94:
-/* Line 1455 of yacc.c */
-#line 1614 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1632 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); }
break;
- case 91:
+ case 95:
-/* Line 1455 of yacc.c */
-#line 1618 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1636 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 93:
+ case 97:
-/* Line 1455 of yacc.c */
-#line 1623 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1641 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (1)].t); }
break;
- case 94:
+ case 98:
-/* Line 1455 of yacc.c */
-#line 1624 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1642 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
- case 95:
+ case 99:
-/* Line 1455 of yacc.c */
-#line 1628 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1646 "compilers/imcc/imcc.y"
{ (yyval.t) = P_LOAD; }
break;
- case 96:
+ case 100:
-/* Line 1455 of yacc.c */
-#line 1629 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1647 "compilers/imcc/imcc.y"
{ (yyval.t) = P_INIT; }
break;
- case 97:
+ case 101:
-/* Line 1455 of yacc.c */
-#line 1630 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1648 "compilers/imcc/imcc.y"
{ (yyval.t) = P_MAIN; }
break;
- case 98:
+ case 102:
-/* Line 1455 of yacc.c */
-#line 1631 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1649 "compilers/imcc/imcc.y"
{ (yyval.t) = P_IMMEDIATE; }
break;
- case 99:
+ case 103:
-/* Line 1455 of yacc.c */
-#line 1632 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1650 "compilers/imcc/imcc.y"
{ (yyval.t) = P_POSTCOMP; }
break;
- case 100:
+ case 104:
-/* Line 1455 of yacc.c */
-#line 1633 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1651 "compilers/imcc/imcc.y"
{ (yyval.t) = P_ANON; }
break;
- case 101:
+ case 105:
-/* Line 1455 of yacc.c */
-#line 1634 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1652 "compilers/imcc/imcc.y"
{ (yyval.t) = P_NEED_LEX; }
break;
- case 109:
+ case 113:
-/* Line 1455 of yacc.c */
-#line 1646 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1664 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
}
break;
- case 110:
+ case 114:
-/* Line 1455 of yacc.c */
-#line 1651 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1669 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
- case 111:
+ case 115:
-/* Line 1455 of yacc.c */
-#line 1655 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1673 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
- case 112:
+ case 116:
-/* Line 1455 of yacc.c */
-#line 1659 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1677 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
- case 113:
+ case 117:
-/* Line 1455 of yacc.c */
-#line 1663 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1681 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (3)].s), 'S'));
}
break;
- case 114:
+ case 118:
-/* Line 1455 of yacc.c */
-#line 1667 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1685 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
}
break;
- case 115:
+ case 119:
-/* Line 1455 of yacc.c */
-#line 1672 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1690 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (5)].s), 'S'));
add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
}
break;
- case 116:
+ case 120:
-/* Line 1455 of yacc.c */
-#line 1680 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1698 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 117:
+ case 121:
-/* Line 1455 of yacc.c */
-#line 1681 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1699 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call,
@@ -4142,48 +4198,48 @@
}
break;
- case 118:
+ case 122:
-/* Line 1455 of yacc.c */
-#line 1693 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1711 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (2)].sr); }
break;
- case 119:
+ case 123:
-/* Line 1455 of yacc.c */
-#line 1698 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1716 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 120:
+ case 124:
-/* Line 1455 of yacc.c */
-#line 1700 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1718 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
- case 121:
+ case 125:
-/* Line 1455 of yacc.c */
-#line 1707 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1725 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
- case 122:
+ case 126:
-/* Line 1455 of yacc.c */
-#line 1708 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1726 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
- case 123:
+ case 127:
-/* Line 1455 of yacc.c */
-#line 1709 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1727 "compilers/imcc/imcc.y"
{
IdList * const l = (yyvsp[(4) - (4)].idlist);
SymReg *ignored;
@@ -4194,227 +4250,227 @@
}
break;
- case 124:
+ case 128:
-/* Line 1455 of yacc.c */
-#line 1720 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1738 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 125:
+ case 129:
-/* Line 1455 of yacc.c */
-#line 1721 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1739 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
- case 126:
+ case 130:
-/* Line 1455 of yacc.c */
-#line 1725 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1743 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
- case 127:
+ case 131:
-/* Line 1455 of yacc.c */
-#line 1726 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1744 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPTIONAL; }
break;
- case 128:
+ case 132:
-/* Line 1455 of yacc.c */
-#line 1727 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1745 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPT_FLAG; }
break;
- case 129:
+ case 133:
-/* Line 1455 of yacc.c */
-#line 1728 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1746 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
- case 130:
+ case 134:
-/* Line 1455 of yacc.c */
-#line 1729 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1747 "compilers/imcc/imcc.y"
{ adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = VT_NAMED; mem_sys_free((yyvsp[(3) - (4)].s)); }
break;
- case 131:
+ case 135:
-/* Line 1455 of yacc.c */
-#line 1730 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1748 "compilers/imcc/imcc.y"
{ adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = VT_NAMED; mem_sys_free((yyvsp[(3) - (4)].s)); }
break;
- case 132:
+ case 136:
-/* Line 1455 of yacc.c */
-#line 1731 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1749 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 133:
+ case 137:
-/* Line 1455 of yacc.c */
-#line 1732 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1750 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_CALL_SIG; }
break;
- case 134:
+ case 138:
-/* Line 1455 of yacc.c */
-#line 1737 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1755 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 0); }
break;
- case 135:
+ case 139:
-/* Line 1455 of yacc.c */
-#line 1739 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1757 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
- case 136:
+ case 140:
-/* Line 1455 of yacc.c */
-#line 1741 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1759 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
(yyval.i) = 0;
}
break;
- case 137:
+ case 141:
-/* Line 1455 of yacc.c */
-#line 1748 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1766 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 1); }
break;
- case 138:
+ case 142:
-/* Line 1455 of yacc.c */
-#line 1750 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1768 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
- case 139:
+ case 143:
-/* Line 1455 of yacc.c */
-#line 1754 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1772 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 140:
+ case 144:
-/* Line 1455 of yacc.c */
-#line 1756 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1774 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
}
break;
- case 141:
+ case 145:
-/* Line 1455 of yacc.c */
-#line 1761 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1779 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
}
break;
- case 142:
+ case 146:
-/* Line 1455 of yacc.c */
-#line 1768 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1786 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 143:
+ case 147:
-/* Line 1455 of yacc.c */
-#line 1770 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1788 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
}
break;
- case 144:
+ case 148:
-/* Line 1455 of yacc.c */
-#line 1775 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1793 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
}
break;
- case 145:
+ case 149:
-/* Line 1455 of yacc.c */
-#line 1782 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1800 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
- case 146:
+ case 150:
-/* Line 1455 of yacc.c */
-#line 1786 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1804 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
- case 147:
+ case 151:
-/* Line 1455 of yacc.c */
-#line 1791 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1809 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->asm_state == AsmDefault)
begin_return_or_yield(interp, (yyvsp[(1) - (2)].t));
}
break;
- case 148:
+ case 152:
-/* Line 1455 of yacc.c */
-#line 1796 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1814 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
(yyval.t) = 0;
}
break;
- case 149:
+ case 153:
-/* Line 1455 of yacc.c */
-#line 1803 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1821 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 150:
+ case 154:
-/* Line 1455 of yacc.c */
-#line 1804 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1822 "compilers/imcc/imcc.y"
{ (yyval.t) = 1; }
break;
- case 151:
+ case 155:
-/* Line 1455 of yacc.c */
-#line 1808 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1826 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 152:
+ case 156:
-/* Line 1455 of yacc.c */
-#line 1810 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1828 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
@@ -4426,20 +4482,20 @@
}
break;
- case 153:
+ case 157:
-/* Line 1455 of yacc.c */
-#line 1820 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1838 "compilers/imcc/imcc.y"
{
SymReg * const name = mk_const(interp, (yyvsp[(1) - (3)].s), 'S');
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(3) - (3)].sr));
}
break;
- case 154:
+ case 158:
-/* Line 1455 of yacc.c */
-#line 1825 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1843 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
@@ -4451,76 +4507,76 @@
}
break;
- case 155:
+ case 159:
-/* Line 1455 of yacc.c */
-#line 1835 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1853 "compilers/imcc/imcc.y"
{
SymReg * const name = mk_const(interp, (yyvsp[(3) - (5)].s), 'S');
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(5) - (5)].sr));
}
break;
- case 158:
+ case 162:
-/* Line 1455 of yacc.c */
-#line 1856 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1874 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
- case 159:
+ case 163:
-/* Line 1455 of yacc.c */
-#line 1861 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1879 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (2)].i); }
break;
- case 160:
+ case 164:
-/* Line 1455 of yacc.c */
-#line 1862 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1880 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 161:
+ case 165:
-/* Line 1455 of yacc.c */
-#line 1863 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1881 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 162:
+ case 166:
-/* Line 1455 of yacc.c */
-#line 1864 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1882 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 163:
+ case 167:
-/* Line 1455 of yacc.c */
-#line 1865 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1883 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 164:
+ case 168:
-/* Line 1455 of yacc.c */
-#line 1866 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1884 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
- case 165:
+ case 169:
-/* Line 1455 of yacc.c */
-#line 1870 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1888 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
- case 169:
+ case 173:
-/* Line 1455 of yacc.c */
-#line 1881 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1899 "compilers/imcc/imcc.y"
{
Instruction * const i = iLABEL(interp, IMCC_INFO(interp)->cur_unit, mk_local_label(interp, (yyvsp[(1) - (1)].s)));
mem_sys_free((yyvsp[(1) - (1)].s));
@@ -4528,17 +4584,17 @@
}
break;
- case 170:
+ case 174:
-/* Line 1455 of yacc.c */
-#line 1891 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1909 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (3)].i); }
break;
- case 171:
+ case 175:
-/* Line 1455 of yacc.c */
-#line 1893 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1911 "compilers/imcc/imcc.y"
{
if (yynerrs >= PARROT_MAX_RECOVER_ERRORS) {
IMCC_warning(interp, "Too many errors. Correct some first.\n");
@@ -4548,10 +4604,10 @@
}
break;
- case 172:
+ case 176:
-/* Line 1455 of yacc.c */
-#line 1904 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1922 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(1) - (1)].idlist);
l->next = NULL;
@@ -4559,10 +4615,10 @@
}
break;
- case 173:
+ case 177:
-/* Line 1455 of yacc.c */
-#line 1911 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1929 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(3) - (3)].idlist);
l->next = (yyvsp[(1) - (3)].idlist);
@@ -4570,10 +4626,10 @@
}
break;
- case 174:
+ case 178:
-/* Line 1455 of yacc.c */
-#line 1920 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1938 "compilers/imcc/imcc.y"
{
IdList* const l = mem_gc_allocate_n_zeroed_typed(interp, 1, IdList);
l->id = (yyvsp[(1) - (2)].s);
@@ -4581,17 +4637,17 @@
}
break;
- case 179:
+ case 183:
-/* Line 1455 of yacc.c */
-#line 1936 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1954 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
- case 180:
+ case 184:
-/* Line 1455 of yacc.c */
-#line 1937 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1955 "compilers/imcc/imcc.y"
{
IdList *l = (yyvsp[(4) - (4)].idlist);
while (l) {
@@ -4606,10 +4662,10 @@
}
break;
- case 181:
+ case 185:
-/* Line 1455 of yacc.c */
-#line 1950 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1968 "compilers/imcc/imcc.y"
{
if ((yyvsp[(4) - (4)].sr)->set != 'P') {
mem_sys_free((yyvsp[(2) - (4)].s));
@@ -4628,10 +4684,10 @@
}
break;
- case 182:
+ case 186:
-/* Line 1455 of yacc.c */
-#line 1967 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1985 "compilers/imcc/imcc.y"
{
if ((yyvsp[(4) - (4)].sr)->set != 'P') {
mem_sys_free((yyvsp[(2) - (4)].s));
@@ -4646,17 +4702,17 @@
}
break;
- case 183:
+ case 187:
-/* Line 1455 of yacc.c */
-#line 1979 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1997 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
- case 184:
+ case 188:
-/* Line 1455 of yacc.c */
-#line 1980 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 1998 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 0);
IMCC_INFO(interp)->is_def = 0;
@@ -4664,17 +4720,17 @@
}
break;
- case 186:
+ case 190:
-/* Line 1455 of yacc.c */
-#line 1987 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2005 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
- case 187:
+ case 191:
-/* Line 1455 of yacc.c */
-#line 1988 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2006 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
IMCC_INFO(interp)->is_def = 0;
@@ -4682,10 +4738,10 @@
}
break;
- case 188:
+ case 192:
-/* Line 1455 of yacc.c */
-#line 1994 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2012 "compilers/imcc/imcc.y"
{
(yyval.i) = NULL;
IMCC_INFO(interp)->cur_call->pcc_sub->tailcall = 1;
@@ -4693,19 +4749,19 @@
}
break;
- case 189:
+ case 193:
-/* Line 1455 of yacc.c */
-#line 2000 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2018 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr));
}
break;
- case 190:
+ case 194:
-/* Line 1455 of yacc.c */
-#line 2004 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2022 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp,
IMCC_INFO(interp)->cur_unit,
@@ -4719,101 +4775,101 @@
}
break;
- case 191:
+ case 195:
-/* Line 1455 of yacc.c */
-#line 2015 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2033 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); }
break;
- case 192:
+ case 196:
-/* Line 1455 of yacc.c */
-#line 2016 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2034 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
- case 193:
+ case 197:
-/* Line 1455 of yacc.c */
-#line 2017 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2035 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 196:
+ case 200:
-/* Line 1455 of yacc.c */
-#line 2020 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2038 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
- case 197:
+ case 201:
-/* Line 1455 of yacc.c */
-#line 2024 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2042 "compilers/imcc/imcc.y"
{ (yyval.t) = 'I'; }
break;
- case 198:
+ case 202:
-/* Line 1455 of yacc.c */
-#line 2025 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2043 "compilers/imcc/imcc.y"
{ (yyval.t) = 'N'; }
break;
- case 199:
+ case 203:
-/* Line 1455 of yacc.c */
-#line 2026 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2044 "compilers/imcc/imcc.y"
{ (yyval.t) = 'S'; }
break;
- case 200:
+ case 204:
-/* Line 1455 of yacc.c */
-#line 2027 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2045 "compilers/imcc/imcc.y"
{ (yyval.t) = 'P'; }
break;
- case 201:
+ case 205:
-/* Line 1455 of yacc.c */
-#line 2032 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2050 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "set", 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); }
break;
- case 202:
+ case 206:
-/* Line 1455 of yacc.c */
-#line 2034 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2052 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (4)].s), 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr)); }
break;
- case 203:
+ case 207:
-/* Line 1455 of yacc.c */
-#line 2036 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2054 "compilers/imcc/imcc.y"
{ (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)); }
break;
- case 204:
+ case 208:
-/* Line 1455 of yacc.c */
-#line 2038 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2056 "compilers/imcc/imcc.y"
{ (yyval.i) = iINDEXFETCH(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(5) - (6)].sr)); }
break;
- case 205:
+ case 209:
-/* Line 1455 of yacc.c */
-#line 2040 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2058 "compilers/imcc/imcc.y"
{ (yyval.i) = iINDEXSET(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(6) - (6)].sr)); }
break;
- case 206:
+ case 210:
-/* Line 1455 of yacc.c */
-#line 2043 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2061 "compilers/imcc/imcc.y"
{
add_pcc_result(interp, (yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
IMCC_INFO(interp)->cur_call = NULL;
@@ -4821,220 +4877,220 @@
}
break;
- case 207:
+ case 211:
-/* Line 1455 of yacc.c */
-#line 2049 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2067 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
}
break;
- case 208:
+ case 212:
-/* Line 1455 of yacc.c */
-#line 2053 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2071 "compilers/imcc/imcc.y"
{
IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr));
IMCC_INFO(interp)->cur_call = NULL;
}
break;
- case 212:
+ case 216:
-/* Line 1455 of yacc.c */
-#line 2061 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2079 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr));
}
break;
- case 213:
+ case 217:
-/* Line 1455 of yacc.c */
-#line 2068 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2086 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"not"; }
break;
- case 214:
+ case 218:
-/* Line 1455 of yacc.c */
-#line 2069 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2087 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bnot"; }
break;
- case 215:
+ case 219:
-/* Line 1455 of yacc.c */
-#line 2070 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2088 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"neg"; }
break;
- case 216:
+ case 220:
-/* Line 1455 of yacc.c */
-#line 2074 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2092 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
- case 217:
+ case 221:
-/* Line 1455 of yacc.c */
-#line 2075 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2093 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
- case 218:
+ case 222:
-/* Line 1455 of yacc.c */
-#line 2076 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2094 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
- case 219:
+ case 223:
-/* Line 1455 of yacc.c */
-#line 2077 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2095 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
- case 220:
+ case 224:
-/* Line 1455 of yacc.c */
-#line 2078 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2096 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
- case 221:
+ case 225:
-/* Line 1455 of yacc.c */
-#line 2079 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2097 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
- case 222:
+ case 226:
-/* Line 1455 of yacc.c */
-#line 2080 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2098 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"pow"; }
break;
- case 223:
+ case 227:
-/* Line 1455 of yacc.c */
-#line 2081 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2099 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
- case 224:
+ case 228:
-/* Line 1455 of yacc.c */
-#line 2082 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2100 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"iseq"; }
break;
- case 225:
+ case 229:
-/* Line 1455 of yacc.c */
-#line 2083 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2101 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isne"; }
break;
- case 226:
+ case 230:
-/* Line 1455 of yacc.c */
-#line 2084 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2102 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isgt"; }
break;
- case 227:
+ case 231:
-/* Line 1455 of yacc.c */
-#line 2085 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2103 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isge"; }
break;
- case 228:
+ case 232:
-/* Line 1455 of yacc.c */
-#line 2086 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2104 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"islt"; }
break;
- case 229:
+ case 233:
-/* Line 1455 of yacc.c */
-#line 2087 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2105 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isle"; }
break;
- case 230:
+ case 234:
-/* Line 1455 of yacc.c */
-#line 2088 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2106 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
- case 231:
+ case 235:
-/* Line 1455 of yacc.c */
-#line 2089 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2107 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
- case 232:
+ case 236:
-/* Line 1455 of yacc.c */
-#line 2090 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2108 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
- case 233:
+ case 237:
-/* Line 1455 of yacc.c */
-#line 2091 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2109 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"and"; }
break;
- case 234:
+ case 238:
-/* Line 1455 of yacc.c */
-#line 2092 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2110 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"or"; }
break;
- case 235:
+ case 239:
-/* Line 1455 of yacc.c */
-#line 2093 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2111 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"xor"; }
break;
- case 236:
+ case 240:
-/* Line 1455 of yacc.c */
-#line 2094 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2112 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
- case 237:
+ case 241:
-/* Line 1455 of yacc.c */
-#line 2095 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2113 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
- case 238:
+ case 242:
-/* Line 1455 of yacc.c */
-#line 2096 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2114 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
- case 239:
+ case 243:
-/* Line 1455 of yacc.c */
-#line 2102 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2120 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
(yyval.i)->type &= ~ITCALL;
@@ -5042,115 +5098,115 @@
}
break;
- case 240:
+ case 244:
-/* Line 1455 of yacc.c */
-#line 2107 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2125 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 241:
+ case 245:
-/* Line 1455 of yacc.c */
-#line 2114 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2132 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(2) - (3)].s), 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); }
break;
- case 242:
+ case 246:
-/* Line 1455 of yacc.c */
-#line 2118 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2136 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
- case 243:
+ case 247:
-/* Line 1455 of yacc.c */
-#line 2119 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2137 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
- case 244:
+ case 248:
-/* Line 1455 of yacc.c */
-#line 2120 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2138 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
- case 245:
+ case 249:
-/* Line 1455 of yacc.c */
-#line 2121 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2139 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
- case 246:
+ case 250:
-/* Line 1455 of yacc.c */
-#line 2122 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2140 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
- case 247:
+ case 251:
-/* Line 1455 of yacc.c */
-#line 2123 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2141 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
- case 248:
+ case 252:
-/* Line 1455 of yacc.c */
-#line 2124 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2142 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
- case 249:
+ case 253:
-/* Line 1455 of yacc.c */
-#line 2125 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2143 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
- case 250:
+ case 254:
-/* Line 1455 of yacc.c */
-#line 2126 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2144 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
- case 251:
+ case 255:
-/* Line 1455 of yacc.c */
-#line 2127 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2145 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
- case 252:
+ case 256:
-/* Line 1455 of yacc.c */
-#line 2128 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2146 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
- case 253:
+ case 257:
-/* Line 1455 of yacc.c */
-#line 2129 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2147 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
- case 254:
+ case 258:
-/* Line 1455 of yacc.c */
-#line 2130 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2148 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
- case 255:
+ case 259:
-/* Line 1455 of yacc.c */
-#line 2136 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2154 "compilers/imcc/imcc.y"
{
(yyval.i) = func_ins(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (4)].sr), (yyvsp[(3) - (4)].s),
IMCC_INFO(interp) -> regs,
@@ -5160,31 +5216,31 @@
}
break;
- case 256:
+ case 260:
-/* Line 1455 of yacc.c */
-#line 2146 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2164 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 257:
+ case 261:
-/* Line 1455 of yacc.c */
-#line 2147 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2165 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 258:
+ case 262:
-/* Line 1455 of yacc.c */
-#line 2148 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2166 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 259:
+ case 263:
-/* Line 1455 of yacc.c */
-#line 2150 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2168 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
if ((yyvsp[(1) - (1)].sr)->set != 'P')
@@ -5192,10 +5248,10 @@
}
break;
- case 260:
+ case 264:
-/* Line 1455 of yacc.c */
-#line 2156 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2174 "compilers/imcc/imcc.y"
{
/* disallow bareword method names; SREG name constants are fine */
const char * const name = (yyvsp[(3) - (3)].sr)->name;
@@ -5211,10 +5267,10 @@
}
break;
- case 261:
+ case 265:
-/* Line 1455 of yacc.c */
-#line 2170 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2188 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
(yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'U');
@@ -5222,10 +5278,10 @@
}
break;
- case 262:
+ case 266:
-/* Line 1455 of yacc.c */
-#line 2176 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2194 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
(yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'S');
@@ -5233,41 +5289,41 @@
}
break;
- case 263:
+ case 267:
-/* Line 1455 of yacc.c */
-#line 2181 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2199 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); }
break;
- case 264:
+ case 268:
-/* Line 1455 of yacc.c */
-#line 2187 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2205 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr));
}
break;
- case 265:
+ case 269:
-/* Line 1455 of yacc.c */
-#line 2191 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2209 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (5)].i); }
break;
- case 266:
+ case 270:
-/* Line 1455 of yacc.c */
-#line 2195 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2213 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 267:
+ case 271:
-/* Line 1455 of yacc.c */
-#line 2197 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2215 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5279,10 +5335,10 @@
}
break;
- case 268:
+ case 272:
-/* Line 1455 of yacc.c */
-#line 2207 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2225 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5294,10 +5350,10 @@
}
break;
- case 269:
+ case 273:
-/* Line 1455 of yacc.c */
-#line 2217 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2235 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
@@ -5306,20 +5362,20 @@
}
break;
- case 270:
+ case 274:
-/* Line 1455 of yacc.c */
-#line 2224 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2242 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg_var(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));
}
break;
- case 271:
+ case 275:
-/* Line 1455 of yacc.c */
-#line 2229 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2247 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
@@ -5328,73 +5384,73 @@
}
break;
- case 272:
+ case 276:
-/* Line 1455 of yacc.c */
-#line 2238 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2256 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
- case 273:
+ case 277:
-/* Line 1455 of yacc.c */
-#line 2242 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2260 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 274:
+ case 278:
-/* Line 1455 of yacc.c */
-#line 2243 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2261 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
- case 275:
+ case 279:
-/* Line 1455 of yacc.c */
-#line 2247 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2265 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
- case 276:
+ case 280:
-/* Line 1455 of yacc.c */
-#line 2248 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2266 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
- case 277:
+ case 281:
-/* Line 1455 of yacc.c */
-#line 2249 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2267 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_CALL_SIG; }
break;
- case 278:
+ case 282:
-/* Line 1455 of yacc.c */
-#line 2252 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2270 "compilers/imcc/imcc.y"
{ adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
break;
- case 279:
+ case 283:
-/* Line 1455 of yacc.c */
-#line 2253 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2271 "compilers/imcc/imcc.y"
{ adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
break;
- case 280:
+ case 284:
-/* Line 1455 of yacc.c */
-#line 2257 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2275 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
- case 281:
+ case 285:
-/* Line 1455 of yacc.c */
-#line 2262 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2280 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5406,10 +5462,10 @@
}
break;
- case 282:
+ case 286:
-/* Line 1455 of yacc.c */
-#line 2272 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2290 "compilers/imcc/imcc.y"
{
add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call,
mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr));
@@ -5417,10 +5473,10 @@
}
break;
- case 283:
+ case 287:
-/* Line 1455 of yacc.c */
-#line 2278 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2296 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5432,179 +5488,179 @@
}
break;
- case 284:
+ case 288:
-/* Line 1455 of yacc.c */
-#line 2288 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2306 "compilers/imcc/imcc.y"
{
add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(1) - (3)].s), 'S'), (yyvsp[(3) - (3)].sr));
mem_sys_free((yyvsp[(1) - (3)].s));
}
break;
- case 285:
+ case 289:
-/* Line 1455 of yacc.c */
-#line 2292 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2310 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 286:
+ case 290:
-/* Line 1455 of yacc.c */
-#line 2296 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2314 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
- case 287:
+ case 291:
-/* Line 1455 of yacc.c */
-#line 2297 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2315 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
- case 288:
+ case 292:
-/* Line 1455 of yacc.c */
-#line 2302 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2320 "compilers/imcc/imcc.y"
{
(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));
}
break;
- case 289:
+ case 293:
-/* Line 1455 of yacc.c */
-#line 2306 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2324 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
}
break;
- case 290:
+ case 294:
-/* Line 1455 of yacc.c */
-#line 2310 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2328 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
}
break;
- case 291:
+ case 295:
-/* Line 1455 of yacc.c */
-#line 2317 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2335 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
}
break;
- case 292:
+ case 296:
-/* Line 1455 of yacc.c */
-#line 2321 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2339 "compilers/imcc/imcc.y"
{
(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));
}
break;
- case 293:
+ case 297:
-/* Line 1455 of yacc.c */
-#line 2325 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2343 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
}
break;
- case 294:
+ case 298:
-/* Line 1455 of yacc.c */
-#line 2331 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2349 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 295:
+ case 299:
-/* Line 1455 of yacc.c */
-#line 2332 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2350 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 296:
+ case 300:
-/* Line 1455 of yacc.c */
-#line 2336 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2354 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"eq"; }
break;
- case 297:
+ case 301:
-/* Line 1455 of yacc.c */
-#line 2337 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2355 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ne"; }
break;
- case 298:
+ case 302:
-/* Line 1455 of yacc.c */
-#line 2338 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2356 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"gt"; }
break;
- case 299:
+ case 303:
-/* Line 1455 of yacc.c */
-#line 2339 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2357 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ge"; }
break;
- case 300:
+ case 304:
-/* Line 1455 of yacc.c */
-#line 2340 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2358 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lt"; }
break;
- case 301:
+ case 305:
-/* Line 1455 of yacc.c */
-#line 2341 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2359 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"le"; }
break;
- case 304:
+ case 308:
-/* Line 1455 of yacc.c */
-#line 2350 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2368 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
- case 305:
+ case 309:
-/* Line 1455 of yacc.c */
-#line 2351 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2369 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (1)].sr); }
break;
- case 306:
+ case 310:
-/* Line 1455 of yacc.c */
-#line 2355 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2373 "compilers/imcc/imcc.y"
{ (yyval.sr) = IMCC_INFO(interp)->regs[0]; }
break;
- case 308:
+ case 312:
-/* Line 1455 of yacc.c */
-#line 2360 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2378 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); }
break;
- case 309:
+ case 313:
-/* Line 1455 of yacc.c */
-#line 2362 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2380 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (4)].sr);
IMCC_INFO(interp) -> keyvec |= KEY_BIT(IMCC_INFO(interp)->nargs);
@@ -5613,71 +5669,71 @@
}
break;
- case 310:
+ case 314:
-/* Line 1455 of yacc.c */
-#line 2369 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2387 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr);
(yyval.sr) = (yyvsp[(2) - (3)].sr);
}
break;
- case 312:
+ case 316:
-/* Line 1455 of yacc.c */
-#line 2376 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2394 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 313:
+ case 317:
-/* Line 1455 of yacc.c */
-#line 2377 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2395 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 314:
+ case 318:
-/* Line 1455 of yacc.c */
-#line 2381 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2399 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 315:
+ case 319:
-/* Line 1455 of yacc.c */
-#line 2382 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2400 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 316:
+ case 320:
-/* Line 1455 of yacc.c */
-#line 2386 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2404 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 317:
+ case 321:
-/* Line 1455 of yacc.c */
-#line 2387 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2405 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 322:
+ case 326:
-/* Line 1455 of yacc.c */
-#line 2401 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2419 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
- case 323:
+ case 327:
-/* Line 1455 of yacc.c */
-#line 2405 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2423 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -5685,19 +5741,19 @@
}
break;
- case 324:
+ case 328:
-/* Line 1455 of yacc.c */
-#line 2413 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2431 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
- case 325:
+ case 329:
-/* Line 1455 of yacc.c */
-#line 2417 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2435 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -5705,99 +5761,106 @@
}
break;
- case 326:
+ case 330:
-/* Line 1455 of yacc.c */
-#line 2425 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2443 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
break;
- case 327:
+ case 331:
-/* Line 1455 of yacc.c */
-#line 2427 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2445 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
(yyval.sr) = IMCC_INFO(interp)->keys[0];
}
break;
- case 328:
+ case 332:
-/* Line 1455 of yacc.c */
-#line 2435 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2453 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
}
break;
- case 329:
+ case 333:
-/* Line 1455 of yacc.c */
-#line 2441 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2459 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); }
break;
- case 330:
+ case 334:
-/* Line 1455 of yacc.c */
-#line 2442 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2460 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); }
break;
- case 331:
+ case 335:
-/* Line 1455 of yacc.c */
-#line 2443 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2461 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); }
break;
- case 332:
+ case 336:
-/* Line 1455 of yacc.c */
-#line 2444 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2462 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); }
break;
- case 333:
+ case 337:
-/* Line 1455 of yacc.c */
-#line 2445 "compilers/imcc/imcc.y"
+/* Line 1464 of yacc.c */
+#line 2463 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 334:
+ case 338:
-/* Line 1455 of yacc.c */
-#line 2449 "compilers/imcc/imcc.y"
- { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); }
+/* Line 1464 of yacc.c */
+#line 2467 "compilers/imcc/imcc.y"
+ { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 335:
+ case 339:
-/* Line 1455 of yacc.c */
-#line 2450 "compilers/imcc/imcc.y"
- { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); }
+/* Line 1464 of yacc.c */
+#line 2468 "compilers/imcc/imcc.y"
+ { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 336:
+ case 340:
-/* Line 1455 of yacc.c */
-#line 2451 "compilers/imcc/imcc.y"
- { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); }
+/* Line 1464 of yacc.c */
+#line 2472 "compilers/imcc/imcc.y"
+ { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 337:
+ case 341:
-/* Line 1455 of yacc.c */
-#line 2452 "compilers/imcc/imcc.y"
- { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); }
+/* Line 1464 of yacc.c */
+#line 2473 "compilers/imcc/imcc.y"
+ { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); }
+ break;
+
+ case 342:
+
+/* Line 1464 of yacc.c */
+#line 2474 "compilers/imcc/imcc.y"
+ { (yyval.sr) = (yyvsp[(1) - (1)].sr); }
break;
-/* Line 1455 of yacc.c */
-#line 5790 "compilers/imcc/imcparser.c"
+/* Line 1464 of yacc.c */
+#line 5853 "compilers/imcc/imcparser.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -6008,8 +6071,8 @@
-/* Line 1675 of yacc.c */
-#line 2458 "compilers/imcc/imcc.y"
+/* Line 1684 of yacc.c */
+#line 2480 "compilers/imcc/imcc.y"
/* I need this prototype somewhere... */
Modified: branches/codestring/compilers/imcc/imcparser.h
==============================================================================
--- branches/codestring/compilers/imcc/imcparser.h Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/imcparser.h Tue May 11 23:17:48 2010 (r46524)
@@ -9,13 +9,12 @@
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.4.2. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -295,7 +294,7 @@
typedef union YYSTYPE
{
-/* Line 1676 of yacc.c */
+/* Line 1685 of yacc.c */
#line 1068 "compilers/imcc/imcc.y"
IdList * idlist;
@@ -306,8 +305,8 @@
-/* Line 1676 of yacc.c */
-#line 300 "compilers/imcc/imcparser.h"
+/* Line 1685 of yacc.c */
+#line 299 "compilers/imcc/imcparser.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
Modified: branches/codestring/compilers/imcc/instructions.c
==============================================================================
--- branches/codestring/compilers/imcc/instructions.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/instructions.c Tue May 11 23:17:48 2010 (r46524)
@@ -602,10 +602,6 @@
int i;
int len;
-#if IMC_TRACE
- Parrot_io_eprintf(NULL, "ins_print\n");
-#endif
-
/* comments, labels and such */
if (!ins->symregs[0] || !strchr(ins->format, '%'))
return Parrot_io_fprintf(interp, io, "%s", ins->format);
@@ -775,9 +771,7 @@
ARGIN(const Instruction *ins))
{
ASSERT_ARGS(e_file_emit)
-#if IMC_TRACE
- Parrot_io_eprintf(NULL, "e_file_emit\n");
-#endif
+
if ((ins->type & ITLABEL) || ! *ins->opname)
ins_print(interp, Parrot_io_STDOUT(interp), ins);
else {
Modified: branches/codestring/compilers/imcc/main.c
==============================================================================
--- branches/codestring/compilers/imcc/main.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/main.c Tue May 11 23:17:48 2010 (r46524)
@@ -611,7 +611,7 @@
ASSERT_ARGS(compile_to_bytecode)
PackFile *pf;
yyscan_t yyscanner = IMCC_INFO(interp)->yyscanner;
- const int per_pbc = (STATE_WRITE_PBC(interp) | STATE_RUN_PBC(interp)) !=0;
+ const int per_pbc = STATE_WRITE_PBC(interp) || STATE_RUN_PBC(interp);
const int opt_level = IMCC_INFO(interp)->optimizer_level;
/* Shouldn't be more than five, but five extra is cheap */
@@ -634,14 +634,8 @@
IMCC_INFO(interp)->state->pasm_file = STATE_PASM_FILE(interp) ? 1 : 0;
- IMCC_TRY(IMCC_INFO(interp)->jump_buf,
- IMCC_INFO(interp)->error_code) {
- if (yyparse(yyscanner, interp))
- exit(EXIT_FAILURE);
-
- imc_compile_all_units(interp);
- }
- IMCC_CATCH(IMCC_FATAL_EXCEPTION) {
+ imcc_run_compilation(interp, yyscanner);
+ if (IMCC_INFO(interp)->error_code) {
char * const error_str = Parrot_str_to_cstring(interp,
IMCC_INFO(interp)->error_message);
@@ -651,17 +645,6 @@
Parrot_str_free_cstring(error_str);
Parrot_exit(interp, IMCC_FATAL_EXCEPTION);
}
- IMCC_CATCH(IMCC_FATALY_EXCEPTION) {
- char * const error_str = Parrot_str_to_cstring(interp,
- IMCC_INFO(interp)->error_message);
-
- IMCC_INFO(interp)->error_code=IMCC_FATALY_EXCEPTION;
- fprintf(stderr, "error:imcc:%s", error_str);
- IMCC_print_inc(interp);
- Parrot_str_free_cstring(error_str);
- Parrot_exit(interp, IMCC_FATALY_EXCEPTION);
- }
- IMCC_END_TRY;
imc_cleanup(interp, yyscanner);
Modified: branches/codestring/compilers/imcc/parser.h
==============================================================================
--- branches/codestring/compilers/imcc/parser.h Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/parser.h Tue May 11 23:17:48 2010 (r46524)
@@ -21,6 +21,8 @@
typedef void* yyscan_t;
#endif
+typedef struct yyguts_t yyguts_t;
+
void set_filename(PARROT_INTERP, char * const filename);
SymReg * macro(PARROT_INTERP, char *name);
@@ -42,6 +44,7 @@
extern void compile_file(PARROT_INTERP, FILE *file, void *);
extern void compile_string(PARROT_INTERP, const char *, void *);
+extern void imcc_run_compilation(PARROT_INTERP, void *);
int at_eof(yyscan_t yyscanner);
Modified: branches/codestring/compilers/imcc/parser_util.c
==============================================================================
--- branches/codestring/compilers/imcc/parser_util.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/parser_util.c Tue May 11 23:17:48 2010 (r46524)
@@ -142,10 +142,6 @@
Obviously the registers must be examined before returning the correct
opcode.
-NOTE: All this nasty IMC_TRACE is for tracking down equally nasty bugs, so
-if you don't like the looks of it, stay out, but please don't remove it. :)
--Mel
-
=cut
*/
@@ -157,29 +153,18 @@
int i;
const size_t namelen = strlen(name);
-#if IMC_TRACE_HIGH
- const char * const full = dest;
- Parrot_io_eprintf(NULL, "op %s", name);
-#endif
-
memcpy(dest, name, namelen+1);
dest += namelen;
for (i = 0; i < narg && args[i]; i++) {
*dest++ = '_';
if (args[i]->type == VTADDRESS) {
-#if IMC_TRACE_HIGH
- Parrot_io_eprintf(NULL, " (address)%s", args[i]->name);
-#endif
*dest++ = 'i';
*dest++ = 'c';
continue;
}
/* if one ever wants num keys, they go with 'S' */
if (keyvec & KEY_BIT(i)) {
-#if IMC_TRACE_HIGH
- Parrot_io_eprintf(NULL, " (key)%s", args[i]->name);
-#endif
*dest++ = 'k';
if (args[i]->set=='S' || args[i]->set=='N' || args[i]->set=='K') {
*dest++ = 'c';
@@ -195,22 +180,10 @@
*dest++ = (char)tolower((unsigned char)args[i]->set);
if (args[i]->type & (VTCONST|VT_CONSTP)) {
-#if IMC_TRACE_HIGH
- Parrot_io_eprintf(NULL, " (%cc)%s",
- tolower((unsigned char)args[i]->set), args[i]->name);
-#endif
*dest++ = 'c';
}
-#if IMC_TRACE_HIGH
- else
- Parrot_io_eprintf(NULL, " (%c)%s",
- tolower((unsigned char)args[i]->set), args[i]->name);
-#endif
}
*dest = '\0';
-#if IMC_TRACE_HIGH
- Parrot_io_eprintf(NULL, " -> %s\n", full);
-#endif
}
/*
@@ -868,10 +841,6 @@
IMCC_fatal(interp, EXCEPTION_EXTERNAL_ERROR,
"imcc_compile_file: couldn't open '%s'\n", fullname);
-#if IMC_TRACE
- fprintf(stderr, "parser_util.c: imcc_compile_file '%s'\n", fullname);
-#endif
-
IMCC_INFO(interp)->cur_namespace = NULL;
interp->code = NULL;
Modified: branches/codestring/compilers/imcc/pbc.c
==============================================================================
--- branches/codestring/compilers/imcc/pbc.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/pbc.c Tue May 11 23:17:48 2010 (r46524)
@@ -2150,10 +2150,6 @@
int ok = 0;
int op, i;
-#if IMC_TRACE_HIGH
- Parrot_io_eprintf(NULL, "e_pbc_emit\n");
-#endif
-
/* first instruction, do initialisation ... */
if (ins == unit->instructions) {
size_t ins_size;
@@ -2190,12 +2186,6 @@
/* if item is a PCC_SUB entry then store it constants */
if (ins->symregs[0] && ins->symregs[0]->pcc_sub) {
-
-#if IMC_TRACE
- Parrot_io_eprintf(NULL, "pbc.c: e_pbc_emit (pcc_sub=%s)\n",
- ins->symregs[0]->name);
-#endif
-
add_const_pmc_sub(interp, ins->symregs[0], oldsize,
oldsize + code_size);
}
@@ -2262,10 +2252,6 @@
op_info_t *op_info;
opcode_t last_label = 1;
-#if IMC_TRACE_HIGH
- Parrot_io_eprintf(NULL, "emit_pbc: op [%d %s]\n", ins->opnum, ins->opname);
-#endif
-
if ((ins->type & ITBRANCH)
&& ((addr = get_branch_reg(ins)) != NULL)
&& !REG_NEEDS_ALLOC(addr)) {
Modified: branches/codestring/compilers/imcc/reg_alloc.c
==============================================================================
--- branches/codestring/compilers/imcc/reg_alloc.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/reg_alloc.c Tue May 11 23:17:48 2010 (r46524)
@@ -169,14 +169,6 @@
IMCC_INFO(interp)->allocated = 0;
-#if IMC_TRACE
- fprintf(stderr, "reg_alloc.c: imc_reg_alloc\n");
- if (unit->instructions->r[1] && unit->instructions->r[1]->pcc_sub) {
- fprintf(stderr, "img_reg_alloc: pcc_sub (nargs = %d)\n",
- unit->instructions->r[1]->pcc_sub->nargs);
- }
-#endif
-
if (unit->instructions->symreg_count)
function = unit->instructions->symregs[0]->name;
else
@@ -245,9 +237,6 @@
free_reglist(ARGMOD(IMC_Unit *unit))
{
ASSERT_ARGS(free_reglist)
-#if IMC_TRACE
- fprintf(stderr, "reg_alloc.c: free_reglist\n");
-#endif
if (unit->reglist) {
mem_sys_free(unit->reglist);
Modified: branches/codestring/compilers/imcc/sets.c
==============================================================================
--- branches/codestring/compilers/imcc/sets.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/sets.c Tue May 11 23:17:48 2010 (r46524)
@@ -26,12 +26,6 @@
/* HEADERIZER HFILE: compilers/imcc/sets.h */
-/* XXX */
-#define fatal(e, s1, s2) do { \
- fprintf(stderr, "%s: %s", (s1), (s2)); \
- exit(e); \
-} while (0)
-
#define NUM_BYTES(length) (((length) / 8) + 1)
#define BYTE_IN_SET(element) ((element) >> 3)
#define BIT_IN_BYTE(element) (1 << ((element) & 7))
@@ -156,8 +150,6 @@
Compares two sets for equality; sets are equal if they contain the same
elements.
-Raises a fatal error if the two Sets have different lengths.
-
=cut
*/
@@ -169,8 +161,7 @@
int mask;
const size_t bytes = s1->length / 8;
- if (s1->length != s2->length)
- fatal(1, "set_equal", "Sets don't have the same length\n");
+ PARROT_ASSERT(s1->length == s2->length);
if (bytes)
if (memcmp(s1->bmp, s2->bmp, bytes) != 0)
@@ -290,8 +281,6 @@
Computes the union of the two Set arguments, returning it as a new Set.
-Raises a fatal error if the two Sets have different lengths.
-
=cut
*/
@@ -305,8 +294,7 @@
unsigned int i;
Set * const s = set_make(interp, s1->length);
- if (s1->length != s2->length)
- fatal(1, "set_union", "Sets don't have the same length\n");
+ PARROT_ASSERT(s1->length == s2->length);
for (i = 0; i < BYTE_IN_SET(s1->length); i++) {
s->bmp[i] = s1->bmp[i] | s2->bmp[i];
@@ -323,8 +311,6 @@
Creates a new Set object that is the intersection of the Set arguments (defined
through the binary C<and> operator.)
-Raises a fatal error if the two Sets have different lengths.
-
=cut
*/
@@ -338,8 +324,7 @@
unsigned int i;
Set * const s = set_make(interp, s1->length);
- if (s1->length != s2->length)
- fatal(1, "set_intersec", "Sets don't have the same length\n");
+ PARROT_ASSERT(s1->length == s2->length);
for (i = 0; i < BYTE_IN_SET(s1->length); i++) {
s->bmp[i] = s1->bmp[i] & s2->bmp[i];
@@ -366,8 +351,7 @@
ASSERT_ARGS(set_intersec_inplace)
unsigned int i;
- if (s1->length != s2->length)
- fatal(1, "set_intersec_inplace", "Sets don't have the same length\n");
+ PARROT_ASSERT(s1->length == s2->length);
for (i = 0; i < BYTE_IN_SET(s1->length); i++) {
s1->bmp[i] &= s2->bmp[i];
Modified: branches/codestring/compilers/imcc/symreg.c
==============================================================================
--- branches/codestring/compilers/imcc/symreg.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/symreg.c Tue May 11 23:17:48 2010 (r46524)
@@ -1390,9 +1390,6 @@
{
ASSERT_ARGS(_store_symreg)
const int i = hash_str(r->name) % hsh->size;
-#if IMC_TRACE_HIGH
- printf(" store [%s]\n", r->name);
-#endif
r->next = hsh->data[i];
hsh->data[i] = r;
@@ -1441,9 +1438,6 @@
const unsigned int i = hash_str(name) % hsh->size;
for (p = hsh->data[i]; p; p = p->next) {
-#if IMC_TRACE_HIGH
- printf(" [%s]\n", p->name);
-#endif
if (STREQ(name, p->name))
return p;
}
@@ -1581,32 +1575,6 @@
/*
-=item C<void debug_dump_sym_hash(const SymHash *hsh)>
-
-Prints all identifiers in the specified hash table to stderr.
-
-=cut
-
-*/
-
-void
-debug_dump_sym_hash(ARGIN(const SymHash *hsh))
-{
- ASSERT_ARGS(debug_dump_sym_hash)
- unsigned int i;
-
- for (i = 0; i < hsh->size; i++) {
- const SymReg *p = hsh->data[i];
- while (p) {
- fprintf(stderr, "%s ", p->name);
- p = p->next;
- }
- }
-}
-
-
-/*
-
=item C<void clear_locals(IMC_Unit *unit)>
Deletes all local symbols and clears life info from the given IMC_Unit.
Modified: branches/codestring/compilers/imcc/symreg.h
==============================================================================
--- branches/codestring/compilers/imcc/symreg.h Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/compilers/imcc/symreg.h Tue May 11 23:17:48 2010 (r46524)
@@ -183,9 +183,6 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*hash);
-void debug_dump_sym_hash(ARGIN(const SymHash *hsh))
- __attribute__nonnull__(1);
-
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
SymReg * dup_sym(PARROT_INTERP, ARGIN(const SymReg *r))
@@ -359,8 +356,6 @@
#define ASSERT_ARGS_create_symhash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(hash))
-#define ASSERT_ARGS_debug_dump_sym_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(hsh))
#define ASSERT_ARGS_dup_sym __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(r))
Modified: branches/codestring/config/gen/makefiles/root.in
==============================================================================
--- branches/codestring/config/gen/makefiles/root.in Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/config/gen/makefiles/root.in Tue May 11 23:17:48 2010 (r46524)
@@ -1445,7 +1445,7 @@
$(PARROT_H_HEADERS)
src/embed$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/embed.h \
- src/embed.c \
+ src/embed.c src/embed.str \
$(INC_DIR)/oplib/ops.h $(INC_DIR)/runcore_api.h \
compilers/imcc/imc.h \
compilers/imcc/cfg.h \
@@ -1532,11 +1532,14 @@
# core_ops depends upon config.h so that it gets updated along with
# updates to config.h's version numbers
src/ops/core_ops$(O) : src/ops/core_ops.c \
- include/pmc/pmc_callcontext.h \
+ $(PARROT_H_HEADERS) \
+ include/parrot/dynext.h \
+ include/parrot/embed.h \
+ include/parrot/oplib/core_ops.h \
+ include/parrot/runcore_api.h \
include/pmc/pmc_continuation.h \
include/pmc/pmc_parrotlibrary.h \
- src/io/io_private.h $(INC_DIR)/dynext.h $(INC_DIR)/embed.h \
- $(INC_DIR)/oplib/core_ops.h $(INC_DIR)/runcore_api.h
+ src/io/io_private.h
# .h files are built along with .c
$(INC_DIR)/oplib/core_ops.h: src/ops/core_ops.c
Modified: branches/codestring/include/parrot/string_funcs.h
==============================================================================
--- branches/codestring/include/parrot/string_funcs.h Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/include/parrot/string_funcs.h Tue May 11 23:17:48 2010 (r46524)
@@ -373,6 +373,17 @@
__attribute__nonnull__(2);
PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+STRING * Parrot_str_unescape_string(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ ARGIN(const CHARSET *charset),
+ ARGIN(const ENCODING *encoding))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ __attribute__nonnull__(4);
+
+PARROT_EXPORT
void Parrot_str_unpin(PARROT_INTERP, ARGMOD(STRING *s))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
@@ -593,6 +604,11 @@
#define ASSERT_ARGS_Parrot_str_unescape __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(cstring))
+#define ASSERT_ARGS_Parrot_str_unescape_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src) \
+ , PARROT_ASSERT_ARG(charset) \
+ , PARROT_ASSERT_ARG(encoding))
#define ASSERT_ARGS_Parrot_str_unpin __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(s))
Modified: branches/codestring/lib/Parrot/OpTrans/C.pm
==============================================================================
--- branches/codestring/lib/Parrot/OpTrans/C.pm Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/lib/Parrot/OpTrans/C.pm Tue May 11 23:17:48 2010 (r46524)
@@ -42,7 +42,6 @@
sub defines {
my $type = __PACKAGE__;
return <<END;
-#include "pmc/pmc_callcontext.h"
/* defines - $0 -> $type */
#undef CONST
Modified: branches/codestring/lib/Parrot/Pmc2c/Method.pm
==============================================================================
--- branches/codestring/lib/Parrot/Pmc2c/Method.pm Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/lib/Parrot/Pmc2c/Method.pm Tue May 11 23:17:48 2010 (r46524)
@@ -192,6 +192,7 @@
}
else {
$result_decl = "$return_type result;";
+ $result_decl = "$return_type result = PMCNULL;" if $return_type_char eq 'P';
$args .= ', &result';
$sig .= $return_type_char;
$return_stmt = "return ($return_type) result;";
Modified: branches/codestring/lib/Parrot/Pmc2c/PMC/Object.pm
==============================================================================
--- branches/codestring/lib/Parrot/Pmc2c/PMC/Object.pm Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/lib/Parrot/Pmc2c/PMC/Object.pm Tue May 11 23:17:48 2010 (r46524)
@@ -1,6 +1,6 @@
package Parrot::Pmc2c::PMC::Object;
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
use base 'Parrot::Pmc2c::PMC';
@@ -55,31 +55,35 @@
Parrot_Object_attributes * const obj = PARROT_OBJECT(_self);
Parrot_Class_attributes * const _class = PARROT_CLASS(obj->_class);
STRING * const meth_name = CONST_STRING_GEN(interp, "$vt_method_name");
-
- /* Walk and search for the vtable. */
+EOC
+ # Walk and search for the vtable.
+ $method_body_text .= <<"EOC";
const int num_classes = VTABLE_elements(interp, _class->all_parents);
int i;
for (i = 0; i < num_classes; i++) {
- /* Get the class. */
+EOC
+ # Get the class.
+ $method_body_text .= <<"EOC";
PMC * const cur_class = VTABLE_get_pmc_keyed_int(interp, _class->all_parents, i);
-
PMC * const meth = Parrot_oo_find_vtable_override_for_class(interp, cur_class, meth_name);
if (!PMC_IS_NULL(meth)) {
- $pcc_result_decl
+EOC
+ $method_body_text .= " $pcc_result_decl\n" if $pcc_result_decl ne '';
+ $method_body_text .= <<"EOC";
Parrot_pcc_invoke_sub_from_c_args(interp, meth, "Pi$pcc_sig", _self$pcc_args);
$pcc_return_stmt
}
- /* method name is $vt_method_name */
EOC
# Multiply dispatched math opcodes shouldn't be invoked on a proxy object.
unless ($self->vtable_method_does_multi($vt_method_name)) {
$method_body_text .= <<"EOC";
if (cur_class->vtable->base_type == enum_class_PMCProxy) {
- /* Get the PMC instance and call the vtable on that. */
+EOC
+ # Get the PMC instance and call the vtable on that.
+ $method_body_text .= <<"EOC";
STRING * const proxy = CONST_STRING_GEN(interp, "proxy");
PMC * const del_object = VTABLE_get_attr_str(interp, SELF, proxy);
-
if (!PMC_IS_NULL(del_object)) {
${return}VTABLE_$vt_method_name(interp, del_object$args);
$void_return
Modified: branches/codestring/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/codestring/lib/Parrot/Pmc2c/PMCEmitter.pm Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/lib/Parrot/Pmc2c/PMCEmitter.pm Tue May 11 23:17:48 2010 (r46524)
@@ -76,8 +76,8 @@
$self->gen_includes;
# The PCC code needs Continuation-related macros from these headers.
- $c->emit("#include \"pmc/pmc_continuation.h\"\n");
- $c->emit("#include \"pmc/pmc_callcontext.h\"\n");
+ $c->emit("#include \"pmc_continuation.h\"\n");
+ $c->emit("#include \"pmc_callcontext.h\"\n");
$c->emit( $self->preamble );
@@ -91,7 +91,7 @@
$ro->gen_methods;
}
- $c->emit("#include \"pmc/pmc_default.h\"\n");
+ $c->emit("#include \"pmc_default.h\"\n");
$c->emit( $self->update_vtable_func );
$c->emit( $self->get_vtable_func );
Modified: branches/codestring/runtime/parrot/include/test_more.pir
==============================================================================
--- branches/codestring/runtime/parrot/include/test_more.pir Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/runtime/parrot/include/test_more.pir Tue May 11 23:17:48 2010 (r46524)
@@ -20,7 +20,7 @@
.local pmc exports, curr_namespace, test_namespace
curr_namespace = get_namespace
test_namespace = get_root_namespace [ 'parrot'; 'Test'; 'More' ]
- exports = split ' ', 'plan diag ok nok is is_deeply is_null like substring isa_ok skip isnt todo throws_like lives_ok dies_ok throws_substring'
+ exports = split ' ', 'plan diag ok nok is is_deeply is_null like substring isa_ok skip isnt todo throws_like lives_ok dies_ok throws_substring done_testing'
test_namespace.'export_to'(curr_namespace, exports)
Modified: branches/codestring/runtime/parrot/library/Test/Builder.pir
==============================================================================
--- branches/codestring/runtime/parrot/library/Test/Builder.pir Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/runtime/parrot/library/Test/Builder.pir Tue May 11 23:17:48 2010 (r46524)
@@ -312,6 +312,38 @@
.return()
.end
+=item done_testing
+
+=cut
+
+.sub 'done_testing' :method
+ .param string tests :optional
+ .param int has_tests :opt_flag
+
+ .local pmc testplan
+ testplan = self.'testplan'()
+
+ unless has_tests goto write_footer
+
+ .local int num_tests
+ num_tests = tests
+ unless num_tests goto write_footer
+
+ testplan.'set_tests'( num_tests )
+
+ write_footer:
+ .local pmc output
+ output = self.'output'()
+
+ $S0 = testplan.'header'()
+ output.'write'( $S0 )
+
+ $I0 = self.'results'()
+ $S0 = testplan.'footer'( $I0 )
+ output.'write'( $S0 )
+
+.end
+
=item C<diag( diagnostic_message, ... )>
Records a diagnostic message for output.
Modified: branches/codestring/runtime/parrot/library/Test/More.pir
==============================================================================
--- branches/codestring/runtime/parrot/library/Test/More.pir Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/runtime/parrot/library/Test/More.pir Tue May 11 23:17:48 2010 (r46524)
@@ -92,6 +92,29 @@
test.'plan'( tests )
.end
+=item C<done_testing( number_of_tests? )>
+
+If you don't know how many tests you're going to run, you can issue
+the plan when you're done running tests.
+
+C<number_of_tests> is the same as plan(), it's the number of tests
+you expected to run. You can omit this, in which case the number
+of tests you ran doesn't matter, just the fact that your tests ran
+to conclusion.
+
+This is safer than and replaces the "no_plan" plan.
+
+=cut
+
+.sub done_testing
+ .param string tests :optional
+ .param int has_tests :opt_flag
+
+ .local pmc test
+ get_hll_global test, [ 'Test'; 'More' ], '_test'
+ test.'done_testing'( tests )
+.end
+
=item C<ok( passed, description )>
Records a test as pass or fail depending on the truth of the PMC C<passed>,
Modified: branches/codestring/src/dynoplibs/Rules.in
==============================================================================
--- branches/codestring/src/dynoplibs/Rules.in Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/src/dynoplibs/Rules.in Tue May 11 23:17:48 2010 (r46524)
@@ -7,7 +7,9 @@
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
-src/dynoplibs/obscure_ops$(O): include/pmc/pmc_parrotlibrary.h include/pmc/pmc_callcontext.h src/dynoplibs/obscure_ops.c $(PARROT_H_HEADERS)
+src/dynoplibs/obscure_ops$(O): include/pmc/pmc_parrotlibrary.h \
+ src/dynoplibs/obscure_ops.c $(PARROT_H_HEADERS) \
+ include/parrot/runcore_api.h src/dynoplibs/obscure_ops.h
src/dynoplibs/obscure_ops.h: src/dynoplibs/obscure_ops.c
@@ -22,7 +24,9 @@
src/dynoplibs/math_ops.c: src/dynoplibs/math.ops $(BUILD_TOOLS_DIR)/ops2c.pl
$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --dynamic src/dynoplibs/math.ops
-src/dynoplibs/math_ops$(O): include/pmc/pmc_parrotlibrary.h include/pmc/pmc_callcontext.h src/dynoplibs/math_ops.c $(PARROT_H_HEADERS)
+src/dynoplibs/math_ops$(O): include/pmc/pmc_parrotlibrary.h \
+ src/dynoplibs/math_ops.c $(PARROT_H_HEADERS) \
+ include/parrot/runcore_api.h src/dynoplibs/math_ops.h
src/dynoplibs/math_ops.h: src/dynoplibs/math_ops.c
Modified: branches/codestring/src/dynpmc/Rules.in
==============================================================================
--- branches/codestring/src/dynpmc/Rules.in Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/src/dynpmc/Rules.in Tue May 11 23:17:48 2010 (r46524)
@@ -6,7 +6,9 @@
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
-src/dynpmc/dynlexpad$(O): src/dynpmc/dynlexpad.c $(DYNPMC_H_FILES)
+src/dynpmc/pmc_dynlexpad.h : src/dynpmc/dynlexpad.c
+
+src/dynpmc/dynlexpad$(O): src/dynpmc/dynlexpad.c $(DYNPMC_H_FILES) src/dynpmc/pmc_dynlexpad.h
src/dynpmc/dynlexpad.c: src/dynpmc/dynlexpad.dump
$(PMC2CC) src/dynpmc/dynlexpad.pmc
@@ -21,7 +23,9 @@
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
-src/dynpmc/file$(O): src/dynpmc/file.c $(DYNPMC_H_FILES)
+src/dynpmc/pmc_file.h : src/dynpmc/file.c
+
+src/dynpmc/file$(O): src/dynpmc/file.c $(DYNPMC_H_FILES) src/dynpmc/pmc_file.h include/pmc/pmc_fixedintegerarray.h
src/dynpmc/file.c: src/dynpmc/file.dump
$(PMC2CC) src/dynpmc/file.pmc
@@ -43,7 +47,10 @@
$(MV) foo_group.c src/dynpmc/foo_group.c
$(MV) foo_group.h src/dynpmc/foo_group.h
-src/dynpmc/foo$(O): src/dynpmc/foo.c $(DYNPMC_H_FILES)
+src/dynpmc/pmc_foo.h : src/dynpmc/foo.c
+
+src/dynpmc/foo$(O): src/dynpmc/foo.c $(DYNPMC_H_FILES) src/dynpmc/pmc_foo.h \
+ include/pmc/pmc_integer.h include/pmc/pmc_scalar.h
src/dynpmc/foo.c: src/dynpmc/foo.dump
$(PMC2CC) src/dynpmc/foo.pmc
@@ -51,7 +58,10 @@
src/dynpmc/foo.dump: src/dynpmc/foo.pmc vtable.dump $(CLASS_O_FILES)
$(PMC2CD) src/dynpmc/foo.pmc
-src/dynpmc/foo2$(O): src/dynpmc/foo2.c $(DYNPMC_H_FILES)
+src/dynpmc/pmc_foo2.h : src/dynpmc/foo2.c
+
+src/dynpmc/foo2$(O): src/dynpmc/foo2.c $(DYNPMC_H_FILES) src/dynpmc/pmc_foo2.h \
+ include/pmc/pmc_integer.h include/pmc/pmc_scalar.h src/dynpmc/pmc_foo.h
src/dynpmc/foo2.c: src/dynpmc/foo2.dump src/dynpmc/foo.pmc
$(PMC2CC) src/dynpmc/foo2.pmc
@@ -66,7 +76,10 @@
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
-src/dynpmc/gziphandle$(O): src/dynpmc/gziphandle.c $(DYNPMC_H_FILES)
+src/dynpmc/pmc_gziphandle.h : src/dynpmc/gziphandle.c
+
+src/dynpmc/gziphandle$(O): src/dynpmc/gziphandle.c $(DYNPMC_H_FILES) \
+ src/dynpmc/pmc_gziphandle.h include/pmc/pmc_fixedintegerarray.h
src/dynpmc/gziphandle.c: src/dynpmc/gziphandle.dump
$(PMC2CC) src/dynpmc/gziphandle.pmc
@@ -81,7 +94,10 @@
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
-src/dynpmc/os$(O): src/dynpmc/os.c $(DYNPMC_H_FILES)
+src/dynpmc/pmc_os.h : src/dynpmc/os.c
+
+src/dynpmc/os$(O): src/dynpmc/os.c $(DYNPMC_H_FILES) src/dynpmc/pmc_os.h \
+ include/pmc/pmc_fixedintegerarray.h
src/dynpmc/os.c: src/dynpmc/os.dump
$(PMC2CC) src/dynpmc/os.pmc
@@ -95,7 +111,10 @@
$(LD) @ld_out@$(DYNEXT_DIR)/pccmethod_test$(LOAD_EXT) src/dynpmc/pccmethod_test$(O) $(LINKARGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
-src/dynpmc/pccmethod_test$(O): src/dynpmc/pccmethod_test.c $(DYNPMC_H_FILES)
+src/dynpmc/pmc_pccmethod_test.h : src/dynpmc/pccmethod_test.c
+
+src/dynpmc/pccmethod_test$(O): src/dynpmc/pccmethod_test.c $(DYNPMC_H_FILES) \
+ src/dynpmc/pmc_pccmethod_test.h include/pmc/pmc_fixedintegerarray.h
src/dynpmc/pccmethod_test.c: src/dynpmc/pccmethod_test.dump
$(PMC2CC) src/dynpmc/pccmethod_test.pmc
@@ -110,7 +129,11 @@
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
-src/dynpmc/rotest$(O): src/dynpmc/rotest.c $(DYNPMC_H_FILES)
+src/dynpmc/pmc_rotest.h : src/dynpmc/rotest.c
+
+src/dynpmc/rotest$(O): src/dynpmc/rotest.c $(DYNPMC_H_FILES) \
+ src/dynpmc/pmc_rotest.h include/pmc/pmc_fixedintegerarray.h \
+ include/pmc/pmc_integer.h include/pmc/pmc_scalar.h
src/dynpmc/rotest.c: src/dynpmc/rotest.dump
$(PMC2CC) src/dynpmc/rotest.pmc
@@ -125,7 +148,10 @@
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
-src/dynpmc/rational$(O): src/dynpmc/rational.c $(DYNPMC_H_FILES)
+src/dynpmc/pmc_rational.h : src/dynpmc/rational.c
+
+src/dynpmc/rational$(O): src/dynpmc/rational.c $(DYNPMC_H_FILES) \
+ src/dynpmc/pmc_rational.h include/pmc/pmc_fixedintegerarray.h
src/dynpmc/rational.c: src/dynpmc/rational.dump
$(PMC2CC) src/dynpmc/rational.pmc
@@ -140,7 +166,10 @@
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
-src/dynpmc/subproxy$(O): src/dynpmc/subproxy.c $(DYNPMC_H_FILES)
+src/dynpmc/pmc_subproxy.h : src/dynpmc/subproxy.c
+
+src/dynpmc/subproxy$(O): src/dynpmc/subproxy.c $(DYNPMC_H_FILES) \
+ src/dynpmc/pmc_subproxy.h include/pmc/pmc_sub.h
src/dynpmc/subproxy.c: src/dynpmc/subproxy.dump
$(PMC2CC) src/dynpmc/subproxy.pmc
Modified: branches/codestring/src/pmc/object.pmc
==============================================================================
--- branches/codestring/src/pmc/object.pmc Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/src/pmc/object.pmc Tue May 11 23:17:48 2010 (r46524)
@@ -515,7 +515,6 @@
return result;
}
- /* method name is get_integer */
if (cur_class->vtable->base_type == enum_class_PMCProxy) {
/* Get the PMC instance and call the vtable function on that. */
STRING * const proxy = CONST_STRING(INTERP, "proxy");
@@ -818,14 +817,20 @@
/*
+=item C<void freeze(PMC *info)>
+
=item C<void thaw(PMC *info)>
-Used to unarchive the object.
+Realias magically generated methods so they don't wreak havoc.
=cut
*/
+ VTABLE void freeze(PMC *info) {
+ return;
+ }
+
VTABLE void thaw(PMC *info) {
return;
}
Modified: branches/codestring/src/pmc/string.pmc
==============================================================================
--- branches/codestring/src/pmc/string.pmc Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/src/pmc/string.pmc Tue May 11 23:17:48 2010 (r46524)
@@ -911,6 +911,29 @@
res = CHARSET_RINDEX(INTERP, src, substring, (UINTVAL)start);
RETURN(INTVAL res);
}
+
+/*
+
+=item C<STRING *unescape()>
+
+EXPERIMENTAL, for testing only. See TT #1628
+
+=cut
+
+*/
+
+ METHOD unescape(STRING *charsetname, STRING *encodingname)
+ {
+ const CHARSET *charset = Parrot_get_charset(INTERP,
+ Parrot_charset_number(INTERP, charsetname));
+ const ENCODING *encoding = Parrot_get_encoding(INTERP,
+ Parrot_encoding_number(INTERP, encodingname));
+ STRING * const src = VTABLE_get_string(INTERP, SELF);
+ STRING * const dest = Parrot_str_unescape_string(INTERP, src,
+ charset, encoding);
+ RETURN(STRING *dest);
+ }
+
}
/*
Modified: branches/codestring/src/string/api.c
==============================================================================
--- branches/codestring/src/string/api.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/src/string/api.c Tue May 11 23:17:48 2010 (r46524)
@@ -55,10 +55,17 @@
__attribute__nonnull__(4)
FUNC_MODIFIES(*e);
+PARROT_DOES_NOT_RETURN
+PARROT_COLD
+static void throw_illegal_escape(PARROT_INTERP)
+ __attribute__nonnull__(1);
+
#define ASSERT_ARGS_string_rep_compatible __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(a) \
, PARROT_ASSERT_ARG(b) \
, PARROT_ASSERT_ARG(e))
+#define ASSERT_ARGS_throw_illegal_escape __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -2494,6 +2501,175 @@
return result;
}
+/*
+
+=item C<static void throw_illegal_escape(PARROT_INTERP)>
+
+Helper function to avoid repeated throw calls.
+
+=cut
+
+*/
+
+PARROT_DOES_NOT_RETURN
+PARROT_COLD
+static void
+throw_illegal_escape(PARROT_INTERP)
+{
+ ASSERT_ARGS(throw_illegal_escape)
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
+ "Illegal escape sequence");
+}
+
+/*
+
+=item C<STRING * Parrot_str_unescape_string(PARROT_INTERP, const STRING *src,
+const CHARSET *charset, const ENCODING *encoding)>
+
+EXPERIMENTAL, see TT #1628
+
+Unescapes the src string returnning a new string with the charset
+and encoding specified.
+
+
+=cut
+
+*/
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+STRING *
+Parrot_str_unescape_string(PARROT_INTERP, ARGIN(const STRING *src),
+ ARGIN(const CHARSET *charset),
+ ARGIN(const ENCODING *encoding))
+{
+ ASSERT_ARGS(Parrot_str_unescape_string)
+
+ UINTVAL srclen = Parrot_str_byte_length(interp, src);
+ STRING *result = Parrot_gc_new_string_header(interp, 0);
+ String_iter itersrc;
+ String_iter iterdest;
+ UINTVAL reserved;
+ int digcount;
+ char digbuf[9];
+ int pending;
+
+ result->charset = charset;
+ result->encoding = encoding;
+ reserved = string_max_bytes(interp, result, srclen);
+ Parrot_gc_allocate_string_storage(interp, result, reserved);
+ result->bufused = reserved;
+
+ src->encoding->iter_init(interp, src, &itersrc);
+ encoding->iter_init(interp, result, &iterdest);
+ while (itersrc.bytepos < srclen) {
+ INTVAL c = itersrc.get_and_advance(interp, &itersrc);
+ INTVAL next;
+
+ do {
+ pending = 0;
+ next = c;
+ if (c == '\\') {
+ c = itersrc.get_and_advance(interp, &itersrc);
+ switch (c) {
+ /* Common one char sequences */
+ case 'a': next = '\a'; break;
+ case 'b': next = '\b'; break;
+ case 't': next = '\t'; break;
+ case 'n': next = '\n'; break;
+ case 'v': next = '\v'; break;
+ case 'f': next = '\f'; break;
+ case 'r': next = '\r'; break;
+ case 'e': next = '\e'; break;
+ /* Escape character */
+ case 'c':
+ c = itersrc.get_and_advance(interp, &itersrc);
+ /* This assumes ascii-alike encoding */
+ if (c < 'A' || c > 'Z')
+ throw_illegal_escape(interp);
+ next = c - 'A' + 1;
+ break;
+ case 'x':
+ digcount = 0;
+ c = itersrc.get_and_advance(interp, &itersrc);
+ if (c == '{') {
+ /* \x{h..h} 1..8 hex digits */
+ while (itersrc.bytepos < srclen) {
+ c = itersrc.get_and_advance(interp, &itersrc);
+ if (c == '}')
+ break;
+ if (!isxdigit(c))
+ throw_illegal_escape(interp);
+ if (digcount == 8)
+ break;
+ digbuf[digcount++] = c;
+ }
+ if (c != '}')
+ throw_illegal_escape(interp);
+ }
+ else {
+ /* \xhh 1..2 hex digits */
+ for (digcount = 0; digcount < 2; ++digcount) {
+ if (!isxdigit(c))
+ break;
+ digbuf[digcount] = c;
+ c = itersrc.get_and_advance(interp, &itersrc);
+ }
+ pending = 1;
+ }
+ if (digcount == 0)
+ throw_illegal_escape(interp);
+ digbuf[digcount] = '\0';
+ next = strtol(digbuf, NULL, 16);
+ break;
+ case 'u':
+ /* \uhhhh 4 hex digits */
+ for (digcount = 0; digcount < 4; ++digcount) {
+ c = itersrc.get_and_advance(interp, &itersrc);
+ if (!isxdigit(c))
+ throw_illegal_escape(interp);
+ digbuf[digcount] = c;
+ }
+ digbuf[digcount] = '\0';
+ next = strtol(digbuf, NULL, 16);
+ break;
+ case 'U':
+ /* \Uhhhhhhhh 8 hex digits */
+ for (digcount = 0; digcount < 8; ++digcount) {
+ c = itersrc.get_and_advance(interp, &itersrc);
+ if (!isxdigit(c))
+ throw_illegal_escape(interp);
+ digbuf[digcount] = c;
+ }
+ digbuf[digcount] = '\0';
+ next = strtol(digbuf, NULL, 16);
+ break;
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ /* \ooo 1..3 oct digits */
+ digbuf[0] = c;
+ for (digcount = 1; digcount < 3; ++digcount) {
+ c = itersrc.get_and_advance(interp, &itersrc);
+ if (c < '0' || c > '7')
+ break;
+ digbuf[digcount] = c;
+ }
+ digbuf[digcount] = '\0';
+ next = strtol(digbuf, NULL, 8);
+ if (digcount < 3)
+ pending = 1;
+ break;
+ default:
+ next = c;
+ }
+ }
+ iterdest.set_and_advance(interp, &iterdest, next);
+ } while (pending);
+ }
+ result->bufused = iterdest.bytepos;
+ result->strlen = iterdest.charpos;
+ return result;
+}
/*
Modified: branches/codestring/src/string/charset/ascii.c
==============================================================================
--- branches/codestring/src/string/charset/ascii.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/src/string/charset/ascii.c Tue May 11 23:17:48 2010 (r46524)
@@ -649,9 +649,10 @@
ASSERT_ARGS(validate)
INTVAL offset;
String_iter iter;
+ const INTVAL length = Parrot_str_length(interp, src);
ENCODING_ITER_INIT(interp, src, &iter);
- for (offset = 0; offset < Parrot_str_length(interp, src); ++offset) {
+ for (offset = 0; offset < length; ++offset) {
const UINTVAL codepoint = iter.get_and_advance(interp, &iter);
if (codepoint >= 0x80)
return 0;
Modified: branches/codestring/src/string/charset/iso-8859-1.c
==============================================================================
--- branches/codestring/src/string/charset/iso-8859-1.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/src/string/charset/iso-8859-1.c Tue May 11 23:17:48 2010 (r46524)
@@ -526,8 +526,9 @@
{
ASSERT_ARGS(validate)
INTVAL offset;
+ const INTVAL length = Parrot_str_length(interp, src);
- for (offset = 0; offset < Parrot_str_length(interp, src); ++offset) {
+ for (offset = 0; offset < length; ++offset) {
const UINTVAL codepoint = ENCODING_GET_CODEPOINT(interp, src, offset);
if (codepoint >= 0x100)
return 0;
Modified: branches/codestring/src/string/charset/unicode.c
==============================================================================
--- branches/codestring/src/string/charset/unicode.c Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/src/string/charset/unicode.c Tue May 11 23:17:48 2010 (r46524)
@@ -718,9 +718,10 @@
ASSERT_ARGS(validate)
INTVAL offset;
String_iter iter;
+ const INTVAL length = Parrot_str_length(interp, src);
ENCODING_ITER_INIT(interp, src, &iter);
- for (offset = 0; offset < Parrot_str_length(interp, src); ++offset) {
+ for (offset = 0; offset < length; ++offset) {
const UINTVAL codepoint = iter.get_and_advance(interp, &iter);
/* Check for Unicode non-characters */
if (codepoint >= 0xfdd0
Modified: branches/codestring/t/compilers/imcc/syn/objects.t
==============================================================================
--- branches/codestring/t/compilers/imcc/syn/objects.t Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/t/compilers/imcc/syn/objects.t Tue May 11 23:17:48 2010 (r46524)
@@ -28,11 +28,22 @@
.namespace ["Foo"]
.namespace [ ]
.namespace []
+.namespace [unicode:"»ö«"; ascii:"perl6"]
.sub test
$I0 = 42
.end
CODE
+ # TODO (waiting on TT #1610)
+# throws_substring( '.namespace [$P0]', syn_err, <<'DESC', todo => 'TT #1610' )
+# invalid namespace declarations (register)
+# DESC
+# throws_substring( '.namespace [1]', syn_err, <<'DESC', todo => 'TT #1610' )
+# invalid namespace declarations (integer)
+# DESC
+# throws_substring( '.namespace [1.2]', syn_err, <<'DESC', todo => 'TT #1610' )
+# invalid namespace declarations (float)
+# DESC
.end
##############################
Copied: branches/codestring/t/library/test_builder_done_testing.t (from r46523, trunk/t/library/test_builder_done_testing.t)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/codestring/t/library/test_builder_done_testing.t Tue May 11 23:17:48 2010 (r46524, copy of r46523, trunk/t/library/test_builder_done_testing.t)
@@ -0,0 +1,53 @@
+#!./parrot
+# Copyright (C) 2005-2008, Parrot Foundation.
+# $Id$
+
+.sub _main :main
+ load_bytecode 'Test/Builder/Tester.pbc'
+
+ .local pmc tb_args
+ tb_args = new 'Hash'
+
+ .local pmc test
+ test = new [ 'Test'; 'Builder' ], tb_args
+
+ .local pmc plan
+ .local pmc test_pass
+ .local pmc test_fail
+ .local pmc test_out
+ .local pmc test_diag
+ .local pmc test_test
+ plan = get_global [ 'Test'; 'Builder'; 'Tester' ], 'plan'
+ test_pass = get_global [ 'Test'; 'Builder'; 'Tester' ], 'test_pass'
+ test_fail = get_global [ 'Test'; 'Builder'; 'Tester' ], 'test_fail'
+ test_out = get_global [ 'Test'; 'Builder'; 'Tester' ], 'test_out'
+ test_diag = get_global [ 'Test'; 'Builder'; 'Tester' ], 'test_diag'
+ test_test = get_global [ 'Test'; 'Builder'; 'Tester' ], 'test_test'
+
+ plan( 4 )
+
+ test_out( 'ok 1 - hi' )
+ test.'ok'( 1, 'hi' )
+ test_test( 'passing test')
+
+ test_out( 'not ok 2 - bye' )
+ test.'ok'( 0, 'bye' )
+ test_test( 'failing test')
+
+ test_out( "\n1..2" )
+ test.'done_testing'()
+ test_test( 'Simple done_testing works' )
+
+ test_out( "1..3" )
+ test_out( "Expected 3 but ran 2" )
+ test.'done_testing'(3)
+ test_test( 'done_testing with bad plan works' )
+
+ test.'finish'()
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/codestring/t/oo/vtableoverride.t
==============================================================================
--- branches/codestring/t/oo/vtableoverride.t Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/t/oo/vtableoverride.t Tue May 11 23:17:48 2010 (r46524)
@@ -18,13 +18,14 @@
.sub main :main
.include 'test_more.pir'
- plan(14)
+ plan(15)
newclass_tests()
subclass_tests()
vtable_implies_self_tests()
anon_vtable_tests()
invalid_vtable()
+ get_pmc_keyed_int_Null()
.end
.sub invalid_vtable
@@ -114,6 +115,13 @@
pop_eh
.end
+.sub 'get_pmc_keyed_int_Null'
+ $P0 = newclass [ 'NoReturn_get_pmc_keyed_int' ]
+ $P1 = new $P0
+ $P2 = $P1[0]
+ $I0 = isnull $P2
+ ok($I0, "Override get_pmc_keyed_int without .return")
+.end
.namespace [ 'MyObject' ]
@@ -206,6 +214,13 @@
.end
+.namespace [ 'NoReturn_get_pmc_keyed_int' ]
+
+.sub 'get_pmc_keyed_int' :vtable
+ .param int i
+ # No .return
+.end
+
# Local Variables:
# mode: pir
# fill-column: 100
Modified: branches/codestring/tools/dev/checkdepend.pl
==============================================================================
--- branches/codestring/tools/dev/checkdepend.pl Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/tools/dev/checkdepend.pl Tue May 11 23:17:48 2010 (r46524)
@@ -49,7 +49,7 @@
foreach my $file (sort grep /\.[hc]$/, @incfiles) {
# For now, skip any files that have generated dependencies
- next if $file =~ m{src/(ops|dynoplibs|pmc)/};
+ next if $file =~ m{src/pmc/};
next if $file =~ m{src/string/(charset|encoding)/};
open my $fh, '<', $file;
@@ -68,22 +68,25 @@
$deps{$file} = [ ];
foreach my $include (@includes) {
- # same dir as file?
- my $file_dir = (File::Spec->splitpath($file))[1];
- my $make_dep = collapse_path(File::Spec->catfile($file_dir, $include));
- if (defined($make_dep) && -f $make_dep) {
- push @{$deps{$file}}, $make_dep;
- next;
- }
+ my $found;
- # global 'include' dir?
- $make_dep = collapse_path(File::Spec->catfile('include', $include));
- if (defined($make_dep) && -f $make_dep) {
- push @{$deps{$file}}, $make_dep;
- next;
+ my @include_dirs;
+ push @include_dirs, (File::Spec->splitpath($file))[1];
+ push @include_dirs, 'include';
+ push @include_dirs, 'include/pmc';
+
+ for my $path (@include_dirs) {
+ next if $found;
+
+ my $make_dep = collapse_path(File::Spec->catfile($path, $include));
+ if (defined($make_dep) && -f $make_dep) {
+ push @{$deps{$file}}, $make_dep;
+ $found = 1;
+ }
}
- diag "couldn't find $include, included from $file";
+ diag "couldn't find $include, included from $file"
+ unless $found;
}
# always require an explicit .o -> .c dep. This is lazy and not always
# needed. However, missing it when it is needed causes pain.
Modified: branches/codestring/tools/dev/mk_language_shell.pl
==============================================================================
--- branches/codestring/tools/dev/mk_language_shell.pl Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/tools/dev/mk_language_shell.pl Tue May 11 23:17:48 2010 (r46524)
@@ -218,6 +218,7 @@
.local pmc config
config = get_config()
$I0 = config['revision']
+ unless $I0 goto L1
unless reqsvn > $I0 goto L1
$S1 = "Parrot revision r"
$S0 = reqsvn
Modified: branches/codestring/tools/docs/filename_and_chapter.pl
==============================================================================
--- branches/codestring/tools/docs/filename_and_chapter.pl Tue May 11 22:36:11 2010 (r46523)
+++ branches/codestring/tools/docs/filename_and_chapter.pl Tue May 11 23:17:48 2010 (r46524)
@@ -3,8 +3,8 @@
# $Id$
#
# perl script that writes modified POD files to the directory
-# 'build/modified_pod'. Then this script generates a latex file from
-# this POD.
+# 'build/modified_pod'. Then this script writes the latex file
+# 'build/parrot-book.tex' by generating chapters from the little modified POD.
#
use strict;
@@ -16,6 +16,7 @@
my $item_list_ref = [ ['intro.pod', 'Introduction to Parrot'],
['overview.pod', 'Overview'],
['submissions.pod', 'Submitting bug reports and patches'],
+ ['running.pod', 'Parrot\'s command line options'],
];
my $lang = @$item_list_ref - 1;
@@ -64,21 +65,25 @@
sub write_mod {
- my $icnt;
+ my $upper_bound = 6;
open( my $IN_FH, '<', $item_list_ref->[$_[0]][0] ) or
die "$0: can't open $item_list_ref->[$_[0]][0] for reading ($!)\n";
open( my $OUT_FH, '>', "${MOD_BUILD_PATH}$item_list_ref->[$_[0]][0]" ) or
die "$0: can't open ${MOD_BUILD_PATH}$item_list_ref->[$_[0]][0]: $!\n";
+ # change the upper bound for the file running.pod
+ $upper_bound = 14 if $_[0] == 3;
+
# do the same as: sed -e '4,6c\=head0 $item_list_ref->[$i][1]'
while( <$IN_FH> ) {
- if ( $icnt = (4..6) ) {
- if ( $icnt =~ /E0$/ ) {
- print $OUT_FH "=head0 $item_list_ref->[$_[0]][1]\n";
- }
+ if ( ($. < 4) || ($. > $upper_bound) ) {
+ print $OUT_FH $_
+ }
+ else {
+ print $OUT_FH "=head0 $item_list_ref->[$_[0]][1]\n"
+ if $. == $upper_bound;
}
- else { print $OUT_FH $_ }
}
}
More information about the parrot-commits
mailing list