diff --git a/DEPRECATED.pod b/DEPRECATED.pod index 4f41e2402a..4d951249ec 100644 --- a/DEPRECATED.pod +++ b/DEPRECATED.pod @@ -3,7 +3,7 @@ =head1 Deprecation in Parrot This is a list of currently deprecated features of Parrot. Every deprecation -has an associated RT ticket. Each item indicates the last release it's +has an associated RT or TT ticket. Each item indicates the last release it's guaranteed to appear in. When deprecated items are removed, all usage of the feature in the @@ -35,17 +35,19 @@ See RT #47011. =over 4 -=item * C [post 0.5.0] +=item * C math opcode variants [post 0.7.1] -See RT #48016. Replace usage with set_[hll,root]_global variants. +See RT #58410. -=item * C [post 0.5.0] +=back -See RT #48018. Replace usage with get_[hll,root]_global variants. +=head1 PMCS -=item * C math opcode variants [post 0.7.1] +=over 4 -See RT #58410. +=item * Remove VtableCache PMC [post 0.9.0] + +See TT #6 =back @@ -63,6 +65,8 @@ If you want to override a vtable method/function when building a Class, then use the method C instead of calling C with one or both of these flags. +See TT #158 + =back =head1 PIR syntax @@ -98,6 +102,8 @@ if the arg is a ResizableStringArray if the arg is a Namespace or Class PMC The passed in class or the class attatched to the passed in namespace. +See TT #159 + =back =head1 Functions @@ -132,7 +138,7 @@ to happen. See RT #60586 and RT #53302. =item P6protoobject stringification [post 0.9.0] Stringification of protoobjects will return the full name of the type -and parentheses, per Synopsis 12. +and parentheses, per Synopsis 12. See TT #168 =back diff --git a/MANIFEST b/MANIFEST index 9b6f4945c7..27e7edf647 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,7 +1,7 @@ # ex: set ro: # $Id$ # -# generated by tools/dev/mk_manifest_and_skip.pl Sat Jan 10 02:54:21 2009 UT +# generated by tools/dev/mk_manifest_and_skip.pl Mon Jan 12 21:15:11 2009 UT # # See tools/dev/install_files.pl for documentation on the # format of this file. @@ -879,6 +879,7 @@ ext/Parrot-Embed/lib/Parrot/PMC.pm [] ext/Parrot-Embed/t/00-load.t [] ext/Parrot-Embed/t/greet.pir [] ext/Parrot-Embed/t/interp.t [] +ext/Parrot-Embed/t/languages.t [] ext/Parrot-Embed/t/pipp.t [] ext/Parrot-Embed/tools/check_embed_coverage.pl [] ext/Parrot-Embed/tools/write_typemap.pl [] @@ -902,7 +903,6 @@ include/parrot/charset.h [main]include include/parrot/compiler.h [main]include include/parrot/datatypes.h [main]include include/parrot/debugger.h [main]include -include/parrot/dod.h [main]include include/parrot/dynext.h [main]include include/parrot/embed.h [main]include include/parrot/encoding.h [main]include @@ -912,10 +912,12 @@ include/parrot/exceptions.h [main]include include/parrot/exec.h [main]include include/parrot/exit.h [main]include include/parrot/extend.h [main]include +include/parrot/gc_api.h [main]include +include/parrot/gc_mark_sweep.h [main]include +include/parrot/gc_pools.h [main]include include/parrot/global.h [main]include include/parrot/global_setup.h [main]include include/parrot/hash.h [main]include -include/parrot/headers.h [main]include include/parrot/hll.h [main]include include/parrot/imcc.h [main]include include/parrot/inter_call.h [main]include @@ -949,7 +951,6 @@ include/parrot/scheduler.h [main]include include/parrot/scheduler_private.h [main]include include/parrot/settings.h [main]include include/parrot/slice.h [main]include -include/parrot/smallobject.h [main]include include/parrot/stacks.h [main]include include/parrot/stat.h [main]include include/parrot/stm/backend.h [main]include @@ -1161,6 +1162,7 @@ languages/abc/t/abc_special_variables [abc] languages/abc/t/abc_statement [abc] languages/abc/t/harness [abc] languages/befunge/Changes [befunge] +languages/befunge/Configure.pl [befunge] languages/befunge/MAINTAINER [befunge] languages/befunge/README [befunge] languages/befunge/befunge.pir [befunge] @@ -1545,6 +1547,7 @@ languages/ecmascript/lib/Parrot/Test/JS.pm [ecmascript] languages/ecmascript/lib/Parrot/Test/JS/PJS.pm [ecmascript] languages/ecmascript/lib/Parrot/Test/JS/SpiderMonkey.pm [ecmascript] languages/ecmascript/src/builtin/builtins.pir [ecmascript] +languages/ecmascript/src/classes/Array.pir [ecmascript] languages/ecmascript/src/classes/Boolean.pir [ecmascript] languages/ecmascript/src/classes/Completion.pir [ecmascript] languages/ecmascript/src/classes/List.pir [ecmascript] @@ -1588,19 +1591,6 @@ languages/forth/tokenstream.pir [forth] languages/forth/variablestack.pir [forth] languages/forth/virtualstack.pir [forth] languages/forth/words.pir [forth] -languages/hq9plus/MAINTAINER [hq9plus] -languages/hq9plus/README [hq9plus] -languages/hq9plus/config/makefiles/root.in [hq9plus] -languages/hq9plus/hq9plus.pir [hq9plus] -languages/hq9plus/lib/Parrot/Test/Hq9plus.pm [hq9plus] -languages/hq9plus/src/builtins/hello.pir [hq9plus] -languages/hq9plus/src/builtins/nintynine_bottles_of_beer.pir [hq9plus] -languages/hq9plus/src/builtins/plus.pir [hq9plus] -languages/hq9plus/src/builtins/quine.pir [hq9plus] -languages/hq9plus/src/parser/actions.pm [hq9plus] -languages/hq9plus/src/parser/grammar.pg [hq9plus] -languages/hq9plus/t/basic.t [hq9plus] -languages/hq9plus/t/harness [hq9plus] languages/jako/Curses.jako [jako] languages/jako/MAINTAINER [jako] languages/jako/README [jako] @@ -2226,7 +2216,6 @@ languages/pheme/MANIFEST [pheme] languages/pheme/README [pheme] languages/pheme/TODO [pheme] languages/pheme/config/makefiles/root.in [pheme] -languages/pheme/lib/PhemeCompiler.pir [pheme] languages/pheme/lib/PhemeGrammar.pir [pheme] languages/pheme/lib/PhemeObjects.pir [pheme] languages/pheme/lib/PhemeSymbols.pir [pheme] @@ -2256,9 +2245,8 @@ languages/pipp/README [pipp] languages/pipp/ROADMAP [pipp] languages/pipp/Test.php [pipp] languages/pipp/config/makefiles/root.in [pipp] -languages/pipp/docs/antlr3.pod [pipp] languages/pipp/docs/extensions.pod [pipp] -languages/pipp/docs/namespaces.pod [pipp] +languages/pipp/docs/internals.pod [pipp] languages/pipp/docs/pipp.pod [pipp] languages/pipp/docs/testing.pod [pipp] languages/pipp/lib/Parrot/Test/Pipp.pm [pipp] @@ -2966,18 +2954,19 @@ src/exec_save.h [] src/exec_start.c [] src/exit.c [] src/extend.c [] -src/gc/dod.c [] -src/gc/gc_gms.c [] -src/gc/gc_ims.c [] +src/gc/api.c [] +src/gc/gc_malloc.c [] +src/gc/generational_ms.c [] +src/gc/incremental_ms.c [] +src/gc/mark_sweep.c [] src/gc/memory.c [] +src/gc/pools.c [] src/gc/register.c [] src/gc/res_lea.c [] src/gc/resources.c [] -src/gc/smallobject.c [] src/global.c [] src/global_setup.c [] src/hash.c [] -src/headers.c [] src/hll.c [] src/inter_call.c [] src/inter_cb.c [] @@ -3739,11 +3728,11 @@ t/tools/ops2pm/08-sort_ops.t [] t/tools/ops2pm/09-prepare_real_ops.t [] t/tools/ops2pm/10-print_module.t [] t/tools/ops2pm/11-print_h.t [] -t/tools/ops2pm/samples/bit_ops.orig [] +t/tools/ops2pm/samples/bit_ops.original [] t/tools/ops2pm/samples/bit_ops.second [] -t/tools/ops2pm/samples/core_ops.orig [] -t/tools/ops2pm/samples/ops_num.orig [] -t/tools/ops2pm/samples/pic_ops.orig [] +t/tools/ops2pm/samples/core_ops.original [] +t/tools/ops2pm/samples/ops_num.original [] +t/tools/ops2pm/samples/pic_ops.original [] t/tools/parrot_debugger.t [] t/tools/pbc_merge.t [] t/tools/pmc2c.t [] diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 272ede378f..045d7d28fb 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -1,6 +1,6 @@ # ex: set ro: # $Id$ -# generated by tools/dev/mk_manifest_and_skip.pl Fri Dec 26 11:40:35 2008 UT +# generated by tools/dev/mk_manifest_and_skip.pl Mon Jan 12 21:16:57 2009 UT # # This file should contain a transcript of the svn:ignore properties # of the directories in the Parrot subversion repository. (Needed for @@ -397,6 +397,8 @@ ^languages/.*\.tmp/ ^languages/Makefile$ ^languages/Makefile/ +^languages/hq9plus$ +^languages/hq9plus/ ^languages/languages_smoke\.html$ ^languages/languages_smoke\.html/ ^languages/test_regex\.pbc$ @@ -773,23 +775,6 @@ ^languages/forth/variablestack\.pbc/ ^languages/forth/virtualstack\.pbc$ ^languages/forth/virtualstack\.pbc/ -# generated from svn:ignore of 'languages/hq9plus/' -^languages/hq9plus/Makefile$ -^languages/hq9plus/Makefile/ -^languages/hq9plus/hq9plus\.pbc$ -^languages/hq9plus/hq9plus\.pbc/ -# generated from svn:ignore of 'languages/hq9plus/src/' -^languages/hq9plus/src/gen_actions\.pir$ -^languages/hq9plus/src/gen_actions\.pir/ -^languages/hq9plus/src/gen_builtins\.pir$ -^languages/hq9plus/src/gen_builtins\.pir/ -^languages/hq9plus/src/gen_grammar\.pir$ -^languages/hq9plus/src/gen_grammar\.pir/ -# generated from svn:ignore of 'languages/hq9plus/t/' -^languages/hq9plus/t/.*\.HQ9plus$ -^languages/hq9plus/t/.*\.HQ9plus/ -^languages/hq9plus/t/.*\.out$ -^languages/hq9plus/t/.*\.out/ # generated from svn:ignore of 'languages/jako/' ^languages/jako/.*\.list$ ^languages/jako/.*\.list/ @@ -1112,14 +1097,8 @@ ^languages/pheme/Makefile$ ^languages/pheme/Makefile/ # generated from svn:ignore of 'languages/pheme/lib/' -^languages/pheme/lib/.*\.pbc$ -^languages/pheme/lib/.*\.pbc/ ^languages/pheme/lib/ASTGrammar\.pir$ ^languages/pheme/lib/ASTGrammar\.pir/ -^languages/pheme/lib/OSTGrammar\.pir$ -^languages/pheme/lib/OSTGrammar\.pir/ -^languages/pheme/lib/PIRGrammar\.pir$ -^languages/pheme/lib/PIRGrammar\.pir/ ^languages/pheme/lib/pheme_grammar_gen\.pir$ ^languages/pheme/lib/pheme_grammar_gen\.pir/ # generated from svn:ignore of 'languages/pipp/' diff --git a/PBC_COMPAT b/PBC_COMPAT index 912773f856..dabf43f0d0 100644 --- a/PBC_COMPAT +++ b/PBC_COMPAT @@ -27,6 +27,7 @@ # please insert tab separated entries at the top of the list +3.30 2009.01.10 coke removed find_global_p_s_s and store_global_s_s_p 3.29 2009.01.07 coke removed store_global_p_s_p 3.28 2009.01.07 jonathan changes for bytecode annoations (packfile and ops) 3.27 2008.01.07 coke removed find_global_p_p_s, find_global_p_s, store_global_p_s diff --git a/compilers/imcc/imcc.l b/compilers/imcc/imcc.l index a04aa0309d..0a5ab6eb09 100644 --- a/compilers/imcc/imcc.l +++ b/compilers/imcc/imcc.l @@ -366,7 +366,7 @@ SP [ ] "null" return PNULL; "int" return INTV; "num" return FLOATV; -"new" return NEW; + "pmc" return PMCV; "string" return STRINGV; "<<" return SHIFT_LEFT; diff --git a/compilers/imcc/imcc.y b/compilers/imcc/imcc.y index 355bf905af..250c74b468 100644 --- a/compilers/imcc/imcc.y +++ b/compilers/imcc/imcc.y @@ -1731,30 +1731,11 @@ assignment: { $$ = iINDEXFETCH(interp, IMCC_INFO(interp)->cur_unit, $1, $3, $5); } | target '[' keylist ']' '=' var { $$ = iINDEXSET(interp, IMCC_INFO(interp)->cur_unit, $1, $3, $6); } - | target '=' NEW classname COMMA var + /* Removing this line causes test failures in t/compilers/tge/* for + some reason. Eventualy it should be removed and the normal handling + of ops should be used for all forms of "new". */ + | target '=' 'new' classname '[' keylist ']' { $$ = iNEW(interp, IMCC_INFO(interp)->cur_unit, $1, $4, $6, 1); } - | target '=' NEW classname '[' keylist ']' - { $$ = iNEW(interp, IMCC_INFO(interp)->cur_unit, $1, $4, $6, 1); } - | target '=' NEW classname - { $$ = iNEW(interp, IMCC_INFO(interp)->cur_unit, $1, $4, NULL, 1); } - | target '=' NEW var - { $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 2, $1, $4); } - | target '=' NEW maybe_ns - { $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 2, $1, $4); } - | target '=' NEW maybe_ns COMMA var - { $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, $1, $4, $6); } - | target '=' NEW var COMMA var - { $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, $1, $4, $6); } - | target '=' NEW var '[' keylist ']' - { $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, $1, $4, $6); } - /* NEW is here because it is both PIR and PASM keywords so we - * have to handle the token here (or badly hack the lexer). */ - | NEW target COMMA var - { $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 2, $2, $4); } - | NEW target COMMA var COMMA var - { $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, $2, $4, $6); } - | NEW target COMMA var '[' keylist ']' - { $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, $2, $4, $6); } /* Subroutine call the short way */ | target '=' sub_call { diff --git a/compilers/imcc/imclexer.c b/compilers/imcc/imclexer.c index 7511ed1c32..7abb441335 100644 --- a/compilers/imcc/imclexer.c +++ b/compilers/imcc/imclexer.c @@ -368,8 +368,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 148 -#define YY_END_OF_BUFFER 149 +#define YY_NUM_RULES 147 +#define YY_END_OF_BUFFER 148 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -377,124 +377,124 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[1055] = +static yyconst flex_int16_t yy_accept[1053] = { 0, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 3, 149, 135, 134, 10, 134, 135, 135, 11, - 135, 135, 135, 135, 135, 135, 115, 135, 95, 135, - 119, 119, 135, 87, 135, 89, 133, 133, 133, 133, - 133, 133, 133, 133, 135, 135, 13, 134, 134, 135, - 135, 135, 135, 133, 13, 147, 142, 137, 142, 147, - 147, 147, 147, 147, 119, 119, 147, 145, 145, 145, - 141, 141, 13, 15, 16, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 148, 135, 8, 8, - - 135, 135, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 5, 135, 9, 135, 135, 135, 135, 135, - 119, 119, 135, 135, 135, 135, 12, 135, 135, 135, - 135, 135, 119, 119, 135, 135, 135, 148, 1, 148, - 148, 148, 148, 148, 119, 119, 148, 148, 148, 3, + 3, 3, 148, 134, 133, 10, 133, 134, 134, 11, + 134, 134, 134, 134, 134, 134, 114, 134, 94, 134, + 118, 118, 134, 86, 134, 88, 132, 132, 132, 132, + 132, 132, 132, 132, 134, 134, 13, 133, 133, 134, + 134, 134, 134, 132, 13, 146, 141, 136, 141, 146, + 146, 146, 146, 146, 118, 118, 146, 144, 144, 144, + 140, 140, 13, 15, 16, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 147, 134, 8, 8, + + 134, 134, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 5, 134, 9, 134, 134, 134, 134, 134, + 118, 118, 134, 134, 134, 134, 12, 134, 134, 134, + 134, 134, 118, 118, 134, 134, 134, 147, 1, 147, + 147, 147, 147, 147, 118, 118, 147, 147, 147, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 134, 0, 10, 92, 0, 124, 0, 131, 131, - 131, 131, 131, 100, 84, 103, 0, 93, 98, 0, - 119, 96, 97, 118, 109, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 3, 133, 0, 10, 91, 0, 123, 0, 130, 130, + 130, 130, 130, 99, 83, 102, 0, 92, 97, 0, + 118, 95, 96, 117, 108, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 117, 117, 101, 99, 118, 0, 0, 123, 0, 0, + 116, 116, 100, 98, 117, 0, 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 81, 88, 91, 63, 90, 82, 114, 0, 133, - 116, 132, 133, 73, 133, 133, 133, 133, 133, 133, - 133, 104, 85, 105, 86, 134, 117, 117, 117, 117, - 117, 117, 0, 0, 0, 0, 142, 137, 142, 0, - 0, 0, 146, 146, 146, 146, 145, 0, 143, 145, - 141, 141, 15, 16, 15, 15, 15, 15, 15, 15, + 0, 80, 87, 90, 63, 89, 81, 113, 0, 132, + 115, 131, 132, 73, 132, 132, 132, 132, 132, 132, + 103, 84, 104, 85, 133, 116, 116, 116, 116, 116, + 116, 0, 0, 0, 0, 141, 136, 141, 0, 0, + 0, 145, 145, 145, 145, 144, 0, 142, 144, 140, + 140, 15, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 0, 0, 8, 0, 4, 4, + 15, 15, 15, 0, 0, 8, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 0, 9, 0, 0, - 0, 124, 0, 0, 0, 0, 119, 118, 0, 0, - 118, 0, 0, 123, 0, 0, 0, 0, 0, 0, - 0, 12, 0, 0, 0, 124, 0, 0, 0, 0, - 119, 118, 0, 0, 118, 0, 0, 123, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, 0, 124, - 0, 0, 0, 0, 119, 118, 0, 0, 118, 0, - 0, 123, 0, 0, 0, 0, 0, 0, 3, 2, + 4, 4, 4, 4, 4, 0, 9, 0, 0, 0, + 123, 0, 0, 0, 0, 118, 117, 0, 0, 117, + 0, 0, 122, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 123, 0, 0, 0, 0, 118, + 117, 0, 0, 117, 0, 0, 122, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 123, 0, + 0, 0, 0, 118, 117, 0, 0, 117, 0, 0, + 122, 0, 0, 0, 0, 0, 0, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 94, - 127, 128, 130, 129, 0, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 102, 118, 121, 0, 118, 122, 120, 0, 0, 0, + 3, 3, 3, 3, 3, 3, 3, 3, 93, 126, + 127, 129, 128, 0, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 101, + 117, 120, 0, 117, 121, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 107, 106, 83, - 113, 0, 0, 132, 133, 76, 78, 133, 77, 79, - 133, 133, 133, 117, 117, 0, 0, 138, 144, 140, - 146, 146, 146, 146, 146, 145, 15, 15, 15, 15, + 0, 0, 0, 0, 0, 0, 106, 105, 82, 112, + 0, 0, 131, 132, 76, 132, 77, 78, 132, 132, + 132, 116, 116, 0, 0, 137, 143, 139, 145, 145, + 145, 145, 145, 144, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 0, 0, 0, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 0, 0, 0, 118, - 121, 0, 118, 122, 120, 0, 0, 0, 0, 0, - 0, 0, 0, 118, 121, 0, 118, 122, 120, 0, - 0, 0, 0, 0, 0, 0, 0, 118, 121, 0, - 118, 122, 120, 0, 0, 0, 0, 0, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 0, 118, 66, 117, 117, 117, 117, 23, - 117, 117, 117, 117, 117, 20, 117, 117, 117, 117, - - 117, 117, 117, 117, 117, 117, 117, 22, 117, 117, - 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 125, 0, 0, 108, 0, 126, 0, 0, 0, - 72, 75, 133, 133, 133, 133, 140, 146, 146, 146, - 146, 145, 145, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, - 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 0, 118, 0, 0, 0, 0, 125, - 0, 0, 0, 0, 0, 126, 0, 0, 0, 0, - - 0, 0, 118, 0, 0, 0, 0, 125, 0, 0, - 0, 0, 0, 126, 0, 0, 0, 0, 0, 0, - 118, 0, 0, 0, 0, 125, 0, 0, 0, 0, - 0, 126, 0, 0, 0, 0, 0, 3, 3, 3, + 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 0, 0, 0, 117, 120, 0, + 117, 121, 119, 0, 0, 0, 0, 0, 0, 0, + 0, 117, 120, 0, 117, 121, 119, 0, 0, 0, + 0, 0, 0, 0, 0, 117, 120, 0, 117, 121, + 119, 0, 0, 0, 0, 0, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 0, 117, 66, 116, 116, 116, 116, 23, 116, 116, + 116, 116, 116, 20, 116, 116, 116, 116, 116, 116, + + 116, 116, 116, 116, 116, 22, 116, 116, 0, 0, + 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, + 0, 0, 107, 0, 125, 0, 0, 0, 72, 75, + 132, 132, 132, 132, 139, 145, 145, 145, 145, 144, + 144, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, + 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 0, 117, 0, 0, 0, 0, 124, 0, 0, + 0, 0, 0, 125, 0, 0, 0, 0, 0, 0, + + 117, 0, 0, 0, 0, 124, 0, 0, 0, 0, + 0, 125, 0, 0, 0, 0, 0, 0, 117, 0, + 0, 0, 0, 124, 0, 0, 0, 0, 0, 125, + 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 117, 117, 117, 26, 117, 117, 18, 117, - 117, 117, 117, 17, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 42, 58, 0, 39, - 0, 0, 38, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 133, 133, 133, 133, - - 136, 18, 146, 17, 145, 145, 15, 15, 15, 15, - 14, 15, 18, 17, 0, 0, 4, 4, 4, 4, - 18, 17, 0, 0, 18, 17, 0, 0, 18, 17, - 0, 0, 3, 3, 3, 3, 117, 117, 117, 69, - 117, 117, 117, 117, 117, 117, 117, 117, 68, 111, - 117, 117, 117, 71, 117, 117, 117, 117, 117, 117, - 52, 0, 0, 0, 0, 36, 62, 0, 0, 0, - 43, 0, 0, 49, 0, 0, 133, 133, 80, 74, - 146, 145, 145, 15, 15, 0, 0, 4, 4, 0, - 0, 0, 0, 0, 0, 3, 3, 117, 117, 117, - - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 54, 117, 117, 117, 117, 0, 0, - 0, 35, 0, 0, 0, 0, 59, 0, 45, 133, - 133, 139, 145, 145, 15, 15, 0, 0, 4, 4, - 0, 0, 0, 0, 0, 0, 3, 3, 67, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 112, 117, - 57, 117, 117, 117, 117, 30, 21, 117, 117, 117, - 0, 0, 0, 46, 0, 0, 0, 0, 0, 7, - 15, 7, 4, 4, 0, 7, 0, 7, 0, 7, - 3, 3, 19, 117, 117, 117, 25, 117, 117, 117, - - 117, 29, 117, 117, 117, 27, 117, 117, 56, 0, - 0, 64, 61, 60, 41, 0, 6, 6, 6, 6, - 6, 3, 117, 117, 117, 117, 34, 117, 117, 117, - 28, 65, 117, 53, 40, 0, 0, 24, 117, 117, - 32, 50, 117, 117, 55, 48, 47, 117, 33, 51, - 70, 110, 31, 0 + 116, 116, 116, 26, 116, 116, 18, 116, 116, 116, + 116, 17, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 42, 58, 0, 39, 0, 0, + 38, 37, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 132, 132, 132, 132, 135, 18, + + 145, 17, 144, 144, 15, 15, 15, 15, 14, 15, + 18, 17, 0, 0, 4, 4, 4, 4, 18, 17, + 0, 0, 18, 17, 0, 0, 18, 17, 0, 0, + 3, 3, 3, 3, 116, 116, 116, 69, 116, 116, + 116, 116, 116, 116, 116, 116, 68, 110, 116, 116, + 116, 71, 116, 116, 116, 116, 116, 116, 52, 0, + 0, 0, 0, 36, 62, 0, 0, 0, 43, 0, + 0, 49, 0, 0, 132, 132, 79, 74, 145, 144, + 144, 15, 15, 0, 0, 4, 4, 0, 0, 0, + 0, 0, 0, 3, 3, 116, 116, 116, 116, 116, + + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 54, 116, 116, 116, 116, 0, 0, 0, 35, + 0, 0, 0, 0, 59, 0, 45, 132, 132, 138, + 144, 144, 15, 15, 0, 0, 4, 4, 0, 0, + 0, 0, 0, 0, 3, 3, 67, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 111, 116, 57, 116, + 116, 116, 116, 30, 21, 116, 116, 116, 0, 0, + 0, 46, 0, 0, 0, 0, 0, 7, 15, 7, + 4, 4, 0, 7, 0, 7, 0, 7, 3, 3, + 19, 116, 116, 116, 25, 116, 116, 116, 116, 29, + + 116, 116, 116, 27, 116, 116, 56, 0, 0, 64, + 61, 60, 41, 0, 6, 6, 6, 6, 6, 3, + 116, 116, 116, 116, 34, 116, 116, 116, 28, 65, + 116, 53, 40, 0, 0, 24, 116, 116, 32, 50, + 116, 116, 55, 48, 47, 116, 33, 51, 70, 109, + 31, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -511,8 +511,8 @@ static yyconst flex_int32_t yy_ec[256] = 1, 40, 1, 1, 41, 1, 42, 43, 44, 45, 46, 47, 48, 49, 50, 31, 31, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 31, 1, 65, 1, 66, 1, 1, 1, 1, + 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, + 63, 31, 1, 64, 1, 65, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -529,7 +529,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[67] = +static yyconst flex_int32_t yy_meta[66] = { 0, 1, 1, 2, 1, 1, 1, 3, 1, 4, 1, 1, 1, 1, 1, 1, 5, 1, 1, 6, 6, @@ -537,286 +537,284 @@ static yyconst flex_int32_t yy_meta[67] = 10, 10, 10, 10, 10, 10, 10, 10, 10, 1, 11, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 1, 1 + 10, 10, 10, 1, 1 } ; -static yyconst flex_int16_t yy_base[1212] = +static yyconst flex_int16_t yy_base[1204] = { 0, - 0, 4277, 65, 4276, 131, 82, 197, 4275, 263, 0, - 329, 0, 73, 78, 395, 0, 461, 0, 527, 0, - 593, 0, 4299, 7506, 99, 7506, 107, 4273, 65, 7506, - 84, 4272, 103, 4214, 83, 643, 7506, 650, 657, 648, - 705, 733, 738, 49, 101, 655, 714, 753, 724, 748, - 761, 788, 793, 733, 718, 672, 703, 756, 810, 803, - 828, 776, 4201, 827, 7506, 7506, 830, 7506, 842, 725, - 821, 4212, 843, 848, 0, 881, 4199, 771, 897, 859, - 886, 904, 7506, 0, 7506, 4219, 798, 4209, 904, 909, - 944, 904, 4196, 1007, 1073, 4175, 7506, 930, 915, 1018, - - 4195, 83, 0, 0, 941, 972, 949, 1123, 943, 4193, - 1186, 1252, 801, 742, 7506, 778, 935, 942, 1024, 1090, - 1316, 1092, 981, 1379, 1445, 845, 7506, 893, 1052, 998, - 1046, 1103, 1509, 1122, 1112, 1572, 1638, 1000, 7506, 1050, - 1123, 1057, 1202, 1280, 1702, 1139, 1204, 1765, 1831, 0, - 7506, 4213, 844, 4203, 1083, 1194, 1881, 1196, 4190, 1944, - 2010, 1225, 1168, 7506, 7506, 870, 7506, 0, 0, 1227, - 1252, 1260, 1266, 7506, 7506, 7506, 4201, 7506, 7506, 1274, - 1294, 7506, 7506, 1379, 7506, 0, 4178, 4158, 4164, 934, - 4156, 4158, 685, 4154, 1110, 764, 775, 870, 4160, 895, - - 4163, 4154, 4178, 7506, 1391, 1038, 1344, 7506, 1113, 0, - 4148, 4149, 1018, 980, 1261, 1059, 806, 4145, 17, 4145, - 4138, 1297, 7506, 7506, 7506, 7506, 1122, 4173, 4172, 1158, - 4187, 1352, 1406, 1316, 1407, 1333, 1325, 1417, 1408, 1418, - 1463, 7506, 7506, 7506, 7506, 1229, 4139, 4139, 1190, 4149, - 4148, 4145, 1127, 4126, 4123, 950, 1478, 7506, 1485, 4159, - 1473, 0, 0, 4128, 4128, 1247, 1013, 4149, 1481, 1419, - 1503, 1513, 0, 7506, 1055, 0, 0, 4143, 1500, 1583, - 1514, 4104, 4103, 1588, 1164, 1537, 0, 1387, 2058, 1231, - 2105, 2171, 2237, 4092, 4101, 4100, 1649, 936, 0, 1520, - - 0, 1545, 1655, 1672, 4099, 4098, 1707, 1198, 1600, 0, - 1521, 2285, 1298, 2332, 2398, 2464, 1287, 7506, 1326, 1620, - 1693, 1340, 1350, 1558, 1589, 1695, 2528, 1781, 1521, 1565, - 1848, 1731, 1793, 1435, 1739, 2572, 1813, 2619, 2685, 2751, - 1470, 7506, 1473, 1704, 1706, 1495, 1543, 1655, 1678, 1860, - 2815, 1886, 1736, 1758, 1960, 1855, 1909, 1546, 1918, 2859, - 1880, 2906, 2972, 3038, 1622, 7506, 1627, 1869, 1968, 1629, - 1632, 1751, 1930, 1973, 3102, 1983, 1815, 1915, 2027, 2034, - 2048, 1683, 2039, 3146, 2078, 3193, 3259, 3325, 0, 7506, - 1786, 0, 0, 4135, 1802, 2116, 2121, 4096, 4092, 2237, - - 1775, 2075, 0, 1841, 3373, 1587, 3420, 3486, 3552, 1994, - 2105, 2133, 2137, 2144, 2250, 0, 4107, 4087, 4091, 4087, - 4080, 4087, 4080, 4071, 4075, 1176, 4065, 4074, 1076, 4082, - 4066, 4072, 4073, 4065, 4077, 4061, 3990, 4005, 3997, 4000, - 7506, 2254, 1779, 2259, 2266, 2020, 0, 3991, 4002, 3991, - 1939, 3979, 3999, 3990, 3980, 3987, 3985, 3990, 3976, 3975, - 3975, 3972, 3988, 3980, 3987, 1846, 4016, 7506, 7506, 4002, - 7506, 1859, 4003, 2285, 2300, 2301, 2302, 2343, 2303, 2344, - 2475, 2477, 2487, 3980, 3981, 3972, 3998, 7506, 2270, 0, - 0, 3975, 3968, 3975, 3964, 2345, 2355, 3965, 3962, 2343, - - 1809, 2359, 2363, 2128, 3600, 1886, 4002, 1907, 3647, 3713, - 3954, 3961, 3954, 1300, 2492, 3955, 3952, 2498, 1921, 2515, - 2519, 2278, 3761, 1971, 3808, 3874, 2549, 2041, 2068, 2635, - 2553, 2563, 2576, 2584, 3938, 2606, 2062, 2775, 3985, 4051, - 2647, 2491, 2317, 2767, 2780, 2801, 2805, 2827, 4115, 2789, - 2157, 2799, 4162, 4228, 2837, 2556, 2498, 2922, 2851, 2863, - 2871, 2930, 4292, 3062, 2383, 3067, 4339, 4405, 2656, 3953, - 3948, 2917, 2064, 2875, 2934, 2628, 4453, 2092, 3967, 2476, - 4500, 4566, 2938, 2945, 3937, 3923, 3926, 3924, 3916, 3932, - 3926, 3930, 3927, 3918, 3911, 0, 3918, 3918, 3920, 3904, - - 3907, 3909, 3913, 3911, 3911, 3891, 3909, 0, 3898, 3897, - 3894, 3887, 3899, 3885, 3884, 3827, 7506, 3827, 3818, 3821, - 3810, 3822, 3814, 633, 3820, 3806, 3807, 3813, 3806, 3818, - 2485, 7506, 0, 3848, 7506, 2514, 7506, 0, 3836, 3851, - 3059, 3063, 3064, 3067, 3072, 3068, 0, 3805, 3810, 3809, - 3808, 2757, 2778, 3038, 3079, 3807, 3806, 2571, 0, 0, - 3839, 2601, 0, 0, 4632, 3843, 4698, 4764, 2387, 3803, - 3801, 1697, 1702, 3089, 3108, 3800, 3799, 2574, 0, 4830, - 3837, 4896, 4962, 3134, 3138, 2840, 2924, 3140, 3174, 2586, - 2649, 2670, 2861, 3180, 3349, 2676, 2808, 5028, 2865, 5094, - - 3793, 3142, 3209, 3089, 3136, 3356, 3364, 2873, 2895, 3167, - 3220, 3366, 3371, 2958, 3109, 5160, 3218, 5226, 3792, 3223, - 3231, 3169, 3341, 3373, 3444, 3112, 3130, 3234, 3236, 3449, - 3576, 3148, 3182, 5292, 3351, 5358, 3791, 3235, 3378, 3794, - 3793, 2774, 0, 0, 3826, 3078, 0, 0, 5424, 3830, - 5490, 5556, 3784, 3776, 3777, 0, 3770, 3322, 0, 3771, - 3785, 3764, 3771, 0, 3751, 3750, 3746, 3758, 3740, 3753, - 3744, 3737, 3737, 3397, 3749, 3747, 7506, 7506, 3743, 7506, - 3745, 3742, 7506, 7506, 3731, 3734, 3671, 3652, 3663, 3655, - 3651, 3663, 3651, 3660, 3644, 3652, 3572, 3573, 3577, 3575, - - 0, 0, 3651, 0, 1741, 1920, 0, 0, 5622, 5688, - 7506, 3698, 7506, 7506, 881, 2040, 0, 0, 5754, 5820, - 3343, 3358, 5886, 1255, 3378, 3404, 3359, 750, 3437, 3446, - 3407, 1538, 0, 0, 3412, 1604, 3658, 3652, 3641, 0, - 3639, 3604, 3591, 3593, 3583, 3586, 3573, 3564, 0, 3562, - 3555, 3530, 3532, 0, 3495, 3417, 3398, 3396, 3364, 3370, - 0, 3355, 3335, 3343, 3338, 7506, 7506, 3315, 3313, 3304, - 7506, 3287, 3177, 7506, 3190, 3163, 3578, 3581, 3450, 3455, - 3463, 3586, 3589, 1390, 1627, 1642, 1758, 1842, 2553, 1560, - 2088, 1368, 1382, 1760, 2459, 2612, 2614, 3114, 3072, 3619, - - 3069, 3030, 3021, 2996, 2925, 2902, 2887, 2892, 2878, 2818, - 2800, 2787, 2790, 0, 2750, 2736, 2744, 2734, 2730, 2723, - 2618, 7506, 2576, 2519, 2504, 2491, 7506, 2483, 7506, 3669, - 3670, 3470, 3661, 3675, 2002, 2502, 1707, 2492, 2559, 2630, - 2093, 3418, 1307, 1459, 2343, 2895, 3431, 3563, 0, 2453, - 2443, 2434, 2421, 2337, 2291, 2288, 2262, 2241, 0, 2223, - 0, 2214, 2214, 2209, 2189, 0, 0, 2114, 2117, 2057, - 2002, 1986, 1967, 7506, 1953, 1940, 1933, 1928, 1362, 1961, - 2845, 1955, 3089, 1899, 3603, 3568, 3633, 3664, 3692, 3685, - 3242, 1886, 0, 1834, 1791, 1801, 0, 1730, 1704, 1577, - - 1501, 0, 1484, 1433, 1374, 0, 1321, 1281, 0, 1222, - 1117, 7506, 7506, 7506, 7506, 1103, 7506, 0, 3473, 3476, - 3479, 0, 1078, 1054, 1057, 1036, 0, 1017, 993, 984, - 0, 0, 970, 0, 7506, 952, 874, 0, 836, 810, - 0, 784, 707, 602, 0, 7506, 7506, 49, 0, 0, - 0, 0, 0, 7506, 5952, 5958, 5968, 5976, 5980, 5988, - 5995, 6006, 6017, 6028, 6039, 6046, 6057, 6068, 6079, 6090, - 6101, 6112, 6123, 6134, 6145, 6156, 6167, 6178, 6189, 6200, - 6211, 6222, 6233, 6244, 6255, 6261, 6271, 6277, 6283, 6288, - 6296, 6305, 6311, 6315, 6321, 6328, 6339, 6350, 6361, 6372, - - 6383, 6394, 6405, 6416, 6427, 6438, 6449, 6460, 6471, 6482, - 6493, 6504, 6515, 6526, 6537, 6548, 6559, 6570, 6581, 6587, - 6592, 6598, 6607, 6618, 6629, 6636, 6644, 6650, 6656, 6662, - 6669, 6680, 6691, 6702, 6713, 6724, 6731, 6742, 6753, 6764, - 6775, 6786, 6797, 6808, 6819, 6830, 6841, 6852, 6863, 6874, - 6885, 6896, 6907, 6918, 6929, 6940, 6951, 6962, 6973, 6984, - 6990, 7001, 7012, 7023, 7030, 7038, 7044, 7050, 7057, 7068, - 7079, 7090, 7101, 7112, 7123, 7130, 7141, 7152, 7163, 7174, - 7185, 7196, 7207, 7218, 7229, 7240, 7251, 7262, 7273, 7284, - 7295, 7306, 7317, 7328, 7339, 7350, 7361, 7372, 7383, 7394, - - 7405, 7411, 7419, 7425, 7432, 7443, 7454, 7461, 7472, 7483, - 7494 + 0, 4292, 64, 4291, 129, 81, 194, 4290, 259, 0, + 324, 0, 72, 77, 389, 0, 454, 0, 519, 0, + 584, 0, 4314, 6973, 98, 6973, 106, 4288, 64, 6973, + 83, 4283, 102, 4295, 82, 633, 6973, 640, 647, 638, + 694, 724, 729, 48, 100, 645, 703, 741, 711, 750, + 709, 726, 776, 777, 704, 726, 696, 734, 802, 791, + 811, 773, 4282, 786, 6973, 6973, 814, 6973, 835, 748, + 808, 4293, 830, 856, 0, 862, 4278, 751, 878, 798, + 883, 907, 6973, 0, 6973, 4277, 789, 4267, 896, 900, + 935, 896, 4254, 997, 1062, 4233, 6973, 921, 907, 1008, + + 4253, 641, 0, 0, 941, 963, 940, 1111, 934, 4251, + 1173, 1238, 791, 749, 6973, 868, 927, 902, 1014, 1078, + 1301, 1080, 942, 1363, 1428, 886, 6973, 920, 1043, 1036, + 1149, 1092, 1491, 1164, 989, 1553, 1618, 933, 6973, 972, + 1049, 1089, 1202, 1266, 1681, 1173, 1041, 1743, 1808, 0, + 6973, 4271, 813, 4261, 1038, 1116, 1857, 1229, 4248, 1919, + 1984, 1101, 1144, 6973, 6973, 851, 6973, 0, 0, 1139, + 1209, 1254, 1260, 6973, 6973, 6973, 4259, 6973, 6973, 1273, + 1374, 6973, 6973, 1278, 6973, 0, 4236, 4213, 4219, 806, + 4211, 4213, 726, 4209, 940, 59, 851, 982, 4211, 671, + + 4214, 4205, 4229, 6973, 1306, 1071, 1329, 6973, 1101, 0, + 4200, 4201, 1103, 995, 1269, 891, 940, 4197, 16, 4197, + 4190, 1208, 6973, 6973, 6973, 6973, 1169, 4225, 4224, 1101, + 4239, 1337, 1389, 1374, 1390, 1446, 1400, 1391, 1401, 1448, + 6973, 6973, 6973, 6973, 1206, 4191, 4191, 1260, 4132, 4131, + 4128, 1207, 4113, 4110, 1259, 1473, 6973, 1477, 4146, 1464, + 0, 0, 4115, 4117, 1001, 778, 4159, 1484, 1273, 1486, + 1512, 0, 6973, 1185, 0, 0, 4153, 1519, 1564, 1569, + 4114, 4113, 1626, 1314, 1528, 0, 1440, 2031, 1300, 2078, + 2143, 2208, 4102, 4111, 4110, 1632, 1092, 0, 1460, 0, + + 1553, 1675, 1743, 4109, 4108, 1755, 1319, 1581, 0, 1503, + 2255, 1372, 2302, 2367, 2432, 1338, 6973, 1358, 1529, 1664, + 1398, 1415, 1601, 1604, 1709, 2495, 1825, 1636, 1656, 1837, + 1670, 1776, 1418, 1719, 2539, 1729, 2586, 2651, 2716, 1422, + 6973, 1462, 1784, 1796, 1498, 1515, 1676, 1704, 1885, 2779, + 1935, 1722, 1801, 1957, 1846, 1894, 1525, 1849, 2823, 1878, + 2870, 2935, 3000, 1548, 6973, 1608, 1835, 1960, 1634, 1666, + 1790, 1937, 1949, 3063, 2001, 1859, 1898, 2024, 2013, 2094, + 1672, 2015, 3107, 2059, 3154, 3219, 3284, 0, 6973, 1194, + 0, 0, 4145, 1953, 2100, 2208, 4106, 4105, 2220, 1699, + + 2117, 0, 1992, 3331, 1519, 3378, 3443, 3508, 1890, 2018, + 2036, 2104, 2224, 2237, 0, 4120, 4100, 4104, 4099, 4096, + 4103, 4096, 4087, 4091, 812, 4082, 4090, 1120, 4098, 4082, + 4088, 4089, 4081, 4089, 4073, 4072, 4087, 4077, 4059, 6973, + 2241, 1751, 2259, 2269, 2048, 0, 4050, 4061, 4050, 1485, + 4039, 4058, 4049, 4039, 4046, 4044, 4049, 4032, 4031, 4031, + 4028, 4044, 4032, 4039, 1250, 4068, 6973, 6973, 4054, 6973, + 1375, 4055, 2313, 2450, 2314, 2444, 2315, 2323, 2454, 2452, + 2460, 4033, 4034, 4025, 4051, 6973, 2273, 0, 0, 4028, + 4021, 4028, 4017, 2462, 2329, 4018, 3946, 2500, 1762, 2333, + + 2337, 2086, 3555, 1674, 3986, 1820, 3602, 3667, 3938, 3945, + 3942, 1640, 2468, 3943, 3940, 2517, 1898, 2341, 2512, 2108, + 3714, 2537, 3761, 3826, 2602, 2061, 2233, 2732, 2022, 2551, + 2610, 2507, 3889, 2754, 2553, 2762, 3936, 4001, 2624, 2574, + 2265, 2784, 2461, 2770, 2812, 2616, 4064, 2814, 2630, 2816, + 4111, 4176, 2886, 2734, 2549, 3016, 2504, 2894, 2900, 2843, + 4239, 3038, 2743, 3046, 4286, 4351, 2909, 3941, 3938, 3009, + 1927, 2816, 2838, 2314, 4398, 1975, 3978, 2092, 4445, 4510, + 3049, 3053, 3948, 3934, 3937, 3935, 3927, 3943, 3937, 3941, + 3938, 3929, 3925, 0, 3932, 3932, 3933, 3917, 3924, 3926, + + 3930, 3928, 3928, 3908, 3926, 0, 3915, 3914, 3911, 3904, + 3912, 3898, 3897, 3901, 6973, 3907, 3877, 3880, 3869, 3881, + 3873, 792, 3879, 3865, 3866, 3872, 3865, 3877, 2242, 6973, + 0, 3904, 6973, 2511, 6973, 0, 3892, 3907, 2470, 2754, + 3038, 3080, 3078, 2770, 0, 3861, 3866, 3861, 3860, 1564, + 1814, 3085, 3093, 3859, 3858, 2567, 0, 0, 3891, 2568, + 0, 0, 4575, 3895, 4640, 3851, 1947, 3854, 3853, 1559, + 1611, 3097, 3101, 3852, 3851, 2764, 0, 4705, 3889, 4770, + 3845, 3121, 3170, 2448, 2804, 3141, 3314, 2137, 2261, 2756, + 2836, 3316, 3322, 2337, 2361, 4835, 2741, 4900, 3844, 3179, + + 3183, 3030, 3053, 3324, 3329, 2576, 2644, 2914, 3040, 3331, + 3406, 2746, 2807, 4965, 3088, 5030, 3783, 3192, 3395, 3129, + 3300, 3538, 3540, 2888, 2908, 3135, 3181, 3546, 3548, 2929, + 3018, 5095, 3203, 5160, 3774, 3292, 3320, 3777, 3776, 2757, + 0, 0, 3809, 2815, 0, 0, 5225, 3813, 5290, 3769, + 3766, 3758, 3763, 0, 3756, 2037, 0, 3757, 3771, 3752, + 3767, 0, 3759, 3758, 3754, 3766, 3748, 3761, 3752, 3745, + 3745, 3363, 3756, 3754, 6973, 6973, 3753, 6973, 3755, 3752, + 6973, 6973, 3741, 3744, 3748, 3733, 3744, 3736, 3732, 3744, + 3728, 3736, 3720, 3726, 3321, 3729, 3545, 3547, 0, 0, + + 3717, 0, 3384, 3512, 0, 0, 5355, 1604, 6973, 3748, + 6973, 6973, 724, 2439, 0, 0, 5420, 1733, 3205, 3212, + 3255, 966, 3312, 3354, 3315, 1054, 3364, 3408, 3371, 1164, + 0, 0, 3373, 1266, 3707, 3695, 3629, 0, 3623, 3617, + 3607, 3606, 3599, 3604, 3605, 3595, 0, 3602, 3596, 3583, + 3589, 0, 3564, 3570, 3561, 3546, 3537, 3537, 0, 3519, + 3513, 3520, 3515, 6973, 6973, 3501, 3495, 3485, 6973, 3473, + 3356, 6973, 3362, 3360, 3548, 3613, 3416, 3418, 3426, 3035, + 3513, 1691, 2201, 1231, 1424, 2499, 2778, 1186, 1546, 1834, + 1912, 2516, 3052, 3383, 3390, 3342, 3335, 3467, 3330, 3311, + + 3317, 3297, 3303, 3276, 3164, 3154, 3144, 3134, 3128, 3095, + 3091, 0, 3052, 3031, 3033, 3009, 3006, 2983, 2963, 6973, + 2861, 2844, 2819, 2797, 6973, 2771, 6973, 3625, 3628, 3535, + 3616, 3630, 1027, 2219, 1838, 2904, 2449, 2790, 1139, 1304, + 1406, 1930, 2498, 3027, 3058, 3295, 0, 2738, 2730, 2697, + 2682, 2598, 2516, 2513, 2475, 2420, 0, 2412, 0, 2394, + 2388, 2303, 2293, 0, 0, 2261, 2258, 2204, 2176, 2165, + 2076, 6973, 2024, 1978, 1959, 1949, 2104, 1961, 2610, 1917, + 2634, 1907, 3651, 3586, 3657, 3736, 3743, 3750, 2894, 1894, + 0, 1784, 1747, 1732, 0, 1702, 1689, 1648, 1640, 0, + + 1624, 1614, 1604, 0, 1549, 1464, 0, 1450, 1419, 6973, + 6973, 6973, 6973, 1346, 6973, 0, 3434, 3578, 3592, 0, + 1334, 1241, 1216, 1192, 0, 1145, 1122, 1114, 0, 0, + 1041, 0, 6973, 1037, 931, 0, 881, 859, 0, 822, + 808, 614, 0, 6973, 6973, 598, 0, 0, 0, 0, + 0, 6973, 5485, 5491, 5501, 5509, 5513, 5521, 5528, 5539, + 5550, 5561, 5572, 5579, 5590, 5601, 5612, 5623, 5634, 5645, + 5656, 5667, 5678, 5689, 5700, 5711, 5722, 5733, 5744, 5755, + 5766, 5777, 5788, 5794, 5804, 5810, 5816, 5821, 5829, 5838, + 5844, 5848, 5854, 5861, 5872, 5883, 5894, 5905, 5916, 5927, + + 5938, 5949, 5960, 5971, 5982, 5993, 6004, 6015, 6026, 6037, + 6048, 6059, 6070, 6081, 6092, 6103, 6114, 6120, 6125, 6131, + 6140, 6151, 6162, 6169, 6177, 6183, 6189, 6195, 6202, 6213, + 6224, 6235, 6246, 6257, 6264, 6275, 6286, 6297, 6308, 6319, + 6330, 6341, 6352, 6363, 6374, 6385, 6396, 6407, 6418, 6429, + 6440, 6451, 6462, 6473, 6484, 6495, 6506, 6517, 6523, 6534, + 6545, 6556, 6563, 6571, 6577, 6583, 6590, 6601, 6612, 6623, + 6634, 6645, 6652, 6663, 6674, 6685, 6696, 6707, 6718, 6729, + 6740, 6751, 6762, 6773, 6784, 6795, 6806, 6817, 6828, 6839, + 6850, 6861, 6872, 6883, 6894, 6905, 6911, 6919, 6925, 6932, + + 6943, 6950, 6961 } ; -static yyconst flex_int16_t yy_def[1212] = +static yyconst flex_int16_t yy_def[1204] = { 0, - 1054, 1, 1, 3, 1054, 5, 1054, 7, 1054, 9, - 1054, 11, 9, 9, 1054, 15, 1054, 17, 1054, 19, - 1054, 21, 1054, 1054, 1054, 1054, 1054, 1054, 1055, 1054, - 1056, 1054, 1054, 1057, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1058, 1058, 1058, 1058, - 1058, 1058, 1058, 1058, 1054, 1054, 1054, 1054, 1054, 1054, - 39, 1054, 1054, 1058, 1054, 1054, 1054, 1054, 1054, 1055, - 1059, 1057, 1054, 1060, 41, 1054, 1054, 1061, 1061, 1061, - 1054, 1054, 1054, 1062, 1054, 1062, 1063, 1064, 1062, 1062, - 1062, 91, 1062, 1065, 1065, 1062, 1054, 1054, 41, 1054, - - 1066, 1066, 1067, 1067, 1068, 1067, 1067, 1067, 108, 1067, - 1069, 1069, 1055, 1070, 1054, 1070, 1071, 1072, 1070, 1070, - 1070, 121, 1070, 1073, 1073, 1074, 1054, 1074, 1075, 1076, - 1074, 1074, 1074, 133, 1074, 1077, 1077, 1078, 1054, 1078, - 1079, 1080, 1078, 1078, 1078, 145, 1078, 1081, 1081, 1082, - 1054, 1082, 1083, 1084, 1082, 1082, 1082, 157, 1082, 1085, - 1085, 1054, 1054, 1054, 1054, 1055, 1054, 1055, 1086, 1086, - 1086, 1086, 1086, 1054, 1054, 1054, 1087, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - - 1088, 1088, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1089, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1090, 1091, - 1092, 1091, 1091, 1091, 1091, 1091, 1091, 1091, 1091, 1091, - 1091, 1054, 1054, 1054, 1054, 1054, 1088, 1088, 1088, 1088, - 1088, 1088, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1093, - 1093, 1094, 1095, 1095, 1095, 1095, 1096, 1092, 1096, 1096, - 1054, 1054, 1097, 1054, 1098, 1097, 1098, 1099, 1097, 1097, - 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, - 1100, 1054, 1100, 1097, 1054, 1054, 1054, 1090, 1101, 1102, - - 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, - 1101, 1101, 1101, 1103, 1054, 1103, 1104, 1054, 1104, 1105, - 1105, 1104, 1105, 1106, 1106, 1104, 1104, 1104, 1104, 1104, - 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1107, 1054, 1107, - 1108, 1054, 1108, 1109, 1109, 1108, 1109, 1110, 1110, 1108, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1111, 1054, 1111, 1112, 1054, 1112, 1113, 1113, 1112, - 1113, 1114, 1114, 1112, 1112, 1112, 1112, 1112, 1112, 1112, - 1112, 1112, 1112, 1112, 1112, 1115, 1054, 1115, 1116, 1054, - 1117, 1116, 1117, 1118, 1116, 1116, 1116, 1116, 1116, 1116, - - 1116, 1116, 1116, 1116, 1116, 1116, 1119, 1054, 1119, 1054, - 1120, 1120, 1120, 1120, 1054, 1121, 1121, 1121, 1121, 1121, - 1121, 1121, 1121, 1121, 1121, 1121, 1121, 1121, 1121, 1121, - 1121, 1121, 1121, 1121, 1121, 1121, 1121, 1121, 1121, 1121, - 1054, 1054, 1054, 1054, 1054, 1054, 1122, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1123, 1124, 1054, 1054, 1054, - 1054, 1125, 1126, 1127, 1127, 1127, 1127, 1127, 1127, 1127, - 1127, 1127, 1127, 1121, 1121, 1054, 1128, 1054, 1128, 1129, - 1130, 1130, 1130, 1130, 1130, 1131, 1132, 1132, 1132, 1132, - - 1132, 1132, 1132, 1132, 1132, 1133, 1134, 1135, 1136, 1054, - 1132, 1054, 1054, 1137, 1138, 1138, 1138, 1138, 1138, 1138, - 1138, 1138, 1138, 1139, 1140, 1054, 1141, 1141, 1141, 1141, - 1141, 1141, 1141, 1141, 1141, 1142, 1143, 1144, 1145, 1054, - 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1147, - 1148, 1149, 1150, 1054, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1152, 1153, 1154, 1155, 1054, 1156, 1156, - 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1157, 1158, 1159, - 1160, 1054, 1054, 1054, 1161, 1161, 1161, 1161, 1161, 1161, - 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, - - 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1162, 1054, 1162, 1163, 1054, 1164, 1054, 1164, 1165, 1054, - 1166, 1166, 1166, 1166, 1166, 1166, 1167, 1168, 1168, 1168, - 1168, 1169, 1169, 1170, 1170, 1170, 1170, 1171, 1170, 1171, - 1172, 1173, 1170, 1173, 1174, 1170, 1175, 1175, 1170, 1054, - 1054, 1176, 1176, 1177, 1177, 1177, 1177, 1178, 1177, 1179, - 1177, 1180, 1180, 1181, 1181, 1181, 1181, 1182, 1182, 1181, - 1182, 1183, 1183, 1184, 1184, 1181, 1184, 1185, 1181, 1054, - - 700, 1186, 1186, 1186, 1186, 1187, 1187, 1186, 1187, 1188, - 1188, 1189, 1189, 1186, 1189, 1190, 1186, 1054, 718, 1191, - 1191, 1191, 1191, 1192, 1192, 1191, 1192, 1193, 1193, 1194, - 1194, 1191, 1194, 1195, 1191, 1054, 736, 1196, 1196, 1196, - 1196, 1197, 1196, 1197, 1198, 1199, 1196, 1199, 1200, 1196, - 1201, 1201, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, - 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, - 1202, 1202, 1202, 1202, 1202, 1202, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1203, 1203, 1203, 1203, - - 1204, 1204, 1204, 1204, 1205, 1205, 1206, 1206, 1207, 1207, - 1054, 1206, 1054, 1054, 1208, 1208, 1209, 1209, 1210, 1210, - 1211, 1211, 1054, 823, 1186, 1186, 718, 718, 1191, 1191, - 736, 736, 1196, 1196, 752, 752, 1202, 1202, 1202, 1202, - 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, - 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, - 1202, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1203, 1203, 1203, 1203, - 1204, 1205, 1205, 810, 810, 1208, 1208, 820, 820, 823, - 823, 718, 718, 736, 736, 752, 752, 1202, 1202, 1202, - - 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, - 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1203, - 1203, 1054, 1205, 1205, 810, 810, 1208, 1208, 820, 820, - 823, 823, 718, 718, 736, 736, 752, 752, 1202, 1202, - 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, - 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1206, 1206, 1209, 1209, 1211, 1211, 1186, 1186, 1191, 1191, - 1196, 1196, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, - - 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1206, 1211, 1186, - 1191, 1196, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202, - 1202, 1202, 1202, 1202, 1054, 1054, 1054, 1202, 1202, 1202, - 1202, 1202, 1202, 1202, 1202, 1054, 1054, 1202, 1202, 1202, - 1202, 1202, 1202, 0, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054 + 1052, 1, 1, 3, 1052, 5, 1052, 7, 1052, 9, + 1052, 11, 9, 9, 1052, 15, 1052, 17, 1052, 19, + 1052, 21, 1052, 1052, 1052, 1052, 1052, 1052, 1053, 1052, + 1054, 1052, 1052, 1055, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1056, 1056, 1056, 1056, + 1056, 1056, 1056, 1056, 1052, 1052, 1052, 1052, 1052, 1052, + 39, 1052, 1052, 1056, 1052, 1052, 1052, 1052, 1052, 1053, + 1057, 1055, 1052, 1058, 41, 1052, 1052, 1059, 1059, 1059, + 1052, 1052, 1052, 1060, 1052, 1060, 1061, 1062, 1060, 1060, + 1060, 91, 1060, 1063, 1063, 1060, 1052, 1052, 41, 1052, + + 1064, 1064, 1065, 1065, 1066, 1065, 1065, 1065, 108, 1065, + 1067, 1067, 1053, 1068, 1052, 1068, 1069, 1070, 1068, 1068, + 1068, 121, 1068, 1071, 1071, 1072, 1052, 1072, 1073, 1074, + 1072, 1072, 1072, 133, 1072, 1075, 1075, 1076, 1052, 1076, + 1077, 1078, 1076, 1076, 1076, 145, 1076, 1079, 1079, 1080, + 1052, 1080, 1081, 1082, 1080, 1080, 1080, 157, 1080, 1083, + 1083, 1052, 1052, 1052, 1052, 1053, 1052, 1053, 1084, 1084, + 1084, 1084, 1084, 1052, 1052, 1052, 1085, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1086, 1086, 1086, 1086, 1086, + 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, + + 1086, 1086, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1087, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1088, 1089, + 1090, 1089, 1089, 1089, 1089, 1089, 1089, 1089, 1089, 1089, + 1052, 1052, 1052, 1052, 1052, 1086, 1086, 1086, 1086, 1086, + 1086, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1091, 1091, + 1092, 1093, 1093, 1093, 1093, 1094, 1090, 1094, 1094, 1052, + 1052, 1095, 1052, 1096, 1095, 1096, 1097, 1095, 1095, 1095, + 1095, 1095, 1095, 1095, 1095, 1095, 1095, 1095, 1095, 1098, + 1052, 1098, 1095, 1052, 1052, 1052, 1088, 1099, 1100, 1099, + + 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, + 1099, 1099, 1101, 1052, 1101, 1102, 1052, 1102, 1103, 1103, + 1102, 1103, 1104, 1104, 1102, 1102, 1102, 1102, 1102, 1102, + 1102, 1102, 1102, 1102, 1102, 1102, 1105, 1052, 1105, 1106, + 1052, 1106, 1107, 1107, 1106, 1107, 1108, 1108, 1106, 1106, + 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106, + 1109, 1052, 1109, 1110, 1052, 1110, 1111, 1111, 1110, 1111, + 1112, 1112, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, + 1110, 1110, 1110, 1110, 1113, 1052, 1113, 1114, 1052, 1115, + 1114, 1115, 1116, 1114, 1114, 1114, 1114, 1114, 1114, 1114, + + 1114, 1114, 1114, 1114, 1114, 1117, 1052, 1117, 1052, 1118, + 1118, 1118, 1118, 1052, 1119, 1119, 1119, 1119, 1119, 1119, + 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, + 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1052, + 1052, 1052, 1052, 1052, 1052, 1120, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1121, 1122, 1052, 1052, 1052, 1052, + 1123, 1124, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, + 1125, 1119, 1119, 1052, 1126, 1052, 1126, 1127, 1128, 1128, + 1128, 1128, 1128, 1129, 1130, 1130, 1130, 1130, 1130, 1130, + + 1130, 1130, 1130, 1131, 1132, 1133, 1134, 1052, 1130, 1052, + 1052, 1135, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, + 1136, 1137, 1138, 1052, 1139, 1139, 1139, 1139, 1139, 1139, + 1139, 1139, 1139, 1140, 1141, 1142, 1143, 1052, 1144, 1144, + 1144, 1144, 1144, 1144, 1144, 1144, 1144, 1145, 1146, 1147, + 1148, 1052, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, + 1149, 1150, 1151, 1152, 1153, 1052, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1155, 1156, 1157, 1158, 1052, + 1052, 1052, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, + 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, + + 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1160, 1052, + 1160, 1161, 1052, 1162, 1052, 1162, 1163, 1052, 1164, 1164, + 1164, 1164, 1164, 1164, 1165, 1166, 1166, 1166, 1166, 1167, + 1167, 1168, 1168, 1168, 1168, 1169, 1168, 1169, 1170, 1171, + 1168, 1171, 1172, 1168, 1052, 665, 1168, 1052, 1052, 1173, + 1173, 1174, 1174, 1174, 1174, 1175, 1174, 1176, 1174, 1052, + 680, 1177, 1177, 1177, 1177, 1178, 1178, 1177, 1178, 1179, + 1179, 1180, 1180, 1177, 1180, 1181, 1177, 1052, 698, 1182, + + 1182, 1182, 1182, 1183, 1183, 1182, 1183, 1184, 1184, 1185, + 1185, 1182, 1185, 1186, 1182, 1052, 716, 1187, 1187, 1187, + 1187, 1188, 1188, 1187, 1188, 1189, 1189, 1190, 1190, 1187, + 1190, 1191, 1187, 1052, 734, 1192, 1192, 1192, 1192, 1193, + 1192, 1193, 1194, 1195, 1192, 1195, 1196, 1192, 1052, 749, + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, + 1197, 1197, 1197, 1197, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1198, 1198, 1198, 1198, 1199, 1199, + + 1199, 1199, 1200, 1200, 1201, 1201, 1052, 807, 1052, 1201, + 1052, 1052, 1202, 1202, 1203, 1203, 1052, 817, 1177, 1177, + 698, 698, 1182, 1182, 716, 716, 1187, 1187, 734, 734, + 1192, 1192, 749, 749, 1197, 1197, 1197, 1197, 1197, 1197, + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1198, 1198, 1198, 1198, 1199, 1200, + 1200, 807, 807, 1202, 1202, 817, 817, 698, 698, 716, + 716, 734, 734, 749, 749, 1197, 1197, 1197, 1197, 1197, + + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, + 1197, 1197, 1197, 1197, 1197, 1197, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1198, 1198, 1052, + 1200, 1200, 807, 807, 1202, 1202, 817, 817, 698, 698, + 716, 716, 734, 734, 749, 749, 1197, 1197, 1197, 1197, + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1201, 1201, + 1203, 1203, 1177, 1177, 1182, 1182, 1187, 1187, 1192, 1192, + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, + + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1201, 1177, 1182, 1187, 1192, + 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, + 1197, 1197, 1052, 1052, 1052, 1197, 1197, 1197, 1197, 1197, + 1197, 1197, 1197, 1052, 1052, 1197, 1197, 1197, 1197, 1197, + 1197, 0, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + + 1052, 1052, 1052 } ; -static yyconst flex_int16_t yy_nxt[7573] = +static yyconst flex_int16_t yy_nxt[7039] = { 0, 24, 25, 26, 27, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, @@ -824,836 +822,777 @@ static yyconst flex_int16_t yy_nxt[7573] = 47, 47, 48, 47, 48, 47, 48, 48, 47, 24, 47, 47, 47, 47, 47, 47, 47, 49, 47, 50, 47, 47, 51, 47, 52, 47, 47, 53, 47, 54, - 47, 47, 47, 47, 55, 56, 58, 462, 59, 58, - 24, 167, 222, 223, 24, 24, 463, 24, 60, 113, - 60, 61, 24, 81, 113, 82, 81, 62, 63, 24, - 24, 41, 42, 42, 42, 178, 41, 42, 42, 42, - - 162, 1053, 162, 162, 168, 268, 83, 179, 162, 164, - 162, 162, 47, 175, 47, 163, 170, 47, 171, 47, - 172, 173, 64, 163, 47, 224, 225, 176, 298, 24, - 24, 66, 67, 68, 69, 67, 66, 70, 66, 71, - 66, 66, 72, 66, 73, 66, 73, 74, 66, 75, - 76, 76, 76, 66, 77, 66, 66, 78, 78, 78, - 78, 78, 78, 79, 78, 79, 78, 79, 79, 78, - 66, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 80, 78, - 78, 78, 78, 78, 78, 66, 66, 84, 84, 85, - - 86, 84, 84, 87, 84, 84, 84, 84, 88, 84, - 89, 84, 89, 90, 84, 91, 92, 92, 92, 84, - 93, 84, 84, 94, 94, 94, 94, 94, 94, 94, - 94, 94, 94, 94, 94, 94, 84, 94, 94, 94, + 47, 47, 47, 55, 56, 58, 461, 59, 58, 24, + 167, 222, 223, 24, 24, 462, 24, 60, 113, 60, + 61, 24, 81, 113, 82, 81, 62, 63, 24, 24, + 41, 42, 42, 42, 178, 41, 42, 42, 42, 162, + + 429, 162, 162, 168, 430, 83, 179, 162, 164, 162, + 162, 47, 175, 47, 163, 170, 47, 171, 47, 172, + 173, 64, 163, 47, 224, 225, 176, 24, 24, 66, + 67, 68, 69, 67, 66, 70, 66, 71, 66, 66, + 72, 66, 73, 66, 73, 74, 66, 75, 76, 76, + 76, 66, 77, 66, 66, 78, 78, 78, 78, 78, + 78, 79, 78, 79, 78, 79, 79, 78, 66, 78, + 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 80, 78, 78, 78, + 78, 78, 66, 66, 84, 84, 85, 86, 84, 84, + + 87, 84, 84, 84, 84, 88, 84, 89, 84, 89, + 90, 84, 91, 92, 92, 92, 84, 93, 84, 84, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, - 94, 94, 94, 94, 95, 94, 94, 94, 94, 94, - 94, 84, 84, 24, 24, 97, 24, 24, 24, 29, - 24, 24, 24, 24, 34, 24, 60, 24, 60, 98, - 24, 99, 100, 100, 100, 24, 63, 24, 24, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 94, 94, 94, 84, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 94, 95, 94, 94, 94, 94, 94, 84, 84, 24, + 24, 97, 24, 24, 24, 29, 24, 24, 24, 24, + 34, 24, 60, 24, 60, 98, 24, 99, 100, 100, + 100, 24, 63, 24, 24, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 24, 101, - 101, 101, 24, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 102, 101, 101, 101, 101, 101, 101, 24, 24, 103, - 103, 104, 103, 103, 103, 29, 103, 103, 103, 103, - 105, 103, 106, 103, 106, 107, 103, 108, 109, 109, - 109, 103, 110, 103, 103, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 103, 111, + 101, 101, 101, 101, 101, 101, 102, 101, 101, 101, + 101, 101, 24, 24, 103, 103, 104, 103, 103, 103, + 29, 103, 103, 103, 103, 105, 103, 106, 103, 106, + 107, 103, 108, 109, 109, 109, 103, 110, 103, 103, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 112, 111, 111, 111, - 111, 111, 111, 103, 103, 114, 114, 115, 116, 114, + 111, 111, 111, 103, 111, 111, 111, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, + 111, 112, 111, 111, 111, 111, 111, 103, 103, 114, + 114, 115, 116, 114, 114, 117, 114, 114, 114, 114, - 114, 117, 114, 114, 114, 114, 118, 114, 119, 114, - 119, 120, 114, 121, 122, 122, 122, 114, 123, 114, - 114, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 114, 124, 124, 124, 124, 124, + 118, 114, 119, 114, 119, 120, 114, 121, 122, 122, + 122, 114, 123, 114, 114, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 114, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 125, 124, 124, 124, 124, 124, 124, 114, - 114, 126, 126, 127, 128, 126, 126, 129, 126, 126, - 126, 126, 130, 126, 131, 126, 131, 132, 126, 133, - 134, 134, 134, 126, 135, 126, 126, 136, 136, 136, + 124, 124, 124, 124, 124, 124, 125, 124, 124, 124, + 124, 124, 114, 114, 126, 126, 127, 128, 126, 126, + 129, 126, 126, 126, 126, 130, 126, 131, 126, 131, + 132, 126, 133, 134, 134, 134, 126, 135, 126, 126, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 126, 136, 136, 136, 136, 136, 136, - 126, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 137, 136, - 136, 136, 136, 136, 136, 126, 126, 138, 138, 139, - 140, 138, 138, 141, 138, 138, 138, 138, 142, 138, - 143, 138, 143, 144, 138, 145, 146, 146, 146, 138, - 147, 138, 138, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 138, 148, 148, 148, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 137, 136, 136, 136, 136, 136, 126, 126, 138, + 138, 139, 140, 138, 138, 141, 138, 138, 138, 138, + 142, 138, 143, 138, 143, 144, 138, 145, 146, 146, + 146, 138, 147, 138, 138, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 138, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 149, 148, 148, 148, 148, 148, - 148, 138, 138, 150, 150, 151, 152, 150, 150, 153, + 148, 148, 148, 148, 148, 148, 149, 148, 148, 148, + 148, 148, 138, 138, 150, 150, 151, 152, 150, 150, + 153, 150, 150, 150, 150, 154, 150, 155, 150, 155, - 150, 150, 150, 150, 154, 150, 155, 150, 155, 156, - 150, 157, 158, 158, 158, 150, 159, 150, 150, 160, + 156, 150, 157, 158, 158, 158, 150, 159, 150, 150, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 150, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 150, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 161, 160, 160, 160, 160, 160, 160, 150, 150, 180, - 1052, 181, 181, 181, 181, 203, 180, 182, 181, 181, - 181, 181, 204, 789, 183, 184, 184, 184, 184, 226, - 227, 185, 790, 186, 186, 186, 186, 186, 187, 186, - 186, 186, 186, 186, 186, 186, 244, 186, 188, 189, - + 160, 161, 160, 160, 160, 160, 160, 150, 150, 180, + 1051, 181, 181, 181, 181, 203, 180, 182, 181, 181, + 181, 181, 204, 267, 183, 184, 184, 184, 184, 226, + 227, 185, 1050, 186, 186, 186, 186, 186, 187, 186, + 186, 186, 186, 186, 186, 186, 297, 186, 188, 189, 190, 186, 191, 192, 193, 186, 194, 195, 196, 197, - 186, 198, 186, 199, 200, 201, 186, 186, 186, 186, - 202, 205, 228, 181, 181, 181, 181, 224, 225, 229, - 424, 167, 228, 206, 207, 425, 231, 245, 208, 229, - 209, 228, 242, 210, 318, 319, 231, 206, 229, 205, - 207, 181, 181, 181, 181, 231, 228, 246, 209, 246, - 246, 228, 207, 229, 168, 1051, 208, 210, 229, 228, - 231, 232, 232, 232, 232, 231, 229, 233, 207, 211, - 318, 319, 243, 231, 212, 241, 229, 213, 214, 215, - 216, 217, 218, 268, 234, 219, 228, 220, 221, 362, - - 235, 228, 893, 229, 276, 430, 236, 167, 229, 431, - 231, 246, 164, 246, 246, 231, 432, 211, 433, 180, - 237, 181, 181, 181, 181, 253, 214, 215, 254, 255, - 218, 257, 258, 259, 257, 228, 221, 277, 239, 238, - 168, 1050, 229, 257, 258, 259, 257, 342, 343, 231, - 392, 240, 1054, 261, 1049, 261, 262, 261, 261, 180, - 459, 181, 181, 181, 181, 460, 184, 184, 184, 184, - 186, 247, 239, 186, 229, 186, 167, 248, 249, 250, - 251, 268, 252, 393, 186, 186, 186, 271, 258, 272, - 271, 186, 1048, 264, 265, 342, 343, 205, 266, 181, - - 181, 181, 181, 268, 270, 271, 258, 272, 271, 168, - 207, 434, 229, 435, 208, 269, 269, 269, 269, 268, - 279, 1047, 280, 280, 280, 280, 207, 281, 281, 281, - 281, 886, 273, 297, 297, 297, 297, 318, 321, 273, - 437, 322, 273, 299, 318, 325, 273, 177, 184, 184, - 184, 184, 301, 322, 438, 282, 466, 273, 268, 283, - 284, 467, 280, 280, 280, 280, 273, 304, 304, 304, - 304, 299, 285, 286, 323, 420, 295, 287, 299, 288, - 296, 299, 289, 318, 319, 299, 285, 421, 302, 286, - 303, 303, 303, 303, 514, 305, 299, 288, 1046, 306, - - 342, 349, 366, 367, 337, 299, 289, 273, 273, 346, - 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, - 273, 273, 1045, 273, 273, 452, 318, 319, 229, 292, - 273, 273, 273, 453, 205, 268, 297, 297, 297, 297, - 326, 1044, 327, 327, 327, 327, 273, 207, 342, 343, - 1043, 208, 366, 367, 342, 345, 443, 443, 346, 366, - 373, 276, 350, 207, 351, 351, 351, 351, 370, 450, - 451, 273, 273, 273, 273, 1042, 273, 273, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 273, 1041, 273, - 273, 347, 318, 319, 277, 292, 273, 273, 273, 395, - - 457, 396, 396, 396, 396, 342, 343, 1040, 328, 328, - 328, 328, 273, 1039, 342, 343, 458, 598, 293, 599, - 317, 352, 352, 352, 352, 366, 369, 317, 1038, 370, - 317, 446, 446, 446, 317, 361, 329, 273, 273, 307, - 330, 303, 303, 303, 303, 317, 469, 470, 1037, 353, - 341, 308, 309, 354, 317, 427, 310, 341, 311, 428, - 341, 312, 371, 429, 341, 308, 228, 365, 309, 410, - 1036, 410, 410, 229, 365, 341, 311, 365, 450, 486, - 231, 365, 501, 501, 341, 312, 299, 299, 299, 299, - 299, 299, 365, 299, 299, 299, 299, 299, 299, 299, - - 299, 365, 299, 299, 366, 367, 366, 367, 315, 299, - 299, 299, 397, 397, 397, 397, 519, 519, 374, 594, - 375, 375, 375, 375, 389, 299, 162, 385, 162, 162, - 246, 389, 246, 246, 389, 427, 595, 506, 389, 428, - 398, 163, 507, 485, 399, 411, 411, 411, 411, 389, - 299, 299, 299, 299, 299, 299, 299, 299, 389, 299, - 299, 299, 299, 299, 299, 299, 299, 1035, 299, 299, - 412, 412, 412, 412, 315, 299, 299, 299, 413, 413, - 413, 413, 366, 367, 414, 414, 414, 414, 494, 318, - 319, 299, 184, 184, 184, 184, 495, 316, 376, 376, - - 376, 376, 454, 466, 466, 338, 455, 891, 467, 524, - 205, 987, 181, 181, 181, 181, 299, 299, 318, 319, - 456, 468, 268, 207, 228, 1034, 377, 208, 318, 319, - 378, 229, 331, 228, 327, 327, 327, 327, 231, 207, - 229, 228, 318, 319, 332, 333, 672, 231, 229, 334, - 673, 335, 318, 321, 336, 231, 362, 444, 332, 444, - 228, 333, 445, 445, 445, 445, 979, 229, 1017, 335, - 474, 474, 474, 474, 231, 478, 479, 1033, 336, 317, - 317, 318, 319, 317, 317, 317, 317, 317, 317, 317, - 317, 317, 317, 317, 477, 317, 317, 184, 184, 184, - - 184, 339, 317, 317, 317, 504, 504, 504, 415, 442, - 442, 442, 442, 943, 228, 228, 228, 362, 317, 1032, - 415, 229, 229, 229, 415, 228, 228, 944, 231, 231, - 231, 362, 229, 229, 229, 935, 415, 318, 319, 231, - 231, 268, 291, 317, 317, 317, 317, 318, 319, 317, - 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, - 480, 317, 317, 988, 475, 476, 481, 339, 317, 317, - 317, 228, 342, 343, 482, 342, 343, 496, 229, 257, - 258, 259, 257, 1031, 317, 231, 257, 258, 259, 257, - 340, 489, 489, 489, 489, 488, 229, 342, 343, 269, - - 269, 269, 269, 268, 271, 258, 272, 271, 362, 317, - 317, 342, 343, 483, 271, 258, 272, 271, 281, 281, - 281, 281, 299, 318, 319, 355, 177, 351, 351, 351, - 351, 301, 281, 281, 281, 281, 1030, 356, 357, 522, - 522, 522, 358, 497, 359, 342, 345, 360, 342, 343, - 502, 356, 502, 1029, 357, 503, 503, 503, 503, 497, - 318, 325, 359, 304, 304, 304, 304, 318, 319, 322, - 528, 360, 341, 341, 342, 343, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 386, 341, 341, - 895, 318, 325, 578, 363, 341, 341, 341, 579, 284, - - 322, 280, 280, 280, 280, 941, 500, 500, 500, 500, - 338, 341, 286, 520, 529, 520, 287, 497, 521, 521, - 521, 521, 318, 321, 366, 367, 322, 1028, 286, 366, - 367, 366, 367, 497, 366, 369, 341, 341, 341, 341, - 342, 343, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 407, 341, 341, 897, 342, 349, 323, - 363, 341, 341, 341, 268, 205, 346, 297, 297, 297, - 297, 307, 936, 303, 303, 303, 303, 341, 207, 291, - 342, 349, 208, 364, 309, 366, 367, 937, 310, 346, - 304, 304, 304, 304, 207, 318, 321, 318, 319, 322, - - 309, 515, 341, 341, 366, 367, 342, 345, 342, 345, - 346, 979, 346, 328, 328, 328, 328, 515, 379, 268, - 375, 375, 375, 375, 268, 518, 518, 518, 518, 268, - 380, 381, 323, 318, 319, 382, 515, 383, 342, 343, - 384, 318, 319, 347, 380, 347, 815, 381, 1027, 531, - 531, 816, 515, 366, 373, 383, 229, 534, 534, 534, - 342, 343, 370, 268, 384, 365, 365, 366, 367, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, - 268, 365, 365, 318, 319, 542, 1026, 387, 365, 365, - 365, 882, 392, 573, 573, 318, 319, 443, 443, 328, - - 328, 328, 328, 938, 365, 945, 532, 543, 532, 386, - 527, 533, 533, 533, 533, 318, 319, 366, 367, 536, - 397, 397, 397, 397, 537, 393, 527, 501, 501, 365, - 365, 365, 365, 366, 367, 365, 365, 365, 365, 365, - 365, 365, 365, 365, 365, 365, 1025, 365, 365, 1024, - 318, 319, 632, 387, 365, 365, 365, 342, 343, 576, - 576, 576, 342, 343, 556, 637, 530, 530, 530, 530, - 365, 366, 369, 545, 545, 370, 388, 527, 352, 352, - 352, 352, 342, 343, 1023, 633, 550, 939, 342, 343, - 992, 551, 659, 527, 314, 365, 365, 400, 638, 396, - - 396, 396, 396, 984, 352, 352, 352, 352, 371, 401, - 402, 342, 343, 663, 403, 541, 404, 366, 367, 405, - 342, 343, 546, 401, 546, 660, 402, 547, 547, 547, - 547, 541, 366, 373, 404, 229, 548, 548, 548, 519, - 519, 370, 268, 405, 389, 389, 664, 389, 389, 389, - 389, 389, 389, 389, 389, 389, 389, 389, 389, 982, - 389, 389, 342, 343, 557, 980, 408, 389, 389, 389, - 366, 369, 883, 299, 370, 366, 367, 634, 544, 544, - 544, 544, 679, 389, 1016, 366, 367, 1015, 614, 541, - 1014, 376, 376, 376, 376, 410, 615, 410, 410, 616, - - 1013, 376, 376, 376, 376, 541, 981, 371, 389, 389, - 389, 389, 555, 389, 389, 389, 389, 389, 389, 389, - 389, 389, 389, 389, 389, 1012, 389, 389, 555, 366, - 367, 1011, 408, 389, 389, 389, 366, 367, 446, 446, - 446, 366, 367, 318, 319, 558, 558, 558, 558, 389, - 366, 367, 559, 559, 291, 409, 555, 562, 562, 562, - 1010, 560, 268, 560, 318, 693, 561, 561, 561, 561, - 318, 319, 555, 690, 389, 389, 505, 505, 505, 505, - 366, 367, 573, 573, 564, 505, 505, 505, 574, 565, - 574, 686, 887, 575, 575, 575, 575, 985, 743, 505, - - 505, 505, 505, 505, 505, 273, 273, 1009, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, - 687, 273, 273, 411, 411, 411, 411, 292, 273, 273, - 273, 744, 400, 942, 396, 396, 396, 396, 338, 397, - 397, 397, 397, 338, 273, 402, 504, 504, 504, 403, - 569, 412, 412, 412, 412, 413, 413, 413, 413, 342, - 711, 402, 414, 414, 414, 414, 569, 1008, 708, 273, - 273, 273, 273, 1007, 273, 273, 273, 508, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 509, 509, 509, - - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 273, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 273, 273, 273, 273, 1006, - 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, - 273, 273, 1005, 273, 273, 572, 572, 572, 572, 292, - 273, 273, 273, 583, 1004, 583, 569, 1003, 584, 584, - 584, 584, 442, 442, 442, 442, 273, 445, 445, 445, - 445, 1002, 569, 415, 445, 445, 445, 445, 489, 489, - 489, 489, 488, 228, 1001, 510, 522, 522, 522, 415, - - 229, 273, 273, 523, 523, 523, 523, 231, 228, 228, - 228, 228, 523, 523, 523, 229, 229, 229, 229, 342, - 343, 1000, 231, 231, 231, 231, 523, 523, 523, 523, - 523, 523, 299, 299, 299, 299, 299, 299, 999, 299, - 299, 299, 299, 299, 299, 299, 299, 989, 299, 299, - 998, 228, 228, 641, 315, 299, 299, 299, 229, 229, - 229, 500, 500, 500, 500, 231, 231, 268, 654, 705, - 654, 299, 497, 655, 655, 655, 655, 503, 503, 503, - 503, 503, 503, 503, 503, 366, 729, 997, 497, 811, - 812, 652, 386, 642, 726, 653, 299, 299, 299, 299, - - 299, 299, 299, 299, 472, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 525, 525, 525, 525, 525, 525, - 525, 525, 525, 525, 525, 525, 525, 299, 525, 525, - 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, - 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, - 525, 525, 299, 299, 299, 299, 299, 299, 299, 299, - 996, 299, 299, 299, 299, 299, 299, 299, 299, 995, - 299, 299, 747, 228, 994, 228, 315, 299, 299, 299, - 229, 632, 229, 342, 343, 228, 980, 231, 993, 231, - - 366, 367, 229, 299, 946, 674, 982, 674, 386, 231, - 675, 675, 675, 675, 268, 748, 518, 518, 518, 518, - 637, 643, 526, 978, 633, 644, 645, 515, 299, 299, - 318, 319, 646, 521, 521, 521, 521, 521, 521, 521, - 521, 704, 977, 515, 331, 976, 327, 327, 327, 327, - 723, 318, 319, 638, 291, 318, 319, 333, 366, 367, - 975, 334, 684, 983, 684, 318, 319, 685, 685, 685, - 685, 531, 531, 333, 318, 319, 299, 659, 318, 319, - 634, 533, 533, 533, 533, 679, 318, 319, 318, 319, - 535, 535, 535, 535, 533, 533, 533, 533, 940, 535, - - 535, 535, 534, 534, 534, 314, 722, 663, 318, 689, - 660, 314, 690, 535, 535, 535, 535, 535, 535, 317, - 317, 318, 319, 317, 317, 317, 317, 317, 317, 317, - 317, 317, 317, 317, 984, 317, 317, 318, 319, 974, - 664, 339, 317, 317, 317, 691, 576, 576, 576, 342, - 343, 318, 689, 530, 530, 530, 530, 947, 317, 948, - 702, 407, 702, 407, 527, 703, 703, 703, 703, 738, - 973, 738, 318, 693, 739, 739, 739, 739, 318, 319, - 527, 690, 314, 317, 317, 317, 317, 318, 319, 317, - 317, 538, 317, 317, 317, 317, 317, 317, 317, 317, - - 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, - 317, 539, 539, 539, 539, 539, 539, 539, 539, 539, - 539, 539, 539, 539, 317, 539, 539, 539, 539, 539, - 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, - 539, 539, 539, 539, 539, 539, 539, 539, 539, 317, - 317, 317, 317, 318, 319, 317, 317, 317, 317, 317, - 317, 317, 317, 317, 317, 317, 972, 317, 317, 342, - 343, 971, 229, 339, 317, 317, 317, 318, 695, 268, - 743, 696, 342, 343, 970, 544, 544, 544, 544, 969, - 317, 342, 707, 229, 968, 708, 541, 967, 545, 545, - - 268, 342, 713, 342, 343, 714, 805, 342, 343, 540, - 318, 695, 541, 744, 697, 317, 317, 342, 343, 547, - 547, 547, 547, 547, 547, 547, 547, 806, 709, 342, - 343, 355, 966, 351, 351, 351, 351, 965, 715, 366, - 367, 964, 318, 319, 357, 548, 548, 548, 358, 981, - 720, 1018, 720, 366, 367, 721, 721, 721, 721, 963, - 357, 342, 343, 318, 693, 366, 367, 318, 319, 559, - 559, 538, 690, 366, 367, 342, 343, 549, 549, 549, - 549, 561, 561, 561, 561, 821, 549, 549, 549, 561, - 561, 561, 561, 575, 575, 575, 575, 342, 707, 990, - - 549, 549, 549, 549, 549, 549, 341, 341, 342, 343, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 962, 341, 341, 366, 367, 318, 319, 363, 341, - 341, 341, 366, 367, 961, 572, 572, 572, 572, 960, - 558, 558, 558, 558, 386, 341, 569, 959, 562, 562, - 562, 555, 575, 575, 575, 575, 584, 584, 584, 584, - 342, 343, 569, 584, 584, 584, 584, 555, 958, 822, - 341, 341, 341, 341, 342, 343, 341, 341, 552, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 553, 553, - - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 341, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 341, 341, 341, 341, - 342, 343, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 957, 341, 341, 655, 655, 655, 655, - 363, 341, 341, 341, 366, 725, 956, 228, 726, 366, - 731, 228, 228, 732, 229, 228, 228, 341, 229, 229, - 228, 231, 229, 229, 747, 231, 231, 229, 955, 231, - 231, 342, 343, 983, 231, 1017, 554, 655, 655, 655, - - 655, 727, 341, 341, 366, 367, 733, 675, 675, 675, - 675, 342, 713, 797, 366, 367, 798, 748, 379, 954, - 375, 375, 375, 375, 799, 800, 675, 675, 675, 675, - 950, 381, 366, 725, 825, 382, 318, 319, 342, 343, - 318, 319, 318, 689, 342, 343, 690, 381, 366, 367, - 366, 367, 685, 685, 685, 685, 685, 685, 685, 685, - 703, 703, 703, 703, 563, 563, 563, 563, 949, 342, - 711, 366, 367, 563, 563, 563, 318, 689, 708, 691, - 690, 826, 318, 695, 366, 731, 696, 563, 563, 563, - 563, 563, 563, 365, 365, 366, 367, 365, 365, 365, - - 365, 365, 365, 365, 365, 365, 365, 365, 929, 365, - 365, 342, 343, 691, 829, 387, 365, 365, 365, 697, - 342, 343, 342, 711, 552, 366, 367, 703, 703, 703, - 703, 708, 365, 366, 367, 928, 366, 729, 366, 729, - 927, 721, 721, 721, 721, 726, 991, 726, 1022, 721, - 721, 721, 721, 739, 739, 739, 739, 365, 365, 365, - 365, 366, 367, 365, 365, 566, 365, 365, 365, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, - 365, 365, 365, 365, 365, 567, 567, 567, 567, 567, - 567, 567, 567, 567, 567, 567, 567, 567, 365, 567, - - 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - 567, 567, 567, 365, 365, 365, 365, 366, 367, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, - 926, 365, 365, 366, 367, 318, 319, 387, 365, 365, - 365, 318, 695, 366, 367, 696, 925, 566, 342, 707, - 318, 319, 708, 924, 365, 841, 342, 707, 342, 713, - 708, 923, 714, 342, 713, 366, 725, 714, 842, 726, - 342, 343, 922, 568, 921, 843, 830, 920, 697, 365, - 365, 577, 577, 577, 577, 709, 739, 739, 739, 739, - - 577, 577, 577, 709, 919, 715, 342, 343, 362, 892, - 715, 918, 727, 917, 577, 577, 577, 577, 577, 577, - 389, 389, 986, 389, 389, 389, 389, 389, 389, 389, - 389, 389, 389, 389, 389, 991, 389, 389, 857, 366, - 367, 916, 408, 389, 389, 389, 366, 725, 366, 367, - 726, 366, 731, 858, 915, 732, 386, 894, 228, 389, - 859, 407, 896, 228, 932, 229, 932, 932, 338, 914, - 229, 932, 231, 932, 932, 318, 319, 231, 342, 343, - 407, 366, 367, 727, 389, 389, 389, 389, 733, 389, - 389, 389, 580, 389, 389, 389, 389, 389, 389, 389, - - 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - 389, 389, 581, 581, 581, 581, 581, 581, 581, 581, - 581, 581, 581, 581, 581, 389, 581, 581, 581, 581, - 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, - 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, - 389, 389, 389, 389, 913, 389, 389, 389, 389, 389, - 389, 389, 389, 389, 389, 389, 389, 992, 389, 389, - 318, 319, 986, 912, 408, 389, 389, 389, 366, 731, - 228, 228, 732, 228, 911, 228, 228, 229, 229, 228, - 229, 389, 229, 229, 231, 231, 229, 231, 910, 231, - - 231, 229, 909, 231, 229, 318, 319, 985, 268, 1019, - 582, 268, 407, 908, 907, 733, 389, 389, 505, 505, - 505, 505, 877, 930, 879, 878, 931, 505, 505, 505, - 906, 933, 880, 905, 934, 342, 343, 987, 904, 1020, - 903, 505, 505, 505, 505, 505, 505, 273, 273, 902, - 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, - 273, 273, 951, 273, 273, 979, 342, 343, 988, 666, - 273, 273, 273, 979, 980, 952, 229, 228, 228, 980, - 901, 900, 953, 268, 229, 229, 273, 366, 367, 990, - 229, 231, 231, 899, 366, 367, 989, 268, 1021, 898, - - 811, 881, 876, 875, 874, 873, 872, 871, 870, 869, - 868, 273, 273, 273, 273, 867, 273, 273, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 273, 291, 273, - 273, 291, 291, 291, 291, 292, 273, 273, 273, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 273, 291, 291, 291, 291, 291, 291, 667, - 291, 291, 291, 668, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 273, 273, 523, - 523, 523, 523, 866, 865, 864, 863, 862, 523, 523, - 523, 861, 860, 856, 855, 854, 853, 852, 851, 850, - - 849, 848, 523, 523, 523, 523, 523, 523, 299, 299, - 299, 299, 299, 299, 847, 299, 299, 299, 299, 299, - 299, 299, 299, 846, 299, 299, 845, 844, 840, 839, - 681, 299, 299, 299, 838, 837, 580, 743, 834, 833, - 832, 828, 824, 472, 818, 817, 814, 299, 813, 508, - 659, 808, 807, 804, 803, 802, 801, 472, 640, 632, - 796, 795, 794, 793, 792, 791, 788, 787, 786, 785, - 784, 783, 299, 299, 299, 299, 299, 299, 299, 299, - 782, 299, 299, 299, 299, 299, 299, 299, 299, 314, - 299, 299, 314, 314, 314, 314, 315, 299, 299, 299, - 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, - 314, 314, 314, 299, 314, 314, 314, 314, 314, 314, - 682, 314, 314, 314, 683, 314, 314, 314, 314, 314, - 314, 314, 314, 314, 314, 314, 314, 314, 299, 299, - 318, 319, 781, 780, 779, 778, 777, 776, 775, 774, - 773, 772, 771, 770, 769, 768, 535, 535, 535, 535, - 767, 766, 765, 764, 763, 535, 535, 535, 762, 761, - 760, 759, 758, 757, 756, 755, 754, 753, 743, 535, - 535, 535, 535, 535, 535, 317, 317, 318, 319, 317, - 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, - - 741, 317, 317, 740, 677, 676, 671, 699, 317, 317, - 317, 670, 669, 659, 657, 656, 651, 650, 649, 648, - 488, 614, 598, 594, 317, 640, 635, 632, 630, 629, - 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, - 618, 617, 613, 612, 611, 610, 609, 608, 607, 317, - 317, 317, 317, 318, 319, 317, 317, 317, 317, 317, - 317, 317, 317, 317, 317, 317, 338, 317, 317, 338, - 338, 338, 338, 339, 317, 317, 317, 338, 338, 338, - 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, - 317, 338, 338, 338, 338, 338, 338, 700, 338, 338, - - 338, 701, 338, 338, 338, 338, 338, 338, 338, 338, - 338, 338, 338, 338, 338, 317, 317, 342, 343, 606, - 605, 604, 603, 602, 601, 600, 597, 596, 593, 592, - 591, 590, 589, 549, 549, 549, 549, 588, 587, 586, - 585, 571, 549, 549, 549, 570, 392, 517, 516, 513, - 512, 511, 499, 498, 276, 472, 549, 549, 549, 549, - 549, 549, 341, 341, 342, 343, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 493, 341, 341, - 492, 488, 460, 458, 717, 341, 341, 341, 435, 432, - 430, 484, 421, 472, 268, 471, 465, 464, 461, 449, - - 448, 341, 441, 440, 439, 436, 426, 423, 422, 419, - 418, 417, 167, 406, 392, 390, 313, 268, 294, 290, - 276, 274, 256, 167, 256, 167, 341, 341, 341, 341, - 342, 343, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 362, 341, 341, 362, 362, 362, 362, - 363, 341, 341, 341, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 341, 362, 362, - 362, 362, 362, 362, 718, 362, 362, 362, 719, 362, - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 341, 341, 366, 367, 174, 165, 1054, 96, - - 65, 57, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 563, 563, 563, 563, 1054, 1054, 1054, 1054, 1054, 563, - 563, 563, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 563, 563, 563, 563, 563, 563, 365, - 365, 366, 367, 365, 365, 365, 365, 365, 365, 365, - 365, 365, 365, 365, 1054, 365, 365, 1054, 1054, 1054, - 1054, 735, 365, 365, 365, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 365, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - - 1054, 1054, 1054, 365, 365, 365, 365, 366, 367, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, - 386, 365, 365, 386, 386, 386, 386, 387, 365, 365, - 365, 386, 386, 386, 386, 386, 386, 386, 386, 386, - 386, 386, 386, 386, 365, 386, 386, 386, 386, 386, - 386, 736, 386, 386, 386, 737, 386, 386, 386, 386, - 386, 386, 386, 386, 386, 386, 386, 386, 386, 365, - 365, 577, 577, 577, 577, 1054, 1054, 1054, 1054, 1054, - 577, 577, 577, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 577, 577, 577, 577, 577, 577, - - 389, 389, 1054, 389, 389, 389, 389, 389, 389, 389, - 389, 389, 389, 389, 389, 1054, 389, 389, 1054, 1054, - 1054, 1054, 750, 389, 389, 389, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 389, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 389, 389, 389, 389, 1054, 389, - 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - 389, 407, 389, 389, 407, 407, 407, 407, 408, 389, - 389, 389, 407, 407, 407, 407, 407, 407, 407, 407, - - 407, 407, 407, 407, 407, 389, 407, 407, 407, 407, - 407, 407, 751, 407, 407, 407, 752, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 389, 389, 273, 273, 1054, 273, 273, 273, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 1054, 273, 273, - 1054, 1054, 1054, 1054, 666, 273, 273, 273, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 273, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 273, 273, 273, 273, - - 1054, 273, 273, 273, 273, 273, 273, 273, 273, 273, - 273, 273, 273, 1054, 273, 273, 1054, 1054, 1054, 1054, - 292, 273, 273, 273, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 273, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 809, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 273, 273, 273, 273, 1054, 273, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 273, 273, 1054, - 273, 273, 1054, 1054, 1054, 1054, 292, 273, 273, 273, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - - 1054, 1054, 1054, 273, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 810, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 273, 273, - 299, 299, 299, 299, 299, 299, 1054, 299, 299, 299, - 299, 299, 299, 299, 299, 1054, 299, 299, 1054, 1054, - 1054, 1054, 681, 299, 299, 299, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 299, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 299, 299, 299, 299, 299, 299, - - 299, 299, 1054, 299, 299, 299, 299, 299, 299, 299, - 299, 1054, 299, 299, 1054, 1054, 1054, 1054, 315, 299, - 299, 299, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 299, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 819, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 299, 299, 299, 299, 299, 299, 299, 299, 1054, 299, - 299, 299, 299, 299, 299, 299, 299, 1054, 299, 299, - 1054, 1054, 1054, 1054, 315, 299, 299, 299, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - - 1054, 299, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 820, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 299, 299, 317, 317, - 318, 319, 317, 317, 317, 317, 317, 317, 317, 317, - 317, 317, 317, 1054, 317, 317, 1054, 1054, 1054, 1054, - 699, 317, 317, 317, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 317, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 317, 317, 317, 317, 318, 319, 317, 317, - - 317, 317, 317, 317, 317, 317, 317, 317, 317, 338, - 317, 317, 338, 338, 338, 338, 339, 317, 317, 317, - 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, - 338, 338, 338, 317, 338, 338, 338, 338, 338, 338, - 338, 338, 338, 823, 338, 338, 338, 338, 338, 338, - 338, 338, 338, 338, 338, 338, 338, 338, 317, 317, - 341, 341, 342, 343, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 1054, 341, 341, 1054, 1054, - 1054, 1054, 717, 341, 341, 341, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 341, - - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 341, 341, 341, 341, 342, 343, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 362, 341, 341, 362, 362, 362, 362, 363, 341, - 341, 341, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 341, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 827, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 341, 341, 365, 365, 366, 367, 365, 365, 365, 365, - - 365, 365, 365, 365, 365, 365, 365, 1054, 365, 365, - 1054, 1054, 1054, 1054, 735, 365, 365, 365, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 365, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 365, 365, 365, 365, - 366, 367, 365, 365, 365, 365, 365, 365, 365, 365, - 365, 365, 365, 386, 365, 365, 386, 386, 386, 386, - 387, 365, 365, 365, 386, 386, 386, 386, 386, 386, - 386, 386, 386, 386, 386, 386, 386, 365, 386, 386, - - 386, 386, 386, 386, 386, 386, 386, 831, 386, 386, - 386, 386, 386, 386, 386, 386, 386, 386, 386, 386, - 386, 386, 365, 365, 389, 389, 1054, 389, 389, 389, - 389, 389, 389, 389, 389, 389, 389, 389, 389, 1054, - 389, 389, 1054, 1054, 1054, 1054, 750, 389, 389, 389, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 389, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 389, 389, - 389, 389, 1054, 389, 389, 389, 389, 389, 389, 389, - - 389, 389, 389, 389, 389, 1054, 389, 389, 1054, 1054, - 1054, 1054, 408, 389, 389, 389, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 389, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 835, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 389, 389, 389, 389, 1054, 389, - 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, - 389, 1054, 389, 389, 1054, 1054, 1054, 1054, 408, 389, - 389, 389, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 389, 1054, 1054, 1054, 1054, - - 1054, 1054, 1054, 1054, 1054, 836, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 389, 389, 273, 273, 1054, 273, 273, 273, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 1054, 273, 273, - 1054, 1054, 1054, 1054, 292, 273, 273, 273, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 273, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 884, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 273, 273, 273, 273, - 1054, 273, 273, 273, 273, 273, 273, 273, 273, 273, - - 273, 273, 273, 1054, 273, 273, 1054, 1054, 1054, 1054, - 292, 273, 273, 273, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 273, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 885, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 273, 273, 299, 299, 299, 299, 299, 299, - 1054, 299, 299, 299, 299, 299, 299, 299, 299, 1054, - 299, 299, 1054, 1054, 1054, 1054, 315, 299, 299, 299, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 299, 1054, 1054, 1054, 1054, 1054, 1054, - - 1054, 1054, 1054, 1054, 888, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 299, 299, - 299, 299, 299, 299, 299, 299, 1054, 299, 299, 299, - 299, 299, 299, 299, 299, 1054, 299, 299, 1054, 1054, - 1054, 1054, 315, 299, 299, 299, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 299, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 889, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 299, 299, 317, 317, 318, 319, - 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, - - 317, 338, 317, 317, 338, 338, 338, 338, 339, 317, - 317, 317, 338, 338, 338, 338, 338, 338, 338, 338, - 338, 338, 338, 338, 338, 317, 338, 338, 338, 338, - 338, 338, 338, 338, 338, 338, 890, 338, 338, 338, - 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, - 317, 317, 166, 1054, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 169, 1054, 1054, 169, 169, 177, 1054, - 177, 177, 177, 177, 177, 177, 177, 177, 177, 230, - 230, 230, 230, 230, 230, 230, 230, 260, 260, 260, - 260, 263, 1054, 263, 1054, 263, 263, 263, 263, 267, - - 267, 267, 267, 267, 267, 267, 273, 1054, 273, 273, - 273, 273, 273, 273, 273, 273, 273, 275, 1054, 275, - 275, 275, 275, 275, 275, 275, 275, 275, 278, 1054, - 278, 278, 278, 278, 278, 278, 278, 278, 278, 291, - 1054, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 229, 229, 229, 229, 229, 229, 229, 299, 299, 1054, - 299, 299, 299, 299, 299, 299, 299, 299, 300, 300, - 300, 300, 300, 300, 300, 300, 300, 300, 300, 314, - 314, 1054, 314, 314, 314, 314, 314, 314, 314, 314, - 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, - - 317, 320, 320, 320, 320, 320, 320, 320, 320, 320, - 320, 320, 324, 324, 324, 324, 324, 324, 324, 324, - 324, 324, 324, 338, 338, 338, 338, 338, 338, 338, - 338, 338, 338, 338, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 344, 344, 344, 344, 344, - 344, 344, 344, 344, 344, 344, 348, 348, 348, 348, - 348, 348, 348, 348, 348, 348, 348, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, 365, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 365, 368, - 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, - - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 386, 386, 386, 386, 386, 386, 386, 386, 386, - 386, 386, 389, 1054, 389, 389, 389, 389, 389, 389, - 389, 389, 389, 391, 1054, 391, 391, 391, 391, 391, - 391, 391, 391, 391, 394, 1054, 394, 394, 394, 394, - 394, 394, 394, 394, 394, 407, 1054, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 169, 1054, 1054, 169, - 169, 177, 1054, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 416, 1054, 1054, 416, 416, 416, 447, 1054, - 1054, 447, 229, 229, 229, 229, 229, 229, 229, 230, - - 230, 230, 230, 230, 230, 230, 230, 473, 1054, 1054, - 1054, 1054, 473, 473, 473, 473, 487, 487, 487, 487, - 487, 487, 490, 490, 490, 490, 491, 1054, 491, 491, - 491, 491, 267, 267, 267, 267, 267, 267, 267, 273, - 1054, 273, 273, 273, 273, 273, 273, 273, 273, 273, - 275, 1054, 275, 275, 275, 275, 275, 275, 275, 275, - 275, 278, 1054, 278, 278, 278, 278, 278, 278, 278, - 278, 278, 291, 1054, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 299, 299, 1054, 299, 299, 299, 299, - 299, 299, 299, 299, 300, 300, 300, 300, 300, 300, - - 300, 300, 300, 300, 300, 314, 314, 1054, 314, 314, - 314, 314, 314, 314, 314, 314, 317, 317, 317, 317, - 317, 317, 317, 317, 317, 317, 317, 320, 320, 320, - 320, 320, 320, 320, 320, 320, 320, 320, 324, 324, - 324, 324, 324, 324, 324, 324, 324, 324, 324, 338, - 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 344, 344, 344, 344, 344, 344, 344, 344, 344, - 344, 344, 348, 348, 348, 348, 348, 348, 348, 348, - 348, 348, 348, 362, 362, 362, 362, 362, 362, 362, - - 362, 362, 362, 362, 365, 365, 365, 365, 365, 365, - 365, 365, 365, 365, 365, 368, 368, 368, 368, 368, - 368, 368, 368, 368, 368, 368, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 386, 386, 386, - 386, 386, 386, 386, 386, 386, 386, 386, 389, 1054, - 389, 389, 389, 389, 389, 389, 389, 389, 389, 391, - 1054, 391, 391, 391, 391, 391, 391, 391, 391, 391, - 394, 1054, 394, 394, 394, 394, 394, 394, 394, 394, - 394, 407, 1054, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 169, 1054, 1054, 169, 169, 416, 1054, 1054, - - 416, 416, 416, 447, 1054, 1054, 447, 631, 1054, 631, - 631, 631, 631, 631, 631, 631, 631, 631, 634, 1054, - 634, 634, 634, 634, 634, 634, 634, 634, 634, 636, - 1054, 636, 636, 636, 636, 636, 636, 636, 636, 636, - 639, 639, 639, 639, 639, 639, 639, 230, 230, 230, - 230, 230, 230, 230, 230, 487, 487, 487, 487, 487, - 487, 647, 1054, 647, 647, 647, 647, 491, 1054, 491, - 491, 491, 491, 267, 267, 267, 267, 267, 267, 267, - 273, 1054, 273, 273, 273, 273, 273, 273, 273, 273, - 273, 658, 1054, 658, 658, 658, 658, 658, 658, 658, - - 658, 658, 661, 1054, 661, 661, 661, 661, 661, 661, - 661, 661, 661, 662, 1054, 662, 662, 662, 662, 662, - 662, 662, 662, 662, 665, 1054, 665, 665, 665, 665, - 665, 665, 665, 665, 665, 229, 229, 229, 229, 229, - 229, 229, 299, 299, 1054, 299, 299, 299, 299, 299, - 299, 299, 299, 678, 678, 678, 678, 678, 678, 678, - 678, 678, 678, 678, 680, 680, 1054, 680, 680, 680, - 680, 680, 680, 680, 680, 317, 317, 317, 317, 317, - 317, 317, 317, 317, 317, 317, 688, 688, 688, 688, - 688, 688, 688, 688, 688, 688, 688, 692, 692, 692, - - 692, 692, 692, 692, 692, 692, 692, 692, 694, 694, - 694, 694, 694, 694, 694, 694, 694, 694, 694, 698, - 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 706, 706, 706, 706, 706, 706, 706, 706, 706, - 706, 706, 710, 710, 710, 710, 710, 710, 710, 710, - 710, 710, 710, 712, 712, 712, 712, 712, 712, 712, - 712, 712, 712, 712, 716, 716, 716, 716, 716, 716, - 716, 716, 716, 716, 716, 365, 365, 365, 365, 365, - 365, 365, 365, 365, 365, 365, 724, 724, 724, 724, - - 724, 724, 724, 724, 724, 724, 724, 728, 728, 728, - 728, 728, 728, 728, 728, 728, 728, 728, 730, 730, - 730, 730, 730, 730, 730, 730, 730, 730, 730, 734, - 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, - 389, 1054, 389, 389, 389, 389, 389, 389, 389, 389, - 389, 742, 1054, 742, 742, 742, 742, 742, 742, 742, - 742, 742, 745, 1054, 745, 745, 745, 745, 745, 745, - 745, 745, 745, 746, 1054, 746, 746, 746, 746, 746, - 746, 746, 746, 746, 749, 1054, 749, 749, 749, 749, - 749, 749, 749, 749, 749, 416, 1054, 1054, 416, 416, - - 416, 631, 1054, 631, 631, 631, 631, 631, 631, 631, - 631, 631, 634, 1054, 634, 634, 634, 634, 634, 634, - 634, 634, 634, 636, 1054, 636, 636, 636, 636, 636, - 636, 636, 636, 636, 639, 639, 639, 639, 639, 639, - 639, 230, 230, 230, 230, 230, 230, 230, 230, 647, - 1054, 647, 647, 647, 647, 491, 1054, 491, 491, 491, - 491, 267, 267, 267, 267, 267, 267, 267, 273, 1054, - 273, 273, 273, 273, 273, 273, 273, 273, 273, 658, - 1054, 658, 658, 658, 658, 658, 658, 658, 658, 658, - 661, 1054, 661, 661, 661, 661, 661, 661, 661, 661, - - 661, 662, 1054, 662, 662, 662, 662, 662, 662, 662, - 662, 662, 665, 1054, 665, 665, 665, 665, 665, 665, - 665, 665, 665, 291, 1054, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 229, 229, 229, 229, 229, 229, - 229, 299, 299, 1054, 299, 299, 299, 299, 299, 299, - 299, 299, 678, 678, 678, 678, 678, 678, 678, 678, - 678, 678, 678, 680, 680, 1054, 680, 680, 680, 680, - 680, 680, 680, 680, 314, 314, 1054, 314, 314, 314, - 314, 314, 314, 314, 314, 317, 317, 317, 317, 317, - 317, 317, 317, 317, 317, 317, 688, 688, 688, 688, - - 688, 688, 688, 688, 688, 688, 688, 692, 692, 692, - 692, 692, 692, 692, 692, 692, 692, 692, 694, 694, - 694, 694, 694, 694, 694, 694, 694, 694, 694, 698, - 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 706, 706, 706, 706, 706, 706, 706, 706, 706, - 706, 706, 710, 710, 710, 710, 710, 710, 710, 710, - 710, 710, 710, 712, 712, 712, 712, 712, 712, 712, - 712, 712, 712, 712, 716, 716, 716, 716, 716, 716, - 716, 716, 716, 716, 716, 365, 365, 365, 365, 365, - - 365, 365, 365, 365, 365, 365, 724, 724, 724, 724, - 724, 724, 724, 724, 724, 724, 724, 728, 728, 728, - 728, 728, 728, 728, 728, 728, 728, 728, 730, 730, - 730, 730, 730, 730, 730, 730, 730, 730, 730, 734, - 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, - 389, 1054, 389, 389, 389, 389, 389, 389, 389, 389, - 389, 742, 1054, 742, 742, 742, 742, 742, 742, 742, - 742, 742, 745, 1054, 745, 745, 745, 745, 745, 745, - 745, 745, 745, 746, 1054, 746, 746, 746, 746, 746, - 746, 746, 746, 746, 749, 1054, 749, 749, 749, 749, - - 749, 749, 749, 749, 749, 407, 1054, 407, 407, 407, - 407, 407, 407, 407, 407, 407, 416, 1054, 1054, 416, - 416, 416, 230, 230, 230, 230, 230, 230, 230, 230, - 491, 1054, 491, 491, 491, 491, 267, 267, 267, 267, - 267, 267, 267, 273, 1054, 273, 273, 273, 273, 273, - 273, 273, 273, 273, 291, 1054, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 229, 229, 229, 229, 229, - 229, 229, 299, 299, 1054, 299, 299, 299, 299, 299, - 299, 299, 299, 314, 314, 1054, 314, 314, 314, 314, - 314, 314, 314, 314, 317, 317, 317, 317, 317, 317, - - 317, 317, 317, 317, 317, 23, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054 + 186, 198, 186, 199, 200, 201, 186, 186, 186, 202, + 205, 228, 181, 181, 181, 181, 436, 228, 229, 228, + 224, 225, 206, 207, 229, 231, 229, 208, 241, 209, + 437, 231, 210, 231, 228, 245, 206, 245, 245, 207, + 205, 229, 181, 181, 181, 181, 267, 209, 231, 228, + 243, 317, 318, 207, 167, 210, 229, 208, 228, 232, + 232, 232, 232, 231, 233, 229, 229, 242, 236, 207, + 211, 423, 231, 267, 884, 212, 424, 237, 213, 214, + 215, 216, 217, 218, 228, 228, 219, 168, 220, 221, + 244, 229, 229, 229, 228, 275, 234, 167, 231, 231, + + 267, 229, 235, 245, 164, 245, 245, 180, 231, 181, + 181, 181, 181, 229, 211, 256, 257, 258, 256, 391, + 267, 238, 252, 214, 215, 253, 254, 218, 276, 240, + 168, 238, 787, 221, 239, 1052, 256, 257, 258, 256, + 260, 788, 260, 269, 260, 260, 180, 419, 181, 181, + 181, 181, 392, 186, 246, 592, 186, 167, 186, 420, + 247, 248, 249, 250, 261, 251, 1049, 186, 186, 186, + 317, 318, 593, 186, 184, 184, 184, 184, 205, 1048, + 181, 181, 181, 181, 270, 257, 271, 270, 341, 342, + 168, 207, 431, 229, 432, 208, 268, 268, 268, 268, + + 267, 263, 264, 1047, 317, 324, 265, 207, 270, 257, + 271, 270, 278, 321, 279, 279, 279, 279, 280, 280, + 280, 280, 341, 342, 272, 296, 296, 296, 296, 317, + 320, 272, 456, 321, 272, 365, 366, 1046, 272, 184, + 184, 184, 184, 298, 317, 318, 281, 177, 457, 272, + 282, 283, 300, 279, 279, 279, 279, 272, 303, 303, + 303, 303, 298, 284, 285, 336, 322, 294, 286, 298, + 287, 295, 298, 288, 365, 366, 298, 284, 1045, 301, + 285, 302, 302, 302, 302, 426, 304, 298, 287, 427, + 305, 341, 342, 428, 458, 298, 288, 272, 272, 459, + + 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 360, 272, 272, 337, 317, 318, 889, 291, + 272, 272, 272, 433, 205, 434, 296, 296, 296, 296, + 325, 979, 326, 326, 326, 326, 272, 207, 341, 348, + 451, 208, 492, 365, 366, 341, 344, 345, 452, 345, + 493, 365, 368, 207, 394, 369, 395, 395, 395, 395, + 272, 272, 272, 272, 384, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 290, 272, 272, + 317, 318, 346, 1044, 291, 272, 272, 272, 370, 442, + 442, 365, 372, 1043, 341, 342, 327, 327, 327, 327, + + 369, 272, 162, 361, 162, 162, 891, 292, 316, 228, + 351, 351, 351, 351, 267, 316, 229, 163, 316, 445, + 445, 445, 316, 231, 328, 272, 272, 306, 329, 302, + 302, 302, 302, 316, 396, 396, 396, 396, 352, 307, + 308, 316, 353, 983, 309, 409, 310, 409, 409, 311, + 512, 341, 342, 307, 449, 450, 308, 410, 410, 410, + 410, 596, 397, 597, 310, 349, 398, 350, 350, 350, + 350, 1042, 311, 298, 298, 298, 298, 298, 298, 1041, + 298, 298, 298, 298, 298, 298, 298, 298, 337, 298, + 298, 275, 340, 468, 469, 314, 298, 298, 298, 340, + + 391, 364, 340, 1040, 365, 366, 340, 245, 364, 245, + 245, 364, 298, 385, 465, 364, 893, 340, 373, 466, + 374, 374, 374, 374, 276, 340, 364, 411, 411, 411, + 411, 939, 467, 392, 364, 337, 298, 298, 298, 298, + 298, 298, 298, 298, 1039, 298, 298, 298, 298, 298, + 298, 298, 298, 267, 298, 298, 630, 388, 449, 484, + 314, 298, 298, 298, 388, 465, 1038, 388, 365, 366, + 466, 388, 412, 412, 412, 412, 935, 298, 413, 413, + 413, 413, 388, 315, 375, 375, 375, 375, 229, 631, + 388, 184, 184, 184, 184, 267, 184, 184, 184, 184, + + 1037, 298, 298, 317, 318, 426, 504, 414, 984, 427, + 453, 505, 376, 483, 454, 406, 377, 330, 895, 326, + 326, 326, 326, 414, 441, 441, 441, 441, 455, 331, + 332, 494, 499, 499, 333, 414, 334, 517, 517, 335, + 317, 318, 443, 331, 443, 228, 332, 444, 444, 444, + 444, 414, 229, 337, 334, 473, 473, 473, 473, 231, + 317, 318, 335, 316, 316, 317, 318, 316, 316, 316, + 316, 316, 316, 316, 316, 316, 316, 316, 465, 316, + 316, 635, 228, 522, 1036, 338, 316, 316, 316, 229, + 205, 1035, 181, 181, 181, 181, 231, 228, 228, 228, + + 317, 318, 316, 207, 229, 229, 229, 208, 228, 228, + 985, 231, 231, 231, 636, 229, 229, 317, 320, 207, + 317, 318, 231, 231, 341, 342, 316, 316, 316, 316, + 317, 318, 316, 316, 316, 316, 316, 316, 316, 316, + 316, 316, 316, 478, 316, 316, 267, 474, 475, 479, + 338, 316, 316, 316, 228, 361, 228, 480, 502, 502, + 502, 229, 298, 229, 341, 342, 177, 316, 231, 936, + 231, 300, 1034, 339, 256, 257, 258, 256, 256, 257, + 258, 256, 487, 487, 487, 487, 486, 270, 257, 271, + 270, 316, 316, 341, 342, 1033, 476, 477, 481, 229, + + 341, 342, 268, 268, 268, 268, 267, 354, 1032, 350, + 350, 350, 350, 270, 257, 271, 270, 341, 344, 355, + 356, 520, 520, 520, 357, 576, 358, 341, 342, 359, + 577, 317, 320, 355, 612, 321, 356, 280, 280, 280, + 280, 500, 613, 500, 358, 614, 501, 501, 501, 501, + 365, 366, 359, 340, 340, 341, 342, 340, 340, 340, + 340, 340, 340, 340, 340, 340, 340, 340, 322, 340, + 340, 303, 303, 303, 303, 362, 340, 340, 340, 229, + 283, 267, 279, 279, 279, 279, 267, 280, 280, 280, + 280, 940, 340, 285, 518, 337, 518, 286, 495, 519, + + 519, 519, 519, 317, 324, 1031, 317, 324, 813, 285, + 365, 366, 321, 803, 495, 321, 340, 340, 340, 340, + 341, 342, 340, 340, 340, 340, 340, 340, 340, 340, + 340, 340, 340, 267, 340, 340, 365, 366, 317, 318, + 362, 340, 340, 340, 498, 498, 498, 498, 205, 1030, + 296, 296, 296, 296, 290, 495, 883, 340, 317, 318, + 814, 207, 267, 363, 1029, 208, 317, 320, 365, 368, + 321, 495, 317, 318, 365, 366, 1028, 207, 341, 348, + 657, 340, 340, 365, 366, 526, 670, 345, 529, 529, + 671, 306, 1027, 302, 302, 302, 302, 378, 1026, 374, + + 374, 374, 374, 322, 308, 527, 341, 348, 309, 379, + 380, 317, 318, 658, 381, 345, 382, 571, 571, 383, + 308, 317, 318, 379, 341, 342, 380, 327, 327, 327, + 327, 317, 318, 1025, 382, 534, 933, 532, 532, 532, + 535, 290, 383, 364, 364, 365, 366, 364, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 364, 1024, 364, + 364, 303, 303, 303, 303, 386, 364, 364, 364, 442, + 442, 540, 513, 516, 516, 516, 516, 1023, 317, 318, + 499, 499, 364, 313, 513, 887, 341, 344, 513, 530, + 345, 530, 365, 372, 531, 531, 531, 531, 341, 344, + + 513, 369, 345, 341, 342, 1022, 364, 364, 364, 364, + 365, 366, 364, 364, 364, 364, 364, 364, 364, 364, + 364, 364, 364, 346, 364, 364, 661, 317, 318, 229, + 386, 364, 364, 364, 1021, 346, 267, 365, 368, 317, + 318, 369, 977, 327, 327, 327, 327, 364, 341, 342, + 541, 341, 342, 387, 525, 528, 528, 528, 528, 662, + 267, 365, 366, 804, 543, 543, 525, 546, 546, 546, + 525, 364, 364, 399, 370, 395, 395, 395, 395, 941, + 341, 342, 525, 361, 548, 400, 401, 341, 342, 549, + 402, 409, 403, 409, 409, 404, 341, 342, 990, 400, + + 365, 366, 401, 351, 351, 351, 351, 544, 554, 544, + 403, 982, 545, 545, 545, 545, 517, 517, 404, 388, + 388, 980, 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 986, 388, 388, 341, 342, 365, + 372, 407, 388, 388, 388, 571, 571, 555, 369, 809, + 810, 365, 366, 351, 351, 351, 351, 942, 388, 341, + 342, 361, 365, 368, 539, 978, 369, 375, 375, 375, + 375, 396, 396, 396, 396, 542, 542, 542, 542, 361, + 539, 741, 388, 388, 388, 388, 539, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, 388, 370, + + 388, 388, 539, 365, 366, 1014, 407, 388, 388, 388, + 574, 574, 574, 1013, 742, 365, 366, 365, 366, 375, + 375, 375, 375, 388, 317, 318, 365, 366, 1012, 408, + 553, 557, 557, 560, 560, 560, 410, 410, 410, 410, + 529, 529, 556, 556, 556, 556, 553, 388, 388, 503, + 503, 503, 503, 553, 411, 411, 411, 411, 503, 503, + 503, 365, 366, 317, 318, 562, 445, 445, 445, 553, + 563, 1011, 503, 503, 503, 503, 503, 503, 272, 272, + 839, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 840, 272, 272, 365, 366, 745, 841, + + 291, 272, 272, 272, 502, 502, 502, 558, 977, 558, + 1015, 684, 559, 559, 559, 559, 399, 272, 395, 395, + 395, 395, 412, 412, 412, 412, 520, 520, 520, 401, + 572, 746, 572, 402, 1010, 573, 573, 573, 573, 317, + 318, 272, 272, 272, 272, 401, 272, 272, 272, 506, + 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, 272, 507, + 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, + 507, 507, 272, 507, 507, 507, 507, 507, 507, 507, + 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, + + 507, 507, 507, 507, 507, 507, 272, 272, 272, 272, + 1009, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 980, 272, 272, 396, 396, 396, 396, + 291, 272, 272, 272, 1008, 317, 318, 567, 570, 570, + 570, 570, 413, 413, 413, 413, 934, 272, 630, 567, + 581, 290, 581, 567, 1007, 582, 582, 582, 582, 441, + 441, 441, 441, 317, 687, 567, 508, 341, 342, 290, + 414, 272, 272, 521, 521, 521, 521, 444, 444, 444, + 444, 631, 521, 521, 521, 685, 414, 444, 444, 444, + 444, 487, 487, 487, 487, 486, 521, 521, 521, 521, + + 521, 521, 298, 298, 298, 298, 298, 298, 1006, 298, + 298, 298, 298, 298, 298, 298, 298, 703, 298, 298, + 1005, 228, 228, 228, 314, 298, 298, 298, 229, 229, + 229, 228, 574, 574, 574, 231, 231, 231, 229, 317, + 318, 298, 652, 1004, 652, 231, 1003, 653, 653, 653, + 653, 501, 501, 501, 501, 501, 501, 501, 501, 519, + 519, 519, 519, 317, 693, 298, 298, 298, 298, 298, + 298, 298, 298, 471, 298, 298, 298, 298, 298, 298, + 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, + 298, 298, 298, 523, 523, 523, 523, 523, 523, 523, + + 523, 523, 523, 523, 523, 523, 298, 523, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, + 298, 298, 298, 298, 298, 298, 298, 298, 1002, 298, + 298, 298, 298, 298, 298, 298, 298, 1001, 298, 298, + 317, 318, 228, 981, 314, 298, 298, 298, 228, 229, + 228, 267, 228, 341, 342, 229, 231, 229, 228, 229, + 1000, 298, 231, 999, 231, 229, 231, 229, 228, 543, + 543, 672, 231, 672, 267, 229, 673, 673, 673, 673, + 524, 885, 231, 819, 640, 298, 298, 317, 318, 313, + + 641, 643, 987, 639, 642, 644, 365, 366, 650, 317, + 318, 330, 651, 326, 326, 326, 326, 635, 498, 498, + 498, 498, 557, 557, 332, 532, 532, 532, 333, 495, + 519, 519, 519, 519, 998, 516, 516, 516, 516, 298, + 332, 317, 318, 632, 937, 495, 513, 385, 677, 313, + 636, 365, 366, 317, 318, 317, 691, 533, 533, 533, + 533, 943, 513, 997, 688, 385, 533, 533, 533, 531, + 531, 531, 531, 657, 661, 996, 341, 342, 341, 342, + 533, 533, 533, 533, 533, 533, 316, 316, 317, 318, + 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, + + 316, 721, 316, 316, 317, 318, 658, 662, 338, 316, + 316, 316, 317, 318, 979, 682, 1016, 682, 341, 342, + 683, 683, 683, 683, 702, 316, 341, 342, 531, 531, + 531, 531, 341, 709, 546, 546, 546, 700, 981, 700, + 1015, 706, 701, 701, 701, 701, 341, 705, 995, 316, + 316, 316, 316, 317, 318, 316, 316, 536, 316, 316, + 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, + 316, 316, 316, 316, 316, 316, 316, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 316, 537, 537, 537, 537, 537, 537, 537, 537, 537, + + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 316, 316, 316, 316, 317, 318, + 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, + 316, 994, 316, 316, 317, 318, 365, 366, 338, 316, + 316, 316, 993, 317, 318, 365, 727, 536, 341, 342, + 528, 528, 528, 528, 724, 316, 317, 687, 317, 691, + 688, 525, 228, 741, 317, 693, 298, 688, 694, 229, + 632, 992, 341, 342, 538, 677, 231, 525, 228, 316, + 316, 341, 342, 991, 720, 229, 341, 342, 545, 545, + 545, 545, 231, 689, 982, 354, 742, 350, 350, 350, + + 350, 695, 542, 542, 542, 542, 317, 318, 356, 341, + 711, 976, 357, 539, 341, 342, 341, 705, 341, 711, + 706, 745, 712, 938, 356, 341, 342, 798, 313, 539, + 545, 545, 545, 545, 573, 573, 573, 573, 317, 691, + 313, 547, 547, 547, 547, 365, 366, 688, 975, 820, + 547, 547, 547, 707, 746, 713, 573, 573, 573, 573, + 974, 560, 560, 560, 547, 547, 547, 547, 547, 547, + 340, 340, 341, 342, 340, 340, 340, 340, 340, 340, + 340, 340, 340, 340, 340, 973, 340, 340, 365, 366, + 365, 366, 362, 340, 340, 340, 365, 366, 989, 718, + + 1020, 718, 365, 366, 719, 719, 719, 719, 978, 340, + 365, 723, 559, 559, 559, 559, 341, 709, 559, 559, + 559, 559, 736, 972, 736, 706, 267, 737, 737, 737, + 737, 365, 366, 340, 340, 340, 340, 341, 342, 340, + 340, 550, 340, 340, 340, 340, 340, 340, 340, 340, + 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, + 340, 551, 551, 551, 551, 551, 551, 551, 551, 551, + 551, 551, 551, 551, 340, 551, 551, 551, 551, 551, + 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, + 551, 551, 551, 551, 551, 551, 551, 551, 340, 340, + + 340, 340, 341, 342, 340, 340, 340, 340, 340, 340, + 340, 340, 340, 340, 340, 971, 340, 340, 365, 366, + 365, 729, 362, 340, 340, 340, 970, 570, 570, 570, + 570, 988, 341, 342, 556, 556, 556, 556, 567, 340, + 365, 723, 341, 709, 724, 553, 228, 969, 365, 729, + 229, 706, 730, 229, 567, 341, 342, 267, 552, 968, + 231, 553, 989, 340, 340, 365, 366, 582, 582, 582, + 582, 582, 582, 582, 582, 823, 385, 725, 967, 378, + 931, 374, 374, 374, 374, 731, 228, 795, 228, 966, + 341, 342, 380, 229, 550, 229, 381, 944, 824, 965, + + 231, 385, 231, 653, 653, 653, 653, 406, 380, 365, + 366, 653, 653, 653, 653, 673, 673, 673, 673, 673, + 673, 673, 673, 317, 318, 561, 561, 561, 561, 796, + 797, 365, 366, 964, 561, 561, 561, 365, 727, 683, + 683, 683, 683, 317, 687, 963, 724, 688, 561, 561, + 561, 561, 561, 561, 364, 364, 365, 366, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 364, 364, 962, + 364, 364, 317, 318, 827, 961, 386, 364, 364, 364, + 689, 341, 342, 365, 727, 341, 342, 960, 683, 683, + 683, 683, 724, 364, 365, 366, 959, 701, 701, 701, + + 701, 701, 701, 701, 701, 365, 366, 317, 318, 564, + 719, 719, 719, 719, 317, 318, 958, 364, 364, 364, + 364, 365, 366, 364, 364, 564, 364, 364, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, + 364, 364, 364, 364, 364, 565, 565, 565, 565, 565, + 565, 565, 565, 565, 565, 565, 565, 565, 364, 565, + 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, + 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, + 565, 565, 364, 364, 364, 364, 365, 366, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 364, 364, 990, + + 364, 364, 365, 366, 337, 888, 386, 364, 364, 364, + 737, 737, 737, 737, 341, 342, 317, 687, 317, 693, + 688, 957, 694, 364, 317, 693, 341, 705, 694, 228, + 706, 341, 705, 341, 711, 706, 229, 712, 737, 737, + 737, 737, 566, 231, 406, 828, 956, 364, 364, 575, + 575, 575, 575, 689, 955, 695, 341, 342, 575, 575, + 575, 695, 954, 707, 361, 890, 365, 366, 707, 953, + 713, 875, 575, 575, 575, 575, 575, 575, 388, 388, + 952, 388, 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 948, 388, 388, 947, 365, 366, 229, + + 407, 388, 388, 388, 855, 927, 267, 926, 341, 711, + 365, 366, 712, 719, 719, 719, 719, 388, 925, 856, + 385, 892, 406, 894, 228, 857, 228, 930, 945, 930, + 930, 229, 406, 229, 880, 946, 317, 318, 231, 406, + 231, 388, 388, 388, 388, 713, 388, 388, 388, 578, + 388, 388, 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, 388, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 388, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + + 579, 579, 579, 579, 579, 579, 388, 388, 388, 388, + 949, 388, 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 950, 388, 388, 924, 229, 229, 951, + 407, 388, 388, 388, 267, 267, 930, 923, 930, 930, + 365, 723, 365, 723, 724, 922, 724, 388, 365, 729, + 365, 729, 730, 228, 730, 228, 228, 921, 932, 920, + 229, 919, 229, 229, 881, 918, 580, 231, 917, 231, + 231, 388, 388, 503, 503, 503, 503, 725, 916, 725, + 341, 342, 503, 503, 503, 731, 915, 731, 317, 318, + 984, 914, 877, 928, 365, 366, 503, 503, 503, 503, + + 503, 503, 272, 272, 878, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 913, 272, 272, + 977, 228, 912, 911, 664, 272, 272, 272, 229, 977, + 910, 229, 978, 228, 978, 231, 228, 909, 267, 908, + 229, 272, 907, 229, 906, 229, 905, 231, 904, 903, + 231, 902, 267, 317, 318, 983, 901, 1017, 929, 341, + 342, 985, 900, 1018, 899, 272, 272, 272, 272, 898, + 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 290, 272, 272, 290, 290, 290, 290, 291, + 272, 272, 272, 290, 290, 290, 290, 290, 290, 290, + + 290, 290, 290, 290, 290, 290, 272, 290, 290, 290, + 290, 290, 290, 665, 290, 290, 290, 666, 290, 290, + 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, + 272, 272, 521, 521, 521, 521, 897, 228, 341, 342, + 986, 521, 521, 521, 229, 365, 366, 987, 896, 1019, + 809, 231, 365, 366, 988, 521, 521, 521, 521, 521, + 521, 298, 298, 298, 298, 298, 298, 879, 298, 298, + 298, 298, 298, 298, 298, 298, 874, 298, 298, 873, + 872, 876, 871, 679, 298, 298, 298, 870, 869, 868, + 867, 866, 865, 864, 863, 862, 861, 860, 859, 858, + + 298, 854, 853, 852, 851, 850, 849, 848, 847, 846, + 845, 844, 843, 842, 838, 837, 836, 835, 834, 578, + 741, 832, 831, 830, 298, 298, 298, 298, 298, 298, + 298, 298, 826, 298, 298, 298, 298, 298, 298, 298, + 298, 313, 298, 298, 313, 313, 313, 313, 314, 298, + 298, 298, 313, 313, 313, 313, 313, 313, 313, 313, + 313, 313, 313, 313, 313, 298, 313, 313, 313, 313, + 313, 313, 680, 313, 313, 313, 681, 313, 313, 313, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 298, + 298, 317, 318, 822, 818, 471, 816, 815, 812, 811, + + 808, 506, 657, 806, 805, 802, 801, 533, 533, 533, + 533, 800, 799, 471, 638, 630, 533, 533, 533, 794, + 793, 792, 791, 790, 789, 786, 785, 784, 783, 782, + 533, 533, 533, 533, 533, 533, 316, 316, 317, 318, + 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, + 316, 781, 316, 316, 780, 779, 778, 777, 697, 316, + 316, 316, 776, 775, 774, 773, 772, 771, 770, 769, + 768, 767, 766, 765, 764, 316, 763, 762, 761, 760, + 759, 758, 757, 756, 755, 754, 753, 752, 751, 741, + 739, 738, 675, 674, 669, 668, 667, 657, 655, 316, + + 316, 316, 316, 317, 318, 316, 316, 316, 316, 316, + 316, 316, 316, 316, 316, 316, 337, 316, 316, 337, + 337, 337, 337, 338, 316, 316, 316, 337, 337, 337, + 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, + 316, 337, 337, 337, 337, 337, 337, 698, 337, 337, + 337, 699, 337, 337, 337, 337, 337, 337, 337, 337, + 337, 337, 337, 337, 316, 316, 341, 342, 654, 649, + 648, 647, 646, 486, 612, 596, 592, 638, 633, 630, + 628, 627, 547, 547, 547, 547, 626, 625, 624, 623, + 622, 547, 547, 547, 621, 620, 619, 618, 617, 616, + + 615, 611, 610, 609, 608, 547, 547, 547, 547, 547, + 547, 340, 340, 341, 342, 340, 340, 340, 340, 340, + 340, 340, 340, 340, 340, 340, 607, 340, 340, 606, + 605, 604, 603, 715, 340, 340, 340, 602, 601, 600, + 599, 598, 595, 594, 591, 590, 589, 588, 587, 586, + 340, 585, 584, 583, 569, 568, 391, 515, 514, 511, + 510, 509, 497, 496, 275, 471, 491, 490, 486, 459, + 457, 434, 431, 429, 340, 340, 340, 340, 341, 342, + 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, + 340, 361, 340, 340, 361, 361, 361, 361, 362, 340, + + 340, 340, 361, 361, 361, 361, 361, 361, 361, 361, + 361, 361, 361, 361, 361, 340, 361, 361, 361, 361, + 361, 361, 716, 361, 361, 361, 717, 361, 361, 361, + 361, 361, 361, 361, 361, 361, 361, 361, 361, 340, + 340, 365, 366, 482, 420, 471, 267, 470, 464, 463, + 460, 448, 447, 440, 439, 438, 435, 561, 561, 561, + 561, 425, 422, 421, 418, 417, 561, 561, 561, 416, + 167, 405, 391, 389, 312, 267, 293, 289, 275, 273, + 561, 561, 561, 561, 561, 561, 364, 364, 365, 366, + 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, + + 364, 255, 364, 364, 167, 255, 167, 174, 733, 364, + 364, 364, 165, 1052, 96, 65, 57, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 364, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 364, + 364, 364, 364, 365, 366, 364, 364, 364, 364, 364, + 364, 364, 364, 364, 364, 364, 385, 364, 364, 385, + 385, 385, 385, 386, 364, 364, 364, 385, 385, 385, + 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + 364, 385, 385, 385, 385, 385, 385, 734, 385, 385, + + 385, 735, 385, 385, 385, 385, 385, 385, 385, 385, + 385, 385, 385, 385, 364, 364, 575, 575, 575, 575, + 1052, 1052, 1052, 1052, 1052, 575, 575, 575, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 575, + 575, 575, 575, 575, 575, 388, 388, 1052, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, 388, 388, + 1052, 388, 388, 1052, 1052, 1052, 1052, 748, 388, 388, + 388, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 388, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 388, 388, + 388, 388, 1052, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 406, 388, 388, 406, 406, + 406, 406, 407, 388, 388, 388, 406, 406, 406, 406, + 406, 406, 406, 406, 406, 406, 406, 406, 406, 388, + 406, 406, 406, 406, 406, 406, 749, 406, 406, 406, + 750, 406, 406, 406, 406, 406, 406, 406, 406, 406, + 406, 406, 406, 388, 388, 272, 272, 1052, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 1052, 272, 272, 1052, 1052, 1052, 1052, 664, 272, 272, + + 272, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 272, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 272, 272, + 272, 272, 1052, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 290, 272, 272, 290, 290, + 290, 290, 291, 272, 272, 272, 290, 290, 290, 290, + 290, 290, 290, 290, 290, 290, 290, 290, 290, 272, + 290, 290, 290, 290, 290, 290, 290, 290, 290, 807, + 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, + + 290, 290, 290, 272, 272, 298, 298, 298, 298, 298, + 298, 1052, 298, 298, 298, 298, 298, 298, 298, 298, + 1052, 298, 298, 1052, 1052, 1052, 1052, 679, 298, 298, + 298, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 298, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 298, 298, + 298, 298, 298, 298, 298, 298, 1052, 298, 298, 298, + 298, 298, 298, 298, 298, 313, 298, 298, 313, 313, + 313, 313, 314, 298, 298, 298, 313, 313, 313, 313, + + 313, 313, 313, 313, 313, 313, 313, 313, 313, 298, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 817, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, + 313, 313, 313, 298, 298, 316, 316, 317, 318, 316, + 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, + 1052, 316, 316, 1052, 1052, 1052, 1052, 697, 316, 316, + 316, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 316, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 316, 316, + + 316, 316, 317, 318, 316, 316, 316, 316, 316, 316, + 316, 316, 316, 316, 316, 337, 316, 316, 337, 337, + 337, 337, 338, 316, 316, 316, 337, 337, 337, 337, + 337, 337, 337, 337, 337, 337, 337, 337, 337, 316, + 337, 337, 337, 337, 337, 337, 337, 337, 337, 821, + 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, + 337, 337, 337, 316, 316, 340, 340, 341, 342, 340, + 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, + 1052, 340, 340, 1052, 1052, 1052, 1052, 715, 340, 340, + 340, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + + 1052, 1052, 1052, 1052, 340, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 340, 340, + 340, 340, 341, 342, 340, 340, 340, 340, 340, 340, + 340, 340, 340, 340, 340, 361, 340, 340, 361, 361, + 361, 361, 362, 340, 340, 340, 361, 361, 361, 361, + 361, 361, 361, 361, 361, 361, 361, 361, 361, 340, + 361, 361, 361, 361, 361, 361, 361, 361, 361, 825, + 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + 361, 361, 361, 340, 340, 364, 364, 365, 366, 364, + + 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, + 1052, 364, 364, 1052, 1052, 1052, 1052, 733, 364, 364, + 364, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 364, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 364, 364, + 364, 364, 365, 366, 364, 364, 364, 364, 364, 364, + 364, 364, 364, 364, 364, 385, 364, 364, 385, 385, + 385, 385, 386, 364, 364, 364, 385, 385, 385, 385, + 385, 385, 385, 385, 385, 385, 385, 385, 385, 364, + + 385, 385, 385, 385, 385, 385, 385, 385, 385, 829, + 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + 385, 385, 385, 364, 364, 388, 388, 1052, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, 388, 388, + 1052, 388, 388, 1052, 1052, 1052, 1052, 748, 388, 388, + 388, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 388, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 388, 388, + 388, 388, 1052, 388, 388, 388, 388, 388, 388, 388, + + 388, 388, 388, 388, 388, 406, 388, 388, 406, 406, + 406, 406, 407, 388, 388, 388, 406, 406, 406, 406, + 406, 406, 406, 406, 406, 406, 406, 406, 406, 388, + 406, 406, 406, 406, 406, 406, 406, 406, 406, 833, + 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, + 406, 406, 406, 388, 388, 272, 272, 1052, 272, 272, + 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 290, 272, 272, 290, 290, 290, 290, 291, 272, 272, + 272, 290, 290, 290, 290, 290, 290, 290, 290, 290, + 290, 290, 290, 290, 272, 290, 290, 290, 290, 290, + + 290, 290, 290, 290, 290, 882, 290, 290, 290, 290, + 290, 290, 290, 290, 290, 290, 290, 290, 272, 272, + 298, 298, 298, 298, 298, 298, 1052, 298, 298, 298, + 298, 298, 298, 298, 298, 313, 298, 298, 313, 313, + 313, 313, 314, 298, 298, 298, 313, 313, 313, 313, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 298, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, + 886, 313, 313, 313, 313, 313, 313, 313, 313, 313, + 313, 313, 313, 298, 298, 166, 1052, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 169, 1052, 1052, 169, + + 169, 177, 1052, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 230, 230, 230, 230, 230, 230, 230, 230, + 259, 259, 259, 259, 262, 1052, 262, 1052, 262, 262, + 262, 262, 266, 266, 266, 266, 266, 266, 266, 272, + 1052, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 274, 1052, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 277, 1052, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 290, 1052, 290, 290, 290, 290, 290, 290, + 290, 290, 290, 229, 229, 229, 229, 229, 229, 229, + 298, 298, 1052, 298, 298, 298, 298, 298, 298, 298, + + 298, 299, 299, 299, 299, 299, 299, 299, 299, 299, + 299, 299, 313, 313, 1052, 313, 313, 313, 313, 313, + 313, 313, 313, 316, 316, 316, 316, 316, 316, 316, + 316, 316, 316, 316, 319, 319, 319, 319, 319, 319, + 319, 319, 319, 319, 319, 323, 323, 323, 323, 323, + 323, 323, 323, 323, 323, 323, 337, 337, 337, 337, + 337, 337, 337, 337, 337, 337, 337, 340, 340, 340, + 340, 340, 340, 340, 340, 340, 340, 340, 343, 343, + 343, 343, 343, 343, 343, 343, 343, 343, 343, 347, + 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + + 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + 361, 364, 364, 364, 364, 364, 364, 364, 364, 364, + 364, 364, 367, 367, 367, 367, 367, 367, 367, 367, + 367, 367, 367, 371, 371, 371, 371, 371, 371, 371, + 371, 371, 371, 371, 385, 385, 385, 385, 385, 385, + 385, 385, 385, 385, 385, 388, 1052, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 390, 1052, 390, 390, + 390, 390, 390, 390, 390, 390, 390, 393, 1052, 393, + 393, 393, 393, 393, 393, 393, 393, 393, 406, 1052, + 406, 406, 406, 406, 406, 406, 406, 406, 406, 169, + + 1052, 1052, 169, 169, 177, 1052, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 415, 1052, 1052, 415, 415, + 415, 446, 1052, 1052, 446, 229, 229, 229, 229, 229, + 229, 229, 230, 230, 230, 230, 230, 230, 230, 230, + 472, 1052, 1052, 1052, 1052, 472, 472, 472, 472, 485, + 485, 485, 485, 485, 485, 488, 488, 488, 488, 489, + 1052, 489, 489, 489, 489, 266, 266, 266, 266, 266, + 266, 266, 272, 1052, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 274, 1052, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 277, 1052, 277, 277, 277, 277, + + 277, 277, 277, 277, 277, 290, 1052, 290, 290, 290, + 290, 290, 290, 290, 290, 290, 298, 298, 1052, 298, + 298, 298, 298, 298, 298, 298, 298, 299, 299, 299, + 299, 299, 299, 299, 299, 299, 299, 299, 313, 313, + 1052, 313, 313, 313, 313, 313, 313, 313, 313, 316, + 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 323, 323, 323, 323, 323, 323, 323, 323, 323, + 323, 323, 337, 337, 337, 337, 337, 337, 337, 337, + 337, 337, 337, 340, 340, 340, 340, 340, 340, 340, + + 340, 340, 340, 340, 343, 343, 343, 343, 343, 343, + 343, 343, 343, 343, 343, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 361, 361, 361, 361, + 361, 361, 361, 361, 361, 361, 361, 364, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 364, 367, 367, + 367, 367, 367, 367, 367, 367, 367, 367, 367, 371, + 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, + 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + 385, 388, 1052, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 390, 1052, 390, 390, 390, 390, 390, 390, + + 390, 390, 390, 393, 1052, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 406, 1052, 406, 406, 406, 406, + 406, 406, 406, 406, 406, 169, 1052, 1052, 169, 169, + 415, 1052, 1052, 415, 415, 415, 446, 1052, 1052, 446, + 629, 1052, 629, 629, 629, 629, 629, 629, 629, 629, + 629, 632, 1052, 632, 632, 632, 632, 632, 632, 632, + 632, 632, 634, 1052, 634, 634, 634, 634, 634, 634, + 634, 634, 634, 637, 637, 637, 637, 637, 637, 637, + 230, 230, 230, 230, 230, 230, 230, 230, 485, 485, + 485, 485, 485, 485, 645, 1052, 645, 645, 645, 645, + + 489, 1052, 489, 489, 489, 489, 266, 266, 266, 266, + 266, 266, 266, 272, 1052, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 656, 1052, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 659, 1052, 659, 659, 659, + 659, 659, 659, 659, 659, 659, 660, 1052, 660, 660, + 660, 660, 660, 660, 660, 660, 660, 663, 1052, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 229, 229, + 229, 229, 229, 229, 229, 298, 298, 1052, 298, 298, + 298, 298, 298, 298, 298, 298, 676, 676, 676, 676, + 676, 676, 676, 676, 676, 676, 676, 678, 678, 1052, + + 678, 678, 678, 678, 678, 678, 678, 678, 316, 316, + 316, 316, 316, 316, 316, 316, 316, 316, 316, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 690, 690, 690, 690, 690, 690, 690, 690, 690, 690, + 690, 692, 692, 692, 692, 692, 692, 692, 692, 692, + 692, 692, 696, 696, 696, 696, 696, 696, 696, 696, + 696, 696, 696, 340, 340, 340, 340, 340, 340, 340, + 340, 340, 340, 340, 704, 704, 704, 704, 704, 704, + 704, 704, 704, 704, 704, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 708, 708, 710, 710, 710, 710, + + 710, 710, 710, 710, 710, 710, 710, 714, 714, 714, + 714, 714, 714, 714, 714, 714, 714, 714, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 364, 364, 722, + 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, + 726, 726, 726, 726, 726, 726, 726, 726, 726, 726, + 726, 728, 728, 728, 728, 728, 728, 728, 728, 728, + 728, 728, 732, 732, 732, 732, 732, 732, 732, 732, + 732, 732, 732, 388, 1052, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 740, 1052, 740, 740, 740, 740, + 740, 740, 740, 740, 740, 743, 1052, 743, 743, 743, + + 743, 743, 743, 743, 743, 743, 744, 1052, 744, 744, + 744, 744, 744, 744, 744, 744, 744, 747, 1052, 747, + 747, 747, 747, 747, 747, 747, 747, 747, 415, 1052, + 1052, 415, 415, 415, 629, 1052, 629, 629, 629, 629, + 629, 629, 629, 629, 629, 632, 1052, 632, 632, 632, + 632, 632, 632, 632, 632, 632, 634, 1052, 634, 634, + 634, 634, 634, 634, 634, 634, 634, 637, 637, 637, + 637, 637, 637, 637, 230, 230, 230, 230, 230, 230, + 230, 230, 645, 1052, 645, 645, 645, 645, 489, 1052, + 489, 489, 489, 489, 266, 266, 266, 266, 266, 266, + + 266, 272, 1052, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 656, 1052, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 659, 1052, 659, 659, 659, 659, 659, + 659, 659, 659, 659, 660, 1052, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 663, 1052, 663, 663, 663, + 663, 663, 663, 663, 663, 663, 229, 229, 229, 229, + 229, 229, 229, 298, 298, 1052, 298, 298, 298, 298, + 298, 298, 298, 298, 676, 676, 676, 676, 676, 676, + 676, 676, 676, 676, 676, 678, 678, 1052, 678, 678, + 678, 678, 678, 678, 678, 678, 316, 316, 316, 316, + + 316, 316, 316, 316, 316, 316, 316, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 690, 690, + 690, 690, 690, 690, 690, 690, 690, 690, 690, 692, + 692, 692, 692, 692, 692, 692, 692, 692, 692, 692, + 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, + 696, 340, 340, 340, 340, 340, 340, 340, 340, 340, + 340, 340, 704, 704, 704, 704, 704, 704, 704, 704, + 704, 704, 704, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 710, 710, 710, 710, 710, 710, + 710, 710, 710, 710, 710, 714, 714, 714, 714, 714, + + 714, 714, 714, 714, 714, 714, 364, 364, 364, 364, + 364, 364, 364, 364, 364, 364, 364, 722, 722, 722, + 722, 722, 722, 722, 722, 722, 722, 722, 726, 726, + 726, 726, 726, 726, 726, 726, 726, 726, 726, 728, + 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, + 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, + 732, 388, 1052, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 740, 1052, 740, 740, 740, 740, 740, 740, + 740, 740, 740, 743, 1052, 743, 743, 743, 743, 743, + 743, 743, 743, 743, 744, 1052, 744, 744, 744, 744, + + 744, 744, 744, 744, 744, 747, 1052, 747, 747, 747, + 747, 747, 747, 747, 747, 747, 415, 1052, 1052, 415, + 415, 415, 230, 230, 230, 230, 230, 230, 230, 230, + 489, 1052, 489, 489, 489, 489, 266, 266, 266, 266, + 266, 266, 266, 272, 1052, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 229, 229, 229, 229, 229, 229, + 229, 298, 298, 1052, 298, 298, 298, 298, 298, 298, + 298, 298, 23, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052 } ; -static yyconst flex_int16_t yy_chk[7573] = +static yyconst flex_int16_t yy_chk[7039] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1661,833 +1600,774 @@ static yyconst flex_int16_t yy_chk[7573] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 219, 3, 3, - 3, 29, 44, 44, 3, 3, 219, 3, 3, 13, - 3, 3, 3, 6, 14, 6, 6, 3, 3, 3, - 3, 13, 13, 13, 13, 35, 14, 14, 14, 14, - - 25, 1048, 25, 25, 29, 102, 6, 35, 27, 27, - 27, 27, 3, 33, 3, 25, 31, 3, 31, 3, - 31, 31, 3, 27, 3, 45, 45, 33, 102, 3, - 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 1, 1, 1, 1, 1, 3, 219, 3, 3, 3, + 29, 44, 44, 3, 3, 219, 3, 3, 13, 3, + 3, 3, 6, 14, 6, 6, 3, 3, 3, 3, + 13, 13, 13, 13, 35, 14, 14, 14, 14, 25, + + 196, 25, 25, 29, 196, 6, 35, 27, 27, 27, + 27, 3, 33, 3, 25, 31, 3, 31, 3, 31, + 31, 3, 27, 3, 45, 45, 33, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 15, 15, 15, 15, 15, - + 11, 11, 11, 11, 11, 11, 11, 11, 11, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 15, 15, 15, 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 19, 19, 19, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 21, 21, 21, 21, 21, 21, 21, - + 19, 19, 19, 19, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 36, - 1044, 36, 36, 36, 36, 40, 38, 36, 38, 38, - 38, 38, 40, 624, 38, 39, 39, 39, 39, 46, - 46, 39, 624, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 56, 39, 39, 39, - + 1046, 36, 36, 36, 36, 40, 38, 36, 38, 38, + 38, 38, 40, 102, 38, 39, 39, 39, 39, 46, + 46, 39, 1042, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 102, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 41, 47, 41, 41, 41, 41, 57, 57, 47, - 193, 70, 49, 41, 41, 193, 47, 56, 41, 49, - 41, 54, 55, 41, 114, 114, 49, 41, 54, 42, - 41, 42, 42, 42, 42, 54, 50, 58, 41, 58, - 58, 48, 42, 50, 70, 1043, 42, 41, 48, 51, - 50, 48, 48, 48, 48, 48, 51, 49, 42, 43, - 116, 116, 55, 51, 43, 54, 78, 43, 43, 43, - 43, 43, 43, 78, 50, 43, 52, 43, 43, 828, - - 50, 53, 828, 52, 87, 196, 51, 113, 53, 196, - 52, 59, 59, 59, 59, 53, 197, 62, 197, 60, - 51, 60, 60, 60, 60, 62, 62, 62, 62, 62, - 62, 67, 67, 67, 67, 64, 62, 87, 53, 52, - 113, 1042, 64, 69, 69, 69, 69, 126, 126, 64, - 153, 53, 61, 71, 1040, 71, 74, 71, 71, 73, - 217, 73, 73, 73, 73, 217, 74, 74, 74, 74, - 61, 61, 64, 61, 80, 61, 166, 61, 61, 61, - 61, 80, 61, 153, 61, 61, 61, 81, 81, 81, - 81, 61, 1039, 74, 74, 128, 128, 76, 74, 76, - - 76, 76, 76, 815, 80, 82, 82, 82, 82, 166, - 76, 198, 79, 198, 76, 79, 79, 79, 79, 79, - 89, 1037, 89, 89, 89, 89, 76, 90, 90, 90, - 90, 815, 92, 99, 99, 99, 99, 117, 117, 92, - 200, 117, 92, 105, 118, 118, 92, 105, 98, 98, - 98, 98, 105, 118, 200, 90, 256, 92, 298, 90, - 91, 256, 91, 91, 91, 91, 92, 107, 107, 107, - 107, 109, 91, 91, 117, 190, 98, 91, 109, 91, - 98, 109, 91, 123, 123, 109, 91, 190, 106, 91, - 106, 106, 106, 106, 298, 107, 109, 91, 1036, 107, - - 130, 130, 138, 138, 123, 109, 91, 94, 94, 130, - 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, - 94, 94, 1033, 94, 94, 214, 119, 119, 267, 94, - 94, 94, 94, 214, 100, 267, 100, 100, 100, 100, - 119, 1030, 119, 119, 119, 119, 94, 100, 131, 131, - 1029, 100, 140, 140, 129, 129, 206, 206, 129, 142, - 142, 275, 131, 100, 131, 131, 131, 131, 142, 213, - 213, 94, 94, 95, 95, 1028, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 1026, 95, - 95, 129, 120, 120, 275, 95, 95, 95, 95, 155, - - 216, 155, 155, 155, 155, 132, 132, 1025, 120, 120, - 120, 120, 95, 1024, 135, 135, 216, 429, 95, 429, - 122, 132, 132, 132, 132, 141, 141, 122, 1023, 141, - 122, 209, 209, 209, 122, 135, 120, 95, 95, 108, - 120, 108, 108, 108, 108, 122, 227, 227, 1016, 132, - 134, 108, 108, 132, 122, 195, 108, 134, 108, 195, - 134, 108, 141, 195, 134, 108, 230, 146, 108, 163, - 1011, 163, 163, 230, 146, 134, 108, 146, 253, 253, - 230, 146, 285, 285, 134, 108, 111, 111, 111, 111, - 111, 111, 146, 111, 111, 111, 111, 111, 111, 111, - - 111, 146, 111, 111, 143, 143, 147, 147, 111, 111, - 111, 111, 156, 156, 156, 156, 308, 308, 143, 426, - 143, 143, 143, 143, 158, 111, 162, 147, 162, 162, - 246, 158, 246, 246, 158, 249, 426, 290, 158, 249, - 156, 162, 290, 249, 156, 170, 170, 170, 170, 158, - 111, 111, 112, 112, 112, 112, 112, 112, 158, 112, - 112, 112, 112, 112, 112, 112, 112, 1010, 112, 112, - 171, 171, 171, 171, 112, 112, 112, 112, 172, 172, - 172, 172, 144, 144, 173, 173, 173, 173, 266, 317, - 317, 112, 180, 180, 180, 180, 266, 112, 144, 144, - - 144, 144, 215, 222, 313, 824, 215, 824, 222, 313, - 181, 943, 181, 181, 181, 181, 112, 112, 121, 121, - 215, 222, 514, 181, 234, 1008, 144, 181, 319, 319, - 144, 234, 121, 237, 121, 121, 121, 121, 234, 181, - 237, 236, 322, 322, 121, 121, 514, 237, 236, 121, - 514, 121, 323, 323, 121, 236, 943, 207, 121, 207, - 232, 121, 207, 207, 207, 207, 979, 232, 979, 121, - 232, 232, 232, 232, 232, 237, 237, 1007, 121, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 236, 124, 124, 184, 184, 184, + 41, 47, 41, 41, 41, 41, 200, 51, 47, 49, + 57, 57, 41, 41, 51, 47, 49, 41, 55, 41, + 200, 51, 41, 49, 52, 58, 41, 58, 58, 41, + 42, 52, 42, 42, 42, 42, 813, 41, 52, 48, + 56, 114, 114, 42, 70, 41, 48, 42, 50, 48, + 48, 48, 48, 48, 49, 50, 78, 55, 51, 42, + 43, 193, 50, 78, 813, 43, 193, 52, 43, 43, + 43, 43, 43, 43, 53, 54, 43, 70, 43, 43, + 56, 53, 54, 266, 64, 87, 50, 113, 53, 54, + + 266, 64, 50, 59, 59, 59, 59, 60, 64, 60, + 60, 60, 60, 80, 62, 67, 67, 67, 67, 153, + 80, 53, 62, 62, 62, 62, 62, 62, 87, 54, + 113, 64, 622, 62, 53, 61, 69, 69, 69, 69, + 71, 622, 71, 80, 71, 71, 73, 190, 73, 73, + 73, 73, 153, 61, 61, 425, 61, 166, 61, 190, + 61, 61, 61, 61, 74, 61, 1041, 61, 61, 61, + 116, 116, 425, 61, 74, 74, 74, 74, 76, 1040, + 76, 76, 76, 76, 81, 81, 81, 81, 126, 126, + 166, 76, 197, 79, 197, 76, 79, 79, 79, 79, + + 79, 74, 74, 1038, 118, 118, 74, 76, 82, 82, + 82, 82, 89, 118, 89, 89, 89, 89, 90, 90, + 90, 90, 128, 128, 92, 99, 99, 99, 99, 117, + 117, 92, 216, 117, 92, 138, 138, 1037, 92, 98, + 98, 98, 98, 105, 123, 123, 90, 105, 216, 92, + 90, 91, 105, 91, 91, 91, 91, 92, 107, 107, + 107, 107, 109, 91, 91, 123, 117, 98, 91, 109, + 91, 98, 109, 91, 140, 140, 109, 91, 1035, 106, + 91, 106, 106, 106, 106, 195, 107, 109, 91, 195, + 107, 135, 135, 195, 217, 109, 91, 94, 94, 217, - 184, 124, 124, 124, 124, 288, 288, 288, 184, 205, - 205, 205, 205, 892, 233, 235, 239, 892, 124, 1005, - 205, 233, 235, 239, 184, 238, 240, 893, 233, 235, - 239, 893, 238, 240, 270, 884, 205, 334, 334, 238, - 240, 270, 884, 124, 124, 125, 125, 125, 125, 125, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 135, 94, 94, 822, 119, 119, 822, 94, + 94, 94, 94, 198, 100, 198, 100, 100, 100, 100, + 119, 933, 119, 119, 119, 119, 94, 100, 130, 130, + 214, 100, 265, 147, 147, 129, 129, 130, 214, 129, + 265, 141, 141, 100, 155, 141, 155, 155, 155, 155, + 94, 94, 95, 95, 147, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 933, 95, 95, + 120, 120, 129, 1034, 95, 95, 95, 95, 141, 206, + 206, 142, 142, 1031, 132, 132, 120, 120, 120, 120, + + 142, 95, 162, 826, 162, 162, 826, 95, 122, 230, + 132, 132, 132, 132, 297, 122, 230, 162, 122, 209, + 209, 209, 122, 230, 120, 95, 95, 108, 120, 108, + 108, 108, 108, 122, 156, 156, 156, 156, 132, 108, + 108, 122, 132, 939, 108, 163, 108, 163, 163, 108, + 297, 131, 131, 108, 213, 213, 108, 170, 170, 170, + 170, 428, 156, 428, 108, 131, 156, 131, 131, 131, + 131, 1028, 108, 111, 111, 111, 111, 111, 111, 1027, + 111, 111, 111, 111, 111, 111, 111, 111, 939, 111, + 111, 274, 134, 227, 227, 111, 111, 111, 111, 134, + + 390, 146, 134, 1026, 143, 143, 134, 245, 146, 245, + 245, 146, 111, 830, 222, 146, 830, 134, 143, 222, + 143, 143, 143, 143, 274, 134, 146, 171, 171, 171, + 171, 888, 222, 390, 146, 888, 111, 111, 112, 112, + 112, 112, 112, 112, 1024, 112, 112, 112, 112, 112, + 112, 112, 112, 884, 112, 112, 465, 158, 252, 252, + 112, 112, 112, 112, 158, 255, 1023, 158, 144, 144, + 255, 158, 172, 172, 172, 172, 884, 112, 173, 173, + 173, 173, 158, 112, 144, 144, 144, 144, 269, 465, + 158, 180, 180, 180, 180, 269, 184, 184, 184, 184, + + 1022, 112, 112, 121, 121, 248, 289, 184, 940, 248, + 215, 289, 144, 248, 215, 834, 144, 121, 834, 121, + 121, 121, 121, 184, 205, 205, 205, 205, 215, 121, + 121, 269, 284, 284, 121, 205, 121, 307, 307, 121, + 316, 316, 207, 121, 207, 232, 121, 207, 207, 207, + 207, 205, 232, 940, 121, 232, 232, 232, 232, 232, + 318, 318, 121, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 312, 124, + 124, 471, 234, 312, 1021, 124, 124, 124, 124, 234, + 181, 1014, 181, 181, 181, 181, 234, 233, 235, 238, + + 321, 321, 124, 181, 233, 235, 238, 181, 237, 239, + 941, 233, 235, 238, 471, 237, 239, 322, 322, 181, + 333, 333, 237, 239, 340, 340, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 238, 125, 125, 944, 233, 235, 239, 125, 125, 125, - 125, 241, 341, 341, 240, 343, 343, 270, 241, 257, - 257, 257, 257, 1004, 125, 241, 259, 259, 259, 259, - 125, 261, 261, 261, 261, 261, 269, 346, 346, 269, - - 269, 269, 269, 269, 271, 271, 271, 271, 944, 125, - 125, 133, 133, 241, 272, 272, 272, 272, 279, 279, - 279, 279, 300, 329, 329, 133, 300, 133, 133, 133, - 133, 300, 281, 281, 281, 281, 1003, 133, 133, 311, - 311, 311, 133, 281, 133, 347, 347, 133, 358, 358, - 286, 133, 286, 1001, 133, 286, 286, 286, 286, 281, - 324, 324, 133, 302, 302, 302, 302, 330, 330, 324, - 329, 133, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 832, 136, 136, - 832, 325, 325, 406, 136, 136, 136, 136, 406, 280, - - 325, 280, 280, 280, 280, 890, 284, 284, 284, 284, - 890, 136, 280, 309, 330, 309, 280, 284, 309, 309, - 309, 309, 320, 320, 365, 365, 320, 1000, 280, 367, - 367, 370, 370, 284, 371, 371, 136, 136, 137, 137, + 125, 125, 125, 237, 125, 125, 885, 233, 235, 238, + 125, 125, 125, 125, 236, 941, 240, 239, 287, 287, + 287, 236, 299, 240, 342, 342, 299, 125, 236, 885, + 240, 299, 1009, 125, 256, 256, 256, 256, 258, 258, + 258, 258, 260, 260, 260, 260, 260, 270, 270, 270, + 270, 125, 125, 133, 133, 1008, 236, 236, 240, 268, + + 345, 345, 268, 268, 268, 268, 268, 133, 1006, 133, + 133, 133, 133, 271, 271, 271, 271, 346, 346, 133, + 133, 310, 310, 310, 133, 405, 133, 357, 357, 133, + 405, 319, 319, 133, 450, 319, 133, 278, 278, 278, + 278, 285, 450, 285, 133, 450, 285, 285, 285, 285, + 364, 364, 133, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 319, 136, + 136, 301, 301, 301, 301, 136, 136, 136, 136, 650, + 279, 670, 279, 279, 279, 279, 650, 280, 280, 280, + 280, 889, 136, 279, 308, 889, 308, 279, 280, 308, + + 308, 308, 308, 323, 323, 1005, 324, 324, 670, 279, + 366, 366, 323, 650, 280, 324, 136, 136, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 836, 137, 137, 836, 348, 348, 320, - 137, 137, 137, 137, 886, 297, 348, 297, 297, 297, - 297, 303, 885, 303, 303, 303, 303, 137, 297, 885, - 349, 349, 297, 137, 303, 382, 382, 886, 303, 349, - 304, 304, 304, 304, 297, 321, 321, 326, 326, 321, - - 303, 304, 137, 137, 145, 145, 344, 344, 345, 345, - 344, 937, 345, 326, 326, 326, 326, 304, 145, 672, - 145, 145, 145, 145, 673, 307, 307, 307, 307, 937, - 145, 145, 321, 332, 332, 145, 307, 145, 353, 353, - 145, 335, 335, 344, 145, 345, 672, 145, 999, 332, - 332, 673, 307, 372, 372, 145, 805, 335, 335, 335, - 354, 354, 372, 805, 145, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 887, 148, 148, 328, 328, 353, 998, 148, 148, 148, - 148, 805, 391, 401, 401, 333, 333, 443, 443, 328, - - 328, 328, 328, 887, 148, 894, 333, 354, 333, 894, - 328, 333, 333, 333, 333, 337, 337, 377, 377, 337, - 395, 395, 395, 395, 337, 391, 328, 501, 501, 148, - 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 996, 149, 149, 995, - 331, 331, 466, 149, 149, 149, 149, 356, 356, 404, - 404, 404, 350, 350, 377, 472, 331, 331, 331, 331, - 149, 368, 368, 356, 356, 368, 149, 331, 350, 350, - 350, 350, 361, 361, 994, 466, 361, 888, 352, 352, - 992, 361, 506, 331, 888, 149, 149, 157, 472, 157, - - 157, 157, 157, 984, 352, 352, 352, 352, 368, 157, - 157, 357, 357, 508, 157, 352, 157, 378, 378, 157, - 359, 359, 357, 157, 357, 506, 157, 357, 357, 357, - 357, 352, 373, 373, 157, 806, 359, 359, 359, 519, - 519, 373, 806, 157, 160, 160, 508, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 982, - 160, 160, 355, 355, 378, 980, 160, 160, 160, 160, - 369, 369, 806, 524, 369, 374, 374, 524, 355, 355, - 355, 355, 524, 160, 978, 376, 376, 977, 451, 355, - 976, 374, 374, 374, 374, 410, 451, 410, 410, 451, - - 975, 376, 376, 376, 376, 355, 935, 369, 160, 160, - 161, 161, 376, 161, 161, 161, 161, 161, 161, 161, - 161, 161, 161, 161, 161, 973, 161, 161, 376, 379, - 379, 972, 161, 161, 161, 161, 380, 380, 446, 446, - 446, 383, 383, 528, 528, 379, 379, 379, 379, 161, - 381, 381, 380, 380, 935, 161, 379, 383, 383, 383, - 971, 381, 816, 381, 537, 537, 381, 381, 381, 381, - 529, 529, 379, 537, 161, 161, 289, 289, 289, 289, - 385, 385, 573, 573, 385, 289, 289, 289, 402, 385, - 402, 528, 816, 402, 402, 402, 402, 941, 578, 289, - - 289, 289, 289, 289, 289, 291, 291, 970, 291, 291, + 137, 137, 137, 671, 137, 137, 369, 369, 328, 328, + 137, 137, 137, 137, 283, 283, 283, 283, 296, 1003, + 296, 296, 296, 296, 808, 283, 808, 137, 329, 329, + 671, 296, 512, 137, 1002, 296, 320, 320, 370, 370, + 320, 283, 331, 331, 381, 381, 1001, 296, 347, 347, + 504, 137, 137, 145, 145, 328, 512, 347, 331, 331, + 512, 302, 999, 302, 302, 302, 302, 145, 998, 145, + + 145, 145, 145, 320, 302, 329, 348, 348, 302, 145, + 145, 325, 325, 504, 145, 348, 145, 400, 400, 145, + 302, 334, 334, 145, 352, 352, 145, 325, 325, 325, + 325, 336, 336, 997, 145, 336, 882, 334, 334, 334, + 336, 882, 145, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 996, 148, + 148, 303, 303, 303, 303, 148, 148, 148, 148, 442, + 442, 352, 303, 306, 306, 306, 306, 994, 332, 332, + 499, 499, 148, 818, 306, 818, 343, 343, 303, 332, + 343, 332, 371, 371, 332, 332, 332, 332, 344, 344, + + 306, 371, 344, 353, 353, 993, 148, 148, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, + 149, 149, 149, 343, 149, 149, 506, 327, 327, 651, + 149, 149, 149, 149, 992, 344, 651, 367, 367, 330, + 330, 367, 935, 327, 327, 327, 327, 149, 355, 355, + 353, 358, 358, 149, 327, 330, 330, 330, 330, 506, + 935, 376, 376, 651, 355, 355, 330, 358, 358, 358, + 327, 149, 149, 157, 367, 157, 157, 157, 157, 890, + 360, 360, 330, 890, 360, 157, 157, 349, 349, 360, + 157, 409, 157, 409, 409, 157, 356, 356, 990, 157, + + 377, 377, 157, 349, 349, 349, 349, 356, 376, 356, + 157, 982, 356, 356, 356, 356, 517, 517, 157, 160, + 160, 980, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 942, 160, 160, 351, 351, 372, + 372, 160, 160, 160, 160, 571, 571, 377, 372, 667, + 667, 373, 373, 351, 351, 351, 351, 891, 160, 354, + 354, 891, 368, 368, 351, 978, 368, 373, 373, 373, + 373, 394, 394, 394, 394, 354, 354, 354, 354, 942, + 351, 576, 160, 160, 161, 161, 354, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 161, 161, 368, + + 161, 161, 354, 375, 375, 976, 161, 161, 161, 161, + 403, 403, 403, 975, 576, 379, 379, 382, 382, 375, + 375, 375, 375, 161, 529, 529, 378, 378, 974, 161, + 375, 379, 379, 382, 382, 382, 410, 410, 410, 410, + 529, 529, 378, 378, 378, 378, 375, 161, 161, 288, + 288, 288, 288, 378, 411, 411, 411, 411, 288, 288, + 288, 384, 384, 526, 526, 384, 445, 445, 445, 378, + 384, 973, 288, 288, 288, 288, 288, 288, 290, 290, + 756, 290, 290, 290, 290, 290, 290, 290, 290, 290, + 290, 290, 290, 756, 290, 290, 380, 380, 578, 756, + + 290, 290, 290, 290, 502, 502, 502, 380, 977, 380, + 977, 526, 380, 380, 380, 380, 395, 290, 395, 395, + 395, 395, 412, 412, 412, 412, 520, 520, 520, 395, + 401, 578, 401, 395, 971, 401, 401, 401, 401, 688, + 688, 290, 290, 291, 291, 395, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 529, 291, 291, 411, 411, 411, 411, 291, 291, 291, - 291, 578, 396, 891, 396, 396, 396, 396, 891, 397, - 397, 397, 397, 941, 291, 396, 504, 504, 504, 396, - 397, 412, 412, 412, 412, 413, 413, 413, 413, 551, - 551, 396, 414, 414, 414, 414, 397, 969, 551, 291, - 291, 292, 292, 968, 292, 292, 292, 292, 292, 292, - 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, - 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, - - 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, - 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, - 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, - 292, 292, 292, 292, 292, 292, 292, 293, 293, 965, - 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, - 293, 293, 964, 293, 293, 400, 400, 400, 400, 293, - 293, 293, 293, 415, 963, 415, 400, 962, 415, 415, - 415, 415, 442, 442, 442, 442, 293, 444, 444, 444, - 444, 960, 400, 442, 445, 445, 445, 445, 489, 489, - 489, 489, 489, 474, 958, 293, 522, 522, 522, 442, - - 474, 293, 293, 312, 312, 312, 312, 474, 475, 476, - 477, 479, 312, 312, 312, 475, 476, 477, 479, 543, - 543, 957, 475, 476, 477, 479, 312, 312, 312, 312, - 312, 312, 314, 314, 314, 314, 314, 314, 956, 314, - 314, 314, 314, 314, 314, 314, 314, 945, 314, 314, - 955, 478, 480, 475, 314, 314, 314, 314, 478, 480, - 496, 500, 500, 500, 500, 478, 480, 496, 497, 543, - 497, 314, 500, 497, 497, 497, 497, 502, 502, 502, - 502, 503, 503, 503, 503, 565, 565, 954, 500, 669, - 669, 496, 945, 478, 565, 496, 314, 314, 315, 315, - - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 316, 316, 316, 316, 316, 316, - 953, 316, 316, 316, 316, 316, 316, 316, 316, 952, - 316, 316, 580, 481, 951, 482, 316, 316, 316, 316, - 481, 631, 482, 542, 542, 483, 938, 481, 950, 482, - - 557, 557, 483, 316, 895, 515, 936, 515, 895, 483, - 515, 515, 515, 515, 938, 580, 518, 518, 518, 518, - 636, 481, 316, 928, 631, 481, 482, 518, 316, 316, - 327, 327, 483, 520, 520, 520, 520, 521, 521, 521, - 521, 542, 926, 518, 327, 925, 327, 327, 327, 327, - 557, 527, 527, 636, 936, 531, 531, 327, 556, 556, - 924, 327, 527, 939, 527, 532, 532, 527, 527, 527, - 527, 531, 531, 327, 336, 336, 678, 658, 533, 533, - 678, 532, 532, 532, 532, 678, 534, 534, 690, 690, - 336, 336, 336, 336, 533, 533, 533, 533, 889, 336, - - 336, 336, 534, 534, 534, 889, 556, 662, 536, 536, - 658, 939, 536, 336, 336, 336, 336, 336, 336, 338, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + + 291, 291, 291, 291, 291, 291, 291, 291, 292, 292, + 970, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 934, 292, 292, 396, 396, 396, 396, + 292, 292, 292, 292, 969, 527, 527, 396, 399, 399, + 399, 399, 413, 413, 413, 413, 883, 292, 629, 399, + 414, 883, 414, 396, 968, 414, 414, 414, 414, 441, + 441, 441, 441, 689, 689, 399, 292, 541, 541, 934, + 441, 292, 292, 311, 311, 311, 311, 443, 443, 443, + 443, 629, 311, 311, 311, 527, 441, 444, 444, 444, + 444, 487, 487, 487, 487, 487, 311, 311, 311, 311, + + 311, 311, 313, 313, 313, 313, 313, 313, 967, 313, + 313, 313, 313, 313, 313, 313, 313, 541, 313, 313, + 966, 473, 475, 477, 313, 313, 313, 313, 473, 475, + 477, 478, 574, 574, 574, 473, 475, 477, 478, 694, + 694, 313, 495, 963, 495, 478, 962, 495, 495, 495, + 495, 500, 500, 500, 500, 501, 501, 501, 501, 518, + 518, 518, 518, 695, 695, 313, 313, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 315, 315, 315, 315, 315, 315, 961, 315, + 315, 315, 315, 315, 315, 315, 315, 960, 315, 315, + 684, 684, 476, 937, 315, 315, 315, 315, 474, 476, + 480, 814, 479, 543, 543, 474, 476, 480, 481, 479, + 958, 315, 474, 956, 480, 481, 479, 494, 639, 543, + 543, 513, 481, 513, 494, 639, 513, 513, 513, 513, + 315, 814, 639, 684, 476, 315, 315, 326, 326, 937, + + 479, 480, 943, 474, 479, 481, 557, 557, 494, 532, + 532, 326, 494, 326, 326, 326, 326, 634, 498, 498, + 498, 498, 557, 557, 326, 532, 532, 532, 326, 498, + 519, 519, 519, 519, 955, 516, 516, 516, 516, 522, + 326, 335, 335, 522, 886, 498, 516, 943, 522, 886, + 634, 555, 555, 530, 530, 535, 535, 335, 335, 335, + 335, 892, 516, 954, 535, 892, 335, 335, 335, 530, + 530, 530, 530, 656, 660, 953, 540, 540, 706, 706, + 335, 335, 335, 335, 335, 335, 337, 337, 337, 337, + 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, + + 337, 555, 337, 337, 525, 525, 656, 660, 337, 337, + 337, 337, 531, 531, 979, 525, 979, 525, 546, 546, + 525, 525, 525, 525, 540, 337, 539, 539, 531, 531, + 531, 531, 549, 549, 546, 546, 546, 539, 981, 539, + 981, 549, 539, 539, 539, 539, 707, 707, 952, 337, + 337, 338, 338, 338, 338, 338, 338, 338, 338, 338, + 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, + 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, + 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, - 338, 338, 338, 338, 940, 338, 338, 530, 530, 923, - 662, 338, 338, 338, 338, 536, 576, 576, 576, 541, - 541, 691, 691, 530, 530, 530, 530, 896, 338, 897, - 541, 896, 541, 897, 530, 541, 541, 541, 541, 569, - 921, 569, 692, 692, 569, 569, 569, 569, 696, 696, - 530, 692, 940, 338, 338, 339, 339, 339, 339, 339, - 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, + 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, + 338, 338, 338, 338, 338, 338, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, - 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, - 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, - 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, - 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, - 339, 340, 340, 340, 340, 340, 340, 340, 340, 340, - 340, 340, 340, 340, 340, 340, 920, 340, 340, 544, - 544, 919, 652, 340, 340, 340, 340, 538, 538, 652, - 742, 538, 545, 545, 918, 544, 544, 544, 544, 917, - 340, 550, 550, 653, 916, 550, 544, 915, 545, 545, - - 653, 552, 552, 546, 546, 552, 652, 547, 547, 340, - 697, 697, 544, 742, 538, 340, 340, 351, 351, 546, - 546, 546, 546, 547, 547, 547, 547, 653, 550, 548, - 548, 351, 913, 351, 351, 351, 351, 912, 552, 555, - 555, 911, 686, 686, 351, 548, 548, 548, 351, 981, - 555, 981, 555, 559, 559, 555, 555, 555, 555, 910, - 351, 360, 360, 693, 693, 560, 560, 699, 699, 559, - 559, 699, 693, 561, 561, 708, 708, 360, 360, 360, - 360, 560, 560, 560, 560, 686, 360, 360, 360, 561, - 561, 561, 561, 574, 574, 574, 574, 709, 709, 946, - - 360, 360, 360, 360, 360, 360, 362, 362, 362, 362, + 339, 951, 339, 339, 528, 528, 554, 554, 339, 339, + 339, 339, 950, 697, 697, 563, 563, 697, 712, 712, + 528, 528, 528, 528, 563, 339, 534, 534, 690, 690, + 534, 528, 640, 740, 536, 536, 676, 690, 536, 640, + 676, 949, 544, 544, 339, 676, 640, 528, 644, 339, + 339, 350, 350, 948, 554, 644, 542, 542, 544, 544, + 544, 544, 644, 534, 938, 350, 740, 350, 350, 350, + + 350, 536, 542, 542, 542, 542, 685, 685, 350, 713, + 713, 926, 350, 542, 545, 545, 548, 548, 550, 550, + 548, 744, 550, 887, 350, 359, 359, 644, 887, 542, + 545, 545, 545, 545, 572, 572, 572, 572, 691, 691, + 938, 359, 359, 359, 359, 560, 560, 691, 924, 685, + 359, 359, 359, 548, 744, 550, 573, 573, 573, 573, + 923, 560, 560, 560, 359, 359, 359, 359, 359, 359, + 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, + 361, 361, 361, 361, 361, 922, 361, 361, 553, 553, + 724, 724, 361, 361, 361, 361, 558, 558, 989, 553, + + 989, 553, 559, 559, 553, 553, 553, 553, 936, 361, + 725, 725, 558, 558, 558, 558, 708, 708, 559, 559, + 559, 559, 567, 921, 567, 708, 936, 567, 567, 567, + 567, 730, 730, 361, 361, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 909, 362, 362, 558, 558, 687, 687, 362, 362, - 362, 362, 562, 562, 908, 572, 572, 572, 572, 907, - 558, 558, 558, 558, 946, 362, 572, 906, 562, 562, - 562, 558, 575, 575, 575, 575, 583, 583, 583, 583, - 714, 714, 572, 584, 584, 584, 584, 558, 905, 687, - 362, 362, 363, 363, 363, 363, 363, 363, 363, 363, - 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, - 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, - 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, - 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, - 363, 363, 363, 363, 363, 363, 363, 363, 364, 364, - 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, - 364, 364, 364, 904, 364, 364, 654, 654, 654, 654, - 364, 364, 364, 364, 564, 564, 903, 641, 564, 566, - 566, 642, 643, 566, 641, 644, 646, 364, 642, 643, - 645, 641, 644, 646, 746, 642, 643, 645, 902, 644, - 646, 704, 704, 983, 645, 983, 364, 655, 655, 655, - - 655, 564, 364, 364, 375, 375, 566, 674, 674, 674, - 674, 715, 715, 643, 726, 726, 644, 746, 375, 901, - 375, 375, 375, 375, 645, 646, 675, 675, 675, 675, - 899, 375, 727, 727, 704, 375, 684, 684, 705, 705, - 685, 685, 688, 688, 702, 702, 688, 375, 384, 384, - 732, 732, 684, 684, 684, 684, 685, 685, 685, 685, - 702, 702, 702, 702, 384, 384, 384, 384, 898, 710, - 710, 722, 722, 384, 384, 384, 689, 689, 710, 688, - 689, 705, 694, 694, 733, 733, 694, 384, 384, 384, - 384, 384, 384, 386, 386, 386, 386, 386, 386, 386, - - 386, 386, 386, 386, 386, 386, 386, 386, 876, 386, - 386, 703, 703, 689, 722, 386, 386, 386, 386, 694, - 717, 717, 711, 711, 717, 720, 720, 703, 703, 703, - 703, 711, 386, 721, 721, 875, 728, 728, 729, 729, - 873, 720, 720, 720, 720, 728, 991, 729, 991, 721, - 721, 721, 721, 738, 738, 738, 738, 386, 386, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, 388, 388, - 872, 388, 388, 723, 723, 821, 821, 388, 388, 388, - 388, 695, 695, 735, 735, 695, 870, 735, 706, 706, - 822, 822, 706, 869, 388, 758, 707, 707, 712, 712, - 707, 868, 712, 713, 713, 724, 724, 713, 758, 724, - 825, 825, 865, 388, 864, 758, 723, 863, 695, 388, - 388, 405, 405, 405, 405, 706, 739, 739, 739, 739, - - 405, 405, 405, 707, 862, 712, 826, 826, 827, 827, - 713, 860, 724, 859, 405, 405, 405, 405, 405, 405, - 407, 407, 942, 407, 407, 407, 407, 407, 407, 407, - 407, 407, 407, 407, 407, 947, 407, 407, 774, 829, - 829, 858, 407, 407, 407, 407, 725, 725, 830, 830, - 725, 730, 730, 774, 857, 730, 831, 831, 879, 407, - 774, 835, 835, 880, 881, 879, 881, 881, 942, 856, - 880, 932, 879, 932, 932, 1019, 1019, 880, 1020, 1020, - 947, 1021, 1021, 725, 407, 407, 408, 408, 730, 408, - 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, - - 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, - 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, - 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, - 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, - 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, - 408, 408, 409, 409, 855, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 948, 409, 409, - 986, 986, 986, 853, 409, 409, 409, 409, 731, 731, - 797, 798, 731, 800, 852, 799, 877, 797, 798, 878, - 800, 409, 799, 877, 797, 798, 878, 800, 851, 799, - - 877, 882, 850, 878, 883, 985, 985, 985, 882, 985, - 409, 883, 948, 848, 847, 731, 409, 409, 505, 505, - 505, 505, 797, 877, 799, 798, 878, 505, 505, 505, - 846, 882, 800, 845, 883, 987, 987, 987, 844, 987, - 843, 505, 505, 505, 505, 505, 505, 509, 509, 842, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 900, 509, 509, 933, 988, 988, 988, 509, - 509, 509, 509, 930, 931, 900, 933, 930, 931, 934, - 841, 839, 900, 933, 930, 931, 509, 990, 990, 990, - 934, 930, 931, 838, 989, 989, 989, 934, 989, 837, - - 812, 803, 796, 795, 794, 793, 792, 791, 790, 789, - 788, 509, 509, 510, 510, 787, 510, 510, 510, 510, - 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, - 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, - 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, - 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, - 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, - 510, 510, 510, 510, 510, 510, 510, 510, 510, 523, - 523, 523, 523, 786, 785, 782, 781, 779, 523, 523, - 523, 776, 775, 773, 772, 771, 770, 769, 768, 767, - - 766, 765, 523, 523, 523, 523, 523, 523, 525, 525, - 525, 525, 525, 525, 763, 525, 525, 525, 525, 525, - 525, 525, 525, 762, 525, 525, 761, 760, 757, 755, - 525, 525, 525, 525, 754, 753, 750, 745, 741, 740, - 737, 719, 701, 681, 677, 676, 671, 525, 670, 666, - 661, 657, 656, 651, 650, 649, 648, 640, 639, 634, - 630, 629, 628, 627, 626, 625, 623, 622, 621, 620, - 619, 618, 525, 525, 526, 526, 526, 526, 526, 526, - 616, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, - 535, 535, 615, 614, 613, 612, 611, 610, 609, 607, - 606, 605, 604, 603, 602, 601, 535, 535, 535, 535, - 600, 599, 598, 597, 595, 535, 535, 535, 594, 593, - 592, 591, 590, 589, 588, 587, 586, 585, 579, 535, - 535, 535, 535, 535, 535, 539, 539, 539, 539, 539, - 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, - - 571, 539, 539, 570, 517, 516, 513, 539, 539, 539, - 539, 512, 511, 507, 499, 498, 495, 494, 493, 492, - 487, 486, 485, 484, 539, 473, 470, 467, 465, 464, - 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, - 453, 452, 450, 449, 448, 440, 439, 438, 437, 539, - 539, 540, 540, 540, 540, 540, 540, 540, 540, 540, - 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, - 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, - 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, - 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, - - 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, - 540, 540, 540, 540, 540, 540, 540, 549, 549, 436, - 435, 434, 433, 432, 431, 430, 428, 427, 425, 424, - 423, 422, 421, 549, 549, 549, 549, 420, 419, 418, - 417, 399, 549, 549, 549, 398, 394, 306, 305, 296, - 295, 294, 283, 282, 278, 268, 549, 549, 549, 549, - 549, 549, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 265, 553, 553, - 264, 260, 255, 254, 553, 553, 553, 553, 252, 251, - 250, 248, 247, 231, 229, 228, 221, 220, 218, 212, - - 211, 553, 203, 202, 201, 199, 194, 192, 191, 189, - 188, 187, 177, 159, 154, 152, 110, 101, 96, 93, - 88, 86, 77, 72, 63, 34, 553, 553, 554, 554, - 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, - 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, - 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, - 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, - 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, - 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, - 554, 554, 554, 554, 563, 563, 32, 28, 23, 8, - - 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, - 563, 563, 563, 563, 0, 0, 0, 0, 0, 563, - 563, 563, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 563, 563, 563, 563, 563, 563, 567, - 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - 567, 567, 567, 567, 0, 567, 567, 0, 0, 0, - 0, 567, 567, 567, 567, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 567, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 363, 363, 363, 363, 363, 919, 363, 363, 556, 556, + 731, 731, 363, 363, 363, 363, 918, 570, 570, 570, + 570, 944, 702, 702, 556, 556, 556, 556, 570, 363, + 562, 562, 709, 709, 562, 556, 641, 917, 564, 564, + 880, 709, 564, 641, 570, 703, 703, 880, 363, 916, + 641, 556, 945, 363, 363, 374, 374, 581, 581, 581, + 581, 582, 582, 582, 582, 702, 944, 562, 915, 374, + 880, 374, 374, 374, 374, 564, 643, 641, 642, 914, + 715, 715, 374, 643, 715, 642, 374, 893, 703, 913, + + 643, 893, 642, 652, 652, 652, 652, 945, 374, 383, + 383, 653, 653, 653, 653, 672, 672, 672, 672, 673, + 673, 673, 673, 682, 682, 383, 383, 383, 383, 642, + 643, 720, 720, 911, 383, 383, 383, 726, 726, 682, + 682, 682, 682, 686, 686, 910, 726, 686, 383, 383, + 383, 383, 383, 383, 385, 385, 385, 385, 385, 385, + 385, 385, 385, 385, 385, 385, 385, 385, 385, 909, + 385, 385, 683, 683, 720, 908, 385, 385, 385, 385, + 686, 700, 700, 727, 727, 701, 701, 907, 683, 683, + 683, 683, 727, 385, 718, 718, 906, 700, 700, 700, + + 700, 701, 701, 701, 701, 733, 733, 819, 819, 733, + 718, 718, 718, 718, 820, 820, 905, 385, 385, 386, + 386, 386, 386, 386, 386, 386, 386, 386, 386, 386, + 386, 386, 386, 386, 386, 386, 386, 386, 386, 386, + 386, 386, 386, 386, 386, 386, 386, 386, 386, 386, + 386, 386, 386, 386, 386, 386, 386, 386, 386, 386, + 386, 386, 386, 386, 386, 386, 386, 386, 386, 386, + 386, 386, 386, 386, 386, 386, 386, 386, 386, 386, + 386, 386, 386, 386, 387, 387, 387, 387, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 946, + + 387, 387, 721, 721, 821, 821, 387, 387, 387, 387, + 736, 736, 736, 736, 823, 823, 687, 687, 692, 692, + 687, 904, 692, 387, 693, 693, 704, 704, 693, 795, + 704, 705, 705, 710, 710, 705, 795, 710, 737, 737, + 737, 737, 387, 795, 946, 721, 903, 387, 387, 404, + 404, 404, 404, 687, 902, 692, 824, 824, 404, 404, + 404, 693, 901, 704, 825, 825, 827, 827, 705, 900, + 710, 795, 404, 404, 404, 404, 404, 404, 406, 406, + 899, 406, 406, 406, 406, 406, 406, 406, 406, 406, + 406, 406, 406, 897, 406, 406, 896, 719, 719, 803, + + 406, 406, 406, 406, 772, 874, 803, 873, 711, 711, + 828, 828, 711, 719, 719, 719, 719, 406, 871, 772, + 829, 829, 833, 833, 877, 772, 878, 879, 894, 879, + 879, 877, 894, 878, 803, 895, 1017, 1017, 877, 895, + 878, 406, 406, 407, 407, 711, 407, 407, 407, 407, + 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, + 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, + 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, + 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, + 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, - 0, 0, 0, 567, 567, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 577, 577, 577, 577, 0, 0, 0, 0, 0, - 577, 577, 577, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 577, 577, 577, 577, 577, 577, - - 581, 581, 0, 581, 581, 581, 581, 581, 581, 581, - 581, 581, 581, 581, 581, 0, 581, 581, 0, 0, - 0, 0, 581, 581, 581, 581, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 581, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 407, 407, 407, 407, 407, 407, 407, 407, 408, 408, + 898, 408, 408, 408, 408, 408, 408, 408, 408, 408, + 408, 408, 408, 898, 408, 408, 870, 804, 881, 898, + 408, 408, 408, 408, 804, 881, 930, 868, 930, 930, + 722, 722, 723, 723, 722, 867, 723, 408, 728, 728, + 729, 729, 728, 797, 729, 798, 875, 866, 881, 863, + 797, 862, 798, 875, 804, 861, 408, 797, 860, 798, + 875, 408, 408, 503, 503, 503, 503, 722, 858, 723, + 1018, 1018, 503, 503, 503, 728, 857, 729, 984, 984, + 984, 856, 797, 875, 1019, 1019, 503, 503, 503, 503, + + 503, 503, 507, 507, 798, 507, 507, 507, 507, 507, + 507, 507, 507, 507, 507, 507, 507, 855, 507, 507, + 931, 876, 854, 853, 507, 507, 507, 507, 876, 928, + 851, 931, 929, 928, 932, 876, 929, 850, 931, 849, + 928, 507, 848, 929, 846, 932, 845, 928, 844, 843, + 929, 842, 932, 983, 983, 983, 841, 983, 876, 985, + 985, 985, 840, 985, 839, 507, 507, 508, 508, 837, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 508, 508, 521, 521, 521, 521, 836, 796, 986, 986, + 986, 521, 521, 521, 796, 987, 987, 987, 835, 987, + 810, 796, 988, 988, 988, 521, 521, 521, 521, 521, + 521, 523, 523, 523, 523, 523, 523, 801, 523, 523, + 523, 523, 523, 523, 523, 523, 794, 523, 523, 793, + 792, 796, 791, 523, 523, 523, 523, 790, 789, 788, + 787, 786, 785, 784, 783, 780, 779, 777, 774, 773, + + 523, 771, 770, 769, 768, 767, 766, 765, 764, 763, + 761, 760, 759, 758, 755, 753, 752, 751, 750, 748, + 743, 739, 738, 735, 523, 523, 524, 524, 524, 524, + 524, 524, 717, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 533, 533, 699, 681, 679, 675, 674, 669, 668, + + 666, 664, 659, 655, 654, 649, 648, 533, 533, 533, + 533, 647, 646, 638, 637, 632, 533, 533, 533, 628, + 627, 626, 625, 624, 623, 621, 620, 619, 618, 617, + 533, 533, 533, 533, 533, 533, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 616, 537, 537, 614, 613, 612, 611, 537, 537, + 537, 537, 610, 609, 608, 607, 605, 604, 603, 602, + 601, 600, 599, 598, 597, 537, 596, 595, 593, 592, + 591, 590, 589, 588, 587, 586, 585, 584, 583, 577, + 569, 568, 515, 514, 511, 510, 509, 505, 497, 537, + + 537, 538, 538, 538, 538, 538, 538, 538, 538, 538, + 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, + 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, + 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, + 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, + 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, + 538, 538, 538, 538, 538, 538, 547, 547, 496, 493, + 492, 491, 490, 485, 484, 483, 482, 472, 469, 466, + 464, 463, 547, 547, 547, 547, 462, 461, 460, 459, + 458, 547, 547, 547, 457, 456, 455, 454, 453, 452, + + 451, 449, 448, 447, 439, 547, 547, 547, 547, 547, + 547, 551, 551, 551, 551, 551, 551, 551, 551, 551, + 551, 551, 551, 551, 551, 551, 438, 551, 551, 437, + 436, 435, 434, 551, 551, 551, 551, 433, 432, 431, + 430, 429, 427, 426, 424, 423, 422, 421, 420, 419, + 551, 418, 417, 416, 398, 397, 393, 305, 304, 295, + 294, 293, 282, 281, 277, 267, 264, 263, 259, 254, + 253, 251, 250, 249, 551, 551, 552, 552, 552, 552, + 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, + 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, + + 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, + 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, + 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, + 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, + 552, 561, 561, 247, 246, 231, 229, 228, 221, 220, + 218, 212, 211, 203, 202, 201, 199, 561, 561, 561, + 561, 194, 192, 191, 189, 188, 561, 561, 561, 187, + 177, 159, 154, 152, 110, 101, 96, 93, 88, 86, + 561, 561, 561, 561, 561, 561, 565, 565, 565, 565, + 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, + + 565, 77, 565, 565, 72, 63, 34, 32, 565, 565, + 565, 565, 28, 23, 8, 4, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 565, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 581, 581, 582, 582, 0, 582, - 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, - 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, - 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, - - 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, - 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, - 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, - 582, 582, 665, 665, 0, 665, 665, 665, 665, 665, - 665, 665, 665, 665, 665, 665, 665, 0, 665, 665, - 0, 0, 0, 0, 665, 665, 665, 665, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 565, + 565, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 575, 575, 575, 575, + 0, 0, 0, 0, 0, 575, 575, 575, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 575, + 575, 575, 575, 575, 575, 579, 579, 0, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 0, 579, 579, 0, 0, 0, 0, 579, 579, 579, + 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 665, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 665, 665, 667, 667, - 0, 667, 667, 667, 667, 667, 667, 667, 667, 667, - 667, 667, 667, 0, 667, 667, 0, 0, 0, 0, - 667, 667, 667, 667, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 667, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 667, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 579, 579, + 580, 580, 0, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 663, 663, 0, 663, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, + 0, 663, 663, 0, 0, 0, 0, 663, 663, 663, + + 663, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 667, 667, 668, 668, 0, 668, 668, 668, - 668, 668, 668, 668, 668, 668, 668, 668, 668, 0, - 668, 668, 0, 0, 0, 0, 668, 668, 668, 668, + 0, 0, 0, 0, 0, 0, 0, 0, 663, 663, + 665, 665, 0, 665, 665, 665, 665, 665, 665, 665, + 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, + 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, + 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, + 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, + 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, + + 665, 665, 665, 665, 665, 678, 678, 678, 678, 678, + 678, 0, 678, 678, 678, 678, 678, 678, 678, 678, + 0, 678, 678, 0, 0, 0, 0, 678, 678, 678, + 678, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 668, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 668, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 668, 668, + 0, 0, 0, 0, 0, 0, 0, 0, 678, 678, 680, 680, 680, 680, 680, 680, 0, 680, 680, 680, - 680, 680, 680, 680, 680, 0, 680, 680, 0, 0, - 0, 0, 680, 680, 680, 680, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 680, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 680, 680, 682, 682, 682, 682, - - 682, 682, 0, 682, 682, 682, 682, 682, 682, 682, - 682, 0, 682, 682, 0, 0, 0, 0, 682, 682, - 682, 682, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 682, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 682, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 682, 682, 683, 683, 683, 683, 683, 683, 0, 683, - 683, 683, 683, 683, 683, 683, 683, 0, 683, 683, - 0, 0, 0, 0, 683, 683, 683, 683, 0, 0, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 696, 696, 696, 696, 696, + 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, + 0, 696, 696, 0, 0, 0, 0, 696, 696, 696, + 696, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 696, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 696, 696, - 0, 683, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 683, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 683, 683, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, - 698, 698, 698, 0, 698, 698, 0, 0, 0, 0, - 698, 698, 698, 698, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 698, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 698, 698, 700, 700, 700, 700, 700, 700, - - 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, - 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, - 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, - 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, - 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, - 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, - 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, - 716, 716, 716, 716, 716, 0, 716, 716, 0, 0, - 0, 0, 716, 716, 716, 716, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 716, + 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, + 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, + 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, + 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, + 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, + 698, 698, 698, 698, 698, 714, 714, 714, 714, 714, + 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, + 0, 714, 714, 0, 0, 0, 0, 714, 714, 714, + 714, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 714, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 716, 716, 718, 718, 718, 718, - 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, - 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, - 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, - 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, - 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, - 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, - 718, 718, 734, 734, 734, 734, 734, 734, 734, 734, - - 734, 734, 734, 734, 734, 734, 734, 0, 734, 734, - 0, 0, 0, 0, 734, 734, 734, 734, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 734, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 734, 734, 736, 736, - 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, - 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, - 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, - 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, - - 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, - 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, - 736, 736, 736, 736, 749, 749, 0, 749, 749, 749, - 749, 749, 749, 749, 749, 749, 749, 749, 749, 0, - 749, 749, 0, 0, 0, 0, 749, 749, 749, 749, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 749, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 749, 749, - 751, 751, 0, 751, 751, 751, 751, 751, 751, 751, + 0, 0, 0, 0, 0, 0, 0, 0, 714, 714, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 732, 732, 732, 732, 732, - 751, 751, 751, 751, 751, 0, 751, 751, 0, 0, - 0, 0, 751, 751, 751, 751, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 751, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 751, + 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, + 0, 732, 732, 0, 0, 0, 0, 732, 732, 732, + 732, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 751, 751, 752, 752, 0, 752, - 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, - 752, 0, 752, 752, 0, 0, 0, 0, 752, 752, - 752, 752, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 752, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 732, 732, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, - 0, 0, 0, 0, 0, 752, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 752, 752, 809, 809, 0, 809, 809, 809, 809, 809, - 809, 809, 809, 809, 809, 809, 809, 0, 809, 809, - 0, 0, 0, 0, 809, 809, 809, 809, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 809, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 809, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 809, 809, 810, 810, - 0, 810, 810, 810, 810, 810, 810, 810, 810, 810, - - 810, 810, 810, 0, 810, 810, 0, 0, 0, 0, - 810, 810, 810, 810, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 810, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 810, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 810, 810, 819, 819, 819, 819, 819, 819, - 0, 819, 819, 819, 819, 819, 819, 819, 819, 0, - 819, 819, 0, 0, 0, 0, 819, 819, 819, 819, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 819, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 819, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 819, 819, - 820, 820, 820, 820, 820, 820, 0, 820, 820, 820, - 820, 820, 820, 820, 820, 0, 820, 820, 0, 0, - 0, 0, 820, 820, 820, 820, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 820, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 747, 747, 0, 747, 747, + 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, + 0, 747, 747, 0, 0, 0, 0, 747, 747, 747, + 747, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 747, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 820, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 820, 820, 823, 823, 823, 823, - 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, - - 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, - 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, - 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, - 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, - 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, - 823, 823, 1055, 0, 1055, 1055, 1055, 1055, 1055, 1055, - 1055, 1055, 1055, 1056, 0, 0, 1056, 1056, 1057, 0, - 1057, 1057, 1057, 1057, 1057, 1057, 1057, 1057, 1057, 1058, - 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1059, 1059, 1059, - 1059, 1060, 0, 1060, 0, 1060, 1060, 1060, 1060, 1061, - - 1061, 1061, 1061, 1061, 1061, 1061, 1062, 0, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1063, 0, 1063, - 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1064, 0, - 1064, 1064, 1064, 1064, 1064, 1064, 1064, 1064, 1064, 1065, - 0, 1065, 1065, 1065, 1065, 1065, 1065, 1065, 1065, 1065, - 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1067, 1067, 0, - 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1068, 1068, - 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1068, 1069, - 1069, 0, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1069, - 1070, 1070, 1070, 1070, 1070, 1070, 1070, 1070, 1070, 1070, - - 1070, 1071, 1071, 1071, 1071, 1071, 1071, 1071, 1071, 1071, - 1071, 1071, 1072, 1072, 1072, 1072, 1072, 1072, 1072, 1072, - 1072, 1072, 1072, 1073, 1073, 1073, 1073, 1073, 1073, 1073, - 1073, 1073, 1073, 1073, 1074, 1074, 1074, 1074, 1074, 1074, - 1074, 1074, 1074, 1074, 1074, 1075, 1075, 1075, 1075, 1075, - 1075, 1075, 1075, 1075, 1075, 1075, 1076, 1076, 1076, 1076, - 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1077, 1077, 1077, - 1077, 1077, 1077, 1077, 1077, 1077, 1077, 1077, 1078, 1078, - 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1078, 1079, - 1079, 1079, 1079, 1079, 1079, 1079, 1079, 1079, 1079, 1079, - - 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, - 1080, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1082, 0, 1082, 1082, 1082, 1082, 1082, 1082, - 1082, 1082, 1082, 1083, 0, 1083, 1083, 1083, 1083, 1083, - 1083, 1083, 1083, 1083, 1084, 0, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1085, 0, 1085, 1085, 1085, - 1085, 1085, 1085, 1085, 1085, 1085, 1086, 0, 0, 1086, - 1086, 1087, 0, 1087, 1087, 1087, 1087, 1087, 1087, 1087, - 1087, 1087, 1088, 0, 0, 1088, 1088, 1088, 1089, 0, - 0, 1089, 1090, 1090, 1090, 1090, 1090, 1090, 1090, 1091, - - 1091, 1091, 1091, 1091, 1091, 1091, 1091, 1092, 0, 0, - 0, 0, 1092, 1092, 1092, 1092, 1093, 1093, 1093, 1093, - 1093, 1093, 1094, 1094, 1094, 1094, 1095, 0, 1095, 1095, - 1095, 1095, 1096, 1096, 1096, 1096, 1096, 1096, 1096, 1097, - 0, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, - 1098, 0, 1098, 1098, 1098, 1098, 1098, 1098, 1098, 1098, - 1098, 1099, 0, 1099, 1099, 1099, 1099, 1099, 1099, 1099, - 1099, 1099, 1100, 0, 1100, 1100, 1100, 1100, 1100, 1100, - 1100, 1100, 1100, 1101, 1101, 0, 1101, 1101, 1101, 1101, - 1101, 1101, 1101, 1101, 1102, 1102, 1102, 1102, 1102, 1102, - - 1102, 1102, 1102, 1102, 1102, 1103, 1103, 0, 1103, 1103, - 1103, 1103, 1103, 1103, 1103, 1103, 1104, 1104, 1104, 1104, - 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1105, 1105, 1105, - 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1106, 1106, - 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1107, - 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, 1107, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1109, 1109, 1109, 1109, 1109, 1109, 1109, 1109, 1109, - 1109, 1109, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1111, 1111, 1111, 1111, 1111, 1111, 1111, - - 1111, 1111, 1111, 1111, 1112, 1112, 1112, 1112, 1112, 1112, - 1112, 1112, 1112, 1112, 1112, 1113, 1113, 1113, 1113, 1113, - 1113, 1113, 1113, 1113, 1113, 1113, 1114, 1114, 1114, 1114, - 1114, 1114, 1114, 1114, 1114, 1114, 1114, 1115, 1115, 1115, - 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1116, 0, - 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1117, - 0, 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117, - 1118, 0, 1118, 1118, 1118, 1118, 1118, 1118, 1118, 1118, - 1118, 1119, 0, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1120, 0, 0, 1120, 1120, 1121, 0, 0, - - 1121, 1121, 1121, 1122, 0, 0, 1122, 1123, 0, 1123, - 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1124, 0, - 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1125, - 0, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, - 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1127, 1127, 1127, - 1127, 1127, 1127, 1127, 1127, 1128, 1128, 1128, 1128, 1128, - 1128, 1129, 0, 1129, 1129, 1129, 1129, 1130, 0, 1130, - 1130, 1130, 1130, 1131, 1131, 1131, 1131, 1131, 1131, 1131, - 1132, 0, 1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132, - 1132, 1133, 0, 1133, 1133, 1133, 1133, 1133, 1133, 1133, - - 1133, 1133, 1134, 0, 1134, 1134, 1134, 1134, 1134, 1134, - 1134, 1134, 1134, 1135, 0, 1135, 1135, 1135, 1135, 1135, - 1135, 1135, 1135, 1135, 1136, 0, 1136, 1136, 1136, 1136, - 1136, 1136, 1136, 1136, 1136, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1138, 1138, 0, 1138, 1138, 1138, 1138, 1138, - 1138, 1138, 1138, 1139, 1139, 1139, 1139, 1139, 1139, 1139, - 1139, 1139, 1139, 1139, 1140, 1140, 0, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1141, 1141, 1141, 1141, 1141, - 1141, 1141, 1141, 1141, 1141, 1141, 1142, 1142, 1142, 1142, - 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1143, 1143, 1143, - - 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1144, 1144, - 1144, 1144, 1144, 1144, 1144, 1144, 1144, 1144, 1144, 1145, - 1145, 1145, 1145, 1145, 1145, 1145, 1145, 1145, 1145, 1145, - 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, - 1146, 1147, 1147, 1147, 1147, 1147, 1147, 1147, 1147, 1147, - 1147, 1147, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, - 1148, 1148, 1148, 1149, 1149, 1149, 1149, 1149, 1149, 1149, - 1149, 1149, 1149, 1149, 1150, 1150, 1150, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1152, 1152, 1152, 1152, - - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1155, - 1155, 1155, 1155, 1155, 1155, 1155, 1155, 1155, 1155, 1155, - 1156, 0, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, - 1156, 1157, 0, 1157, 1157, 1157, 1157, 1157, 1157, 1157, - 1157, 1157, 1158, 0, 1158, 1158, 1158, 1158, 1158, 1158, - 1158, 1158, 1158, 1159, 0, 1159, 1159, 1159, 1159, 1159, - 1159, 1159, 1159, 1159, 1160, 0, 1160, 1160, 1160, 1160, - 1160, 1160, 1160, 1160, 1160, 1161, 0, 0, 1161, 1161, - - 1161, 1162, 0, 1162, 1162, 1162, 1162, 1162, 1162, 1162, - 1162, 1162, 1163, 0, 1163, 1163, 1163, 1163, 1163, 1163, - 1163, 1163, 1163, 1164, 0, 1164, 1164, 1164, 1164, 1164, - 1164, 1164, 1164, 1164, 1165, 1165, 1165, 1165, 1165, 1165, - 1165, 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1167, - 0, 1167, 1167, 1167, 1167, 1168, 0, 1168, 1168, 1168, - 1168, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1170, 0, - 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1171, - 0, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - 1172, 0, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, - - 1172, 1173, 0, 1173, 1173, 1173, 1173, 1173, 1173, 1173, - 1173, 1173, 1174, 0, 1174, 1174, 1174, 1174, 1174, 1174, - 1174, 1174, 1174, 1175, 0, 1175, 1175, 1175, 1175, 1175, - 1175, 1175, 1175, 1175, 1176, 1176, 1176, 1176, 1176, 1176, - 1176, 1177, 1177, 0, 1177, 1177, 1177, 1177, 1177, 1177, - 1177, 1177, 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178, - 1178, 1178, 1178, 1179, 1179, 0, 1179, 1179, 1179, 1179, - 1179, 1179, 1179, 1179, 1180, 1180, 0, 1180, 1180, 1180, - 1180, 1180, 1180, 1180, 1180, 1181, 1181, 1181, 1181, 1181, - 1181, 1181, 1181, 1181, 1181, 1181, 1182, 1182, 1182, 1182, - - 1182, 1182, 1182, 1182, 1182, 1182, 1182, 1183, 1183, 1183, - 1183, 1183, 1183, 1183, 1183, 1183, 1183, 1183, 1184, 1184, - 1184, 1184, 1184, 1184, 1184, 1184, 1184, 1184, 1184, 1185, - 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, - 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, - 1186, 1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187, - 1187, 1187, 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188, - 1188, 1188, 1188, 1189, 1189, 1189, 1189, 1189, 1189, 1189, - 1189, 1189, 1189, 1189, 1190, 1190, 1190, 1190, 1190, 1190, - 1190, 1190, 1190, 1190, 1190, 1191, 1191, 1191, 1191, 1191, - - 1191, 1191, 1191, 1191, 1191, 1191, 1192, 1192, 1192, 1192, - 1192, 1192, 1192, 1192, 1192, 1192, 1192, 1193, 1193, 1193, - 1193, 1193, 1193, 1193, 1193, 1193, 1193, 1193, 1194, 1194, - 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1195, - 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, - 1196, 0, 1196, 1196, 1196, 1196, 1196, 1196, 1196, 1196, - 1196, 1197, 0, 1197, 1197, 1197, 1197, 1197, 1197, 1197, - 1197, 1197, 1198, 0, 1198, 1198, 1198, 1198, 1198, 1198, - 1198, 1198, 1198, 1199, 0, 1199, 1199, 1199, 1199, 1199, - 1199, 1199, 1199, 1199, 1200, 0, 1200, 1200, 1200, 1200, - - 1200, 1200, 1200, 1200, 1200, 1201, 0, 1201, 1201, 1201, - 1201, 1201, 1201, 1201, 1201, 1201, 1202, 0, 0, 1202, - 1202, 1202, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, - 1204, 0, 1204, 1204, 1204, 1204, 1205, 1205, 1205, 1205, - 1205, 1205, 1205, 1206, 0, 1206, 1206, 1206, 1206, 1206, - 1206, 1206, 1206, 1206, 1207, 0, 1207, 1207, 1207, 1207, - 1207, 1207, 1207, 1207, 1207, 1208, 1208, 1208, 1208, 1208, - 1208, 1208, 1209, 1209, 0, 1209, 1209, 1209, 1209, 1209, - 1209, 1209, 1209, 1210, 1210, 0, 1210, 1210, 1210, 1210, - 1210, 1210, 1210, 1210, 1211, 1211, 1211, 1211, 1211, 1211, - - 1211, 1211, 1211, 1211, 1211, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, 1054, - 1054, 1054 + 0, 0, 0, 0, 0, 0, 0, 0, 747, 747, + 749, 749, 0, 749, 749, 749, 749, 749, 749, 749, + + 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, + 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, + 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, + 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, + 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, + 749, 749, 749, 749, 749, 807, 807, 0, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 817, 817, 817, 817, 817, 817, 0, 817, 817, 817, + 817, 817, 817, 817, 817, 817, 817, 817, 817, 817, + 817, 817, 817, 817, 817, 817, 817, 817, 817, 817, + 817, 817, 817, 817, 817, 817, 817, 817, 817, 817, + 817, 817, 817, 817, 817, 817, 817, 817, 817, 817, + 817, 817, 817, 817, 817, 817, 817, 817, 817, 817, + 817, 817, 817, 817, 817, 1053, 0, 1053, 1053, 1053, + 1053, 1053, 1053, 1053, 1053, 1053, 1054, 0, 0, 1054, + + 1054, 1055, 0, 1055, 1055, 1055, 1055, 1055, 1055, 1055, + 1055, 1055, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, + 1057, 1057, 1057, 1057, 1058, 0, 1058, 0, 1058, 1058, + 1058, 1058, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1060, + 0, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1061, 0, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, + 1061, 1062, 0, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1063, 0, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1064, 1064, 1064, 1064, 1064, 1064, 1064, + 1065, 1065, 0, 1065, 1065, 1065, 1065, 1065, 1065, 1065, + + 1065, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, + 1066, 1066, 1067, 1067, 0, 1067, 1067, 1067, 1067, 1067, + 1067, 1067, 1067, 1068, 1068, 1068, 1068, 1068, 1068, 1068, + 1068, 1068, 1068, 1068, 1069, 1069, 1069, 1069, 1069, 1069, + 1069, 1069, 1069, 1069, 1069, 1070, 1070, 1070, 1070, 1070, + 1070, 1070, 1070, 1070, 1070, 1070, 1071, 1071, 1071, 1071, + 1071, 1071, 1071, 1071, 1071, 1071, 1071, 1072, 1072, 1072, + 1072, 1072, 1072, 1072, 1072, 1072, 1072, 1072, 1073, 1073, + 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1074, + 1074, 1074, 1074, 1074, 1074, 1074, 1074, 1074, 1074, 1074, + + 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, + 1075, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, 1076, + 1076, 1076, 1077, 1077, 1077, 1077, 1077, 1077, 1077, 1077, + 1077, 1077, 1077, 1078, 1078, 1078, 1078, 1078, 1078, 1078, + 1078, 1078, 1078, 1078, 1079, 1079, 1079, 1079, 1079, 1079, + 1079, 1079, 1079, 1079, 1079, 1080, 0, 1080, 1080, 1080, + 1080, 1080, 1080, 1080, 1080, 1080, 1081, 0, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1082, 0, 1082, + 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1083, 0, + 1083, 1083, 1083, 1083, 1083, 1083, 1083, 1083, 1083, 1084, + + 0, 0, 1084, 1084, 1085, 0, 1085, 1085, 1085, 1085, + 1085, 1085, 1085, 1085, 1085, 1086, 0, 0, 1086, 1086, + 1086, 1087, 0, 0, 1087, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1089, 1089, 1089, 1089, 1089, 1089, 1089, 1089, + 1090, 0, 0, 0, 0, 1090, 1090, 1090, 1090, 1091, + 1091, 1091, 1091, 1091, 1091, 1092, 1092, 1092, 1092, 1093, + 0, 1093, 1093, 1093, 1093, 1094, 1094, 1094, 1094, 1094, + 1094, 1094, 1095, 0, 1095, 1095, 1095, 1095, 1095, 1095, + 1095, 1095, 1095, 1096, 0, 1096, 1096, 1096, 1096, 1096, + 1096, 1096, 1096, 1096, 1097, 0, 1097, 1097, 1097, 1097, + + 1097, 1097, 1097, 1097, 1097, 1098, 0, 1098, 1098, 1098, + 1098, 1098, 1098, 1098, 1098, 1098, 1099, 1099, 0, 1099, + 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1100, 1100, 1100, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1101, 1101, + 0, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1101, 1102, + 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, + 1103, 1103, 1103, 1103, 1103, 1103, 1103, 1103, 1103, 1103, + 1103, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, 1104, + 1104, 1104, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, + 1105, 1105, 1105, 1106, 1106, 1106, 1106, 1106, 1106, 1106, + + 1106, 1106, 1106, 1106, 1107, 1107, 1107, 1107, 1107, 1107, + 1107, 1107, 1107, 1107, 1107, 1108, 1108, 1108, 1108, 1108, + 1108, 1108, 1108, 1108, 1108, 1108, 1109, 1109, 1109, 1109, + 1109, 1109, 1109, 1109, 1109, 1109, 1109, 1110, 1110, 1110, + 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1111, 1111, + 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1112, + 1112, 1112, 1112, 1112, 1112, 1112, 1112, 1112, 1112, 1112, + 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, + 1113, 1114, 0, 1114, 1114, 1114, 1114, 1114, 1114, 1114, + 1114, 1114, 1115, 0, 1115, 1115, 1115, 1115, 1115, 1115, + + 1115, 1115, 1115, 1116, 0, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 1116, 1116, 1117, 0, 1117, 1117, 1117, 1117, + 1117, 1117, 1117, 1117, 1117, 1118, 0, 0, 1118, 1118, + 1119, 0, 0, 1119, 1119, 1119, 1120, 0, 0, 1120, + 1121, 0, 1121, 1121, 1121, 1121, 1121, 1121, 1121, 1121, + 1121, 1122, 0, 1122, 1122, 1122, 1122, 1122, 1122, 1122, + 1122, 1122, 1123, 0, 1123, 1123, 1123, 1123, 1123, 1123, + 1123, 1123, 1123, 1124, 1124, 1124, 1124, 1124, 1124, 1124, + 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1126, 1126, + 1126, 1126, 1126, 1126, 1127, 0, 1127, 1127, 1127, 1127, + + 1128, 0, 1128, 1128, 1128, 1128, 1129, 1129, 1129, 1129, + 1129, 1129, 1129, 1130, 0, 1130, 1130, 1130, 1130, 1130, + 1130, 1130, 1130, 1130, 1131, 0, 1131, 1131, 1131, 1131, + 1131, 1131, 1131, 1131, 1131, 1132, 0, 1132, 1132, 1132, + 1132, 1132, 1132, 1132, 1132, 1132, 1133, 0, 1133, 1133, + 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1134, 0, 1134, + 1134, 1134, 1134, 1134, 1134, 1134, 1134, 1134, 1135, 1135, + 1135, 1135, 1135, 1135, 1135, 1136, 1136, 0, 1136, 1136, + 1136, 1136, 1136, 1136, 1136, 1136, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1138, 1138, 0, + + 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1139, 1139, + 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1141, 1141, 1141, 1141, 1141, 1141, 1141, 1141, 1141, 1141, + 1141, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, + 1142, 1142, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1144, 1144, 1144, 1144, 1144, 1144, 1144, + 1144, 1144, 1144, 1144, 1145, 1145, 1145, 1145, 1145, 1145, + 1145, 1145, 1145, 1145, 1145, 1146, 1146, 1146, 1146, 1146, + 1146, 1146, 1146, 1146, 1146, 1146, 1147, 1147, 1147, 1147, + + 1147, 1147, 1147, 1147, 1147, 1147, 1147, 1148, 1148, 1148, + 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1149, 1149, + 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1150, + 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, + 1152, 1152, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, + 1153, 1153, 1153, 1154, 0, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1155, 0, 1155, 1155, 1155, 1155, + 1155, 1155, 1155, 1155, 1155, 1156, 0, 1156, 1156, 1156, + + 1156, 1156, 1156, 1156, 1156, 1156, 1157, 0, 1157, 1157, + 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1158, 0, 1158, + 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1159, 0, + 0, 1159, 1159, 1159, 1160, 0, 1160, 1160, 1160, 1160, + 1160, 1160, 1160, 1160, 1160, 1161, 0, 1161, 1161, 1161, + 1161, 1161, 1161, 1161, 1161, 1161, 1162, 0, 1162, 1162, + 1162, 1162, 1162, 1162, 1162, 1162, 1162, 1163, 1163, 1163, + 1163, 1163, 1163, 1163, 1164, 1164, 1164, 1164, 1164, 1164, + 1164, 1164, 1165, 0, 1165, 1165, 1165, 1165, 1166, 0, + 1166, 1166, 1166, 1166, 1167, 1167, 1167, 1167, 1167, 1167, + + 1167, 1168, 0, 1168, 1168, 1168, 1168, 1168, 1168, 1168, + 1168, 1168, 1169, 0, 1169, 1169, 1169, 1169, 1169, 1169, + 1169, 1169, 1169, 1170, 0, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1171, 0, 1171, 1171, 1171, 1171, + 1171, 1171, 1171, 1171, 1171, 1172, 0, 1172, 1172, 1172, + 1172, 1172, 1172, 1172, 1172, 1172, 1173, 1173, 1173, 1173, + 1173, 1173, 1173, 1174, 1174, 0, 1174, 1174, 1174, 1174, + 1174, 1174, 1174, 1174, 1175, 1175, 1175, 1175, 1175, 1175, + 1175, 1175, 1175, 1175, 1175, 1176, 1176, 0, 1176, 1176, + 1176, 1176, 1176, 1176, 1176, 1176, 1177, 1177, 1177, 1177, + + 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1178, 1178, 1178, + 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1179, 1179, + 1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179, 1179, 1180, + 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, + 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, + 1181, 1182, 1182, 1182, 1182, 1182, 1182, 1182, 1182, 1182, + 1182, 1182, 1183, 1183, 1183, 1183, 1183, 1183, 1183, 1183, + 1183, 1183, 1183, 1184, 1184, 1184, 1184, 1184, 1184, 1184, + 1184, 1184, 1184, 1184, 1185, 1185, 1185, 1185, 1185, 1185, + 1185, 1185, 1185, 1185, 1185, 1186, 1186, 1186, 1186, 1186, + + 1186, 1186, 1186, 1186, 1186, 1186, 1187, 1187, 1187, 1187, + 1187, 1187, 1187, 1187, 1187, 1187, 1187, 1188, 1188, 1188, + 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1189, 1189, + 1189, 1189, 1189, 1189, 1189, 1189, 1189, 1189, 1189, 1190, + 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, + 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, + 1191, 1192, 0, 1192, 1192, 1192, 1192, 1192, 1192, 1192, + 1192, 1192, 1193, 0, 1193, 1193, 1193, 1193, 1193, 1193, + 1193, 1193, 1193, 1194, 0, 1194, 1194, 1194, 1194, 1194, + 1194, 1194, 1194, 1194, 1195, 0, 1195, 1195, 1195, 1195, + + 1195, 1195, 1195, 1195, 1195, 1196, 0, 1196, 1196, 1196, + 1196, 1196, 1196, 1196, 1196, 1196, 1197, 0, 0, 1197, + 1197, 1197, 1198, 1198, 1198, 1198, 1198, 1198, 1198, 1198, + 1199, 0, 1199, 1199, 1199, 1199, 1200, 1200, 1200, 1200, + 1200, 1200, 1200, 1201, 0, 1201, 1201, 1201, 1201, 1201, + 1201, 1201, 1201, 1201, 1202, 1202, 1202, 1202, 1202, 1202, + 1202, 1203, 1203, 0, 1203, 1203, 1203, 1203, 1203, 1203, + 1203, 1203, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052 } ; /* The intent behind this definition is that it'll catch @@ -2596,7 +2476,7 @@ static void include_file(PARROT_INTERP, char *file_name, ARGMOD(void *yyscanner) -#line 2600 "compilers/imcc/imclexer.c" +#line 2480 "compilers/imcc/imclexer.c" #define INITIAL 0 #define emit 1 @@ -2731,12 +2611,7 @@ static int input (yyscan_t yyscanner ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -2860,7 +2735,7 @@ YY_DECL return 0; } -#line 2864 "compilers/imcc/imclexer.c" +#line 2739 "compilers/imcc/imclexer.c" if ( !yyg->yy_init ) { @@ -2914,13 +2789,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1055 ) + if ( yy_current_state >= 1053 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 1054 ); + while ( yy_current_state != 1052 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -3433,165 +3308,160 @@ return FLOATV; YY_BREAK case 78: YY_RULE_SETUP -#line 369 "compilers/imcc/imcc.l" -return NEW; - YY_BREAK -case 79: -YY_RULE_SETUP #line 370 "compilers/imcc/imcc.l" return PMCV; YY_BREAK -case 80: +case 79: YY_RULE_SETUP #line 371 "compilers/imcc/imcc.l" return STRINGV; YY_BREAK -case 81: +case 80: YY_RULE_SETUP #line 372 "compilers/imcc/imcc.l" return SHIFT_LEFT; YY_BREAK -case 82: +case 81: YY_RULE_SETUP #line 373 "compilers/imcc/imcc.l" return SHIFT_RIGHT; YY_BREAK -case 83: +case 82: YY_RULE_SETUP #line 374 "compilers/imcc/imcc.l" return SHIFT_RIGHT_U; YY_BREAK -case 84: +case 83: YY_RULE_SETUP #line 375 "compilers/imcc/imcc.l" return LOG_AND; YY_BREAK -case 85: +case 84: YY_RULE_SETUP #line 376 "compilers/imcc/imcc.l" return LOG_OR; YY_BREAK -case 86: +case 85: YY_RULE_SETUP #line 377 "compilers/imcc/imcc.l" return LOG_XOR; YY_BREAK -case 87: +case 86: YY_RULE_SETUP #line 378 "compilers/imcc/imcc.l" return RELOP_LT; YY_BREAK -case 88: +case 87: YY_RULE_SETUP #line 379 "compilers/imcc/imcc.l" return RELOP_LTE; YY_BREAK -case 89: +case 88: YY_RULE_SETUP #line 380 "compilers/imcc/imcc.l" return RELOP_GT; YY_BREAK -case 90: +case 89: YY_RULE_SETUP #line 381 "compilers/imcc/imcc.l" return RELOP_GTE; YY_BREAK -case 91: +case 90: YY_RULE_SETUP #line 382 "compilers/imcc/imcc.l" return RELOP_EQ; YY_BREAK -case 92: +case 91: YY_RULE_SETUP #line 383 "compilers/imcc/imcc.l" return RELOP_NE; YY_BREAK -case 93: +case 92: YY_RULE_SETUP #line 384 "compilers/imcc/imcc.l" return POW; YY_BREAK -case 94: +case 93: YY_RULE_SETUP #line 386 "compilers/imcc/imcc.l" return CONCAT; YY_BREAK -case 95: +case 94: YY_RULE_SETUP #line 387 "compilers/imcc/imcc.l" return DOT; YY_BREAK -case 96: +case 95: YY_RULE_SETUP #line 389 "compilers/imcc/imcc.l" return PLUS_ASSIGN; YY_BREAK -case 97: +case 96: YY_RULE_SETUP #line 390 "compilers/imcc/imcc.l" return MINUS_ASSIGN; YY_BREAK -case 98: +case 97: YY_RULE_SETUP #line 391 "compilers/imcc/imcc.l" return MUL_ASSIGN; YY_BREAK -case 99: +case 98: YY_RULE_SETUP #line 392 "compilers/imcc/imcc.l" return DIV_ASSIGN; YY_BREAK -case 100: +case 99: YY_RULE_SETUP #line 393 "compilers/imcc/imcc.l" return MOD_ASSIGN; YY_BREAK -case 101: +case 100: YY_RULE_SETUP #line 394 "compilers/imcc/imcc.l" return FDIV; YY_BREAK -case 102: +case 101: YY_RULE_SETUP #line 395 "compilers/imcc/imcc.l" return FDIV_ASSIGN; YY_BREAK -case 103: +case 102: YY_RULE_SETUP #line 396 "compilers/imcc/imcc.l" return BAND_ASSIGN; YY_BREAK -case 104: +case 103: YY_RULE_SETUP #line 397 "compilers/imcc/imcc.l" return BOR_ASSIGN; YY_BREAK -case 105: +case 104: YY_RULE_SETUP #line 398 "compilers/imcc/imcc.l" return BXOR_ASSIGN; YY_BREAK -case 106: +case 105: YY_RULE_SETUP #line 399 "compilers/imcc/imcc.l" return SHR_ASSIGN; YY_BREAK -case 107: +case 106: YY_RULE_SETUP #line 400 "compilers/imcc/imcc.l" return SHL_ASSIGN; YY_BREAK -case 108: +case 107: YY_RULE_SETUP #line 401 "compilers/imcc/imcc.l" return SHR_U_ASSIGN; YY_BREAK -case 109: +case 108: YY_RULE_SETUP #line 402 "compilers/imcc/imcc.l" return CONCAT_ASSIGN; YY_BREAK -case 110: +case 109: YY_RULE_SETUP #line 404 "compilers/imcc/imcc.l" { @@ -3624,14 +3494,14 @@ YY_RULE_SETUP return MACRO; } YY_BREAK -case 111: +case 110: YY_RULE_SETUP #line 434 "compilers/imcc/imcc.l" { return read_macro(valp, interp, yyscanner); } YY_BREAK -case 112: +case 111: YY_RULE_SETUP #line 438 "compilers/imcc/imcc.l" { @@ -3643,7 +3513,7 @@ YY_RULE_SETUP include_file(interp, yytext + 1, yyscanner); } YY_BREAK -case 113: +case 112: YY_RULE_SETUP #line 447 "compilers/imcc/imcc.l" { @@ -3668,7 +3538,7 @@ YY_RULE_SETUP return LABEL; } YY_BREAK -case 114: +case 113: YY_RULE_SETUP #line 469 "compilers/imcc/imcc.l" { @@ -3693,12 +3563,12 @@ YY_RULE_SETUP return IDENTIFIER; } YY_BREAK -case 115: +case 114: YY_RULE_SETUP #line 491 "compilers/imcc/imcc.l" return COMMA; YY_BREAK -case 116: +case 115: YY_RULE_SETUP #line 493 "compilers/imcc/imcc.l" { @@ -3711,7 +3581,7 @@ YY_RULE_SETUP return LABEL; } YY_BREAK -case 117: +case 116: YY_RULE_SETUP #line 503 "compilers/imcc/imcc.l" { @@ -3723,32 +3593,32 @@ YY_RULE_SETUP } } YY_BREAK -case 118: +case 117: YY_RULE_SETUP #line 514 "compilers/imcc/imcc.l" DUP_AND_RET(valp, FLOATC); YY_BREAK -case 119: +case 118: YY_RULE_SETUP #line 515 "compilers/imcc/imcc.l" DUP_AND_RET(valp, INTC); YY_BREAK -case 120: +case 119: YY_RULE_SETUP #line 516 "compilers/imcc/imcc.l" DUP_AND_RET(valp, INTC); YY_BREAK -case 121: +case 120: YY_RULE_SETUP #line 517 "compilers/imcc/imcc.l" DUP_AND_RET(valp, INTC); YY_BREAK -case 122: +case 121: YY_RULE_SETUP #line 518 "compilers/imcc/imcc.l" DUP_AND_RET(valp, INTC); YY_BREAK -case 123: +case 122: YY_RULE_SETUP #line 520 "compilers/imcc/imcc.l" { @@ -3761,7 +3631,7 @@ YY_RULE_SETUP return STRINGC; } YY_BREAK -case 124: +case 123: YY_RULE_SETUP #line 530 "compilers/imcc/imcc.l" { @@ -3771,7 +3641,7 @@ YY_RULE_SETUP return STRINGC; } YY_BREAK -case 125: +case 124: YY_RULE_SETUP #line 537 "compilers/imcc/imcc.l" { @@ -3802,7 +3672,7 @@ YY_RULE_SETUP yy_push_state(heredoc1, yyscanner); } YY_BREAK -case 126: +case 125: YY_RULE_SETUP #line 565 "compilers/imcc/imcc.l" { @@ -3813,7 +3683,7 @@ YY_RULE_SETUP return USTRINGC; } YY_BREAK -case 127: +case 126: YY_RULE_SETUP #line 573 "compilers/imcc/imcc.l" { @@ -3824,7 +3694,7 @@ YY_RULE_SETUP return IREG; } YY_BREAK -case 128: +case 127: YY_RULE_SETUP #line 581 "compilers/imcc/imcc.l" { @@ -3835,7 +3705,7 @@ YY_RULE_SETUP return NREG; } YY_BREAK -case 129: +case 128: YY_RULE_SETUP #line 589 "compilers/imcc/imcc.l" { @@ -3846,7 +3716,7 @@ YY_RULE_SETUP return SREG; } YY_BREAK -case 130: +case 129: YY_RULE_SETUP #line 597 "compilers/imcc/imcc.l" { @@ -3857,7 +3727,7 @@ YY_RULE_SETUP return PREG; } YY_BREAK -case 131: +case 130: YY_RULE_SETUP #line 605 "compilers/imcc/imcc.l" { @@ -3865,7 +3735,7 @@ YY_RULE_SETUP "'%s' is not a valid register name", yytext); } YY_BREAK -case 132: +case 131: YY_RULE_SETUP #line 610 "compilers/imcc/imcc.l" { @@ -3879,7 +3749,7 @@ YY_RULE_SETUP return REG; } YY_BREAK -case 133: +case 132: YY_RULE_SETUP #line 621 "compilers/imcc/imcc.l" { @@ -3910,12 +3780,12 @@ YY_RULE_SETUP return (!is_def && is_op(interp, valp->s) ? PARROT_OP : IDENTIFIER); } YY_BREAK -case 134: +case 133: YY_RULE_SETUP #line 650 "compilers/imcc/imcc.l" /* skip */; YY_BREAK -case 135: +case 134: YY_RULE_SETUP #line 652 "compilers/imcc/imcc.l" { @@ -3940,13 +3810,13 @@ case YY_STATE_EOF(INITIAL): #line 668 "compilers/imcc/imcc.l" yyterminate(); YY_BREAK -case 136: +case 135: YY_RULE_SETUP #line 670 "compilers/imcc/imcc.l" DUP_AND_RET(valp, ENDM); YY_BREAK -case 137: -/* rule 137 can match eol */ +case 136: +/* rule 136 can match eol */ YY_RULE_SETUP #line 672 "compilers/imcc/imcc.l" { @@ -3954,12 +3824,12 @@ YY_RULE_SETUP DUP_AND_RET(valp, '\n'); } YY_BREAK -case 138: +case 137: YY_RULE_SETUP #line 677 "compilers/imcc/imcc.l" return LABEL; YY_BREAK -case 139: +case 138: YY_RULE_SETUP #line 679 "compilers/imcc/imcc.l" { @@ -3985,7 +3855,7 @@ YY_RULE_SETUP return LABEL; } YY_BREAK -case 140: +case 139: YY_RULE_SETUP #line 702 "compilers/imcc/imcc.l" { @@ -4002,37 +3872,37 @@ YY_RULE_SETUP return IDENTIFIER; } YY_BREAK -case 141: +case 140: YY_RULE_SETUP #line 716 "compilers/imcc/imcc.l" /* skip leading ws */; YY_BREAK -case 142: +case 141: YY_RULE_SETUP #line 717 "compilers/imcc/imcc.l" DUP_AND_RET(valp, ' '); YY_BREAK -case 143: +case 142: YY_RULE_SETUP #line 718 "compilers/imcc/imcc.l" DUP_AND_RET(valp, REG); YY_BREAK -case 144: +case 143: YY_RULE_SETUP #line 719 "compilers/imcc/imcc.l" DUP_AND_RET(valp, REG); YY_BREAK -case 145: +case 144: YY_RULE_SETUP #line 720 "compilers/imcc/imcc.l" DUP_AND_RET(valp, IDENTIFIER); YY_BREAK -case 146: +case 145: YY_RULE_SETUP #line 721 "compilers/imcc/imcc.l" DUP_AND_RET(valp, MACRO); YY_BREAK -case 147: +case 146: YY_RULE_SETUP #line 722 "compilers/imcc/imcc.l" DUP_AND_RET(valp, yytext[0]); @@ -4041,12 +3911,12 @@ case YY_STATE_EOF(macro): #line 723 "compilers/imcc/imcc.l" yyterminate(); YY_BREAK -case 148: +case 147: YY_RULE_SETUP #line 725 "compilers/imcc/imcc.l" ECHO; YY_BREAK -#line 4050 "compilers/imcc/imclexer.c" +#line 3920 "compilers/imcc/imclexer.c" case YY_STATE_EOF(pod): case YY_STATE_EOF(cmt1): case YY_STATE_EOF(cmt2): @@ -4349,7 +4219,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1055 ) + if ( yy_current_state >= 1053 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -4378,11 +4248,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1055 ) + if ( yy_current_state >= 1053 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 1054); + yy_is_jam = (yy_current_state == 1052); return yy_is_jam ? 0 : yy_current_state; } @@ -4825,8 +4695,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ diff --git a/compilers/imcc/imcparser.c b/compilers/imcc/imcparser.c index dbd5f2eb77..1f3bbc575d 100644 --- a/compilers/imcc/imcparser.c +++ b/compilers/imcc/imcparser.c @@ -1365,16 +1365,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 33 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 703 +#define YYLAST 666 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 138 +#define YYNTOKENS 139 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 126 /* YYNRULES -- Number of rules. */ -#define YYNRULES 343 +#define YYNRULES 333 /* YYNRULES -- Number of states. */ -#define YYNSTATES 556 +#define YYNSTATES 536 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -1389,16 +1389,16 @@ static const yytype_uint8 yytranslate[] = 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, 128, 2, 2, 2, 134, 135, 2, - 126, 127, 132, 131, 2, 130, 2, 133, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 137, + 2, 2, 2, 129, 2, 2, 2, 135, 136, 2, + 126, 127, 133, 132, 2, 131, 2, 134, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 138, 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, 124, 2, 125, 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, 136, 2, 129, 2, 2, 2, + 128, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 137, 2, 130, 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, @@ -1451,127 +1451,119 @@ static const yytype_uint16 yyprhs[] = 487, 490, 492, 496, 499, 500, 502, 504, 506, 507, 512, 517, 518, 525, 527, 528, 535, 538, 541, 544, 547, 549, 551, 553, 555, 556, 558, 560, 562, 564, - 566, 570, 575, 581, 588, 595, 602, 610, 615, 620, - 625, 632, 639, 647, 652, 659, 667, 671, 672, 682, - 684, 686, 688, 692, 694, 696, 698, 700, 702, 704, - 706, 708, 710, 712, 714, 716, 718, 720, 722, 724, - 726, 728, 730, 732, 734, 736, 738, 740, 742, 744, - 745, 751, 755, 757, 759, 761, 763, 765, 767, 769, - 771, 773, 775, 777, 779, 781, 786, 788, 790, 792, - 794, 798, 802, 806, 807, 813, 814, 818, 820, 826, - 830, 833, 834, 837, 839, 841, 846, 849, 853, 859, - 861, 865, 866, 868, 870, 877, 883, 888, 893, 900, - 906, 908, 910, 912, 914, 916, 918, 920, 922, 924, - 926, 927, 929, 933, 935, 937, 942, 946, 948, 950, - 952, 954, 956, 958, 960, 962, 964, 966, 968, 969, - 972, 973, 976, 978, 982, 984, 986, 988, 990, 992, - 994, 996, 998, 1000 + 566, 570, 575, 581, 588, 595, 603, 607, 608, 618, + 620, 622, 624, 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, 680, + 681, 687, 691, 693, 695, 697, 699, 701, 703, 705, + 707, 709, 711, 713, 715, 717, 722, 724, 726, 728, + 730, 734, 738, 742, 743, 749, 750, 754, 756, 762, + 766, 769, 770, 773, 775, 777, 782, 785, 789, 795, + 797, 801, 802, 804, 806, 813, 819, 824, 829, 836, + 842, 844, 846, 848, 850, 852, 854, 856, 858, 860, + 862, 863, 865, 869, 871, 873, 878, 882, 884, 886, + 888, 890, 892, 894, 896, 898, 900, 902, 904, 905, + 908, 909, 912, 914, 918, 920, 922, 924, 926, 928, + 930, 932, 934, 936 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 139, 0, -1, 140, -1, 141, -1, 140, 141, -1, - 161, -1, 146, -1, 163, -1, 158, -1, 111, 4, - -1, 142, -1, 143, -1, 4, -1, 145, 4, -1, + 140, 0, -1, 141, -1, 142, -1, 141, 142, -1, + 162, -1, 147, -1, 164, -1, 159, -1, 111, 4, + -1, 143, -1, 144, -1, 4, -1, 146, 4, -1, 97, 113, 4, -1, 8, 114, 72, 113, 4, -1, - 9, 113, 4, -1, 32, 113, 72, 263, -1, 6, - 113, -1, 7, 113, 123, 113, -1, -1, 31, 147, - 222, 109, 123, 263, -1, -1, 31, 149, 114, 254, - 123, 151, -1, -1, 31, 150, 113, 254, 123, 151, - -1, 113, -1, 116, -1, 153, -1, 152, 153, -1, - 211, 154, 4, -1, 111, 4, -1, 120, -1, 119, - -1, 161, -1, 148, -1, 142, -1, -1, 155, 117, - 157, -1, -1, 78, 156, 185, 102, -1, 14, 255, - -1, 30, 113, 72, 110, -1, -1, 248, -1, -1, - 103, 159, 160, 104, -1, -1, 152, -1, 25, 162, - 4, -1, 124, 256, 125, -1, 124, 125, -1, -1, - -1, -1, 27, 164, 251, 165, 185, 4, 166, 167, - 180, 73, -1, -1, 4, -1, 167, 168, 4, -1, - -1, 5, 169, 170, -1, 222, 109, 194, -1, 95, - 126, 178, 127, -1, 93, 126, 113, 127, -1, 93, + 9, 113, 4, -1, 32, 113, 72, 264, -1, 6, + 113, -1, 7, 113, 123, 113, -1, -1, 31, 148, + 223, 109, 123, 264, -1, -1, 31, 150, 114, 255, + 123, 152, -1, -1, 31, 151, 113, 255, 123, 152, + -1, 113, -1, 116, -1, 154, -1, 153, 154, -1, + 212, 155, 4, -1, 111, 4, -1, 120, -1, 119, + -1, 162, -1, 149, -1, 143, -1, -1, 156, 117, + 158, -1, -1, 78, 157, 186, 102, -1, 14, 256, + -1, 30, 113, 72, 110, -1, -1, 249, -1, -1, + 103, 160, 161, 104, -1, -1, 153, -1, 25, 163, + 4, -1, 124, 257, 125, -1, 124, 125, -1, -1, + -1, -1, 27, 165, 252, 166, 186, 4, 167, 168, + 181, 73, -1, -1, 4, -1, 168, 169, 4, -1, + -1, 5, 170, 171, -1, 223, 109, 195, -1, 95, + 126, 179, 127, -1, 93, 126, 113, 127, -1, 93, 126, 109, 127, -1, 96, -1, 96, 126, 113, 127, - -1, 91, -1, 91, 126, 151, 127, -1, 100, -1, - 100, 126, 151, 127, -1, 98, 126, 113, 127, -1, - 99, -1, 99, 126, 151, 127, -1, -1, 178, 72, - 179, -1, 179, -1, 52, -1, 53, -1, 55, -1, - 54, -1, 109, -1, 113, -1, 124, 256, 125, -1, - -1, 208, -1, -1, 75, 4, 182, 189, 184, 188, - 183, 191, 76, -1, -1, 213, 4, -1, -1, 85, - 255, 4, -1, -1, 186, -1, 187, -1, 186, 187, + -1, 91, -1, 91, 126, 152, 127, -1, 100, -1, + 100, 126, 152, 127, -1, 98, 126, 113, 127, -1, + 99, -1, 99, 126, 152, 127, -1, -1, 179, 72, + 180, -1, 180, -1, 52, -1, 53, -1, 55, -1, + 54, -1, 109, -1, 113, -1, 124, 257, 125, -1, + -1, 209, -1, -1, 75, 4, 183, 190, 185, 189, + 184, 192, 76, -1, -1, 214, 4, -1, -1, 85, + 256, 4, -1, -1, 187, -1, 188, -1, 187, 188, -1, 87, -1, 88, -1, 86, -1, 89, -1, 90, - -1, 92, -1, 94, -1, 171, -1, 172, -1, 173, - -1, 174, -1, 175, -1, 176, -1, 177, -1, 77, - 255, 72, 255, 4, -1, 77, 255, 4, -1, 83, - 255, 4, -1, 84, 247, 4, -1, 84, 113, 4, - -1, 84, 247, 72, 255, 4, -1, 84, 113, 72, - 255, 4, -1, -1, 189, 190, 4, -1, 11, 237, - -1, -1, 191, 192, 4, -1, 63, 247, 194, -1, - -1, 29, 193, 222, 216, -1, -1, 194, 195, -1, + -1, 92, -1, 94, -1, 172, -1, 173, -1, 174, + -1, 175, -1, 176, -1, 177, -1, 178, -1, 77, + 256, 72, 256, 4, -1, 77, 256, 4, -1, 83, + 256, 4, -1, 84, 248, 4, -1, 84, 113, 4, + -1, 84, 248, 72, 256, 4, -1, 84, 113, 72, + 256, 4, -1, -1, 190, 191, 4, -1, 11, 238, + -1, -1, 192, 193, 4, -1, 63, 248, 195, -1, + -1, 29, 194, 223, 217, -1, -1, 195, 196, -1, 18, -1, 19, -1, 20, -1, 21, -1, 21, 126, - 113, 127, -1, 101, -1, -1, 79, 4, 197, 200, - 80, -1, 204, -1, -1, 81, 4, 199, 201, 82, - -1, -1, 200, 4, -1, 200, 202, 4, -1, -1, - 201, 4, -1, 201, 203, 4, -1, 15, 255, 238, - -1, 16, 255, 238, -1, -1, 206, 126, 205, 207, - 127, -1, 64, -1, 66, -1, -1, 237, -1, 113, - 22, 255, -1, 207, 72, 237, -1, 207, 72, 113, - 22, 255, -1, 210, -1, 208, 210, -1, -1, 209, - 214, -1, 111, 4, -1, 120, -1, 119, -1, 143, - -1, 144, -1, -1, 212, -1, 212, 213, -1, 213, - -1, 102, -1, 211, 218, 4, -1, 1, 4, -1, - 216, -1, 215, 72, 216, -1, 109, 217, -1, -1, - 101, -1, 224, -1, 242, -1, -1, 29, 219, 222, - 215, -1, 30, 113, 72, 247, -1, -1, 31, 220, - 222, 109, 123, 263, -1, 148, -1, -1, 35, 221, - 222, 109, 123, 263, -1, 65, 234, -1, 10, 253, - -1, 117, 248, -1, 14, 255, -1, 234, -1, 181, - -1, 196, -1, 198, -1, -1, 52, -1, 53, -1, - 54, -1, 55, -1, 109, -1, 247, 123, 255, -1, - 247, 123, 226, 255, -1, 247, 123, 255, 227, 255, - -1, 247, 123, 255, 124, 256, 125, -1, 247, 124, - 256, 125, 123, 255, -1, 247, 123, 23, 223, 72, - 255, -1, 247, 123, 23, 223, 124, 256, 125, -1, - 247, 123, 23, 223, -1, 247, 123, 23, 255, -1, - 247, 123, 23, 162, -1, 247, 123, 23, 162, 72, - 255, -1, 247, 123, 23, 255, 72, 255, -1, 247, - 123, 23, 255, 124, 256, 125, -1, 23, 247, 72, - 255, -1, 23, 247, 72, 255, 72, 255, -1, 23, - 247, 72, 255, 124, 256, 125, -1, 247, 123, 234, - -1, -1, 126, 225, 241, 127, 123, 233, 126, 236, - 127, -1, 228, -1, 230, -1, 232, -1, 247, 123, - 14, -1, 128, -1, 129, -1, 130, -1, 130, -1, - 131, -1, 132, -1, 133, -1, 134, -1, 44, -1, - 68, -1, 122, -1, 57, -1, 58, -1, 59, -1, - 60, -1, 61, -1, 62, -1, 50, -1, 51, -1, - 69, -1, 70, -1, 71, -1, 56, -1, 135, -1, - 136, -1, 129, -1, -1, 67, 229, 126, 241, 127, - -1, 247, 231, 255, -1, 36, -1, 37, -1, 38, - -1, 39, -1, 46, -1, 45, -1, 40, -1, 41, - -1, 42, -1, 43, -1, 47, -1, 48, -1, 49, - -1, 247, 123, 117, 157, -1, 109, -1, 113, -1, - 116, -1, 247, -1, 247, 121, 252, -1, 247, 121, - 113, -1, 247, 121, 247, -1, -1, 233, 235, 126, - 236, 127, -1, -1, 236, 72, 237, -1, 237, -1, - 236, 72, 113, 22, 255, -1, 113, 22, 255, -1, - 255, 238, -1, -1, 238, 239, -1, 17, -1, 21, - -1, 21, 126, 113, 127, -1, 247, 194, -1, 241, - 72, 240, -1, 241, 72, 113, 22, 247, -1, 240, - -1, 113, 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, 72, -1, 10, -1, + 113, 127, -1, 101, -1, -1, 79, 4, 198, 201, + 80, -1, 205, -1, -1, 81, 4, 200, 202, 82, + -1, -1, 201, 4, -1, 201, 203, 4, -1, -1, + 202, 4, -1, 202, 204, 4, -1, 15, 256, 239, + -1, 16, 256, 239, -1, -1, 207, 126, 206, 208, + 127, -1, 64, -1, 66, -1, -1, 238, -1, 113, + 22, 256, -1, 208, 72, 238, -1, 208, 72, 113, + 22, 256, -1, 211, -1, 209, 211, -1, -1, 210, + 215, -1, 111, 4, -1, 120, -1, 119, -1, 144, + -1, 145, -1, -1, 213, -1, 213, 214, -1, 214, + -1, 102, -1, 212, 219, 4, -1, 1, 4, -1, + 217, -1, 216, 72, 217, -1, 109, 218, -1, -1, + 101, -1, 225, -1, 243, -1, -1, 29, 220, 223, + 216, -1, 30, 113, 72, 248, -1, -1, 31, 221, + 223, 109, 123, 264, -1, 149, -1, -1, 35, 222, + 223, 109, 123, 264, -1, 65, 235, -1, 10, 254, + -1, 117, 249, -1, 14, 256, -1, 235, -1, 182, + -1, 197, -1, 199, -1, -1, 52, -1, 53, -1, + 54, -1, 55, -1, 109, -1, 248, 123, 256, -1, + 248, 123, 227, 256, -1, 248, 123, 256, 228, 256, + -1, 248, 123, 256, 124, 257, 125, -1, 248, 124, + 257, 125, 123, 256, -1, 248, 123, 128, 224, 124, + 257, 125, -1, 248, 123, 235, -1, -1, 126, 226, + 242, 127, 123, 234, 126, 237, 127, -1, 229, -1, + 231, -1, 233, -1, 248, 123, 14, -1, 129, -1, + 130, -1, 131, -1, 131, -1, 132, -1, 133, -1, + 134, -1, 135, -1, 44, -1, 68, -1, 122, -1, 57, -1, 58, -1, 59, -1, 60, -1, 61, -1, - 62, -1, 118, -1, 262, -1, -1, 249, -1, 249, - 72, 250, -1, 250, -1, 254, -1, 247, 124, 256, - 125, -1, 124, 258, 125, -1, 252, -1, 113, -1, - 116, -1, 109, -1, 117, -1, 109, -1, 117, -1, - 253, -1, 255, -1, 247, -1, 263, -1, -1, 257, - 260, -1, -1, 259, 260, -1, 261, -1, 260, 137, - 261, -1, 255, -1, 105, -1, 106, -1, 107, -1, - 108, -1, 110, -1, 114, -1, 115, -1, 113, -1, - 116, -1 + 62, -1, 50, -1, 51, -1, 69, -1, 70, -1, + 71, -1, 56, -1, 136, -1, 137, -1, 130, -1, + -1, 67, 230, 126, 242, 127, -1, 248, 232, 256, + -1, 36, -1, 37, -1, 38, -1, 39, -1, 46, + -1, 45, -1, 40, -1, 41, -1, 42, -1, 43, + -1, 47, -1, 48, -1, 49, -1, 248, 123, 117, + 158, -1, 109, -1, 113, -1, 116, -1, 248, -1, + 248, 121, 253, -1, 248, 121, 113, -1, 248, 121, + 248, -1, -1, 234, 236, 126, 237, 127, -1, -1, + 237, 72, 238, -1, 238, -1, 237, 72, 113, 22, + 256, -1, 113, 22, 256, -1, 256, 239, -1, -1, + 239, 240, -1, 17, -1, 21, -1, 21, 126, 113, + 127, -1, 248, 195, -1, 242, 72, 241, -1, 242, + 72, 113, 22, 248, -1, 241, -1, 113, 22, 248, + -1, -1, 245, -1, 244, -1, 13, 256, 247, 256, + 10, 254, -1, 13, 14, 256, 10, 254, -1, 13, + 256, 246, 254, -1, 12, 256, 246, 254, -1, 12, + 256, 247, 256, 10, 254, -1, 12, 14, 256, 10, + 254, -1, 72, -1, 10, -1, 57, -1, 58, -1, + 59, -1, 60, -1, 61, -1, 62, -1, 118, -1, + 263, -1, -1, 250, -1, 250, 72, 251, -1, 251, + -1, 255, -1, 248, 124, 257, 125, -1, 124, 259, + 125, -1, 253, -1, 113, -1, 116, -1, 109, -1, + 117, -1, 109, -1, 117, -1, 254, -1, 256, -1, + 248, -1, 264, -1, -1, 258, 261, -1, -1, 260, + 261, -1, 262, -1, 261, 138, 262, -1, 256, -1, + 105, -1, 106, -1, 107, -1, 108, -1, 110, -1, + 114, -1, 115, -1, 113, -1, 116, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -1597,21 +1589,20 @@ static const yytype_uint16 yyrline[] = 1597, 1608, 1615, 1624, 1634, 1635, 1640, 1641, 1642, 1642, 1658, 1662, 1662, 1669, 1670, 1670, 1676, 1682, 1683, 1695, 1696, 1697, 1698, 1699, 1700, 1704, 1705, 1706, 1707, 1711, - 1724, 1726, 1728, 1730, 1732, 1734, 1736, 1738, 1740, 1742, - 1744, 1746, 1748, 1752, 1754, 1756, 1759, 1766, 1765, 1774, - 1775, 1776, 1777, 1785, 1786, 1787, 1791, 1792, 1793, 1794, - 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, - 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1819, - 1818, 1830, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, - 1845, 1846, 1847, 1848, 1849, 1854, 1865, 1866, 1867, 1868, - 1874, 1888, 1894, 1900, 1899, 1908, 1909, 1919, 1929, 1935, - 1944, 1948, 1949, 1953, 1954, 1957, 1961, 1965, 1975, 1980, - 1990, 1995, 1999, 2000, 2004, 2008, 2012, 2019, 2023, 2027, - 2034, 2035, 2039, 2040, 2041, 2042, 2043, 2044, 2048, 2049, - 2053, 2054, 2058, 2059, 2063, 2064, 2071, 2078, 2079, 2080, - 2084, 2085, 2089, 2090, 2094, 2095, 2099, 2100, 2104, 2104, - 2117, 2117, 2130, 2131, 2139, 2148, 2149, 2150, 2151, 2152, - 2156, 2157, 2158, 2159 + 1724, 1726, 1728, 1730, 1732, 1737, 1740, 1747, 1746, 1755, + 1756, 1757, 1758, 1766, 1767, 1768, 1772, 1773, 1774, 1775, + 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, + 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1800, + 1799, 1811, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, + 1826, 1827, 1828, 1829, 1830, 1835, 1846, 1847, 1848, 1849, + 1855, 1869, 1875, 1881, 1880, 1889, 1890, 1900, 1910, 1916, + 1925, 1929, 1930, 1934, 1935, 1938, 1942, 1946, 1956, 1961, + 1971, 1976, 1980, 1981, 1985, 1989, 1993, 2000, 2004, 2008, + 2015, 2016, 2020, 2021, 2022, 2023, 2024, 2025, 2029, 2030, + 2034, 2035, 2039, 2040, 2044, 2045, 2052, 2059, 2060, 2061, + 2065, 2066, 2070, 2071, 2075, 2076, 2080, 2081, 2085, 2085, + 2098, 2098, 2111, 2112, 2120, 2129, 2130, 2131, 2132, 2133, + 2137, 2138, 2139, 2140 }; #endif @@ -1640,31 +1631,31 @@ static const char *const yytname[] = "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", - "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", "classname", "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", "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 + "DOT", "CONCAT", "'='", "'['", "']'", "'('", "')'", "'new'", "'!'", + "'~'", "'-'", "'+'", "'*'", "'/'", "'%'", "'&'", "'|'", "';'", "$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", "classname", "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", "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 }; #endif @@ -1685,49 +1676,48 @@ static const yytype_uint16 yytoknum[] = 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, 375, 376, 61, 91, 93, 40, 41, 33, 126, - 45, 43, 42, 47, 37, 38, 124, 59 + 374, 375, 376, 61, 91, 93, 40, 41, 110, 33, + 126, 45, 43, 42, 47, 37, 38, 124, 59 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint16 yyr1[] = { - 0, 138, 139, 140, 140, 141, 141, 141, 141, 141, - 141, 141, 141, 142, 142, 143, 143, 144, 145, 145, - 147, 146, 149, 148, 150, 148, 151, 151, 152, 152, - 153, 153, 153, 153, 153, 153, 153, 155, 154, 156, - 154, 154, 154, 154, 157, 159, 158, 160, 160, 161, - 162, 162, 164, 165, 166, 163, 167, 167, 167, 169, - 168, 170, 171, 172, 172, 173, 173, 174, 174, 175, - 175, 176, 177, 177, 178, 178, 178, 179, 179, 179, - 179, 179, 179, 179, 180, 180, 182, 181, 183, 183, - 184, 184, 185, 185, 186, 186, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 188, 188, 188, 188, 188, 188, 188, 189, 189, 190, - 191, 191, 192, 193, 192, 194, 194, 195, 195, 195, - 195, 195, 195, 197, 196, 196, 199, 198, 200, 200, - 200, 201, 201, 201, 202, 203, 205, 204, 206, 206, - 207, 207, 207, 207, 207, 208, 208, 209, 210, 210, - 210, 210, 210, 210, 211, 211, 212, 212, 213, 214, - 214, 215, 215, 216, 217, 217, 218, 218, 219, 218, - 218, 220, 218, 218, 221, 218, 218, 218, 218, 218, - 218, 218, 218, 218, 218, 222, 222, 222, 222, 223, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 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, 235, 234, 236, 236, 236, 236, 236, - 237, 238, 238, 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, 263, 263 + 0, 139, 140, 141, 141, 142, 142, 142, 142, 142, + 142, 142, 142, 143, 143, 144, 144, 145, 146, 146, + 148, 147, 150, 149, 151, 149, 152, 152, 153, 153, + 154, 154, 154, 154, 154, 154, 154, 156, 155, 157, + 155, 155, 155, 155, 158, 160, 159, 161, 161, 162, + 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, 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, 221, 219, 219, 222, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 223, 223, 223, 223, 224, + 225, 225, 225, 225, 225, 225, 225, 226, 225, 225, + 225, 225, 225, 227, 227, 227, 228, 228, 228, 228, + 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, + 228, 228, 228, 228, 228, 228, 228, 228, 228, 230, + 229, 231, 232, 232, 232, 232, 232, 232, 232, 232, + 232, 232, 232, 232, 232, 233, 234, 234, 234, 234, + 234, 234, 234, 236, 235, 237, 237, 237, 237, 237, + 238, 239, 239, 240, 240, 240, 241, 242, 242, 242, + 242, 242, 243, 243, 244, 244, 244, 245, 245, 245, + 246, 246, 247, 247, 247, 247, 247, 247, 248, 248, + 249, 249, 250, 250, 251, 251, 251, 252, 252, 252, + 253, 253, 254, 254, 255, 255, 256, 256, 258, 257, + 260, 259, 261, 261, 262, 263, 263, 263, 263, 263, + 264, 264, 264, 264 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1753,8 +1743,7 @@ static const yytype_uint8 yyr2[] = 2, 1, 3, 2, 0, 1, 1, 1, 0, 4, 4, 0, 6, 1, 0, 6, 2, 2, 2, 2, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, - 3, 4, 5, 6, 6, 6, 7, 4, 4, 4, - 6, 6, 7, 4, 6, 7, 3, 0, 9, 1, + 3, 4, 5, 6, 6, 7, 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, 1, 1, 1, 1, 0, @@ -1777,59 +1766,57 @@ static const yytype_uint16 yydefact[] = { 0, 12, 0, 0, 0, 0, 0, 52, 20, 0, 45, 0, 0, 2, 3, 10, 11, 0, 6, 8, - 5, 7, 18, 0, 0, 0, 328, 0, 0, 0, + 5, 7, 18, 0, 0, 0, 318, 0, 0, 0, 0, 164, 9, 1, 4, 13, 0, 0, 16, 51, - 0, 0, 49, 320, 318, 319, 321, 53, 317, 195, + 0, 0, 49, 310, 308, 309, 311, 53, 307, 195, 196, 197, 198, 0, 14, 22, 168, 0, 33, 32, 36, 35, 164, 28, 0, 34, 37, 165, 167, 19, - 0, 50, 335, 336, 337, 338, 339, 342, 340, 341, - 343, 308, 326, 334, 329, 332, 309, 327, 92, 0, + 0, 50, 325, 326, 327, 328, 329, 332, 330, 331, + 333, 298, 316, 324, 319, 322, 299, 317, 92, 0, 0, 0, 31, 29, 46, 0, 0, 39, 0, 0, 166, 15, 0, 98, 96, 97, 99, 100, 67, 101, 0, 102, 0, 65, 0, 72, 69, 103, 104, 105, 106, 107, 108, 109, 0, 93, 94, 0, 0, 0, - 41, 0, 92, 30, 310, 333, 0, 0, 74, 0, - 0, 0, 0, 54, 95, 21, 322, 323, 324, 0, - 325, 0, 0, 0, 330, 38, 326, 44, 311, 313, - 314, 26, 27, 0, 0, 0, 77, 78, 80, 79, - 81, 82, 328, 0, 76, 0, 0, 0, 0, 56, - 0, 0, 42, 40, 0, 0, 328, 0, 68, 64, + 41, 0, 92, 30, 300, 323, 0, 0, 74, 0, + 0, 0, 0, 54, 95, 21, 312, 313, 314, 0, + 315, 0, 0, 0, 320, 38, 316, 44, 301, 303, + 304, 26, 27, 0, 0, 0, 77, 78, 80, 79, + 81, 82, 318, 0, 76, 0, 0, 0, 0, 56, + 0, 0, 42, 40, 0, 0, 318, 0, 68, 64, 63, 0, 0, 62, 66, 71, 73, 70, 57, 157, - 23, 25, 316, 331, 0, 312, 83, 75, 59, 0, + 23, 25, 306, 321, 0, 302, 83, 75, 59, 0, 0, 161, 160, 162, 163, 0, 0, 157, 0, 155, - 315, 0, 0, 159, 58, 55, 156, 0, 194, 158, - 60, 0, 0, 170, 0, 0, 0, 0, 0, 178, - 0, 181, 184, 148, 0, 149, 249, 0, 0, 0, - 266, 267, 268, 310, 217, 183, 191, 192, 193, 135, - 0, 0, 176, 219, 220, 221, 273, 190, 177, 293, - 292, 269, 125, 17, 187, 0, 0, 0, 0, 189, - 0, 0, 0, 0, 0, 186, 269, 0, 86, 133, - 136, 188, 291, 146, 169, 0, 252, 253, 254, 255, - 258, 259, 260, 261, 257, 256, 262, 263, 264, 0, - 0, 328, 0, 61, 0, 301, 302, 303, 304, 305, - 306, 307, 300, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 291, 117, 138, 141, 0, 289, 0, - 125, 150, 275, 271, 272, 270, 222, 0, 342, 343, - 310, 223, 224, 225, 0, 216, 326, 200, 0, 251, - 127, 128, 129, 130, 132, 126, 0, 297, 0, 0, - 296, 0, 213, 174, 179, 171, 180, 0, 0, 0, - 90, 0, 0, 0, 0, 0, 286, 342, 0, 151, - 281, 342, 0, 277, 199, 209, 207, 208, 265, 201, - 231, 240, 241, 245, 234, 235, 236, 237, 238, 239, - 232, 242, 243, 244, 233, 328, 248, 226, 227, 228, - 229, 230, 246, 247, 0, 0, 0, 299, 0, 295, - 0, 0, 328, 175, 173, 0, 0, 0, 250, 0, - 0, 0, 0, 139, 0, 134, 0, 142, 0, 137, - 0, 290, 0, 287, 0, 0, 0, 147, 280, 0, - 0, 274, 0, 0, 328, 0, 328, 0, 202, 0, - 0, 298, 294, 214, 0, 172, 182, 185, 119, 0, - 0, 0, 0, 88, 118, 281, 140, 281, 143, 0, - 0, 152, 342, 153, 283, 284, 282, 279, 342, 276, - 210, 205, 0, 211, 0, 203, 204, 131, 215, 91, - 0, 0, 0, 0, 120, 0, 144, 145, 288, 275, - 0, 0, 0, 206, 212, 111, 0, 112, 114, 0, - 113, 0, 0, 89, 0, 154, 0, 278, 0, 0, - 0, 123, 0, 87, 0, 218, 285, 110, 116, 115, + 305, 0, 0, 159, 58, 55, 156, 0, 194, 158, + 60, 0, 0, 170, 0, 0, 0, 0, 178, 0, + 181, 184, 148, 0, 149, 239, 0, 0, 0, 256, + 257, 258, 300, 207, 183, 191, 192, 193, 135, 0, + 0, 176, 209, 210, 211, 263, 190, 177, 283, 282, + 259, 125, 17, 187, 0, 0, 0, 0, 189, 0, + 0, 0, 0, 186, 259, 0, 86, 133, 136, 188, + 281, 146, 169, 0, 242, 243, 244, 245, 248, 249, + 250, 251, 247, 246, 252, 253, 254, 0, 0, 318, + 0, 61, 0, 291, 292, 293, 294, 295, 296, 297, + 290, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 281, 117, 138, 141, 0, 279, 0, 125, 150, 265, + 261, 262, 260, 212, 332, 333, 300, 0, 213, 214, + 215, 0, 206, 316, 200, 0, 241, 127, 128, 129, + 130, 132, 126, 0, 287, 0, 0, 286, 0, 174, + 179, 171, 180, 0, 0, 0, 90, 0, 0, 0, + 0, 0, 276, 332, 0, 151, 271, 332, 0, 267, + 255, 199, 0, 201, 221, 230, 231, 235, 224, 225, + 226, 227, 228, 229, 222, 232, 233, 234, 223, 318, + 238, 216, 217, 218, 219, 220, 236, 237, 0, 0, + 0, 289, 0, 285, 0, 175, 173, 0, 0, 0, + 240, 0, 0, 0, 0, 139, 0, 134, 0, 142, + 0, 137, 0, 280, 0, 277, 0, 0, 0, 147, + 270, 0, 0, 264, 318, 0, 202, 0, 0, 288, + 284, 172, 182, 185, 119, 0, 0, 0, 0, 88, + 118, 271, 140, 271, 143, 0, 0, 152, 332, 153, + 273, 274, 272, 269, 332, 266, 0, 203, 204, 131, + 91, 0, 0, 0, 0, 120, 0, 144, 145, 278, + 265, 0, 0, 0, 205, 111, 0, 112, 114, 0, + 113, 0, 0, 89, 0, 154, 0, 268, 0, 0, + 0, 123, 0, 87, 0, 208, 275, 110, 116, 115, 0, 125, 121, 0, 122, 124 }; @@ -1840,251 +1827,241 @@ static const yytype_int16 yydefgoto[] = 61, 90, 91, 163, 62, 63, 98, 99, 132, 155, 19, 31, 64, 20, 27, 21, 28, 88, 179, 199, 215, 221, 230, 117, 118, 119, 120, 121, 122, 123, - 173, 174, 216, 256, 334, 514, 441, 124, 125, 126, - 483, 380, 442, 532, 544, 550, 313, 365, 257, 335, - 258, 336, 381, 382, 446, 450, 259, 341, 260, 388, - 217, 218, 219, 66, 67, 68, 229, 374, 375, 434, - 261, 281, 283, 284, 53, 396, 262, 292, 354, 424, - 263, 287, 264, 312, 265, 266, 267, 295, 392, 393, - 458, 496, 338, 339, 268, 269, 270, 323, 324, 82, + 173, 174, 216, 255, 331, 495, 433, 124, 125, 126, + 469, 376, 434, 512, 524, 530, 311, 362, 256, 332, + 257, 333, 377, 378, 438, 442, 258, 338, 259, 384, + 217, 218, 219, 66, 67, 68, 229, 370, 371, 426, + 260, 279, 281, 282, 53, 392, 261, 290, 351, 418, + 262, 285, 263, 310, 264, 265, 266, 293, 388, 389, + 450, 482, 335, 336, 267, 268, 269, 321, 322, 82, 157, 158, 159, 47, 48, 148, 160, 150, 40, 41, 184, 185, 84, 85, 86, 87 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -429 +#define YYPACT_NINF -422 static const yytype_int16 yypact[] = { - 86, -429, -57, 21, -67, 36, -1, -429, -429, 40, - -429, 153, 158, 86, -429, -429, -429, 155, -429, -429, - -429, -429, -429, 45, 107, 177, 57, 183, 133, 203, - 186, 214, -429, -429, -429, -429, 78, 79, -429, -429, - 77, 279, -429, -429, -429, -429, -429, -429, -429, -429, - -429, -429, -429, 94, -429, 92, -429, 204, -429, -429, - -429, -429, 234, -429, 103, -429, 7, 111, -429, -429, - 210, -429, -429, -429, -429, -429, -429, -429, -429, -429, - -429, -429, -429, -429, 82, -429, -429, -429, 487, 99, - 101, 124, -429, -429, -429, 279, 131, -429, 225, 136, - -429, -429, 279, -429, -429, -429, -429, -429, 122, -429, - 134, -429, 135, 141, 142, 147, 156, -429, -429, -429, - -429, -429, -429, -429, 280, 487, -429, 164, 483, 483, - -429, 216, 487, -429, 403, -429, 34, 13, 157, 176, - 181, 34, 34, -429, -429, -429, -429, -429, -429, 167, - -429, 172, 189, 200, -429, -429, 179, -429, 232, -429, - -429, -429, -429, 178, 180, 182, -429, -429, -429, -429, - -429, -429, -429, -56, -429, 185, 190, 192, 193, 304, - 34, 34, -429, -429, 196, 279, -429, 403, -429, -429, - -429, 198, 157, -429, -429, -429, -429, -429, -429, 35, - -429, -429, -429, 82, 199, -429, -429, -429, -429, 197, - 326, -429, -429, -429, -429, 331, 266, 143, 22, -429, - -429, 203, 268, -429, -429, -429, -429, 340, 262, -429, - -429, 237, 164, -429, -89, 328, 342, 279, 125, -429, - 235, -45, -429, -429, 446, -429, -429, 343, 345, 347, - -429, -429, -429, 403, -429, -429, -429, -429, -429, -429, - 226, 351, -429, -429, -429, -429, -429, -429, -429, -429, - -429, 425, -429, -429, -429, 279, 166, 279, 166, -429, - 286, 203, 287, 203, 203, -429, 239, 236, -429, -429, - -429, -429, 567, -429, -429, 238, -429, -429, -429, -429, - -429, -429, -429, -429, -429, -429, -429, -429, -429, 553, - 56, -429, 279, 55, 353, -429, -429, -429, -429, -429, - -429, -429, -429, -89, 279, 355, -89, 279, 279, 252, - 125, 257, 264, 567, -429, -429, -429, 352, -429, -55, - -429, 497, 511, -429, -429, -429, -429, 423, 250, 251, - 403, -429, -429, -429, 279, -429, -80, 436, 256, -429, - -429, -429, -429, 265, -429, -429, -89, -429, 372, -89, - -429, 386, -24, 299, 329, -429, -429, 281, 282, -23, - -2, 4, 9, 125, 576, 283, 55, 380, -22, -429, - -429, 387, -13, -429, -429, 336, -8, 64, -429, -429, - -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, - -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, - -429, -429, -429, -429, 279, 288, 300, -429, -89, -429, - -89, 279, -429, -429, -429, 252, 164, 164, -429, 279, - 279, 116, 408, -429, 279, -429, 412, -429, 279, -429, - 416, -429, 401, -429, 446, 279, 525, -429, 12, 279, - 539, -429, 279, 279, -429, 279, -429, 301, -429, 279, - 298, -429, -429, -429, 302, -429, -429, -429, -429, 426, - 279, 279, 585, 111, -429, -429, -429, -429, -429, 125, - 303, -429, 409, -429, -429, 306, -429, -429, 415, -429, - -429, -429, 320, -429, 334, -429, -429, -429, -429, -429, - 8, 447, 10, 26, -429, 449, 12, 12, -429, 511, - 279, 341, 279, -429, -429, -429, 279, -429, -429, 279, - -429, 279, 104, -429, -12, -429, 348, -429, 465, 472, - 473, -429, 125, -429, 478, -429, -429, -429, -429, -429, - 203, -429, -429, 252, 55, -429 + 358, -422, -75, -19, -67, 1, -71, -422, -422, 20, + -422, 145, 150, 358, -422, -422, -422, 155, -422, -422, + -422, -422, -422, 44, 96, 171, 51, 179, 2, 156, + 184, 110, -422, -422, -422, -422, 76, 79, -422, -422, + 68, 469, -422, -422, -422, -422, -422, -422, -422, -422, + -422, -422, -422, 89, -422, 86, -422, 199, -422, -422, + -422, -422, 216, -422, 101, -422, 54, 113, -422, -422, + 202, -422, -422, -422, -422, -422, -422, -422, -422, -422, + -422, -422, -422, -422, 87, -422, -422, -422, 436, 103, + 114, 111, -422, -422, -422, 469, 118, -422, 223, 115, + -422, -422, 469, -422, -422, -422, -422, -422, 108, -422, + 112, -422, 117, 120, 122, 131, 132, -422, -422, -422, + -422, -422, -422, -422, 233, 436, -422, 104, 455, 455, + -422, 167, 436, -422, 389, -422, 42, 12, 127, 140, + 146, 42, 42, -422, -422, -422, -422, -422, -422, 121, + -422, 143, 135, 166, -422, -422, 152, -422, 198, -422, + -422, -422, -422, 147, 151, 158, -422, -422, -422, -422, + -422, -422, -422, -60, -422, 159, 168, 173, 175, 275, + 42, 42, -422, -422, 157, 469, -422, 389, -422, -422, + -422, 169, 127, -422, -422, -422, -422, -422, -422, 34, + -422, -422, -422, 87, 178, -422, -422, -422, -422, 170, + 308, -422, -422, -422, -422, 310, 246, 37, 21, -422, + -422, 156, 243, -422, -422, -422, -422, 318, 242, -422, + -422, 215, 104, -422, -69, 266, 314, 469, -422, 212, + -49, -422, -422, 183, -422, -422, 322, 335, 336, -422, + -422, -422, 389, -422, -422, -422, -422, -422, -422, 217, + 340, -422, -422, -422, -422, -422, -422, -422, -422, -422, + 397, -422, -422, -422, 469, 203, 469, 203, -422, 156, + 274, 156, 156, -422, 232, 228, -422, -422, -422, -422, + 432, -422, -422, 230, -422, -422, -422, -422, -422, -422, + -422, -422, -422, -422, -422, -422, -422, 224, 56, -422, + 469, 8, 347, -422, -422, -422, -422, -422, -422, -422, + -422, -69, 469, 351, -69, 469, 254, 346, 260, 261, + 432, -422, -422, -422, 353, -422, -56, -422, 483, 497, + -422, -422, -422, -422, 252, 262, 389, 277, -422, -422, + -422, 469, -422, -85, 422, 268, -422, -422, -422, -422, + 270, -422, -422, -69, -422, 377, -69, -422, 384, 296, + 326, -422, -422, 278, 279, -55, -3, 17, 7, 346, + 539, 281, 8, 378, -54, -422, -422, 383, -52, -422, + -422, -422, 284, -422, -422, -422, -422, -422, -422, -422, + -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, + -422, -422, -422, -422, -422, -422, -422, -422, 469, 286, + 299, -422, -69, -422, -69, -422, -422, 254, 104, 104, + -422, 469, 469, 22, 409, -422, 469, -422, 410, -422, + 469, -422, 411, -422, 395, -422, 183, 469, 511, -422, + 119, 469, 525, -422, -422, 293, -422, 469, 304, -422, + -422, -422, -422, -422, -422, 419, 469, 469, 548, 113, + -422, -422, -422, -422, -422, 346, 315, -422, 425, -422, + -422, 323, -422, -422, 426, -422, 325, -422, -422, -422, + -422, 5, 453, 9, 11, -422, 454, 119, 119, -422, + 497, 469, 350, 469, -422, -422, 469, -422, -422, 469, + -422, 469, 15, -422, -48, -422, 344, -422, 463, 470, + 471, -422, 346, -422, 472, -422, -422, -422, -422, -422, + 156, -422, -422, 254, 8, -422 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -429, -429, -429, 470, -4, -175, -429, -429, -429, -429, - 261, -429, -429, -103, -429, 422, -429, -429, -429, 149, - -429, -429, -429, 0, 144, -429, -429, -429, -429, -429, - -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, - -429, 308, -429, -429, -429, -429, -429, 369, -429, 377, - -429, -429, -429, -429, -429, -429, -334, -429, -429, -429, - -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, - -429, -429, 297, 285, -429, -66, -429, -429, -428, -429, - -429, -429, -429, -429, -218, -429, -429, -429, -429, -429, - -429, -429, -429, -429, -429, 61, -229, -429, 3, -319, - -378, -429, 139, 191, -429, -429, -429, 247, 248, -132, - 289, -429, 356, -429, 231, -224, -10, -41, -168, -429, - -429, -429, 349, 433, -429, -122 + -422, -422, -422, 464, 18, -162, -422, -422, -422, -422, + 257, -422, -422, 10, -422, 424, -422, -422, -422, 141, + -422, -422, -422, 28, -422, -422, -422, -422, -422, -422, + -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, + -422, 297, -422, -422, -422, -422, -422, 356, -422, 375, + -422, -422, -422, -422, -422, -422, -330, -422, -422, -422, + -422, -422, -422, -422, -422, -422, -422, -422, -422, -422, + -422, -422, 291, 283, -422, -66, -422, -422, -421, -422, + -422, -422, -422, -422, -219, -422, -422, -422, -422, -422, + -422, -422, -422, -422, -422, 63, -213, -422, 14, -328, + -397, -422, 130, 181, -422, -422, -422, 235, 238, -130, + 264, -422, 330, -422, 226, -220, -36, -41, -167, -422, + -422, -422, 334, 439, -422, -124 }; /* 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 -270 +#define YYTABLE_NINF -260 static const yytype_int16 yytable[] = { - 83, 100, 156, 231, 191, 145, 386, 475, 443, 439, - 274, -43, 525, 447, 528, 285, 192, 384, 204, 444, - 146, 95, 389, 227, 213, 448, -164, 60, 147, 494, - 530, 65, -164, 495, -164, -164, -164, 96, 177, 178, - 208, 309, 213, 4, 5, -164, -269, 24, 431, 384, - 456, -164, -164, -164, 130, 156, 22, -164, 60, 460, - 460, 83, 65, 329, 463, 331, 332, 209, -24, -22, - 346, 193, 385, 360, 361, 362, 363, 200, 201, 347, - 526, 355, 529, 440, 445, 97, -164, -164, -164, -164, - 1, 449, 2, 3, 4, 5, 271, -164, 531, 367, - 432, -164, 370, -164, 438, 457, 280, 516, -84, 517, - 273, 6, 286, 7, 461, 545, 464, 8, 149, 151, - 478, 156, 164, 26, 56, 555, 165, -164, -164, -164, - -164, -164, -164, 541, 23, -164, 465, 493, -164, -164, - -164, 499, 427, 358, 83, 429, 210, 161, -164, 25, - 162, 4, 5, 30, 211, 212, 364, 32, 33, 35, - 340, 72, 73, 74, 75, 250, 76, 542, 36, 348, - 78, 79, 349, 350, 81, 209, 315, 344, 356, 37, - 543, 38, 39, 9, 351, 352, 353, 42, 466, 10, - 54, 69, 70, 480, 276, 278, 279, 11, 376, 481, - 482, 340, 71, 89, 471, -24, 472, 94, 92, 166, - 167, 168, 169, 56, 101, 128, -85, 554, 156, 102, - 2, 3, 127, 316, 317, 318, 319, 320, 321, 133, - 72, 73, 74, 75, 314, 76, 325, 129, 322, 6, - 2, 3, 43, 81, 131, 55, 44, 467, 136, 45, - 46, 451, 340, 134, 210, 49, 50, 51, 52, 6, - 137, 138, 211, 212, 474, 55, 170, 139, 140, 357, - 171, 359, 234, 141, 235, 236, 237, 77, 78, 79, - 80, 172, 142, 368, 143, 238, 371, 372, 152, 175, - 180, 239, 240, 241, 176, 181, 502, 242, 504, 182, - 390, 390, 183, 186, 187, 188, 397, 189, 198, 190, - 222, 9, 194, 399, 476, 477, 56, 195, -47, 196, - 197, 202, 286, 206, 220, 57, 243, 244, 245, 246, - 223, 9, 553, 58, 59, 224, 56, 247, -48, 225, - 232, 248, 275, 249, 233, 57, 272, 288, 282, 289, - 513, 290, 293, 58, 59, 294, 277, 518, 328, 330, - 309, 373, 333, 366, 342, 369, 377, 72, 73, 74, - 75, 250, 76, 378, 383, 251, -267, -268, 252, 253, - 81, 425, 428, 468, 72, 73, 74, 75, 254, 76, - 473, 426, 77, 78, 79, 80, 430, 81, 390, 479, - 433, 435, 455, 485, 436, 437, 454, 487, 462, 459, - 551, 469, 484, 470, 491, 390, 486, 515, 497, 390, - 488, 500, 501, 489, 503, 507, 505, 508, 506, 519, - 509, 520, 521, 72, 73, 74, 75, 522, 76, 510, - 511, 77, 78, 79, 80, 523, 81, 72, 73, 74, - 75, 527, 76, 533, 536, 77, 78, 79, 80, 524, - 81, 296, 297, 298, 299, 300, 301, 302, 303, 547, - 304, 305, 306, 307, 308, 546, 548, 549, 390, 535, - 400, 537, 552, 34, 93, 538, 401, 402, 539, 255, - 540, 395, 403, 404, 405, 406, 407, 408, 409, 398, - 207, 153, 144, 228, 410, 411, 412, 413, 72, 73, - 74, 75, 146, 76, 226, 490, 77, 78, 79, 80, - 147, 81, 534, 453, 379, 326, 327, 154, 72, 73, - 74, 75, 394, 76, 203, 135, 77, 78, 79, 80, - 345, 81, 291, 205, 0, 0, 309, 26, 310, 311, - 0, 72, 73, 74, 75, 250, 76, 0, 414, 251, - 415, 0, 252, 0, 81, 416, 417, 418, 419, 420, - 421, 422, 423, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 0, 114, 115, 116, 72, 73, - 74, 75, 146, 76, 0, 0, 77, 78, 79, 80, - 147, 81, 72, 73, 74, 75, 0, 76, 0, 0, + 83, 100, 231, 145, 156, 191, 461, 382, 431, 505, + 385, 439, 192, 508, 273, 510, 380, 380, 448, 204, + 452, 435, 227, 440, 452, -164, 357, 358, 359, 360, + 283, -164, 436, -164, -164, -164, 307, 213, 22, 208, + 146, -259, 4, 5, 521, 4, 5, 24, 147, 60, + -164, -164, -164, 26, 130, 213, -164, 156, -43, 65, + 326, 83, 328, 329, -24, -22, 209, 193, 95, 209, + 343, 381, 430, 449, 497, 453, 498, 506, 522, 525, + 60, 509, 432, 511, 96, -164, -164, -164, -164, 441, + 65, 523, 149, 151, 23, 352, -164, 437, 270, 466, + -164, 364, -164, 464, 367, 467, 468, -84, 272, 361, + -85, 43, 535, 284, 25, 44, 2, 3, 45, 46, + 479, 164, 156, 56, 485, 165, -164, -164, -164, -164, + -164, -164, 97, 30, -164, 6, 480, -164, -164, -164, + 481, 55, 355, 421, 83, 210, 423, -164, 210, 32, + 33, 177, 178, 211, 212, 161, 211, 212, 162, 35, + 337, 72, 73, 74, 75, 249, 76, 36, 37, 344, + 78, 79, 345, 346, 81, 38, 39, 341, 353, 166, + 167, 168, 169, 42, 347, 348, 349, 350, 54, 69, + 200, 201, 70, 71, 275, 277, 278, 372, 89, -24, + 337, 534, 459, 92, 460, 94, 101, 9, 49, 50, + 51, 52, 56, 313, -47, 56, 156, 77, 78, 79, + 80, 57, 2, 3, 129, 102, 127, 133, 128, 58, + 59, 131, 134, 312, 136, 323, 170, 143, 137, 152, + 171, 6, 455, 138, 180, 182, 139, 55, 140, 443, + 337, 172, 234, 175, 235, 236, 237, 141, 142, 176, + 314, 315, 316, 317, 318, 319, 181, 354, 183, 356, + 187, 238, 239, 240, 188, 320, 186, 241, 189, 198, + 274, 365, 202, 222, 368, 190, 194, 486, 72, 73, + 74, 75, 249, 76, 206, 195, 250, 386, 386, 251, + 196, 81, 197, 220, 462, 463, 242, 243, 244, 245, + 393, 533, 223, 9, 224, 232, 284, 246, 56, 225, + -48, 247, 233, 248, 271, 280, 286, 57, 276, 72, + 73, 74, 75, 43, 76, 58, 59, 340, 494, 287, + 288, 46, 81, 291, 292, 499, 327, 72, 73, 74, + 75, 249, 76, 307, 330, 250, 339, 363, 251, 252, + 81, 366, 1, 369, 2, 3, 4, 5, 253, 373, + 374, 72, 73, 74, 75, 379, 76, 456, -257, 77, + 78, 79, 80, 6, 81, 7, 391, 422, -258, 8, + 386, 465, 531, 419, 424, 471, 420, 425, 427, 473, + 447, 428, 429, 496, 446, 451, 477, 386, 454, 457, + 483, 386, 458, 470, 472, 474, 488, 475, 487, 72, + 73, 74, 75, 490, 76, 491, 492, 77, 78, 79, + 80, 489, 81, 294, 295, 296, 297, 298, 299, 300, + 301, 500, 302, 303, 304, 305, 306, 501, 503, 502, + 504, 72, 73, 74, 75, 9, 76, 507, 513, 386, + 515, 10, 517, 516, 81, 518, 394, 527, 519, 11, + 520, 526, 395, 396, 528, 529, 532, 34, 397, 398, + 399, 400, 401, 402, 403, 254, 93, 390, 153, 207, + 404, 405, 406, 407, 72, 73, 74, 75, 146, 76, + 144, 228, 77, 78, 79, 80, 147, 81, 226, 476, + 445, 375, 324, 154, 514, 325, 289, 205, 307, 203, + 308, 309, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 342, 114, 115, 116, 72, 73, 74, + 75, 135, 76, 0, 408, 334, 409, 0, 0, 0, + 81, 0, 410, 411, 412, 413, 414, 415, 416, 417, + 72, 73, 74, 75, 146, 76, 0, 0, 77, 78, + 79, 80, 147, 81, 72, 73, 74, 75, 0, 76, + 0, 0, 77, 78, 79, 80, 0, 81, 72, 73, + 74, 75, 0, 76, 0, 0, 383, 78, 79, 80, + 0, 81, 72, 73, 74, 75, 0, 76, 0, 0, 387, 78, 79, 80, 0, 81, 72, 73, 74, 75, - 0, 76, 0, 0, 391, 78, 79, 80, 0, 81, - 72, 73, 74, 75, 0, 76, 0, 0, 492, 78, + 0, 76, 0, 0, 478, 78, 79, 80, 0, 81, + 72, 73, 74, 75, 0, 76, 0, 0, 484, 78, 79, 80, 0, 81, 72, 73, 74, 75, 0, 76, - 0, 0, 498, 78, 79, 80, 0, 81, 72, 73, - 74, 75, 43, 76, 0, 0, 343, 0, 0, 0, - 46, 81, 72, 73, 74, 75, 0, 76, 0, 0, - 337, 72, 73, 74, 75, 81, 76, 0, 0, 452, - 72, 73, 74, 75, 81, 76, 0, 0, 512, 0, - 0, 0, 0, 81 + 0, 0, 444, 72, 73, 74, 75, 81, 76, 0, + 0, 493, 0, 0, 0, 0, 81 }; static const yytype_int16 yycheck[] = { - 41, 67, 134, 221, 172, 127, 340, 435, 4, 11, - 234, 4, 4, 4, 4, 244, 72, 72, 186, 15, - 109, 14, 341, 1, 199, 16, 4, 31, 117, 17, - 4, 31, 10, 21, 12, 13, 14, 30, 141, 142, - 5, 121, 217, 8, 9, 23, 126, 114, 72, 72, - 72, 29, 30, 31, 95, 187, 113, 35, 62, 72, - 72, 102, 62, 281, 72, 283, 284, 32, 113, 114, - 14, 127, 127, 18, 19, 20, 21, 180, 181, 23, - 72, 310, 72, 85, 80, 78, 64, 65, 66, 67, - 4, 82, 6, 7, 8, 9, 228, 75, 72, 323, - 124, 79, 326, 81, 127, 127, 238, 485, 73, 487, - 232, 25, 244, 27, 127, 127, 124, 31, 128, 129, - 439, 253, 109, 124, 102, 553, 113, 105, 106, 107, - 108, 109, 110, 29, 113, 113, 72, 456, 116, 117, - 118, 460, 366, 311, 185, 369, 111, 113, 126, 113, - 116, 8, 9, 113, 119, 120, 101, 4, 0, 4, - 292, 105, 106, 107, 108, 109, 110, 63, 123, 113, - 114, 115, 116, 117, 118, 32, 10, 309, 310, 72, - 76, 4, 125, 97, 128, 129, 130, 4, 124, 103, - 4, 113, 113, 77, 235, 236, 237, 111, 330, 83, - 84, 333, 125, 109, 428, 113, 430, 104, 4, 52, - 53, 54, 55, 102, 4, 114, 73, 551, 350, 137, - 6, 7, 123, 57, 58, 59, 60, 61, 62, 4, - 105, 106, 107, 108, 275, 110, 277, 113, 72, 25, - 6, 7, 109, 118, 113, 31, 113, 415, 126, 116, - 117, 383, 384, 117, 111, 52, 53, 54, 55, 25, - 126, 126, 119, 120, 432, 31, 109, 126, 126, 310, - 113, 312, 10, 126, 12, 13, 14, 113, 114, 115, - 116, 124, 126, 324, 4, 23, 327, 328, 72, 113, - 123, 29, 30, 31, 113, 123, 464, 35, 466, 110, - 341, 342, 102, 124, 72, 127, 347, 127, 4, 127, - 113, 97, 127, 354, 436, 437, 102, 127, 104, 127, - 127, 125, 454, 125, 125, 111, 64, 65, 66, 67, - 4, 97, 550, 119, 120, 4, 102, 75, 104, 73, - 72, 79, 14, 81, 4, 111, 109, 4, 113, 4, - 482, 4, 126, 119, 120, 4, 14, 489, 72, 72, - 121, 109, 126, 10, 126, 10, 109, 105, 106, 107, - 108, 109, 110, 109, 22, 113, 126, 126, 116, 117, - 118, 125, 10, 424, 105, 106, 107, 108, 126, 110, - 431, 126, 113, 114, 115, 116, 10, 118, 439, 440, - 101, 72, 22, 444, 123, 123, 123, 448, 72, 22, - 542, 123, 4, 113, 455, 456, 4, 483, 459, 460, - 4, 462, 463, 22, 465, 127, 125, 125, 469, 126, - 4, 22, 126, 105, 106, 107, 108, 22, 110, 480, - 481, 113, 114, 115, 116, 125, 118, 105, 106, 107, - 108, 4, 110, 4, 113, 113, 114, 115, 116, 125, - 118, 36, 37, 38, 39, 40, 41, 42, 43, 4, - 45, 46, 47, 48, 49, 127, 4, 4, 519, 520, - 44, 522, 4, 13, 62, 526, 50, 51, 529, 228, - 531, 347, 56, 57, 58, 59, 60, 61, 62, 350, - 192, 132, 125, 218, 68, 69, 70, 71, 105, 106, - 107, 108, 109, 110, 217, 454, 113, 114, 115, 116, - 117, 118, 519, 384, 333, 278, 278, 124, 105, 106, - 107, 108, 109, 110, 185, 102, 113, 114, 115, 116, - 309, 118, 253, 187, -1, -1, 121, 124, 123, 124, - -1, 105, 106, 107, 108, 109, 110, -1, 122, 113, - 124, -1, 116, -1, 118, 129, 130, 131, 132, 133, - 134, 135, 136, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, -1, 98, 99, 100, 105, 106, - 107, 108, 109, 110, -1, -1, 113, 114, 115, 116, - 117, 118, 105, 106, 107, 108, -1, 110, -1, -1, + 41, 67, 221, 127, 134, 172, 427, 337, 11, 4, + 338, 4, 72, 4, 234, 4, 72, 72, 72, 186, + 72, 4, 1, 16, 72, 4, 18, 19, 20, 21, + 243, 10, 15, 12, 13, 14, 121, 199, 113, 5, + 109, 126, 8, 9, 29, 8, 9, 114, 117, 31, + 29, 30, 31, 124, 95, 217, 35, 187, 4, 31, + 279, 102, 281, 282, 113, 114, 32, 127, 14, 32, + 14, 127, 127, 127, 471, 127, 473, 72, 63, 127, + 62, 72, 85, 72, 30, 64, 65, 66, 67, 82, + 62, 76, 128, 129, 113, 308, 75, 80, 228, 77, + 79, 321, 81, 431, 324, 83, 84, 73, 232, 101, + 73, 109, 533, 243, 113, 113, 6, 7, 116, 117, + 448, 109, 252, 102, 452, 113, 105, 106, 107, 108, + 109, 110, 78, 113, 113, 25, 17, 116, 117, 118, + 21, 31, 309, 363, 185, 111, 366, 126, 111, 4, + 0, 141, 142, 119, 120, 113, 119, 120, 116, 4, + 290, 105, 106, 107, 108, 109, 110, 123, 72, 113, + 114, 115, 116, 117, 118, 4, 125, 307, 308, 52, + 53, 54, 55, 4, 128, 129, 130, 131, 4, 113, + 180, 181, 113, 125, 235, 236, 237, 327, 109, 113, + 330, 531, 422, 4, 424, 104, 4, 97, 52, 53, + 54, 55, 102, 10, 104, 102, 346, 113, 114, 115, + 116, 111, 6, 7, 113, 138, 123, 4, 114, 119, + 120, 113, 117, 274, 126, 276, 109, 4, 126, 72, + 113, 25, 409, 126, 123, 110, 126, 31, 126, 379, + 380, 124, 10, 113, 12, 13, 14, 126, 126, 113, + 57, 58, 59, 60, 61, 62, 123, 308, 102, 310, + 72, 29, 30, 31, 127, 72, 124, 35, 127, 4, + 14, 322, 125, 113, 325, 127, 127, 454, 105, 106, + 107, 108, 109, 110, 125, 127, 113, 338, 339, 116, + 127, 118, 127, 125, 428, 429, 64, 65, 66, 67, + 351, 530, 4, 97, 4, 72, 446, 75, 102, 73, + 104, 79, 4, 81, 109, 113, 4, 111, 14, 105, + 106, 107, 108, 109, 110, 119, 120, 113, 468, 4, + 4, 117, 118, 126, 4, 475, 72, 105, 106, 107, + 108, 109, 110, 121, 126, 113, 126, 10, 116, 117, + 118, 10, 4, 109, 6, 7, 8, 9, 126, 109, + 109, 105, 106, 107, 108, 22, 110, 418, 126, 113, + 114, 115, 116, 25, 118, 27, 109, 10, 126, 31, + 431, 432, 522, 125, 10, 436, 126, 101, 72, 440, + 22, 123, 123, 469, 123, 22, 447, 448, 124, 123, + 451, 452, 113, 4, 4, 4, 457, 22, 125, 105, + 106, 107, 108, 4, 110, 466, 467, 113, 114, 115, + 116, 127, 118, 36, 37, 38, 39, 40, 41, 42, + 43, 126, 45, 46, 47, 48, 49, 22, 22, 126, + 125, 105, 106, 107, 108, 97, 110, 4, 4, 500, + 501, 103, 503, 113, 118, 506, 44, 4, 509, 111, + 511, 127, 50, 51, 4, 4, 4, 13, 56, 57, + 58, 59, 60, 61, 62, 228, 62, 346, 132, 192, + 68, 69, 70, 71, 105, 106, 107, 108, 109, 110, + 125, 218, 113, 114, 115, 116, 117, 118, 217, 446, + 380, 330, 277, 124, 500, 277, 252, 187, 121, 185, + 123, 124, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 307, 98, 99, 100, 105, 106, 107, + 108, 102, 110, -1, 122, 113, 124, -1, -1, -1, + 118, -1, 130, 131, 132, 133, 134, 135, 136, 137, + 105, 106, 107, 108, 109, 110, -1, -1, 113, 114, + 115, 116, 117, 118, 105, 106, 107, 108, -1, 110, + -1, -1, 113, 114, 115, 116, -1, 118, 105, 106, + 107, 108, -1, 110, -1, -1, 113, 114, 115, 116, + -1, 118, 105, 106, 107, 108, -1, 110, -1, -1, 113, 114, 115, 116, -1, 118, 105, 106, 107, 108, -1, 110, -1, -1, 113, 114, 115, 116, -1, 118, 105, 106, 107, 108, -1, 110, -1, -1, 113, 114, 115, 116, -1, 118, 105, 106, 107, 108, -1, 110, - -1, -1, 113, 114, 115, 116, -1, 118, 105, 106, - 107, 108, 109, 110, -1, -1, 113, -1, -1, -1, - 117, 118, 105, 106, 107, 108, -1, 110, -1, -1, - 113, 105, 106, 107, 108, 118, 110, -1, -1, 113, - 105, 106, 107, 108, 118, 110, -1, -1, 113, -1, - -1, -1, -1, 118 + -1, -1, 113, 105, 106, 107, 108, 118, 110, -1, + -1, 113, -1, -1, -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -2092,61 +2069,59 @@ static const yytype_int16 yycheck[] = static const yytype_uint16 yystos[] = { 0, 4, 6, 7, 8, 9, 25, 27, 31, 97, - 103, 111, 139, 140, 141, 142, 143, 145, 146, 158, - 161, 163, 113, 113, 114, 113, 124, 162, 164, 147, - 113, 159, 4, 0, 141, 4, 123, 72, 4, 125, - 256, 257, 4, 109, 113, 116, 117, 251, 252, 52, - 53, 54, 55, 222, 4, 31, 102, 111, 119, 120, - 142, 148, 152, 153, 160, 161, 211, 212, 213, 113, + 103, 111, 140, 141, 142, 143, 144, 146, 147, 159, + 162, 164, 113, 113, 114, 113, 124, 163, 165, 148, + 113, 160, 4, 0, 142, 4, 123, 72, 4, 125, + 257, 258, 4, 109, 113, 116, 117, 252, 253, 52, + 53, 54, 55, 223, 4, 31, 102, 111, 119, 120, + 143, 149, 153, 154, 161, 162, 212, 213, 214, 113, 113, 125, 105, 106, 107, 108, 110, 113, 114, 115, - 116, 118, 247, 255, 260, 261, 262, 263, 165, 109, - 149, 150, 4, 153, 104, 14, 30, 78, 154, 155, - 213, 4, 137, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 98, 99, 100, 171, 172, 173, - 174, 175, 176, 177, 185, 186, 187, 123, 114, 113, - 255, 113, 156, 4, 117, 261, 126, 126, 126, 126, - 126, 126, 126, 4, 187, 263, 109, 117, 253, 254, - 255, 254, 72, 185, 124, 157, 247, 248, 249, 250, - 254, 113, 116, 151, 109, 113, 52, 53, 54, 55, - 109, 113, 124, 178, 179, 113, 113, 151, 151, 166, - 123, 123, 110, 102, 258, 259, 124, 72, 127, 127, - 127, 256, 72, 127, 127, 127, 127, 127, 4, 167, - 151, 151, 125, 260, 256, 250, 125, 179, 5, 32, - 111, 119, 120, 143, 144, 168, 180, 208, 209, 210, - 125, 169, 113, 4, 4, 73, 210, 1, 211, 214, - 170, 222, 72, 4, 10, 12, 13, 14, 23, 29, - 30, 31, 35, 64, 65, 66, 67, 75, 79, 81, - 109, 113, 116, 117, 126, 148, 181, 196, 198, 204, - 206, 218, 224, 228, 230, 232, 233, 234, 242, 243, - 244, 247, 109, 263, 253, 14, 255, 14, 255, 255, - 247, 219, 113, 220, 221, 234, 247, 229, 4, 4, - 4, 248, 225, 126, 4, 235, 36, 37, 38, 39, - 40, 41, 42, 43, 45, 46, 47, 48, 49, 121, - 123, 124, 231, 194, 255, 10, 57, 58, 59, 60, - 61, 62, 72, 245, 246, 255, 245, 246, 72, 222, - 72, 222, 222, 126, 182, 197, 199, 113, 240, 241, - 247, 205, 126, 113, 247, 252, 14, 23, 113, 116, - 117, 128, 129, 130, 226, 234, 247, 255, 256, 255, - 18, 19, 20, 21, 101, 195, 10, 253, 255, 10, - 253, 255, 255, 109, 215, 216, 247, 109, 109, 241, - 189, 200, 201, 22, 72, 127, 194, 113, 207, 237, - 255, 113, 236, 237, 109, 162, 223, 255, 157, 255, - 44, 50, 51, 56, 57, 58, 59, 60, 61, 62, - 68, 69, 70, 71, 122, 124, 129, 130, 131, 132, - 133, 134, 135, 136, 227, 125, 126, 253, 10, 253, - 10, 72, 124, 101, 217, 72, 123, 123, 127, 11, - 85, 184, 190, 4, 15, 80, 202, 4, 16, 82, - 203, 247, 113, 240, 123, 22, 72, 127, 238, 22, - 72, 127, 72, 72, 124, 72, 124, 256, 255, 123, - 113, 253, 253, 255, 256, 216, 263, 263, 237, 255, - 77, 83, 84, 188, 4, 255, 4, 255, 4, 22, - 233, 255, 113, 237, 17, 21, 239, 255, 113, 237, - 255, 255, 256, 255, 256, 125, 255, 127, 125, 4, - 255, 255, 113, 247, 183, 213, 238, 238, 247, 126, - 22, 126, 22, 125, 125, 4, 72, 4, 4, 72, - 4, 72, 191, 4, 236, 255, 113, 255, 255, 255, - 255, 29, 63, 76, 192, 127, 127, 4, 4, 4, - 193, 247, 4, 222, 194, 216 + 116, 118, 248, 256, 261, 262, 263, 264, 166, 109, + 150, 151, 4, 154, 104, 14, 30, 78, 155, 156, + 214, 4, 138, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 98, 99, 100, 172, 173, 174, + 175, 176, 177, 178, 186, 187, 188, 123, 114, 113, + 256, 113, 157, 4, 117, 262, 126, 126, 126, 126, + 126, 126, 126, 4, 188, 264, 109, 117, 254, 255, + 256, 255, 72, 186, 124, 158, 248, 249, 250, 251, + 255, 113, 116, 152, 109, 113, 52, 53, 54, 55, + 109, 113, 124, 179, 180, 113, 113, 152, 152, 167, + 123, 123, 110, 102, 259, 260, 124, 72, 127, 127, + 127, 257, 72, 127, 127, 127, 127, 127, 4, 168, + 152, 152, 125, 261, 257, 251, 125, 180, 5, 32, + 111, 119, 120, 144, 145, 169, 181, 209, 210, 211, + 125, 170, 113, 4, 4, 73, 211, 1, 212, 215, + 171, 223, 72, 4, 10, 12, 13, 14, 29, 30, + 31, 35, 64, 65, 66, 67, 75, 79, 81, 109, + 113, 116, 117, 126, 149, 182, 197, 199, 205, 207, + 219, 225, 229, 231, 233, 234, 235, 243, 244, 245, + 248, 109, 264, 254, 14, 256, 14, 256, 256, 220, + 113, 221, 222, 235, 248, 230, 4, 4, 4, 249, + 226, 126, 4, 236, 36, 37, 38, 39, 40, 41, + 42, 43, 45, 46, 47, 48, 49, 121, 123, 124, + 232, 195, 256, 10, 57, 58, 59, 60, 61, 62, + 72, 246, 247, 256, 246, 247, 223, 72, 223, 223, + 126, 183, 198, 200, 113, 241, 242, 248, 206, 126, + 113, 248, 253, 14, 113, 116, 117, 128, 129, 130, + 131, 227, 235, 248, 256, 257, 256, 18, 19, 20, + 21, 101, 196, 10, 254, 256, 10, 254, 256, 109, + 216, 217, 248, 109, 109, 242, 190, 201, 202, 22, + 72, 127, 195, 113, 208, 238, 256, 113, 237, 238, + 158, 109, 224, 256, 44, 50, 51, 56, 57, 58, + 59, 60, 61, 62, 68, 69, 70, 71, 122, 124, + 130, 131, 132, 133, 134, 135, 136, 137, 228, 125, + 126, 254, 10, 254, 10, 101, 218, 72, 123, 123, + 127, 11, 85, 185, 191, 4, 15, 80, 203, 4, + 16, 82, 204, 248, 113, 241, 123, 22, 72, 127, + 239, 22, 72, 127, 124, 257, 256, 123, 113, 254, + 254, 217, 264, 264, 238, 256, 77, 83, 84, 189, + 4, 256, 4, 256, 4, 22, 234, 256, 113, 238, + 17, 21, 240, 256, 113, 238, 257, 125, 256, 127, + 4, 256, 256, 113, 248, 184, 214, 239, 239, 248, + 126, 22, 126, 22, 125, 4, 72, 4, 4, 72, + 4, 72, 192, 4, 237, 256, 113, 256, 256, 256, + 256, 29, 63, 76, 193, 127, 127, 4, 4, 4, + 194, 248, 4, 223, 195, 217 }; #define yyerrok (yyerrstatus = 0) @@ -4185,62 +4160,12 @@ int yynerrs; break; case 205: -#line 1735 "compilers/imcc/imcc.y" - { (yyval.i) = iNEW(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(4) - (6)].s), (yyvsp[(6) - (6)].sr), 1); } - break; - - case 206: -#line 1737 "compilers/imcc/imcc.y" +#line 1738 "compilers/imcc/imcc.y" { (yyval.i) = iNEW(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (7)].sr), (yyvsp[(4) - (7)].s), (yyvsp[(6) - (7)].sr), 1); } break; - case 207: -#line 1739 "compilers/imcc/imcc.y" - { (yyval.i) = iNEW(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].s), NULL, 1); } - break; - - case 208: + case 206: #line 1741 "compilers/imcc/imcc.y" - { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr)); } - break; - - case 209: -#line 1743 "compilers/imcc/imcc.y" - { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr)); } - break; - - case 210: -#line 1745 "compilers/imcc/imcc.y" - { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, (yyvsp[(1) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr)); } - break; - - case 211: -#line 1747 "compilers/imcc/imcc.y" - { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, (yyvsp[(1) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr)); } - break; - - case 212: -#line 1749 "compilers/imcc/imcc.y" - { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, (yyvsp[(1) - (7)].sr), (yyvsp[(4) - (7)].sr), (yyvsp[(6) - (7)].sr)); } - break; - - case 213: -#line 1753 "compilers/imcc/imcc.y" - { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr)); } - break; - - case 214: -#line 1755 "compilers/imcc/imcc.y" - { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr)); } - break; - - case 215: -#line 1757 "compilers/imcc/imcc.y" - { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, (yyvsp[(2) - (7)].sr), (yyvsp[(4) - (7)].sr), (yyvsp[(6) - (7)].sr)); } - break; - - case 216: -#line 1760 "compilers/imcc/imcc.y" { add_pcc_result((yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr)); IMCC_INFO(interp)->cur_call = NULL; @@ -4248,160 +4173,160 @@ int yynerrs; } break; - case 217: -#line 1766 "compilers/imcc/imcc.y" + case 207: +#line 1747 "compilers/imcc/imcc.y" { (yyval.i) = IMCC_create_itcall_label(interp); } break; - case 218: -#line 1770 "compilers/imcc/imcc.y" + case 208: +#line 1751 "compilers/imcc/imcc.y" { IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr)); IMCC_INFO(interp)->cur_call = NULL; } break; - case 222: -#line 1778 "compilers/imcc/imcc.y" + case 212: +#line 1759 "compilers/imcc/imcc.y" { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr)); } break; - case 223: -#line 1785 "compilers/imcc/imcc.y" + case 213: +#line 1766 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"not"; } break; - case 224: -#line 1786 "compilers/imcc/imcc.y" + case 214: +#line 1767 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"bnot"; } break; - case 225: -#line 1787 "compilers/imcc/imcc.y" + case 215: +#line 1768 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"neg"; } break; - case 226: -#line 1791 "compilers/imcc/imcc.y" + case 216: +#line 1772 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"sub"; } break; - case 227: -#line 1792 "compilers/imcc/imcc.y" + case 217: +#line 1773 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"add"; } break; - case 228: -#line 1793 "compilers/imcc/imcc.y" + case 218: +#line 1774 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"mul"; } break; - case 229: -#line 1794 "compilers/imcc/imcc.y" + case 219: +#line 1775 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"div"; } break; - case 230: -#line 1795 "compilers/imcc/imcc.y" + case 220: +#line 1776 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"mod"; } break; - case 231: -#line 1796 "compilers/imcc/imcc.y" + case 221: +#line 1777 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"fdiv"; } break; - case 232: -#line 1797 "compilers/imcc/imcc.y" + case 222: +#line 1778 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"pow"; } break; - case 233: -#line 1798 "compilers/imcc/imcc.y" + case 223: +#line 1779 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"concat"; } break; - case 234: -#line 1799 "compilers/imcc/imcc.y" + case 224: +#line 1780 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"iseq"; } break; - case 235: -#line 1800 "compilers/imcc/imcc.y" + case 225: +#line 1781 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"isne"; } break; - case 236: -#line 1801 "compilers/imcc/imcc.y" + case 226: +#line 1782 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"isgt"; } break; - case 237: -#line 1802 "compilers/imcc/imcc.y" + case 227: +#line 1783 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"isge"; } break; - case 238: -#line 1803 "compilers/imcc/imcc.y" + case 228: +#line 1784 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"islt"; } break; - case 239: -#line 1804 "compilers/imcc/imcc.y" + case 229: +#line 1785 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"isle"; } break; - case 240: -#line 1805 "compilers/imcc/imcc.y" + case 230: +#line 1786 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"shl"; } break; - case 241: -#line 1806 "compilers/imcc/imcc.y" + case 231: +#line 1787 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"shr"; } break; - case 242: -#line 1807 "compilers/imcc/imcc.y" + case 232: +#line 1788 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"lsr"; } break; - case 243: -#line 1808 "compilers/imcc/imcc.y" + case 233: +#line 1789 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"and"; } break; - case 244: -#line 1809 "compilers/imcc/imcc.y" + case 234: +#line 1790 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"or"; } break; - case 245: -#line 1810 "compilers/imcc/imcc.y" + case 235: +#line 1791 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"xor"; } break; - case 246: -#line 1811 "compilers/imcc/imcc.y" + case 236: +#line 1792 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"band"; } break; - case 247: -#line 1812 "compilers/imcc/imcc.y" + case 237: +#line 1793 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"bor"; } break; - case 248: -#line 1813 "compilers/imcc/imcc.y" + case 238: +#line 1794 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"bxor"; } break; - case 249: -#line 1819 "compilers/imcc/imcc.y" + case 239: +#line 1800 "compilers/imcc/imcc.y" { (yyval.i) = IMCC_create_itcall_label(interp); (yyval.i)->type &= ~ITCALL; @@ -4409,85 +4334,85 @@ int yynerrs; } break; - case 250: -#line 1824 "compilers/imcc/imcc.y" + case 240: +#line 1805 "compilers/imcc/imcc.y" { (yyval.i) = 0; } break; - case 251: -#line 1831 "compilers/imcc/imcc.y" + case 241: +#line 1812 "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 252: -#line 1837 "compilers/imcc/imcc.y" + case 242: +#line 1818 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"add"; } break; - case 253: -#line 1838 "compilers/imcc/imcc.y" + case 243: +#line 1819 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"sub"; } break; - case 254: -#line 1839 "compilers/imcc/imcc.y" + case 244: +#line 1820 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"mul"; } break; - case 255: -#line 1840 "compilers/imcc/imcc.y" + case 245: +#line 1821 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"div"; } break; - case 256: -#line 1841 "compilers/imcc/imcc.y" + case 246: +#line 1822 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"mod"; } break; - case 257: -#line 1842 "compilers/imcc/imcc.y" + case 247: +#line 1823 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"fdiv"; } break; - case 258: -#line 1843 "compilers/imcc/imcc.y" + case 248: +#line 1824 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"concat"; } break; - case 259: -#line 1844 "compilers/imcc/imcc.y" + case 249: +#line 1825 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"band"; } break; - case 260: -#line 1845 "compilers/imcc/imcc.y" + case 250: +#line 1826 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"bor"; } break; - case 261: -#line 1846 "compilers/imcc/imcc.y" + case 251: +#line 1827 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"bxor"; } break; - case 262: -#line 1847 "compilers/imcc/imcc.y" + case 252: +#line 1828 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"shr"; } break; - case 263: -#line 1848 "compilers/imcc/imcc.y" + case 253: +#line 1829 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"shl"; } break; - case 264: -#line 1849 "compilers/imcc/imcc.y" + case 254: +#line 1830 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"lsr"; } break; - case 265: -#line 1855 "compilers/imcc/imcc.y" + case 255: +#line 1836 "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, @@ -4497,23 +4422,23 @@ int yynerrs; } break; - case 266: -#line 1865 "compilers/imcc/imcc.y" + case 256: +#line 1846 "compilers/imcc/imcc.y" { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 267: -#line 1866 "compilers/imcc/imcc.y" + case 257: +#line 1847 "compilers/imcc/imcc.y" { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 268: -#line 1867 "compilers/imcc/imcc.y" + case 258: +#line 1848 "compilers/imcc/imcc.y" { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 269: -#line 1869 "compilers/imcc/imcc.y" + case 259: +#line 1850 "compilers/imcc/imcc.y" { (yyval.sr) = (yyvsp[(1) - (1)].sr); if ((yyvsp[(1) - (1)].sr)->set != 'P') @@ -4521,8 +4446,8 @@ int yynerrs; } break; - case 270: -#line 1875 "compilers/imcc/imcc.y" + case 260: +#line 1856 "compilers/imcc/imcc.y" { /* disallow bareword method names; SREG name constants are fine */ char *name = (yyvsp[(3) - (3)].sr)->name; @@ -4538,8 +4463,8 @@ int yynerrs; } break; - case 271: -#line 1889 "compilers/imcc/imcc.y" + case 261: +#line 1870 "compilers/imcc/imcc.y" { IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'S'); @@ -4547,31 +4472,31 @@ int yynerrs; } break; - case 272: -#line 1894 "compilers/imcc/imcc.y" + case 262: +#line 1875 "compilers/imcc/imcc.y" { IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); } break; - case 273: -#line 1900 "compilers/imcc/imcc.y" + case 263: +#line 1881 "compilers/imcc/imcc.y" { (yyval.i) = IMCC_create_itcall_label(interp); IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr)); } break; - case 274: -#line 1904 "compilers/imcc/imcc.y" + case 264: +#line 1885 "compilers/imcc/imcc.y" { (yyval.i) = (yyvsp[(2) - (5)].i); } break; - case 275: -#line 1908 "compilers/imcc/imcc.y" + case 265: +#line 1889 "compilers/imcc/imcc.y" { (yyval.sr) = 0; } break; - case 276: -#line 1910 "compilers/imcc/imcc.y" + case 266: +#line 1891 "compilers/imcc/imcc.y" { (yyval.sr) = 0; if (IMCC_INFO(interp)->adv_named_id) { @@ -4583,8 +4508,8 @@ int yynerrs; } break; - case 277: -#line 1920 "compilers/imcc/imcc.y" + case 267: +#line 1901 "compilers/imcc/imcc.y" { (yyval.sr) = 0; if (IMCC_INFO(interp)->adv_named_id) { @@ -4596,8 +4521,8 @@ int yynerrs; } break; - case 278: -#line 1930 "compilers/imcc/imcc.y" + case 268: +#line 1911 "compilers/imcc/imcc.y" { (yyval.sr) = 0; add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (5)].s), (yyvsp[(5) - (5)].sr)); @@ -4605,8 +4530,8 @@ int yynerrs; } break; - case 279: -#line 1936 "compilers/imcc/imcc.y" + case 269: +#line 1917 "compilers/imcc/imcc.y" { (yyval.sr) = 0; add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].s), (yyvsp[(3) - (3)].sr)); @@ -4614,43 +4539,43 @@ int yynerrs; } break; - case 280: -#line 1944 "compilers/imcc/imcc.y" + case 270: +#line 1925 "compilers/imcc/imcc.y" { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); } break; - case 281: -#line 1948 "compilers/imcc/imcc.y" + case 271: +#line 1929 "compilers/imcc/imcc.y" { (yyval.t) = 0; } break; - case 282: -#line 1949 "compilers/imcc/imcc.y" + case 272: +#line 1930 "compilers/imcc/imcc.y" { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); } break; - case 283: -#line 1953 "compilers/imcc/imcc.y" + case 273: +#line 1934 "compilers/imcc/imcc.y" { (yyval.t) = VT_FLAT; } break; - case 284: -#line 1954 "compilers/imcc/imcc.y" + case 274: +#line 1935 "compilers/imcc/imcc.y" { (yyval.t) = VT_NAMED; } break; - case 285: -#line 1957 "compilers/imcc/imcc.y" + case 275: +#line 1938 "compilers/imcc/imcc.y" { adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; } break; - case 286: -#line 1961 "compilers/imcc/imcc.y" + case 276: +#line 1942 "compilers/imcc/imcc.y" { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); } break; - case 287: -#line 1966 "compilers/imcc/imcc.y" + case 277: +#line 1947 "compilers/imcc/imcc.y" { (yyval.sr) = 0; if (IMCC_INFO(interp)->adv_named_id) { @@ -4662,16 +4587,16 @@ int yynerrs; } break; - case 288: -#line 1976 "compilers/imcc/imcc.y" + case 278: +#line 1957 "compilers/imcc/imcc.y" { add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (5)].s), (yyvsp[(5) - (5)].sr)); mem_sys_free((yyvsp[(3) - (5)].s)); } break; - case 289: -#line 1981 "compilers/imcc/imcc.y" + case 279: +#line 1962 "compilers/imcc/imcc.y" { (yyval.sr) = 0; if (IMCC_INFO(interp)->adv_named_id) { @@ -4683,133 +4608,133 @@ int yynerrs; } break; - case 290: -#line 1991 "compilers/imcc/imcc.y" + case 280: +#line 1972 "compilers/imcc/imcc.y" { add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].s), (yyvsp[(3) - (3)].sr)); mem_sys_free((yyvsp[(1) - (3)].s)); } break; - case 291: -#line 1995 "compilers/imcc/imcc.y" + case 281: +#line 1976 "compilers/imcc/imcc.y" { (yyval.sr) = 0; } break; - case 292: -#line 1999 "compilers/imcc/imcc.y" + case 282: +#line 1980 "compilers/imcc/imcc.y" { (yyval.i) = (yyvsp[(1) - (1)].i); } break; - case 293: -#line 2000 "compilers/imcc/imcc.y" + case 283: +#line 1981 "compilers/imcc/imcc.y" { (yyval.i) = (yyvsp[(1) - (1)].i); } break; - case 294: -#line 2005 "compilers/imcc/imcc.y" + case 284: +#line 1986 "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 295: -#line 2009 "compilers/imcc/imcc.y" + case 285: +#line 1990 "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 296: -#line 2013 "compilers/imcc/imcc.y" + case 286: +#line 1994 "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 297: -#line 2020 "compilers/imcc/imcc.y" + case 287: +#line 2001 "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 298: -#line 2024 "compilers/imcc/imcc.y" + case 288: +#line 2005 "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 299: -#line 2028 "compilers/imcc/imcc.y" + case 289: +#line 2009 "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 300: -#line 2034 "compilers/imcc/imcc.y" + case 290: +#line 2015 "compilers/imcc/imcc.y" { (yyval.t) = 0; } break; - case 301: -#line 2035 "compilers/imcc/imcc.y" + case 291: +#line 2016 "compilers/imcc/imcc.y" { (yyval.t) = 0; } break; - case 302: -#line 2039 "compilers/imcc/imcc.y" + case 292: +#line 2020 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"eq"; } break; - case 303: -#line 2040 "compilers/imcc/imcc.y" + case 293: +#line 2021 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"ne"; } break; - case 304: -#line 2041 "compilers/imcc/imcc.y" + case 294: +#line 2022 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"gt"; } break; - case 305: -#line 2042 "compilers/imcc/imcc.y" + case 295: +#line 2023 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"ge"; } break; - case 306: -#line 2043 "compilers/imcc/imcc.y" + case 296: +#line 2024 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"lt"; } break; - case 307: -#line 2044 "compilers/imcc/imcc.y" + case 297: +#line 2025 "compilers/imcc/imcc.y" { (yyval.s) = (char *)"le"; } break; - case 310: -#line 2053 "compilers/imcc/imcc.y" + case 300: +#line 2034 "compilers/imcc/imcc.y" { (yyval.sr) = NULL; } break; - case 311: -#line 2054 "compilers/imcc/imcc.y" + case 301: +#line 2035 "compilers/imcc/imcc.y" { (yyval.sr) = (yyvsp[(1) - (1)].sr); } break; - case 312: -#line 2058 "compilers/imcc/imcc.y" + case 302: +#line 2039 "compilers/imcc/imcc.y" { (yyval.sr) = IMCC_INFO(interp)->regs[0]; } break; - case 314: -#line 2063 "compilers/imcc/imcc.y" + case 304: +#line 2044 "compilers/imcc/imcc.y" { IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); } break; - case 315: -#line 2065 "compilers/imcc/imcc.y" + case 305: +#line 2046 "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); @@ -4818,54 +4743,54 @@ int yynerrs; } break; - case 316: -#line 2072 "compilers/imcc/imcc.y" + case 306: +#line 2053 "compilers/imcc/imcc.y" { IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr); (yyval.sr) = (yyvsp[(2) - (3)].sr); } break; - case 318: -#line 2079 "compilers/imcc/imcc.y" + case 308: +#line 2060 "compilers/imcc/imcc.y" { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 319: -#line 2080 "compilers/imcc/imcc.y" + case 309: +#line 2061 "compilers/imcc/imcc.y" { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 320: -#line 2084 "compilers/imcc/imcc.y" + case 310: +#line 2065 "compilers/imcc/imcc.y" { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 321: -#line 2085 "compilers/imcc/imcc.y" + case 311: +#line 2066 "compilers/imcc/imcc.y" { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 322: -#line 2089 "compilers/imcc/imcc.y" + case 312: +#line 2070 "compilers/imcc/imcc.y" { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 323: -#line 2090 "compilers/imcc/imcc.y" + case 313: +#line 2071 "compilers/imcc/imcc.y" { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 328: -#line 2104 "compilers/imcc/imcc.y" + case 318: +#line 2085 "compilers/imcc/imcc.y" { IMCC_INFO(interp)->nkeys = 0; IMCC_INFO(interp)->in_slice = 0; } break; - case 329: -#line 2109 "compilers/imcc/imcc.y" + case 319: +#line 2090 "compilers/imcc/imcc.y" { (yyval.sr) = link_keys(interp, IMCC_INFO(interp)->nkeys, @@ -4873,16 +4798,16 @@ int yynerrs; } break; - case 330: -#line 2117 "compilers/imcc/imcc.y" + case 320: +#line 2098 "compilers/imcc/imcc.y" { IMCC_INFO(interp)->nkeys = 0; IMCC_INFO(interp)->in_slice = 0; } break; - case 331: -#line 2122 "compilers/imcc/imcc.y" + case 321: +#line 2103 "compilers/imcc/imcc.y" { (yyval.sr) = link_keys(interp, IMCC_INFO(interp)->nkeys, @@ -4890,21 +4815,21 @@ int yynerrs; } break; - case 332: -#line 2130 "compilers/imcc/imcc.y" + case 322: +#line 2111 "compilers/imcc/imcc.y" { IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); } break; - case 333: -#line 2132 "compilers/imcc/imcc.y" + case 323: +#line 2113 "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 334: -#line 2140 "compilers/imcc/imcc.y" + case 324: +#line 2121 "compilers/imcc/imcc.y" { if (IMCC_INFO(interp)->in_slice) (yyvsp[(1) - (1)].sr)->type |= VT_START_SLICE | VT_END_SLICE; @@ -4912,54 +4837,54 @@ int yynerrs; } break; - case 335: -#line 2148 "compilers/imcc/imcc.y" + case 325: +#line 2129 "compilers/imcc/imcc.y" { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); } break; - case 336: -#line 2149 "compilers/imcc/imcc.y" + case 326: +#line 2130 "compilers/imcc/imcc.y" { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); } break; - case 337: -#line 2150 "compilers/imcc/imcc.y" + case 327: +#line 2131 "compilers/imcc/imcc.y" { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); } break; - case 338: -#line 2151 "compilers/imcc/imcc.y" + case 328: +#line 2132 "compilers/imcc/imcc.y" { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); } break; - case 339: -#line 2152 "compilers/imcc/imcc.y" + case 329: +#line 2133 "compilers/imcc/imcc.y" { (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 340: -#line 2156 "compilers/imcc/imcc.y" + case 330: +#line 2137 "compilers/imcc/imcc.y" { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 341: -#line 2157 "compilers/imcc/imcc.y" + case 331: +#line 2138 "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 2158 "compilers/imcc/imcc.y" + case 332: +#line 2139 "compilers/imcc/imcc.y" { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); } break; - case 343: -#line 2159 "compilers/imcc/imcc.y" + case 333: +#line 2140 "compilers/imcc/imcc.y" { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); } break; /* Line 1267 of yacc.c. */ -#line 4952 "compilers/imcc/imcparser.c" +#line 4877 "compilers/imcc/imcparser.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -5173,7 +5098,7 @@ int yynerrs; } -#line 2165 "compilers/imcc/imcc.y" +#line 2146 "compilers/imcc/imcc.y" /* I need this prototype somewhere... */ diff --git a/compilers/pct/src/PCT/HLLCompiler.pir b/compilers/pct/src/PCT/HLLCompiler.pir index c87ace04bf..48bff53b9d 100644 --- a/compilers/pct/src/PCT/HLLCompiler.pir +++ b/compilers/pct/src/PCT/HLLCompiler.pir @@ -784,7 +784,7 @@ Generic method for compilers invoked from a shell command line. self.'interactive'(args :flat, adverbs :flat :named) goto save_output eval_line: - result = self.'eval'($S0, adverbs :flat :named) + result = self.'eval'($S0, '-e', args :flat, adverbs :flat :named) save_output: if null result goto end diff --git a/compilers/pirc/src/bcgen.c b/compilers/pirc/src/bcgen.c index 6a8c559fec..c802f33809 100644 --- a/compilers/pirc/src/bcgen.c +++ b/compilers/pirc/src/bcgen.c @@ -172,12 +172,32 @@ XXX what to do with "encoding"? */ int add_string_const(bytecode * const bc, char const * const str, char const * charset) { - int index = new_pbc_const(bc); - PackFile_Constant *constant = bc->interp->code->const_table->constants[index]; + STRING *parrotstr = string_make(bc->interp, str, strlen(str), charset, PObj_constant_FLAG); + int index = 0; + int count = bc->interp->code->const_table->const_count; + PackFile_Constant *constant; + + /* check whether the string is already stored; if so, return that index */ + while (index < count) { + constant = bc->interp->code->const_table->constants[index]; + if (constant->type == PFC_STRING) { + if (string_compare(bc->interp, constant->u.string, parrotstr) == 0) + return index; + } + index++; + } + + /* it wasn't stored yet, store it now, and return the index */ + index = new_pbc_const(bc); + constant = bc->interp->code->const_table->constants[index]; constant->type = PFC_STRING; - constant->u.string = string_make(bc->interp, str, strlen(str), charset, PObj_constant_FLAG); + constant->u.string = parrotstr; + /* + fprintf(stderr, "add_string_const (%s) at index: %d\n", str, index); + */ return index; + } @@ -210,7 +230,8 @@ add_num_const(bytecode * const bc, double f) { =item C -Add a key constant to the constants list. +Add a key constant to the constants list. The index where C is +stored in the constants table is returned. =cut @@ -311,23 +332,23 @@ PMC in the bytecode's constant table. bytecode * new_bytecode(Interp *interp, char const * const filename) { PMC *self; - bytecode *bc = (bytecode *)mem_sys_allocate(sizeof (bytecode)); + bytecode *bc = (bytecode *)mem_sys_allocate(sizeof (bytecode)); /* Create a new packfile and load it into the parrot interpreter */ - bc->packfile = PackFile_new(interp, 0); + bc->packfile = PackFile_new(interp, 0); Parrot_loadbc(interp, bc->packfile); /* store a pointer to the parrot interpreter, which saves passing around * the interp as an extra argument. */ - bc->interp = interp; + bc->interp = interp; /* create segments */ PARROT_ASSERT(filename != NULL); - interp->code = PF_create_default_segs(interp, filename, 1); + interp->code = PF_create_default_segs(interp, filename, 1); /* add interpreter globals to bytecode. XXX Why is this? */ - self = VTABLE_get_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_INTERPRETER); + self = VTABLE_get_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_INTERPRETER); add_pmc_const(bc, self); return bc; @@ -338,7 +359,9 @@ new_bytecode(Interp *interp, char const * const filename) { =item C -Create a code segment of size C. +Create a code segment of size C. C's C attribute +is initialized; this is the pointer used to write opcodes and operands +into the code segment. =cut @@ -457,7 +480,9 @@ PARROT_IGNORABLE_RESULT opcode_t emit_opcode(bytecode * const bc, opcode_t op) { *bc->opcursor = op; - fprintf(stderr, "[%d]", op); +/* + fprintf(stderr, "\n[%d]", op); +*/ return (bc->opcursor++ - bc->interp->code->base.data); } @@ -477,7 +502,9 @@ PARROT_IGNORABLE_RESULT opcode_t emit_int_arg(bytecode * const bc, int intval) { *bc->opcursor = intval; +/* fprintf(stderr, "{%d}", intval); +*/ return (bc->opcursor++ - bc->interp->code->base.data); } @@ -592,10 +619,11 @@ generate_multi_signature(bytecode * const bc, multi_type * const types, unsigned VTABLE_set_string_native(bc->interp, sig_pmc, typestring); break; } - case MULTI_TYPE_KEYED: + case MULTI_TYPE_KEYED: { /* XXX implement this */ break; + } default: fprintf(stderr, "invalid multi entry type"); break; /* XXX fatal; throw excpetion? */ @@ -719,27 +747,21 @@ is passed in C. */ static PMC * get_namespace_pmc(bytecode * const bc, multi_type * const ns) { - PMC *namespace_pmc; - if (ns == NULL) return NULL; switch (ns->entry_type) { - case MULTI_TYPE_IDENT: - namespace_pmc = constant_pmc_new(bc->interp, enum_class_String); + case MULTI_TYPE_IDENT: { + PMC *namespace_pmc = constant_pmc_new(bc->interp, enum_class_String); PMC_str_val(namespace_pmc) = add_string_const_from_cstring(bc, ns->entry.ident); break; + } case MULTI_TYPE_KEYED: - namespace_pmc = NULL; - /* XXX implement this */ - - break; default: - fprintf(stderr, "unknown key type"); /* XXX exception? */ - namespace_pmc = NULL; + fprintf(stderr, "keys are not supported for namespaces"); /* XXX exception? */ break; } - return namespace_pmc; + return NULL; } diff --git a/compilers/pirc/src/main.c b/compilers/pirc/src/main.c index 907258341f..e9161f909e 100755 --- a/compilers/pirc/src/main.c +++ b/compilers/pirc/src/main.c @@ -81,6 +81,7 @@ print_help(char const * const program_name) " -S do not perform strength reduction\n" " -v verbose mode\n" " -W show warning messages\n" + " -x execute code after compilation\n" #ifdef YYDEBUG " -y debug bison-generated parser\n" #endif @@ -136,6 +137,17 @@ process_file(void *a) { +static void +runcode(PARROT_INTERP, int argc, char *argv[]) { + + /* runs :init functions */ + PackFile_fixup_subs(interp, PBC_MAIN, NULL); + + /* RT#46149 no return value :-( */ + Parrot_runcode(interp, argc, argv); +} + + /* @@ -152,6 +164,7 @@ main(int argc, char *argv[]) { char const * const program_name = argv[0]; int flexdebug = 0; int flags = 0; + int execute = 0; char *filename = NULL; char *outputfile = NULL; char *hdocoutfile = NULL; @@ -231,6 +244,9 @@ main(int argc, char *argv[]) { case 'W': SET_FLAG(flags, LEXER_FLAG_WARNINGS); break; + case 'x': + execute = 1; + break; /* Only allow for debug flag if the generated parser supports it */ #ifdef YYDEBUG case 'y': @@ -327,7 +343,13 @@ main(int argc, char *argv[]) { } parse_file(interp, flexdebug, file, filename, flags, 0, macrosize, outputfile); +/* fprintf(stderr, "done\n"); +*/ + + if (execute) + runcode(interp, argc, argv); + } #endif diff --git a/compilers/pirc/src/pir.l b/compilers/pirc/src/pir.l index dd02772b1b..2020a52452 100644 --- a/compilers/pirc/src/pir.l +++ b/compilers/pirc/src/pir.l @@ -68,6 +68,8 @@ are processed by a different preprocessor; see F. #include "pirmacro.h" #include "pirerr.h" +#include "parrot/parrot.h" + /* define the type of the extra field in the yyscan_t object that is passed around; * this is the lexer_state structure, defined in "pircompiler.h" */ @@ -379,18 +381,35 @@ REGISTER "$"[SNIP]{DIGITS} ":named" { return TK_FLAG_NAMED; } ":flat" { return TK_FLAG_FLAT; } ":invocant" { return TK_FLAG_INVOCANT; } +":lookahead" { return TK_FLAG_LOOKAHEAD; } ":"{IDENT} { yypirerror(yyscanner, yyget_extra(yyscanner), "unrecognized flag: '%s'", yytext); } +{DQ_STRING} { /* XXX this is a bit hacky. First the string is unescaped, but that + * returns a STRING * object; that's not what we want at this point. + * So, convert it back to a C string, and return that. Later, that + * string is converted into a STRING again, so this must be fixed. + * Preferably there would be an unescape function returning a C-string. + */ + lexer_state * const lexer = yyget_extra(yyscanner); + + STRING *pstr = string_unescape_cstring(lexer->interp, + yytext + 1, '"', "ascii"); + + char *str = string_to_cstring(lexer->interp, pstr); + + yylval->sval = str; + return TK_STRINGC; + } -{Q_STRING} { /* copy the string, remove the quotes. */ +{SQ_STRING} { /* copy the string, remove the quotes. */ yylval->sval = dupstrn(yyget_extra(yyscanner), yytext + 1, yyleng - 2); return TK_STRINGC; } -{CHARSET}{DQ_STRING} { +{CHARSET}{DQ_STRING} { /* XXX these double-quoted strings are not unescaped (yet) */ /* parse yytext, which contains the charset, a ':', and the quoted string */ char *colon = strchr(yytext, ':'); lexer_state *lexer = yyget_extra(yyscanner); @@ -419,7 +438,7 @@ REGISTER "$"[SNIP]{DIGITS} return TK_USTRINGC; } -{ENCODING}{CHARSET}{DQ_STRING} { +{ENCODING}{CHARSET}{DQ_STRING} { /* XXX these double-quoted strings are not unescaped (yet) */ /* parse yytext, which contains the encoding, a ':', a charset, * a ':', and the quoted string */ diff --git a/compilers/pirc/src/pir.y b/compilers/pirc/src/pir.y index b051af7d4a..74b77e435c 100644 --- a/compilers/pirc/src/pir.y +++ b/compilers/pirc/src/pir.y @@ -364,6 +364,7 @@ static char const * const pir_type_names[] = { "int", "string", "pmc", "num" }; TK_FLAG_OPTIONAL ":optional" TK_FLAG_OPT_FLAG ":opt_flag" TK_FLAG_INVOCANT ":invocant" + TK_FLAG_LOOKAHEAD ":lookahead" /* tokens and types for macro layer */ @@ -465,7 +466,8 @@ static char const * const pir_type_names[] = { "int", "string", "pmc", "num" }; target_flag param_flags param_flag - invocant_param + invocant_flag + lookahead_flag arg_flags arg_flag if_unless @@ -827,11 +829,19 @@ param_flags : /* empty */ ; param_flag : target_flag - | invocant_param + | invocant_flag + | lookahead_flag | unique_reg_flag ; -invocant_param : ":invocant" '(' multi_type ')' +lookahead_flag : ":lookahead" paren_string + { + $$ = TARGET_FLAG_LOOKAHEAD; + set_param_alias(lexer, $2); + } + ; + +invocant_flag : ":invocant" '(' multi_type ')' { $$ = TARGET_FLAG_INVOCANT; /* XXX handle multi_type */ diff --git a/compilers/pirc/src/pircapi.c b/compilers/pirc/src/pircapi.c index 1b2a60ab7e..d5cfd4c39d 100644 --- a/compilers/pirc/src/pircapi.c +++ b/compilers/pirc/src/pircapi.c @@ -16,6 +16,8 @@ =head1 DESCRIPTION +This file implements the API for PIRC. A program that wants to use +PIRC's services should use only these functions. =head1 FUNCTIONS @@ -136,8 +138,10 @@ parse_file(PARROT_INTERP, int flexdebug, FILE *infile, char * const filename, in /* XXX just want to make sure pirc doesn't segfault when doing bytecode stuff. */ +/* if (TEST_FLAG(lexer->flags, LEXER_FLAG_OUTPUTPBC)) fprintf(stderr, "pirc ok\n"); +*/ /* clean up after playing */ release_resources(lexer); @@ -214,8 +218,10 @@ parse_string(PARROT_INTERP, char *pirstring, int flags, int pasminput, unsigned emit_pbc(lexer); } - +/* fprintf(stderr, "ok\n"); +*/ + /* clean up after playing */ release_resources(lexer); diff --git a/compilers/pirc/src/pircompunit.c b/compilers/pirc/src/pircompunit.c index 1535898996..bb3a1c69fb 100755 --- a/compilers/pirc/src/pircompunit.c +++ b/compilers/pirc/src/pircompunit.c @@ -2134,6 +2134,9 @@ add_key(NOTNULL(lexer_state * const lexer), NOTNULL(key * const keylist), key_entry *iter = keylist->head; /* goto end of list */ + /* XXX this could be optimized by having key_entries stored in + * a circular linked list. Fix later. + */ while (iter->next != NULL) iter = iter->next; diff --git a/compilers/pirc/src/pircompunit.h b/compilers/pirc/src/pircompunit.h index 4035b1a8e2..0f2cf4a301 100755 --- a/compilers/pirc/src/pircompunit.h +++ b/compilers/pirc/src/pircompunit.h @@ -50,6 +50,7 @@ typedef enum target_flags { TARGET_FLAG_UNIQUE_REG = 1 << 4, /* flag to tell register allocator to leave this poor target alone! */ TARGET_FLAG_INVOCANT = 1 << 5, /* XXX for MDD; to be implemented according to PDD27 */ + TARGET_FLAG_LOOKAHEAD = 1 << 6, /* for :lookahead */ /* abuse this enum for these pir compiler internal flags; by adding them here, they can * be encoded in the same flag member variable of the target struct, preventing the need diff --git a/compilers/pirc/src/piremit.c b/compilers/pirc/src/piremit.c index df89e00113..3db5821be5 100644 --- a/compilers/pirc/src/piremit.c +++ b/compilers/pirc/src/piremit.c @@ -134,7 +134,8 @@ print_target(lexer_state * const lexer, target * const t) { =item C -Print the value of constant C. +Print the value of constant C. Based on C's type, the appropriate +value is printed. =cut @@ -155,13 +156,12 @@ print_constant(lexer_state * const lexer, constant * const c) { fprintf(out, "\"%s\"", c->val.pval); break; case USTRING_VAL: - fprintf(out, "\"%s\"", c->val.ustr->contents); /* XXX also encoding? */ + fprintf(out, "%c:\"%s\"", c->val.ustr->charset, c->val.ustr->contents); break; default: panic(lexer, "Unknown type detected in print_constant()"); break; } - } /* @@ -169,7 +169,8 @@ print_constant(lexer_state * const lexer, constant * const c) { =item C -Print the expression C. +Print the expression C. This is a dispatch function, calling +a specialized function based on C's type. =cut @@ -203,7 +204,9 @@ print_expr(lexer_state * const lexer, expression * const expr) { print_expressions(expression * const expr)> Print the list of expressions pointed to by C, -if C is not NULL. Expressions are separated by commas. +if C is not NULL. If C is NULL, the +function does nothing and returns. Expressions are +separated by commas. =cut @@ -211,6 +214,7 @@ if C is not NULL. Expressions are separated by commas. void print_expressions(lexer_state * const lexer, expression * const expr) { expression *iter; + if (expr == NULL) return; @@ -230,6 +234,8 @@ print_expressions(lexer_state * const lexer, expression * const expr) { =item C +Print the instruction C. + =cut */ @@ -247,18 +253,13 @@ print_instruction(lexer_state * const lexer, instruction * const ins) { if (ins->opname) { if (TEST_FLAG(lexer->flags, LEXER_FLAG_EMIT_PASM)) { - fprintf(out, " %s ", ins->opinfo->name); print_expressions(lexer, ins->operands); } else { fprintf(out, "%04u %s ", ins->offset, ins->opname); - print_expressions(lexer, ins->operands); - fprintf(out, "\t# op %d", ins->opcode); - - } fprintf(out, "\n"); } @@ -329,15 +330,13 @@ print_subs(struct lexer_state * const lexer) { fprintf(out, "\n"); if (subiter->flags) { - - + int i; fprintf(out, ".pcc_sub "); - - if (TEST_FLAG(subiter->flags, PIRC_SUB_FLAG_MAIN)) - fprintf(out, ":main "); - if (TEST_FLAG(subiter->flags, PIRC_SUB_FLAG_METHOD)) - fprintf(out, ":method "); - /* XXX and so on; check which ones are available in PASM mode. */ + for (i = 0; i < BIT(i); i++) { + if (TEST_FLAG(subiter->flags, BIT(i))) { + fprintf(out, " :%s", subflag_names[i]); + } + } } @@ -354,7 +353,8 @@ print_subs(struct lexer_state * const lexer) { =item C -Print the PIR representation of C. +Print the PIR representation of C. If C has a label, that +is printed first. =cut @@ -377,6 +377,10 @@ emit_pir_instruction(lexer_state * const lexer, instruction * const instr) { =item C +Emit all statements of the subroutine C. The statements +are emitted in PIR format. If there are no statements in C, +this function returns. + =cut */ @@ -403,7 +407,8 @@ emit_pir_statement(lexer_state * const lexer, subroutine * const sub) { emit_pir_subs(lexer_state * const lexer)> Print the PIR representation of all subroutines stored -in the C. +in the C. If there are no subroutines, thre function +does nothing and returns. =cut @@ -425,13 +430,11 @@ emit_pir_subs(lexer_state * const lexer, char const * const outfile) { lexer->outfile = stdout; } - do { int i; fprintf(out, "\n.namespace "); print_key(lexer, subiter->name_space); - fprintf(out, "\n.sub %s", subiter->info.subname); for (i = 0; i < BIT(i); i++) { @@ -548,29 +551,27 @@ in the actual PackFile. See C. */ static int emit_pbc_key(lexer_state * const lexer, key * const k) { - key_entry *iter = k->head; - int keylength = 0; - + key_entry *iter; opcode_t *key; opcode_t keysize; /* total size of key in bytecode */ opcode_t *pc; /* cursor to write into key array */ expression *operand; int index; - fprintf(stderr, "emit pbc key\n"); - - /* create an array of opcode_t for storing the bytecode - * representation of the key. Initialize the cursor (pc) - * to write into this buffer. + /* create an array of opcode_t for storing the bytecode representation + * of the key. Initialize the cursor (pc) to write into this buffer. + * The size is 2 opcode_t's for each key plus 1 opcode_t for storing the size. */ - pc = key = (opcode_t *)pir_mem_allocate(lexer, k->keylength * sizeof (opcode_t) * 2); + pc = + key = (opcode_t *)pir_mem_allocate(lexer, (k->keylength * 2 + 1) * sizeof (opcode_t)); /* store key length in slot 0 */ *pc++ = k->keylength; + /* initialize iterator */ + iter = k->head; while (iter) { - switch (iter->expr->type) { case EXPR_CONSTANT: { constant *c = iter->expr->expr.c; @@ -583,6 +584,11 @@ emit_pbc_key(lexer_state * const lexer, key * const k) { *pc++ = PARROT_ARG_SC; *pc++ = add_string_const(lexer->bc, c->val.sval, "ascii"); break; + case USTRING_VAL: + *pc++ = PARROT_ARG_SC; + *pc++ = add_string_const(lexer->bc, c->val.ustr->contents, + c->val.ustr->charset); + break; default: panic(lexer, "wrong type of key"); break; @@ -618,28 +624,18 @@ emit_pbc_key(lexer_state * const lexer, key * const k) { } - /* count the number of keys*/ - ++keylength; iter = iter->next; } -/* - fprintf(stderr, "keylength is: %d, found keylength is: %d\n", k->keylength, keylength); - assert(keylength == k->keylength); -*/ - /* calculate size of key in bytecode; each field has 2 INTVALs: * flags/types and the register/constant index. */ keysize = pc - key; - fprintf(stderr, "key=["); - for (index = 0; index < keysize; index++) { - fprintf(stderr, "%d|", key[index]); - } + /* store the key, and emit the index at which it's stored into the code segment */ index = store_key_bytecode(lexer->bc, key); + emit_int_arg(lexer->bc, index); - fprintf(stderr, "store_key_bytecode index=%d\n", index); return index; } @@ -653,7 +649,7 @@ emit_pbc_target_arg(lexer_state * const lexer, target * const t)> Emit the assigned register of target C. The assigned register is stored in the C field, of either the C or C structure, depending on whether C is a register or a symbol, -respectively. +respectively. If C has a key, the key is emitted as well. =cut @@ -662,14 +658,9 @@ static void emit_pbc_target_arg(lexer_state * const lexer, target * const t) { emit_int_arg(lexer->bc, t->info->color); + /* if t has a key, emit that as well */ if (t->key) { - - /* XXX should do emit_pbc_key... always? */ - /*emit_pbc_key(lexer, t->key); - */ - /* this works for integers: */ - emit_pbc_expr(lexer, t->key->head->expr); - + emit_pbc_key(lexer, t->key); } } @@ -693,19 +684,13 @@ emit_pbc_expr(lexer_state * const lexer, expression * const operand) { break; case EXPR_TARGET: emit_pbc_target_arg(lexer, operand->expr.t); - - if (operand->expr.t->key) - emit_pbc_key(lexer, operand->expr.t->key); - break; case EXPR_LABEL: emit_pbc_label_arg(lexer, operand->expr.l); break; - case EXPR_KEY: emit_pbc_key(lexer, operand->expr.k); break; - default: break; } @@ -798,7 +783,8 @@ optimize_instr(lexer_state * const lexer, instruction * const instr) { =item C -Emit PBC for one instruction. +Emit PBC for one instruction. If the C attribute of C +is NULL, the function does nothing and returns. =cut @@ -809,8 +795,6 @@ emit_pbc_instr(lexer_state * const lexer, instruction * const instr) { expression *operand; opcode_t offset; - /* emit the opcode */ - if (instr->opinfo == NULL) return; @@ -820,7 +804,7 @@ emit_pbc_instr(lexer_state * const lexer, instruction * const instr) { */ optimize_instr(lexer, instr); - + /* emit the opcode */ offset = emit_opcode(lexer->bc, instr->opcode); /* the offset at which the instruction is written must be equal @@ -883,7 +867,7 @@ emit_pbc_sub(lexer_state * const lexer, subroutine * const sub) { } while (iter != sub->statements->next); - + /* run :immediate subs */ if (TEST_FLAG(sub->flags, PIRC_SUB_FLAG_IMMEDIATE)) { PackFile_fixup_subs(lexer->interp, PBC_IMMEDIATE, NULL); } @@ -895,7 +879,9 @@ emit_pbc_sub(lexer_state * const lexer, subroutine * const sub) { =item C -Emit all annotations into the PackFile. +Emit all annotations into the PackFile. First a new annotations +segment is created. Then, for each annotation, its value is stored +in the constants table. =cut @@ -1003,7 +989,9 @@ emit_pbc(lexer_state * const lexer) { write_pbc_file(lexer->bc, "a.pbc"); /* XXX fix output file specified by user */ /* XXX just make sure no seg. faults happened */ +/* fprintf(stderr, "done writing pbc\n"); +*/ } /* diff --git a/compilers/pirc/src/pirlexer.c b/compilers/pirc/src/pirlexer.c index aa36b336c8..a0436966ac 100644 --- a/compilers/pirc/src/pirlexer.c +++ b/compilers/pirc/src/pirlexer.c @@ -482,8 +482,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); yyg->yy_c_buf_p = yy_cp; /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ -#define YY_NUM_RULES 208 -#define YY_END_OF_BUFFER 209 +#define YY_NUM_RULES 210 +#define YY_END_OF_BUFFER 211 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -491,98 +491,99 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[821] = +static yyconst flex_int16_t yy_accept[829] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 209, 128, 2, 4, 2, 25, - 128, 128, 128, 22, 128, 128, 28, 29, 23, 21, - 30, 27, 128, 24, 121, 121, 128, 35, 15, 34, - 16, 119, 119, 31, 32, 119, 119, 119, 119, 119, - 119, 128, 26, 208, 135, 140, 135, 137, 138, 139, - 136, 174, 172, 174, 174, 166, 164, 165, 164, 166, - 160, 160, 160, 160, 160, 169, 208, 208, 208, 153, - 145, 152, 145, 153, 153, 153, 147, 148, 153, 146, - - 153, 149, 149, 143, 150, 151, 133, 132, 133, 133, - 133, 133, 133, 131, 131, 130, 128, 128, 119, 119, - 119, 119, 119, 119, 119, 119, 208, 208, 208, 208, - 149, 149, 1, 207, 205, 206, 205, 207, 207, 207, - 207, 175, 207, 200, 200, 207, 198, 198, 198, 198, - 198, 176, 177, 0, 4, 4, 12, 0, 110, 0, + 0, 0, 0, 0, 211, 130, 2, 4, 2, 25, + 130, 130, 130, 22, 130, 130, 28, 29, 23, 21, + 30, 27, 130, 24, 123, 123, 130, 35, 15, 34, + 16, 121, 121, 31, 32, 121, 121, 121, 121, 121, + 121, 130, 26, 210, 137, 142, 137, 139, 140, 141, + 138, 176, 174, 176, 176, 168, 166, 167, 166, 168, + 162, 162, 162, 162, 162, 171, 210, 210, 210, 155, + 147, 154, 147, 155, 155, 155, 149, 150, 155, 148, + + 155, 151, 151, 145, 152, 153, 135, 134, 135, 135, + 135, 135, 135, 133, 133, 132, 130, 130, 121, 121, + 121, 121, 121, 121, 121, 121, 210, 210, 210, 210, + 151, 151, 1, 209, 207, 208, 207, 209, 209, 209, + 209, 177, 209, 202, 202, 209, 200, 200, 200, 200, + 200, 178, 179, 0, 4, 4, 12, 0, 111, 0, 0, 3, 0, 0, 0, 0, 0, 40, 18, 43, - 0, 0, 39, 0, 121, 36, 37, 125, 120, 46, - 125, 125, 141, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 17, 38, - - 120, 0, 0, 0, 0, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 9, 13, 11, - 10, 14, 8, 0, 119, 117, 118, 119, 47, 119, - 119, 119, 119, 119, 42, 19, 45, 20, 140, 140, - 136, 172, 172, 0, 0, 0, 165, 165, 161, 160, - 160, 160, 160, 160, 169, 169, 0, 0, 168, 152, - 152, 0, 149, 0, 0, 0, 0, 149, 149, 142, - 149, 0, 0, 0, 0, 143, 0, 131, 0, 0, - 0, 0, 131, 131, 131, 0, 0, 0, 0, 130, - 0, 0, 0, 0, 0, 125, 119, 127, 118, 119, - - 47, 119, 119, 119, 119, 119, 206, 206, 0, 204, - 0, 0, 0, 0, 200, 199, 191, 191, 191, 191, - 191, 191, 199, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 198, 192, 196, 195, 194, 197, 126, 33, - 3, 116, 115, 113, 114, 41, 0, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 44, 120, 123, 0, 120, 124, 122, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 7, 6, 0, - - 0, 0, 119, 51, 119, 52, 53, 119, 119, 0, - 0, 0, 161, 156, 158, 157, 160, 144, 0, 142, - 149, 149, 0, 149, 149, 149, 131, 0, 131, 131, - 0, 131, 131, 131, 0, 163, 116, 115, 113, 114, - 162, 170, 119, 51, 119, 52, 53, 119, 119, 193, - 0, 191, 191, 191, 191, 191, 191, 191, 199, 202, - 0, 199, 203, 201, 0, 0, 0, 0, 0, 0, - 0, 120, 62, 141, 141, 141, 141, 58, 141, 141, - 141, 141, 65, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 82, 141, 141, 109, 109, 109, 109, - - 109, 109, 95, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 5, 0, 111, 0, - 0, 0, 48, 50, 119, 119, 0, 0, 0, 160, - 0, 149, 0, 131, 171, 162, 48, 50, 119, 119, - 0, 199, 191, 185, 191, 191, 191, 191, 0, 0, - 0, 0, 0, 0, 141, 141, 141, 76, 141, 141, - 87, 59, 141, 141, 141, 66, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 88, 107, 109, - 89, 109, 109, 90, 93, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 0, 119, 119, - - 173, 0, 0, 160, 119, 119, 190, 189, 191, 191, - 191, 181, 0, 180, 179, 178, 0, 141, 141, 141, - 57, 141, 141, 141, 141, 141, 141, 141, 68, 134, - 141, 141, 141, 72, 141, 141, 141, 141, 141, 83, - 109, 109, 109, 109, 98, 106, 109, 109, 109, 96, - 109, 109, 99, 109, 109, 0, 112, 0, 54, 49, - 154, 0, 159, 54, 49, 187, 191, 191, 0, 0, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 81, 141, 141, 141, 141, 109, - 109, 109, 94, 109, 109, 109, 109, 105, 109, 97, - - 0, 191, 191, 191, 0, 0, 63, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 67, 141, 141, - 141, 141, 141, 56, 141, 141, 141, 109, 109, 109, - 101, 109, 109, 109, 109, 0, 191, 191, 184, 0, - 0, 55, 141, 141, 141, 77, 141, 141, 141, 141, - 64, 141, 141, 141, 141, 141, 71, 141, 141, 86, - 109, 109, 108, 104, 103, 91, 109, 0, 0, 191, - 191, 0, 182, 141, 141, 141, 141, 79, 141, 141, - 141, 141, 141, 69, 70, 141, 85, 92, 109, 109, - 0, 0, 191, 186, 183, 73, 141, 141, 78, 80, - - 141, 141, 141, 141, 84, 100, 102, 0, 0, 191, - 141, 75, 60, 61, 129, 167, 155, 188, 74, 0 + 0, 112, 0, 39, 0, 123, 36, 37, 127, 122, + 46, 127, 127, 143, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 17, + + 38, 122, 0, 0, 0, 0, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 9, 13, + 11, 10, 14, 8, 0, 121, 119, 120, 121, 47, + 121, 121, 121, 121, 121, 42, 19, 45, 20, 142, + 142, 138, 174, 174, 0, 0, 0, 167, 167, 163, + 162, 162, 162, 162, 162, 171, 171, 0, 0, 170, + 154, 154, 0, 151, 0, 0, 0, 0, 151, 151, + 144, 151, 0, 0, 0, 0, 145, 0, 133, 0, + 0, 0, 0, 133, 133, 133, 0, 0, 0, 0, + 132, 0, 0, 0, 0, 0, 127, 121, 129, 120, + + 121, 47, 121, 121, 121, 121, 121, 208, 208, 0, + 206, 0, 0, 0, 0, 202, 201, 193, 193, 193, + 193, 193, 193, 201, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 200, 194, 198, 197, 196, 199, 128, + 33, 3, 118, 117, 115, 116, 41, 0, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 44, 122, 125, 0, 122, 126, 124, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 7, 6, + + 0, 0, 0, 121, 51, 121, 52, 53, 121, 121, + 0, 0, 0, 163, 158, 160, 159, 162, 146, 0, + 144, 151, 151, 0, 151, 151, 151, 133, 0, 133, + 133, 0, 133, 133, 133, 0, 165, 118, 117, 115, + 116, 164, 172, 121, 51, 121, 52, 53, 121, 121, + 195, 0, 193, 193, 193, 193, 193, 193, 193, 201, + 204, 0, 201, 205, 203, 0, 0, 0, 0, 0, + 0, 0, 122, 62, 143, 143, 143, 143, 58, 143, + 143, 143, 143, 65, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 82, 143, 143, 110, 110, 110, + + 110, 110, 110, 95, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 5, 0, + 113, 0, 0, 0, 48, 50, 121, 121, 0, 0, + 0, 162, 0, 151, 0, 133, 173, 164, 48, 50, + 121, 121, 0, 201, 193, 187, 193, 193, 193, 193, + 0, 0, 0, 0, 0, 0, 143, 143, 143, 76, + 143, 143, 87, 59, 143, 143, 143, 66, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 88, + 107, 110, 89, 110, 110, 90, 110, 93, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + + 0, 121, 121, 175, 0, 0, 162, 121, 121, 192, + 191, 193, 193, 193, 183, 0, 182, 181, 180, 0, + 143, 143, 143, 57, 143, 143, 143, 143, 143, 143, + 143, 68, 136, 143, 143, 143, 72, 143, 143, 143, + 143, 143, 83, 110, 110, 110, 110, 110, 98, 106, + 110, 110, 110, 96, 110, 110, 99, 110, 110, 0, + 114, 0, 54, 49, 156, 0, 161, 54, 49, 189, + 193, 193, 0, 0, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 81, 143, + 143, 143, 143, 110, 110, 110, 110, 94, 110, 110, + + 110, 110, 105, 110, 97, 0, 193, 193, 193, 0, + 0, 63, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 67, 143, 143, 143, 143, 143, 56, 143, + 143, 143, 110, 110, 110, 110, 101, 110, 110, 110, + 110, 0, 193, 193, 186, 0, 0, 55, 143, 143, + 143, 77, 143, 143, 143, 143, 64, 143, 143, 143, + 143, 143, 71, 143, 143, 86, 110, 110, 108, 110, + 104, 103, 91, 110, 0, 0, 193, 193, 0, 184, + 143, 143, 143, 143, 79, 143, 143, 143, 143, 143, + 69, 70, 143, 85, 92, 110, 109, 110, 0, 0, + + 193, 188, 185, 73, 143, 143, 78, 80, 143, 143, + 143, 143, 84, 100, 102, 0, 0, 193, 143, 75, + 60, 61, 131, 169, 157, 190, 74, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -598,9 +599,9 @@ static yyconst flex_int32_t yy_ec[256] = 34, 34, 41, 34, 34, 34, 42, 43, 34, 34, 44, 45, 46, 1, 47, 1, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 34, 34, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 34, 68, - 69, 34, 70, 71, 72, 73, 1, 1, 1, 1, + 52, 53, 54, 55, 56, 34, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 34, 69, + 70, 34, 71, 72, 73, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -617,7 +618,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[74] = +static yyconst flex_int32_t yy_meta[75] = { 0, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, @@ -625,485 +626,489 @@ static yyconst flex_int32_t yy_meta[74] = 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 9, 1, 1, 1, 9, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, - 1, 11, 1 + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 11, 1, 11, 1 } ; -static yyconst flex_int16_t yy_base[881] = +static yyconst flex_int16_t yy_base[889] = { 0, - 0, 0, 73, 0, 144, 145, 164, 0, 237, 0, - 310, 0, 383, 0, 0, 0, 456, 0, 523, 536, - 0, 0, 560, 0, 2380, 2381, 2360, 149, 530, 2350, - 627, 150, 120, 2349, 523, 2364, 2381, 2381, 522, 616, - 2381, 624, 666, 512, 717, 632, 738, 2381, 614, 621, - 629, 513, 645, 2381, 2381, 719, 728, 646, 730, 727, - 747, 608, 730, 2381, 2381, 657, 2372, 2381, 2381, 2381, - 0, 2381, 678, 2371, 634, 2381, 2381, 759, 2370, 0, - 0, 2313, 2305, 2312, 2304, 765, 2365, 0, 2342, 2381, - 2381, 771, 2363, 735, 771, 2353, 2381, 2381, 794, 2381, - - 798, 804, 811, 0, 2381, 2381, 2381, 2381, 744, 810, - 2352, 836, 817, 854, 846, 0, 844, 2354, 729, 886, - 836, 865, 887, 901, 895, 903, 756, 2350, 913, 878, - 0, 919, 2381, 2381, 2381, 886, 2358, 786, 908, 2348, - 942, 2381, 933, 976, 951, 920, 2334, 989, 999, 1008, - 1016, 2381, 2381, 672, 977, 999, 2381, 807, 2381, 0, - 154, 691, 779, 1024, 1028, 1032, 1036, 2381, 2381, 2381, - 2346, 2329, 2381, 1040, 1046, 2381, 2381, 2381, 1050, 2381, - 0, 2319, 0, 2296, 2302, 723, 2294, 2296, 772, 2292, - 933, 797, 760, 2302, 2297, 691, 2300, 2291, 2318, 2381, - - 1054, 689, 1068, 984, 0, 0, 2286, 2287, 871, 863, - 1033, 903, 884, 2283, 805, 2283, 2276, 2381, 2381, 2381, - 2381, 2381, 959, 2315, 856, 2332, 1086, 1017, 1009, 1070, - 1075, 1076, 1078, 1087, 2381, 2381, 2381, 2381, 1111, 1115, - 0, 1119, 1125, 2279, 2277, 2288, 1134, 1140, 0, 0, - 2270, 2276, 2283, 2269, 1144, 1148, 2306, 2305, 2381, 1152, - 1156, 951, 2381, 0, 1141, 2317, 1145, 1151, 1155, 0, - 1159, 995, 1173, 1164, 0, 0, 1145, 2381, 0, 1177, - 2316, 1191, 1197, 1201, 1205, 1183, 1219, 1187, 0, 0, - 2297, 1224, 1237, 1241, 1251, 0, 1214, 2301, 1261, 1262, - - 1270, 1271, 1272, 1281, 1280, 1289, 1310, 1315, 1186, 2381, - 0, 1300, 2313, 1311, 1318, 1326, 0, 2268, 1063, 2275, - 2274, 2271, 1331, 1229, 1344, 1247, 0, 2261, 1197, 2259, - 2270, 2257, 2291, 2381, 1350, 1363, 1368, 1373, 2381, 2381, - 1375, 1378, 1382, 1386, 1390, 2381, 1399, 0, 2278, 2255, - 2259, 2255, 2252, 2259, 2252, 2243, 2247, 2239, 2237, 2245, - 844, 2253, 2237, 2243, 2244, 2236, 2233, 2232, 2247, 2239, - 2242, 2381, 1403, 1255, 1407, 1411, 1335, 0, 0, 2233, - 2244, 2233, 1067, 2222, 2241, 2232, 2222, 2229, 2227, 2232, - 2218, 2217, 2217, 2214, 2230, 2222, 2229, 2381, 2248, 2268, - - 1259, 2249, 1419, 1291, 1420, 1320, 1351, 1422, 1421, 2222, - 2222, 2221, 0, 0, 0, 0, 2214, 1427, 1436, 0, - 1441, 1272, 1445, 1459, 1420, 0, 1463, 1473, 1477, 1304, - 1481, 1485, 1449, 0, 2239, 2243, 1490, 1494, 1504, 1509, - 0, 2381, 1517, 1518, 1519, 1520, 1528, 1534, 1536, 1546, - 1557, 0, 2210, 2198, 2206, 2214, 2205, 2212, 1561, 1360, - 1574, 1578, 1500, 0, 2201, 2202, 2203, 2210, 2201, 2192, - 1582, 1586, 2208, 2194, 2197, 2195, 2187, 1082, 2198, 2202, - 2199, 2187, 0, 2194, 2194, 2196, 2180, 2187, 2189, 2193, - 2191, 2172, 2190, 0, 2179, 2178, 2175, 2168, 2180, 2166, - - 2165, 2169, 0, 2177, 2168, 2171, 2160, 2172, 2164, 1504, - 2170, 2156, 2157, 2163, 2156, 2168, 2381, 1411, 2381, 0, - 2191, 2208, 1537, 1538, 1568, 1547, 2156, 2165, 2149, 2152, - 1593, 1597, 1601, 1607, 2381, 0, 1608, 1614, 1616, 1617, - 1627, 1631, 2158, 0, 2157, 2145, 2155, 2159, 2146, 2152, - 2138, 2151, 2142, 2135, 2141, 2133, 2138, 0, 2131, 1593, - 0, 0, 2132, 2146, 2143, 0, 2135, 2134, 2130, 2142, - 2124, 2137, 2128, 2122, 1597, 2134, 2132, 0, 0, 2131, - 0, 2133, 2130, 0, 0, 2119, 2122, 2126, 2111, 2122, - 2114, 2110, 2122, 2110, 2119, 2103, 2111, 1512, 1639, 1640, - - 2381, 2101, 2093, 2098, 1643, 1649, 0, 0, 2087, 2076, - 2063, 2381, 2071, 2381, 2381, 2381, 2068, 2069, 2064, 2064, - 0, 2052, 2037, 2017, 2016, 2010, 2016, 2007, 0, 2005, - 1991, 1975, 1987, 0, 1973, 1968, 1974, 1969, 1972, 0, - 1958, 1954, 1960, 1956, 0, 0, 1939, 1944, 1937, 0, - 1935, 1925, 0, 1941, 1936, 1567, 2381, 0, 1645, 1651, - 2381, 1934, 0, 1653, 1659, 1927, 1912, 1904, 1913, 1904, - 1902, 1887, 1622, 1873, 1851, 1858, 1845, 1848, 1828, 1823, - 1630, 1823, 1812, 1792, 0, 1790, 1778, 1786, 1780, 1778, - 1765, 1751, 0, 1732, 1752, 1744, 1733, 0, 1739, 0, - - 1713, 1698, 1664, 1662, 1662, 1651, 0, 1656, 1659, 1654, - 1649, 1646, 1636, 1644, 1634, 1639, 1633, 0, 1636, 730, - 1638, 1644, 1635, 0, 1624, 1631, 1629, 1617, 1607, 1575, - 0, 1583, 1579, 1531, 1528, 879, 1529, 1537, 0, 1506, - 1480, 0, 1483, 1427, 1438, 0, 1425, 1425, 1418, 1402, - 0, 1394, 1370, 1366, 1306, 1309, 0, 1281, 1277, 0, - 1256, 1243, 0, 0, 0, 0, 1226, 1203, 1186, 1174, - 1165, 1154, 2381, 1145, 1105, 1103, 1097, 0, 1083, 1074, - 1061, 1045, 1032, 0, 0, 1007, 0, 0, 990, 972, - 966, 935, 905, 0, 2381, 0, 884, 791, 0, 736, - - 710, 620, 625, 604, 0, 0, 0, 499, 496, 471, - 103, 0, 0, 0, 0, 2381, 2381, 0, 0, 2381, - 1713, 1724, 1735, 1746, 1757, 1768, 1772, 1779, 1785, 1788, - 1794, 1797, 1803, 1813, 1824, 1831, 1837, 1847, 1858, 1865, - 1868, 1875, 1885, 1896, 1903, 1909, 1919, 1928, 1939, 1950, - 1957, 1963, 1967, 1974, 1981, 1989, 1995, 2001, 2007, 2013, - 2019, 2025, 2029, 2039, 2050, 2057, 2061, 2067, 2070, 2077, - 2087, 2098, 2105, 2111, 2115, 2125, 2133, 2140, 2146, 2156 + 0, 0, 74, 0, 146, 147, 166, 0, 240, 0, + 314, 0, 388, 0, 0, 0, 462, 0, 530, 543, + 0, 0, 567, 0, 2396, 2397, 2376, 151, 537, 2366, + 635, 152, 122, 2365, 530, 2380, 2397, 2397, 529, 624, + 2397, 632, 674, 519, 726, 640, 723, 2397, 622, 629, + 637, 520, 653, 2397, 2397, 728, 739, 736, 737, 654, + 738, 616, 723, 2397, 2397, 665, 2388, 2397, 2397, 2397, + 0, 2397, 682, 2387, 641, 2397, 2397, 765, 2386, 0, + 0, 2328, 2320, 2327, 2319, 799, 2381, 0, 2358, 2397, + 2397, 803, 2379, 765, 771, 2369, 2397, 2397, 794, 2397, + + 798, 804, 811, 0, 2397, 2397, 2397, 2397, 779, 810, + 2368, 836, 817, 855, 847, 0, 845, 2370, 664, 887, + 866, 872, 888, 901, 903, 904, 786, 2366, 916, 920, + 0, 926, 2397, 2397, 2397, 859, 2374, 807, 916, 2364, + 944, 2397, 949, 993, 958, 927, 2350, 971, 976, 997, + 1006, 2397, 2397, 699, 890, 898, 2397, 822, 2397, 0, + 156, 1001, 948, 1016, 1025, 1029, 1034, 2397, 2397, 2397, + 2362, 2397, 2345, 2397, 1042, 1048, 2397, 2397, 2397, 1052, + 2397, 0, 2335, 0, 2311, 2318, 712, 2309, 2312, 722, + 2307, 793, 910, 926, 2318, 2313, 863, 2316, 2307, 2334, + + 2397, 1056, 669, 1070, 1012, 0, 0, 2301, 2302, 659, + 862, 1035, 495, 1028, 2298, 946, 2298, 2291, 2397, 2397, + 2397, 2397, 2397, 959, 2331, 857, 2348, 1088, 1078, 1043, + 1080, 1089, 1099, 1097, 1098, 2397, 2397, 2397, 2397, 1116, + 1123, 0, 1127, 1131, 2294, 2292, 2304, 1135, 1140, 0, + 0, 2285, 2291, 2299, 2284, 1148, 1152, 2322, 2321, 2397, + 1157, 1161, 939, 2397, 0, 1146, 2333, 1150, 1156, 1160, + 0, 1164, 1002, 1178, 1169, 0, 0, 1037, 2397, 0, + 1182, 2332, 1196, 1202, 1206, 1210, 1038, 1224, 1188, 0, + 0, 2313, 1229, 1242, 1246, 1256, 0, 1219, 2317, 1266, + + 1267, 1275, 1276, 1277, 1290, 1286, 1294, 1320, 1324, 1090, + 2397, 0, 1322, 2329, 1332, 1338, 1342, 0, 2284, 1075, + 2291, 2290, 2287, 1346, 1192, 1360, 1234, 0, 2276, 1201, + 2274, 2286, 2272, 2307, 2397, 1364, 1378, 1383, 1388, 2397, + 2397, 1269, 1393, 1397, 1401, 1405, 2397, 1414, 0, 2294, + 2270, 2275, 2270, 2267, 2275, 2267, 2258, 2262, 2254, 2252, + 2260, 993, 2269, 2252, 2258, 2260, 2251, 2248, 2247, 2263, + 2255, 2258, 2397, 1418, 1260, 1422, 1426, 1309, 0, 0, + 2248, 2260, 2248, 1253, 2237, 1091, 2249, 2238, 2245, 2243, + 2249, 2234, 2233, 2233, 2230, 2247, 2239, 2246, 2397, 2265, + + 2285, 1113, 2266, 1316, 1197, 1333, 1285, 1355, 1434, 1435, + 2239, 2239, 2238, 0, 0, 0, 0, 2231, 1433, 1445, + 0, 1450, 1277, 1454, 1458, 1316, 0, 1470, 1482, 1486, + 1292, 1490, 1494, 1326, 0, 2256, 2260, 1499, 1503, 1513, + 1518, 0, 2397, 1471, 1526, 1527, 1528, 1529, 1537, 1543, + 1542, 1553, 0, 2226, 2214, 2222, 2231, 2221, 2229, 1557, + 1371, 1565, 1575, 1374, 0, 2217, 2218, 2220, 2227, 2218, + 2208, 1579, 1583, 2225, 2210, 2214, 2211, 2203, 1148, 2215, + 2219, 2216, 2203, 0, 2211, 2211, 2213, 2196, 2204, 2206, + 2210, 2208, 2188, 2207, 0, 2195, 2194, 2191, 2184, 2197, + + 2182, 2181, 2185, 0, 2194, 2187, 2183, 2187, 2175, 2188, + 2179, 1439, 2186, 2171, 2172, 2179, 2171, 2184, 2397, 1191, + 2397, 0, 2207, 2224, 1440, 1566, 1590, 1592, 2171, 2181, + 2164, 2167, 1590, 1597, 1601, 1605, 2397, 0, 1612, 1613, + 1614, 1615, 1625, 1630, 2174, 0, 2173, 2160, 2171, 2175, + 2161, 2168, 2153, 2167, 2157, 2150, 2156, 2148, 2153, 0, + 2146, 1591, 0, 0, 2147, 2162, 2159, 0, 2150, 2149, + 2145, 2158, 2139, 2153, 2143, 2137, 1608, 2150, 2148, 0, + 0, 2147, 0, 2149, 2146, 0, 2147, 0, 2133, 2137, + 2141, 2125, 2137, 2128, 2124, 2137, 2124, 2134, 2117, 2125, + + 1628, 1640, 1641, 2397, 2124, 2120, 2126, 1645, 1646, 0, + 0, 2118, 2113, 2112, 2397, 2125, 2397, 2397, 2397, 2125, + 2126, 2125, 2125, 0, 2123, 2118, 2113, 2116, 2109, 2118, + 2100, 0, 2104, 2100, 2083, 2090, 0, 2065, 2056, 2064, + 2059, 2062, 0, 2053, 2038, 2039, 2016, 2015, 0, 0, + 2001, 2004, 2001, 0, 1989, 1969, 0, 1982, 1981, 1653, + 2397, 0, 1644, 1659, 2397, 1983, 0, 1661, 1663, 1982, + 1962, 1956, 1962, 1951, 1949, 1940, 1632, 1947, 1934, 1947, + 1929, 1943, 1932, 1942, 1225, 1938, 1931, 1914, 0, 1917, + 1902, 1915, 1904, 1913, 1900, 1868, 1862, 0, 1838, 1859, + + 1848, 1826, 0, 1823, 0, 1811, 1808, 1799, 1793, 1793, + 1777, 0, 1783, 1776, 1761, 1752, 1741, 1731, 1732, 1722, + 1723, 1702, 0, 1685, 1436, 1652, 1659, 1650, 0, 1640, + 1647, 1646, 1637, 1649, 1634, 1649, 0, 1641, 1634, 1628, + 1625, 1522, 1626, 1635, 0, 1617, 1606, 0, 1609, 1570, + 1582, 0, 1552, 1543, 1534, 1522, 0, 1512, 1511, 1500, + 1491, 1479, 0, 1466, 1477, 0, 1447, 1427, 0, 1434, + 0, 0, 0, 1412, 1413, 1384, 1373, 1379, 1322, 2397, + 1314, 1261, 1259, 1181, 0, 1172, 1111, 1100, 1089, 1053, + 0, 0, 1039, 0, 0, 1031, 0, 936, 909, 888, + + 855, 0, 2397, 0, 825, 821, 0, 777, 734, 728, + 719, 708, 0, 0, 0, 694, 611, 497, 104, 0, + 0, 0, 0, 2397, 2397, 0, 0, 2397, 1711, 1722, + 1733, 1744, 1755, 1766, 1770, 1777, 1783, 1786, 1792, 1795, + 1801, 1811, 1822, 1829, 1835, 1845, 1856, 1863, 1866, 1873, + 1883, 1894, 1901, 1907, 1917, 1926, 1937, 1948, 1955, 1961, + 1965, 1972, 1979, 1987, 1993, 1999, 2005, 2011, 2017, 2023, + 2027, 2037, 2048, 2055, 2059, 2065, 2068, 2075, 2085, 2096, + 2103, 2109, 2113, 2123, 2131, 2138, 2144, 2154 } ; -static yyconst flex_int16_t yy_def[881] = +static yyconst flex_int16_t yy_def[889] = { 0, - 820, 1, 820, 3, 821, 821, 820, 7, 820, 9, - 820, 11, 820, 13, 1, 1, 820, 17, 822, 822, - 823, 823, 820, 23, 820, 820, 820, 820, 820, 820, - 824, 825, 820, 820, 820, 826, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 827, 820, 820, 820, - 820, 828, 828, 820, 820, 828, 828, 828, 828, 828, - 828, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 829, 820, 820, 820, 820, 820, 820, 820, 820, 830, - 831, 831, 831, 831, 831, 820, 820, 832, 833, 820, - 820, 820, 820, 834, 820, 835, 820, 820, 820, 820, - - 836, 820, 820, 837, 820, 820, 820, 820, 838, 820, - 839, 820, 820, 820, 820, 840, 841, 43, 842, 842, - 842, 842, 842, 842, 842, 842, 834, 835, 820, 820, - 102, 820, 820, 820, 820, 820, 820, 843, 820, 844, - 820, 820, 845, 820, 820, 820, 846, 846, 846, 846, - 846, 820, 820, 847, 820, 820, 820, 848, 820, 848, - 849, 820, 849, 820, 820, 820, 820, 820, 820, 820, - 850, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 820, 820, - - 820, 820, 820, 820, 852, 853, 853, 853, 853, 853, - 853, 853, 853, 853, 853, 853, 853, 820, 820, 820, - 820, 820, 820, 854, 855, 856, 855, 855, 855, 855, - 855, 855, 855, 855, 820, 820, 820, 820, 820, 820, - 857, 820, 820, 820, 820, 820, 820, 820, 858, 859, - 859, 859, 859, 859, 820, 820, 860, 860, 820, 820, - 820, 834, 820, 834, 820, 835, 820, 820, 820, 861, - 820, 820, 820, 820, 862, 863, 864, 820, 864, 820, - 865, 820, 820, 820, 820, 820, 820, 820, 866, 867, - 868, 868, 868, 868, 868, 869, 870, 820, 870, 870, - - 870, 870, 870, 870, 870, 870, 820, 820, 871, 820, - 871, 820, 872, 820, 820, 820, 873, 873, 873, 873, - 873, 873, 820, 820, 820, 820, 874, 820, 820, 820, - 820, 820, 875, 820, 875, 875, 875, 875, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 820, 820, 820, 820, 820, 820, 852, 853, 853, - 853, 853, 853, 853, 853, 853, 853, 853, 853, 853, - 853, 853, 853, 853, 853, 853, 853, 820, 820, 856, - - 876, 877, 878, 878, 878, 878, 878, 878, 878, 820, - 820, 820, 858, 859, 859, 859, 859, 820, 820, 861, - 820, 820, 820, 820, 820, 862, 820, 820, 820, 820, - 820, 820, 820, 866, 868, 820, 868, 868, 868, 868, - 879, 820, 870, 870, 870, 870, 870, 870, 870, 820, - 820, 873, 873, 873, 873, 873, 873, 873, 820, 820, - 820, 820, 820, 874, 820, 820, 820, 820, 820, 820, - 820, 820, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 853, 853, 853, 853, - - 853, 853, 853, 853, 853, 853, 853, 853, 853, 853, - 853, 853, 853, 853, 853, 853, 820, 876, 820, 876, - 877, 820, 878, 878, 878, 878, 820, 820, 820, 859, - 820, 820, 820, 820, 820, 879, 870, 870, 870, 870, - 820, 820, 873, 873, 873, 873, 873, 873, 820, 820, - 820, 820, 820, 820, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 853, 853, 853, - 853, 853, 853, 853, 853, 853, 853, 853, 853, 853, - 853, 853, 853, 853, 853, 853, 853, 880, 878, 878, - - 820, 820, 820, 859, 870, 870, 873, 873, 873, 873, - 873, 820, 820, 820, 820, 820, 820, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 853, 853, 853, 853, 853, 853, 853, 853, 853, 853, - 853, 853, 853, 853, 853, 880, 820, 880, 878, 878, - 820, 820, 859, 870, 870, 873, 873, 873, 820, 820, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 853, - 853, 853, 853, 853, 853, 853, 853, 853, 853, 853, - - 820, 873, 873, 873, 820, 820, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 853, 853, 853, - 853, 853, 853, 853, 853, 820, 873, 873, 873, 820, - 820, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 853, 853, 853, 853, 853, 853, 853, 820, 820, 873, - 873, 820, 820, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 853, 853, 853, - 820, 820, 873, 873, 820, 851, 851, 851, 851, 851, - - 851, 851, 851, 851, 851, 853, 853, 820, 820, 873, - 851, 851, 851, 851, 851, 820, 820, 873, 851, 0, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820 + 828, 1, 828, 3, 829, 829, 828, 7, 828, 9, + 828, 11, 828, 13, 1, 1, 828, 17, 830, 830, + 831, 831, 828, 23, 828, 828, 828, 828, 828, 828, + 832, 833, 828, 828, 828, 834, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 835, 828, 828, 828, + 828, 836, 836, 828, 828, 836, 836, 836, 836, 836, + 836, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 837, 828, 828, 828, 828, 828, 828, 828, 828, 838, + 839, 839, 839, 839, 839, 828, 828, 840, 841, 828, + 828, 828, 828, 842, 828, 843, 828, 828, 828, 828, + + 844, 828, 828, 845, 828, 828, 828, 828, 846, 828, + 847, 828, 828, 828, 828, 848, 849, 43, 850, 850, + 850, 850, 850, 850, 850, 850, 842, 843, 828, 828, + 102, 828, 828, 828, 828, 828, 828, 851, 828, 852, + 828, 828, 853, 828, 828, 828, 854, 854, 854, 854, + 854, 828, 828, 855, 828, 828, 828, 856, 828, 856, + 857, 828, 857, 828, 828, 828, 828, 828, 828, 828, + 858, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 828, + + 828, 828, 828, 828, 828, 860, 861, 861, 861, 861, + 861, 861, 861, 861, 861, 861, 861, 861, 828, 828, + 828, 828, 828, 828, 862, 863, 864, 863, 863, 863, + 863, 863, 863, 863, 863, 828, 828, 828, 828, 828, + 828, 865, 828, 828, 828, 828, 828, 828, 828, 866, + 867, 867, 867, 867, 867, 828, 828, 868, 868, 828, + 828, 828, 842, 828, 842, 828, 843, 828, 828, 828, + 869, 828, 828, 828, 828, 870, 871, 872, 828, 872, + 828, 873, 828, 828, 828, 828, 828, 828, 828, 874, + 875, 876, 876, 876, 876, 876, 877, 878, 828, 878, + + 878, 878, 878, 878, 878, 878, 878, 828, 828, 879, + 828, 879, 828, 880, 828, 828, 828, 881, 881, 881, + 881, 881, 881, 828, 828, 828, 828, 882, 828, 828, + 828, 828, 828, 883, 828, 883, 883, 883, 883, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 828, 828, 828, 828, 828, 828, 860, 861, + 861, 861, 861, 861, 861, 861, 861, 861, 861, 861, + 861, 861, 861, 861, 861, 861, 861, 861, 828, 828, + + 864, 884, 885, 886, 886, 886, 886, 886, 886, 886, + 828, 828, 828, 866, 867, 867, 867, 867, 828, 828, + 869, 828, 828, 828, 828, 828, 870, 828, 828, 828, + 828, 828, 828, 828, 874, 876, 828, 876, 876, 876, + 876, 887, 828, 878, 878, 878, 878, 878, 878, 878, + 828, 828, 881, 881, 881, 881, 881, 881, 881, 828, + 828, 828, 828, 828, 882, 828, 828, 828, 828, 828, + 828, 828, 828, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 861, 861, 861, + + 861, 861, 861, 861, 861, 861, 861, 861, 861, 861, + 861, 861, 861, 861, 861, 861, 861, 861, 828, 884, + 828, 884, 885, 828, 886, 886, 886, 886, 828, 828, + 828, 867, 828, 828, 828, 828, 828, 887, 878, 878, + 878, 878, 828, 828, 881, 881, 881, 881, 881, 881, + 828, 828, 828, 828, 828, 828, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 861, + 861, 861, 861, 861, 861, 861, 861, 861, 861, 861, + 861, 861, 861, 861, 861, 861, 861, 861, 861, 861, + + 888, 886, 886, 828, 828, 828, 867, 878, 878, 881, + 881, 881, 881, 881, 828, 828, 828, 828, 828, 828, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 861, 861, 861, 861, 861, 861, 861, + 861, 861, 861, 861, 861, 861, 861, 861, 861, 888, + 828, 888, 886, 886, 828, 828, 867, 878, 878, 881, + 881, 881, 828, 828, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 861, 861, 861, 861, 861, 861, 861, + + 861, 861, 861, 861, 861, 828, 881, 881, 881, 828, + 828, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 861, 861, 861, 861, 861, 861, 861, 861, + 861, 828, 881, 881, 881, 828, 828, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 861, 861, 861, 861, + 861, 861, 861, 861, 828, 828, 881, 881, 828, 828, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 861, 861, 861, 861, 828, 828, + + 881, 881, 828, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 861, 861, 828, 828, 881, 859, 859, + 859, 859, 859, 828, 828, 881, 859, 0, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828 } ; -static yyconst flex_int16_t yy_nxt[2455] = +static yyconst flex_int16_t yy_nxt[2472] = { 0, 26, 27, 28, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 46, 46, 47, 48, 49, 50, 51, 26, 52, 52, 52, 52, 52, 53, 52, 53, 52, 53, 53, 52, 52, 54, 26, 55, 52, 52, 52, 52, - 52, 52, 52, 56, 52, 57, 52, 52, 58, 52, - 59, 52, 52, 60, 52, 61, 52, 52, 52, 26, - 62, 26, 63, 64, 65, 66, 65, 67, 64, 64, - 64, 64, 64, 64, 64, 68, 69, 64, 64, 70, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - - 64, 64, 64, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 64, 64, 64, 71, + 52, 52, 52, 56, 52, 57, 52, 52, 52, 58, + 52, 59, 52, 52, 60, 52, 61, 52, 52, 52, + 26, 62, 26, 63, 64, 65, 66, 65, 67, 64, + 64, 64, 64, 64, 64, 64, 68, 69, 64, 64, + 70, 64, 64, 64, 64, 64, 64, 64, 64, 64, + + 64, 64, 64, 64, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 64, 64, 64, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 64, 64, 64, 64, 73, 73, 74, 74, - 155, 155, 162, 155, 163, 164, 162, 165, 163, 166, - 167, 819, 75, 75, 76, 77, 78, 77, 79, 76, - 76, 76, 80, 76, 76, 76, 76, 76, 76, 76, + 71, 71, 71, 71, 64, 64, 64, 64, 73, 73, + 74, 74, 155, 155, 162, 155, 163, 164, 162, 165, + 163, 166, 167, 827, 75, 75, 76, 77, 78, 77, + 79, 76, 76, 76, 80, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 81, 81, 81, 81, 81, 81, + 76, 76, 76, 76, 76, 76, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 76, 76, 76, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 82, - 81, 81, 83, 81, 84, 81, 81, 85, 81, 81, - 81, 81, 81, 76, 76, 76, 76, 64, 64, 86, - 64, 87, 64, 64, 64, 88, 64, 64, 64, 64, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 76, + 76, 76, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 82, 81, 81, 81, 83, 81, 84, 81, 81, + 85, 81, 81, 81, 81, 81, 76, 76, 76, 76, + 64, 64, 86, 64, 87, 64, 64, 64, 88, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 64, 64, 64, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 64, 64, 64, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 64, 64, 64, 64, - 90, 91, 92, 91, 93, 90, 94, 90, 95, 90, - 90, 96, 97, 98, 90, 99, 100, 99, 101, 90, - 102, 103, 103, 103, 90, 90, 90, 90, 90, 90, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 64, 64, 64, 64, 90, 91, 92, 91, 93, 90, + 94, 90, 95, 90, 90, 96, 97, 98, 90, 99, + 100, 99, 101, 90, 102, 103, 103, 103, 90, 90, + 90, 90, 90, 90, 104, 104, 104, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 90, 90, 90, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 104, 104, 90, 90, 90, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 104, 104, 104, 104, 104, 104, 104, 104, 105, - 90, 106, 90, 107, 108, 64, 108, 108, 107, 109, - 107, 110, 107, 107, 111, 107, 107, 107, 112, 107, + 104, 104, 104, 104, 105, 90, 106, 90, 107, 108, + 64, 108, 108, 107, 109, 107, 110, 107, 107, 111, - 112, 113, 107, 114, 115, 115, 115, 107, 107, 107, - 107, 107, 107, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 116, 107, 107, 107, 116, + 107, 107, 107, 112, 107, 112, 113, 107, 114, 115, + 115, 115, 107, 107, 107, 107, 107, 107, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 107, 107, 107, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 107, 107, 107, 107, 26, 27, 28, 27, - 29, 30, 31, 32, 117, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 118, 44, 45, 46, 46, 46, - 47, 48, 49, 50, 51, 26, 119, 119, 119, 119, - 119, 120, 119, 120, 119, 120, 120, 119, 119, 54, - - 26, 55, 119, 119, 119, 119, 119, 119, 119, 121, - 119, 122, 119, 119, 123, 119, 124, 119, 119, 125, - 119, 126, 119, 119, 119, 26, 62, 26, 63, 127, - 224, 199, 156, 169, 128, 818, 172, 226, 129, 200, - 129, 130, 127, 131, 132, 132, 132, 128, 154, 173, - 170, 129, 817, 129, 130, 816, 131, 132, 132, 132, - 134, 135, 136, 135, 137, 134, 138, 134, 139, 134, - 134, 140, 134, 134, 134, 141, 142, 141, 143, 134, - 144, 145, 145, 145, 146, 134, 134, 134, 134, 134, - 147, 147, 147, 147, 147, 148, 147, 149, 147, 150, - - 151, 147, 147, 152, 134, 153, 147, 147, 147, 147, + 116, 116, 116, 116, 116, 116, 116, 116, 107, 107, + 107, 107, 26, 27, 28, 27, 29, 30, 31, 32, + 117, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 118, 44, 45, 46, 46, 46, 47, 48, 49, 50, + 51, 26, 119, 119, 119, 119, 119, 120, 119, 120, + + 119, 120, 120, 119, 119, 54, 26, 55, 119, 119, + 119, 119, 119, 119, 119, 121, 119, 122, 119, 119, + 119, 123, 119, 124, 119, 119, 125, 119, 126, 119, + 119, 119, 26, 62, 26, 63, 127, 225, 200, 156, + 169, 128, 390, 173, 227, 129, 201, 129, 130, 127, + 131, 132, 132, 132, 128, 154, 174, 170, 129, 391, + 129, 130, 826, 131, 132, 132, 132, 134, 135, 136, + 135, 137, 134, 138, 134, 139, 134, 134, 140, 134, + 134, 134, 141, 142, 141, 143, 134, 144, 145, 145, + 145, 146, 134, 134, 134, 134, 134, 147, 147, 147, + + 147, 147, 148, 147, 149, 147, 150, 151, 147, 147, + 152, 134, 153, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 134, - 134, 134, 134, 159, 174, 235, 175, 175, 175, 175, - 218, 219, 174, 176, 175, 175, 175, 175, 220, 221, - 201, 177, 175, 175, 175, 175, 222, 223, 239, 239, - 561, 239, 224, 224, 203, 227, 227, 227, 227, 226, - 226, 160, 178, 340, 178, 340, 340, 178, 236, 242, - 242, 561, 242, 203, 815, 244, 179, 179, 179, 179, - 245, 246, 341, 180, 341, 341, 181, 181, 181, 181, - - 182, 181, 181, 181, 181, 181, 181, 181, 181, 374, - 374, 231, 183, 184, 185, 186, 181, 187, 188, 189, - 181, 190, 191, 192, 193, 181, 194, 181, 195, 196, - 197, 181, 181, 181, 198, 201, 224, 175, 175, 175, - 175, 263, 368, 226, 224, 224, 224, 224, 202, 203, - 278, 226, 226, 226, 226, 204, 369, 237, 298, 205, - 247, 247, 263, 247, 224, 202, 255, 255, 203, 255, - 352, 226, 260, 260, 814, 260, 204, 753, 228, 264, - 229, 162, 353, 163, 205, 207, 230, 232, 279, 754, - 208, 233, 310, 209, 210, 211, 212, 213, 214, 813, - - 264, 215, 238, 216, 217, 234, 265, 364, 265, 365, - 265, 265, 267, 159, 268, 268, 268, 268, 269, 269, - 269, 269, 271, 356, 268, 268, 268, 268, 357, 271, - 311, 268, 268, 268, 268, 272, 273, 284, 284, 284, - 284, 812, 274, 273, 362, 280, 275, 280, 363, 280, - 280, 160, 272, 224, 282, 273, 283, 283, 283, 283, - 226, 394, 273, 274, 285, 298, 283, 283, 283, 283, - 395, 275, 285, 224, 283, 283, 283, 283, 287, 292, - 226, 293, 224, 294, 295, 286, 287, 307, 307, 226, - 307, 485, 288, 486, 298, 300, 289, 287, 269, 269, - - 269, 269, 286, 224, 224, 287, 299, 299, 299, 299, - 226, 226, 224, 288, 384, 298, 298, 301, 224, 226, - 224, 289, 385, 302, 298, 226, 768, 226, 382, 383, - 298, 267, 298, 268, 268, 268, 268, 271, 769, 268, - 268, 268, 268, 312, 391, 312, 811, 312, 312, 392, - 389, 273, 303, 316, 316, 316, 316, 263, 304, 305, - 314, 306, 315, 315, 315, 315, 390, 328, 810, 323, - 273, 315, 315, 315, 315, 329, 330, 331, 155, 155, - 332, 155, 809, 325, 359, 318, 398, 399, 360, 319, - 320, 321, 361, 322, 323, 264, 315, 315, 315, 315, - - 155, 155, 325, 155, 377, 377, 377, 324, 325, 335, - 335, 335, 335, 334, 326, 422, 422, 808, 327, 336, - 336, 336, 336, 334, 324, 807, 224, 325, 337, 337, - 337, 337, 334, 226, 224, 326, 338, 338, 338, 338, - 334, 226, 806, 327, 342, 342, 342, 342, 343, 343, - 343, 343, 344, 344, 344, 344, 345, 345, 345, 345, - 179, 179, 179, 179, 201, 805, 175, 175, 175, 175, - 179, 179, 179, 179, 373, 373, 373, 373, 203, 804, - 386, 403, 347, 375, 387, 375, 347, 224, 376, 376, - 376, 376, 224, 224, 226, 224, 803, 203, 388, 226, - - 226, 347, 226, 224, 224, 347, 227, 227, 227, 227, - 226, 226, 239, 239, 454, 239, 239, 239, 455, 239, - 242, 242, 500, 242, 802, 407, 242, 242, 560, 242, - 501, 405, 406, 502, 404, 247, 247, 801, 247, 561, - 408, 247, 247, 409, 247, 255, 255, 800, 255, 255, - 255, 278, 255, 260, 260, 799, 260, 260, 260, 798, - 260, 418, 418, 418, 418, 269, 269, 269, 269, 271, - 797, 268, 268, 268, 268, 269, 269, 269, 269, 421, - 421, 421, 421, 273, 425, 425, 425, 419, 423, 279, - 423, 419, 310, 424, 424, 424, 424, 427, 427, 427, - - 427, 796, 273, 430, 430, 795, 419, 433, 433, 433, - 419, 284, 284, 284, 284, 285, 794, 283, 283, 283, - 283, 284, 284, 284, 284, 429, 429, 429, 429, 287, - 311, 224, 793, 428, 431, 792, 431, 428, 226, 432, - 432, 432, 432, 298, 437, 437, 437, 437, 287, 460, - 460, 791, 428, 436, 466, 467, 428, 438, 438, 438, - 438, 439, 439, 439, 439, 519, 436, 463, 463, 463, - 436, 440, 440, 440, 440, 374, 374, 790, 224, 224, - 436, 299, 299, 299, 299, 226, 226, 224, 224, 224, - 298, 298, 422, 422, 226, 226, 226, 224, 224, 298, - - 298, 298, 789, 520, 226, 226, 224, 788, 224, 298, - 298, 307, 307, 226, 307, 226, 307, 307, 298, 307, - 450, 450, 450, 450, 430, 430, 443, 787, 445, 446, - 447, 316, 316, 316, 316, 444, 323, 224, 315, 315, - 315, 315, 448, 786, 226, 449, 316, 316, 316, 316, - 325, 459, 459, 459, 459, 377, 377, 377, 451, 461, - 785, 461, 784, 451, 462, 462, 462, 462, 224, 325, - 335, 335, 335, 335, 334, 226, 341, 451, 341, 341, - 460, 460, 451, 336, 336, 336, 336, 334, 337, 337, - 337, 337, 334, 338, 338, 338, 338, 334, 342, 342, - - 342, 342, 343, 343, 343, 343, 344, 344, 344, 344, - 345, 345, 345, 345, 471, 783, 471, 519, 782, 472, - 472, 472, 472, 373, 373, 373, 373, 376, 376, 376, - 376, 376, 376, 376, 376, 347, 224, 224, 224, 224, - 425, 425, 425, 226, 226, 226, 226, 418, 418, 418, - 418, 531, 781, 531, 347, 520, 532, 532, 532, 532, - 780, 421, 421, 421, 421, 424, 424, 424, 424, 433, - 433, 433, 526, 419, 779, 778, 524, 525, 523, 424, - 424, 424, 424, 427, 427, 427, 427, 777, 533, 776, - 533, 775, 419, 534, 534, 534, 534, 429, 429, 429, - - 429, 432, 432, 432, 432, 432, 432, 432, 432, 428, - 437, 437, 437, 437, 438, 438, 438, 438, 657, 436, - 463, 463, 463, 436, 439, 439, 439, 439, 428, 440, - 440, 440, 440, 436, 224, 224, 224, 224, 436, 774, - 773, 226, 226, 226, 226, 224, 298, 298, 298, 298, - 590, 224, 226, 224, 224, 224, 658, 298, 226, 591, - 226, 226, 226, 298, 224, 298, 450, 450, 450, 450, - 772, 226, 541, 657, 541, 538, 537, 542, 542, 542, - 542, 459, 459, 459, 459, 224, 771, 540, 770, 539, - 767, 766, 226, 451, 462, 462, 462, 462, 462, 462, - - 462, 462, 472, 472, 472, 472, 472, 472, 472, 472, - 600, 658, 451, 532, 532, 532, 532, 532, 532, 532, - 532, 534, 534, 534, 534, 224, 599, 534, 534, 534, - 534, 224, 226, 224, 224, 765, 764, 298, 226, 763, - 226, 226, 622, 298, 636, 298, 298, 542, 542, 542, - 542, 542, 542, 542, 542, 623, 224, 224, 762, 637, - 224, 624, 224, 226, 226, 638, 224, 226, 224, 226, - 224, 709, 298, 226, 605, 226, 224, 226, 298, 719, - 606, 761, 298, 226, 710, 760, 720, 759, 298, 758, - 711, 757, 659, 756, 755, 752, 664, 751, 750, 749, - - 748, 747, 746, 660, 745, 744, 743, 742, 741, 740, - 739, 738, 665, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 133, 133, 133, 133, 133, - 133, 133, 133, 133, 133, 133, 158, 737, 158, 158, + 147, 147, 147, 147, 147, 147, 147, 134, 134, 134, + 134, 159, 175, 236, 176, 176, 176, 176, 219, 220, + 175, 177, 176, 176, 176, 176, 221, 222, 202, 178, + 176, 176, 176, 176, 223, 224, 240, 240, 825, 240, + 225, 225, 204, 228, 228, 228, 228, 227, 227, 160, + 179, 225, 179, 243, 243, 179, 243, 237, 227, 375, + 375, 204, 245, 299, 180, 180, 180, 180, 246, 247, + + 341, 181, 341, 341, 182, 182, 182, 182, 183, 182, + 182, 182, 182, 182, 182, 182, 182, 383, 384, 234, + 184, 185, 186, 187, 182, 188, 189, 190, 182, 191, + 182, 192, 193, 194, 182, 195, 182, 196, 197, 198, + 182, 182, 182, 199, 202, 225, 176, 176, 176, 176, + 238, 824, 227, 225, 225, 225, 225, 203, 204, 353, + 227, 227, 227, 227, 205, 563, 248, 248, 206, 248, + 208, 264, 354, 357, 203, 209, 563, 204, 210, 358, + 211, 212, 213, 214, 215, 279, 205, 216, 229, 217, + 218, 230, 264, 823, 206, 233, 239, 235, 231, 822, + + 256, 256, 232, 256, 261, 261, 266, 261, 266, 265, + 266, 266, 268, 311, 269, 269, 269, 269, 270, 270, + 270, 270, 272, 280, 269, 269, 269, 269, 159, 272, + 265, 269, 269, 269, 269, 273, 274, 285, 285, 285, + 285, 821, 275, 274, 360, 281, 276, 281, 361, 281, + 281, 312, 273, 362, 283, 274, 284, 284, 284, 284, + 308, 308, 274, 308, 275, 286, 160, 284, 284, 284, + 284, 820, 276, 286, 225, 284, 284, 284, 284, 288, + 293, 227, 294, 225, 295, 296, 287, 288, 819, 225, + 227, 155, 155, 289, 155, 299, 227, 290, 288, 155, + + 155, 299, 155, 287, 225, 225, 288, 300, 300, 300, + 300, 227, 227, 385, 369, 289, 299, 299, 225, 818, + 225, 225, 386, 290, 302, 227, 301, 227, 227, 370, + 299, 303, 299, 299, 268, 817, 269, 269, 269, 269, + 270, 270, 270, 270, 272, 264, 269, 269, 269, 269, + 162, 313, 163, 313, 304, 313, 313, 363, 274, 305, + 816, 364, 315, 307, 316, 316, 316, 316, 306, 317, + 317, 317, 317, 365, 329, 366, 324, 274, 316, 316, + 316, 316, 330, 265, 331, 332, 399, 400, 333, 815, + 326, 336, 336, 336, 336, 335, 337, 337, 337, 337, + + 335, 319, 342, 395, 342, 342, 320, 321, 322, 326, + 323, 324, 396, 316, 316, 316, 316, 338, 338, 338, + 338, 335, 423, 423, 325, 326, 339, 339, 339, 339, + 335, 327, 378, 378, 378, 328, 343, 343, 343, 343, + 486, 325, 487, 279, 326, 344, 344, 344, 344, 345, + 345, 345, 345, 327, 346, 346, 346, 346, 431, 431, + 225, 328, 180, 180, 180, 180, 202, 227, 176, 176, + 176, 176, 180, 180, 180, 180, 374, 374, 374, 374, + 204, 280, 387, 814, 348, 376, 388, 376, 348, 392, + 377, 377, 377, 377, 393, 225, 311, 225, 813, 204, + + 812, 389, 227, 348, 227, 225, 225, 348, 228, 228, + 228, 228, 227, 227, 225, 225, 225, 240, 240, 521, + 240, 227, 227, 227, 240, 240, 455, 240, 243, 243, + 456, 243, 243, 243, 312, 243, 248, 248, 505, 248, + 811, 248, 248, 404, 248, 405, 406, 407, 408, 256, + 256, 506, 256, 256, 256, 410, 256, 522, 261, 261, + 409, 261, 261, 261, 810, 261, 419, 419, 419, 419, + 270, 270, 270, 270, 272, 809, 269, 269, 269, 269, + 270, 270, 270, 270, 422, 422, 422, 422, 274, 426, + 426, 426, 420, 424, 562, 424, 420, 521, 425, 425, + + 425, 425, 428, 428, 428, 428, 563, 274, 434, 434, + 434, 420, 461, 461, 225, 420, 285, 285, 285, 285, + 286, 227, 284, 284, 284, 284, 285, 285, 285, 285, + 430, 430, 430, 430, 288, 522, 225, 808, 429, 432, + 807, 432, 429, 227, 433, 433, 433, 433, 299, 438, + 438, 438, 438, 288, 464, 464, 464, 429, 437, 467, + 468, 429, 439, 439, 439, 439, 440, 440, 440, 440, + 342, 437, 342, 342, 724, 437, 441, 441, 441, 441, + 375, 375, 725, 225, 225, 437, 300, 300, 300, 300, + 227, 227, 225, 225, 225, 299, 299, 423, 423, 227, + + 227, 227, 225, 225, 299, 299, 299, 225, 501, 227, + 227, 225, 431, 431, 227, 299, 806, 502, 227, 299, + 503, 308, 308, 299, 308, 308, 308, 805, 308, 378, + 378, 378, 444, 225, 446, 447, 426, 426, 426, 448, + 227, 445, 451, 451, 451, 451, 434, 434, 434, 449, + 225, 450, 317, 317, 317, 317, 324, 227, 316, 316, + 316, 316, 317, 317, 317, 317, 460, 460, 460, 460, + 326, 804, 225, 803, 452, 462, 525, 462, 452, 227, + 463, 463, 463, 463, 336, 336, 336, 336, 335, 326, + 526, 461, 461, 452, 464, 464, 464, 452, 337, 337, + + 337, 337, 335, 338, 338, 338, 338, 335, 339, 339, + 339, 339, 335, 343, 343, 343, 343, 344, 344, 344, + 344, 345, 345, 345, 345, 346, 346, 346, 346, 472, + 802, 472, 801, 800, 473, 473, 473, 473, 374, 374, + 374, 374, 377, 377, 377, 377, 377, 377, 377, 377, + 348, 225, 225, 419, 419, 419, 419, 225, 227, 227, + 533, 799, 533, 798, 227, 534, 534, 534, 534, 348, + 422, 422, 422, 422, 425, 425, 425, 425, 425, 425, + 425, 425, 420, 759, 797, 593, 528, 796, 225, 527, + 428, 428, 428, 428, 594, 227, 760, 535, 795, 535, + + 299, 420, 536, 536, 536, 536, 430, 430, 430, 430, + 433, 433, 433, 433, 433, 433, 433, 433, 429, 438, + 438, 438, 438, 439, 439, 439, 439, 794, 437, 793, + 792, 539, 437, 440, 440, 440, 440, 429, 441, 441, + 441, 441, 437, 225, 225, 225, 225, 437, 791, 790, + 227, 227, 227, 227, 225, 299, 299, 299, 299, 789, + 225, 227, 451, 451, 451, 451, 299, 227, 543, 775, + 543, 788, 299, 544, 544, 544, 544, 460, 460, 460, + 460, 787, 776, 225, 540, 463, 463, 463, 463, 452, + 227, 786, 541, 785, 542, 463, 463, 463, 463, 473, + + 473, 473, 473, 473, 473, 473, 473, 225, 452, 225, + 534, 534, 534, 534, 227, 784, 227, 534, 534, 534, + 534, 536, 536, 536, 536, 536, 536, 536, 536, 225, + 225, 225, 225, 783, 661, 782, 227, 227, 227, 227, + 625, 299, 299, 299, 299, 544, 544, 544, 544, 602, + 544, 544, 544, 544, 626, 639, 603, 225, 225, 661, + 627, 225, 225, 225, 227, 227, 781, 780, 227, 227, + 227, 640, 662, 608, 299, 299, 225, 641, 225, 609, + 225, 714, 779, 227, 778, 227, 777, 227, 774, 773, + 299, 772, 299, 663, 771, 715, 770, 662, 668, 769, + + 768, 716, 767, 766, 765, 664, 764, 763, 762, 761, + 669, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 133, 133, 133, 133, 133, 133, 133, + 133, 133, 133, 133, 158, 758, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 161, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 171, 757, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 207, 207, 207, + 226, 226, 226, 756, 226, 226, 226, 242, 755, 754, + 242, 242, 242, 250, 250, 250, 251, 753, 752, 251, + + 251, 251, 258, 258, 258, 259, 259, 751, 259, 259, + 259, 263, 750, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 267, 749, 267, 267, 267, 267, 267, 267, + 267, 267, 267, 271, 748, 747, 271, 271, 271, 277, + 746, 745, 277, 277, 277, 278, 744, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 282, 743, 282, 282, + 282, 282, 282, 282, 282, 282, 282, 291, 742, 741, + 291, 291, 291, 292, 292, 292, 298, 298, 298, 298, + 298, 298, 298, 310, 740, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 314, 739, 314, 314, 314, 314, + + 314, 314, 314, 314, 314, 318, 738, 737, 318, 318, + 318, 334, 334, 736, 334, 334, 334, 340, 340, 340, + 340, 340, 340, 340, 340, 340, 158, 735, 158, 158, 158, 158, 158, 158, 158, 158, 158, 161, 161, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 171, 736, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 206, - 206, 206, 225, 225, 225, 735, 225, 225, 225, 241, - 734, 733, 241, 241, 241, 249, 249, 249, 250, 732, - - 731, 250, 250, 250, 257, 257, 257, 258, 258, 730, - 258, 258, 258, 262, 729, 262, 262, 262, 262, 262, - 262, 262, 262, 262, 266, 728, 266, 266, 266, 266, - 266, 266, 266, 266, 266, 270, 727, 726, 270, 270, - 270, 276, 725, 724, 276, 276, 276, 277, 723, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 281, 722, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 290, - 721, 718, 290, 290, 290, 291, 291, 291, 297, 297, - 297, 297, 297, 297, 297, 309, 717, 309, 309, 309, - 309, 309, 309, 309, 309, 309, 313, 716, 313, 313, - - 313, 313, 313, 313, 313, 313, 313, 317, 715, 714, - 317, 317, 317, 333, 333, 713, 333, 333, 333, 339, - 339, 339, 339, 339, 339, 339, 339, 339, 158, 712, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, - 171, 708, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 348, 707, 706, 348, 348, 348, 378, 705, 704, - 378, 379, 703, 702, 379, 379, 379, 224, 224, 224, - 701, 224, 224, 224, 225, 225, 225, 700, 225, 225, - 225, 402, 699, 698, 697, 696, 402, 402, 402, 241, - - 695, 694, 241, 241, 241, 413, 693, 692, 413, 413, - 413, 250, 691, 690, 250, 250, 250, 258, 258, 689, - 258, 258, 258, 420, 688, 687, 420, 420, 420, 426, - 686, 685, 426, 276, 684, 683, 276, 276, 276, 277, - 682, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 281, 681, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 434, 680, 679, 434, 290, 678, 677, 290, 290, - 290, 435, 676, 435, 435, 435, 435, 441, 441, 441, - 297, 297, 297, 297, 297, 297, 297, 309, 675, 309, - 309, 309, 309, 309, 309, 309, 309, 309, 313, 674, - - 313, 313, 313, 313, 313, 313, 313, 313, 313, 452, - 673, 672, 452, 452, 452, 464, 671, 670, 464, 333, - 333, 669, 333, 333, 333, 518, 668, 518, 518, 518, - 518, 518, 518, 518, 518, 518, 521, 521, 521, 667, - 521, 521, 521, 225, 225, 225, 666, 225, 225, 225, - 536, 663, 662, 536, 536, 536, 656, 661, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 655, 654, 653, - 652, 651, 650, 649, 648, 647, 646, 645, 644, 643, - 642, 641, 640, 639, 635, 634, 633, 632, 631, 630, - 629, 628, 627, 626, 625, 621, 620, 619, 618, 617, - - 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, - 604, 603, 602, 601, 598, 522, 597, 596, 595, 594, - 593, 592, 589, 588, 587, 586, 585, 584, 583, 582, - 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, - 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, - 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, - 549, 548, 547, 546, 545, 544, 543, 535, 436, 530, - 529, 528, 527, 522, 401, 517, 516, 515, 514, 513, - 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, - 499, 498, 497, 496, 495, 494, 493, 492, 491, 490, - - 489, 488, 487, 484, 483, 482, 481, 480, 479, 478, - 477, 476, 475, 474, 473, 334, 470, 469, 468, 465, - 458, 457, 456, 453, 310, 442, 436, 278, 263, 259, - 259, 417, 416, 415, 414, 412, 411, 410, 401, 400, - 397, 396, 393, 381, 380, 372, 371, 370, 367, 366, - 358, 355, 354, 351, 350, 349, 346, 159, 334, 310, - 308, 263, 296, 278, 263, 261, 259, 256, 254, 253, - 252, 251, 248, 243, 240, 159, 168, 157, 154, 820, - 25, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820 + 161, 161, 161, 161, 161, 161, 161, 161, 171, 734, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 349, + 733, 732, 349, 349, 349, 379, 731, 730, 379, 380, + 729, 728, 380, 380, 380, 225, 225, 225, 727, 225, + 225, 225, 226, 226, 226, 726, 226, 226, 226, 403, + 723, 722, 721, 720, 403, 403, 403, 242, 719, 718, + + 242, 242, 242, 414, 717, 713, 414, 414, 414, 251, + 712, 711, 251, 251, 251, 259, 259, 710, 259, 259, + 259, 421, 709, 708, 421, 421, 421, 427, 707, 706, + 427, 277, 705, 704, 277, 277, 277, 278, 703, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 282, 702, + 282, 282, 282, 282, 282, 282, 282, 282, 282, 435, + 701, 700, 435, 291, 699, 698, 291, 291, 291, 436, + 697, 436, 436, 436, 436, 442, 442, 442, 298, 298, + 298, 298, 298, 298, 298, 310, 696, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 314, 695, 314, 314, + + 314, 314, 314, 314, 314, 314, 314, 453, 694, 693, + 453, 453, 453, 465, 692, 691, 465, 334, 334, 690, + 334, 334, 334, 520, 689, 520, 520, 520, 520, 520, + 520, 520, 520, 520, 523, 523, 523, 688, 523, 523, + 523, 226, 226, 226, 687, 226, 226, 226, 538, 686, + 685, 538, 538, 538, 660, 684, 660, 660, 660, 660, + 660, 660, 660, 660, 660, 683, 682, 681, 680, 679, + 678, 677, 676, 675, 674, 673, 672, 671, 670, 667, + 666, 665, 659, 658, 657, 656, 655, 654, 653, 652, + 651, 650, 649, 648, 647, 646, 645, 644, 643, 642, + + 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, + 628, 624, 623, 622, 621, 620, 619, 618, 617, 616, + 615, 614, 613, 612, 611, 610, 607, 606, 605, 604, + 601, 524, 600, 599, 598, 597, 596, 595, 592, 591, + 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, + 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, + 570, 569, 568, 567, 566, 565, 564, 561, 560, 559, + 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, + 548, 547, 546, 545, 537, 437, 532, 531, 530, 529, + 524, 402, 519, 518, 517, 516, 515, 514, 513, 512, + + 511, 510, 509, 508, 507, 504, 500, 499, 498, 497, + 496, 495, 494, 493, 492, 491, 490, 489, 488, 485, + 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, + 474, 335, 471, 470, 469, 466, 459, 458, 457, 454, + 311, 443, 437, 279, 264, 260, 260, 418, 417, 416, + 415, 413, 412, 411, 402, 401, 398, 397, 394, 382, + 381, 373, 372, 371, 368, 367, 359, 356, 355, 352, + 351, 350, 347, 172, 335, 311, 309, 264, 297, 279, + 264, 262, 260, 257, 255, 254, 253, 252, 249, 244, + 241, 172, 168, 157, 154, 828, 25, 828, 828, 828, + + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828 } ; -static yyconst flex_int16_t yy_chk[2455] = +static yyconst flex_int16_t yy_chk[2472] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1112,7 +1117,7 @@ static yyconst flex_int16_t yy_chk[2455] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, + 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, @@ -1120,9 +1125,9 @@ static yyconst flex_int16_t yy_chk[2455] = 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 5, 6, 5, 6, - 28, 28, 32, 28, 32, 33, 161, 33, 161, 33, - 33, 811, 5, 6, 7, 7, 7, 7, 7, 7, + 3, 3, 3, 3, 3, 3, 3, 3, 5, 6, + 5, 6, 28, 28, 32, 28, 32, 33, 161, 33, + 161, 33, 33, 819, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, @@ -1130,7 +1135,7 @@ static yyconst flex_int16_t yy_chk[2455] = 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, @@ -1139,14 +1144,14 @@ static yyconst flex_int16_t yy_chk[2455] = 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, + 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, @@ -1154,19 +1159,19 @@ static yyconst flex_int16_t yy_chk[2455] = 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 19, - 52, 44, 29, 35, 19, 810, 39, 52, 19, 44, - 19, 19, 20, 19, 19, 19, 19, 20, 29, 39, - 35, 20, 809, 20, 20, 808, 20, 20, 20, 20, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 19, 52, 44, 29, + 35, 19, 213, 39, 52, 19, 44, 19, 19, 20, + 19, 19, 19, 19, 20, 29, 39, 35, 20, 213, + 20, 20, 818, 20, 20, 20, 20, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, @@ -1174,211 +1179,213 @@ static yyconst flex_int16_t yy_chk[2455] = 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 31, 40, 62, 40, 40, 40, 40, - 49, 49, 42, 40, 42, 42, 42, 42, 50, 50, - 46, 42, 46, 46, 46, 46, 51, 51, 66, 66, - 804, 66, 53, 58, 46, 53, 53, 53, 53, 53, - 58, 31, 43, 154, 43, 154, 154, 43, 62, 73, - 73, 803, 73, 46, 802, 75, 43, 43, 43, 43, - 75, 75, 162, 43, 162, 162, 43, 43, 43, 43, - - 43, 43, 43, 43, 43, 43, 43, 43, 43, 202, - 202, 58, 43, 43, 43, 43, 43, 43, 43, 43, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 31, 40, 62, 40, 40, 40, 40, 49, 49, + 42, 40, 42, 42, 42, 42, 50, 50, 46, 42, + 46, 46, 46, 46, 51, 51, 66, 66, 817, 66, + 53, 60, 46, 53, 53, 53, 53, 53, 60, 31, + 43, 119, 43, 73, 73, 43, 73, 62, 119, 203, + 203, 46, 75, 119, 43, 43, 43, 43, 75, 75, + + 154, 43, 154, 154, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 210, 210, 60, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 45, 56, 45, 45, 45, - 45, 94, 196, 56, 60, 57, 119, 59, 45, 45, - 109, 60, 57, 119, 59, 45, 196, 63, 119, 45, - 78, 78, 127, 78, 61, 45, 86, 86, 45, 86, - 186, 61, 92, 92, 801, 92, 45, 720, 56, 94, - 57, 163, 186, 163, 45, 47, 57, 59, 109, 720, - 47, 60, 138, 47, 47, 47, 47, 47, 47, 800, - - 127, 47, 63, 47, 47, 61, 95, 193, 95, 193, - 95, 95, 99, 158, 99, 99, 99, 99, 101, 101, - 101, 101, 102, 189, 102, 102, 102, 102, 189, 103, - 138, 103, 103, 103, 103, 102, 102, 113, 113, 113, - 113, 798, 102, 103, 192, 110, 102, 110, 192, 110, - 110, 158, 102, 121, 112, 102, 112, 112, 112, 112, - 121, 215, 103, 102, 115, 121, 115, 115, 115, 115, - 215, 102, 114, 225, 114, 114, 114, 114, 115, 117, - 225, 117, 122, 117, 117, 114, 114, 136, 136, 122, - 136, 361, 114, 361, 122, 121, 114, 115, 130, 130, - - 130, 130, 114, 120, 123, 114, 120, 120, 120, 120, - 120, 123, 125, 114, 210, 120, 123, 122, 124, 125, - 126, 114, 210, 122, 125, 124, 736, 126, 209, 209, - 124, 129, 126, 129, 129, 129, 129, 132, 736, 132, - 132, 132, 132, 139, 213, 139, 797, 139, 139, 213, - 212, 132, 123, 143, 143, 143, 143, 262, 124, 125, - 141, 126, 141, 141, 141, 141, 212, 146, 793, 145, - 132, 145, 145, 145, 145, 146, 146, 146, 155, 155, - 146, 155, 792, 145, 191, 143, 223, 223, 191, 143, - 143, 143, 191, 143, 144, 262, 144, 144, 144, 144, - - 156, 156, 145, 156, 204, 204, 204, 144, 144, 148, - 148, 148, 148, 148, 144, 272, 272, 791, 144, 149, - 149, 149, 149, 149, 144, 790, 229, 144, 150, 150, - 150, 150, 150, 229, 228, 144, 151, 151, 151, 151, - 151, 228, 789, 144, 164, 164, 164, 164, 165, 165, - 165, 165, 166, 166, 166, 166, 167, 167, 167, 167, - 174, 174, 174, 174, 175, 786, 175, 175, 175, 175, - 179, 179, 179, 179, 201, 201, 201, 201, 175, 783, - 211, 228, 179, 203, 211, 203, 201, 230, 203, 203, - 203, 203, 231, 232, 230, 233, 782, 175, 211, 231, - - 232, 179, 233, 227, 234, 201, 227, 227, 227, 227, - 227, 234, 239, 239, 319, 239, 240, 240, 319, 240, - 242, 242, 383, 242, 781, 232, 243, 243, 478, 243, - 383, 231, 231, 383, 230, 247, 247, 780, 247, 478, - 233, 248, 248, 234, 248, 255, 255, 779, 255, 256, - 256, 277, 256, 260, 260, 777, 260, 261, 261, 776, - 261, 265, 265, 265, 265, 267, 267, 267, 267, 268, - 775, 268, 268, 268, 268, 269, 269, 269, 269, 271, - 271, 271, 271, 268, 274, 274, 274, 269, 273, 277, - 273, 271, 309, 273, 273, 273, 273, 280, 280, 280, - - 280, 774, 268, 286, 286, 772, 269, 288, 288, 288, - 271, 282, 282, 282, 282, 283, 771, 283, 283, 283, - 283, 284, 284, 284, 284, 285, 285, 285, 285, 283, - 309, 297, 770, 284, 287, 769, 287, 285, 297, 287, - 287, 287, 287, 297, 292, 292, 292, 292, 283, 324, - 324, 768, 284, 292, 329, 329, 285, 293, 293, 293, - 293, 294, 294, 294, 294, 401, 293, 326, 326, 326, - 294, 295, 295, 295, 295, 374, 374, 767, 299, 300, - 295, 299, 299, 299, 299, 299, 300, 301, 302, 303, - 299, 300, 422, 422, 301, 302, 303, 305, 304, 301, - - 302, 303, 762, 401, 305, 304, 306, 761, 404, 305, - 304, 307, 307, 306, 307, 404, 308, 308, 306, 308, - 312, 312, 312, 312, 430, 430, 300, 759, 303, 303, - 304, 314, 314, 314, 314, 302, 315, 406, 315, 315, - 315, 315, 305, 758, 406, 306, 316, 316, 316, 316, - 315, 323, 323, 323, 323, 377, 377, 377, 316, 325, - 756, 325, 755, 323, 325, 325, 325, 325, 407, 315, - 335, 335, 335, 335, 335, 407, 341, 316, 341, 341, - 460, 460, 323, 336, 336, 336, 336, 336, 337, 337, - 337, 337, 337, 338, 338, 338, 338, 338, 342, 342, - - 342, 342, 343, 343, 343, 343, 344, 344, 344, 344, - 345, 345, 345, 345, 347, 754, 347, 518, 753, 347, - 347, 347, 347, 373, 373, 373, 373, 375, 375, 375, - 375, 376, 376, 376, 376, 373, 403, 405, 409, 408, - 425, 425, 425, 403, 405, 409, 408, 418, 418, 418, - 418, 419, 752, 419, 373, 518, 419, 419, 419, 419, - 750, 421, 421, 421, 421, 423, 423, 423, 423, 433, - 433, 433, 409, 421, 749, 748, 405, 408, 403, 424, - 424, 424, 424, 427, 427, 427, 427, 747, 428, 745, - 428, 744, 421, 428, 428, 428, 428, 429, 429, 429, - - 429, 431, 431, 431, 431, 432, 432, 432, 432, 429, - 437, 437, 437, 437, 438, 438, 438, 438, 598, 437, - 463, 463, 463, 438, 439, 439, 439, 439, 429, 440, - 440, 440, 440, 439, 443, 444, 445, 446, 440, 743, - 741, 443, 444, 445, 446, 447, 443, 444, 445, 446, - 510, 448, 447, 449, 523, 524, 598, 447, 448, 510, - 449, 523, 524, 448, 526, 449, 450, 450, 450, 450, - 740, 526, 451, 656, 451, 445, 443, 451, 451, 451, - 451, 459, 459, 459, 459, 525, 738, 449, 737, 448, - 735, 734, 525, 459, 461, 461, 461, 461, 462, 462, - - 462, 462, 471, 471, 471, 471, 472, 472, 472, 472, - 526, 656, 459, 531, 531, 531, 531, 532, 532, 532, - 532, 533, 533, 533, 533, 537, 525, 534, 534, 534, - 534, 538, 537, 539, 540, 733, 732, 537, 538, 730, - 539, 540, 560, 538, 575, 539, 540, 541, 541, 541, - 541, 542, 542, 542, 542, 560, 599, 600, 729, 575, - 605, 560, 659, 599, 600, 575, 606, 605, 660, 659, - 664, 673, 605, 606, 539, 660, 665, 664, 606, 681, - 540, 728, 664, 665, 673, 727, 681, 726, 665, 725, - 673, 723, 599, 722, 721, 719, 605, 717, 716, 715, - - 714, 713, 712, 600, 711, 710, 709, 708, 706, 705, - 704, 703, 606, 821, 821, 821, 821, 821, 821, 821, - 821, 821, 821, 821, 822, 822, 822, 822, 822, 822, - 822, 822, 822, 822, 822, 823, 823, 823, 823, 823, - 823, 823, 823, 823, 823, 823, 824, 702, 824, 824, - 824, 824, 824, 824, 824, 824, 824, 825, 825, 825, - 825, 825, 825, 825, 825, 825, 825, 825, 826, 701, - 826, 826, 826, 826, 826, 826, 826, 826, 826, 827, - 827, 827, 828, 828, 828, 699, 828, 828, 828, 829, - 697, 696, 829, 829, 829, 830, 830, 830, 831, 695, - - 694, 831, 831, 831, 832, 832, 832, 833, 833, 692, - 833, 833, 833, 834, 691, 834, 834, 834, 834, 834, - 834, 834, 834, 834, 835, 690, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 836, 689, 688, 836, 836, - 836, 837, 687, 686, 837, 837, 837, 838, 684, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 839, 683, - 839, 839, 839, 839, 839, 839, 839, 839, 839, 840, - 682, 680, 840, 840, 840, 841, 841, 841, 842, 842, - 842, 842, 842, 842, 842, 843, 679, 843, 843, 843, - 843, 843, 843, 843, 843, 843, 844, 678, 844, 844, - - 844, 844, 844, 844, 844, 844, 844, 845, 677, 676, - 845, 845, 845, 846, 846, 675, 846, 846, 846, 847, - 847, 847, 847, 847, 847, 847, 847, 847, 848, 674, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 850, 672, 850, 850, 850, 850, 850, 850, 850, 850, - 850, 851, 671, 670, 851, 851, 851, 852, 669, 668, - 852, 853, 667, 666, 853, 853, 853, 854, 854, 854, - 662, 854, 854, 854, 855, 855, 855, 655, 855, 855, - 855, 856, 654, 652, 651, 649, 856, 856, 856, 857, - - 648, 647, 857, 857, 857, 858, 644, 643, 858, 858, - 858, 859, 642, 641, 859, 859, 859, 860, 860, 639, - 860, 860, 860, 861, 638, 637, 861, 861, 861, 862, - 636, 635, 862, 863, 633, 632, 863, 863, 863, 864, - 631, 864, 864, 864, 864, 864, 864, 864, 864, 864, - 865, 630, 865, 865, 865, 865, 865, 865, 865, 865, - 865, 866, 628, 627, 866, 867, 626, 625, 867, 867, - 867, 868, 624, 868, 868, 868, 868, 869, 869, 869, - 870, 870, 870, 870, 870, 870, 870, 871, 623, 871, - 871, 871, 871, 871, 871, 871, 871, 871, 872, 622, - - 872, 872, 872, 872, 872, 872, 872, 872, 872, 873, - 620, 619, 873, 873, 873, 874, 618, 617, 874, 875, - 875, 613, 875, 875, 875, 876, 611, 876, 876, 876, - 876, 876, 876, 876, 876, 876, 877, 877, 877, 610, - 877, 877, 877, 878, 878, 878, 609, 878, 878, 878, - 879, 604, 603, 879, 879, 879, 880, 602, 880, 880, - 880, 880, 880, 880, 880, 880, 880, 597, 596, 595, - 594, 593, 592, 591, 590, 589, 588, 587, 586, 583, - 582, 580, 577, 576, 574, 573, 572, 571, 570, 569, - 568, 567, 565, 564, 563, 559, 557, 556, 555, 554, - - 553, 552, 551, 550, 549, 548, 547, 546, 545, 543, - 530, 529, 528, 527, 522, 521, 516, 515, 514, 513, - 512, 511, 509, 508, 507, 506, 505, 504, 502, 501, - 500, 499, 498, 497, 496, 495, 493, 492, 491, 490, - 489, 488, 487, 486, 485, 484, 482, 481, 480, 479, - 477, 476, 475, 474, 473, 470, 469, 468, 467, 466, - 465, 458, 457, 456, 455, 454, 453, 436, 435, 417, - 412, 411, 410, 402, 400, 399, 397, 396, 395, 394, - 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, - 382, 381, 380, 371, 370, 369, 368, 367, 366, 365, - - 364, 363, 362, 360, 359, 358, 357, 356, 355, 354, - 353, 352, 351, 350, 349, 333, 332, 331, 330, 328, - 322, 321, 320, 318, 313, 298, 291, 281, 266, 258, - 257, 254, 253, 252, 251, 246, 245, 244, 226, 224, - 217, 216, 214, 208, 207, 199, 198, 197, 195, 194, - 190, 188, 187, 185, 184, 182, 172, 171, 147, 140, - 137, 128, 118, 111, 96, 93, 89, 87, 85, 84, - 83, 82, 79, 74, 67, 36, 34, 30, 27, 25, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820, 820, 820, 820, 820, 820, 820, - 820, 820, 820, 820 + 43, 43, 43, 43, 45, 56, 45, 45, 45, 45, + 63, 816, 56, 58, 59, 61, 57, 45, 45, 187, + 58, 59, 61, 57, 45, 812, 78, 78, 45, 78, + 47, 94, 187, 190, 45, 47, 811, 45, 47, 190, + 47, 47, 47, 47, 47, 109, 45, 47, 56, 47, + 47, 57, 127, 810, 45, 59, 63, 61, 57, 809, + + 86, 86, 58, 86, 92, 92, 95, 92, 95, 94, + 95, 95, 99, 138, 99, 99, 99, 99, 101, 101, + 101, 101, 102, 109, 102, 102, 102, 102, 158, 103, + 127, 103, 103, 103, 103, 102, 102, 113, 113, 113, + 113, 808, 102, 103, 192, 110, 102, 110, 192, 110, + 110, 138, 102, 192, 112, 102, 112, 112, 112, 112, + 136, 136, 103, 136, 102, 115, 158, 115, 115, 115, + 115, 806, 102, 114, 226, 114, 114, 114, 114, 115, + 117, 226, 117, 121, 117, 117, 114, 114, 805, 122, + 121, 155, 155, 114, 155, 121, 122, 114, 115, 156, + + 156, 122, 156, 114, 120, 123, 114, 120, 120, 120, + 120, 120, 123, 211, 197, 114, 120, 123, 124, 801, + 125, 126, 211, 114, 122, 124, 121, 125, 126, 197, + 124, 122, 125, 126, 129, 800, 129, 129, 129, 129, + 130, 130, 130, 130, 132, 263, 132, 132, 132, 132, + 163, 139, 163, 139, 123, 139, 139, 193, 132, 124, + 799, 193, 141, 126, 141, 141, 141, 141, 125, 143, + 143, 143, 143, 194, 146, 194, 145, 132, 145, 145, + 145, 145, 146, 263, 146, 146, 224, 224, 146, 798, + 145, 148, 148, 148, 148, 148, 149, 149, 149, 149, + + 149, 143, 162, 216, 162, 162, 143, 143, 143, 145, + 143, 144, 216, 144, 144, 144, 144, 150, 150, 150, + 150, 150, 273, 273, 144, 144, 151, 151, 151, 151, + 151, 144, 205, 205, 205, 144, 164, 164, 164, 164, + 362, 144, 362, 278, 144, 165, 165, 165, 165, 166, + 166, 166, 166, 144, 167, 167, 167, 167, 287, 287, + 230, 144, 175, 175, 175, 175, 176, 230, 176, 176, + 176, 176, 180, 180, 180, 180, 202, 202, 202, 202, + 176, 278, 212, 796, 180, 204, 212, 204, 202, 214, + 204, 204, 204, 204, 214, 229, 310, 231, 793, 176, + + 790, 212, 229, 180, 231, 228, 232, 202, 228, 228, + 228, 228, 228, 232, 234, 235, 233, 240, 240, 402, + 240, 234, 235, 233, 241, 241, 320, 241, 243, 243, + 320, 243, 244, 244, 310, 244, 248, 248, 386, 248, + 789, 249, 249, 229, 249, 231, 232, 232, 233, 256, + 256, 386, 256, 257, 257, 235, 257, 402, 261, 261, + 234, 261, 262, 262, 788, 262, 266, 266, 266, 266, + 268, 268, 268, 268, 269, 787, 269, 269, 269, 269, + 270, 270, 270, 270, 272, 272, 272, 272, 269, 275, + 275, 275, 270, 274, 479, 274, 272, 520, 274, 274, + + 274, 274, 281, 281, 281, 281, 479, 269, 289, 289, + 289, 270, 325, 325, 405, 272, 283, 283, 283, 283, + 284, 405, 284, 284, 284, 284, 285, 285, 285, 285, + 286, 286, 286, 286, 284, 520, 298, 786, 285, 288, + 784, 288, 286, 298, 288, 288, 288, 288, 298, 293, + 293, 293, 293, 284, 327, 327, 327, 285, 293, 330, + 330, 286, 294, 294, 294, 294, 295, 295, 295, 295, + 342, 294, 342, 342, 685, 295, 296, 296, 296, 296, + 375, 375, 685, 300, 301, 296, 300, 300, 300, 300, + 300, 301, 302, 303, 304, 300, 301, 423, 423, 302, + + 303, 304, 407, 306, 302, 303, 304, 305, 384, 407, + 306, 307, 431, 431, 305, 306, 783, 384, 307, 305, + 384, 308, 308, 307, 308, 309, 309, 782, 309, 378, + 378, 378, 301, 404, 304, 304, 426, 426, 426, 305, + 404, 303, 313, 313, 313, 313, 434, 434, 434, 306, + 406, 307, 315, 315, 315, 315, 316, 406, 316, 316, + 316, 316, 317, 317, 317, 317, 324, 324, 324, 324, + 316, 781, 408, 779, 317, 326, 404, 326, 324, 408, + 326, 326, 326, 326, 336, 336, 336, 336, 336, 316, + 406, 461, 461, 317, 464, 464, 464, 324, 337, 337, + + 337, 337, 337, 338, 338, 338, 338, 338, 339, 339, + 339, 339, 339, 343, 343, 343, 343, 344, 344, 344, + 344, 345, 345, 345, 345, 346, 346, 346, 346, 348, + 778, 348, 777, 776, 348, 348, 348, 348, 374, 374, + 374, 374, 376, 376, 376, 376, 377, 377, 377, 377, + 374, 409, 410, 419, 419, 419, 419, 525, 409, 410, + 420, 775, 420, 774, 525, 420, 420, 420, 420, 374, + 422, 422, 422, 422, 424, 424, 424, 424, 425, 425, + 425, 425, 422, 725, 770, 512, 410, 768, 444, 409, + 428, 428, 428, 428, 512, 444, 725, 429, 767, 429, + + 444, 422, 429, 429, 429, 429, 430, 430, 430, 430, + 432, 432, 432, 432, 433, 433, 433, 433, 430, 438, + 438, 438, 438, 439, 439, 439, 439, 765, 438, 764, + 762, 444, 439, 440, 440, 440, 440, 430, 441, 441, + 441, 441, 440, 445, 446, 447, 448, 441, 761, 760, + 445, 446, 447, 448, 449, 445, 446, 447, 448, 759, + 450, 449, 451, 451, 451, 451, 449, 450, 452, 742, + 452, 758, 450, 452, 452, 452, 452, 460, 460, 460, + 460, 756, 742, 526, 446, 462, 462, 462, 462, 460, + 526, 755, 449, 754, 450, 463, 463, 463, 463, 472, + + 472, 472, 472, 473, 473, 473, 473, 527, 460, 528, + 533, 533, 533, 533, 527, 753, 528, 534, 534, 534, + 534, 535, 535, 535, 535, 536, 536, 536, 536, 539, + 540, 541, 542, 751, 601, 750, 539, 540, 541, 542, + 562, 539, 540, 541, 542, 543, 543, 543, 543, 527, + 544, 544, 544, 544, 562, 577, 528, 602, 603, 660, + 562, 663, 608, 609, 602, 603, 749, 747, 663, 608, + 609, 577, 601, 541, 608, 609, 664, 577, 668, 542, + 669, 677, 746, 664, 744, 668, 743, 669, 741, 740, + 668, 739, 669, 602, 738, 677, 736, 660, 608, 735, + + 734, 677, 733, 732, 731, 603, 730, 728, 727, 726, + 609, 829, 829, 829, 829, 829, 829, 829, 829, 829, + 829, 829, 830, 830, 830, 830, 830, 830, 830, 830, + 830, 830, 830, 831, 831, 831, 831, 831, 831, 831, + 831, 831, 831, 831, 832, 724, 832, 832, 832, 832, + 832, 832, 832, 832, 832, 833, 833, 833, 833, 833, + 833, 833, 833, 833, 833, 833, 834, 722, 834, 834, + 834, 834, 834, 834, 834, 834, 834, 835, 835, 835, + 836, 836, 836, 721, 836, 836, 836, 837, 720, 719, + 837, 837, 837, 838, 838, 838, 839, 718, 717, 839, + + 839, 839, 840, 840, 840, 841, 841, 716, 841, 841, + 841, 842, 715, 842, 842, 842, 842, 842, 842, 842, + 842, 842, 843, 714, 843, 843, 843, 843, 843, 843, + 843, 843, 843, 844, 713, 711, 844, 844, 844, 845, + 710, 709, 845, 845, 845, 846, 708, 846, 846, 846, + 846, 846, 846, 846, 846, 846, 847, 707, 847, 847, + 847, 847, 847, 847, 847, 847, 847, 848, 706, 704, + 848, 848, 848, 849, 849, 849, 850, 850, 850, 850, + 850, 850, 850, 851, 702, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 852, 701, 852, 852, 852, 852, + + 852, 852, 852, 852, 852, 853, 700, 699, 853, 853, + 853, 854, 854, 697, 854, 854, 854, 855, 855, 855, + 855, 855, 855, 855, 855, 855, 856, 696, 856, 856, + 856, 856, 856, 856, 856, 856, 856, 857, 857, 857, + 857, 857, 857, 857, 857, 857, 857, 857, 858, 695, + 858, 858, 858, 858, 858, 858, 858, 858, 858, 859, + 694, 693, 859, 859, 859, 860, 692, 691, 860, 861, + 690, 688, 861, 861, 861, 862, 862, 862, 687, 862, + 862, 862, 863, 863, 863, 686, 863, 863, 863, 864, + 684, 683, 682, 681, 864, 864, 864, 865, 680, 679, + + 865, 865, 865, 866, 678, 676, 866, 866, 866, 867, + 675, 674, 867, 867, 867, 868, 868, 673, 868, 868, + 868, 869, 672, 671, 869, 869, 869, 870, 670, 666, + 870, 871, 659, 658, 871, 871, 871, 872, 656, 872, + 872, 872, 872, 872, 872, 872, 872, 872, 873, 655, + 873, 873, 873, 873, 873, 873, 873, 873, 873, 874, + 653, 652, 874, 875, 651, 648, 875, 875, 875, 876, + 647, 876, 876, 876, 876, 877, 877, 877, 878, 878, + 878, 878, 878, 878, 878, 879, 646, 879, 879, 879, + 879, 879, 879, 879, 879, 879, 880, 645, 880, 880, + + 880, 880, 880, 880, 880, 880, 880, 881, 644, 642, + 881, 881, 881, 882, 641, 640, 882, 883, 883, 639, + 883, 883, 883, 884, 638, 884, 884, 884, 884, 884, + 884, 884, 884, 884, 885, 885, 885, 636, 885, 885, + 885, 886, 886, 886, 635, 886, 886, 886, 887, 634, + 633, 887, 887, 887, 888, 631, 888, 888, 888, 888, + 888, 888, 888, 888, 888, 630, 629, 628, 627, 626, + 625, 623, 622, 621, 620, 616, 614, 613, 612, 607, + 606, 605, 600, 599, 598, 597, 596, 595, 594, 593, + 592, 591, 590, 589, 587, 585, 584, 582, 579, 578, + + 576, 575, 574, 573, 572, 571, 570, 569, 567, 566, + 565, 561, 559, 558, 557, 556, 555, 554, 553, 552, + 551, 550, 549, 548, 547, 545, 532, 531, 530, 529, + 524, 523, 518, 517, 516, 515, 514, 513, 511, 510, + 509, 508, 507, 506, 505, 503, 502, 501, 500, 499, + 498, 497, 496, 494, 493, 492, 491, 490, 489, 488, + 487, 486, 485, 483, 482, 481, 480, 478, 477, 476, + 475, 474, 471, 470, 469, 468, 467, 466, 459, 458, + 457, 456, 455, 454, 437, 436, 418, 413, 412, 411, + 403, 401, 400, 398, 397, 396, 395, 394, 393, 392, + + 391, 390, 389, 388, 387, 385, 383, 382, 381, 372, + 371, 370, 369, 368, 367, 366, 365, 364, 363, 361, + 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, + 350, 334, 333, 332, 331, 329, 323, 322, 321, 319, + 314, 299, 292, 282, 267, 259, 258, 255, 254, 253, + 252, 247, 246, 245, 227, 225, 218, 217, 215, 209, + 208, 200, 199, 198, 196, 195, 191, 189, 188, 186, + 185, 183, 173, 171, 147, 140, 137, 128, 118, 111, + 96, 93, 89, 87, 85, 84, 83, 82, 79, 74, + 67, 36, 34, 30, 27, 25, 828, 828, 828, 828, + + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 828, 828, 828, 828, 828, + 828 } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[209] = +static yyconst flex_int32_t yy_rule_can_match_eol[211] = { 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1386,37 +1393,37 @@ static yyconst flex_int32_t yy_rule_can_match_eol[209] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 0, }; + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, }; -static yyconst flex_int16_t yy_rule_linenum[208] = +static yyconst flex_int16_t yy_rule_linenum[210] = { 0, - 225, 247, 249, 251, 256, 257, 258, 259, 260, 261, - 262, 263, 264, 265, 266, 267, 269, 270, 271, 272, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 287, 292, 293, 295, 296, 297, 298, 299, - 300, 301, 302, 303, 304, 305, 307, 308, 309, 310, - 312, 313, 314, 315, 317, 318, 319, 320, 321, 323, - 324, 325, 326, 327, 328, 329, 330, 331, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 353, 360, 361, 362, - 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, - - 373, 375, 376, 377, 378, 379, 380, 381, 383, 388, - 393, 422, 470, 471, 472, 473, 475, 480, 492, 520, - 521, 522, 523, 524, 526, 534, 585, 598, 620, 625, - 630, 637, 638, 653, 658, 659, 664, 665, 666, 668, - 684, 738, 766, 771, 776, 777, 778, 779, 784, 795, - 796, 798, 800, 811, 825, 830, 831, 832, 833, 835, - 850, 864, 893, 918, 920, 925, 935, 940, 958, 964, - 971, 1004, 1006, 1011, 1047, 1048, 1049, 1051, 1052, 1053, - 1054, 1055, 1056, 1058, 1059, 1060, 1062, 1067, 1072, 1073, - 1076, 1110, 1115, 1118, 1119, 1120, 1121, 1123, 1128, 1129, - - 1130, 1131, 1132, 1134, 1139, 1141, 1143 + 227, 249, 251, 253, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 271, 272, 273, 274, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 289, 294, 295, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 309, 310, 311, 312, + 314, 315, 316, 317, 319, 320, 321, 322, 323, 325, + 326, 327, 328, 329, 330, 331, 332, 333, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 348, 349, 350, 351, 352, 355, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + + 375, 377, 378, 379, 380, 381, 382, 383, 384, 386, + 390, 407, 412, 441, 489, 490, 491, 492, 494, 499, + 511, 539, 540, 541, 542, 543, 545, 553, 604, 617, + 639, 644, 649, 656, 657, 672, 677, 678, 683, 684, + 685, 687, 703, 757, 785, 790, 795, 796, 797, 798, + 803, 814, 815, 817, 819, 830, 844, 849, 850, 851, + 852, 854, 869, 883, 912, 937, 939, 944, 954, 959, + 977, 983, 990, 1023, 1025, 1030, 1066, 1067, 1068, 1070, + 1071, 1072, 1073, 1074, 1075, 1077, 1078, 1079, 1081, 1086, + 1091, 1092, 1095, 1129, 1134, 1137, 1138, 1139, 1140, 1142, + + 1147, 1148, 1149, 1150, 1151, 1153, 1158, 1160, 1162 } ; /* The intent behind this definition is that it'll catch @@ -1460,6 +1467,8 @@ are processed by a different preprocessor; see F. #include "pirmacro.h" #include "pirerr.h" +#include "parrot/parrot.h" + /* define the type of the extra field in the yyscan_t object that is passed around; * this is the lexer_state structure, defined in "pircompiler.h" */ @@ -1535,7 +1544,7 @@ static int restore_filestate(yyscan_t yyscanner); /* The PASM state is an exclusive state, recognizing ONLY PASM tokens. */ -#line 1539 "pirlexer.c" +#line 1548 "pirlexer.c" #define INITIAL 0 #define MACROHEAD 1 @@ -1841,11 +1850,11 @@ YY_DECL struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* %% [7.0] user's declarations go here */ -#line 222 "pir.l" +#line 224 "pir.l" -#line 1849 "pirlexer.c" +#line 1858 "pirlexer.c" yylval = yylval_param; @@ -1910,13 +1919,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 821 ) + if ( yy_current_state >= 829 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 820 ); + while ( yy_current_state != 828 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -1947,13 +1956,13 @@ YY_DECL { if ( yy_act == 0 ) fprintf( stderr, "--scanner backing up\n" ); - else if ( yy_act < 208 ) + else if ( yy_act < 210 ) fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", (long)yy_rule_linenum[yy_act], yytext ); - else if ( yy_act == 208 ) + else if ( yy_act == 210 ) fprintf( stderr, "--accepting default rule (\"%s\")\n", yytext ); - else if ( yy_act == 209 ) + else if ( yy_act == 211 ) fprintf( stderr, "--(end of buffer or a NUL)\n" ); else fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); @@ -1972,7 +1981,7 @@ YY_DECL case 1: /* rule 1 can match eol */ YY_RULE_SETUP -#line 225 "pir.l" +#line 227 "pir.l" { /* only when the scanning starts, is this state used. Only a single * character is read, pushed back, and then, depending on the * lexer flags, either PASM or PIR mode (INITIAL state) is activated. @@ -1997,19 +2006,19 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 247 "pir.l" +#line 249 "pir.l" { /* ignore whitespace */ } YY_BREAK case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 249 "pir.l" +#line 251 "pir.l" { /* ignore line comments */ } YY_BREAK case 4: /* rule 4 can match eol */ YY_RULE_SETUP -#line 251 "pir.l" +#line 253 "pir.l" { /* a set of continuous newlines yields a single newline token. */ yylval->sval = "\n"; return TK_NL; @@ -2017,419 +2026,419 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 256 "pir.l" +#line 258 "pir.l" { return TK_ASSIGN_USHIFT; } YY_BREAK case 6: YY_RULE_SETUP -#line 257 "pir.l" +#line 259 "pir.l" { return TK_USHIFT; } YY_BREAK case 7: YY_RULE_SETUP -#line 258 "pir.l" +#line 260 "pir.l" { return TK_ASSIGN_RSHIFT; } YY_BREAK case 8: YY_RULE_SETUP -#line 259 "pir.l" +#line 261 "pir.l" { return TK_RSHIFT; } YY_BREAK case 9: YY_RULE_SETUP -#line 260 "pir.l" +#line 262 "pir.l" { return TK_LSHIFT; } YY_BREAK case 10: YY_RULE_SETUP -#line 261 "pir.l" +#line 263 "pir.l" { return TK_ARROW; } YY_BREAK case 11: YY_RULE_SETUP -#line 262 "pir.l" +#line 264 "pir.l" { return TK_EQ; } YY_BREAK case 12: YY_RULE_SETUP -#line 263 "pir.l" +#line 265 "pir.l" { return TK_NE; } YY_BREAK case 13: YY_RULE_SETUP -#line 264 "pir.l" +#line 266 "pir.l" { return TK_LE; } YY_BREAK case 14: YY_RULE_SETUP -#line 265 "pir.l" +#line 267 "pir.l" { return TK_GE; } YY_BREAK case 15: YY_RULE_SETUP -#line 266 "pir.l" +#line 268 "pir.l" { return TK_LT; } YY_BREAK case 16: YY_RULE_SETUP -#line 267 "pir.l" +#line 269 "pir.l" { return TK_GT; } YY_BREAK case 17: YY_RULE_SETUP -#line 269 "pir.l" +#line 271 "pir.l" { return TK_FDIV; } YY_BREAK case 18: YY_RULE_SETUP -#line 270 "pir.l" +#line 272 "pir.l" { return TK_AND; } YY_BREAK case 19: YY_RULE_SETUP -#line 271 "pir.l" +#line 273 "pir.l" { return TK_OR; } YY_BREAK case 20: YY_RULE_SETUP -#line 272 "pir.l" +#line 274 "pir.l" { return TK_XOR; } YY_BREAK case 21: YY_RULE_SETUP -#line 274 "pir.l" +#line 276 "pir.l" { return '+'; } YY_BREAK case 22: YY_RULE_SETUP -#line 275 "pir.l" +#line 277 "pir.l" { return '%'; } YY_BREAK case 23: YY_RULE_SETUP -#line 276 "pir.l" +#line 278 "pir.l" { return '*'; } YY_BREAK case 24: YY_RULE_SETUP -#line 277 "pir.l" +#line 279 "pir.l" { return '/'; } YY_BREAK case 25: YY_RULE_SETUP -#line 278 "pir.l" +#line 280 "pir.l" { return '!'; } YY_BREAK case 26: YY_RULE_SETUP -#line 279 "pir.l" +#line 281 "pir.l" { return '~'; } YY_BREAK case 27: YY_RULE_SETUP -#line 280 "pir.l" +#line 282 "pir.l" { return '-'; } YY_BREAK case 28: YY_RULE_SETUP -#line 281 "pir.l" +#line 283 "pir.l" { return '('; } YY_BREAK case 29: YY_RULE_SETUP -#line 282 "pir.l" +#line 284 "pir.l" { return ')'; } YY_BREAK case 30: YY_RULE_SETUP -#line 283 "pir.l" +#line 285 "pir.l" { return ','; } YY_BREAK case 31: YY_RULE_SETUP -#line 284 "pir.l" +#line 286 "pir.l" { return '['; } YY_BREAK case 32: YY_RULE_SETUP -#line 285 "pir.l" +#line 287 "pir.l" { return ']'; } YY_BREAK case 33: YY_RULE_SETUP -#line 287 "pir.l" +#line 289 "pir.l" { /* if the dot is surrounded by whitespace, it's a concatenation operator */ return TK_CONC; } YY_BREAK case 34: YY_RULE_SETUP -#line 292 "pir.l" +#line 294 "pir.l" { return '='; } YY_BREAK case 35: YY_RULE_SETUP -#line 293 "pir.l" +#line 295 "pir.l" { return ';'; } YY_BREAK case 36: YY_RULE_SETUP -#line 295 "pir.l" +#line 297 "pir.l" { return TK_ASSIGN_INC; } YY_BREAK case 37: YY_RULE_SETUP -#line 296 "pir.l" +#line 298 "pir.l" { return TK_ASSIGN_DEC; } YY_BREAK case 38: YY_RULE_SETUP -#line 297 "pir.l" +#line 299 "pir.l" { return TK_ASSIGN_DIV; } YY_BREAK case 39: YY_RULE_SETUP -#line 298 "pir.l" +#line 300 "pir.l" { return TK_ASSIGN_MUL; } YY_BREAK case 40: YY_RULE_SETUP -#line 299 "pir.l" +#line 301 "pir.l" { return TK_ASSIGN_MOD; } YY_BREAK case 41: YY_RULE_SETUP -#line 300 "pir.l" +#line 302 "pir.l" { return TK_ASSIGN_POW; } YY_BREAK case 42: YY_RULE_SETUP -#line 301 "pir.l" +#line 303 "pir.l" { return TK_ASSIGN_BOR; } YY_BREAK case 43: YY_RULE_SETUP -#line 302 "pir.l" +#line 304 "pir.l" { return TK_ASSIGN_BAND; } YY_BREAK case 44: YY_RULE_SETUP -#line 303 "pir.l" +#line 305 "pir.l" { return TK_ASSIGN_FDIV; } YY_BREAK case 45: YY_RULE_SETUP -#line 304 "pir.l" +#line 306 "pir.l" { return TK_ASSIGN_BNOT; } YY_BREAK case 46: YY_RULE_SETUP -#line 305 "pir.l" +#line 307 "pir.l" { return TK_ASSIGN_CONC; } YY_BREAK case 47: YY_RULE_SETUP -#line 307 "pir.l" +#line 309 "pir.l" { return TK_IF; } YY_BREAK case 48: YY_RULE_SETUP -#line 308 "pir.l" +#line 310 "pir.l" { return TK_GOTO; } YY_BREAK case 49: YY_RULE_SETUP -#line 309 "pir.l" +#line 311 "pir.l" { return TK_UNLESS; } YY_BREAK case 50: YY_RULE_SETUP -#line 310 "pir.l" +#line 312 "pir.l" { return TK_NULL; } YY_BREAK case 51: YY_RULE_SETUP -#line 312 "pir.l" +#line 314 "pir.l" { return TK_INT; } YY_BREAK case 52: YY_RULE_SETUP -#line 313 "pir.l" +#line 315 "pir.l" { return TK_NUM; } YY_BREAK case 53: YY_RULE_SETUP -#line 314 "pir.l" +#line 316 "pir.l" { return TK_PMC; } YY_BREAK case 54: YY_RULE_SETUP -#line 315 "pir.l" +#line 317 "pir.l" { return TK_STRING; } YY_BREAK case 55: YY_RULE_SETUP -#line 317 "pir.l" +#line 319 "pir.l" { return TK_ANNOTATE; } YY_BREAK case 56: YY_RULE_SETUP -#line 318 "pir.l" +#line 320 "pir.l" { return TK_SET_ARG; } YY_BREAK case 57: YY_RULE_SETUP -#line 319 "pir.l" +#line 321 "pir.l" { return TK_CONST; } YY_BREAK case 58: YY_RULE_SETUP -#line 320 "pir.l" +#line 322 "pir.l" { return TK_END; } YY_BREAK case 59: YY_RULE_SETUP -#line 321 "pir.l" +#line 323 "pir.l" { return TK_FILE; } YY_BREAK case 60: YY_RULE_SETUP -#line 323 "pir.l" +#line 325 "pir.l" { return TK_GET_RESULTS; } YY_BREAK case 61: YY_RULE_SETUP -#line 324 "pir.l" +#line 326 "pir.l" { return TK_GLOBALCONST; } YY_BREAK case 62: YY_RULE_SETUP -#line 325 "pir.l" +#line 327 "pir.l" { return TK_HLL; } YY_BREAK case 63: YY_RULE_SETUP -#line 326 "pir.l" +#line 328 "pir.l" { return TK_HLL_MAP; } YY_BREAK case 64: YY_RULE_SETUP -#line 327 "pir.l" +#line 329 "pir.l" { return TK_INVOCANT; } YY_BREAK case 65: YY_RULE_SETUP -#line 328 "pir.l" +#line 330 "pir.l" { return TK_LEX; } YY_BREAK case 66: YY_RULE_SETUP -#line 329 "pir.l" +#line 331 "pir.l" { return TK_LINE; } YY_BREAK case 67: YY_RULE_SETUP -#line 330 "pir.l" +#line 332 "pir.l" { return TK_LOADLIB; } YY_BREAK case 68: YY_RULE_SETUP -#line 331 "pir.l" +#line 333 "pir.l" { return TK_LOCAL; } YY_BREAK case 69: YY_RULE_SETUP -#line 333 "pir.l" +#line 335 "pir.l" { return TK_METH_CALL; } YY_BREAK case 70: YY_RULE_SETUP -#line 334 "pir.l" +#line 336 "pir.l" { return TK_NAMESPACE; } YY_BREAK case 71: YY_RULE_SETUP -#line 335 "pir.l" +#line 337 "pir.l" { return TK_NCI_CALL; } YY_BREAK case 72: YY_RULE_SETUP -#line 336 "pir.l" +#line 338 "pir.l" { return TK_PARAM; } YY_BREAK case 73: YY_RULE_SETUP -#line 337 "pir.l" +#line 339 "pir.l" { return TK_BEGIN_CALL; } YY_BREAK case 74: YY_RULE_SETUP -#line 338 "pir.l" +#line 340 "pir.l" { return TK_BEGIN_RETURN; } YY_BREAK case 75: YY_RULE_SETUP -#line 339 "pir.l" +#line 341 "pir.l" { return TK_BEGIN_YIELD; } YY_BREAK case 76: YY_RULE_SETUP -#line 340 "pir.l" +#line 342 "pir.l" { return TK_CALL; } YY_BREAK case 77: YY_RULE_SETUP -#line 341 "pir.l" +#line 343 "pir.l" { return TK_END_CALL; } YY_BREAK case 78: YY_RULE_SETUP -#line 342 "pir.l" +#line 344 "pir.l" { return TK_END_RETURN; } YY_BREAK case 79: YY_RULE_SETUP -#line 343 "pir.l" +#line 345 "pir.l" { return TK_END_YIELD; } YY_BREAK case 80: YY_RULE_SETUP -#line 344 "pir.l" +#line 346 "pir.l" { return TK_GET_RESULT; } YY_BREAK case 81: YY_RULE_SETUP -#line 345 "pir.l" +#line 347 "pir.l" { return TK_RETURN; } YY_BREAK case 82: YY_RULE_SETUP -#line 346 "pir.l" +#line 348 "pir.l" { return TK_SUB; } YY_BREAK case 83: YY_RULE_SETUP -#line 347 "pir.l" +#line 349 "pir.l" { return TK_YIELD; } YY_BREAK case 84: YY_RULE_SETUP -#line 348 "pir.l" +#line 350 "pir.l" { return TK_SET_RETURN; } YY_BREAK case 85: YY_RULE_SETUP -#line 349 "pir.l" +#line 351 "pir.l" { return TK_SET_YIELD; } YY_BREAK case 86: YY_RULE_SETUP -#line 350 "pir.l" +#line 352 "pir.l" { return TK_TAILCALL; } YY_BREAK case 87: YY_RULE_SETUP -#line 353 "pir.l" +#line 355 "pir.l" { /* make sure these are not used outside macro defs */ yypirerror(yyscanner, yypirget_extra(yyscanner), "cannot use '%s' outside of macro definitions", yytext); @@ -2437,128 +2446,153 @@ YY_RULE_SETUP YY_BREAK case 88: YY_RULE_SETUP -#line 360 "pir.l" +#line 362 "pir.l" { return TK_FLAG_ANON; } YY_BREAK case 89: YY_RULE_SETUP -#line 361 "pir.l" +#line 363 "pir.l" { return TK_FLAG_INIT; } YY_BREAK case 90: YY_RULE_SETUP -#line 362 "pir.l" +#line 364 "pir.l" { return TK_FLAG_LOAD; } YY_BREAK case 91: YY_RULE_SETUP -#line 363 "pir.l" +#line 365 "pir.l" { return TK_FLAG_POSTCOMP; } YY_BREAK case 92: YY_RULE_SETUP -#line 364 "pir.l" +#line 366 "pir.l" { return TK_FLAG_IMMEDIATE; } YY_BREAK case 93: YY_RULE_SETUP -#line 365 "pir.l" +#line 367 "pir.l" { return TK_FLAG_MAIN; } YY_BREAK case 94: YY_RULE_SETUP -#line 366 "pir.l" +#line 368 "pir.l" { return TK_FLAG_METHOD; } YY_BREAK case 95: YY_RULE_SETUP -#line 367 "pir.l" +#line 369 "pir.l" { return TK_FLAG_LEX; } YY_BREAK case 96: YY_RULE_SETUP -#line 368 "pir.l" +#line 370 "pir.l" { return TK_FLAG_OUTER; } YY_BREAK case 97: YY_RULE_SETUP -#line 369 "pir.l" +#line 371 "pir.l" { return TK_FLAG_VTABLE; } YY_BREAK case 98: YY_RULE_SETUP -#line 370 "pir.l" +#line 372 "pir.l" { return TK_FLAG_MULTI; } YY_BREAK case 99: YY_RULE_SETUP -#line 371 "pir.l" +#line 373 "pir.l" { return TK_FLAG_SUBID; } YY_BREAK case 100: YY_RULE_SETUP -#line 372 "pir.l" +#line 374 "pir.l" { return TK_FLAG_INSTANCEOF; } YY_BREAK case 101: YY_RULE_SETUP -#line 373 "pir.l" +#line 375 "pir.l" { return TK_FLAG_NSENTRY; } YY_BREAK case 102: YY_RULE_SETUP -#line 375 "pir.l" +#line 377 "pir.l" { return TK_FLAG_UNIQUE_REG; } YY_BREAK case 103: YY_RULE_SETUP -#line 376 "pir.l" +#line 378 "pir.l" { return TK_FLAG_OPTIONAL; } YY_BREAK case 104: YY_RULE_SETUP -#line 377 "pir.l" +#line 379 "pir.l" { return TK_FLAG_OPT_FLAG; } YY_BREAK case 105: YY_RULE_SETUP -#line 378 "pir.l" +#line 380 "pir.l" { return TK_FLAG_SLURPY; } YY_BREAK case 106: YY_RULE_SETUP -#line 379 "pir.l" +#line 381 "pir.l" { return TK_FLAG_NAMED; } YY_BREAK case 107: YY_RULE_SETUP -#line 380 "pir.l" +#line 382 "pir.l" { return TK_FLAG_FLAT; } YY_BREAK case 108: YY_RULE_SETUP -#line 381 "pir.l" +#line 383 "pir.l" { return TK_FLAG_INVOCANT; } YY_BREAK case 109: YY_RULE_SETUP -#line 383 "pir.l" +#line 384 "pir.l" +{ return TK_FLAG_LOOKAHEAD; } + YY_BREAK +case 110: +YY_RULE_SETUP +#line 386 "pir.l" { yypirerror(yyscanner, yypirget_extra(yyscanner), "unrecognized flag: '%s'", yytext); } YY_BREAK -case 110: +case 111: YY_RULE_SETUP -#line 388 "pir.l" +#line 390 "pir.l" +{ /* XXX this is a bit hacky. First the string is unescaped, but that + * returns a STRING * object; that's not what we want at this point. + * So, convert it back to a C string, and return that. Later, that + * string is converted into a STRING again, so this must be fixed. + * Preferably there would be an unescape function returning a C-string. + */ + lexer_state * const lexer = yypirget_extra(yyscanner); + + STRING *pstr = string_unescape_cstring(lexer->interp, + yytext + 1, '"', "ascii"); + + char *str = string_to_cstring(lexer->interp, pstr); + + yylval->sval = str; + return TK_STRINGC; + } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 407 "pir.l" { /* copy the string, remove the quotes. */ yylval->sval = dupstrn(yypirget_extra(yyscanner), yytext + 1, yyleng - 2); return TK_STRINGC; } YY_BREAK -case 111: +case 113: YY_RULE_SETUP -#line 393 "pir.l" -{ +#line 412 "pir.l" +{ /* XXX these double-quoted strings are not unescaped (yet) */ /* parse yytext, which contains the charset, a ':', and the quoted string */ char *colon = strchr(yytext, ':'); lexer_state *lexer = yypirget_extra(yyscanner); @@ -2587,10 +2621,10 @@ YY_RULE_SETUP return TK_USTRINGC; } YY_BREAK -case 112: +case 114: YY_RULE_SETUP -#line 422 "pir.l" -{ +#line 441 "pir.l" +{ /* XXX these double-quoted strings are not unescaped (yet) */ /* parse yytext, which contains the encoding, a ':', a charset, * a ':', and the quoted string */ @@ -2637,37 +2671,37 @@ YY_RULE_SETUP } YY_BREAK -case 113: +case 115: YY_RULE_SETUP -#line 470 "pir.l" +#line 489 "pir.l" { yylval->ival = atoi(yytext + 2); return TK_PREG; } YY_BREAK -case 114: +case 116: YY_RULE_SETUP -#line 471 "pir.l" +#line 490 "pir.l" { yylval->ival = atoi(yytext + 2); return TK_SREG; } YY_BREAK -case 115: +case 117: YY_RULE_SETUP -#line 472 "pir.l" +#line 491 "pir.l" { yylval->ival = atoi(yytext + 2); return TK_NREG; } YY_BREAK -case 116: +case 118: YY_RULE_SETUP -#line 473 "pir.l" +#line 492 "pir.l" { yylval->ival = atoi(yytext + 2); return TK_IREG; } YY_BREAK -case 117: +case 119: YY_RULE_SETUP -#line 475 "pir.l" +#line 494 "pir.l" { /* make the label Id available in the parser. remove the ":" first. */ yylval->sval = dupstrn(yypirget_extra(yyscanner), yytext, yyleng - 1); return TK_LABEL; } YY_BREAK -case 118: +case 120: YY_RULE_SETUP -#line 480 "pir.l" +#line 499 "pir.l" { /* give a warning when using PASM registers as PIR identifiers */ lexer_state * const lexer = yypirget_extra(yyscanner); @@ -2680,9 +2714,9 @@ YY_RULE_SETUP return TK_IDENT; } YY_BREAK -case 119: +case 121: YY_RULE_SETUP -#line 492 "pir.l" +#line 511 "pir.l" { /* identifier; can be a global (sub or const), local or parrot op */ lexer_state * const lexer = yypirget_extra(yyscanner); constdecl * const c = find_global_constant(lexer, yytext); @@ -2711,37 +2745,37 @@ YY_RULE_SETUP return TK_IDENT; } YY_BREAK -case 120: +case 122: YY_RULE_SETUP -#line 520 "pir.l" +#line 539 "pir.l" { yylval->dval = atof(yytext); return TK_NUMC; } YY_BREAK -case 121: +case 123: YY_RULE_SETUP -#line 521 "pir.l" +#line 540 "pir.l" { yylval->ival = atoi(yytext); return TK_INTC; } YY_BREAK -case 122: +case 124: YY_RULE_SETUP -#line 522 "pir.l" +#line 541 "pir.l" { yylval->ival = atoi(yytext); return TK_INTC; } YY_BREAK -case 123: +case 125: YY_RULE_SETUP -#line 523 "pir.l" +#line 542 "pir.l" { yylval->ival = atoi(yytext); return TK_INTC; } YY_BREAK -case 124: +case 126: YY_RULE_SETUP -#line 524 "pir.l" +#line 543 "pir.l" { yylval->ival = atoi(yytext); return TK_INTC; } YY_BREAK -case 125: +case 127: *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ yyg->yy_c_buf_p = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 526 "pir.l" +#line 545 "pir.l" { /* Make sure the dot is followed by a character that * starts a method object. $ for registers, * quotes for quoted strings, and letters for identifiers. @@ -2750,10 +2784,10 @@ YY_RULE_SETUP return '.'; } YY_BREAK -case 126: -/* rule 126 can match eol */ +case 128: +/* rule 128 can match eol */ YY_RULE_SETUP -#line 534 "pir.l" +#line 553 "pir.l" { yypirerror(yyscanner, yypirget_extra(yyscanner), "no space allowed before a methodcall dot, " "or space expected after the '.' operator"); @@ -2776,7 +2810,7 @@ YY_RULE_SETUP case YY_STATE_EOF(SCANSTR): -#line 556 "pir.l" +#line 575 "pir.l" { /* switch back from .macro_const buffer to file. */ lexer_state * const lexer = yypirget_extra(yyscanner); yy_pop_state(yyscanner); @@ -2784,7 +2818,7 @@ case YY_STATE_EOF(SCANSTR): } YY_BREAK case YY_STATE_EOF(SCANMACRO): -#line 562 "pir.l" +#line 581 "pir.l" { /* override the default <> action; go back to normal state and * switch back to the saved file. */ @@ -2808,9 +2842,9 @@ case YY_STATE_EOF(SCANMACRO): } YY_BREAK -case 127: +case 129: YY_RULE_SETUP -#line 585 "pir.l" +#line 604 "pir.l" { /* when scanning a macro body, the @ marker indicates the {IDENT} must * be munged. */ @@ -2821,14 +2855,14 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(INITIAL): -#line 594 "pir.l" +#line 613 "pir.l" { /* end of file, stop scanning. */ yyterminate(); } YY_BREAK -case 128: +case 130: YY_RULE_SETUP -#line 598 "pir.l" +#line 617 "pir.l" { /* any character not covered in the rules above is an error. */ yypirerror(yyscanner, yypirget_extra(yyscanner), "unexpected character: '%c'", yytext[0]); @@ -2847,25 +2881,25 @@ YY_RULE_SETUP /********************** .macro_const ****************************************/ -case 129: +case 131: YY_RULE_SETUP -#line 620 "pir.l" +#line 639 "pir.l" { yy_push_state(MACROCONST, yyscanner); return TK_MACRO_CONST; } YY_BREAK -case 130: +case 132: YY_RULE_SETUP -#line 625 "pir.l" +#line 644 "pir.l" { yylval->sval = dupstr(yypirget_extra(yyscanner), yytext); return TK_IDENT; } YY_BREAK -case 131: +case 133: YY_RULE_SETUP -#line 630 "pir.l" +#line 649 "pir.l" { /* only these tokens can be macro constant values */ yylval->sval = dupstr(yypirget_extra(yyscanner), yytext); @@ -2873,21 +2907,21 @@ YY_RULE_SETUP return TK_MACRO_CONST_VAL; } YY_BREAK -case 132: +case 134: YY_RULE_SETUP -#line 637 "pir.l" +#line 656 "pir.l" { /* ignore whitespace */ } YY_BREAK -case 133: +case 135: YY_RULE_SETUP -#line 638 "pir.l" +#line 657 "pir.l" { yypirerror(yyscanner, yypirget_extra(yyscanner), "unknown character: '%c'", yytext[0]); } YY_BREAK case YY_STATE_EOF(MACROCONST): -#line 642 "pir.l" +#line 661 "pir.l" { yypirerror(yyscanner, yypirget_extra(yyscanner), "read end of file during .macro_const definition"); @@ -2898,46 +2932,46 @@ case YY_STATE_EOF(MACROCONST): /**************** macro header (.macro ) ***************/ -case 134: +case 136: YY_RULE_SETUP -#line 653 "pir.l" +#line 672 "pir.l" { /* start a macro definition */ yy_push_state(MACROHEAD, yyscanner); return TK_MACRO; } YY_BREAK -case 135: +case 137: YY_RULE_SETUP -#line 658 "pir.l" +#line 677 "pir.l" { /* ignore whitespace */ } YY_BREAK -case 136: +case 138: YY_RULE_SETUP -#line 659 "pir.l" +#line 678 "pir.l" { yylval->sval = dupstr(yypirget_extra(yyscanner), yytext); return TK_IDENT; } YY_BREAK -case 137: +case 139: YY_RULE_SETUP -#line 664 "pir.l" +#line 683 "pir.l" { return '('; } YY_BREAK -case 138: +case 140: YY_RULE_SETUP -#line 665 "pir.l" +#line 684 "pir.l" { return ')'; } YY_BREAK -case 139: +case 141: YY_RULE_SETUP -#line 666 "pir.l" +#line 685 "pir.l" { return ','; } YY_BREAK -case 140: -/* rule 140 can match eol */ +case 142: +/* rule 142 can match eol */ YY_RULE_SETUP -#line 668 "pir.l" +#line 687 "pir.l" { /* a set of continuous newlines yields a single newline token. */ yy_pop_state(yyscanner); /* remove MACROHEAD state */ yy_push_state(MACROBODY, yyscanner); /* enter MACROBODY state */ @@ -2953,9 +2987,9 @@ YY_RULE_SETUP */ -case 141: +case 143: YY_RULE_SETUP -#line 684 "pir.l" +#line 703 "pir.l" { /* .foo; it can be a macro, macro_local, or just $P0.foo(), * but we need to check that. */ @@ -3010,9 +3044,9 @@ YY_RULE_SETUP } } YY_BREAK -case 142: +case 144: YY_RULE_SETUP -#line 738 "pir.l" +#line 757 "pir.l" { /* expand a .macro_const or parameter in argument list */ lexer_state * const lexer = yypirget_extra(yyscanner); macro_def * const macro = find_macro(lexer->macros, yytext + 1); @@ -3041,80 +3075,80 @@ YY_RULE_SETUP yypirerror(yyscanner, lexer, "'%s' is not a macro", yytext + 1); } YY_BREAK -case 143: +case 145: YY_RULE_SETUP -#line 766 "pir.l" +#line 785 "pir.l" { yylval->sval = dupstr(yypirget_extra(yyscanner), yytext); return TK_MACRO_ARG_IDENT; } YY_BREAK -case 144: +case 146: YY_RULE_SETUP -#line 771 "pir.l" +#line 790 "pir.l" { yylval->sval = dupstr(yypirget_extra(yyscanner), yytext); return TK_MACRO_ARG_OTHER; } YY_BREAK -case 145: +case 147: YY_RULE_SETUP -#line 776 "pir.l" +#line 795 "pir.l" { /* ignore whitespace */ } YY_BREAK -case 146: +case 148: YY_RULE_SETUP -#line 777 "pir.l" +#line 796 "pir.l" { return ','; } YY_BREAK -case 147: +case 149: YY_RULE_SETUP -#line 778 "pir.l" +#line 797 "pir.l" { return '('; } YY_BREAK -case 148: +case 150: YY_RULE_SETUP -#line 779 "pir.l" +#line 798 "pir.l" { yy_pop_state(yyscanner); /* leave MACROEXPAND state */ return ')'; } YY_BREAK -case 149: +case 151: YY_RULE_SETUP -#line 784 "pir.l" +#line 803 "pir.l" { yylval->sval = dupstr(yypirget_extra(yyscanner), yytext); return TK_MACRO_ARG_OTHER; } YY_BREAK case YY_STATE_EOF(STRINGEXPAND): -#line 789 "pir.l" +#line 808 "pir.l" { lexer_state * const lexer = yypirget_extra(yyscanner); yy_pop_state(yyscanner); yypir_switch_to_buffer(lexer->buffer,yyscanner); } YY_BREAK -case 150: +case 152: YY_RULE_SETUP -#line 795 "pir.l" +#line 814 "pir.l" { return '{'; } YY_BREAK -case 151: +case 153: YY_RULE_SETUP -#line 796 "pir.l" +#line 815 "pir.l" { return '}'; } YY_BREAK -case 152: -/* rule 152 can match eol */ +case 154: +/* rule 154 can match eol */ YY_RULE_SETUP -#line 798 "pir.l" +#line 817 "pir.l" { yylval->sval = "\n"; return TK_NL; } YY_BREAK -case 153: +case 155: YY_RULE_SETUP -#line 800 "pir.l" +#line 819 "pir.l" { yypirerror(yyscanner, yypirget_extra(yyscanner), "unknown character in macro expansion: %c", yytext[0]); } @@ -3124,9 +3158,9 @@ YY_RULE_SETUP /******************************** .macro_local *****************************/ -case 154: +case 156: YY_RULE_SETUP -#line 811 "pir.l" +#line 830 "pir.l" { /* give a warning if the right flag is set */ /* lexer_state * const lexer = yypirget_extra(yyscanner); @@ -3140,37 +3174,37 @@ YY_RULE_SETUP */ } YY_BREAK -case 155: +case 157: YY_RULE_SETUP -#line 825 "pir.l" +#line 844 "pir.l" { yy_push_state(MACROLOCAL, yyscanner); return TK_MACRO_LOCAL; } YY_BREAK -case 156: +case 158: YY_RULE_SETUP -#line 830 "pir.l" +#line 849 "pir.l" { return TK_INT; } YY_BREAK -case 157: +case 159: YY_RULE_SETUP -#line 831 "pir.l" +#line 850 "pir.l" { return TK_PMC; } YY_BREAK -case 158: +case 160: YY_RULE_SETUP -#line 832 "pir.l" +#line 851 "pir.l" { return TK_NUM; } YY_BREAK -case 159: +case 161: YY_RULE_SETUP -#line 833 "pir.l" +#line 852 "pir.l" { return TK_STRING; } YY_BREAK -case 160: +case 162: YY_RULE_SETUP -#line 835 "pir.l" +#line 854 "pir.l" { /* normal .macro_local */ lexer_state * const lexer = yypirget_extra(yyscanner); /* reserve space for {IDENT}, the @ marker and the NULL char. */ @@ -3186,9 +3220,9 @@ YY_RULE_SETUP return TK_MACRO_LOCAL_ID; } YY_BREAK -case 161: +case 163: YY_RULE_SETUP -#line 850 "pir.l" +#line 869 "pir.l" { /* declare a .macro_local based on a parameter */ lexer_state * const lexer = yypirget_extra(yyscanner); @@ -3203,9 +3237,9 @@ YY_RULE_SETUP } YY_BREAK -case 162: +case 164: YY_RULE_SETUP -#line 864 "pir.l" +#line 883 "pir.l" { /* .$foo */ lexer_state * const lexer = yypirget_extra(yyscanner); macro_table * const table = peek_macro_table(lexer); @@ -3235,9 +3269,9 @@ YY_RULE_SETUP } YY_BREAK -case 163: +case 165: YY_RULE_SETUP -#line 893 "pir.l" +#line 912 "pir.l" { /* expanding a .macro_local using a macro parameter value */ lexer_state * const lexer = yypirget_extra(yyscanner); char const * const paramname = dupstrn(lexer, yytext + 1, yyleng - 2); @@ -3263,23 +3297,23 @@ YY_RULE_SETUP return TK_IDENT; } YY_BREAK -case 164: +case 166: YY_RULE_SETUP -#line 918 "pir.l" +#line 937 "pir.l" { /* ignore whitespace */ } YY_BREAK -case 165: -/* rule 165 can match eol */ +case 167: +/* rule 167 can match eol */ YY_RULE_SETUP -#line 920 "pir.l" +#line 939 "pir.l" { /* newline after .macro_local line */ yy_pop_state(yyscanner); return TK_NL; } YY_BREAK -case 166: +case 168: YY_RULE_SETUP -#line 925 "pir.l" +#line 944 "pir.l" { /* this state is only used for declaring .macro_locals */ yypirerror(yyscanner, yypirget_extra(yyscanner), "unknown character '%c' when declaring .macro_local", yytext[0]); @@ -3290,17 +3324,17 @@ YY_RULE_SETUP /****************************** .macro_label ********************************/ -case 167: +case 169: YY_RULE_SETUP -#line 935 "pir.l" +#line 954 "pir.l" { yy_push_state(MACROLABEL, yyscanner); return TK_MACRO_LABEL; } YY_BREAK -case 168: +case 170: YY_RULE_SETUP -#line 940 "pir.l" +#line 959 "pir.l" { /* if the "$" is there, it's a macro label using a macro * parameter's value; otherwise it's a normal macro label */ @@ -3318,18 +3352,18 @@ YY_RULE_SETUP return TK_MACRO_LABEL_ID; } YY_BREAK -case 169: -/* rule 169 can match eol */ +case 171: +/* rule 171 can match eol */ YY_RULE_SETUP -#line 958 "pir.l" +#line 977 "pir.l" { /* the newline character after a ".macro_label $foo:" declaration */ yy_pop_state(yyscanner); /* leave MACROLABEL state */ return TK_NL; } YY_BREAK -case 170: +case 172: YY_RULE_SETUP -#line 964 "pir.l" +#line 983 "pir.l" { /* scan a label when expanding a buffer; declared as .macro_label */ lexer_state * const lexer = yypirget_extra(yyscanner); char const * const label = dupstrn(lexer, yytext, yyleng - 2); @@ -3337,9 +3371,9 @@ YY_RULE_SETUP return TK_LABEL; } YY_BREAK -case 171: +case 173: YY_RULE_SETUP -#line 971 "pir.l" +#line 990 "pir.l" { /* scan a label when expanding macro; was a macro parameter */ lexer_state * const lexer = yypirget_extra(yyscanner); char const * const paramname = dupstrn(lexer, yytext + 1, yyleng - 3); @@ -3371,29 +3405,29 @@ YY_RULE_SETUP /*************************** macro body scanning (storing) ****************************/ -case 172: -/* rule 172 can match eol */ +case 174: +/* rule 174 can match eol */ YY_RULE_SETUP -#line 1004 "pir.l" +#line 1023 "pir.l" { store_macro_char(CURRENT_MACRO(yypirget_extra(yyscanner)), '\n'); } YY_BREAK -case 173: +case 175: YY_RULE_SETUP -#line 1006 "pir.l" +#line 1025 "pir.l" { yy_pop_state(yyscanner); /* leave MACROBODY state */ return TK_ENDM; } YY_BREAK -case 174: +case 176: YY_RULE_SETUP -#line 1011 "pir.l" +#line 1030 "pir.l" { /* store everything else */ store_macro_char(CURRENT_MACRO(yypirget_extra(yyscanner)), yytext[0]); } YY_BREAK case YY_STATE_EOF(MACROBODY): -#line 1015 "pir.l" +#line 1034 "pir.l" { /* catch run-away macro bodys */ yypirerror(yyscanner, yypirget_extra(yyscanner), "read end of file while reading macro body"); @@ -3423,95 +3457,95 @@ case YY_STATE_EOF(MACROBODY): * This becomes unmanageable */ -case 175: +case 177: YY_RULE_SETUP -#line 1047 "pir.l" +#line 1066 "pir.l" { return ','; } YY_BREAK -case 176: +case 178: YY_RULE_SETUP -#line 1048 "pir.l" +#line 1067 "pir.l" { return '['; } YY_BREAK -case 177: +case 179: YY_RULE_SETUP -#line 1049 "pir.l" +#line 1068 "pir.l" { return ']'; } YY_BREAK -case 178: +case 180: YY_RULE_SETUP -#line 1051 "pir.l" +#line 1070 "pir.l" { return TK_FLAG_MAIN; } YY_BREAK -case 179: +case 181: YY_RULE_SETUP -#line 1052 "pir.l" +#line 1071 "pir.l" { return TK_FLAG_LOAD; } YY_BREAK -case 180: +case 182: YY_RULE_SETUP -#line 1053 "pir.l" +#line 1072 "pir.l" { return TK_FLAG_INIT; } YY_BREAK -case 181: +case 183: YY_RULE_SETUP -#line 1054 "pir.l" +#line 1073 "pir.l" { return TK_FLAG_ANON; } YY_BREAK -case 182: +case 184: YY_RULE_SETUP -#line 1055 "pir.l" +#line 1074 "pir.l" { return TK_FLAG_POSTCOMP; } YY_BREAK -case 183: +case 185: YY_RULE_SETUP -#line 1056 "pir.l" +#line 1075 "pir.l" { return TK_FLAG_IMMEDIATE; } YY_BREAK -case 184: +case 186: YY_RULE_SETUP -#line 1058 "pir.l" +#line 1077 "pir.l" { return TK_PCC_SUB; } YY_BREAK -case 185: +case 187: YY_RULE_SETUP -#line 1059 "pir.l" +#line 1078 "pir.l" { return TK_LEX; } YY_BREAK -case 186: +case 188: YY_RULE_SETUP -#line 1060 "pir.l" +#line 1079 "pir.l" { return TK_NAMESPACE; } YY_BREAK -case 187: +case 189: YY_RULE_SETUP -#line 1062 "pir.l" +#line 1081 "pir.l" { yy_push_state(MACROHEAD, yyscanner); return TK_MACRO; } YY_BREAK -case 188: +case 190: YY_RULE_SETUP -#line 1067 "pir.l" +#line 1086 "pir.l" { yy_push_state(MACROCONST, yyscanner); return TK_MACRO_CONST; } YY_BREAK -case 189: +case 191: YY_RULE_SETUP -#line 1072 "pir.l" +#line 1091 "pir.l" { return TK_LINE; } YY_BREAK -case 190: +case 192: YY_RULE_SETUP -#line 1073 "pir.l" +#line 1092 "pir.l" { return TK_FILE; } YY_BREAK -case 191: +case 193: YY_RULE_SETUP -#line 1076 "pir.l" +#line 1095 "pir.l" { /* macro expansion in PASM mode. */ lexer_state * const lexer = yypirget_extra(yyscanner); macro_def * const macro = find_macro(lexer->macros, yytext + 1); @@ -3546,110 +3580,110 @@ YY_RULE_SETUP } } YY_BREAK -case 192: +case 194: YY_RULE_SETUP -#line 1110 "pir.l" +#line 1129 "pir.l" { /* a label in PASM */ yylval->sval = dupstrn(yypirget_extra(yyscanner), yytext, yyleng - 1); return TK_LABEL; } YY_BREAK -case 193: +case 195: YY_RULE_SETUP -#line 1115 "pir.l" +#line 1134 "pir.l" { yypirerror(yyscanner, yypirget_extra(yyscanner), "symbolic registers are not allowed in PASM mode"); } YY_BREAK -case 194: +case 196: YY_RULE_SETUP -#line 1118 "pir.l" +#line 1137 "pir.l" { yylval->ival = atoi(yytext + 1); return TK_PREG; } YY_BREAK -case 195: +case 197: YY_RULE_SETUP -#line 1119 "pir.l" +#line 1138 "pir.l" { yylval->ival = atoi(yytext + 1); return TK_NREG; } YY_BREAK -case 196: +case 198: YY_RULE_SETUP -#line 1120 "pir.l" +#line 1139 "pir.l" { yylval->ival = atoi(yytext + 1); return TK_IREG; } YY_BREAK -case 197: +case 199: YY_RULE_SETUP -#line 1121 "pir.l" +#line 1140 "pir.l" { yylval->ival = atoi(yytext + 1); return TK_SREG; } YY_BREAK -case 198: +case 200: YY_RULE_SETUP -#line 1123 "pir.l" +#line 1142 "pir.l" { /* can be a parrot op or a label; the check is done in the parser. */ yylval->sval = dupstr(yypirget_extra(yyscanner), yytext); return TK_IDENT; } YY_BREAK -case 199: +case 201: YY_RULE_SETUP -#line 1128 "pir.l" +#line 1147 "pir.l" { yylval->dval = atof(yytext); return TK_NUMC; } YY_BREAK -case 200: +case 202: YY_RULE_SETUP -#line 1129 "pir.l" +#line 1148 "pir.l" { yylval->ival = atoi(yytext); return TK_INTC; } YY_BREAK -case 201: +case 203: YY_RULE_SETUP -#line 1130 "pir.l" +#line 1149 "pir.l" { yylval->ival = atoi(yytext); return TK_INTC; } YY_BREAK -case 202: +case 204: YY_RULE_SETUP -#line 1131 "pir.l" +#line 1150 "pir.l" { yylval->ival = atoi(yytext); return TK_INTC; } YY_BREAK -case 203: +case 205: YY_RULE_SETUP -#line 1132 "pir.l" +#line 1151 "pir.l" { yylval->ival = atoi(yytext); return TK_INTC; } YY_BREAK -case 204: +case 206: YY_RULE_SETUP -#line 1134 "pir.l" +#line 1153 "pir.l" { /* copy the string, remove the quotes. */ yylval->sval = dupstrn(yypirget_extra(yyscanner), yytext + 1, yyleng - 2); return TK_STRINGC; } YY_BREAK -case 205: +case 207: YY_RULE_SETUP -#line 1139 "pir.l" +#line 1158 "pir.l" { /* ignore whitespace */ } YY_BREAK -case 206: -/* rule 206 can match eol */ +case 208: +/* rule 208 can match eol */ YY_RULE_SETUP -#line 1141 "pir.l" +#line 1160 "pir.l" { return TK_NL; } YY_BREAK -case 207: +case 209: YY_RULE_SETUP -#line 1143 "pir.l" +#line 1162 "pir.l" { yypirerror(yyscanner, yypirget_extra(yyscanner), "unrecognized character: %c", yytext[0]); } YY_BREAK case YY_STATE_EOF(PASM): -#line 1146 "pir.l" +#line 1165 "pir.l" { yyterminate(); } YY_BREAK -case 208: +case 210: YY_RULE_SETUP -#line 1148 "pir.l" +#line 1167 "pir.l" ECHO; YY_BREAK -#line 3653 "pirlexer.c" +#line 3687 "pirlexer.c" case YY_STATE_EOF(MACROHEAD): case YY_STATE_EOF(MACROLOCAL): case YY_STATE_EOF(MACROLABEL): @@ -3961,7 +3995,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 821 ) + if ( yy_current_state >= 829 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -3995,11 +4029,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 821 ) + if ( yy_current_state >= 829 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 820); + yy_is_jam = (yy_current_state == 828); return yy_is_jam ? 0 : yy_current_state; } @@ -4903,7 +4937,7 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) /* %ok-for-header */ -#line 1148 "pir.l" +#line 1167 "pir.l" diff --git a/compilers/pirc/src/pirlexer.h b/compilers/pirc/src/pirlexer.h index a06debb5eb..37e1fca104 100644 --- a/compilers/pirc/src/pirlexer.h +++ b/compilers/pirc/src/pirlexer.h @@ -492,7 +492,7 @@ extern int yypirlex (YYSTYPE * yylval_param ,yyscan_t yyscanner); #undef YY_DECL #endif -#line 1148 "pir.l" +#line 1167 "pir.l" #line 499 "pirlexer.h" diff --git a/compilers/pirc/src/pirop.c b/compilers/pirc/src/pirop.c index c96dc2c98d..caacf5f230 100644 --- a/compilers/pirc/src/pirop.c +++ b/compilers/pirc/src/pirop.c @@ -13,6 +13,8 @@ =head1 DESCRIPTION +This file contains functions related to opcodes. + =head1 FUNCTIONS =over 4 diff --git a/compilers/pirc/src/pirparser.c b/compilers/pirc/src/pirparser.c index 7225c34988..8098d8b85b 100644 --- a/compilers/pirc/src/pirparser.c +++ b/compilers/pirc/src/pirparser.c @@ -175,21 +175,22 @@ TK_FLAG_OPTIONAL = 356, TK_FLAG_OPT_FLAG = 357, TK_FLAG_INVOCANT = 358, - TK_MACRO = 359, - TK_ENDM = 360, - TK_MACRO_LOCAL = 361, - TK_MACRO_LABEL = 362, - TK_MACRO_CONST = 363, - TK_MACRO_LABEL_ID = 364, - TK_MACRO_LOCAL_ID = 365, - TK_MACRO_IDENT = 366, - TK_MACRO_ARG_IDENT = 367, - TK_MACRO_ARG_OTHER = 368, - TK_MACRO_CONST_VAL = 369, - TK_PASM_MARKER_START = 370, - TK_PIR_MARKER_START = 371, - TK_PCC_SUB = 372, - TK_PARROT_OP = 373 + TK_FLAG_LOOKAHEAD = 359, + TK_MACRO = 360, + TK_ENDM = 361, + TK_MACRO_LOCAL = 362, + TK_MACRO_LABEL = 363, + TK_MACRO_CONST = 364, + TK_MACRO_LABEL_ID = 365, + TK_MACRO_LOCAL_ID = 366, + TK_MACRO_IDENT = 367, + TK_MACRO_ARG_IDENT = 368, + TK_MACRO_ARG_OTHER = 369, + TK_MACRO_CONST_VAL = 370, + TK_PASM_MARKER_START = 371, + TK_PIR_MARKER_START = 372, + TK_PCC_SUB = 373, + TK_PARROT_OP = 374 }; #endif /* Tokens. */ @@ -294,21 +295,22 @@ #define TK_FLAG_OPTIONAL 356 #define TK_FLAG_OPT_FLAG 357 #define TK_FLAG_INVOCANT 358 -#define TK_MACRO 359 -#define TK_ENDM 360 -#define TK_MACRO_LOCAL 361 -#define TK_MACRO_LABEL 362 -#define TK_MACRO_CONST 363 -#define TK_MACRO_LABEL_ID 364 -#define TK_MACRO_LOCAL_ID 365 -#define TK_MACRO_IDENT 366 -#define TK_MACRO_ARG_IDENT 367 -#define TK_MACRO_ARG_OTHER 368 -#define TK_MACRO_CONST_VAL 369 -#define TK_PASM_MARKER_START 370 -#define TK_PIR_MARKER_START 371 -#define TK_PCC_SUB 372 -#define TK_PARROT_OP 373 +#define TK_FLAG_LOOKAHEAD 359 +#define TK_MACRO 360 +#define TK_ENDM 361 +#define TK_MACRO_LOCAL 362 +#define TK_MACRO_LABEL 363 +#define TK_MACRO_CONST 364 +#define TK_MACRO_LABEL_ID 365 +#define TK_MACRO_LOCAL_ID 366 +#define TK_MACRO_IDENT 367 +#define TK_MACRO_ARG_IDENT 368 +#define TK_MACRO_ARG_OTHER 369 +#define TK_MACRO_CONST_VAL 370 +#define TK_PASM_MARKER_START 371 +#define TK_PIR_MARKER_START 372 +#define TK_PCC_SUB 373 +#define TK_PARROT_OP 374 @@ -587,7 +589,7 @@ typedef union YYSTYPE struct macro_param *pval; } /* Line 187 of yacc.c. */ -#line 591 "pirparser.c" +#line 593 "pirparser.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -600,7 +602,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 604 "pirparser.c" +#line 606 "pirparser.c" #ifdef short # undef short @@ -815,20 +817,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 10 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1104 +#define YYLAST 1094 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 139 +#define YYNTOKENS 140 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 171 +#define YYNNTS 172 /* YYNRULES -- Number of rules. */ -#define YYNRULES 430 +#define YYNRULES 432 /* YYNRULES -- Number of states. */ -#define YYNSTATES 670 +#define YYNSTATES 673 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 374 +#define YYMAXUTOK 375 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -839,16 +841,16 @@ static const yytype_uint8 yytranslate[] = 0, 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, 130, 2, 2, 2, 135, 137, 2, - 119, 120, 134, 132, 121, 129, 128, 133, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 125, - 2, 122, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 131, 2, 2, 2, 136, 138, 2, + 120, 121, 135, 133, 122, 130, 129, 134, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 126, + 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, 123, 2, 124, 2, 2, 2, 2, 2, 2, + 2, 124, 2, 125, 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, 126, 136, 127, 131, 2, 2, 2, + 2, 2, 2, 127, 137, 128, 132, 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, @@ -873,7 +875,7 @@ static const yytype_uint8 yytranslate[] = 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 138 + 115, 116, 117, 118, 119, 139 }; #if YYDEBUG @@ -889,220 +891,220 @@ static const yytype_uint16 yyprhs[] = 134, 137, 139, 141, 142, 145, 147, 149, 151, 153, 155, 157, 159, 162, 167, 170, 173, 176, 179, 182, 186, 187, 189, 191, 195, 197, 199, 201, 203, 204, - 207, 212, 215, 216, 219, 221, 223, 225, 230, 232, - 233, 236, 239, 241, 243, 245, 247, 249, 251, 253, - 255, 257, 259, 261, 263, 265, 267, 269, 271, 273, - 279, 281, 285, 286, 290, 291, 293, 295, 299, 301, - 303, 306, 308, 312, 313, 316, 318, 320, 322, 325, - 327, 330, 333, 337, 341, 344, 347, 349, 351, 353, - 355, 356, 358, 360, 364, 368, 370, 372, 374, 376, - 378, 380, 383, 387, 389, 393, 400, 405, 412, 415, - 417, 419, 423, 427, 431, 435, 439, 443, 448, 453, - 458, 462, 466, 470, 474, 478, 482, 486, 491, 497, - 502, 507, 511, 515, 519, 523, 527, 531, 535, 539, - 542, 548, 554, 560, 566, 572, 578, 584, 590, 596, - 601, 607, 612, 617, 622, 627, 632, 637, 642, 647, - 652, 657, 662, 667, 672, 676, 680, 684, 688, 692, - 696, 700, 704, 708, 712, 716, 720, 722, 724, 726, - 728, 730, 732, 736, 741, 743, 747, 750, 751, 753, - 759, 761, 763, 765, 774, 775, 777, 779, 782, 786, - 790, 793, 799, 800, 803, 804, 806, 808, 811, 815, - 817, 820, 824, 828, 830, 832, 834, 839, 842, 844, - 846, 848, 850, 852, 854, 856, 858, 862, 863, 865, - 867, 871, 874, 878, 879, 882, 884, 886, 888, 891, - 893, 895, 897, 899, 901, 905, 909, 913, 917, 918, - 920, 922, 926, 928, 930, 934, 937, 939, 945, 951, - 952, 954, 956, 959, 963, 964, 966, 968, 971, 975, - 976, 979, 981, 984, 985, 987, 991, 994, 997, 999, - 1001, 1004, 1006, 1008, 1011, 1016, 1021, 1026, 1031, 1036, - 1038, 1040, 1042, 1044, 1046, 1048, 1050, 1052, 1054, 1056, - 1058, 1060, 1062, 1064, 1066, 1068, 1070, 1072, 1074, 1076, - 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1092, 1094, 1096, - 1098, 1100, 1102, 1104, 1106, 1108, 1110, 1112, 1114, 1116, - 1118, 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, 1136, - 1138, 1140, 1142, 1144, 1146, 1148, 1150, 1152, 1154, 1156, - 1158, 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, 1176, - 1178, 1180, 1182, 1184, 1187, 1189, 1191, 1194, 1196, 1199, - 1201, 1204, 1207, 1209, 1212, 1215, 1217, 1219, 1221, 1225, - 1227 + 207, 212, 215, 216, 219, 221, 223, 225, 227, 230, + 235, 237, 238, 241, 244, 246, 248, 250, 252, 254, + 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, + 276, 278, 284, 286, 290, 291, 295, 296, 298, 300, + 304, 306, 308, 311, 313, 317, 318, 321, 323, 325, + 327, 330, 332, 335, 338, 342, 346, 349, 352, 354, + 356, 358, 360, 361, 363, 365, 369, 373, 375, 377, + 379, 381, 383, 385, 388, 392, 394, 398, 405, 410, + 417, 420, 422, 424, 428, 432, 436, 440, 444, 448, + 453, 458, 463, 467, 471, 475, 479, 483, 487, 491, + 496, 502, 507, 512, 516, 520, 524, 528, 532, 536, + 540, 544, 547, 553, 559, 565, 571, 577, 583, 589, + 595, 601, 606, 612, 617, 622, 627, 632, 637, 642, + 647, 652, 657, 662, 667, 672, 677, 681, 685, 689, + 693, 697, 701, 705, 709, 713, 717, 721, 725, 727, + 729, 731, 733, 735, 737, 741, 746, 748, 752, 755, + 756, 758, 764, 766, 768, 770, 779, 780, 782, 784, + 787, 791, 795, 798, 804, 805, 808, 809, 811, 813, + 816, 820, 822, 825, 829, 833, 835, 837, 839, 844, + 847, 849, 851, 853, 855, 857, 859, 861, 863, 867, + 868, 870, 872, 876, 879, 883, 884, 887, 889, 891, + 893, 896, 898, 900, 902, 904, 906, 910, 914, 918, + 922, 923, 925, 927, 931, 933, 935, 939, 942, 944, + 950, 956, 957, 959, 961, 964, 968, 969, 971, 973, + 976, 980, 981, 984, 986, 989, 990, 992, 996, 999, + 1002, 1004, 1006, 1009, 1011, 1013, 1016, 1021, 1026, 1031, + 1036, 1041, 1043, 1045, 1047, 1049, 1051, 1053, 1055, 1057, + 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1073, 1075, 1077, + 1079, 1081, 1083, 1085, 1087, 1089, 1091, 1093, 1095, 1097, + 1099, 1101, 1103, 1105, 1107, 1109, 1111, 1113, 1115, 1117, + 1119, 1121, 1123, 1125, 1127, 1129, 1131, 1133, 1135, 1137, + 1139, 1141, 1143, 1145, 1147, 1149, 1151, 1153, 1155, 1157, + 1159, 1161, 1163, 1165, 1167, 1169, 1171, 1173, 1175, 1177, + 1179, 1181, 1183, 1185, 1187, 1189, 1192, 1194, 1196, 1199, + 1201, 1204, 1206, 1209, 1212, 1214, 1217, 1220, 1222, 1224, + 1226, 1230, 1232 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 140, 0, -1, 116, 141, -1, 115, 301, -1, 142, - 143, 142, -1, -1, 35, -1, 144, -1, 143, 35, - 144, -1, 166, -1, 280, -1, 162, -1, 160, -1, - 161, -1, 158, -1, 159, -1, 145, -1, 199, -1, - 146, -1, 147, -1, 108, 37, 114, -1, 148, 119, - 149, 120, 35, 152, 105, -1, 104, 296, -1, -1, - 150, -1, 151, -1, 150, 121, 151, -1, 296, -1, - -1, 153, -1, 154, -1, 153, 154, -1, 155, 35, - -1, 156, -1, 157, -1, 107, 109, -1, 106, 292, - 110, -1, 5, 46, -1, 10, 48, -1, 11, 46, - -1, 3, 46, -1, 4, 46, 122, 46, -1, 13, - 123, 163, 124, -1, -1, 164, -1, 165, -1, 164, - 125, 165, -1, 46, -1, 168, 170, 35, 176, 184, - 167, -1, 7, -1, 6, 169, -1, 296, -1, 46, - -1, -1, 170, 171, -1, 86, -1, 83, -1, 84, + 141, 0, -1, 117, 142, -1, 116, 303, -1, 143, + 144, 143, -1, -1, 35, -1, 145, -1, 144, 35, + 145, -1, 167, -1, 282, -1, 163, -1, 161, -1, + 162, -1, 159, -1, 160, -1, 146, -1, 201, -1, + 147, -1, 148, -1, 109, 37, 115, -1, 149, 120, + 150, 121, 35, 153, 106, -1, 105, 298, -1, -1, + 151, -1, 152, -1, 151, 122, 152, -1, 298, -1, + -1, 154, -1, 155, -1, 154, 155, -1, 156, 35, + -1, 157, -1, 158, -1, 108, 110, -1, 107, 294, + 111, -1, 5, 46, -1, 10, 48, -1, 11, 46, + -1, 3, 46, -1, 4, 46, 123, 46, -1, 13, + 124, 164, 125, -1, -1, 165, -1, 166, -1, 165, + 126, 166, -1, 46, -1, 169, 171, 35, 177, 186, + 168, -1, 7, -1, 6, 170, -1, 298, -1, 46, + -1, -1, 171, 172, -1, 86, -1, 83, -1, 84, -1, 85, -1, 90, -1, 92, -1, 93, -1, 91, - 172, -1, 88, 119, 169, 120, -1, 87, 277, -1, - 89, 277, -1, 94, 278, -1, 95, 278, -1, 96, - 278, -1, 119, 173, 120, -1, -1, 174, -1, 175, - -1, 174, 121, 175, -1, 296, -1, 46, -1, 212, - -1, 177, -1, -1, 177, 178, -1, 8, 179, 180, - 35, -1, 292, 296, -1, -1, 180, 181, -1, 255, - -1, 182, -1, 183, -1, 103, 119, 175, 120, -1, - 97, -1, -1, 184, 185, -1, 36, 186, -1, 186, - -1, 202, -1, 219, -1, 225, -1, 226, -1, 230, - -1, 279, -1, 256, -1, 231, -1, 215, -1, 201, - -1, 200, -1, 197, -1, 198, -1, 188, -1, 187, - -1, 199, -1, 34, 46, 121, 289, 35, -1, 189, - -1, 111, 190, 35, -1, -1, 119, 191, 120, -1, - -1, 192, -1, 193, -1, 192, 121, 193, -1, 112, - -1, 113, -1, 111, 190, -1, 194, -1, 126, 195, - 127, -1, -1, 195, 196, -1, 35, -1, 113, -1, - 112, -1, 111, 190, -1, 35, -1, 159, 35, -1, - 1, 35, -1, 44, 293, 35, -1, 28, 250, 35, - -1, 203, 35, -1, 204, 205, -1, 214, -1, 37, - -1, 206, -1, 208, -1, -1, 207, -1, 209, -1, - 207, 121, 209, -1, 212, 122, 288, -1, 210, -1, - 212, -1, 289, -1, 296, -1, 295, -1, 211, -1, - 249, 212, -1, 123, 213, 124, -1, 288, -1, 213, - 125, 288, -1, 293, 122, 204, 210, 121, 207, -1, - 293, 122, 204, 210, -1, 293, 122, 204, 212, 121, - 207, -1, 217, 35, -1, 37, -1, 297, -1, 293, - 122, 48, -1, 293, 122, 49, -1, 293, 122, 290, - -1, 293, 122, 295, -1, 293, 122, 216, -1, 293, - 122, 218, -1, 293, 122, 204, 212, -1, 293, 122, - 297, 212, -1, 293, 122, 50, 212, -1, 293, 300, - 288, -1, 293, 72, 48, -1, 293, 72, 49, -1, - 293, 73, 48, -1, 293, 73, 49, -1, 293, 72, - 293, -1, 293, 73, 293, -1, 293, 122, 298, 288, - -1, 293, 122, 293, 299, 288, -1, 297, 212, 122, - 288, -1, 50, 212, 122, 288, -1, 48, 299, 293, - -1, 49, 299, 293, -1, 46, 299, 293, -1, 46, - 299, 46, -1, 48, 299, 48, -1, 49, 299, 49, - -1, 48, 299, 49, -1, 49, 299, 48, -1, 220, - 35, -1, 223, 44, 37, 45, 296, -1, 223, 44, - 38, 45, 296, -1, 223, 44, 39, 45, 296, -1, - 223, 44, 40, 45, 296, -1, 223, 44, 41, 45, - 296, -1, 223, 44, 42, 45, 296, -1, 223, 44, - 43, 45, 296, -1, 223, 44, 45, 45, 296, -1, - 223, 44, 44, 45, 296, -1, 223, 289, 224, 296, - -1, 223, 44, 50, 224, 296, -1, 223, 37, 224, - 296, -1, 223, 295, 224, 296, -1, 223, 38, 224, - 296, -1, 223, 39, 224, 296, -1, 223, 40, 224, - 296, -1, 223, 41, 224, 296, -1, 223, 42, 224, - 296, -1, 223, 43, 224, 296, -1, 223, 45, 45, - 296, -1, 223, 45, 121, 296, -1, 223, 44, 45, - 296, -1, 223, 44, 121, 296, -1, 223, 221, 45, - 296, -1, 293, 291, 288, -1, 48, 291, 293, -1, - 49, 291, 293, -1, 46, 291, 293, -1, 48, 291, - 48, -1, 48, 291, 49, -1, 49, 291, 48, -1, - 49, 291, 49, -1, 46, 291, 46, -1, 46, 291, - 222, -1, 48, 291, 46, -1, 49, 291, 46, -1, - 48, -1, 49, -1, 42, -1, 43, -1, 45, -1, - 121, -1, 45, 296, 35, -1, 12, 292, 227, 35, - -1, 228, -1, 227, 121, 228, -1, 296, 229, -1, - -1, 97, -1, 9, 46, 121, 249, 35, -1, 232, - -1, 233, -1, 242, -1, 26, 35, 234, 237, 35, - 239, 27, 35, -1, -1, 235, -1, 236, -1, 235, - 236, -1, 30, 265, 35, -1, 29, 247, 238, -1, - 32, 249, -1, 14, 249, 35, 15, 248, -1, -1, - 121, 249, -1, -1, 240, -1, 241, -1, 240, 241, - -1, 31, 253, 35, -1, 226, -1, 243, 35, -1, - 250, 122, 244, -1, 293, 122, 244, -1, 244, -1, - 246, -1, 245, -1, 249, 128, 248, 260, -1, 247, - 260, -1, 249, -1, 46, -1, 296, -1, 50, -1, - 52, -1, 46, -1, 296, -1, 50, -1, 119, 251, - 120, -1, -1, 252, -1, 253, -1, 252, 121, 253, - -1, 293, 254, -1, 46, 54, 293, -1, -1, 254, - 255, -1, 101, -1, 102, -1, 99, -1, 98, 277, - -1, 257, -1, 258, -1, 267, -1, 259, -1, 268, - -1, 18, 260, 35, -1, 33, 244, 35, -1, 19, - 260, 35, -1, 119, 261, 120, -1, -1, 262, -1, - 263, -1, 262, 121, 263, -1, 265, -1, 264, -1, - 46, 54, 266, -1, 266, 275, -1, 288, -1, 24, - 35, 272, 25, 35, -1, 22, 35, 269, 23, 35, - -1, -1, 270, -1, 271, -1, 270, 271, -1, 20, - 265, 35, -1, -1, 273, -1, 274, -1, 273, 274, - -1, 21, 265, 35, -1, -1, 275, 276, -1, 100, - -1, 98, 277, -1, -1, 278, -1, 119, 46, 120, - -1, 281, 35, -1, 17, 285, -1, 282, -1, 284, - -1, 17, 283, -1, 285, -1, 286, -1, 16, 285, - -1, 38, 296, 122, 48, -1, 39, 296, 122, 49, - -1, 41, 296, 122, 46, -1, 41, 296, 122, 47, - -1, 46, 296, 122, 287, -1, 289, -1, 296, -1, - 293, -1, 289, -1, 48, -1, 49, -1, 290, -1, - 46, -1, 47, -1, 55, -1, 56, -1, 57, -1, - 58, -1, 60, -1, 59, -1, 38, -1, 39, -1, - 40, -1, 41, -1, 294, -1, 295, -1, 296, -1, - 50, -1, 51, -1, 53, -1, 52, -1, 37, -1, - 297, -1, 42, -1, 43, -1, 45, -1, 38, -1, - 39, -1, 41, -1, 40, -1, 44, -1, 129, -1, - 130, -1, 131, -1, 132, -1, 129, -1, 133, -1, - 134, -1, 135, -1, 136, -1, 137, -1, 131, -1, - 138, -1, 68, -1, 61, -1, 62, -1, 63, -1, - 65, -1, 66, -1, 64, -1, 67, -1, 56, -1, - 58, -1, 57, -1, 60, -1, 59, -1, 55, -1, - 74, -1, 75, -1, 76, -1, 77, -1, 80, -1, - 78, -1, 79, -1, 81, -1, 82, -1, 70, -1, - 71, -1, 69, -1, 302, 303, -1, 142, -1, 304, - -1, 303, 304, -1, 305, -1, 162, 35, -1, 230, - -1, 159, 35, -1, 145, 35, -1, 189, -1, 36, - 306, -1, 307, 306, -1, 309, -1, 197, -1, 309, - -1, 308, 170, 36, -1, 117, -1, 204, 206, 35, - -1 + 173, -1, 88, 120, 170, 121, -1, 87, 279, -1, + 89, 279, -1, 94, 280, -1, 95, 280, -1, 96, + 280, -1, 120, 174, 121, -1, -1, 175, -1, 176, + -1, 175, 122, 176, -1, 298, -1, 46, -1, 214, + -1, 178, -1, -1, 178, 179, -1, 8, 180, 181, + 35, -1, 294, 298, -1, -1, 181, 182, -1, 257, + -1, 184, -1, 183, -1, 185, -1, 104, 280, -1, + 103, 120, 176, 121, -1, 97, -1, -1, 186, 187, + -1, 36, 188, -1, 188, -1, 204, -1, 221, -1, + 227, -1, 228, -1, 232, -1, 281, -1, 258, -1, + 233, -1, 217, -1, 203, -1, 202, -1, 199, -1, + 200, -1, 190, -1, 189, -1, 201, -1, 34, 46, + 122, 291, 35, -1, 191, -1, 112, 192, 35, -1, + -1, 120, 193, 121, -1, -1, 194, -1, 195, -1, + 194, 122, 195, -1, 113, -1, 114, -1, 112, 192, + -1, 196, -1, 127, 197, 128, -1, -1, 197, 198, + -1, 35, -1, 114, -1, 113, -1, 112, 192, -1, + 35, -1, 160, 35, -1, 1, 35, -1, 44, 295, + 35, -1, 28, 252, 35, -1, 205, 35, -1, 206, + 207, -1, 216, -1, 37, -1, 208, -1, 210, -1, + -1, 209, -1, 211, -1, 209, 122, 211, -1, 214, + 123, 290, -1, 212, -1, 214, -1, 291, -1, 298, + -1, 297, -1, 213, -1, 251, 214, -1, 124, 215, + 125, -1, 290, -1, 215, 126, 290, -1, 295, 123, + 206, 212, 122, 209, -1, 295, 123, 206, 212, -1, + 295, 123, 206, 214, 122, 209, -1, 219, 35, -1, + 37, -1, 299, -1, 295, 123, 48, -1, 295, 123, + 49, -1, 295, 123, 292, -1, 295, 123, 297, -1, + 295, 123, 218, -1, 295, 123, 220, -1, 295, 123, + 206, 214, -1, 295, 123, 299, 214, -1, 295, 123, + 50, 214, -1, 295, 302, 290, -1, 295, 72, 48, + -1, 295, 72, 49, -1, 295, 73, 48, -1, 295, + 73, 49, -1, 295, 72, 295, -1, 295, 73, 295, + -1, 295, 123, 300, 290, -1, 295, 123, 295, 301, + 290, -1, 299, 214, 123, 290, -1, 50, 214, 123, + 290, -1, 48, 301, 295, -1, 49, 301, 295, -1, + 46, 301, 295, -1, 46, 301, 46, -1, 48, 301, + 48, -1, 49, 301, 49, -1, 48, 301, 49, -1, + 49, 301, 48, -1, 222, 35, -1, 225, 44, 37, + 45, 298, -1, 225, 44, 38, 45, 298, -1, 225, + 44, 39, 45, 298, -1, 225, 44, 40, 45, 298, + -1, 225, 44, 41, 45, 298, -1, 225, 44, 42, + 45, 298, -1, 225, 44, 43, 45, 298, -1, 225, + 44, 45, 45, 298, -1, 225, 44, 44, 45, 298, + -1, 225, 291, 226, 298, -1, 225, 44, 50, 226, + 298, -1, 225, 37, 226, 298, -1, 225, 297, 226, + 298, -1, 225, 38, 226, 298, -1, 225, 39, 226, + 298, -1, 225, 40, 226, 298, -1, 225, 41, 226, + 298, -1, 225, 42, 226, 298, -1, 225, 43, 226, + 298, -1, 225, 45, 45, 298, -1, 225, 45, 122, + 298, -1, 225, 44, 45, 298, -1, 225, 44, 122, + 298, -1, 225, 223, 45, 298, -1, 295, 293, 290, + -1, 48, 293, 295, -1, 49, 293, 295, -1, 46, + 293, 295, -1, 48, 293, 48, -1, 48, 293, 49, + -1, 49, 293, 48, -1, 49, 293, 49, -1, 46, + 293, 46, -1, 46, 293, 224, -1, 48, 293, 46, + -1, 49, 293, 46, -1, 48, -1, 49, -1, 42, + -1, 43, -1, 45, -1, 122, -1, 45, 298, 35, + -1, 12, 294, 229, 35, -1, 230, -1, 229, 122, + 230, -1, 298, 231, -1, -1, 97, -1, 9, 46, + 122, 251, 35, -1, 234, -1, 235, -1, 244, -1, + 26, 35, 236, 239, 35, 241, 27, 35, -1, -1, + 237, -1, 238, -1, 237, 238, -1, 30, 267, 35, + -1, 29, 249, 240, -1, 32, 251, -1, 14, 251, + 35, 15, 250, -1, -1, 122, 251, -1, -1, 242, + -1, 243, -1, 242, 243, -1, 31, 255, 35, -1, + 228, -1, 245, 35, -1, 252, 123, 246, -1, 295, + 123, 246, -1, 246, -1, 248, -1, 247, -1, 251, + 129, 250, 262, -1, 249, 262, -1, 251, -1, 46, + -1, 298, -1, 50, -1, 52, -1, 46, -1, 298, + -1, 50, -1, 120, 253, 121, -1, -1, 254, -1, + 255, -1, 254, 122, 255, -1, 295, 256, -1, 46, + 54, 295, -1, -1, 256, 257, -1, 101, -1, 102, + -1, 99, -1, 98, 279, -1, 259, -1, 260, -1, + 269, -1, 261, -1, 270, -1, 18, 262, 35, -1, + 33, 246, 35, -1, 19, 262, 35, -1, 120, 263, + 121, -1, -1, 264, -1, 265, -1, 264, 122, 265, + -1, 267, -1, 266, -1, 46, 54, 268, -1, 268, + 277, -1, 290, -1, 24, 35, 274, 25, 35, -1, + 22, 35, 271, 23, 35, -1, -1, 272, -1, 273, + -1, 272, 273, -1, 20, 267, 35, -1, -1, 275, + -1, 276, -1, 275, 276, -1, 21, 267, 35, -1, + -1, 277, 278, -1, 100, -1, 98, 279, -1, -1, + 280, -1, 120, 46, 121, -1, 283, 35, -1, 17, + 287, -1, 284, -1, 286, -1, 17, 285, -1, 287, + -1, 288, -1, 16, 287, -1, 38, 298, 123, 48, + -1, 39, 298, 123, 49, -1, 41, 298, 123, 46, + -1, 41, 298, 123, 47, -1, 46, 298, 123, 289, + -1, 291, -1, 298, -1, 295, -1, 291, -1, 48, + -1, 49, -1, 292, -1, 46, -1, 47, -1, 55, + -1, 56, -1, 57, -1, 58, -1, 60, -1, 59, + -1, 38, -1, 39, -1, 40, -1, 41, -1, 296, + -1, 297, -1, 298, -1, 50, -1, 51, -1, 53, + -1, 52, -1, 37, -1, 299, -1, 42, -1, 43, + -1, 45, -1, 38, -1, 39, -1, 41, -1, 40, + -1, 44, -1, 130, -1, 131, -1, 132, -1, 133, + -1, 130, -1, 134, -1, 135, -1, 136, -1, 137, + -1, 138, -1, 132, -1, 139, -1, 68, -1, 61, + -1, 62, -1, 63, -1, 65, -1, 66, -1, 64, + -1, 67, -1, 56, -1, 58, -1, 57, -1, 60, + -1, 59, -1, 55, -1, 74, -1, 75, -1, 76, + -1, 77, -1, 80, -1, 78, -1, 79, -1, 81, + -1, 82, -1, 70, -1, 71, -1, 69, -1, 304, + 305, -1, 143, -1, 306, -1, 305, 306, -1, 307, + -1, 163, 35, -1, 232, -1, 160, 35, -1, 146, + 35, -1, 191, -1, 36, 308, -1, 309, 308, -1, + 311, -1, 199, -1, 311, -1, 310, 171, 36, -1, + 118, -1, 206, 208, 35, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 561, 561, 562, 567, 573, 574, 577, 578, 581, - 582, 583, 584, 585, 586, 587, 588, 589, 596, 597, - 600, 604, 610, 617, 618, 621, 622, 625, 629, 630, - 633, 634, 637, 640, 641, 644, 648, 659, 663, 665, - 671, 675, 679, 684, 685, 689, 691, 695, 699, 705, - 709, 713, 714, 717, 718, 721, 723, 725, 727, 729, - 731, 733, 735, 737, 739, 741, 743, 745, 747, 751, - 756, 760, 764, 773, 784, 786, 788, 792, 801, 802, - 815, 819, 824, 825, 829, 830, 831, 834, 841, 847, - 848, 858, 860, 863, 864, 865, 866, 867, 868, 869, - 870, 871, 872, 873, 874, 875, 876, 877, 878, 881, - 888, 891, 896, 897, 902, 903, 906, 908, 916, 924, - 925, 927, 930, 936, 937, 946, 947, 948, 949, 957, - 961, 965, 974, 981, 988, 991, 992, 995, 1004, 1011, - 1014, 1015, 1018, 1019, 1022, 1058, 1060, 1064, 1066, 1071, - 1073, 1077, 1100, 1104, 1106, 1115, 1126, 1138, 1148, 1151, - 1152, 1155, 1164, 1173, 1178, 1183, 1204, 1209, 1250, 1268, - 1275, 1280, 1291, 1302, 1313, 1324, 1329, 1334, 1339, 1349, - 1368, 1402, 1404, 1406, 1408, 1410, 1412, 1414, 1416, 1421, - 1430, 1432, 1434, 1436, 1438, 1440, 1442, 1444, 1446, 1448, - 1460, 1465, 1467, 1469, 1471, 1473, 1475, 1477, 1479, 1481, - 1483, 1485, 1487, 1489, 1520, 1546, 1554, 1563, 1572, 1574, - 1576, 1578, 1580, 1584, 1589, 1591, 1596, 1597, 1600, 1601, - 1604, 1605, 1608, 1616, 1620, 1622, 1626, 1630, 1631, 1634, - 1649, 1653, 1654, 1657, 1669, 1670, 1674, 1676, 1680, 1684, - 1686, 1688, 1694, 1695, 1700, 1701, 1705, 1707, 1716, 1718, - 1722, 1726, 1728, 1730, 1734, 1735, 1738, 1758, 1765, 1767, - 1777, 1794, 1796, 1798, 1802, 1811, 1816, 1823, 1824, 1828, - 1830, 1834, 1836, 1841, 1842, 1846, 1848, 1850, 1852, 1862, - 1866, 1867, 1868, 1869, 1872, 1877, 1888, 1895, 1900, 1901, - 1905, 1907, 1911, 1912, 1915, 1919, 1923, 1927, 1936, 1946, - 1947, 1952, 1954, 1959, 1964, 1965, 1969, 1971, 1975, 1981, - 1982, 1986, 1988, 1996, 1997, 2001, 2005, 2008, 2012, 2013, - 2016, 2020, 2021, 2024, 2028, 2030, 2032, 2034, 2038, 2042, - 2043, 2056, 2057, 2061, 2062, 2063, 2066, 2067, 2070, 2071, - 2072, 2073, 2074, 2075, 2078, 2079, 2080, 2081, 2089, 2092, - 2093, 2106, 2107, 2108, 2109, 2113, 2114, 2117, 2118, 2119, - 2120, 2121, 2122, 2123, 2124, 2127, 2128, 2129, 2132, 2133, - 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, - 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, - 2154, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, - 2169, 2170, 2171, 2183, 2191, 2195, 2196, 2199, 2200, 2201, - 2202, 2203, 2204, 2207, 2209, 2210, 2213, 2214, 2217, 2221, - 2226 + 0, 563, 563, 564, 569, 575, 576, 579, 580, 583, + 584, 585, 586, 587, 588, 589, 590, 591, 598, 599, + 602, 606, 612, 619, 620, 623, 624, 627, 631, 632, + 635, 636, 639, 642, 643, 646, 650, 661, 665, 667, + 673, 677, 681, 686, 687, 691, 693, 697, 701, 707, + 711, 715, 716, 719, 720, 723, 725, 727, 729, 731, + 733, 735, 737, 739, 741, 743, 745, 747, 749, 753, + 758, 762, 766, 775, 786, 788, 790, 794, 803, 804, + 817, 821, 826, 827, 831, 832, 833, 834, 837, 844, + 851, 857, 858, 868, 870, 873, 874, 875, 876, 877, + 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, + 888, 891, 898, 901, 906, 907, 912, 913, 916, 918, + 926, 934, 935, 937, 940, 946, 947, 956, 957, 958, + 959, 967, 971, 975, 984, 991, 998, 1001, 1002, 1005, + 1014, 1021, 1024, 1025, 1028, 1029, 1032, 1068, 1070, 1074, + 1076, 1081, 1083, 1087, 1110, 1114, 1116, 1125, 1136, 1148, + 1158, 1161, 1162, 1165, 1174, 1183, 1188, 1193, 1214, 1219, + 1260, 1278, 1285, 1290, 1301, 1312, 1323, 1334, 1339, 1344, + 1349, 1359, 1378, 1412, 1414, 1416, 1418, 1420, 1422, 1424, + 1426, 1431, 1440, 1442, 1444, 1446, 1448, 1450, 1452, 1454, + 1456, 1458, 1470, 1475, 1477, 1479, 1481, 1483, 1485, 1487, + 1489, 1491, 1493, 1495, 1497, 1499, 1530, 1556, 1564, 1573, + 1582, 1584, 1586, 1588, 1590, 1594, 1599, 1601, 1606, 1607, + 1610, 1611, 1614, 1615, 1618, 1626, 1630, 1632, 1636, 1640, + 1641, 1644, 1659, 1663, 1664, 1667, 1679, 1680, 1684, 1686, + 1690, 1694, 1696, 1698, 1704, 1705, 1710, 1711, 1715, 1717, + 1726, 1728, 1732, 1736, 1738, 1740, 1744, 1745, 1748, 1768, + 1775, 1777, 1787, 1804, 1806, 1808, 1812, 1821, 1826, 1833, + 1834, 1838, 1840, 1844, 1846, 1851, 1852, 1856, 1858, 1860, + 1862, 1872, 1876, 1877, 1878, 1879, 1882, 1887, 1898, 1905, + 1910, 1911, 1915, 1917, 1921, 1922, 1925, 1929, 1933, 1937, + 1946, 1956, 1957, 1962, 1964, 1969, 1974, 1975, 1979, 1981, + 1985, 1991, 1992, 1996, 1998, 2006, 2007, 2011, 2015, 2018, + 2022, 2023, 2026, 2030, 2031, 2034, 2038, 2040, 2042, 2044, + 2048, 2052, 2053, 2066, 2067, 2071, 2072, 2073, 2076, 2077, + 2080, 2081, 2082, 2083, 2084, 2085, 2088, 2089, 2090, 2091, + 2099, 2102, 2103, 2116, 2117, 2118, 2119, 2123, 2124, 2127, + 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2137, 2138, 2139, + 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, + 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, + 2162, 2163, 2164, 2170, 2171, 2172, 2173, 2174, 2175, 2176, + 2177, 2178, 2179, 2180, 2181, 2193, 2201, 2205, 2206, 2209, + 2210, 2211, 2212, 2213, 2214, 2217, 2219, 2220, 2223, 2224, + 2227, 2231, 2236 }; #endif @@ -1133,35 +1135,36 @@ static const char *const yytname[] = "\":vtable\"", "\":lex\"", "\":multi\"", "\":postcomp\"", "\":immediate\"", "\":subid\"", "\":instanceof\"", "\":nsentry\"", "\":unique_reg\"", "\":named\"", "\":slurpy\"", "\":flat\"", - "\":optional\"", "\":opt_flag\"", "\":invocant\"", "\".macro\"", - "\".endm\"", "\".macro_local\"", "\".macro_label\"", "\".macro_const\"", - "\"macro-label\"", "\"macro-local\"", "\"macro-identifier\"", - "\"macro-id-argument\"", "\"macro-argument\"", "\"macro-constant\"", - "\"\"", "\"\"", "\".pcc_sub\"", "\"parrot-op\"", - "'('", "')'", "','", "'='", "'['", "']'", "';'", "'{'", "'}'", "'.'", - "'-'", "'!'", "'~'", "'+'", "'/'", "'*'", "'%'", "'|'", "'&'", "\"**\"", - "$accept", "TOP", "pir_contents", "opt_nl", "pir_chunks", "pir_chunk", - "macro_definition", "macro_const", "macro", "macro_header", - "macro_parameters", "macro_params", "macro_param", "macro_body", - "macro_statements", "macro_statement", "macro_instr", "macro_label_decl", - "macro_local_decl", "loadlib", "location_directive", "hll_specifier", - "hll_mapping", "namespace_decl", "opt_namespace", "namespace", - "namespace_slice", "sub_def", "sub_end", "sub_head", "sub_id", - "sub_flags", "sub_flag", "multi_type_list", "opt_multi_types", - "multi_types", "multi_type", "parameter_list", "parameters", "parameter", - "param", "param_flags", "param_flag", "invocant_param", - "unique_reg_flag", "instructions", "instruction", "statement", - "annotation", "expansion_stat", "macro_expansion", "opt_macro_args", - "macro_args", "macro_arg_list", "macro_arg", "braced_arg", - "braced_contents", "braced_item", "empty_stat", "location_stat", - "error_stat", "null_stat", "getresults_stat", "parrot_stat", - "parrot_instruction", "parrot_op", "opt_op_args", "op_args", - "parrot_op_args", "keylist_assignment", "op_arg", "op_arg_expr", - "keyaccess", "keylist", "keys", "parrot_op_assign", "assignment_stat", - "rhs_ident", "assignment", "binary_expr", "conditional_stat", - "conditional_instr", "condition", "int_or_num", "if_unless", "then", - "goto_stat", "local_decl", "local_id_list", "local_id", "has_unique_reg", - "lex_decl", "invocation_stat", "invocation", "long_invocation_stat", + "\":optional\"", "\":opt_flag\"", "\":invocant\"", "\":lookahead\"", + "\".macro\"", "\".endm\"", "\".macro_local\"", "\".macro_label\"", + "\".macro_const\"", "\"macro-label\"", "\"macro-local\"", + "\"macro-identifier\"", "\"macro-id-argument\"", "\"macro-argument\"", + "\"macro-constant\"", "\"\"", "\"\"", + "\".pcc_sub\"", "\"parrot-op\"", "'('", "')'", "','", "'='", "'['", + "']'", "';'", "'{'", "'}'", "'.'", "'-'", "'!'", "'~'", "'+'", "'/'", + "'*'", "'%'", "'|'", "'&'", "\"**\"", "$accept", "TOP", "pir_contents", + "opt_nl", "pir_chunks", "pir_chunk", "macro_definition", "macro_const", + "macro", "macro_header", "macro_parameters", "macro_params", + "macro_param", "macro_body", "macro_statements", "macro_statement", + "macro_instr", "macro_label_decl", "macro_local_decl", "loadlib", + "location_directive", "hll_specifier", "hll_mapping", "namespace_decl", + "opt_namespace", "namespace", "namespace_slice", "sub_def", "sub_end", + "sub_head", "sub_id", "sub_flags", "sub_flag", "multi_type_list", + "opt_multi_types", "multi_types", "multi_type", "parameter_list", + "parameters", "parameter", "param", "param_flags", "param_flag", + "lookahead_flag", "invocant_flag", "unique_reg_flag", "instructions", + "instruction", "statement", "annotation", "expansion_stat", + "macro_expansion", "opt_macro_args", "macro_args", "macro_arg_list", + "macro_arg", "braced_arg", "braced_contents", "braced_item", + "empty_stat", "location_stat", "error_stat", "null_stat", + "getresults_stat", "parrot_stat", "parrot_instruction", "parrot_op", + "opt_op_args", "op_args", "parrot_op_args", "keylist_assignment", + "op_arg", "op_arg_expr", "keyaccess", "keylist", "keys", + "parrot_op_assign", "assignment_stat", "rhs_ident", "assignment", + "binary_expr", "conditional_stat", "conditional_instr", "condition", + "int_or_num", "if_unless", "then", "goto_stat", "local_decl", + "local_id_list", "local_id", "has_unique_reg", "lex_decl", + "invocation_stat", "invocation", "long_invocation_stat", "opt_long_arguments", "long_arguments", "long_argument", "long_invocation", "opt_ret_cont", "opt_long_results", "long_results", "long_result", "short_invocation_stat", "short_invocation", @@ -1200,59 +1203,59 @@ static const yytype_uint16 yytoknum[] = 335, 336, 337, 338, 339, 340, 341, 342, 343, 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, 40, - 41, 44, 61, 91, 93, 59, 123, 125, 46, 45, - 33, 126, 43, 47, 42, 37, 124, 38, 374 + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 40, 41, 44, 61, 91, 93, 59, 123, 125, 46, + 45, 33, 126, 43, 47, 42, 37, 124, 38, 375 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint16 yyr1[] = { - 0, 139, 140, 140, 141, 142, 142, 143, 143, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 145, 145, - 146, 147, 148, 149, 149, 150, 150, 151, 152, 152, - 153, 153, 154, 155, 155, 156, 157, 158, 159, 159, - 160, 161, 162, 163, 163, 164, 164, 165, 166, 167, - 168, 169, 169, 170, 170, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 172, - 173, 173, 174, 174, 175, 175, 175, 176, 177, 177, - 178, 179, 180, 180, 181, 181, 181, 182, 183, 184, - 184, 185, 185, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 187, - 188, 189, 190, 190, 191, 191, 192, 192, 193, 193, - 193, 193, 194, 195, 195, 196, 196, 196, 196, 197, - 198, 199, 200, 201, 202, 203, 203, 204, 205, 205, - 206, 206, 207, 207, 208, 209, 209, 210, 210, 210, - 210, 211, 212, 213, 213, 214, 214, 214, 215, 216, - 216, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 218, 218, 218, 218, 218, 218, 218, 218, 219, - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 222, 222, 223, 223, - 224, 224, 225, 226, 227, 227, 228, 229, 229, 230, - 231, 232, 232, 233, 234, 234, 235, 235, 236, 237, - 237, 237, 238, 238, 239, 239, 240, 240, 241, 241, - 242, 243, 243, 243, 244, 244, 245, 246, 247, 247, - 248, 248, 248, 248, 249, 249, 250, 251, 251, 252, - 252, 253, 253, 254, 254, 255, 255, 255, 255, 256, - 257, 257, 257, 257, 258, 258, 259, 260, 261, 261, - 262, 262, 263, 263, 264, 265, 266, 267, 268, 269, - 269, 270, 270, 271, 272, 272, 273, 273, 274, 275, - 275, 276, 276, 277, 277, 278, 279, 280, 281, 281, - 282, 283, 283, 284, 285, 285, 285, 285, 286, 287, - 287, 288, 288, 289, 289, 289, 290, 290, 291, 291, - 291, 291, 291, 291, 292, 292, 292, 292, 293, 294, - 294, 295, 295, 295, 295, 296, 296, 297, 297, 297, - 297, 297, 297, 297, 297, 298, 298, 298, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 300, 300, 300, 300, 300, 300, 300, 300, 300, - 300, 300, 300, 301, 302, 303, 303, 304, 304, 304, - 304, 304, 304, 305, 305, 305, 306, 306, 307, 308, - 309 + 0, 140, 141, 141, 142, 143, 143, 144, 144, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 146, 146, + 147, 148, 149, 150, 150, 151, 151, 152, 153, 153, + 154, 154, 155, 156, 156, 157, 158, 159, 160, 160, + 161, 162, 163, 164, 164, 165, 165, 166, 167, 168, + 169, 170, 170, 171, 171, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 173, + 174, 174, 175, 175, 176, 176, 176, 177, 178, 178, + 179, 180, 181, 181, 182, 182, 182, 182, 183, 184, + 185, 186, 186, 187, 187, 188, 188, 188, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, + 188, 189, 190, 191, 192, 192, 193, 193, 194, 194, + 195, 195, 195, 195, 196, 197, 197, 198, 198, 198, + 198, 199, 200, 201, 202, 203, 204, 205, 205, 206, + 207, 207, 208, 208, 209, 209, 210, 211, 211, 212, + 212, 212, 212, 213, 214, 215, 215, 216, 216, 216, + 217, 218, 218, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 220, 220, 220, 220, 220, 220, 220, + 220, 221, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 223, 223, 223, 223, + 223, 223, 223, 223, 223, 223, 223, 223, 224, 224, + 225, 225, 226, 226, 227, 228, 229, 229, 230, 231, + 231, 232, 233, 234, 234, 235, 236, 236, 237, 237, + 238, 239, 239, 239, 240, 240, 241, 241, 242, 242, + 243, 243, 244, 245, 245, 245, 246, 246, 247, 248, + 249, 249, 250, 250, 250, 250, 251, 251, 252, 253, + 253, 254, 254, 255, 255, 256, 256, 257, 257, 257, + 257, 258, 259, 259, 259, 259, 260, 260, 261, 262, + 263, 263, 264, 264, 265, 265, 266, 267, 268, 269, + 270, 271, 271, 272, 272, 273, 274, 274, 275, 275, + 276, 277, 277, 278, 278, 279, 279, 280, 281, 282, + 283, 283, 284, 285, 285, 286, 287, 287, 287, 287, + 288, 289, 289, 290, 290, 291, 291, 291, 292, 292, + 293, 293, 293, 293, 293, 293, 294, 294, 294, 294, + 295, 296, 296, 297, 297, 297, 297, 298, 298, 299, + 299, 299, 299, 299, 299, 299, 299, 300, 300, 300, + 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, + 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, + 301, 301, 301, 302, 302, 302, 302, 302, 302, 302, + 302, 302, 302, 302, 302, 303, 304, 305, 305, 306, + 306, 306, 306, 306, 306, 307, 307, 307, 308, 308, + 309, 310, 311 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1266,42 +1269,42 @@ static const yytype_uint8 yyr2[] = 2, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 2, 4, 2, 2, 2, 2, 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, 0, 2, - 4, 2, 0, 2, 1, 1, 1, 4, 1, 0, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, - 1, 3, 0, 3, 0, 1, 1, 3, 1, 1, - 2, 1, 3, 0, 2, 1, 1, 1, 2, 1, - 2, 2, 3, 3, 2, 2, 1, 1, 1, 1, - 0, 1, 1, 3, 3, 1, 1, 1, 1, 1, - 1, 2, 3, 1, 3, 6, 4, 6, 2, 1, - 1, 3, 3, 3, 3, 3, 3, 4, 4, 4, - 3, 3, 3, 3, 3, 3, 3, 4, 5, 4, - 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, - 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, - 1, 1, 3, 4, 1, 3, 2, 0, 1, 5, - 1, 1, 1, 8, 0, 1, 1, 2, 3, 3, - 2, 5, 0, 2, 0, 1, 1, 2, 3, 1, - 2, 3, 3, 1, 1, 1, 4, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 0, 1, 1, - 3, 2, 3, 0, 2, 1, 1, 1, 2, 1, - 1, 1, 1, 1, 3, 3, 3, 3, 0, 1, - 1, 3, 1, 1, 3, 2, 1, 5, 5, 0, - 1, 1, 2, 3, 0, 1, 1, 2, 3, 0, - 2, 1, 2, 0, 1, 3, 2, 2, 1, 1, - 2, 1, 1, 2, 4, 4, 4, 4, 4, 1, + 4, 2, 0, 2, 1, 1, 1, 1, 2, 4, + 1, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 1, 3, 0, 3, 0, 1, 1, 3, + 1, 1, 2, 1, 3, 0, 2, 1, 1, 1, + 2, 1, 2, 2, 3, 3, 2, 2, 1, 1, + 1, 1, 0, 1, 1, 3, 3, 1, 1, 1, + 1, 1, 1, 2, 3, 1, 3, 6, 4, 6, + 2, 1, 1, 3, 3, 3, 3, 3, 3, 4, + 4, 4, 3, 3, 3, 3, 3, 3, 3, 4, + 5, 4, 4, 3, 3, 3, 3, 3, 3, 3, + 3, 2, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 4, 5, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, + 1, 1, 1, 1, 3, 4, 1, 3, 2, 0, + 1, 5, 1, 1, 1, 8, 0, 1, 1, 2, + 3, 3, 2, 5, 0, 2, 0, 1, 1, 2, + 3, 1, 2, 3, 3, 1, 1, 1, 4, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, + 1, 1, 3, 2, 3, 0, 2, 1, 1, 1, + 2, 1, 1, 1, 1, 1, 3, 3, 3, 3, + 0, 1, 1, 3, 1, 1, 3, 2, 1, 5, + 5, 0, 1, 1, 2, 3, 0, 1, 1, 2, + 3, 0, 2, 1, 2, 0, 1, 3, 2, 2, + 1, 1, 2, 1, 1, 2, 4, 4, 4, 4, + 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, - 2, 2, 1, 2, 2, 1, 1, 1, 3, 1, - 3 + 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, + 2, 1, 2, 2, 1, 2, 2, 1, 1, 1, + 3, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -1309,73 +1312,74 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 5, 5, 0, 6, 414, 3, 0, 2, 0, - 1, 0, 0, 0, 0, 0, 137, 0, 0, 112, - 429, 0, 18, 19, 0, 0, 0, 422, 140, 419, - 413, 415, 417, 0, 53, 425, 0, 0, 0, 0, + 0, 5, 5, 0, 6, 416, 3, 0, 2, 0, + 1, 0, 0, 0, 0, 0, 139, 0, 0, 114, + 431, 0, 18, 19, 0, 0, 0, 424, 142, 421, + 415, 417, 419, 0, 53, 427, 0, 0, 0, 0, 0, 0, 5, 7, 16, 14, 15, 12, 13, 11, - 9, 53, 17, 10, 0, 38, 39, 43, 129, 426, - 423, 427, 365, 370, 371, 373, 372, 367, 368, 374, - 369, 22, 366, 0, 114, 0, 421, 23, 420, 418, - 346, 347, 343, 344, 361, 362, 364, 363, 0, 0, - 141, 142, 145, 150, 146, 0, 147, 345, 149, 148, - 416, 424, 0, 131, 40, 0, 37, 52, 50, 51, - 0, 0, 0, 327, 0, 4, 0, 0, 47, 0, - 44, 45, 20, 112, 118, 119, 123, 0, 115, 116, - 121, 111, 0, 24, 25, 27, 361, 0, 153, 342, - 341, 358, 359, 360, 430, 0, 151, 428, 56, 57, - 58, 55, 323, 0, 323, 59, 0, 60, 61, 0, - 0, 0, 54, 0, 0, 0, 0, 8, 78, 275, - 0, 274, 42, 0, 120, 0, 113, 0, 0, 0, - 152, 0, 143, 0, 64, 324, 0, 65, 70, 62, - 66, 67, 68, 41, 0, 0, 0, 89, 77, 239, - 46, 125, 112, 127, 126, 122, 124, 117, 28, 26, - 154, 0, 0, 75, 0, 71, 72, 76, 74, 334, - 335, 336, 337, 0, 0, 79, 128, 0, 0, 0, - 29, 30, 0, 33, 34, 325, 63, 69, 0, 49, + 9, 53, 17, 10, 0, 38, 39, 43, 131, 428, + 425, 429, 367, 372, 373, 375, 374, 369, 370, 376, + 371, 22, 368, 0, 116, 0, 423, 23, 422, 420, + 348, 349, 345, 346, 363, 364, 366, 365, 0, 0, + 143, 144, 147, 152, 148, 0, 149, 347, 151, 150, + 418, 426, 0, 133, 40, 0, 37, 52, 50, 51, + 0, 0, 0, 329, 0, 4, 0, 0, 47, 0, + 44, 45, 20, 114, 120, 121, 125, 0, 117, 118, + 123, 113, 0, 24, 25, 27, 363, 0, 155, 344, + 343, 360, 361, 362, 432, 0, 153, 430, 56, 57, + 58, 55, 325, 0, 325, 59, 0, 60, 61, 0, + 0, 0, 54, 0, 0, 0, 0, 8, 78, 277, + 0, 276, 42, 0, 122, 0, 115, 0, 0, 0, + 154, 0, 145, 0, 64, 326, 0, 65, 70, 62, + 66, 67, 68, 41, 0, 0, 0, 91, 77, 241, + 46, 127, 114, 129, 128, 124, 126, 119, 28, 26, + 156, 0, 0, 75, 0, 71, 72, 76, 74, 336, + 337, 338, 339, 0, 0, 79, 130, 0, 0, 0, + 29, 30, 0, 33, 34, 327, 63, 69, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 137, 367, 368, 374, 369, 269, 361, 277, - 0, 48, 90, 92, 107, 106, 110, 104, 105, 108, - 103, 102, 93, 0, 140, 136, 101, 0, 94, 0, - 0, 95, 96, 97, 100, 240, 241, 242, 0, 263, - 265, 264, 0, 268, 0, 99, 289, 290, 292, 291, - 293, 98, 0, 328, 329, 0, 360, 366, 354, 355, - 356, 357, 82, 0, 0, 35, 21, 31, 32, 73, - 0, 333, 0, 330, 331, 332, 298, 0, 0, 309, - 314, 244, 0, 0, 0, 91, 0, 0, 0, 0, - 0, 278, 279, 283, 130, 134, 135, 138, 139, 146, - 158, 189, 365, 370, 371, 373, 372, 367, 368, 374, - 369, 346, 343, 344, 0, 0, 0, 359, 260, 267, - 0, 0, 326, 412, 410, 411, 0, 0, 401, 402, - 403, 404, 406, 407, 405, 408, 409, 0, 0, 0, - 0, 81, 36, 0, 234, 237, 0, 346, 0, 299, - 300, 303, 302, 319, 306, 294, 296, 0, 0, 310, - 311, 0, 0, 315, 316, 0, 0, 245, 246, 133, - 295, 0, 132, 232, 0, 0, 276, 0, 281, 0, - 230, 231, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 139, 369, 370, 376, 371, 271, 363, 279, + 0, 48, 92, 94, 109, 108, 112, 106, 107, 110, + 105, 104, 95, 0, 142, 138, 103, 0, 96, 0, + 0, 97, 98, 99, 102, 242, 243, 244, 0, 265, + 267, 266, 0, 270, 0, 101, 291, 292, 294, 293, + 295, 100, 0, 330, 331, 0, 362, 368, 356, 357, + 358, 359, 82, 0, 0, 35, 21, 31, 32, 73, + 0, 335, 0, 332, 333, 334, 300, 0, 0, 311, + 316, 246, 0, 0, 0, 93, 0, 0, 0, 0, + 0, 280, 281, 285, 132, 136, 137, 140, 141, 148, + 160, 191, 367, 372, 373, 375, 374, 369, 370, 376, + 371, 348, 345, 346, 0, 0, 0, 361, 262, 269, + 0, 0, 328, 414, 412, 413, 0, 0, 403, 404, + 405, 406, 408, 409, 407, 410, 411, 0, 0, 0, + 0, 81, 36, 0, 236, 239, 0, 348, 0, 301, + 302, 305, 304, 321, 308, 296, 298, 0, 0, 312, + 313, 0, 0, 317, 318, 0, 0, 247, 248, 135, + 297, 0, 134, 234, 0, 0, 278, 0, 283, 0, + 232, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 348, 349, 350, 351, 353, 352, 0, 0, - 0, 0, 0, 0, 0, 273, 271, 272, 0, 270, - 261, 171, 172, 175, 173, 174, 176, 365, 269, 161, - 162, 361, 375, 376, 377, 0, 165, 166, 262, 163, - 0, 359, 366, 0, 170, 0, 80, 88, 323, 287, - 285, 286, 0, 83, 85, 86, 84, 233, 0, 238, - 236, 0, 0, 297, 0, 305, 0, 0, 312, 0, - 0, 317, 0, 0, 0, 0, 0, 247, 0, 180, - 282, 280, 284, 144, 201, 203, 204, 205, 206, 207, - 208, 0, 0, 0, 0, 0, 0, 0, 0, 369, - 211, 0, 212, 209, 210, 222, 226, 227, 223, 217, - 224, 218, 219, 215, 225, 220, 221, 216, 213, 199, - 214, 202, 266, 400, 395, 397, 396, 399, 398, 388, - 389, 390, 393, 391, 392, 394, 387, 379, 385, 378, - 380, 381, 382, 383, 384, 386, 0, 0, 0, 169, - 156, 167, 0, 168, 177, 179, 288, 0, 235, 338, - 339, 340, 304, 301, 323, 321, 320, 313, 308, 318, - 307, 248, 0, 252, 268, 250, 254, 109, 190, 191, - 192, 193, 194, 195, 196, 198, 197, 200, 184, 183, - 185, 187, 181, 188, 186, 182, 0, 0, 178, 0, - 322, 0, 0, 249, 0, 259, 0, 255, 256, 155, - 157, 87, 0, 253, 0, 0, 257, 251, 258, 243 + 0, 0, 350, 351, 352, 353, 355, 354, 0, 0, + 0, 0, 0, 0, 0, 275, 273, 274, 0, 272, + 263, 173, 174, 177, 175, 176, 178, 367, 271, 163, + 164, 363, 377, 378, 379, 0, 167, 168, 264, 165, + 0, 361, 368, 0, 172, 0, 80, 90, 325, 289, + 287, 288, 0, 0, 83, 86, 85, 87, 84, 235, + 0, 240, 238, 0, 0, 299, 0, 307, 0, 0, + 314, 0, 0, 319, 0, 0, 0, 0, 0, 249, + 0, 182, 284, 282, 286, 146, 203, 205, 206, 207, + 208, 209, 210, 0, 0, 0, 0, 0, 0, 0, + 0, 371, 213, 0, 214, 211, 212, 224, 228, 229, + 225, 219, 226, 220, 221, 217, 227, 222, 223, 218, + 215, 201, 216, 204, 268, 402, 397, 399, 398, 401, + 400, 390, 391, 392, 395, 393, 394, 396, 389, 381, + 387, 380, 382, 383, 384, 385, 386, 388, 0, 0, + 0, 171, 158, 169, 0, 170, 179, 181, 290, 0, + 88, 237, 340, 341, 342, 306, 303, 325, 323, 322, + 315, 310, 320, 309, 250, 0, 254, 270, 252, 256, + 111, 192, 193, 194, 195, 196, 197, 198, 200, 199, + 202, 186, 185, 187, 189, 183, 190, 188, 184, 0, + 0, 180, 0, 324, 0, 0, 251, 0, 261, 0, + 257, 258, 157, 159, 89, 0, 255, 0, 0, 259, + 253, 260, 245 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1385,425 +1389,425 @@ static const yytype_int16 yydefgoto[] = 132, 133, 134, 229, 230, 231, 232, 233, 234, 45, 25, 47, 48, 26, 119, 120, 121, 50, 261, 51, 108, 102, 162, 189, 214, 215, 216, 197, 198, 225, - 312, 390, 503, 504, 505, 223, 262, 263, 264, 265, - 27, 75, 127, 128, 129, 130, 175, 206, 59, 268, - 52, 270, 271, 272, 273, 28, 346, 89, 90, 348, - 91, 92, 93, 94, 137, 275, 276, 486, 277, 487, - 278, 279, 364, 558, 280, 432, 281, 282, 393, 394, - 510, 29, 284, 285, 286, 416, 417, 418, 526, 653, - 656, 657, 658, 287, 288, 289, 290, 291, 292, 468, - 95, 294, 340, 341, 342, 428, 506, 295, 296, 297, - 298, 327, 398, 399, 400, 401, 402, 403, 299, 300, - 408, 409, 410, 412, 413, 414, 515, 616, 184, 185, - 301, 53, 302, 303, 323, 304, 113, 325, 609, 404, - 139, 97, 458, 313, 140, 141, 142, 143, 72, 493, - 596, 388, 6, 7, 30, 31, 32, 60, 33, 34, - 35 + 312, 390, 504, 505, 506, 507, 223, 262, 263, 264, + 265, 27, 75, 127, 128, 129, 130, 175, 206, 59, + 268, 52, 270, 271, 272, 273, 28, 346, 89, 90, + 348, 91, 92, 93, 94, 137, 275, 276, 486, 277, + 487, 278, 279, 364, 560, 280, 432, 281, 282, 393, + 394, 512, 29, 284, 285, 286, 416, 417, 418, 528, + 656, 659, 660, 661, 287, 288, 289, 290, 291, 292, + 468, 95, 294, 340, 341, 342, 428, 508, 295, 296, + 297, 298, 327, 398, 399, 400, 401, 402, 403, 299, + 300, 408, 409, 410, 412, 413, 414, 517, 619, 184, + 185, 301, 53, 302, 303, 323, 304, 113, 325, 612, + 404, 139, 97, 458, 313, 140, 141, 142, 143, 72, + 493, 598, 388, 6, 7, 30, 31, 32, 60, 33, + 34, 35 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -595 +#define YYPACT_NINF -609 static const yytype_int16 yypact[] = { - -43, -9, -9, 31, -595, -595, -595, 55, -595, 73, - -595, 34, 39, 43, 27, 118, -595, 226, 80, -23, - -595, 91, -595, -595, 11, 105, 129, -595, 554, -595, - 55, -595, -595, 118, -595, -595, 132, 108, 134, 150, - 571, 162, 193, -595, -595, -595, -595, -595, -595, -595, - -595, -595, -595, -595, 49, -595, -595, 187, -595, -595, - -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, - -595, -595, -595, 121, 20, 202, -595, 226, -595, -595, - -595, -595, -595, -595, 122, -595, -595, -595, 767, 209, - 125, -595, -595, -595, -595, 128, -595, -595, -595, 131, - -595, -595, 633, -595, -595, 126, -595, -595, -595, -595, - 226, 226, 226, -595, 41, -595, 387, 1041, -595, 166, - 127, -595, -595, -23, -595, -595, -595, 138, 171, -595, - -595, -595, 139, 173, -595, -595, -595, 63, -595, -595, - -595, -595, -595, -595, -595, 554, -595, -595, -595, -595, - -595, -595, 172, 176, 172, -595, 178, -595, -595, 172, - 172, 172, -595, 252, 179, 180, 182, -595, -595, -595, - 264, -595, -595, 187, -595, -2, -595, 20, 265, 226, - -595, 767, -595, 261, -595, -595, 571, -595, 170, -595, - -595, -595, -595, -595, 279, 260, 158, -595, 329, -595, - -595, -595, -23, -595, -595, -595, -595, -595, 124, -595, - -595, 218, 219, -595, 220, 222, -595, -595, -595, -595, - -595, -595, -595, 532, -4, -595, -595, -4, 235, 240, - 124, -595, 311, -595, -595, -595, -595, -595, 170, -595, - -4, 162, 119, 230, 230, 315, 316, 317, 237, 1027, - 309, 622, 707, 807, 824, 398, 226, -595, 33, 459, - 322, -595, -595, -595, -595, -595, -595, -595, -595, -595, - -595, -595, -595, 323, 554, -595, -595, 324, -595, 325, - 841, -595, -595, -595, -595, -595, -595, -595, 326, -595, - -595, -595, 230, 241, 242, -595, -595, -595, -595, -595, - -595, -595, 328, -595, -595, 721, -99, 128, -595, -595, - -595, -595, -595, 226, 258, -595, -595, -595, -595, -595, - 226, -595, 226, -595, -595, -595, 858, 336, 337, 353, - 354, 344, 342, 343, 259, -595, 357, 358, 257, 347, - 277, 282, -595, -595, -595, -595, -595, -595, -595, 283, - -595, -595, -6, -6, -6, -6, -6, -6, -6, 291, - 3, 135, 135, 135, 359, -6, 135, -6, -595, -595, - 1011, 1027, -595, -595, -595, -595, 926, 943, -595, -595, - -595, -595, -595, -595, -595, -595, -595, 236, 767, 284, - 40, -595, -595, -20, -595, 310, 292, 369, 304, 305, - -595, -595, -595, -595, -595, -595, -595, 767, 402, 353, - -595, 767, 403, 354, -595, 767, 115, 344, -595, -595, - -595, 177, -595, -595, 767, 398, -595, 459, 84, 767, - -595, -595, 226, 226, 226, 226, 226, 226, 226, 382, - 384, 386, 401, 407, 408, 409, 410, 345, -6, 226, - 226, 226, -595, -595, -595, -595, -595, -595, 875, 892, - 909, 226, 226, 767, 226, -595, -595, -595, 230, -595, - -595, -595, -595, -595, -595, -595, -595, 273, 623, 637, - 637, 33, -595, -595, -595, 554, -595, -595, -595, -595, - 637, 422, -11, 767, -595, 767, -595, -595, 172, -595, - -595, -595, 340, -595, -595, -595, -595, -595, 226, -595, - -595, 1055, 767, -595, 858, 75, 426, 427, -595, 428, - 430, -595, 431, 1041, 1027, 1041, 432, -595, 434, -595, - -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, - -595, 226, 226, 226, 226, 226, 226, 226, 226, 226, - -595, 226, -595, -595, -595, -595, -595, -595, -595, -595, - -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, - -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, - -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, - -595, -595, -595, -595, -595, -595, 994, 960, 977, -595, - 364, 365, 767, -595, -595, -595, -595, 170, -595, -595, - -595, -595, -595, -595, 172, -595, -595, -595, -595, -595, - -595, -595, 452, 367, -595, -595, 57, -595, -595, -595, - -595, -595, -595, -595, -595, -595, -595, -595, -595, -595, - -595, -595, -595, -595, -595, -595, 554, 554, -595, 370, - -595, 474, 1041, -595, 459, -595, 465, 57, -595, 125, - 125, -595, 1011, -595, 458, 460, -595, -595, -595, -595 + 5, -6, -6, 36, -609, -609, -609, 69, -609, 86, + -609, 16, 54, 19, 8, 103, -609, 1040, 98, 21, + -609, 119, -609, -609, 41, 128, 132, -609, 652, -609, + 69, -609, -609, 103, -609, -609, 141, 142, 161, 185, + 673, 151, 170, -609, -609, -609, -609, -609, -609, -609, + -609, -609, -609, -609, 111, -609, -609, 190, -609, -609, + -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, + -609, -609, -609, 120, 17, 202, -609, 1040, -609, -609, + -609, -609, -609, -609, 122, -609, -609, -609, 772, 210, + 126, -609, -609, -609, -609, 127, -609, -609, -609, 149, + -609, -609, 698, -609, -609, 129, -609, -609, -609, -609, + 1040, 1040, 1040, -609, 44, -609, 674, 1013, -609, 125, + 153, -609, -609, 21, -609, -609, -609, 165, 166, -609, + -609, -609, 172, 176, -609, -609, -609, 1, -609, -609, + -609, -609, -609, -609, -609, 652, -609, -609, -609, -609, + -609, -609, 167, 174, 167, -609, 180, -609, -609, 167, + 167, 167, -609, 256, 181, 197, 198, -609, -609, -609, + 292, -609, -609, 190, -609, -3, -609, 17, 293, 1040, + -609, 772, -609, 283, -609, -609, 673, -609, 433, -609, + -609, -609, -609, -609, 282, 285, 99, -609, 323, -609, + -609, -609, 21, -609, -609, -609, -609, -609, 50, -609, + -609, 211, 222, -609, 223, 224, -609, -609, -609, -609, + -609, -609, -609, 273, 189, -609, -609, 189, 235, 241, + 50, -609, 314, -609, -609, -609, -609, -609, 433, -609, + 189, 151, 134, 230, 230, 316, 320, 321, 237, 999, + 313, 534, 651, 789, 813, 576, 1040, -609, 13, 411, + 325, -609, -609, -609, -609, -609, -609, -609, -609, -609, + -609, -609, -609, 326, 652, -609, -609, 329, -609, 330, + 830, -609, -609, -609, -609, -609, -609, -609, 331, -609, + -609, -609, 230, 238, 245, -609, -609, -609, -609, -609, + -609, -609, 334, -609, -609, 726, -52, 127, -609, -609, + -609, -609, -609, 1040, 260, -609, -609, -609, -609, -609, + 1040, -609, 1040, -609, -609, -609, 847, 337, 338, 354, + 355, 345, 342, 344, 258, -609, 349, 351, 264, 335, + 267, 268, -609, -609, -609, -609, -609, -609, -609, 269, + -609, -609, -10, -10, -10, -10, -10, -10, -10, 159, + -8, 156, 156, 156, 353, -10, 156, -10, -609, -609, + 983, 999, -609, -609, -609, -609, 915, 932, -609, -609, + -609, -609, -609, -609, -609, -609, -609, 556, 772, 276, + 121, -609, -609, -15, -609, 299, 277, 347, 284, 281, + -609, -609, -609, -609, -609, -609, -609, 772, 381, 354, + -609, 772, 382, 355, -609, 772, 87, 345, -609, -609, + -609, 229, -609, -609, 772, 576, -609, 411, 84, 772, + -609, -609, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 361, + 363, 364, 368, 369, 377, 378, 379, 1049, -10, 1040, + 1040, 1040, -609, -609, -609, -609, -609, -609, 864, 881, + 898, 1040, 1040, 772, 1040, -609, -609, -609, 230, -609, + -609, -609, -609, -609, -609, -609, -609, 618, 203, 617, + 617, 13, -609, -609, -609, 652, -609, -609, -609, -609, + 617, 390, -11, 772, -609, 772, -609, -609, 167, -609, + -609, -609, 306, 167, -609, -609, -609, -609, -609, -609, + 1040, -609, -609, 1027, 772, -609, 847, 52, 393, 396, + -609, 400, 401, -609, 402, 1013, 999, 1013, 403, -609, + 404, -609, -609, -609, -609, -609, -609, -609, -609, -609, + -609, -609, -609, 1040, 1040, 1040, 1040, 1040, 1040, 1040, + 1040, 1040, -609, 1040, -609, -609, -609, -609, -609, -609, + -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, + -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, + -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, + -609, -609, -609, -609, -609, -609, -609, -609, 461, 949, + 966, -609, 319, 324, 772, -609, -609, -609, -609, 433, + -609, -609, -609, -609, -609, -609, -609, 167, -609, -609, + -609, -609, -609, -609, -609, 407, 343, -609, -609, 15, + -609, -609, -609, -609, -609, -609, -609, -609, -609, -609, + -609, -609, -609, -609, -609, -609, -609, -609, -609, 652, + 652, -609, 322, -609, 444, 1013, -609, 411, -609, 439, + 15, -609, 126, 126, -609, 983, -609, 434, 445, -609, + -609, -609, -609 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -595, -595, -595, 17, -595, 399, 7, -595, -595, -595, - -595, -595, 335, -595, -595, 285, -595, -595, -595, -595, - -1, -595, -595, 8, -595, -595, 346, -595, -595, -595, - 330, 467, -595, -595, -595, -595, -231, -595, -595, -595, - -595, -595, -595, -595, -595, -595, -595, 270, -595, -595, - -202, -105, -595, -595, 361, -595, -595, -595, -201, -595, - -196, -595, -595, -595, -595, -213, -595, 248, -406, -595, - 378, 50, -595, -90, -595, -595, -595, -595, -595, -595, - -595, -595, -595, -595, -595, -251, -595, -594, -595, 28, - -595, -195, -595, -595, -595, -595, -595, 123, -595, -595, - -595, -595, -112, -595, -595, -236, -595, -595, 22, -110, - -115, 299, -595, -595, -418, -595, 133, -595, -595, -595, - -595, -230, -595, -595, 45, -595, -288, 51, -595, -595, - -595, -595, 144, -595, -595, 142, -595, -595, -150, 59, - -595, -595, -595, -595, -595, -595, 1, -595, -595, -82, - -27, 175, -164, -197, -198, -595, -25, -17, -211, -595, - -409, -595, -595, -595, -595, 527, -595, 531, -595, -595, - 52 + -609, -609, -609, 24, -609, 367, 9, -609, -609, -609, + -609, -609, 303, -609, -609, 253, -609, -609, -609, -609, + 3, -609, -609, 10, -609, -609, 311, -609, -609, -609, + 301, 437, -609, -609, -609, -609, -231, -609, -609, -609, + -609, -609, -609, -609, -609, -609, -609, -609, 234, -609, + -609, -195, -98, -609, -609, 312, -609, -609, -609, -193, + -609, -192, -609, -609, -609, -609, -210, -609, 216, -484, + -609, 346, 7, -609, -90, -609, -609, -609, -609, -609, + -609, -609, -609, -609, -609, -609, -284, -609, -608, -609, + -16, -609, -184, -609, -609, -609, -609, -609, 78, -609, + -609, -609, -609, -163, -609, -609, -232, -609, -609, -9, + -149, -115, 270, -609, -609, -413, -609, 92, -609, -609, + -609, -609, -228, -609, -609, -1, -609, -264, 11, -609, + -609, -609, -609, 112, -609, -609, 109, -609, -609, -150, + -151, -609, -609, -609, -609, -609, -609, -48, -609, -609, + -66, -27, 136, -278, -187, -217, -609, -25, -17, -208, + -609, -404, -609, -609, -609, -609, 494, -609, 504, -609, + -609, 18 }; /* 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 -366 +#define YYTABLE_NINF -368 static const yytype_int16 yytable[] = { - 71, 96, 170, 98, 187, 146, 138, 319, 46, 531, - 274, 99, 307, 333, 328, 507, 44, 49, 174, 9, - -274, 266, 267, 109, -160, 305, 4, 269, 283, -274, - 314, 10, 655, 201, 308, 309, 310, 311, 274, 430, - 307, -6, 36, 320, 37, 38, 39, 40, 450, 266, - 267, 12, 13, 305, 14, 269, 283, 336, 41, 115, - 135, 343, 369, 655, 11, 12, 13, 61, 14, 240, - 597, 598, 1, 2, 36, 496, 37, 38, 39, 40, - 54, 602, 366, 12, 13, 61, 14, 55, 654, 56, - 41, 15, 16, 164, 165, 166, 74, 226, 217, 210, - 171, 508, 433, 434, 435, 436, 437, 438, 293, 202, - 203, 204, 88, 46, 462, 431, 464, 73, 96, 516, - 98, 44, 49, 519, 451, 205, 76, 522, 99, 523, - 77, 123, 124, 125, 293, 470, 293, 497, 498, 499, - 78, 500, 501, 502, 524, 17, 126, 525, 217, 18, - 57, 488, -275, 58, 104, 16, 88, 110, 111, 17, - 112, -275, 135, 18, 79, 322, 19, 103, 338, 109, - 117, 218, 20, 614, 485, 615, 492, 17, 473, 476, - 105, 18, 498, 499, 349, 500, 501, 180, 181, 490, - 452, 453, 454, 455, 456, 457, 106, 551, 459, 460, - 110, 111, 463, 112, 221, 222, 306, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 213, 389, 190, 191, - 192, 218, 260, 80, 81, 82, 83, 530, 114, 343, - 227, 228, 171, 118, 306, 122, 664, 131, 572, 337, - 659, 660, 321, 324, 144, -275, 145, 96, 163, 98, - 260, 88, 173, 365, -274, 367, 293, 99, 176, 178, - 559, 563, 567, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 293, 477, 63, 64, 65, 66, 67, 68, + 71, 96, 170, 98, 187, 146, 305, 319, 190, 191, + 192, 99, 46, 274, 533, 307, 328, 333, 44, 49, + 509, 658, 138, 109, -162, 174, 9, 240, 266, 4, + 267, 269, 201, 61, 305, 430, 10, 450, 336, 283, + 314, 274, 343, 307, -6, 36, 657, 37, 38, 39, + 40, 61, 658, 320, 12, 13, 266, 14, 267, 269, + 135, 41, 54, 366, 369, 56, 115, 283, -276, 433, + 434, 435, 436, 437, 438, 599, 600, -276, 11, 12, + 13, 462, 14, 464, 459, 460, 604, 36, 463, 37, + 38, 39, 40, 164, 165, 166, 12, 13, 217, 14, + 171, 525, 55, 41, 226, 15, 16, 510, 293, 202, + 203, 204, 431, 88, 451, 210, 526, 46, 96, 527, + 98, 1, 2, 44, 49, 205, 180, 181, 99, 123, + 124, 125, 57, -277, 293, 73, 293, 88, 58, 470, + 16, 74, -277, 518, 126, 221, 222, 521, 217, 17, + 617, 524, 618, 18, 76, 488, 496, 227, 228, 473, + 476, 77, 135, 78, 553, 662, 663, 79, 338, 109, + 490, 218, 110, 111, 17, 112, 103, 485, 18, 492, + 322, 19, 498, 499, 349, 500, 501, 20, 104, 110, + 111, 17, 112, 321, 324, 18, 439, 440, 441, 442, + 443, 444, 445, 446, 447, 114, 306, 105, 532, 448, + 343, 452, 453, 454, 455, 456, 457, 389, 497, 498, + 499, 218, 500, 501, 502, 503, 260, 308, 309, 310, + 311, 106, 171, 117, 306, 122, 118, 131, -348, 337, + 574, 561, 565, 569, 667, 144, -277, 96, 145, 98, + 172, 88, 163, 365, 260, 367, 293, 99, 575, 576, + 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, + 587, 588, 293, -276, 36, 80, 81, 82, 83, 173, + 239, 449, 11, 12, 13, 240, 176, 183, 177, 241, + 242, 243, 244, 178, 186, 245, 391, 246, 179, 247, + 188, 248, 193, 395, 194, 396, 249, 250, 58, 251, + 252, 63, 64, 65, 66, 253, 254, 255, 256, 257, + 195, 196, 494, 258, 85, 86, 87, 199, 208, 211, + 219, 224, 235, 589, 220, 590, 591, 592, 593, 594, + 595, 596, 597, 236, 237, 315, 238, 316, 608, 318, + 326, 329, 610, 469, 171, 330, 331, 259, 531, 334, + 344, 345, 491, 535, 350, 351, 368, 370, 371, 372, + 306, 392, 405, 406, 407, 415, 411, 419, 652, 420, + 421, 642, 645, 648, 422, 19, 423, 424, 426, 425, + 427, 601, 429, 259, 530, 603, 511, 572, 461, 495, + 513, 514, 605, 516, 519, 515, 543, 522, 544, 545, + 625, 627, 628, 546, 547, 536, 537, 538, 539, 540, + 541, 542, 548, 549, 550, -166, 609, 606, 620, 607, + 552, 621, 554, 555, 556, 622, 623, 624, 629, 630, + 343, 649, 654, 664, 570, 571, 650, 573, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 339, 96, 665, + 98, 136, 85, 86, 87, 655, 668, 653, 99, 671, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 213, + 672, 167, 209, 317, 200, 335, 613, 212, 116, 207, + 347, 182, 602, 395, 611, 529, 614, 669, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 641, 171, 171, + 171, 136, 85, 86, 87, 616, 670, 626, 332, 217, + 534, 520, 523, 489, 100, 615, 631, 632, 633, 634, + 635, 636, 637, 638, 639, 36, 640, 101, 651, 0, + 666, 0, 0, 11, 12, 13, 240, 0, 0, 0, + 241, 242, 243, 244, 0, 0, 245, 88, 246, 0, + 247, 0, 248, 0, 0, 0, 0, 249, 250, 58, + 0, 252, 63, 64, 65, 66, 253, 254, 255, 256, + 257, 0, 0, 0, 258, 85, 86, 87, 0, 0, + 0, 0, 218, 477, 63, 64, 65, 66, 67, 68, 69, 70, 478, 81, 479, 480, 481, 85, 86, 87, - 172, 183, 177, 88, 179, 186, 391, 188, 193, 199, - 208, 194, 195, 395, 196, 396, 494, 211, -159, 220, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, 219, 439, 440, - 441, 442, 443, 444, 445, 446, 447, 224, 235, 236, - 237, 448, 529, 238, 315, 316, 318, 533, 606, 326, - 329, 330, 331, 469, 171, 334, 259, 344, 345, 350, - 351, 368, 491, 372, 371, 482, 483, 484, 392, 370, - 306, 405, 406, 407, 415, 411, 649, 419, 420, 424, - 421, 570, 62, 63, 64, 65, 66, 67, 68, 69, - 549, 599, 422, 423, 528, 601, -137, 426, 639, 642, - 645, 425, 603, 427, 461, 429, 495, 509, 622, 624, - 625, 604, 449, 605, 511, 534, 535, 536, 537, 538, - 539, 540, 168, 512, 513, 517, 514, 541, 520, 542, - 550, 543, 552, 553, 554, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 568, 569, 544, 571, 136, 85, - 86, 87, 545, 546, 547, 548, 343, -164, 96, 607, - 98, 617, 618, 619, 650, 620, 621, 626, 99, 627, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 610, 646, 647, 651, 652, 662, - 661, 395, 665, 668, 611, 669, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 339, 171, 171, 171, 136, - 85, 86, 87, 167, 209, 317, 212, 217, 116, 200, - 648, 335, 347, 182, 628, 629, 630, 631, 632, 633, - 634, 635, 636, 36, 637, 600, 608, 663, 207, 239, - 527, 11, 12, 13, 240, 666, 623, 332, 241, 242, - 243, 244, 667, 518, 245, 521, 246, 100, 247, 613, - 248, 532, 489, 612, 101, 249, 250, 58, 251, 252, - 63, 64, 65, 66, 253, 254, 255, 256, 257, 0, - 0, 0, 258, 85, 86, 87, 0, 0, 0, 0, - 218, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 80, 81, 82, 83, 84, 85, 86, 87, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 107, 0, 96, - 96, 98, 98, 36, 0, 0, 0, 0, 0, 99, - 99, 11, 12, 13, 240, 171, 0, 0, 241, 242, - 243, 244, 0, 19, 245, 469, 246, 0, 247, 0, - 248, 259, 0, 0, 0, 249, 250, 58, -346, 252, - 63, 64, 65, 66, 253, 254, 255, 256, 257, 147, - 0, 0, 258, 85, 86, 87, 0, 88, 573, 574, - 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, - 585, 586, 573, 574, 575, 576, 577, 578, 579, 580, - 581, 582, 583, 584, 585, 586, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, - 0, 259, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 587, 0, 588, 589, 590, 591, 592, 593, - 594, 595, 0, 0, 0, 0, 587, 0, 588, 589, - 590, 591, 592, 593, 594, 595, -365, -365, -365, -365, - -365, -365, -365, -365, -365, -365, -365, -365, -365, -365, - 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, - 383, 384, 385, 386, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 80, 81, 82, 83, 136, 85, 86, - 87, 0, 0, 0, 0, 0, -365, 0, 0, -365, - 0, 0, 0, 0, 0, -365, 0, 0, 0, 0, - 0, 0, 0, 387, -228, -228, -228, -228, -228, -228, - -228, -228, -228, -228, -228, -228, -228, -228, -228, -228, - -228, -229, -229, -229, -229, -229, -229, -229, -229, -229, - -229, -229, -229, -229, -229, -229, -229, -229, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 81, 362, - 363, 136, 85, 86, 87, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 397, 81, 82, 83, 136, 85, + 0, 0, 0, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 96, 96, 98, 98, 136, 85, 86, 87, + 0, 0, 99, 99, 0, 0, 0, 0, 171, 0, + 0, 0, 0, 0, 0, 0, 19, 0, 469, 0, + 0, 0, 0, -161, 259, -139, -139, -139, -139, -139, + -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, + -139, -139, 575, 576, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 588, 482, 483, 484, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 80, 81, + 82, 83, 84, 85, 86, 87, 0, 0, 0, 168, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 107, + -367, -367, -367, -367, -367, -367, -367, -367, -367, -367, + -367, -367, -367, -367, 147, 0, 0, 0, 0, 0, + 0, 0, -139, 0, 0, 0, 0, 589, 0, 590, + 591, 592, 593, 594, 595, 596, 597, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, -367, 0, 0, -367, 0, 88, 0, 0, 0, + -367, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 80, 81, + 82, 83, 136, 85, 86, 87, -230, -230, -230, -230, + -230, -230, -230, -230, -230, -230, -230, -230, -230, -230, + -230, -230, -230, 0, 0, 0, 0, 0, 0, 387, + -231, -231, -231, -231, -231, -231, -231, -231, -231, -231, + -231, -231, -231, -231, -231, -231, -231, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 81, 362, 363, + 136, 85, 86, 87, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 397, 81, 82, 83, 136, 85, 86, + 87, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 557, 0, 558, 559, 136, 85, 86, 87, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 562, 0, 563, + 564, 136, 85, 86, 87, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 566, 0, 567, 568, 136, 85, 86, 87, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 555, 0, 556, 557, 136, 85, 86, 87, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 560, 0, - 561, 562, 136, 85, 86, 87, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 564, 0, 565, 566, 136, + 70, 0, 0, 471, 472, 136, 85, 86, 87, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 0, 0, + 474, 475, 136, 85, 86, 87, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 0, 0, 643, 644, 136, 85, 86, 87, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 0, 0, 471, 472, 136, 85, 86, 87, + 69, 70, 0, 0, 646, 647, 136, 85, 86, 87, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 465, + 0, 0, 0, 466, 0, 467, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 257, 0, 0, 0, 169, 62, 63, 64, 65, 66, 67, 68, 69, 70, 0, - 0, 474, 475, 136, 85, 86, 87, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 0, 0, 640, 641, - 136, 85, 86, 87, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 0, 0, 643, 644, 136, 85, 86, - 87, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 638, 0, 0, 0, 136, 85, 86, 87, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 465, 0, 0, - 0, 466, 0, 467, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 257, 0, 0, 0, 169, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 0, 0, 0, - 0, 169, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 80, 81, 82, 83 + 0, 0, 0, 169, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 80, 81, 82, 83, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 62, 63, 64, 65, + 66, 67, 68, 69, 551 }; static const yytype_int16 yycheck[] = { - 17, 28, 117, 28, 154, 95, 88, 238, 9, 427, - 223, 28, 223, 249, 244, 35, 9, 9, 123, 2, - 119, 223, 223, 40, 35, 223, 35, 223, 223, 128, - 227, 0, 626, 35, 38, 39, 40, 41, 251, 45, - 251, 0, 1, 240, 3, 4, 5, 6, 45, 251, - 251, 10, 11, 251, 13, 251, 251, 255, 17, 42, - 77, 259, 292, 657, 9, 10, 11, 15, 13, 12, - 479, 480, 115, 116, 1, 35, 3, 4, 5, 6, - 46, 490, 280, 10, 11, 33, 13, 48, 31, 46, - 17, 36, 37, 110, 111, 112, 119, 202, 188, 181, - 117, 121, 353, 354, 355, 356, 357, 358, 223, 111, - 112, 113, 123, 114, 365, 121, 367, 37, 145, 407, - 145, 114, 114, 411, 121, 127, 35, 415, 145, 14, - 119, 111, 112, 113, 249, 371, 251, 97, 98, 99, - 35, 101, 102, 103, 29, 104, 126, 32, 238, 108, - 123, 387, 119, 35, 46, 37, 123, 38, 39, 104, - 41, 128, 179, 108, 35, 46, 111, 35, 258, 186, - 121, 188, 117, 98, 387, 100, 387, 104, 376, 377, - 46, 108, 98, 99, 274, 101, 102, 124, 125, 387, - 55, 56, 57, 58, 59, 60, 46, 448, 362, 363, - 38, 39, 366, 41, 46, 47, 223, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 307, 159, 160, - 161, 238, 223, 46, 47, 48, 49, 425, 35, 427, - 106, 107, 249, 46, 251, 114, 654, 35, 468, 256, - 646, 647, 241, 242, 35, 123, 121, 274, 122, 274, - 251, 123, 125, 280, 123, 280, 371, 274, 120, 120, - 458, 459, 460, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 387, 37, 38, 39, 40, 41, 42, 43, + 17, 28, 117, 28, 154, 95, 223, 238, 159, 160, + 161, 28, 9, 223, 427, 223, 244, 249, 9, 9, + 35, 629, 88, 40, 35, 123, 2, 12, 223, 35, + 223, 223, 35, 15, 251, 45, 0, 45, 255, 223, + 227, 251, 259, 251, 0, 1, 31, 3, 4, 5, + 6, 33, 660, 240, 10, 11, 251, 13, 251, 251, + 77, 17, 46, 280, 292, 46, 42, 251, 120, 353, + 354, 355, 356, 357, 358, 479, 480, 129, 9, 10, + 11, 365, 13, 367, 362, 363, 490, 1, 366, 3, + 4, 5, 6, 110, 111, 112, 10, 11, 188, 13, + 117, 14, 48, 17, 202, 36, 37, 122, 223, 112, + 113, 114, 122, 124, 122, 181, 29, 114, 145, 32, + 145, 116, 117, 114, 114, 128, 125, 126, 145, 112, + 113, 114, 124, 120, 249, 37, 251, 124, 35, 371, + 37, 120, 129, 407, 127, 46, 47, 411, 238, 105, + 98, 415, 100, 109, 35, 387, 35, 107, 108, 376, + 377, 120, 179, 35, 448, 649, 650, 35, 258, 186, + 387, 188, 38, 39, 105, 41, 35, 387, 109, 387, + 46, 112, 98, 99, 274, 101, 102, 118, 46, 38, + 39, 105, 41, 241, 242, 109, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 35, 223, 46, 425, 50, + 427, 55, 56, 57, 58, 59, 60, 307, 97, 98, + 99, 238, 101, 102, 103, 104, 223, 38, 39, 40, + 41, 46, 249, 122, 251, 115, 46, 35, 35, 256, + 468, 458, 459, 460, 657, 35, 124, 274, 122, 274, + 125, 124, 123, 280, 251, 280, 371, 274, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 387, 124, 1, 46, 47, 48, 49, 126, + 7, 122, 9, 10, 11, 12, 121, 120, 122, 16, + 17, 18, 19, 121, 120, 22, 313, 24, 122, 26, + 120, 28, 46, 320, 123, 322, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 123, 123, 388, 50, 51, 52, 53, 35, 35, 46, + 48, 8, 121, 130, 49, 132, 133, 134, 135, 136, + 137, 138, 139, 121, 121, 110, 122, 106, 498, 35, + 120, 35, 503, 370, 371, 35, 35, 120, 424, 46, + 35, 35, 387, 429, 35, 35, 35, 129, 123, 35, + 387, 111, 35, 35, 20, 30, 21, 35, 609, 35, + 122, 598, 599, 600, 35, 112, 35, 123, 121, 54, + 122, 481, 123, 120, 421, 485, 97, 463, 45, 123, + 123, 54, 492, 122, 23, 121, 45, 25, 45, 45, + 525, 526, 527, 45, 45, 432, 433, 434, 435, 436, + 437, 438, 45, 45, 45, 35, 120, 493, 35, 495, + 447, 35, 449, 450, 451, 35, 35, 35, 35, 35, + 657, 122, 35, 121, 461, 462, 122, 464, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 485, 15, + 485, 50, 51, 52, 53, 122, 27, 617, 485, 35, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 35, 114, 179, 230, 173, 251, 513, 186, 51, 177, + 274, 145, 485, 510, 510, 417, 513, 660, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 525, 526, + 527, 50, 51, 52, 53, 516, 665, 526, 248, 609, + 428, 409, 413, 387, 30, 514, 543, 544, 545, 546, + 547, 548, 549, 550, 551, 1, 553, 33, 604, -1, + 655, -1, -1, 9, 10, 11, 12, -1, -1, -1, + 16, 17, 18, 19, -1, -1, 22, 124, 24, -1, + 26, -1, 28, -1, -1, -1, -1, 33, 34, 35, + -1, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, -1, -1, -1, 50, 51, 52, 53, -1, -1, + -1, -1, 609, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 124, 119, 121, 123, 121, 119, 313, 119, 46, 35, - 35, 122, 122, 320, 122, 322, 388, 46, 35, 49, + -1, -1, -1, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 649, 650, 649, 650, 50, 51, 52, 53, + -1, -1, 649, 650, -1, -1, -1, -1, 655, -1, + -1, -1, -1, -1, -1, -1, 112, -1, 665, -1, + -1, -1, -1, 35, 120, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 130, 131, 132, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, -1, -1, -1, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 48, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 8, 120, 120, - 120, 50, 424, 121, 109, 105, 35, 429, 498, 119, - 35, 35, 35, 370, 371, 46, 119, 35, 35, 35, - 35, 35, 387, 35, 122, 129, 130, 131, 110, 128, - 387, 35, 35, 20, 30, 21, 607, 35, 35, 122, - 121, 463, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 481, 35, 35, 421, 485, 123, 120, 596, 597, - 598, 54, 492, 121, 45, 122, 122, 97, 523, 524, - 525, 493, 121, 495, 122, 432, 433, 434, 435, 436, - 437, 438, 35, 54, 120, 23, 121, 45, 25, 45, - 447, 45, 449, 450, 451, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 461, 462, 45, 464, 50, 51, - 52, 53, 45, 45, 45, 45, 654, 35, 485, 119, - 485, 35, 35, 35, 614, 35, 35, 35, 485, 35, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 511, 121, 121, 35, 121, 15, - 120, 508, 27, 35, 511, 35, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 523, 524, 525, 50, - 51, 52, 53, 114, 179, 230, 186, 607, 51, 173, - 602, 251, 274, 145, 541, 542, 543, 544, 545, 546, - 547, 548, 549, 1, 551, 485, 508, 652, 177, 7, - 417, 9, 10, 11, 12, 657, 524, 248, 16, 17, - 18, 19, 662, 409, 22, 413, 24, 30, 26, 514, - 28, 428, 387, 512, 33, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, -1, - -1, -1, 50, 51, 52, 53, -1, -1, -1, -1, - 607, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, -1, 646, - 647, 646, 647, 1, -1, -1, -1, -1, -1, 646, - 647, 9, 10, 11, 12, 652, -1, -1, 16, 17, - 18, 19, -1, 111, 22, 662, 24, -1, 26, -1, - 28, 119, -1, -1, -1, 33, 34, 35, 35, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 36, - -1, -1, 50, 51, 52, 53, -1, 123, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - -1, -1, -1, 111, -1, -1, -1, -1, -1, -1, - -1, 119, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 129, -1, 131, 132, 133, 134, 135, 136, - 137, 138, -1, -1, -1, -1, 129, -1, 131, 132, - 133, 134, 135, 136, 137, 138, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, -1, -1, -1, -1, -1, 119, -1, -1, 122, - -1, -1, -1, -1, -1, 128, -1, -1, -1, -1, - -1, -1, -1, 122, 37, 38, 39, 40, 41, 42, + 79, 80, 81, 82, 36, -1, -1, -1, -1, -1, + -1, -1, 124, -1, -1, -1, -1, 130, -1, 132, + 133, 134, 135, 136, 137, 138, 139, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 120, -1, -1, 123, -1, 124, -1, -1, -1, + 129, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, -1, -1, -1, -1, -1, -1, 123, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 46, -1, 48, 49, 50, 51, 52, 53, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, -1, 48, 49, 50, 51, 52, 53, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 42, 43, 44, 45, 46, -1, 48, 49, 50, 51, 52, 53, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, -1, 48, 49, 50, 51, 52, 53, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, -1, + 45, -1, -1, 48, 49, 50, 51, 52, 53, 37, + 38, 39, 40, 41, 42, 43, 44, 45, -1, -1, 48, 49, 50, 51, 52, 53, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, -1, 48, 49, 50, + 41, 42, 43, 44, 45, -1, -1, 48, 49, 50, 51, 52, 53, 37, 38, 39, 40, 41, 42, 43, 44, 45, -1, -1, 48, 49, 50, 51, 52, 53, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + -1, -1, -1, 50, -1, 52, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, -1, -1, -1, 50, 37, 38, 39, 40, 41, 42, 43, 44, 45, -1, - -1, 48, 49, 50, 51, 52, 53, 37, 38, 39, - 40, 41, 42, 43, 44, 45, -1, -1, 48, 49, - 50, 51, 52, 53, 37, 38, 39, 40, 41, 42, - 43, 44, 45, -1, -1, 48, 49, 50, 51, 52, - 53, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, -1, -1, -1, 50, 51, 52, 53, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, -1, -1, - -1, 50, -1, 52, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, -1, -1, -1, 50, 37, 38, - 39, 40, 41, 42, 43, 44, 45, -1, -1, -1, - -1, 50, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49 + -1, -1, -1, 50, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 37, 38, 39, 40, + 41, 42, 43, 44, 45 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint16 yystos[] = { - 0, 115, 116, 140, 35, 142, 301, 302, 141, 142, - 0, 9, 10, 11, 13, 36, 37, 104, 108, 111, - 117, 145, 146, 147, 148, 159, 162, 189, 204, 230, - 303, 304, 305, 307, 308, 309, 1, 3, 4, 5, - 6, 17, 143, 144, 145, 158, 159, 160, 161, 162, - 166, 168, 199, 280, 46, 48, 46, 123, 35, 197, - 306, 309, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 296, 297, 37, 119, 190, 35, 119, 35, 35, - 46, 47, 48, 49, 50, 51, 52, 53, 123, 206, - 207, 209, 210, 211, 212, 249, 289, 290, 295, 296, - 304, 306, 170, 35, 46, 46, 46, 46, 169, 296, - 38, 39, 41, 285, 35, 142, 170, 121, 46, 163, - 164, 165, 114, 111, 112, 113, 126, 191, 192, 193, - 194, 35, 149, 150, 151, 296, 50, 213, 288, 289, - 293, 294, 295, 296, 35, 121, 212, 36, 83, 84, + 0, 116, 117, 141, 35, 143, 303, 304, 142, 143, + 0, 9, 10, 11, 13, 36, 37, 105, 109, 112, + 118, 146, 147, 148, 149, 160, 163, 191, 206, 232, + 305, 306, 307, 309, 310, 311, 1, 3, 4, 5, + 6, 17, 144, 145, 146, 159, 160, 161, 162, 163, + 167, 169, 201, 282, 46, 48, 46, 124, 35, 199, + 308, 311, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 298, 299, 37, 120, 192, 35, 120, 35, 35, + 46, 47, 48, 49, 50, 51, 52, 53, 124, 208, + 209, 211, 212, 213, 214, 251, 291, 292, 297, 298, + 306, 308, 171, 35, 46, 46, 46, 46, 170, 298, + 38, 39, 41, 287, 35, 143, 171, 122, 46, 164, + 165, 166, 115, 112, 113, 114, 127, 193, 194, 195, + 196, 35, 150, 151, 152, 298, 50, 215, 290, 291, + 295, 296, 297, 298, 35, 122, 214, 36, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 171, 122, 296, 296, 296, 144, 35, 50, - 249, 296, 124, 125, 190, 195, 120, 121, 120, 121, - 124, 125, 209, 119, 277, 278, 119, 277, 119, 172, - 278, 278, 278, 46, 122, 122, 122, 176, 177, 35, - 165, 35, 111, 112, 113, 127, 196, 193, 35, 151, - 288, 46, 169, 46, 173, 174, 175, 212, 296, 48, - 49, 46, 47, 184, 8, 178, 190, 106, 107, 152, - 153, 154, 155, 156, 157, 120, 120, 120, 121, 7, + 95, 96, 172, 123, 298, 298, 298, 145, 35, 50, + 251, 298, 125, 126, 192, 197, 121, 122, 121, 122, + 125, 126, 211, 120, 279, 280, 120, 279, 120, 173, + 280, 280, 280, 46, 123, 123, 123, 177, 178, 35, + 166, 35, 112, 113, 114, 128, 198, 195, 35, 152, + 290, 46, 170, 46, 174, 175, 176, 214, 298, 48, + 49, 46, 47, 186, 8, 179, 192, 107, 108, 153, + 154, 155, 156, 157, 158, 121, 121, 121, 122, 7, 12, 16, 17, 18, 19, 22, 24, 26, 28, 33, - 34, 36, 37, 42, 43, 44, 45, 46, 50, 119, - 159, 167, 185, 186, 187, 188, 189, 197, 198, 199, - 200, 201, 202, 203, 204, 214, 215, 217, 219, 220, - 223, 225, 226, 230, 231, 232, 233, 242, 243, 244, - 245, 246, 247, 249, 250, 256, 257, 258, 259, 267, - 268, 279, 281, 282, 284, 293, 296, 297, 38, 39, - 40, 41, 179, 292, 292, 109, 105, 154, 35, 175, - 292, 285, 46, 283, 285, 286, 119, 260, 260, 35, - 35, 35, 250, 244, 46, 186, 293, 296, 212, 46, - 251, 252, 253, 293, 35, 35, 205, 206, 208, 212, + 34, 36, 37, 42, 43, 44, 45, 46, 50, 120, + 160, 168, 187, 188, 189, 190, 191, 199, 200, 201, + 202, 203, 204, 205, 206, 216, 217, 219, 221, 222, + 225, 227, 228, 232, 233, 234, 235, 244, 245, 246, + 247, 248, 249, 251, 252, 258, 259, 260, 261, 269, + 270, 281, 283, 284, 286, 295, 298, 299, 38, 39, + 40, 41, 180, 294, 294, 110, 106, 155, 35, 176, + 294, 287, 46, 285, 287, 288, 120, 262, 262, 35, + 35, 35, 252, 246, 46, 188, 295, 298, 214, 46, + 253, 254, 255, 295, 35, 35, 207, 208, 210, 214, 35, 35, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 48, 49, 221, 289, 293, 295, 35, 260, - 128, 122, 35, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 122, 300, 212, - 180, 296, 110, 227, 228, 296, 296, 46, 261, 262, - 263, 264, 265, 266, 288, 35, 35, 20, 269, 270, - 271, 21, 272, 273, 274, 30, 234, 235, 236, 35, - 35, 121, 35, 35, 122, 54, 120, 121, 254, 122, - 45, 121, 224, 224, 224, 224, 224, 224, 224, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 50, 121, - 45, 121, 55, 56, 57, 58, 59, 60, 291, 291, - 291, 45, 224, 291, 224, 46, 50, 52, 248, 296, - 244, 48, 49, 293, 48, 49, 293, 37, 46, 48, - 49, 50, 129, 130, 131, 204, 216, 218, 244, 290, - 293, 295, 297, 298, 288, 122, 35, 97, 98, 99, - 101, 102, 103, 181, 182, 183, 255, 35, 121, 97, - 229, 122, 54, 120, 121, 275, 265, 23, 271, 265, - 25, 274, 265, 14, 29, 32, 237, 236, 289, 288, - 293, 253, 255, 288, 296, 296, 296, 296, 296, 296, - 296, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 296, 224, 296, 296, 296, 46, 48, 49, 222, 293, - 46, 48, 49, 293, 46, 48, 49, 293, 296, 296, - 288, 296, 260, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 129, 131, 132, - 133, 134, 135, 136, 137, 138, 299, 299, 299, 212, - 210, 212, 299, 212, 288, 288, 277, 119, 228, 287, - 289, 296, 266, 263, 98, 100, 276, 35, 35, 35, - 35, 35, 249, 247, 249, 249, 35, 35, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 46, 293, - 48, 49, 293, 48, 49, 293, 121, 121, 288, 175, - 277, 35, 121, 238, 31, 226, 239, 240, 241, 207, - 207, 120, 15, 249, 253, 27, 241, 248, 35, 35 + 45, 46, 48, 49, 223, 291, 295, 297, 35, 262, + 129, 123, 35, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 123, 302, 214, + 181, 298, 111, 229, 230, 298, 298, 46, 263, 264, + 265, 266, 267, 268, 290, 35, 35, 20, 271, 272, + 273, 21, 274, 275, 276, 30, 236, 237, 238, 35, + 35, 122, 35, 35, 123, 54, 121, 122, 256, 123, + 45, 122, 226, 226, 226, 226, 226, 226, 226, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 50, 122, + 45, 122, 55, 56, 57, 58, 59, 60, 293, 293, + 293, 45, 226, 293, 226, 46, 50, 52, 250, 298, + 246, 48, 49, 295, 48, 49, 295, 37, 46, 48, + 49, 50, 130, 131, 132, 206, 218, 220, 246, 292, + 295, 297, 299, 300, 290, 123, 35, 97, 98, 99, + 101, 102, 103, 104, 182, 183, 184, 185, 257, 35, + 122, 97, 231, 123, 54, 121, 122, 277, 267, 23, + 273, 267, 25, 276, 267, 14, 29, 32, 239, 238, + 291, 290, 295, 255, 257, 290, 298, 298, 298, 298, + 298, 298, 298, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 298, 226, 298, 298, 298, 46, 48, 49, + 224, 295, 46, 48, 49, 295, 46, 48, 49, 295, + 298, 298, 290, 298, 262, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 130, + 132, 133, 134, 135, 136, 137, 138, 139, 301, 301, + 301, 214, 212, 214, 301, 214, 290, 290, 279, 120, + 280, 230, 289, 291, 298, 268, 265, 98, 100, 278, + 35, 35, 35, 35, 35, 251, 249, 251, 251, 35, + 35, 298, 298, 298, 298, 298, 298, 298, 298, 298, + 298, 46, 295, 48, 49, 295, 48, 49, 295, 122, + 122, 290, 176, 279, 35, 122, 240, 31, 228, 241, + 242, 243, 209, 209, 121, 15, 251, 255, 27, 243, + 250, 35, 35 }; #define yyerrok (yyerrstatus = 0) @@ -2631,22 +2635,22 @@ int yynerrs; switch (yyn) { case 4: -#line 570 "pir.y" +#line 572 "pir.y" { fixup_global_labels(lexer); ;} break; case 20: -#line 601 "pir.y" +#line 603 "pir.y" { new_macro_const(lexer->macros, (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval), yypirget_lineno(yyscanner)); ;} break; case 21: -#line 607 "pir.y" +#line 609 "pir.y" { /* fprintf(stderr, "macro body: [%s]\n", CURRENT_MACRO(lexer)->body);*/ ;} break; case 22: -#line 611 "pir.y" +#line 613 "pir.y" { new_macro(lexer->macros, (yyvsp[(2) - (2)].sval), yypirget_lineno(yyscanner), TRUE, lexer->macro_size); @@ -2654,17 +2658,17 @@ int yynerrs; break; case 27: -#line 626 "pir.y" +#line 628 "pir.y" { add_macro_param(CURRENT_MACRO(lexer), (yyvsp[(1) - (1)].sval)); ;} break; case 35: -#line 645 "pir.y" +#line 647 "pir.y" { store_macro_string(CURRENT_MACRO(lexer), "%s\n", (yyvsp[(2) - (2)].sval)); ;} break; case 36: -#line 649 "pir.y" +#line 651 "pir.y" { store_macro_string(CURRENT_MACRO(lexer), ".local %s %s\n", pir_type_names[(yyvsp[(2) - (3)].ival)], (yyvsp[(3) - (3)].sval)); @@ -2672,147 +2676,147 @@ int yynerrs; break; case 37: -#line 660 "pir.y" +#line 662 "pir.y" { load_library(lexer, (yyvsp[(2) - (2)].sval)); ;} break; case 38: -#line 664 "pir.y" +#line 666 "pir.y" { yypirset_lineno ((yyvsp[(2) - (2)].ival), yyscanner); ;} break; case 39: -#line 666 "pir.y" +#line 668 "pir.y" { lexer->filename = (yyvsp[(2) - (2)].sval); ;} break; case 40: -#line 672 "pir.y" +#line 674 "pir.y" { set_hll(lexer, (yyvsp[(2) - (2)].sval)); ;} break; case 41: -#line 676 "pir.y" +#line 678 "pir.y" { set_hll_map(lexer, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].sval)); ;} break; case 42: -#line 680 "pir.y" +#line 682 "pir.y" { set_namespace(lexer, (yyvsp[(3) - (4)].key)); ;} break; case 43: -#line 684 "pir.y" +#line 686 "pir.y" { (yyval.key) = NULL; ;} break; case 44: -#line 686 "pir.y" +#line 688 "pir.y" { (yyval.key) = (yyvsp[(1) - (1)].key); ;} break; case 45: -#line 690 "pir.y" +#line 692 "pir.y" { (yyval.key) = new_key(lexer, (yyvsp[(1) - (1)].expr)); ;} break; case 46: -#line 692 "pir.y" +#line 694 "pir.y" { (yyval.key) = add_key(lexer, (yyvsp[(1) - (3)].key), (yyvsp[(3) - (3)].expr)); ;} break; case 47: -#line 696 "pir.y" +#line 698 "pir.y" { (yyval.expr) = expr_from_string(lexer, (yyvsp[(1) - (1)].sval)); ;} break; case 49: -#line 706 "pir.y" +#line 708 "pir.y" { close_sub(lexer); ;} break; case 50: -#line 710 "pir.y" +#line 712 "pir.y" { new_subr(lexer, (yyvsp[(2) - (2)].sval)); ;} break; case 55: -#line 722 "pir.y" +#line 724 "pir.y" { set_sub_flag(lexer, PIRC_SUB_FLAG_ANON);;} break; case 56: -#line 724 "pir.y" +#line 726 "pir.y" { set_sub_flag(lexer, PIRC_SUB_FLAG_INIT); ;} break; case 57: -#line 726 "pir.y" +#line 728 "pir.y" { set_sub_flag(lexer, PIRC_SUB_FLAG_LOAD); ;} break; case 58: -#line 728 "pir.y" +#line 730 "pir.y" { set_sub_flag(lexer, PIRC_SUB_FLAG_MAIN); ;} break; case 59: -#line 730 "pir.y" +#line 732 "pir.y" { set_sub_flag(lexer, PIRC_SUB_FLAG_LEX); ;} break; case 60: -#line 732 "pir.y" +#line 734 "pir.y" { set_sub_flag(lexer, PIRC_SUB_FLAG_POSTCOMP); ;} break; case 61: -#line 734 "pir.y" +#line 736 "pir.y" { set_sub_flag(lexer, PIRC_SUB_FLAG_IMMEDIATE); ;} break; case 62: -#line 736 "pir.y" +#line 738 "pir.y" { set_sub_flag(lexer, PIRC_SUB_FLAG_MULTI); ;} break; case 63: -#line 738 "pir.y" +#line 740 "pir.y" { set_sub_outer(lexer, (yyvsp[(3) - (4)].sval)); ;} break; case 64: -#line 740 "pir.y" +#line 742 "pir.y" { set_sub_methodname(lexer, (yyvsp[(2) - (2)].sval)); ;} break; case 65: -#line 742 "pir.y" +#line 744 "pir.y" { set_sub_vtable(lexer, (yyvsp[(2) - (2)].sval)); ;} break; case 66: -#line 744 "pir.y" +#line 746 "pir.y" { set_sub_subid(lexer, (yyvsp[(2) - (2)].sval)); ;} break; case 67: -#line 746 "pir.y" +#line 748 "pir.y" { set_sub_instanceof(lexer, (yyvsp[(2) - (2)].sval)); ;} break; case 68: -#line 748 "pir.y" +#line 750 "pir.y" { set_sub_nsentry(lexer, (yyvsp[(2) - (2)].sval)); ;} break; case 69: -#line 752 "pir.y" +#line 754 "pir.y" { set_sub_multi_types(lexer, (yyvsp[(2) - (3)].expr)); ;} break; case 70: -#line 756 "pir.y" +#line 758 "pir.y" { CURRENT_SUB(lexer)->info.num_multi_types = 1; /* n=1 means :multi() -- without any types. */ @@ -2820,12 +2824,12 @@ int yynerrs; break; case 71: -#line 761 "pir.y" +#line 763 "pir.y" { (yyval.expr) = (yyvsp[(1) - (1)].expr); ;} break; case 72: -#line 765 "pir.y" +#line 767 "pir.y" { CURRENT_SUB(lexer)->info.num_multi_types = 2; /* start counting multi types; always 1 higher than actual number @@ -2837,7 +2841,7 @@ int yynerrs; break; case 73: -#line 774 "pir.y" +#line 776 "pir.y" { ++CURRENT_SUB(lexer)->info.num_multi_types; /* link the multi types in reverse other. That's fine, @@ -2849,22 +2853,22 @@ int yynerrs; break; case 74: -#line 785 "pir.y" +#line 787 "pir.y" { (yyval.expr) = expr_from_ident(lexer, (yyvsp[(1) - (1)].sval)); ;} break; case 75: -#line 787 "pir.y" +#line 789 "pir.y" { (yyval.expr) = expr_from_string(lexer, (yyvsp[(1) - (1)].sval)); ;} break; case 76: -#line 789 "pir.y" +#line 791 "pir.y" { (yyval.expr) = expr_from_key(lexer, (yyvsp[(1) - (1)].key)); ;} break; case 77: -#line 793 "pir.y" +#line 795 "pir.y" { /* if there are parameters, then emit a get_params instruction. */ if ((yyvsp[(1) - (1)].uval) > 0) @@ -2873,12 +2877,12 @@ int yynerrs; break; case 78: -#line 801 "pir.y" +#line 803 "pir.y" { (yyval.uval) = 0; ;} break; case 79: -#line 803 "pir.y" +#line 805 "pir.y" { /* if the :named flag was set, there's an extra * constant string argument for the name. count that too. @@ -2892,40 +2896,48 @@ int yynerrs; break; case 80: -#line 816 "pir.y" +#line 818 "pir.y" { (yyval.targ) = set_param_flag(lexer, (yyvsp[(2) - (4)].targ), (yyvsp[(3) - (4)].ival)); ;} break; case 81: -#line 820 "pir.y" +#line 822 "pir.y" { (yyval.targ) = add_param(lexer, (yyvsp[(1) - (2)].ival), (yyvsp[(2) - (2)].sval)); ;} break; case 82: -#line 824 "pir.y" +#line 826 "pir.y" { (yyval.ival) = 0; ;} break; case 83: -#line 826 "pir.y" +#line 828 "pir.y" { SET_FLAG((yyval.ival), (yyvsp[(2) - (2)].ival)); ;} break; - case 87: -#line 835 "pir.y" + case 88: +#line 838 "pir.y" + { + (yyval.ival) = TARGET_FLAG_LOOKAHEAD; + set_param_alias(lexer, (yyvsp[(2) - (2)].sval)); + ;} + break; + + case 89: +#line 845 "pir.y" { (yyval.ival) = TARGET_FLAG_INVOCANT; /* XXX handle multi_type */ ;} break; - case 88: -#line 842 "pir.y" + case 90: +#line 852 "pir.y" { (yyval.ival) = TARGET_FLAG_UNIQUE_REG; ;} break; - case 90: -#line 849 "pir.y" + case 92: +#line 859 "pir.y" { ++lexer->stmt_counter; /* increment the logical statement counter; a statement can be @@ -2935,43 +2947,43 @@ int yynerrs; ;} break; - case 91: -#line 859 "pir.y" + case 93: +#line 869 "pir.y" { set_label(lexer, (yyvsp[(1) - (2)].sval)); ;} break; - case 109: -#line 882 "pir.y" + case 111: +#line 892 "pir.y" { annotate(lexer, (yyvsp[(2) - (5)].sval), (yyvsp[(4) - (5)].cval)); ;} break; - case 111: -#line 892 "pir.y" + case 113: +#line 902 "pir.y" { (yyval.sval) = expand_macro(yyscanner, (yyvsp[(1) - (3)].mval), (yyvsp[(2) - (3)].pval)); ;} break; - case 112: -#line 896 "pir.y" + case 114: +#line 906 "pir.y" { (yyval.pval) = NULL; ;} break; - case 113: -#line 898 "pir.y" + case 115: +#line 908 "pir.y" { (yyval.pval) = (yyvsp[(2) - (3)].pval); ;} break; - case 114: -#line 902 "pir.y" + case 116: +#line 912 "pir.y" { (yyval.pval) = NULL; ;} break; - case 116: -#line 907 "pir.y" + case 118: +#line 917 "pir.y" { (yyval.pval) = new_macro_param((yyvsp[(1) - (1)].sval)); ;} break; - case 117: -#line 909 "pir.y" + case 119: +#line 919 "pir.y" { macro_param *param = new_macro_param((yyvsp[(3) - (3)].sval)); param->next = (yyvsp[(1) - (3)].pval); @@ -2979,8 +2991,8 @@ int yynerrs; ;} break; - case 118: -#line 917 "pir.y" + case 120: +#line 927 "pir.y" { symbol *sym = find_symbol(lexer, (yyvsp[(1) - (1)].sval)); if (sym == NULL) { @@ -2990,23 +3002,23 @@ int yynerrs; ;} break; - case 120: -#line 926 "pir.y" + case 122: +#line 936 "pir.y" { (yyval.sval) = expand_macro(yyscanner, (yyvsp[(1) - (2)].mval), (yyvsp[(2) - (2)].pval)); ;} break; - case 122: -#line 931 "pir.y" + case 124: +#line 941 "pir.y" { (yyval.sval) = (yyvsp[(2) - (3)].sval); ;} break; - case 123: -#line 936 "pir.y" + case 125: +#line 946 "pir.y" { (yyval.sval) = ""; ;} break; - case 124: -#line 938 "pir.y" + case 126: +#line 948 "pir.y" { /* XXX cleanup memory stuff */ char *newbuff = (char *)mem_sys_allocate((strlen((yyvsp[(1) - (2)].sval)) + strlen((yyvsp[(2) - (2)].sval)) + 2) * sizeof (char)); @@ -3015,18 +3027,18 @@ int yynerrs; ;} break; - case 128: -#line 950 "pir.y" + case 130: +#line 960 "pir.y" { (yyval.sval) = expand_macro(yyscanner, (yyvsp[(1) - (2)].mval), (yyvsp[(2) - (2)].pval)); ;} break; - case 129: -#line 958 "pir.y" + case 131: +#line 968 "pir.y" { set_instr(lexer, NULL); ;} break; - case 131: -#line 966 "pir.y" + case 133: +#line 976 "pir.y" { if (lexer->parse_errors > MAX_NUM_ERRORS) panic(lexer, "Too many errors. Compilation aborted.\n"); @@ -3035,24 +3047,24 @@ int yynerrs; ;} break; - case 132: -#line 975 "pir.y" + case 134: +#line 985 "pir.y" { set_instrf(lexer, "null", "%T", (yyvsp[(2) - (3)].targ)); get_opinfo(lexer); ;} break; - case 133: -#line 982 "pir.y" + case 135: +#line 992 "pir.y" { set_instrf(lexer, "get_results", "%T", (yyvsp[(2) - (3)].targ)); get_opinfo(lexer); ;} break; - case 137: -#line 996 "pir.y" + case 139: +#line 1006 "pir.y" { /* at this point, TK_IDENT may in fact be a symbol identifier, * not an op, so don't do any checks like is_parrot_op() just yet. */ @@ -3061,8 +3073,8 @@ int yynerrs; ;} break; - case 138: -#line 1005 "pir.y" + case 140: +#line 1015 "pir.y" { /* when this rule is activated, the initial identifier must * be a parrot op. */ @@ -3071,8 +3083,8 @@ int yynerrs; ;} break; - case 144: -#line 1023 "pir.y" + case 146: +#line 1033 "pir.y" { /* the "instruction" that was set now appears to be * an identifier; get the name, and check its type. @@ -3108,41 +3120,41 @@ int yynerrs; ;} break; - case 145: -#line 1059 "pir.y" + case 147: +#line 1069 "pir.y" { push_operand(lexer, (yyvsp[(1) - (1)].expr)); ;} break; - case 146: -#line 1061 "pir.y" + case 148: +#line 1071 "pir.y" { push_operand(lexer, expr_from_key(lexer, (yyvsp[(1) - (1)].key))); ;} break; - case 147: -#line 1065 "pir.y" + case 149: +#line 1075 "pir.y" { (yyval.expr) = expr_from_const(lexer, (yyvsp[(1) - (1)].cval)); ;} break; - case 148: -#line 1067 "pir.y" + case 150: +#line 1077 "pir.y" { /* this is either a LABEL or a symbol; in the latter case, the type * will be filled in later. */ (yyval.expr) = expr_from_ident(lexer, (yyvsp[(1) - (1)].sval)); ;} break; - case 149: -#line 1072 "pir.y" + case 151: +#line 1082 "pir.y" { (yyval.expr) = expr_from_target(lexer, (yyvsp[(1) - (1)].targ)); ;} break; - case 150: -#line 1074 "pir.y" + case 152: +#line 1084 "pir.y" { (yyval.expr) = expr_from_target(lexer, (yyvsp[(1) - (1)].targ)); ;} break; - case 151: -#line 1078 "pir.y" + case 153: +#line 1088 "pir.y" { /* if $1 is a register, just return that */ if (TEST_FLAG((yyvsp[(1) - (2)].targ)->flags, TARGET_FLAG_IS_REG)) @@ -3165,23 +3177,23 @@ int yynerrs; ;} break; - case 152: -#line 1101 "pir.y" + case 154: +#line 1111 "pir.y" { (yyval.key) = (yyvsp[(2) - (3)].key); ;} break; - case 153: -#line 1105 "pir.y" + case 155: +#line 1115 "pir.y" { (yyval.key) = new_key(lexer, (yyvsp[(1) - (1)].expr)); ;} break; - case 154: -#line 1107 "pir.y" + case 156: +#line 1117 "pir.y" { (yyval.key) = add_key(lexer, (yyvsp[(1) - (3)].key), (yyvsp[(3) - (3)].expr)); ;} break; - case 155: -#line 1116 "pir.y" + case 157: +#line 1126 "pir.y" { /* the instruction is already set in parrot_op rule */ unshift_operand(lexer, (yyvsp[(4) - (6)].expr)); @@ -3194,8 +3206,8 @@ int yynerrs; ;} break; - case 156: -#line 1127 "pir.y" + case 158: +#line 1137 "pir.y" { /* the instruction is already set in parrot_op rule */ unshift_operand(lexer, (yyvsp[(4) - (4)].expr)); @@ -3209,8 +3221,8 @@ int yynerrs; ;} break; - case 157: -#line 1139 "pir.y" + case 159: +#line 1149 "pir.y" { unshift_operand(lexer, expr_from_key(lexer, (yyvsp[(4) - (6)].key))); unshift_operand(lexer, expr_from_target(lexer, (yyvsp[(1) - (6)].targ))); @@ -3220,8 +3232,8 @@ int yynerrs; ;} break; - case 161: -#line 1156 "pir.y" + case 163: +#line 1166 "pir.y" { if ((yyvsp[(3) - (3)].ival) == 0) set_instrf(lexer, "null", "%T", (yyvsp[(1) - (3)].targ)); @@ -3232,8 +3244,8 @@ int yynerrs; ;} break; - case 162: -#line 1165 "pir.y" + case 164: +#line 1175 "pir.y" { if ((yyvsp[(3) - (3)].dval) == 0.0) set_instrf(lexer, "null", "%T", (yyvsp[(1) - (3)].targ)); @@ -3244,24 +3256,24 @@ int yynerrs; ;} break; - case 163: -#line 1174 "pir.y" + case 165: +#line 1184 "pir.y" { set_instrf(lexer, "set", "%T%C", (yyvsp[(1) - (3)].targ), (yyvsp[(3) - (3)].cval)); get_opinfo(lexer); ;} break; - case 164: -#line 1179 "pir.y" + case 166: +#line 1189 "pir.y" { set_instrf(lexer, "set", "%T%T", (yyvsp[(1) - (3)].targ), (yyvsp[(3) - (3)].targ)); get_opinfo(lexer); ;} break; - case 165: -#line 1184 "pir.y" + case 167: +#line 1194 "pir.y" { symbol *sym = find_symbol(lexer, (yyvsp[(3) - (3)].sval)); if (sym) { @@ -3284,16 +3296,16 @@ int yynerrs; ;} break; - case 166: -#line 1205 "pir.y" + case 168: +#line 1215 "pir.y" { unshift_operand(lexer, expr_from_target(lexer, (yyvsp[(1) - (3)].targ))); get_opinfo(lexer); ;} break; - case 167: -#line 1210 "pir.y" + case 169: +#line 1220 "pir.y" { /* $P0 = foo ["bar"] # PIR style * @@ -3336,8 +3348,8 @@ int yynerrs; ;} break; - case 168: -#line 1251 "pir.y" + case 170: +#line 1261 "pir.y" { symbol *sym = find_symbol(lexer, (yyvsp[(3) - (4)].sval)); target *t; @@ -3357,8 +3369,8 @@ int yynerrs; ;} break; - case 169: -#line 1269 "pir.y" + case 171: +#line 1279 "pir.y" { target *preg = new_reg(lexer, PMC_TYPE, (yyvsp[(3) - (4)].ival)); set_target_key(preg, (yyvsp[(4) - (4)].key)); @@ -3367,16 +3379,16 @@ int yynerrs; ;} break; - case 170: -#line 1276 "pir.y" + case 172: +#line 1286 "pir.y" { set_instrf(lexer, opnames[(yyvsp[(2) - (3)].ival)], "%T%E", (yyvsp[(1) - (3)].targ), (yyvsp[(3) - (3)].expr)); get_opinfo(lexer); ;} break; - case 171: -#line 1281 "pir.y" + case 173: +#line 1291 "pir.y" { if ((yyvsp[(3) - (3)].ival) == 1) set_instrf(lexer, "inc", "%T", (yyvsp[(1) - (3)].targ)); @@ -3389,8 +3401,8 @@ int yynerrs; ;} break; - case 172: -#line 1292 "pir.y" + case 174: +#line 1302 "pir.y" { if ((yyvsp[(3) - (3)].dval) == 1.0) set_instrf(lexer, "inc", "%T", (yyvsp[(1) - (3)].targ)); @@ -3403,8 +3415,8 @@ int yynerrs; ;} break; - case 173: -#line 1303 "pir.y" + case 175: +#line 1313 "pir.y" { if ((yyvsp[(3) - (3)].ival) == 1) set_instrf(lexer, "dec", "%T", (yyvsp[(1) - (3)].targ)); @@ -3417,8 +3429,8 @@ int yynerrs; ;} break; - case 174: -#line 1314 "pir.y" + case 176: +#line 1324 "pir.y" { if ((yyvsp[(3) - (3)].dval) == 1.0) set_instrf(lexer, "dec", "%T", (yyvsp[(1) - (3)].targ)); @@ -3431,32 +3443,32 @@ int yynerrs; ;} break; - case 175: -#line 1325 "pir.y" + case 177: +#line 1335 "pir.y" { set_instrf(lexer, "add", "%T%T", (yyvsp[(1) - (3)].targ), (yyvsp[(3) - (3)].targ)); get_opinfo(lexer); ;} break; - case 176: -#line 1330 "pir.y" + case 178: +#line 1340 "pir.y" { set_instrf(lexer, "sub", "%T%T", (yyvsp[(1) - (3)].targ), (yyvsp[(3) - (3)].targ)); get_opinfo(lexer); ;} break; - case 177: -#line 1335 "pir.y" + case 179: +#line 1345 "pir.y" { set_instrf(lexer, (yyvsp[(3) - (4)].sval), "%T%E", (yyvsp[(1) - (4)].targ), (yyvsp[(4) - (4)].expr)); get_opinfo(lexer); ;} break; - case 178: -#line 1340 "pir.y" + case 180: +#line 1350 "pir.y" { if (targets_equal((yyvsp[(1) - (5)].targ), (yyvsp[(3) - (5)].targ))) /* $P0 = $P0 + $P1 ==> $P0 += $P1 */ set_instrf(lexer, opnames[(yyvsp[(4) - (5)].ival)], "%T%E", (yyvsp[(1) - (5)].targ), (yyvsp[(5) - (5)].expr)); @@ -3468,8 +3480,8 @@ int yynerrs; ;} break; - case 179: -#line 1350 "pir.y" + case 181: +#line 1360 "pir.y" { symbol *sym = find_symbol(lexer, (yyvsp[(1) - (4)].sval)); target *t; @@ -3490,8 +3502,8 @@ int yynerrs; ;} break; - case 180: -#line 1369 "pir.y" + case 182: +#line 1379 "pir.y" { target *preg = new_reg(lexer, PMC_TYPE, (yyvsp[(1) - (4)].ival)); set_target_key(preg, (yyvsp[(2) - (4)].key)); @@ -3500,98 +3512,98 @@ int yynerrs; ;} break; - case 181: -#line 1403 "pir.y" + case 183: +#line 1413 "pir.y" { set_instrf(lexer, opnames[(yyvsp[(2) - (3)].ival)], "%i%T", (yyvsp[(1) - (3)].ival), (yyvsp[(3) - (3)].targ)); ;} break; - case 182: -#line 1405 "pir.y" + case 184: +#line 1415 "pir.y" { set_instrf(lexer, opnames[(yyvsp[(2) - (3)].ival)], "%n%T", (yyvsp[(1) - (3)].dval), (yyvsp[(3) - (3)].targ)); ;} break; - case 183: -#line 1407 "pir.y" + case 185: +#line 1417 "pir.y" { set_instrf(lexer, opnames[(yyvsp[(2) - (3)].ival)], "%s%T", (yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].targ)); ;} break; - case 184: -#line 1409 "pir.y" + case 186: +#line 1419 "pir.y" { set_instrf(lexer, "set", "%C", fold_s_s(yyscanner, (yyvsp[(1) - (3)].sval), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].sval))); ;} break; - case 185: -#line 1411 "pir.y" + case 187: +#line 1421 "pir.y" { set_instrf(lexer, "set", "%C", fold_i_i(yyscanner, (yyvsp[(1) - (3)].ival), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival))); ;} break; - case 186: -#line 1413 "pir.y" + case 188: +#line 1423 "pir.y" { set_instrf(lexer, "set", "%C", fold_n_n(yyscanner, (yyvsp[(1) - (3)].dval), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].dval))); ;} break; - case 187: -#line 1415 "pir.y" + case 189: +#line 1425 "pir.y" { set_instrf(lexer, "set", "%C", fold_i_n(yyscanner, (yyvsp[(1) - (3)].ival), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].dval))); ;} break; - case 188: -#line 1417 "pir.y" + case 190: +#line 1427 "pir.y" { set_instrf(lexer, "set", "%C", fold_n_i(yyscanner, (yyvsp[(1) - (3)].dval), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival))); ;} break; - case 189: -#line 1422 "pir.y" + case 191: +#line 1432 "pir.y" { get_opinfo(lexer); ;} break; - case 190: -#line 1431 "pir.y" + case 192: +#line 1441 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (5)].ival), 1, (yyvsp[(3) - (5)].sval), (yyvsp[(5) - (5)].sval)); ;} break; - case 191: -#line 1433 "pir.y" + case 193: +#line 1443 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (5)].ival), 1, "int", (yyvsp[(5) - (5)].sval)); ;} break; - case 192: -#line 1435 "pir.y" + case 194: +#line 1445 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (5)].ival), 1, "num", (yyvsp[(5) - (5)].sval)); ;} break; - case 193: -#line 1437 "pir.y" + case 195: +#line 1447 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (5)].ival), 1, "pmc", (yyvsp[(5) - (5)].sval)); ;} break; - case 194: -#line 1439 "pir.y" + case 196: +#line 1449 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (5)].ival), 1, "string", (yyvsp[(5) - (5)].sval)); ;} break; - case 195: -#line 1441 "pir.y" + case 197: +#line 1451 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (5)].ival), 1, "if", (yyvsp[(5) - (5)].sval)); ;} break; - case 196: -#line 1443 "pir.y" + case 198: +#line 1453 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (5)].ival), 1, "unless", (yyvsp[(5) - (5)].sval)); ;} break; - case 197: -#line 1445 "pir.y" + case 199: +#line 1455 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (5)].ival), 1, "goto", (yyvsp[(5) - (5)].sval)); ;} break; - case 198: -#line 1447 "pir.y" + case 200: +#line 1457 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (5)].ival), 1, "null", (yyvsp[(5) - (5)].sval)); ;} break; - case 199: -#line 1449 "pir.y" + case 201: +#line 1459 "pir.y" { int istrue = evaluate_c(lexer, (yyvsp[(2) - (4)].cval)); /* if "unless", invert the true-ness */ @@ -3605,76 +3617,76 @@ int yynerrs; ;} break; - case 200: -#line 1461 "pir.y" + case 202: +#line 1471 "pir.y" { set_instrf(lexer, (yyvsp[(1) - (5)].ival) ? "unless_null" : "if_null", "%T%I", new_reg(lexer, PMC_TYPE, (yyvsp[(3) - (5)].ival)), (yyvsp[(5) - (5)].sval)); ;} break; - case 201: -#line 1466 "pir.y" + case 203: +#line 1476 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].sval)); ;} break; - case 202: -#line 1468 "pir.y" + case 204: +#line 1478 "pir.y" { set_instrf(lexer, (yyvsp[(1) - (4)].ival) ? "unless" : "if", "%T%I", (yyvsp[(2) - (4)].targ), (yyvsp[(4) - (4)].sval)); ;} break; - case 203: -#line 1470 "pir.y" + case 205: +#line 1480 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "int", (yyvsp[(4) - (4)].sval)); ;} break; - case 204: -#line 1472 "pir.y" + case 206: +#line 1482 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "num", (yyvsp[(4) - (4)].sval)); ;} break; - case 205: -#line 1474 "pir.y" + case 207: +#line 1484 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "pmc", (yyvsp[(4) - (4)].sval)); ;} break; - case 206: -#line 1476 "pir.y" + case 208: +#line 1486 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "string", (yyvsp[(4) - (4)].sval)); ;} break; - case 207: -#line 1478 "pir.y" + case 209: +#line 1488 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "if", (yyvsp[(4) - (4)].sval)); ;} break; - case 208: -#line 1480 "pir.y" + case 210: +#line 1490 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "unless", (yyvsp[(4) - (4)].sval)); ;} break; - case 209: -#line 1482 "pir.y" + case 211: +#line 1492 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "goto", (yyvsp[(4) - (4)].sval)); ;} break; - case 210: -#line 1484 "pir.y" + case 212: +#line 1494 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "goto", (yyvsp[(4) - (4)].sval)); ;} break; - case 211: -#line 1486 "pir.y" + case 213: +#line 1496 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "null", (yyvsp[(4) - (4)].sval)); ;} break; - case 212: -#line 1488 "pir.y" + case 214: +#line 1498 "pir.y" { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "null", (yyvsp[(4) - (4)].sval)); ;} break; - case 213: -#line 1490 "pir.y" + case 215: +#line 1500 "pir.y" { if ((yyvsp[(2) - (4)].ival) == COMPUTE_DURING_RUNTIME) { if ((yyvsp[(1) - (4)].ival) == NEED_INVERT_OPNAME) /* "unless" */ @@ -3701,8 +3713,8 @@ int yynerrs; ;} break; - case 214: -#line 1521 "pir.y" + case 216: +#line 1531 "pir.y" { /* the instructions "gt" and "ge" are converted to "lt" and "le". * if so, then the arguments must be reversed as well. "lt" and @@ -3730,8 +3742,8 @@ int yynerrs; ;} break; - case 215: -#line 1547 "pir.y" + case 217: +#line 1557 "pir.y" { if (((yyvsp[(0) - (3)].ival) != NEED_INVERT_OPNAME) && ((yyvsp[(2) - (3)].ival) == OP_GE || (yyvsp[(2) - (3)].ival) == OP_GT)) set_instrf(lexer, opnames[(yyvsp[(2) - (3)].ival) + 1], "%T%i", (yyvsp[(3) - (3)].targ), (yyvsp[(1) - (3)].ival)); @@ -3741,8 +3753,8 @@ int yynerrs; ;} break; - case 216: -#line 1555 "pir.y" + case 218: +#line 1565 "pir.y" { if (((yyvsp[(0) - (3)].ival) != NEED_INVERT_OPNAME) && ((yyvsp[(2) - (3)].ival) == OP_GE || (yyvsp[(2) - (3)].ival) == OP_GT)) set_instrf(lexer, opnames[(yyvsp[(2) - (3)].ival) + 1], "%T%n", (yyvsp[(3) - (3)].targ), (yyvsp[(1) - (3)].dval)); @@ -3753,8 +3765,8 @@ int yynerrs; ;} break; - case 217: -#line 1564 "pir.y" + case 219: +#line 1574 "pir.y" { if (((yyvsp[(0) - (3)].ival) != NEED_INVERT_OPNAME) && ((yyvsp[(2) - (3)].ival) == OP_GE || (yyvsp[(2) - (3)].ival) == OP_GT)) set_instrf(lexer, opnames[(yyvsp[(2) - (3)].ival)], "%T%s", (yyvsp[(3) - (3)].targ), (yyvsp[(1) - (3)].sval)); @@ -3765,71 +3777,71 @@ int yynerrs; ;} break; - case 218: -#line 1573 "pir.y" + case 220: +#line 1583 "pir.y" { (yyval.ival) = evaluate_i_i((yyvsp[(1) - (3)].ival), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival)); ;} break; - case 219: -#line 1575 "pir.y" + case 221: +#line 1585 "pir.y" { (yyval.ival) = evaluate_i_n((yyvsp[(1) - (3)].ival), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].dval)); ;} break; - case 220: -#line 1577 "pir.y" + case 222: +#line 1587 "pir.y" { (yyval.ival) = evaluate_n_i((yyvsp[(1) - (3)].dval), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival)); ;} break; - case 221: -#line 1579 "pir.y" + case 223: +#line 1589 "pir.y" { (yyval.ival) = evaluate_n_n((yyvsp[(1) - (3)].dval), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].dval)); ;} break; - case 222: -#line 1581 "pir.y" + case 224: +#line 1591 "pir.y" { (yyval.ival) = evaluate_s_s((yyvsp[(1) - (3)].sval), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].sval)); ;} break; - case 223: -#line 1585 "pir.y" + case 225: +#line 1595 "pir.y" { yypirerror(yyscanner, lexer, "cannot compare string to %s", (yyvsp[(3) - (3)].ival) == INT_TYPE ? "integer" : "number"); ;} break; - case 224: -#line 1590 "pir.y" + case 226: +#line 1600 "pir.y" { yypirerror(yyscanner, lexer, "cannot compare integer to string"); ;} break; - case 225: -#line 1592 "pir.y" + case 227: +#line 1602 "pir.y" { yypirerror(yyscanner, lexer, "cannot compare number to string"); ;} break; - case 226: -#line 1596 "pir.y" + case 228: +#line 1606 "pir.y" { (yyval.ival) = INT_TYPE; ;} break; - case 227: -#line 1597 "pir.y" + case 229: +#line 1607 "pir.y" { (yyval.ival) = NUM_TYPE; ;} break; - case 228: -#line 1600 "pir.y" + case 230: +#line 1610 "pir.y" { (yyval.ival) = DONT_INVERT_OPNAME; /* no need to invert */ ;} break; - case 229: -#line 1601 "pir.y" + case 231: +#line 1611 "pir.y" { (yyval.ival) = NEED_INVERT_OPNAME; /* yes, invert opname */ ;} break; - case 232: -#line 1609 "pir.y" + case 234: +#line 1619 "pir.y" { set_instrf(lexer, "branch", "%I", (yyvsp[(2) - (3)].sval)); set_op_labelflag(lexer, BIT(0)); /* bit 0 means: "1 << 0" */ @@ -3837,38 +3849,38 @@ int yynerrs; ;} break; - case 233: -#line 1617 "pir.y" + case 235: +#line 1627 "pir.y" { declare_local(lexer, (yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].symb)); ;} break; - case 234: -#line 1621 "pir.y" + case 236: +#line 1631 "pir.y" { (yyval.symb) = (yyvsp[(1) - (1)].symb); ;} break; - case 235: -#line 1623 "pir.y" + case 237: +#line 1633 "pir.y" { (yyval.symb) = add_local((yyvsp[(1) - (3)].symb), (yyvsp[(3) - (3)].symb)); ;} break; - case 236: -#line 1627 "pir.y" + case 238: +#line 1637 "pir.y" { (yyval.symb) = new_local(lexer, (yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].ival)); ;} break; - case 237: -#line 1630 "pir.y" + case 239: +#line 1640 "pir.y" { (yyval.ival) = 0; ;} break; - case 238: -#line 1631 "pir.y" + case 240: +#line 1641 "pir.y" { (yyval.ival) = 1; ;} break; - case 239: -#line 1635 "pir.y" + case 241: +#line 1645 "pir.y" { /* if $4 is not a register, it must be a declared symbol */ if (!TEST_FLAG((yyvsp[(4) - (5)].targ)->flags, TARGET_FLAG_IS_REG)) { @@ -3880,86 +3892,86 @@ int yynerrs; ;} break; - case 240: -#line 1650 "pir.y" + case 242: +#line 1660 "pir.y" { convert_inv_to_instr(lexer, (yyvsp[(1) - (1)].invo)); ;} break; - case 243: -#line 1662 "pir.y" + case 245: +#line 1672 "pir.y" { /* $4 contains an invocation object */ set_invocation_args(lexer, (yyvsp[(4) - (8)].invo), (yyvsp[(3) - (8)].argm)); (yyval.invo) = set_invocation_results(lexer, (yyvsp[(4) - (8)].invo), (yyvsp[(6) - (8)].targ)); ;} break; - case 244: -#line 1669 "pir.y" + case 246: +#line 1679 "pir.y" { (yyval.argm) = NULL; ;} break; - case 245: -#line 1671 "pir.y" + case 247: +#line 1681 "pir.y" { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;} break; - case 246: -#line 1675 "pir.y" + case 248: +#line 1685 "pir.y" { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;} break; - case 247: -#line 1677 "pir.y" + case 249: +#line 1687 "pir.y" { (yyval.argm) = add_arg((yyvsp[(1) - (2)].argm), (yyvsp[(2) - (2)].argm)); ;} break; - case 248: -#line 1681 "pir.y" + case 250: +#line 1691 "pir.y" { (yyval.argm) = (yyvsp[(2) - (3)].argm); ;} break; - case 249: -#line 1685 "pir.y" + case 251: +#line 1695 "pir.y" { (yyval.invo) = invoke(lexer, CALL_PCC, (yyvsp[(2) - (3)].targ), (yyvsp[(3) - (3)].targ)); ;} break; - case 250: -#line 1687 "pir.y" + case 252: +#line 1697 "pir.y" { (yyval.invo) = invoke(lexer, CALL_NCI, (yyvsp[(2) - (2)].targ)); ;} break; - case 251: -#line 1690 "pir.y" + case 253: +#line 1700 "pir.y" { (yyval.invo) = invoke(lexer, CALL_METHOD, (yyvsp[(2) - (5)].targ), (yyvsp[(5) - (5)].expr)); ;} break; - case 252: -#line 1694 "pir.y" + case 254: +#line 1704 "pir.y" { (yyval.targ) = NULL; ;} break; - case 253: -#line 1696 "pir.y" + case 255: +#line 1706 "pir.y" { (yyval.targ) = (yyvsp[(2) - (2)].targ); ;} break; - case 254: -#line 1700 "pir.y" + case 256: +#line 1710 "pir.y" { (yyval.targ) = NULL; ;} break; - case 255: -#line 1702 "pir.y" + case 257: +#line 1712 "pir.y" { (yyval.targ) = (yyvsp[(1) - (1)].targ); ;} break; - case 256: -#line 1706 "pir.y" + case 258: +#line 1716 "pir.y" { (yyval.targ) = (yyvsp[(1) - (1)].targ); ;} break; - case 257: -#line 1708 "pir.y" + case 259: +#line 1718 "pir.y" { if ((yyvsp[(2) - (2)].targ)) (yyval.targ) = add_target(lexer, (yyvsp[(1) - (2)].targ), (yyvsp[(2) - (2)].targ)); @@ -3968,33 +3980,33 @@ int yynerrs; ;} break; - case 258: -#line 1717 "pir.y" + case 260: +#line 1727 "pir.y" { (yyval.targ) = (yyvsp[(2) - (3)].targ); ;} break; - case 259: -#line 1719 "pir.y" + case 261: +#line 1729 "pir.y" { (yyval.targ) = NULL; ;} break; - case 261: -#line 1727 "pir.y" + case 263: +#line 1737 "pir.y" { (yyval.invo) = set_invocation_results(lexer, (yyvsp[(3) - (3)].invo), (yyvsp[(1) - (3)].targ)); ;} break; - case 262: -#line 1729 "pir.y" + case 264: +#line 1739 "pir.y" { (yyval.invo) = set_invocation_results(lexer, (yyvsp[(3) - (3)].invo), (yyvsp[(1) - (3)].targ)); ;} break; - case 263: -#line 1731 "pir.y" + case 265: +#line 1741 "pir.y" { (yyval.invo) = set_invocation_results(lexer, (yyvsp[(1) - (1)].invo), NULL); ;} break; - case 266: -#line 1739 "pir.y" + case 268: +#line 1749 "pir.y" { /* if $1 is not a register, check whether the symbol was declared */ if (!TEST_FLAG((yyvsp[(1) - (4)].targ)->flags, TARGET_FLAG_IS_REG)) { @@ -4014,21 +4026,21 @@ int yynerrs; ;} break; - case 267: -#line 1759 "pir.y" + case 269: +#line 1769 "pir.y" { (yyval.invo) = invoke(lexer, CALL_PCC, (yyvsp[(1) - (2)].targ), NULL); set_invocation_args(lexer, (yyval.invo), (yyvsp[(2) - (2)].argm)); ;} break; - case 268: -#line 1766 "pir.y" + case 270: +#line 1776 "pir.y" { (yyval.targ) = (yyvsp[(1) - (1)].targ); ;} break; - case 269: -#line 1768 "pir.y" + case 271: +#line 1778 "pir.y" { symbol *sym = find_symbol(lexer, (yyvsp[(1) - (1)].sval)); if (sym == NULL) @@ -4038,8 +4050,8 @@ int yynerrs; ;} break; - case 270: -#line 1778 "pir.y" + case 272: +#line 1788 "pir.y" { /* check that this identifier was declared */ symbol *sym = find_symbol(lexer, (yyvsp[(1) - (1)].sval)); @@ -4058,23 +4070,23 @@ int yynerrs; ;} break; - case 271: -#line 1795 "pir.y" + case 273: +#line 1805 "pir.y" { (yyval.expr) = expr_from_target(lexer, new_reg(lexer, PMC_TYPE, (yyvsp[(1) - (1)].ival))); ;} break; - case 272: -#line 1797 "pir.y" + case 274: +#line 1807 "pir.y" { (yyval.expr) = expr_from_target(lexer, new_reg(lexer, STRING_TYPE, (yyvsp[(1) - (1)].ival))); ;} break; - case 273: -#line 1799 "pir.y" + case 275: +#line 1809 "pir.y" { (yyval.expr) = expr_from_const(lexer, new_const(lexer, STRING_VAL, (yyvsp[(1) - (1)].sval))); ;} break; - case 274: -#line 1803 "pir.y" + case 276: +#line 1813 "pir.y" { symbol *sym = find_symbol(lexer, (yyvsp[(1) - (1)].sval)); if (sym == NULL) @@ -4085,96 +4097,96 @@ int yynerrs; ;} break; - case 275: -#line 1812 "pir.y" + case 277: +#line 1822 "pir.y" { (yyval.targ) = new_reg(lexer, PMC_TYPE, (yyvsp[(1) - (1)].ival)); ;} break; - case 276: -#line 1817 "pir.y" + case 278: +#line 1827 "pir.y" { (yyval.targ) = (yyvsp[(2) - (3)].targ); ;} break; - case 277: -#line 1823 "pir.y" + case 279: +#line 1833 "pir.y" { (yyval.targ) = NULL; ;} break; - case 278: -#line 1825 "pir.y" + case 280: +#line 1835 "pir.y" { (yyval.targ) = (yyvsp[(1) - (1)].targ); ;} break; - case 279: -#line 1829 "pir.y" + case 281: +#line 1839 "pir.y" { (yyval.targ) = (yyvsp[(1) - (1)].targ); ;} break; - case 280: -#line 1831 "pir.y" + case 282: +#line 1841 "pir.y" { (yyval.targ) = add_target(lexer, (yyvsp[(1) - (3)].targ), (yyvsp[(3) - (3)].targ)); ;} break; - case 281: -#line 1835 "pir.y" + case 283: +#line 1845 "pir.y" { (yyval.targ) = set_param_flag(lexer, (yyvsp[(1) - (2)].targ), (yyvsp[(2) - (2)].ival)); ;} break; - case 282: -#line 1837 "pir.y" + case 284: +#line 1847 "pir.y" { (yyval.targ) = set_param_alias(lexer, (yyvsp[(1) - (3)].sval)); ;} break; - case 283: -#line 1841 "pir.y" + case 285: +#line 1851 "pir.y" { (yyval.ival) = 0; ;} break; - case 284: -#line 1843 "pir.y" + case 286: +#line 1853 "pir.y" { SET_FLAG((yyval.ival), (yyvsp[(2) - (2)].ival)); ;} break; - case 285: -#line 1847 "pir.y" + case 287: +#line 1857 "pir.y" { (yyval.ival) = TARGET_FLAG_OPTIONAL; ;} break; - case 286: -#line 1849 "pir.y" + case 288: +#line 1859 "pir.y" { (yyval.ival) = TARGET_FLAG_OPT_FLAG; ;} break; - case 287: -#line 1851 "pir.y" + case 289: +#line 1861 "pir.y" { (yyval.ival) = TARGET_FLAG_SLURPY; ;} break; - case 288: -#line 1853 "pir.y" + case 290: +#line 1863 "pir.y" { (yyval.ival) = TARGET_FLAG_NAMED; set_param_alias(lexer, (yyvsp[(2) - (2)].sval)); ;} break; - case 289: -#line 1863 "pir.y" + case 291: +#line 1873 "pir.y" { convert_inv_to_instr(lexer, (yyvsp[(1) - (1)].invo)); ;} break; - case 294: -#line 1873 "pir.y" + case 296: +#line 1883 "pir.y" { (yyval.invo) = invoke(lexer, CALL_RETURN); set_invocation_args(lexer, (yyval.invo), (yyvsp[(2) - (3)].argm)); ;} break; - case 295: -#line 1878 "pir.y" + case 297: +#line 1888 "pir.y" { /* was the invocation a method call? then it becomes a method tail * call, otherwise it's just a normal (sub) tail call. */ @@ -4185,200 +4197,200 @@ int yynerrs; ;} break; - case 296: -#line 1889 "pir.y" + case 298: +#line 1899 "pir.y" { (yyval.invo) = invoke(lexer, CALL_YIELD); set_invocation_args(lexer, (yyval.invo), (yyvsp[(2) - (3)].argm)); ;} break; - case 297: -#line 1896 "pir.y" + case 299: +#line 1906 "pir.y" { (yyval.argm) = (yyvsp[(2) - (3)].argm); ;} break; - case 298: -#line 1900 "pir.y" + case 300: +#line 1910 "pir.y" { (yyval.argm) = NULL; ;} break; - case 299: -#line 1902 "pir.y" + case 301: +#line 1912 "pir.y" { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;} break; - case 300: -#line 1906 "pir.y" + case 302: +#line 1916 "pir.y" { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;} break; - case 301: -#line 1908 "pir.y" + case 303: +#line 1918 "pir.y" { (yyval.argm) = add_arg((yyvsp[(1) - (3)].argm), (yyvsp[(3) - (3)].argm)); ;} break; - case 304: -#line 1916 "pir.y" + case 306: +#line 1926 "pir.y" { (yyval.argm) = set_arg_alias(lexer, (yyvsp[(1) - (3)].sval)); ;} break; - case 305: -#line 1920 "pir.y" + case 307: +#line 1930 "pir.y" { (yyval.argm) = set_arg_flag((yyval.argm), (yyvsp[(2) - (2)].ival)); ;} break; - case 306: -#line 1924 "pir.y" + case 308: +#line 1934 "pir.y" { (yyval.argm) = set_curarg(lexer, new_argument(lexer, (yyvsp[(1) - (1)].expr))); ;} break; - case 307: -#line 1930 "pir.y" + case 309: +#line 1940 "pir.y" { (yyval.invo) = invoke(lexer, CALL_RETURN); set_invocation_args(lexer, (yyval.invo), (yyvsp[(3) - (5)].argm)); ;} break; - case 308: -#line 1939 "pir.y" + case 310: +#line 1949 "pir.y" { (yyval.invo) = invoke(lexer, CALL_YIELD); set_invocation_args(lexer, (yyval.invo), (yyvsp[(3) - (5)].argm)); ;} break; - case 309: -#line 1946 "pir.y" + case 311: +#line 1956 "pir.y" { (yyval.argm) = NULL; ;} break; - case 310: -#line 1948 "pir.y" + case 312: +#line 1958 "pir.y" { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;} break; - case 311: -#line 1953 "pir.y" + case 313: +#line 1963 "pir.y" { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;} break; - case 312: -#line 1955 "pir.y" + case 314: +#line 1965 "pir.y" { (yyval.argm) = add_arg((yyvsp[(1) - (2)].argm), (yyvsp[(2) - (2)].argm)); ;} break; - case 313: -#line 1960 "pir.y" + case 315: +#line 1970 "pir.y" { (yyval.argm) = (yyvsp[(2) - (3)].argm); ;} break; - case 314: -#line 1964 "pir.y" + case 316: +#line 1974 "pir.y" { (yyval.argm) = NULL; ;} break; - case 315: -#line 1966 "pir.y" + case 317: +#line 1976 "pir.y" { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;} break; - case 316: -#line 1970 "pir.y" + case 318: +#line 1980 "pir.y" { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;} break; - case 317: -#line 1972 "pir.y" + case 319: +#line 1982 "pir.y" { (yyval.argm) = add_arg((yyvsp[(1) - (2)].argm), (yyvsp[(2) - (2)].argm)); ;} break; - case 318: -#line 1976 "pir.y" + case 320: +#line 1986 "pir.y" { (yyval.argm) = (yyvsp[(2) - (3)].argm); ;} break; - case 319: -#line 1981 "pir.y" + case 321: +#line 1991 "pir.y" { (yyval.ival) = 0; ;} break; - case 320: -#line 1983 "pir.y" + case 322: +#line 1993 "pir.y" { SET_FLAG((yyval.ival), (yyvsp[(2) - (2)].ival)); ;} break; - case 321: -#line 1987 "pir.y" + case 323: +#line 1997 "pir.y" { (yyval.ival) = ARG_FLAG_FLAT; ;} break; - case 322: -#line 1989 "pir.y" + case 324: +#line 1999 "pir.y" { (yyval.ival) = ARG_FLAG_NAMED; set_arg_alias(lexer, (yyvsp[(2) - (2)].sval)); ;} break; - case 323: -#line 1996 "pir.y" + case 325: +#line 2006 "pir.y" { (yyval.sval) = NULL; ;} break; - case 324: -#line 1998 "pir.y" + case 326: +#line 2008 "pir.y" { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;} break; - case 325: -#line 2002 "pir.y" + case 327: +#line 2012 "pir.y" { (yyval.sval) = (yyvsp[(2) - (3)].sval); ;} break; - case 327: -#line 2009 "pir.y" + case 329: +#line 2019 "pir.y" { store_global_constant(lexer, (yyvsp[(2) - (2)].cdec)); ;} break; - case 330: -#line 2017 "pir.y" + case 332: +#line 2027 "pir.y" { (yyval.cdec) = (yyvsp[(2) - (2)].cdec); ;} break; - case 333: -#line 2025 "pir.y" + case 335: +#line 2035 "pir.y" { store_global_constant(lexer, (yyvsp[(2) - (2)].cdec)); ;} break; - case 334: -#line 2029 "pir.y" + case 336: +#line 2039 "pir.y" { (yyval.cdec) = new_named_const(lexer, INT_VAL, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].ival)); ;} break; - case 335: -#line 2031 "pir.y" + case 337: +#line 2041 "pir.y" { (yyval.cdec) = new_named_const(lexer, NUM_VAL, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].dval)); ;} break; - case 336: -#line 2033 "pir.y" + case 338: +#line 2043 "pir.y" { (yyval.cdec) = new_named_const(lexer, STRING_VAL, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].sval)); ;} break; - case 337: -#line 2035 "pir.y" + case 339: +#line 2045 "pir.y" { (yyval.cdec) = new_named_const(lexer, USTRING_VAL, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].ustr)); ;} break; - case 338: -#line 2039 "pir.y" + case 340: +#line 2049 "pir.y" { (yyval.cdec) = new_pmc_const(lexer, (yyvsp[(1) - (4)].sval), (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].cval)); ;} break; - case 340: -#line 2044 "pir.y" + case 342: +#line 2054 "pir.y" { /* this alternative is necessary, otherwise the parser * just stops when assigning an identifier to a pmc * const, without an error message. That may be @@ -4388,98 +4400,98 @@ int yynerrs; ;} break; - case 341: -#line 2056 "pir.y" + case 343: +#line 2066 "pir.y" { (yyval.expr) = expr_from_target(lexer, (yyvsp[(1) - (1)].targ)); ;} break; - case 342: -#line 2057 "pir.y" + case 344: +#line 2067 "pir.y" { (yyval.expr) = expr_from_const(lexer, (yyvsp[(1) - (1)].cval)); ;} break; - case 343: -#line 2061 "pir.y" + case 345: +#line 2071 "pir.y" { (yyval.cval) = new_const(lexer, INT_VAL, (yyvsp[(1) - (1)].ival)); ;} break; - case 344: -#line 2062 "pir.y" + case 346: +#line 2072 "pir.y" { (yyval.cval) = new_const(lexer, NUM_VAL, (yyvsp[(1) - (1)].dval)); ;} break; - case 345: -#line 2063 "pir.y" + case 347: +#line 2073 "pir.y" { (yyval.cval) = (yyvsp[(1) - (1)].cval); ;} break; - case 346: -#line 2066 "pir.y" + case 348: +#line 2076 "pir.y" { (yyval.cval) = new_const(lexer, STRING_VAL, (yyvsp[(1) - (1)].sval)); ;} break; - case 347: -#line 2067 "pir.y" + case 349: +#line 2077 "pir.y" { (yyval.cval) = new_const(lexer, USTRING_VAL, (yyvsp[(1) - (1)].ustr)); ;} break; - case 348: -#line 2070 "pir.y" + case 350: +#line 2080 "pir.y" { (yyval.ival) = OP_NE; ;} break; - case 349: -#line 2071 "pir.y" + case 351: +#line 2081 "pir.y" { (yyval.ival) = OP_EQ; ;} break; - case 350: -#line 2072 "pir.y" + case 352: +#line 2082 "pir.y" { (yyval.ival) = OP_LT; ;} break; - case 351: -#line 2073 "pir.y" + case 353: +#line 2083 "pir.y" { (yyval.ival) = OP_LE; ;} break; - case 352: -#line 2074 "pir.y" + case 354: +#line 2084 "pir.y" { (yyval.ival) = OP_GE; ;} break; - case 353: -#line 2075 "pir.y" + case 355: +#line 2085 "pir.y" { (yyval.ival) = OP_GT; ;} break; - case 354: -#line 2078 "pir.y" + case 356: +#line 2088 "pir.y" { (yyval.ival) = INT_TYPE; ;} break; - case 355: -#line 2079 "pir.y" + case 357: +#line 2089 "pir.y" { (yyval.ival) = NUM_TYPE; ;} break; - case 356: -#line 2080 "pir.y" + case 358: +#line 2090 "pir.y" { (yyval.ival) = PMC_TYPE; ;} break; - case 357: -#line 2081 "pir.y" + case 359: +#line 2091 "pir.y" { (yyval.ival) = STRING_TYPE; ;} break; - case 358: -#line 2089 "pir.y" + case 360: +#line 2099 "pir.y" { set_curtarget(lexer, (yyvsp[(1) - (1)].targ)); ;} break; - case 360: -#line 2093 "pir.y" + case 362: +#line 2103 "pir.y" { /* a symbol must have been declared; check that at this point. */ symbol * sym = find_symbol(lexer, (yyvsp[(1) - (1)].sval)); if (sym == NULL) { @@ -4493,278 +4505,278 @@ int yynerrs; ;} break; - case 361: -#line 2106 "pir.y" + case 363: +#line 2116 "pir.y" { (yyval.targ) = new_reg(lexer, PMC_TYPE, (yyvsp[(1) - (1)].ival)); ;} break; - case 362: -#line 2107 "pir.y" + case 364: +#line 2117 "pir.y" { (yyval.targ) = new_reg(lexer, NUM_TYPE, (yyvsp[(1) - (1)].ival)); ;} break; - case 363: -#line 2108 "pir.y" + case 365: +#line 2118 "pir.y" { (yyval.targ) = new_reg(lexer, INT_TYPE, (yyvsp[(1) - (1)].ival)); ;} break; - case 364: -#line 2109 "pir.y" + case 366: +#line 2119 "pir.y" { (yyval.targ) = new_reg(lexer, STRING_TYPE, (yyvsp[(1) - (1)].ival)); ;} break; - case 367: -#line 2117 "pir.y" + case 369: +#line 2127 "pir.y" { (yyval.sval) = "if"; ;} break; - case 368: -#line 2118 "pir.y" + case 370: +#line 2128 "pir.y" { (yyval.sval) = "unless"; ;} break; - case 369: -#line 2119 "pir.y" + case 371: +#line 2129 "pir.y" { (yyval.sval) = "goto"; ;} break; - case 370: -#line 2120 "pir.y" + case 372: +#line 2130 "pir.y" { (yyval.sval) = "int"; ;} break; - case 371: -#line 2121 "pir.y" + case 373: +#line 2131 "pir.y" { (yyval.sval) = "num"; ;} break; - case 372: -#line 2122 "pir.y" + case 374: +#line 2132 "pir.y" { (yyval.sval) = "string"; ;} break; - case 373: -#line 2123 "pir.y" + case 375: +#line 2133 "pir.y" { (yyval.sval) = "pmc"; ;} break; - case 374: -#line 2124 "pir.y" + case 376: +#line 2134 "pir.y" { (yyval.sval) = "null"; ;} break; - case 375: -#line 2127 "pir.y" + case 377: +#line 2137 "pir.y" { (yyval.sval) = "neg"; ;} break; - case 376: -#line 2128 "pir.y" + case 378: +#line 2138 "pir.y" { (yyval.sval) = "not"; ;} break; - case 377: -#line 2129 "pir.y" + case 379: +#line 2139 "pir.y" { (yyval.sval) = "bnot"; ;} break; - case 378: -#line 2132 "pir.y" + case 380: +#line 2142 "pir.y" { (yyval.ival) = OP_ADD; ;} break; - case 379: -#line 2133 "pir.y" + case 381: +#line 2143 "pir.y" { (yyval.ival) = OP_SUB; ;} break; - case 380: -#line 2134 "pir.y" + case 382: +#line 2144 "pir.y" { (yyval.ival) = OP_DIV; ;} break; - case 381: -#line 2135 "pir.y" + case 383: +#line 2145 "pir.y" { (yyval.ival) = OP_MUL; ;} break; - case 382: -#line 2136 "pir.y" + case 384: +#line 2146 "pir.y" { (yyval.ival) = OP_MOD; ;} break; - case 383: -#line 2137 "pir.y" + case 385: +#line 2147 "pir.y" { (yyval.ival) = OP_BOR; ;} break; - case 384: -#line 2138 "pir.y" + case 386: +#line 2148 "pir.y" { (yyval.ival) = OP_BAND; ;} break; - case 385: -#line 2139 "pir.y" + case 387: +#line 2149 "pir.y" { (yyval.ival) = OP_BXOR; ;} break; - case 386: -#line 2140 "pir.y" + case 388: +#line 2150 "pir.y" { (yyval.ival) = OP_POW; ;} break; - case 387: -#line 2141 "pir.y" + case 389: +#line 2151 "pir.y" { (yyval.ival) = OP_CONCAT; ;} break; - case 388: -#line 2142 "pir.y" + case 390: +#line 2152 "pir.y" { (yyval.ival) = OP_LSR; ;} break; - case 389: -#line 2143 "pir.y" + case 391: +#line 2153 "pir.y" { (yyval.ival) = OP_SHR; ;} break; - case 390: -#line 2144 "pir.y" + case 392: +#line 2154 "pir.y" { (yyval.ival) = OP_SHL; ;} break; - case 391: -#line 2145 "pir.y" + case 393: +#line 2155 "pir.y" { (yyval.ival) = OP_OR; ;} break; - case 392: -#line 2146 "pir.y" + case 394: +#line 2156 "pir.y" { (yyval.ival) = OP_AND; ;} break; - case 393: -#line 2147 "pir.y" + case 395: +#line 2157 "pir.y" { (yyval.ival) = OP_FDIV; ;} break; - case 394: -#line 2148 "pir.y" + case 396: +#line 2158 "pir.y" { (yyval.ival) = OP_XOR; ;} break; - case 395: -#line 2149 "pir.y" + case 397: +#line 2159 "pir.y" { (yyval.ival) = OP_ISEQ; ;} break; - case 396: -#line 2150 "pir.y" + case 398: +#line 2160 "pir.y" { (yyval.ival) = OP_ISLE; ;} break; - case 397: -#line 2151 "pir.y" + case 399: +#line 2161 "pir.y" { (yyval.ival) = OP_ISLT; ;} break; - case 398: -#line 2152 "pir.y" + case 400: +#line 2162 "pir.y" { (yyval.ival) = OP_ISGE; ;} break; - case 399: -#line 2153 "pir.y" + case 401: +#line 2163 "pir.y" { (yyval.ival) = OP_ISGT; ;} break; - case 400: -#line 2154 "pir.y" + case 402: +#line 2164 "pir.y" { (yyval.ival) = OP_ISNE; ;} break; - case 401: -#line 2160 "pir.y" + case 403: +#line 2170 "pir.y" { (yyval.ival) = OP_MUL; ;} break; - case 402: -#line 2161 "pir.y" + case 404: +#line 2171 "pir.y" { (yyval.ival) = OP_MOD; ;} break; - case 403: -#line 2162 "pir.y" + case 405: +#line 2172 "pir.y" { (yyval.ival) = OP_POW; ;} break; - case 404: -#line 2163 "pir.y" + case 406: +#line 2173 "pir.y" { (yyval.ival) = OP_DIV; ;} break; - case 405: -#line 2164 "pir.y" + case 407: +#line 2174 "pir.y" { (yyval.ival) = OP_FDIV; ;} break; - case 406: -#line 2165 "pir.y" + case 408: +#line 2175 "pir.y" { (yyval.ival) = OP_BOR; ;} break; - case 407: -#line 2166 "pir.y" + case 409: +#line 2176 "pir.y" { (yyval.ival) = OP_BAND; ;} break; - case 408: -#line 2167 "pir.y" + case 410: +#line 2177 "pir.y" { (yyval.ival) = OP_BXOR; ;} break; - case 409: -#line 2168 "pir.y" + case 411: +#line 2178 "pir.y" { (yyval.ival) = OP_CONCAT; ;} break; - case 410: -#line 2169 "pir.y" + case 412: +#line 2179 "pir.y" { (yyval.ival) = OP_SHR; ;} break; - case 411: -#line 2170 "pir.y" + case 413: +#line 2180 "pir.y" { (yyval.ival) = OP_SHL; ;} break; - case 412: -#line 2171 "pir.y" + case 414: +#line 2181 "pir.y" { (yyval.ival) = OP_LSR; ;} break; - case 414: -#line 2192 "pir.y" + case 416: +#line 2202 "pir.y" { new_subr(lexer, "@start"); ;} break; - case 423: -#line 2208 "pir.y" + case 425: +#line 2218 "pir.y" { set_label(lexer, (yyvsp[(1) - (2)].sval)); ;} break; - case 428: -#line 2218 "pir.y" + case 430: +#line 2228 "pir.y" { set_sub_name(lexer, (yyvsp[(3) - (3)].sval)); ;} break; - case 429: -#line 2222 "pir.y" + case 431: +#line 2232 "pir.y" { new_subr(lexer, NULL); ;} break; - case 430: -#line 2227 "pir.y" + case 432: +#line 2237 "pir.y" { if (is_parrot_op(lexer, (yyvsp[(1) - (3)].sval))) { @@ -4779,7 +4791,7 @@ int yynerrs; /* Line 1267 of yacc.c. */ -#line 4783 "pirparser.c" +#line 4795 "pirparser.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4993,7 +5005,7 @@ int yynerrs; } -#line 2241 "pir.y" +#line 2251 "pir.y" diff --git a/compilers/pirc/src/pirparser.h b/compilers/pirc/src/pirparser.h index 13a22c6f96..48f24ad556 100644 --- a/compilers/pirc/src/pirparser.h +++ b/compilers/pirc/src/pirparser.h @@ -140,21 +140,22 @@ TK_FLAG_OPTIONAL = 356, TK_FLAG_OPT_FLAG = 357, TK_FLAG_INVOCANT = 358, - TK_MACRO = 359, - TK_ENDM = 360, - TK_MACRO_LOCAL = 361, - TK_MACRO_LABEL = 362, - TK_MACRO_CONST = 363, - TK_MACRO_LABEL_ID = 364, - TK_MACRO_LOCAL_ID = 365, - TK_MACRO_IDENT = 366, - TK_MACRO_ARG_IDENT = 367, - TK_MACRO_ARG_OTHER = 368, - TK_MACRO_CONST_VAL = 369, - TK_PASM_MARKER_START = 370, - TK_PIR_MARKER_START = 371, - TK_PCC_SUB = 372, - TK_PARROT_OP = 373 + TK_FLAG_LOOKAHEAD = 359, + TK_MACRO = 360, + TK_ENDM = 361, + TK_MACRO_LOCAL = 362, + TK_MACRO_LABEL = 363, + TK_MACRO_CONST = 364, + TK_MACRO_LABEL_ID = 365, + TK_MACRO_LOCAL_ID = 366, + TK_MACRO_IDENT = 367, + TK_MACRO_ARG_IDENT = 368, + TK_MACRO_ARG_OTHER = 369, + TK_MACRO_CONST_VAL = 370, + TK_PASM_MARKER_START = 371, + TK_PIR_MARKER_START = 372, + TK_PCC_SUB = 373, + TK_PARROT_OP = 374 }; #endif /* Tokens. */ @@ -259,21 +260,22 @@ #define TK_FLAG_OPTIONAL 356 #define TK_FLAG_OPT_FLAG 357 #define TK_FLAG_INVOCANT 358 -#define TK_MACRO 359 -#define TK_ENDM 360 -#define TK_MACRO_LOCAL 361 -#define TK_MACRO_LABEL 362 -#define TK_MACRO_CONST 363 -#define TK_MACRO_LABEL_ID 364 -#define TK_MACRO_LOCAL_ID 365 -#define TK_MACRO_IDENT 366 -#define TK_MACRO_ARG_IDENT 367 -#define TK_MACRO_ARG_OTHER 368 -#define TK_MACRO_CONST_VAL 369 -#define TK_PASM_MARKER_START 370 -#define TK_PIR_MARKER_START 371 -#define TK_PCC_SUB 372 -#define TK_PARROT_OP 373 +#define TK_FLAG_LOOKAHEAD 359 +#define TK_MACRO 360 +#define TK_ENDM 361 +#define TK_MACRO_LOCAL 362 +#define TK_MACRO_LABEL 363 +#define TK_MACRO_CONST 364 +#define TK_MACRO_LABEL_ID 365 +#define TK_MACRO_LOCAL_ID 366 +#define TK_MACRO_IDENT 367 +#define TK_MACRO_ARG_IDENT 368 +#define TK_MACRO_ARG_OTHER 369 +#define TK_MACRO_CONST_VAL 370 +#define TK_PASM_MARKER_START 371 +#define TK_PIR_MARKER_START 372 +#define TK_PCC_SUB 373 +#define TK_PARROT_OP 374 @@ -300,7 +302,7 @@ typedef union YYSTYPE struct macro_param *pval; } /* Line 1489 of yacc.c. */ -#line 304 "pirparser.h" +#line 306 "pirparser.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 diff --git a/compilers/pirc/src/pirsymbol.c b/compilers/pirc/src/pirsymbol.c index 4df7acf64b..ccea45449a 100755 --- a/compilers/pirc/src/pirsymbol.c +++ b/compilers/pirc/src/pirsymbol.c @@ -276,15 +276,21 @@ declare_local(NOTNULL(lexer_state * const lexer), pir_type type, check_unused_symbols(lexer_state * const lexer)> Check all subroutines for unused symbols. If a symbol is declared but -never used, a warning message is printed to C. +never used, a warning message is printed to C. If there's +no subroutines, the function will do nothing and return. =cut */ void check_unused_symbols(NOTNULL(lexer_state * const lexer)) { - subroutine *subiter = lexer->subs->next; /* start at first sub. */ + subroutine *subiter; + /* if there's no subs, just return. */ + if (lexer->subs == NULL) + return; + + subiter = lexer->subs->next; /* start at first sub. */ puts(""); do { diff --git a/compilers/pirc/t/basic.t b/compilers/pirc/t/basic.t index 9e08b68315..43f7e8df91 100644 --- a/compilers/pirc/t/basic.t +++ b/compilers/pirc/t/basic.t @@ -1,113 +1,18 @@ #!perl -# Copyright (C) 2008, The Perl Foundation. +# Copyright (C) 2008-2009, The Perl Foundation. # $Id$ use lib "../../lib"; -use Parrot::Test tests => 10; +use Parrot::Test tests => 1; pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration"); -.const int x = 42 -CODE -OUTPUT - - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single namespace declaration"); -.namespace [] -CODE -OUTPUT - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "multiple namespace declaration"); -.namespace ['X';'Z'] -.namespace ['A';'B'] -CODE -OUTPUT - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "other chunks"); -.HLL "FOO" -.HLL_map "Integer" = "Float" -.loadlib "../../../dan_ops" -.line 42 -.file "somefile.pir" -CODE -OUTPUT - - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test a basic :main sub"); -.sub main :main -.end -CODE -.namespace [] -.pcc_sub :main main: - end -OUTPUT - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test a normal basic sub"); .sub main + say "ok" .end CODE -.namespace [] -main: - set_returns 1 - returncc +ok OUTPUT - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test sub with sub pragmas"); -.sub main :load :init :immediate :postcomp :anon :multi() -.end -CODE -.namespace [] -.pcc_sub main: - set_returns 1 - returncc -OUTPUT - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test sub with vtable pragma"); -.sub main :vtable("get_integer") -.end - -.sub get_integer :vtable -.end -CODE -.namespace [] -.pcc_sub main: - set_returns 1 - returncc -.namespace [] -.pcc_sub get_integer: - set_returns 5 - returncc -OUTPUT - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test sub with method pragma"); -.sub main :method("hello") -.end - -.sub bye :method -.end -CODE -.namespace [] -.pcc_sub :method main: - set_returns 1 - returncc -.namespace [] -.pcc_sub :method bye: - set_returns 5 - returncc -OUTPUT - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test sub with :subid"); -.sub main :subid("foo") -.end - -CODE -.namespace [] -.pcc_sub main: - set_returns 1 - returncc -OUTPUT - - # Local Variables: # mode: cperl # cperl-indent-level: 4 diff --git a/compilers/pirc/t/heredoc.t b/compilers/pirc/t/heredoc.t index 05fb2266ea..43f7e8df91 100644 --- a/compilers/pirc/t/heredoc.t +++ b/compilers/pirc/t/heredoc.t @@ -1,82 +1,16 @@ #!perl -# Copyright (C) 2008, The Perl Foundation. +# Copyright (C) 2008-2009, The Perl Foundation. # $Id$ - use lib "../../lib"; -use Parrot::Test tests => 3; - - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "heredoc test"); -.sub main - foo(<<'A', <<'B', <<'HI') -this is a simple single-line heredoc. -A -this is a simple -multi -line -heredoc -. -B -and yet another -multi -line -heredoc -string. -HI - -.end -CODE -.namespace [] -main: - set_args 1 - get_results 2 - find_sub_not_null P0, "foo" - invokecc P0 - set_returns 3 - returncc -OUTPUT - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "more heredoc"); -.sub foo - .param pmc args :slurpy - - .yield(<<'YIELD') - This is some text returned through .yield! - -YIELD - - .return(<<'RET') - Some text returned through return -RET -.end -CODE -.namespace [] -foo: - get_params - set_returns 1 - yield - set_returns 2 - returncc -OUTPUT +use Parrot::Test tests => 1; -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "heredoc string assignment"); +pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration"); .sub main - $S0 = <<'A' -this is a simple assigned heredoc string to $S0. -A - .local string s - s = <<'B' -this is a simple assigned heredoc string to string s. -B + say "ok" .end CODE -.namespace [] -main: - set S0, "\nthis is a simple assigned heredoc string to $S0.\n" - set S1, "\nthis is a simple assigned heredoc string to string s.\n" - set_returns 1 - returncc +ok OUTPUT # Local Variables: diff --git a/compilers/pirc/t/macro.t b/compilers/pirc/t/macro.t index 1603b64dfa..43f7e8df91 100644 --- a/compilers/pirc/t/macro.t +++ b/compilers/pirc/t/macro.t @@ -1,45 +1,16 @@ #!perl -# Copyright (C) 2008, The Perl Foundation. +# Copyright (C) 2008-2009, The Perl Foundation. # $Id$ use lib "../../lib"; -use Parrot::Test tests => 2; - - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "simple macro without parameters"); -.macro Hi() - print "hello" -.endm -.sub main - .Hi() -.end -CODE -.namespace [] -main: - print "hello" - set_returns 1 - returncc -OUTPUT - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "expansion w/ parameters and nested macro_const expansion"); -.macro_const ANSWER 42 - -.macro foo(a,b) - say .a - say .b -.endm +use Parrot::Test tests => 1; +pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration"); .sub main - .foo(.ANSWER, "hi") + say "ok" .end - CODE -.namespace [] -main: - say 42 - say "hi" - set_returns 1 - returncc +ok OUTPUT # Local Variables: @@ -48,4 +19,3 @@ OUTPUT # fill-column: 100 # End: # vim: expandtab shiftwidth=4: - diff --git a/compilers/pirc/t/stmts.t b/compilers/pirc/t/stmts.t index d00bb965d9..43f7e8df91 100644 --- a/compilers/pirc/t/stmts.t +++ b/compilers/pirc/t/stmts.t @@ -1,180 +1,18 @@ #!perl -# Copyright (C) 2008, The Perl Foundation. +# Copyright (C) 2008-2009, The Perl Foundation. # $Id$ use lib "../../lib"; -use Parrot::Test tests => 5; +use Parrot::Test tests => 1; -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "assignments"); +pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration"); .sub main - .local pmc x, y, z - .local string a, b, c - .local int i, j - .local num pi - x = 1 - a = "hi" - i = 42 - pi = 3.14 + say "ok" .end CODE -.namespace [] -main: - set P0, 1 - set S0, "hi" - set I0, 42 - set N0, 3.140000 - set_returns 1 - returncc +ok OUTPUT - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "if statement"); -.sub main - .local int x, y, z - if x < y goto X - unless y > x goto Y -X: -Y: -Z: -.end -CODE -.namespace [] -main: - lt I0, I1, 8 - le I1, I0, 4 -X: -Y: -Z: - set_returns 1 - returncc -OUTPUT - - - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "if statement with keywords"); -.sub int - .local int if, int, goto - .local pmc pmc, null - if int > if goto goto - if int > if goto L -goto: -L: -.end -CODE -.namespace [] -int: - lt I1, I0, 8 - lt I1, I0, 4 -goto: -L: - set_returns 1 - returncc -OUTPUT - - - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "sub call not in this compilation unit"); -.sub main - foo() -.end -CODE -.namespace [] -main: - set_args 1 - get_results 2 - find_sub_not_null P0, "foo" - invokecc P0 - set_returns 3 - returncc -OUTPUT - - - -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "sub call in this compilation unit"); -.sub main - foo() -.end -.sub foo -.end -CODE -.namespace [] -main: - set_args 1 - get_results 2 - set P0, 10 - invokecc P0 - set_returns 3 - returncc -.namespace [] -foo: - set_returns 7 - returncc -OUTPUT - - -## -### test return statements -## .return (1) -## .return (x :flat) -## .return (x :named('z')) -## .return (a, b, c) -## .return (a :flat, b, c :flat :named) -## -### test yield statements -## -## .yield (1) -## .yield (a :flat) -## .yield (x :named) -## .yield (b :named('b')) -## .yield (d, e, f) -##.end -### -### comments -##.sub foo -## .param pmc args :slurpy -## .local int i -## i = args[0] -## print i -## -### test long return statement -## .begin_return -## .end_return -## -## .begin_return -## .return p :flat :named('myP') -## .end_return -## -### test long yield statement -## .begin_yield -## .end_yield -## -## .begin_yield -## .return q :flat -## .return r :named('myR') -## .return s :flat :named -## .end_yield -## -## x = null -## null x -## -### test long subcall -## .begin_call -## .call Y -## .end_call -## -## .begin_call -## .arg y :flat -## .arg z :named('z') -## .call Z -## .result P0 :slurpy -## .local pmc x -## .result x -## .end_call -## -## -##.end - - # Local Variables: # mode: cperl # cperl-indent-level: 4 diff --git a/compilers/pirc/t/subflags.t b/compilers/pirc/t/subflags.t index c2f7cd7779..43f7e8df91 100644 --- a/compilers/pirc/t/subflags.t +++ b/compilers/pirc/t/subflags.t @@ -1,21 +1,18 @@ #!perl -# Copyright (C) 2008, The Perl Foundation. +# Copyright (C) 2008-2009, The Perl Foundation. # $Id$ - use lib "../../lib"; use Parrot::Test tests => 1; -pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test for :main"); -.sub main :main +pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration"); +.sub main + say "ok" .end CODE -.namespace [] -.pcc_sub :main main: - end +ok OUTPUT - # Local Variables: # mode: cperl # cperl-indent-level: 4 diff --git a/config/gen/languages.pm b/config/gen/languages.pm index cbfdfd8691..367edb1e5b 100644 --- a/config/gen/languages.pm +++ b/config/gen/languages.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2008, The Perl Foundation. +# Copyright (C) 2006-2009, The Perl Foundation. # $Id$ =head1 NAME @@ -41,7 +41,6 @@ sub _init { cardinal chitchat cola c99 eclectus ecmascript forth - hq9plus jako json lazy-k lisp lolcode lua m4 markdown diff --git a/config/gen/makefiles/dynoplibs.in b/config/gen/makefiles/dynoplibs.in index dc9c81aed2..902570825a 100644 --- a/config/gen/makefiles/dynoplibs.in +++ b/config/gen/makefiles/dynoplibs.in @@ -1,10 +1,10 @@ # $Id$ -PERL = @perl@ -RM_F = @rm_f@ -LOAD_EXT = @load_ext@ +PERL = @perl@ +RM_F = @rm_f@ +LOAD_EXT = @load_ext@ RUNTIME_DIR = @build_dir@/runtime/parrot/dynext -O = @o@ +O = @o@ # add your dynamic op libraries here # @@ -21,7 +21,7 @@ all : @$(BUILD) copy --destination=$(RUNTIME_DIR) $(OPLIBS) test : all - cd ../.. ; perl -Ilib t/harness t/dynoplibs/*.t + cd ../.. && $(PERL) -Ilib t/harness t/dynoplibs/*.t testclean : $(RM_F) "../../t/dynoplibs/*.pir" "../../t/dynoplibs/*.pbc" diff --git a/config/gen/makefiles/dynpmc.in b/config/gen/makefiles/dynpmc.in index 8d17dc4aa7..a59b930edb 100644 --- a/config/gen/makefiles/dynpmc.in +++ b/config/gen/makefiles/dynpmc.in @@ -24,7 +24,7 @@ PMCS = \ #IF(has_crypto): sha1 \ #IF(has_crypto): sha256 \ #IF(has_crypto): sha512 \ - subproxy + subproxy BUILD = $(PERL) @build_dir@/tools/build/dynpmc.pl @@ -46,7 +46,7 @@ all : @$(BUILD) copy --destination=$(RUNTIME_DIR) $(PMCS) test : all - cd ../.. ; perl -Ilib t/harness t/dynpmc/*.t + cd ../.. && $(PERL) -Ilib t/harness t/dynpmc/*.t testclean : $(RM_F) "../../t/dynpmc/*.pir" "../../t/dynpmc/*.pbc" diff --git a/config/gen/makefiles/json.in b/config/gen/makefiles/json.in index efe59641a4..6219e2cae9 100644 --- a/config/gen/makefiles/json.in +++ b/config/gen/makefiles/json.in @@ -33,7 +33,7 @@ test: all cd $(TOOL_DIR) && prove -r t/compilers/json testclean: - $(RM_F) "../../t/compilers/json/*.pir" \ + $(RM_F) "../../t/compilers/json/*.pir" JSON.pbc : JSON/grammar.pbc JSON/pge2pir.pbc JSON.pir $(PARROT) --output=JSON.pbc JSON.pir @@ -51,4 +51,4 @@ JSON/pge2pir.pir : JSON/pge2pir.tg $(PARROT) $(TGE_DIR)/tgc.pir --output=JSON/pge2pir.pir JSON/pge2pir.tg clean : testclean - @rm_f@ "JSON/*.pbc" "JSON/*.pir" JSON.pbc + $(RM_F) "JSON/*.pbc" "JSON/*.pir" JSON.pbc diff --git a/config/gen/makefiles/nqp.in b/config/gen/makefiles/nqp.in index 75f9a6dbc4..14bacd3c82 100644 --- a/config/gen/makefiles/nqp.in +++ b/config/gen/makefiles/nqp.in @@ -10,13 +10,15 @@ PGE_LIBRARY = @build_dir@/runtime/parrot/library/PGE all: nqp.pbc -SOURCES = nqp.pir \ +SOURCES = \ + nqp.pir \ src/Grammar.pg \ src/Grammar/Actions.pir \ src/builtins.pir -BOOTSRC = bootstrap/nqp.pir \ - bootstrap/actions.pm +BOOTSRC = \ + bootstrap/nqp.pir \ + bootstrap/actions.pm # the default target nqp.pbc: $(PARROT) $(PGE_LIBRARY)/Perl6Grammar.pir $(SOURCES) @@ -26,9 +28,9 @@ nqp.pbc: $(PARROT) $(PGE_LIBRARY)/Perl6Grammar.pir $(SOURCES) boot: $(BOOTSRC) $(PARROT) nqp.pbc \ - --output=bootstrap/gen_actions.pir \ - --target=pir \ - bootstrap/actions.pm + --output=bootstrap/gen_actions.pir \ + --target=pir \ + bootstrap/actions.pm $(PARROT) --output-pbc -o bootstrap/nqp.pbc bootstrap/nqp.pir # This is a listing of all targets, that are meant to be called by users diff --git a/config/gen/makefiles/pct.in b/config/gen/makefiles/pct.in index 42bf1edfae..3f6c8e43b2 100644 --- a/config/gen/makefiles/pct.in +++ b/config/gen/makefiles/pct.in @@ -1,14 +1,14 @@ # $Id$ # Setup some commands -LN_S = @lns@ PERL = @perl@ RM_F = @rm_f@ +CP = @cp@ PARROT = ../../parrot@exe@ + TOOL_DIR = ../.. PGE_DIR = ../../compilers/pge TEST_DIR = ../../t/compilers/pct -CP = @cp@ # Where to put things PARROT_LIBRARY = ../../runtime/parrot/library @@ -58,7 +58,7 @@ help: @echo " help: Print this help message." @echo "" -test: all +test: all cd $(TOOL_DIR) && prove -r t/compilers/pct testclean: diff --git a/config/gen/makefiles/pge.in b/config/gen/makefiles/pge.in index 9e82a9e964..43ca7b98b2 100644 --- a/config/gen/makefiles/pge.in +++ b/config/gen/makefiles/pge.in @@ -1,12 +1,12 @@ # $Id$ # Setup some commands -LN_S = @lns@ PERL = @perl@ RM_F = @rm_f@ +CP = @cp@ PARROT = ../../parrot@exe@ + TOOL_DIR = ../.. -CP = @cp@ # Where to put things PARROT_LIBRARY = ../../runtime/parrot/library @@ -14,7 +14,8 @@ PARROT_LIBRARY = ../../runtime/parrot/library # the default target all: $(PARROT_LIBRARY)/PGE.pbc -SOURCES = PGE.pir \ +SOURCES = \ + PGE.pir \ PGE/Exp.pir \ PGE/Match.pir \ PGE/Regex.pir \ @@ -55,21 +56,21 @@ help: @echo "" test: all - cd $(TOOL_DIR); prove -r t/compilers/pge + cd $(TOOL_DIR) && prove -r t/compilers/pge testclean: $(RM_F) "../../t/compilers/pge/*.pir" \ "../../t/compilers/pge/p5regex/*.pir" \ - "../../t/compilers/pge/perl6regex/*.pir" - $(RM_F) "../../t/compilers/pge/*.pbc" \ + "../../t/compilers/pge/perl6regex/*.pir" \ + "../../t/compilers/pge/*.pbc" \ "../../t/compilers/pge/p5regex/*.pbc" \ "../../t/compilers/pge/perl6regex/*.pbc" clean: testclean $(RM_F) \ - PGE.pbc \ - $(PARROT_LIBRARY)/PGE.pbc \ - PGE/builtins_gen.pir + PGE.pbc \ + $(PARROT_LIBRARY)/PGE.pbc \ + PGE/builtins_gen.pir realclean: clean $(RM_F) Makefile diff --git a/config/gen/makefiles/pirc.in b/config/gen/makefiles/pirc.in index d4c5ec325c..fb5c7cc315 100644 --- a/config/gen/makefiles/pirc.in +++ b/config/gen/makefiles/pirc.in @@ -1,7 +1,8 @@ # $Id$ +.SUFFIXES : .c @o@ + # Setup some commands -LN_S = @lns@ PERL = @perl@ RM_F = @rm_f@ PARROT = ../../parrot@exe@ @@ -26,37 +27,38 @@ LINKFLAGS = @linkflags@ @link_debug@ @ld_debug@ LD = @ld@ LDFLAGS = @ldflags@ @ld_debug@ -SOURCES = src/main.c \ -src/pirparser.c \ -src/pirlexer.c \ -src/pircompunit.c \ -src/pircompiler.c \ -src/pirsymbol.c \ -src/piremit.c \ -src/hdocprep.c \ -src/pirmacro.c \ -src/pirregalloc.c \ -src/bcgen.c \ -src/pirerr.c \ -src/pircapi.c \ -src/pirop.c +SOURCES = \ + src/main.c \ + src/pirparser.c \ + src/pirlexer.c \ + src/pircompunit.c \ + src/pircompiler.c \ + src/pirsymbol.c \ + src/piremit.c \ + src/hdocprep.c \ + src/pirmacro.c \ + src/pirregalloc.c \ + src/bcgen.c \ + src/pirerr.c \ + src/pircapi.c \ + src/pirop.c OBJS = \ -src/main$(O) \ -src/pirparser$(O) \ -src/pirlexer$(O) \ -src/pircompunit$(O) \ -src/pircompiler$(O) \ -src/pirsymbol$(O) \ -src/piremit$(O) \ -src/hdocprep$(O) \ -src/pirmacro$(O) \ -src/pirregalloc$(O) \ -src/bcgen$(O) \ -src/pirpcc$(O) \ -src/pirerr$(O) \ -src/pircapi$(O) \ -src/pirop$(O) + src/main$(O) \ + src/pirparser$(O) \ + src/pirlexer$(O) \ + src/pircompunit$(O) \ + src/pircompiler$(O) \ + src/pirsymbol$(O) \ + src/piremit$(O) \ + src/hdocprep$(O) \ + src/pirmacro$(O) \ + src/pirregalloc$(O) \ + src/bcgen$(O) \ + src/pirpcc$(O) \ + src/pirerr$(O) \ + src/pircapi$(O) \ + src/pirop$(O) .c$(O) : @$(PERL) ../../tools/dev/cc_flags.pl -v ../../CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $< @@ -68,8 +70,8 @@ all: pirc$(EXE) pirc$(EXE): $(OBJS) $(LINK) @ld_out@$@ \ - $(OBJS) \ - @rpath_blib@ @libparrot_ldflags@ $(C_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) + $(OBJS) \ + @rpath_blib@ @libparrot_ldflags@ $(C_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) src/pirparser$(O): src/pirparser.c src/pirparser.h src/pirlexer$(O): src/pirlexer.c src/pirlexer.h @@ -98,12 +100,11 @@ Makefile: $(BUILD_DIR)/config/gen/makefiles/pirc.in clean: $(RM_F) *$(O) $(RM_F) $(OBJS) - $(RM_F) pirc + $(RM_F) pirc$(EXE) realclean: clean $(RM_F) \ -Makefile \ -pirc$(EXE) \ -doc/*.html + Makefile \ + doc/*.html distclean: realclean diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in index 25d0c99abd..dd3afe543f 100644 --- a/config/gen/makefiles/root.in +++ b/config/gen/makefiles/root.in @@ -383,16 +383,16 @@ INTERP_O_FILES = \ $(SRC_DIR)/exit$(O) \ $(SRC_DIR)/extend$(O) \ $(SRC_DIR)/extend_vtable$(O) \ - $(SRC_DIR)/gc/dod$(O) \ - $(SRC_DIR)/gc/gc_gms$(O) \ - $(SRC_DIR)/gc/gc_ims$(O) \ + $(SRC_DIR)/gc/api$(O) \ + $(SRC_DIR)/gc/generational_ms$(O) \ + $(SRC_DIR)/gc/incremental_ms$(O) \ $(SRC_DIR)/gc/memory$(O) \ + $(SRC_DIR)/gc/pools$(O) \ $(SRC_DIR)/gc/register$(O) \ - $(SRC_DIR)/gc/smallobject$(O) \ + $(SRC_DIR)/gc/mark_sweep$(O) \ $(SRC_DIR)/global$(O) \ $(SRC_DIR)/global_setup$(O) \ $(SRC_DIR)/hash$(O) \ - $(SRC_DIR)/headers$(O) \ $(SRC_DIR)/hll$(O) \ $(SRC_DIR)/inter_call$(O) \ $(SRC_DIR)/inter_cb$(O) \ @@ -1069,20 +1069,20 @@ $(SRC_DIR)/exec_save$(O) : $(GENERAL_H_FILES) @TEMP_exec_h@ $(SRC_DIR)/key$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/key.str -$(SRC_DIR)/gc/smallobject$(O) : $(GENERAL_H_FILES) +$(SRC_DIR)/gc/mark_sweep$(O) : $(GENERAL_H_FILES) -$(SRC_DIR)/gc/dod$(O) : $(GENERAL_H_FILES) +$(SRC_DIR)/gc/api$(O) : $(GENERAL_H_FILES) -$(SRC_DIR)/gc/gc_ims$(O) : $(GENERAL_H_FILES) +$(SRC_DIR)/gc/generational_ms$(O) : $(GENERAL_H_FILES) -$(SRC_DIR)/gc/gc_gms$(O) : $(GENERAL_H_FILES) +$(SRC_DIR)/gc/incremental_ms$(O) : $(GENERAL_H_FILES) + +$(SRC_DIR)/gc/pools$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/gc/resources$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/gc/res_lea$(O) : $(GENERAL_H_FILES) -$(SRC_DIR)/headers$(O) : $(GENERAL_H_FILES) - $(SRC_DIR)/hll$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/hll.str $(SRC_DIR)/platform$(O) : $(GENERAL_H_FILES) diff --git a/config/gen/makefiles/tge.in b/config/gen/makefiles/tge.in index ae381b62a6..d9ad61b30c 100644 --- a/config/gen/makefiles/tge.in +++ b/config/gen/makefiles/tge.in @@ -51,12 +51,12 @@ testclean: clean: testclean $(RM_F) TGE/Rule.pbc \ - TGE/Parser.pir \ - TGE/Parser.pbc \ - TGE/Tree.pbc \ - TGE/Grammar.pbc \ - TGE/Compiler.pbc \ - $(PARROT_LIBRARY)/TGE.pbc + TGE/Parser.pir \ + TGE/Parser.pbc \ + TGE/Tree.pbc \ + TGE/Grammar.pbc \ + TGE/Compiler.pbc \ + $(PARROT_LIBRARY)/TGE.pbc realclean: clean $(RM_F) Makefile diff --git a/docs/book/ch04_pir_subroutines.pod b/docs/book/ch04_pir_subroutines.pod index 58b375b56c..3445e34c9a 100644 --- a/docs/book/ch04_pir_subroutines.pod +++ b/docs/book/ch04_pir_subroutines.pod @@ -520,7 +520,7 @@ entry labels inside C<.emit> blocks have to be global labels: ret .eom -=head2 Methods +=head2 Namespaces, Methods, and VTABLES Z @@ -582,7 +582,7 @@ can invoke it like a normal subroutine: $P1 = get_global ["Foo"], "MySubroutine" $P1() # invoke it -=head3 Method Syntax +=head3 Calling Methods Z @@ -604,10 +604,38 @@ variable that does. Here's an example: .local string methname = "Foo" object.methname() # Same as object."Foo"() + object."Foo"() # Same The invocant can be a variable or register, and the method name can be a literal string, string variable, or method object PMC. +=head3 Defining Methods + +Methods are defined like any other subroutine except with two major +differences: They must be inside a namespace named after the class +they are a part of, and they must use the C<:method> flag. + + .namespace [ "MyClass"] + + .sub "MyMethod" :method + ... + +Inside the method, the invocant object can be accessed using the C +keyword. C isn't the only name you can call this value, however. +You can also use the C<:invocant> flag to define a new name for the invocant +object: + + .sub "MyMethod" :method + $S0 = self # Already defined as "self" + say $S0 + .end + + .sub "MyMethod2" :method + .param pmc item :invocant # "self" is now called "item" + $S0 = item + say $S0 + .end + This example defines two methods in the C class. It calls one from the main body of the subroutine and the other from within the first method: @@ -648,7 +676,7 @@ return values just like a single line subroutine call: (res1, res2) = obj."method"(arg1, arg2) -=head2 VTABLEs +=head3 VTABLEs PMCs all subscribe to a common interface of functions called X VTABLEs. Every PMC implements the same set of these interfaces, which diff --git a/docs/debug.pod b/docs/debug.pod index 89adc20466..443a16606b 100644 --- a/docs/debug.pod +++ b/docs/debug.pod @@ -58,17 +58,17 @@ maximizes the probability that any newborn objects will run afoul of the garbage collector. Within the C<--gc-debug> mode, there is another tool to help narrow down the -problem. You can edit F and C<#define> the C flag to 1. -After recompiling C, the garbage collector will perform additional +problem. You can edit F and C<#define> the C flag to +1. After recompiling C, the garbage collector will perform additional checks. After the garbage collector has traced all objects to find which ones are still alive, it will scan through all of the dead objects to see if any of them believe they are alive (which will happen for infants, since they come -into existence marked live.) If it finds any, it will print them out. You can -then re-run the program with a breakpoint set on the routine that allocated the -object (e.g. C in F). You'll probably want -to make the breakpoint conditional on the object having the version number that -was reported, because the same memory location will probably hold many -different objects over the lifetime of the program. +into existence marked live.) If it finds any, it will print them out. +You can then re-run the program with a breakpoint set on the routine that +allocated the object (e.g. C in F). +You'll probably want to make the breakpoint conditional on the object having +the version number that was reported, because the same memory location will +probably hold many different objects over the lifetime of the program. =head1 PIR AND PASM CODE diff --git a/docs/memory_internals.pod b/docs/memory_internals.pod index 221a95e61d..4d03d90227 100644 --- a/docs/memory_internals.pod +++ b/docs/memory_internals.pod @@ -258,9 +258,9 @@ filled in. =head1 FILES -smallobject.[ch], headers.c, resources.[ch], res_lea.c, dod.c, string.[ch], -pobj.h. Other garbage collector implementations may use separate files as -well. +mark_sweep.[ch], src/gc/pools.c, resources.[ch], res_lea.c, src/gc/api.c, +string.[ch], pobj.h. Other garbage collector implementations may use separate +files as well. =head1 BUGS diff --git a/docs/pdds/draft/pdd08_keys.pod b/docs/pdds/draft/pdd08_keys.pod index 335c0fce96..5715aea4d7 100644 --- a/docs/pdds/draft/pdd08_keys.pod +++ b/docs/pdds/draft/pdd08_keys.pod @@ -19,10 +19,11 @@ functions. These variants are called C operations, as they act on a specific indexed element of an aggregate PMC. Examples of a aggregate PMCs include C, C and C. -Non-aggregates may also support C<_keyed> variants of the VTABLE functions, but -they not do anything particularly clever. For instance, PMC types implementing -Perl references will merely pass the index on to the referent. These aren't -aggregates because they don't directly store or reference elements. +Non-aggregates may also support C<_keyed> variants of the VTABLE functions, +but they not do anything particularly clever. For instance, PMC types +implementing Perl references will merely pass the index on to the referent. +These aren't aggregates because they don't directly store or reference +elements. Indexing operations take one or more aggregate B. At runtime these operations will index into the B using the C and return a @@ -32,8 +33,8 @@ B. Here is a well-known indexing operation in Perl 6: The B here is the constant integer C<12> The aggregate is the C C<@a>. In the process of this assignment, Parrot will have to -extract the PMC in element 12 of the array, producing a C. C<$b> is then -assigned to this value. +extract the PMC in element 12 of the array, producing a C. +C<$b> is then assigned to this value. Now, how does this all get implemented? @@ -52,8 +53,8 @@ of the C PMC is stored in the PMC's cache (i.e. C, C). For example, indexing the multidimensional array C<@foo[$a,12;"hi"]> -produces three PMCs; one with a PMC type, one with an integer type and one with -a string type. +produces three PMCs; one with a PMC type, one with an integer type +and one with a string type. The key type is encoded in the PMC flags using 8 bits based on the following scheme (from includes/parrot/key.h): diff --git a/docs/pdds/pdd09_gc.pod b/docs/pdds/pdd09_gc.pod index 807c610540..ff370b1c60 100644 --- a/docs/pdds/pdd09_gc.pod +++ b/docs/pdds/pdd09_gc.pod @@ -567,14 +567,14 @@ Always use these provided macros when you need to test or set these flags. The PMC has some sort of active destructor, and will have that destructor called when the PMC is destroyed. The destructor is typically called from -within C. +within C. =item PObj_custom_mark_FLAG The C vtable slot will be called during the GC mark phase. The mark function must call C for all non-NULL objects (Buffers and PMCs) that PMC refers to. This flag is typically tested and the custom mark -VTABLE method called from C. +VTABLE method called from C. =item PObj_data_is_PMC_array_FLAG diff --git a/docs/pdds/pdd19_pir.pod b/docs/pdds/pdd19_pir.pod index 8b614f0849..ffcb455201 100644 --- a/docs/pdds/pdd19_pir.pod +++ b/docs/pdds/pdd19_pir.pod @@ -398,7 +398,8 @@ Then you're asking for a bigger bytecode file as a result. Define "main" entry point to start execution. If multiple subroutines are marked as B<:main>, the B marked subroutine is used. Only the first file loaded or compiled counts; subs marked as B<:main> are ignored by the -B op. +B op. If no B<:main> flag is specified at all, execution +starts at the first subroutine in the file. =item :load diff --git a/docs/pmc.pod b/docs/pmc.pod index de59d14144..29b49dee46 100644 --- a/docs/pmc.pod +++ b/docs/pmc.pod @@ -94,7 +94,7 @@ handle at the end of a block scope, if the PMC isn't alive any more. =head1 SEE ALSO -F, F, F +F, F, F =head1 AUTHOR diff --git a/docs/project/cage_cleaners_guide.pod b/docs/project/cage_cleaners_guide.pod index fe3af36306..85ed502e1f 100644 --- a/docs/project/cage_cleaners_guide.pod +++ b/docs/project/cage_cleaners_guide.pod @@ -5,10 +5,11 @@ From F: - Fixes failing tests, makes sure coding standards are implemented, reviews - documentation and examples. A class of tickets in the tracking system (RT) - has been created for use by this group. This is an entry level position, and - viewed as a good way to get familiar with parrot internals. + Fixes failing tests, makes sure coding standards are implemented, + reviews documentation and examples. A class of tickets in the + tracking system (RT or Trac) has been created for use by this + group. This is an entry level position, and viewed as a good way + to get familiar with parrot internals. =head1 Testing Parrot after making a code cleaning change diff --git a/examples/nci/ls.pir b/examples/nci/ls.pir index 68346512f9..8e9211b70b 100644 --- a/examples/nci/ls.pir +++ b/examples/nci/ls.pir @@ -16,7 +16,7 @@ List the content of the directory 'docs'. .local pmc opendir .local pmc readdir .local pmc closedir - null libc + libc = loadlib 'libc' dlfunc opendir, libc, 'opendir', 'pt' dlfunc readdir, libc, 'readdir', 'pp' dlfunc closedir, libc, 'closedir', 'ip' diff --git a/ext/Parrot-Embed/t/pipp.t b/ext/Parrot-Embed/t/pipp.t index 943ee84992..bb2d3cf180 100644 --- a/ext/Parrot-Embed/t/pipp.t +++ b/ext/Parrot-Embed/t/pipp.t @@ -1,5 +1,5 @@ #!perl -# Copyright (C) 2008, The Perl Foundation. +# Copyright (C) 2008-2009, The Perl Foundation. # $Id$ use strict; @@ -28,7 +28,10 @@ is( $except, '', '... throwing no exeption if so' ); # What is 'Pipp' in hll namespace 'parrot' ? my $pipp_x = $interp->find_global( 'Pipp' ); -isa_ok( $pipp_x, 'Parrot::PMC' ); +{ + local $TODO = 'Namespace and HLL not working yet'; + isa_ok( $pipp_x, 'Parrot::PMC' ); +} # TODO: get hll id of Pipp # TODO: set hll namespace root to 'pipp' diff --git a/include/parrot/enums.h b/include/parrot/enums.h index 5f10f3f4ed..fe79f4295b 100644 --- a/include/parrot/enums.h +++ b/include/parrot/enums.h @@ -58,7 +58,9 @@ typedef enum { /* unused - 0x040 */ PARROT_ARG_OPTIONAL = 0x080, /* 128 */ PARROT_ARG_OPT_FLAG = 0x100, /* 256 prev optional was set */ - PARROT_ARG_NAME = 0x200 /* 512 this String is an arg name */ + PARROT_ARG_NAME = 0x200, /* 512 this String is an arg name */ + PARROT_ARG_LOOKAHEAD = 0x400, /* 1024 this is a lookahead argument */ + PARROT_ARG_INVOCANT = 0x800 /* 2048 this PMC is an invocant */ /* more to come soon */ } Call_bits_enum_t; @@ -77,6 +79,7 @@ typedef enum { #define PARROT_ARG_OPTIONAL_ISSET(o) ((o) & PARROT_ARG_OPTIONAL) #define PARROT_ARG_OPT_FLAG_ISSET(o) ((o) & PARROT_ARG_OPT_FLAG) #define PARROT_ARG_NAME_ISSET(o) ((o) & PARROT_ARG_NAME) +#define PARROT_ARG_INVOCANT_ISSET(o) ((o) & PARROT_ARG_INVOCANT) #endif /* PARROT_ENUMS_H_GUARD */ diff --git a/include/parrot/dod.h b/include/parrot/gc_api.h similarity index 71% rename from include/parrot/dod.h rename to include/parrot/gc_api.h index 0290587d11..ea3b6a6690 100644 --- a/include/parrot/dod.h +++ b/include/parrot/gc_api.h @@ -1,5 +1,5 @@ -/* dod.h - * Copyright (C) 2001-2007, The Perl Foundation. +/* gc_api.h + * Copyright (C) 2001-2009, The Perl Foundation. * SVN Info * $Id$ * Overview: @@ -8,9 +8,14 @@ * Initial version by Mike Lambert on 2002.05.27 */ -#ifndef PARROT_DOD_H_GUARD -#define PARROT_DOD_H_GUARD +#ifndef PARROT_GC_API_H_GUARD +#define PARROT_GC_API_H_GUARD +/* Set this to 1 to see if unanchored objects are found in system areas. + * Please note: these objects might be bogus */ +#define GC_VERBOSE 0 + +#include "parrot/gc_mark_sweep.h" #include "parrot/parrot.h" /* Macros for recursively blocking and unblocking DOD */ @@ -47,27 +52,43 @@ #define GC_finish_FLAG (UINTVAL)(1 << 2) /* on Parrot exit: mark (almost) all PMCs dead and */ /* garbage collect. */ -/* HEADERIZER BEGIN: src/gc/dod.c */ +/* HEADERIZER BEGIN: src/gc/api.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -PARROT_EXPORT -void pobject_lives(PARROT_INTERP, ARGMOD(PObj *obj)) +void add_pmc_ext(PARROT_INTERP, ARGMOD(PMC *pmc)) __attribute__nonnull__(1) __attribute__nonnull__(2) - FUNC_MODIFIES(*obj); + FUNC_MODIFIES(*pmc); -void clear_cow(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int cleanup) +void add_pmc_sync(PARROT_INTERP, ARGMOD(PMC *pmc)) __attribute__nonnull__(1) __attribute__nonnull__(2) - FUNC_MODIFIES(*pool); + FUNC_MODIFIES(*pmc); -void Parrot_do_dod_run(PARROT_INTERP, UINTVAL flags) +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +Buffer * new_buffer_header(PARROT_INTERP) + __attribute__nonnull__(1); + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +void * new_bufferlike_header(PARROT_INTERP, size_t size) + __attribute__nonnull__(1); + +PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +PMC * new_pmc_header(PARROT_INTERP, UINTVAL flags) __attribute__nonnull__(1); -void Parrot_dod_clear_live_bits(PARROT_INTERP) +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +STRING * new_string_header(PARROT_INTERP, UINTVAL flags) __attribute__nonnull__(1); -void Parrot_dod_free_buffer(SHIM_INTERP, +void Parrot_do_dod_run(PARROT_INTERP, UINTVAL flags) + __attribute__nonnull__(1); + +void Parrot_gc_free_buffer(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool), ARGMOD(PObj *b)) __attribute__nonnull__(2) @@ -75,113 +96,81 @@ void Parrot_dod_free_buffer(SHIM_INTERP, FUNC_MODIFIES(*pool) FUNC_MODIFIES(*b); -void Parrot_dod_free_buffer_malloc(SHIM_INTERP, +void Parrot_gc_free_buffer_malloc(SHIM_INTERP, SHIM(Small_Object_Pool *pool), ARGMOD(PObj *b)) __attribute__nonnull__(3) FUNC_MODIFIES(*b); -void Parrot_dod_free_pmc(PARROT_INTERP, +void Parrot_gc_free_pmc(PARROT_INTERP, SHIM(Small_Object_Pool *pool), ARGMOD(PObj *p)) __attribute__nonnull__(1) __attribute__nonnull__(3) FUNC_MODIFIES(*p); -void Parrot_dod_free_sysmem(SHIM_INTERP, +void Parrot_gc_free_pmc_ext(PARROT_INTERP, ARGMOD(PMC *p)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*p); + +void Parrot_gc_free_sysmem(SHIM_INTERP, SHIM(Small_Object_Pool *pool), ARGMOD(PObj *b)) __attribute__nonnull__(3) FUNC_MODIFIES(*b); -void Parrot_dod_ms_run(PARROT_INTERP, UINTVAL flags) +void Parrot_gc_ms_run_init(PARROT_INTERP) __attribute__nonnull__(1); -void Parrot_dod_ms_run_init(PARROT_INTERP) +void Parrot_gc_profile_end(PARROT_INTERP, int what) __attribute__nonnull__(1); -void Parrot_dod_profile_end(PARROT_INTERP, int what) +void Parrot_gc_profile_start(PARROT_INTERP) __attribute__nonnull__(1); -void Parrot_dod_profile_start(PARROT_INTERP) - __attribute__nonnull__(1); - -void Parrot_dod_sweep(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*pool); - -int Parrot_dod_trace_children(PARROT_INTERP, size_t how_many) - __attribute__nonnull__(1); - -void Parrot_dod_trace_pmc_data(PARROT_INTERP, ARGIN(PMC *p)) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -int Parrot_dod_trace_root(PARROT_INTERP, int trace_stack) - __attribute__nonnull__(1); - -void Parrot_free_pmc_ext(PARROT_INTERP, ARGMOD(PMC *p)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*p); - void trace_mem_block(PARROT_INTERP, size_t lo_var_ptr, size_t hi_var_ptr) __attribute__nonnull__(1); -void used_cow(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int cleanup) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*pool); - -#define ASSERT_ARGS_pobject_lives __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_add_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(obj) -#define ASSERT_ARGS_clear_cow __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + || PARROT_ASSERT_ARG(pmc) +#define ASSERT_ARGS_add_pmc_sync __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(pool) -#define ASSERT_ARGS_Parrot_do_dod_run __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + || PARROT_ASSERT_ARG(pmc) +#define ASSERT_ARGS_new_buffer_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_Parrot_dod_clear_live_bits __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_new_bufferlike_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) +#define ASSERT_ARGS_new_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) +#define ASSERT_ARGS_new_string_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) +#define ASSERT_ARGS_Parrot_do_dod_run __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_Parrot_dod_free_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_Parrot_gc_free_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(pool) \ || PARROT_ASSERT_ARG(b) -#define ASSERT_ARGS_Parrot_dod_free_buffer_malloc __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_Parrot_gc_free_buffer_malloc __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(b) -#define ASSERT_ARGS_Parrot_dod_free_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_Parrot_gc_free_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(p) -#define ASSERT_ARGS_Parrot_dod_free_sysmem __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_Parrot_gc_free_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) \ + || PARROT_ASSERT_ARG(p) +#define ASSERT_ARGS_Parrot_gc_free_sysmem __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(b) -#define ASSERT_ARGS_Parrot_dod_ms_run __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_Parrot_dod_ms_run_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_Parrot_dod_profile_end __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_Parrot_gc_ms_run_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_Parrot_dod_profile_start __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_Parrot_gc_profile_end __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_Parrot_dod_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(pool) -#define ASSERT_ARGS_Parrot_dod_trace_children __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_Parrot_dod_trace_pmc_data __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(p) -#define ASSERT_ARGS_Parrot_dod_trace_root __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_Parrot_gc_profile_start __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_Parrot_free_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(p) #define ASSERT_ARGS_trace_mem_block __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_used_cow __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(pool) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -/* HEADERIZER END: src/gc/dod.c */ +/* HEADERIZER END: src/gc/api.c */ /* HEADERIZER BEGIN: src/cpu_dep.c */ @@ -203,7 +192,7 @@ extern int CONSERVATIVE_POINTER_CHASING; /* GC subsystem init functions */ -/* HEADERIZER BEGIN: src/gc/gc_gms.c */ +/* HEADERIZER BEGIN: src/gc/generational_ms.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ PARROT_EXPORT @@ -256,33 +245,31 @@ void parrot_gc_gms_wb_key(PARROT_INTERP, || PARROT_ASSERT_ARG(_new) \ || PARROT_ASSERT_ARG(new_key) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -/* HEADERIZER END: src/gc/gc_gms.c */ +/* HEADERIZER END: src/gc/generational_ms.c */ -/* HEADERIZER BEGIN: src/gc/gc_ims.c */ +/* HEADERIZER BEGIN: src/gc/incremental_ms.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -void Parrot_dod_ims_wb(PARROT_INTERP, ARGMOD(PMC *agg), ARGMOD(PMC *_new)) +void Parrot_gc_ims_init(PARROT_INTERP) + __attribute__nonnull__(1); + +void Parrot_gc_ims_wb(PARROT_INTERP, ARGMOD(PMC *agg), ARGMOD(PMC *_new)) __attribute__nonnull__(1) __attribute__nonnull__(2) __attribute__nonnull__(3) FUNC_MODIFIES(*agg) FUNC_MODIFIES(*_new); -void Parrot_gc_ims_init(PARROT_INTERP) - __attribute__nonnull__(1); - -#define ASSERT_ARGS_Parrot_dod_ims_wb __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_Parrot_gc_ims_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) +#define ASSERT_ARGS_Parrot_gc_ims_wb __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(agg) \ || PARROT_ASSERT_ARG(_new) -#define ASSERT_ARGS_Parrot_gc_ims_init __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: src/gc/gc_ims.c */ +/* HEADERIZER END: src/gc/incremental_ms.c */ -/* - * write barrier - */ +/* write barrier */ #if PARROT_GC_IMS # define GC_WRITE_BARRIER(interp, agg, old, _new) \ do { \ @@ -327,7 +314,7 @@ void Parrot_gc_ims_init(PARROT_INTERP) #endif -#endif /* PARROT_DOD_H_GUARD */ +#endif /* PARROT_GC_API_H_GUARD */ /* * Local variables: diff --git a/include/parrot/smallobject.h b/include/parrot/gc_mark_sweep.h similarity index 78% rename from include/parrot/smallobject.h rename to include/parrot/gc_mark_sweep.h index ee409b66c7..c85da427a4 100644 --- a/include/parrot/smallobject.h +++ b/include/parrot/gc_mark_sweep.h @@ -3,8 +3,8 @@ * Copyright (C) 2002-2008, The Perl Foundation */ -#ifndef PARROT_SMALLOBJECT_H_GUARD -#define PARROT_SMALLOBJECT_H_GUARD +#ifndef PARROT_GC_MARK_SWEEP_H_GUARD +#define PARROT_GC_MARK_SWEEP_H_GUARD # include "parrot/parrot.h" @@ -18,6 +18,12 @@ typedef struct Small_Object_Arena { struct Small_Object_Pool; +typedef enum { + GC_TRACE_FULL, + GC_TRACE_ROOT_ONLY, + GC_TRACE_SYSTEM_ONLY +} Parrot_gc_trace_type; + typedef void (*add_free_object_fn_type)(PARROT_INTERP, struct Small_Object_Pool *, void *); typedef void * (*get_free_object_fn_type)(PARROT_INTERP, struct Small_Object_Pool *); typedef void (*alloc_objects_fn_type)(PARROT_INTERP, struct Small_Object_Pool *); @@ -134,9 +140,15 @@ typedef struct Small_Object_Pool { #endif -/* HEADERIZER BEGIN: src/gc/smallobject.c */ +/* HEADERIZER BEGIN: src/gc/mark_sweep.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ +PARROT_EXPORT +void pobject_lives(PARROT_INTERP, ARGMOD(PObj *obj)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*obj); + PARROT_WARN_UNUSED_RESULT INTVAL contained_in_pool( ARGIN(const Small_Object_Pool *pool), @@ -173,9 +185,30 @@ void Parrot_append_arena_in_pool(PARROT_INTERP, FUNC_MODIFIES(*pool) FUNC_MODIFIES(*new_arena); +void Parrot_gc_clear_live_bits(PARROT_INTERP) + __attribute__nonnull__(1); + void Parrot_gc_ms_init(PARROT_INTERP) __attribute__nonnull__(1); +void Parrot_gc_ms_run(PARROT_INTERP, UINTVAL flags) + __attribute__nonnull__(1); + +void Parrot_gc_sweep(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*pool); + +int Parrot_gc_trace_children(PARROT_INTERP, size_t how_many) + __attribute__nonnull__(1); + +void Parrot_gc_trace_pmc_data(PARROT_INTERP, ARGIN(PMC *p)) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + +int Parrot_gc_trace_root(PARROT_INTERP, Parrot_gc_trace_type trace) + __attribute__nonnull__(1); + int Parrot_is_const_pmc(PARROT_INTERP, ARGIN(const PMC *pmc)) __attribute__nonnull__(1) __attribute__nonnull__(2); @@ -189,6 +222,9 @@ void Parrot_small_object_pool_merge(PARROT_INTERP, FUNC_MODIFIES(*dest) FUNC_MODIFIES(*source); +#define ASSERT_ARGS_pobject_lives __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) \ + || PARROT_ASSERT_ARG(obj) #define ASSERT_ARGS_contained_in_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(pool) \ || PARROT_ASSERT_ARG(ptr) @@ -203,8 +239,22 @@ void Parrot_small_object_pool_merge(PARROT_INTERP, PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(pool) \ || PARROT_ASSERT_ARG(new_arena) +#define ASSERT_ARGS_Parrot_gc_clear_live_bits __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_Parrot_gc_ms_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) +#define ASSERT_ARGS_Parrot_gc_ms_run __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) +#define ASSERT_ARGS_Parrot_gc_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) \ + || PARROT_ASSERT_ARG(pool) +#define ASSERT_ARGS_Parrot_gc_trace_children __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) +#define ASSERT_ARGS_Parrot_gc_trace_pmc_data __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) \ + || PARROT_ASSERT_ARG(p) +#define ASSERT_ARGS_Parrot_gc_trace_root __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_Parrot_is_const_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(pmc) @@ -214,9 +264,9 @@ void Parrot_small_object_pool_merge(PARROT_INTERP, || PARROT_ASSERT_ARG(dest) \ || PARROT_ASSERT_ARG(source) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -/* HEADERIZER END: src/gc/smallobject.c */ +/* HEADERIZER END: src/gc/mark_sweep.c */ -#endif /* PARROT_SMALLOBJECT_H_GUARD */ +#endif /* PARROT_GC_MARK_SWEEP_H_GUARD */ /* * Local variables: diff --git a/include/parrot/headers.h b/include/parrot/gc_pools.h similarity index 69% rename from include/parrot/headers.h rename to include/parrot/gc_pools.h index 2b06f85298..5959183000 100644 --- a/include/parrot/headers.h +++ b/include/parrot/gc_pools.h @@ -1,18 +1,17 @@ -/* headers.h - * Copyright (C) 2001-2003, The Perl Foundation. +/* gc_pools.h + * Copyright (C) 2001-2009, The Perl Foundation. * SVN Info * $Id$ * Overview: - * Header management functions. Handles getting of various headers, - * and pool creation + * Handles pool management for GC. * Data Structure and Algorithms: * History: * Notes: * References: */ -#ifndef PARROT_HEADERS_H_GUARD -#define PARROT_HEADERS_H_GUARD +#ifndef PARROT_GC_POOLS_H_GUARD +#define PARROT_GC_POOLS_H_GUARD #include "parrot/parrot.h" @@ -45,24 +44,20 @@ typedef enum { typedef int (*pool_iter_fn)(PARROT_INTERP, struct Small_Object_Pool *, int, void*); -/* HEADERIZER BEGIN: src/headers.c */ +/* HEADERIZER BEGIN: src/gc/pools.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -void add_pmc_ext(PARROT_INTERP, ARGMOD(PMC *pmc)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*pmc); - -void add_pmc_sync(PARROT_INTERP, ARGMOD(PMC *pmc)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*pmc); - PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool * get_bufferlike_pool(PARROT_INTERP, size_t buffer_size) __attribute__nonnull__(1); +PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +void * get_free_buffer(PARROT_INTERP, ARGIN(Small_Object_Pool *pool)) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + PARROT_WARN_UNUSED_RESULT size_t get_max_buffer_address(PARROT_INTERP) __attribute__nonnull__(1); @@ -89,47 +84,22 @@ int is_pmc_ptr(PARROT_INTERP, ARGIN(const void *ptr)) __attribute__nonnull__(1) __attribute__nonnull__(2); -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -Small_Object_Pool * make_bufferlike_pool(PARROT_INTERP, size_t buffer_size) - __attribute__nonnull__(1); - -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -Buffer * new_buffer_header(PARROT_INTERP) - __attribute__nonnull__(1); - PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool * new_buffer_pool(PARROT_INTERP) __attribute__nonnull__(1); -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -void * new_bufferlike_header(PARROT_INTERP, size_t size) - __attribute__nonnull__(1); - PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool * new_bufferlike_pool(PARROT_INTERP, size_t actual_buffer_size) __attribute__nonnull__(1); -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -PMC * new_pmc_header(PARROT_INTERP, UINTVAL flags) - __attribute__nonnull__(1); - PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool * new_pmc_pool(PARROT_INTERP) __attribute__nonnull__(1); -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -STRING * new_string_header(PARROT_INTERP, UINTVAL flags) - __attribute__nonnull__(1); - PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool * new_string_pool(PARROT_INTERP, INTVAL constant) @@ -146,9 +116,6 @@ int Parrot_forall_header_pools(PARROT_INTERP, __attribute__nonnull__(1) __attribute__nonnull__(4); -void Parrot_initialize_header_pool_names(PARROT_INTERP) - __attribute__nonnull__(1); - void Parrot_initialize_header_pools(PARROT_INTERP) __attribute__nonnull__(1); @@ -159,14 +126,11 @@ void Parrot_merge_header_pools( __attribute__nonnull__(2) FUNC_MODIFIES(*dest_interp); -#define ASSERT_ARGS_add_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(pmc) -#define ASSERT_ARGS_add_pmc_sync __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(pmc) #define ASSERT_ARGS_get_bufferlike_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) +#define ASSERT_ARGS_get_free_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) \ + || PARROT_ASSERT_ARG(pool) #define ASSERT_ARGS_get_max_buffer_address __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_get_max_pmc_address __attribute__unused__ int _ASSERT_ARGS_CHECK = \ @@ -181,22 +145,12 @@ void Parrot_merge_header_pools( #define ASSERT_ARGS_is_pmc_ptr __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(ptr) -#define ASSERT_ARGS_make_bufferlike_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_new_buffer_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_new_buffer_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_new_bufferlike_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_new_bufferlike_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_new_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_new_pmc_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_new_string_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_new_string_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_Parrot_destroy_header_pools __attribute__unused__ int _ASSERT_ARGS_CHECK = \ @@ -204,9 +158,6 @@ void Parrot_merge_header_pools( #define ASSERT_ARGS_Parrot_forall_header_pools __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(func) -#define ASSERT_ARGS_Parrot_initialize_header_pool_names \ - __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_Parrot_initialize_header_pools \ __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) @@ -214,10 +165,10 @@ void Parrot_merge_header_pools( PARROT_ASSERT_ARG(dest_interp) \ || PARROT_ASSERT_ARG(source_interp) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -/* HEADERIZER END: src/headers.c */ +/* HEADERIZER END: src/gc/pools.c */ -#endif /* PARROT_HEADERS_H_GUARD */ +#endif /* PARROT_GC_POOLS_H_GUARD */ /* * Local variables: diff --git a/include/parrot/inter_call.h b/include/parrot/inter_call.h index 2c2d072031..0f776d537a 100644 --- a/include/parrot/inter_call.h +++ b/include/parrot/inter_call.h @@ -173,18 +173,30 @@ void parrot_pass_args(PARROT_INTERP, FUNC_MODIFIES(*dest_indexes); PARROT_EXPORT -void Parrot_pcc_invoke_sub_from_c_args(PARROT_INTERP, +void Parrot_pcc_invoke_from_sig_object(PARROT_INTERP, ARGIN(PMC *sub_obj), - ARGIN(const char *sig), - ...) + ARGIN(PMC *sig_obj)) __attribute__nonnull__(1) __attribute__nonnull__(2) __attribute__nonnull__(3); PARROT_EXPORT -void Parrot_pcc_invoke_sub_from_sig_object(PARROT_INTERP, +void Parrot_pcc_invoke_method_from_c_args(PARROT_INTERP, + ARGIN(PMC* pmc), + ARGMOD(STRING *method_name), + ARGIN(const char *signature), + ...) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + __attribute__nonnull__(4) + FUNC_MODIFIES(*method_name); + +PARROT_EXPORT +void Parrot_pcc_invoke_sub_from_c_args(PARROT_INTERP, ARGIN(PMC *sub_obj), - ARGIN(PMC *sig_obj)) + ARGIN(const char *sig), + ...) __attribute__nonnull__(1) __attribute__nonnull__(2) __attribute__nonnull__(3); diff --git a/include/parrot/multidispatch.h b/include/parrot/multidispatch.h index 1fd8b081e0..2087a62334 100644 --- a/include/parrot/multidispatch.h +++ b/include/parrot/multidispatch.h @@ -60,10 +60,11 @@ PARROT_EXPORT PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL PMC* Parrot_build_sig_object_from_varargs(PARROT_INTERP, + ARGIN_NULLOK(PMC* obj), ARGIN(const char *sig), va_list args) __attribute__nonnull__(1) - __attribute__nonnull__(2); + __attribute__nonnull__(3); PARROT_EXPORT void Parrot_mmd_add_multi_from_c_args(PARROT_INTERP, diff --git a/include/parrot/parrot.h b/include/parrot/parrot.h index a0b1f99c22..8e960a44fc 100644 --- a/include/parrot/parrot.h +++ b/include/parrot/parrot.h @@ -297,9 +297,9 @@ typedef struct PackFile_ByteCode PackFile_ByteCode; #include "parrot/pmc.h" #include "parrot/events.h" #include "parrot/intlist.h" -#include "parrot/smallobject.h" -#include "parrot/headers.h" -#include "parrot/dod.h" +#include "parrot/gc_api.h" +#include "parrot/gc_mark_sweep.h" +#include "parrot/gc_pools.h" #include "parrot/resources.h" #include "parrot/string_funcs.h" #include "parrot/misc.h" diff --git a/include/parrot/settings.h b/include/parrot/settings.h index acacdf7fe4..092a36d9b4 100644 --- a/include/parrot/settings.h +++ b/include/parrot/settings.h @@ -27,7 +27,7 @@ /* Helpful internal macro for testing whether we are currently * debugging garbage collection and memory management. See also the - * definition of GC_VERBOSE in dod.c. */ + * definition of GC_VERBOSE in src/gc/api.c. */ #if DISABLE_GC_DEBUG # define GC_DEBUG(interp) 0 #else diff --git a/languages/APL/tools/gen_operator_defs.pl b/languages/APL/tools/gen_operator_defs.pl index 4aa720af4b..521dd2f233 100644 --- a/languages/APL/tools/gen_operator_defs.pl +++ b/languages/APL/tools/gen_operator_defs.pl @@ -57,7 +57,7 @@ .sub "__load_inlinetable" :load :init $P0 = new 'Hash' - store_global "APL", "%pirtable", $P0 + set_hll_global ['APL'], "%pirtable", $P0 .local pmc itable itable = new 'Hash' set_hll_global ['APL';'Grammar';'Actions'], '%inlinetable', itable diff --git a/languages/BASIC/compiler/COMP_parsefuncs.pm b/languages/BASIC/compiler/COMP_parsefuncs.pm index eeec821c46..efcca17ce5 100644 --- a/languages/BASIC/compiler/COMP_parsefuncs.pm +++ b/languages/BASIC/compiler/COMP_parsefuncs.pm @@ -299,10 +299,10 @@ PROMPTRND else { ( $result, $type, @code ) = EXPRESSION(); push @{ $code{$seg}->{code} }, <{code} }, <{code} }, <{code} }, <{args}}, $_; @@ -1532,8 +1532,8 @@ RTBE sub parse_data_setup { push @{ $code{_data}->{code} }, <{code} }, <keys() gets implemented - find_global BASICARR, "BASICARR" + get_global BASICARR, "BASICARR" $P1 = BASICARR[array] $P0 = $P1["index"] .local int i @@ -134,7 +134,7 @@ E_A2: $P0[i]=key $P1["index"]=$P0 BASICARR[array]=$P1 - store_global "BASICARR", BASICARR + set_global "BASICARR", BASICARR REALEND: noop .end @@ -148,7 +148,7 @@ REALEND: .local pmc TARGARR .local pmc TARGINDEX .local int i - find_global BASICARR, "BASICARR" + get_global BASICARR, "BASICARR" $P0=BASICARR[source] SRCINDEX=$P0["index"] $P0=BASICARR[target] @@ -176,13 +176,13 @@ ENDLOOP:noop # .param string rhs # .local string key # .local pmc BASICARR -# find_global BASICARR, "BASICARR" +# get_global BASICARR, "BASICARR" # key = _ARRAY_BUILDKEY() # Will absorb rest of arguments. # set $P0, BASICARR[array] # set $P0[key], rhs # -# store_global "BASICARR", BASICARR +# set_global "BASICARR", BASICARR #.end # These are probably defined somewhere, I can't find them. @@ -197,15 +197,15 @@ ENDLOOP:noop key = "" .local pmc thing - .local int key_type + .local string key_type KEYLOOP: if keycount ==0 goto KEYDONE thing = shift things key_type = typeof thing key .= "|" - if key_type == .Float goto ADDFLOAT - if key_type == .String goto ADDSTRING + if key_type == 'Float' goto ADDFLOAT + if key_type == 'String' goto ADDSTRING print "Wrong type on stack, key creation\n" end diff --git a/languages/BASIC/compiler/RT_builtins.pir b/languages/BASIC/compiler/RT_builtins.pir index e724b7969b..fcdd5a230a 100644 --- a/languages/BASIC/compiler/RT_builtins.pir +++ b/languages/BASIC/compiler/RT_builtins.pir @@ -27,16 +27,16 @@ # XXX Used to use entrytype. our naive fix here will eventually # fail, because of the two variable type arguments. - $P0 = find_global "PRINTCOL" + $P0 = get_global "PRINTCOL" PRINTCOL = $P0["value"] buf = "" NEXT: if argc==0 goto END_DISPLAY dec argc - $I0 = typeof printme - if $I0 == .String goto DISPSTRING - if $I0 != .Float goto DISPERR + $S0 = typeof printme + if $S0 == 'String' goto DISPSTRING + if $S0 != 'Float' goto DISPERR # Now, do num intver = printme @@ -85,7 +85,7 @@ DISPNL: goto NEXT END_DISPLAY: $P0["value"] = PRINTCOL - store_global "PRINTCOL", $P0 + set_global "PRINTCOL", $P0 print buf .return(buf) DISPERR: @@ -245,7 +245,7 @@ MIDDONE: .sub _BUILTIN_RND # num rnd([num seed]) .param int argc .local int RANDSEED - find_global $P0, "RANDSEED" + get_global $P0, "RANDSEED" set RANDSEED, $P0["value"] eq argc, 0, RND_GEN .local num repeat @@ -264,7 +264,7 @@ RND_REPEAT: RND_BAIL: set $P0["value"], RANDSEED - store_global "RANDSEED", $P0 + set_global "RANDSEED", $P0 .return($N0) .end @@ -298,7 +298,7 @@ ENDINSTR: .param string full .param string substring - .return _BUILTIN_INSTR(argc,1.0,full,substring) + .tailcall _BUILTIN_INSTR(argc,1.0,full,substring) .end .sub _BUILTIN_UCASE_STRING # string ucase$(string targ) @@ -355,30 +355,6 @@ XCASE_DONE: FINISHED: .return($N0) .end -.sub _BUILTIN_STRING_STRING # string string(num repeat, num ascii) - .param int argc - .param num repeatf - - .local int repeat - set repeat, repeatf - .local string repeater - .local string target - set $I1, 0 - set target, "" - entrytype $I0, 0 - eq $I0, FLOAT, FLOATB - .local string thing - set repeater, thing - branch REP -FLOATB: .local num ascii - set $I0, ascii - chr repeater, $I0 -REP: ge $I1, repeat, BAIL - concat target, repeater - inc $I1 - branch REP -BAIL: .return(target) -.end .sub _BUILTIN_LOG # num log(num op) .param int argc .param num op @@ -430,7 +406,7 @@ ERR_RANGE: .param int argc .param num cols .local int PRINTCOL - find_global $P0, "PRINTCOL" + get_global $P0, "PRINTCOL" set PRINTCOL, $P0["value"] set $I0, cols diff --git a/languages/BASIC/compiler/RT_debugger.pir b/languages/BASIC/compiler/RT_debugger.pir index d6231a75db..e71d3bddf5 100644 --- a/languages/BASIC/compiler/RT_debugger.pir +++ b/languages/BASIC/compiler/RT_debugger.pir @@ -1,7 +1,7 @@ .sub _DEBUGGER_STOP_FOR_REAL # void Debugger_stop(int line, Hash local_values) .param int line .param pmc locals - find_global $P25, "DEBUGGER" + get_global $P25, "DEBUGGER" set $P0, $P25["code"] set $S0, $P0[line] @@ -34,7 +34,7 @@ DEBUGGER_COMMAND: add $I0, $I0, $I1 eq $I0, 0, DEBUGGER_COMMAND # If no step mode, and no input, re-prompt - $P1 = _SPLITLINE($S0,1) # P1 will have array of values + $P1 = _SPLITLINE($S0,1) # $P1 will have array of values set $I0, $P1 add $I0, $I0, $I1 @@ -104,7 +104,7 @@ DEBUGGER_DELWATCH: branch DEBUGGER_COMMAND DEBUGGER_DELALLWATCH: - $P0=new .ResizablePMCArray + $P0=new 'ResizablePMCArray' set $P25["watch"], $P0 print "All watches cleared.\n" branch DEBUGGER_COMMAND @@ -143,18 +143,18 @@ DEBUGGER_ERR: DEBUG_CLEAR: - set P0, P25["watch"] - set I0, P0 - eq I0, 0, DEBUG_CLEAREND - set I1, 0 + set $P0, $P25["watch"] + set $I0, $P0 + eq $I0, 0, DEBUG_CLEAREND + set $I1, 0 DEBUG_CLEARLOOP: - eq I1, I0, DEBUG_CLEAREND - set S1, P0[I1] - eq S1, S0, DEBUG_CLEARBLANK - inc I1 + eq $I1, $I0, DEBUG_CLEAREND + set $S1, $P0[$I1] + eq $S1, $S0, DEBUG_CLEARBLANK + inc $I1 branch DEBUG_CLEARLOOP DEBUG_CLEARBLANK: - set P0[I1], "" + set $P0[$I1], "" branch DEBUG_CLEAREND DEBUG_CLEAREND: ret @@ -199,7 +199,7 @@ DEBUG_PRINTEND: ret DEBUGGER_DONE: - store_global "DEBUGGER", $P25 + set_global "DEBUGGER", $P25 ret .end diff --git a/languages/BASIC/compiler/RT_initialize.pir b/languages/BASIC/compiler/RT_initialize.pir index 04cac6a997..f084855b91 100644 --- a/languages/BASIC/compiler/RT_initialize.pir +++ b/languages/BASIC/compiler/RT_initialize.pir @@ -3,36 +3,36 @@ .const int TYPE = 0 .const int VALUE = 1 .sub _main :main - $P0 = new .Hash - store_global "BASICARR", $P0 - $P0 = new .ResizablePMCArray - store_global "READDATA", $P0 - $P0 = new .Hash - store_global "RESTOREINFO", $P0 - $P0=new .Hash + $P0 = new 'Hash' + set_global "BASICARR", $P0 + $P0 = new 'ResizablePMCArray' + set_global "READDATA", $P0 + $P0 = new 'Hash' + set_global "RESTOREINFO", $P0 + $P0=new 'Hash' $P0["value"]=0 - store_global "READPOINTER", $P0 - $P0=new .Hash + set_global "READPOINTER", $P0 + $P0=new 'Hash' $P0["value"]=20021107 - store_global "RANDSEED", $P0 - $P0=new .Hash + set_global "RANDSEED", $P0 + $P0=new 'Hash' $P0["value"]=0 - store_global "PRINTCOL", $P0 - $P0=new .Hash - store_global "DEBUGGER", $P0 - $P0=new .Hash - store_global "COMMON", $P0 - $P0=new .ResizablePMCArray + set_global "PRINTCOL", $P0 + $P0=new 'Hash' + set_global "DEBUGGER", $P0 + $P0=new 'Hash' + set_global "COMMON", $P0 + $P0=new 'ResizablePMCArray' fdopen $P1, 0, "r" # STDIN and friends... $P1 = getstdin $P0[0]=$P1 $P1 = getstdout #Don't buffer stdout... - $I0 = pioctl $P1, 3, 0 + $P1.'buffer_type'('unbuffered') $P0[1]=$P1 $P1 = getstderr $P0[2]=$P1 - store_global "FDS", $P0 + set_global "FDS", $P0 _data() _platform_setup() diff --git a/languages/BASIC/compiler/RT_io.pir b/languages/BASIC/compiler/RT_io.pir index 63b3bf897e..a51f20746c 100644 --- a/languages/BASIC/compiler/RT_io.pir +++ b/languages/BASIC/compiler/RT_io.pir @@ -8,7 +8,7 @@ .param int fd ne fd, 0, NORESET _line_read() -NORESET:find_global $P0, "FDS" +NORESET:get_global $P0, "FDS" $P1=$P0[fd] set $S0, "" read $S0, $P1, numchar @@ -27,14 +27,14 @@ NORESET:find_global $P0, "FDS" print " in open\n" end OPEN_OK: - find_global $P0, "FDS" + get_global $P0, "FDS" $P0[fd]=$P1 - store_global "FDS", $P0 + set_global "FDS", $P0 .end .sub _CLOSE # void close(int fd) .param int fd .local int error - find_global $P0, "FDS" + get_global $P0, "FDS" set $P1, $P0[fd] close $P1 err error @@ -44,21 +44,21 @@ OPEN_OK: print " in close\n" end CLOSE_OK: - store_global "FDS", $P0 + set_global "FDS", $P0 .end .sub _WRITE # void writestring(int fd, 1, string stuff) .param int fd .local string buffer .local int oldprintcol - find_global $P1, "PRINTCOL" + get_global $P1, "PRINTCOL" oldprintcol=$P1["value"] buffer = _BUILTIN_DISPLAY(fd, buffer) #_WORK() - find_global $P1, "PRINTCOL" + get_global $P1, "PRINTCOL" $P1["value"]=oldprintcol - store_global "PRINTCOL", $P1 + set_global "PRINTCOL", $P1 - find_global $P0, "FDS" + get_global $P0, "FDS" set $P1, $P0[fd] print $P1, buffer .end @@ -74,7 +74,7 @@ CLOSE_OK: # # I0 Error? .sub _READLINE # string readline(int fd) .param int fd - $P0 = find_global "FDS" + $P0 = get_global "FDS" $P1 = $P0[fd] $S0 = readline $P1 .return($S0) @@ -90,7 +90,7 @@ CLOSE_OK: .local string token line = _CHOMP(line) - $P1=new .ResizablePMCArray + $P1=new 'ResizablePMCArray' eq splitflag, 0, SPLITSINGLE SPLITAGAIN: diff --git a/languages/BASIC/compiler/RT_platform.pir b/languages/BASIC/compiler/RT_platform.pir index 2b1f53a267..c050fe7481 100644 --- a/languages/BASIC/compiler/RT_platform.pir +++ b/languages/BASIC/compiler/RT_platform.pir @@ -3,27 +3,27 @@ .include "sysinfo.pasm" .sub _platform_setup # void platform_setup(void) - sysinfo S0, .SYSINFO_PARROT_OS - ne S0, "MSWin32", NOTWIN + sysinfo $S0, .SYSINFO_PARROT_OS + ne $S0, "MSWin32", NOTWIN _win32_setup() branch END NOTWIN: _ansi_setup() END: noop .end .sub _platform_shutdown - sysinfo S0, .SYSINFO_PARROT_OS - ne S0, "MSWin32", NOTWIN + sysinfo $S0, .SYSINFO_PARROT_OS + ne $S0, "MSWin32", NOTWIN _win32_shutdown() branch END NOTWIN: _ansi_shutdown() END: noop .end .sub _screen_clear - find_global $P0, "PRINTCOL" + get_global $P0, "PRINTCOL" set $P0["value"], 0 - store_global "PRINTCOL", $P0 - sysinfo S0, .SYSINFO_PARROT_OS - ne S0, "MSWin32", NOTWIN + set_global "PRINTCOL", $P0 + sysinfo $S0, .SYSINFO_PARROT_OS + ne $S0, "MSWin32", NOTWIN _win32_screen_clear() branch END NOTWIN: _ansi_screen_clear() @@ -31,18 +31,18 @@ END: noop .end #SCREEN_SETXCUR: -# set I1, P6[.VALUE] -# sysinfo S0, .SYSINFO_PARROT_OS -# eq S0, "MSWin32", WIN32_SCREEN_SETXCUR +# set $I1, $P6[.VALUE] +# sysinfo $S0, .SYSINFO_PARROT_OS +# eq $S0, "MSWin32", WIN32_SCREEN_SETXCUR # branch ANSI_SCREEN_SETXCUR # #SCREEN_SETYCUR: -# set I1, P6[.VALUE] -# sysinfo S0, .SYSINFO_PARROT_OS -# eq S0, "MSWin32", WIN32_SCREEN_SETYCUR +# set $I1, $P6[.VALUE] +# sysinfo $S0, .SYSINFO_PARROT_OS +# eq $S0, "MSWin32", WIN32_SCREEN_SETYCUR # branch ANSI_SCREEN_SETYCUR # -# # X in P7, Y in P6 +# # X in $P7, Y in $P6 .sub _screen_locate # void screen_locate(float x, float y) .param num xf .param num yf diff --git a/languages/BASIC/compiler/RT_platform_ANSIscreen.pir b/languages/BASIC/compiler/RT_platform_ANSIscreen.pir index 60d5422204..d8f33cd179 100644 --- a/languages/BASIC/compiler/RT_platform_ANSIscreen.pir +++ b/languages/BASIC/compiler/RT_platform_ANSIscreen.pir @@ -19,7 +19,7 @@ .const int STDIN = 0 .sub _ansi_setup - $P0=new .ResizablePMCArray + $P0=new 'ResizablePMCArray' $P0[0]= BLACK $P0[1]= BLUE $P0[2]= GREEN @@ -28,9 +28,9 @@ $P0[5]= MAGENTA $P0[6]= YELLOW $P0[7]= WHITE - store_global "ANSI_fgcolors", $P0 + set_global "ANSI_fgcolors", $P0 - $P0=new .ResizablePMCArray + $P0=new 'ResizablePMCArray' $P0[0]= BLACK $P0[1]= BLUE $P0[2]= GREEN @@ -47,11 +47,11 @@ $P0[13]= MAGENTA $P0[14]= YELLOW $P0[15]= 8 - store_global "ANSI_bgcolors", $P0 + set_global "ANSI_bgcolors", $P0 - $P0=new .Hash + $P0=new 'Hash' $P0["value"]=0 - store_global "scankey", $P0 + set_global "scankey", $P0 .end .sub _ansi_screen_clear @@ -75,22 +75,22 @@ ## These don't work exactly right. ANSI would require that I send ## \e[6n and read the input stream for a \e[row;colR reply from the -## terminal. I *really* can't do that until IO is fixed, because STDIN +## terminal. I *really* can't do that until $IO is fixed, because STDIN ## is line-buffered and asking the user to press return after each cursor ## positioning is lame. #ANSI_SCREEN_SETXCUR: # print "\e[;" -# print I1 +# print $I1 # print "H" # ret # #ANSI_SCREEN_SETYCUR: # print "\e[" -# print I1 +# print $I1 # print ";H" # ret # -# # I0,I1 +# # $I0,$I1 # # QB origin is 1,1 ## QB.exe @@ -103,10 +103,10 @@ .param int fore .param int back print "\e" -# # foreground in I0 -# # background in I1 +# # foreground in $I0 +# # background in $I1 print "[0;" - find_global $P0, "ANSI_fgcolors" + get_global $P0, "ANSI_fgcolors" lt fore, 8, ANSI_FG sub fore, fore, 8 print "1;" # Turn on high intensity @@ -118,7 +118,7 @@ ANSI_FG: # Background ANSI_BG: - $P0 = find_global "ANSI_bgcolors" + $P0 = get_global "ANSI_bgcolors" $I3 = $P0[back] print "4" print $I3 @@ -131,10 +131,10 @@ ANSI_BG: .local pmc ioctl ioctl = dlfunc $P1, "ioctl", "iiip" - $P9 = new .ManagedStruct # Saved + $P9 = new 'ManagedStruct' # Saved $P9 = 20 - $P10 = new .ManagedStruct # New + $P10 = new 'ManagedStruct' # New $P10 = 20 ioctl(0, TCGETA, $P9) @@ -155,20 +155,20 @@ ANSI_BG: ioctl(0, TCSETAF, $P10) - store_global "ioctl_mode", $P9 + set_global "ioctl_mode", $P9 .end .sub _set_echo_nocbreak $P1 = loadlib "" .local pmc ioctl ioctl = dlfunc $P1, "ioctl", "iiip" - $P9 = find_global "ioctl_mode" + $P9 = get_global "ioctl_mode" ioctl(0, TCSETAF, $P9) .end .sub _set_nonblock # void _set_nonblock - I11= 0 + $I11= 0 $P1 = loadlib "" .local pmc fcntl fcntl = dlfunc $P1, "fcntl", "iiii" @@ -178,17 +178,17 @@ ANSI_BG: fcntl = dlfunc $P1, "fcntl", "iiil" - $I7 = bor I5, 2048 # O_NONBLOCK 04000 + $I7 = bor $I5, 2048 # O_NONBLOCK 04000 #invoke # nmode=fcntl(0, F_SETFL, mode | O_NONBLOCK) fcntl(STDIN, F_SETFL, $I7) - $P0=new .Hash + $P0=new 'Hash' $P0["value"]= old_value - store_global "fcntl_mode", $P0 + set_global "fcntl_mode", $P0 .end .sub _unset_nonblock # void _unset_nonblock - $P0 = find_global "fcntl_mode" + $P0 = get_global "fcntl_mode" $I11= $P0["value"] $P1 = loadlib "" .local pmc fcntl @@ -198,23 +198,23 @@ ANSI_BG: .end .sub _TERMIO_scankey - find_global $P0, "scankey" - I0= $P0["value"] - eq I0, 1, END + get_global $P0, "scankey" + $I0= $P0["value"] + eq $I0, 1, END _set_noecho_cbreak() END: $P0["value"]= 1 - store_global "scankey", $P0 + set_global "scankey", $P0 .end .sub _TERMIO_normal - find_global $P0, "scankey" - I0= $P0["value"] - eq I0, 0, END + get_global $P0, "scankey" + $I0= $P0["value"] + eq $I0, 0, END _set_echo_nocbreak() END: $P0["value"]= 0 - store_global "scankey", $P0 + set_global "scankey", $P0 .end # For now, uses TERMIO calls directly and assumes you're on a diff --git a/languages/BASIC/compiler/RT_platform_win32.pir b/languages/BASIC/compiler/RT_platform_win32.pir index 0718e6fb15..1fb16fbe7b 100644 --- a/languages/BASIC/compiler/RT_platform_win32.pir +++ b/languages/BASIC/compiler/RT_platform_win32.pir @@ -10,28 +10,28 @@ I can't test this on windows, and it's currently broken. Please fix it. set I0, 1 set I5, -11 invoke - store_global "kernel32", P1 - store_global "Win32handle", P5 + set_global "kernel32", P1 + set_global "Win32handle", P5 set I0, 1 set I5, -10 invoke - store_global "Win32Inputhandle", P5 - $P0= new .Hash - store_global "Win32console", $P0 + set_global "Win32Inputhandle", P5 + $P0= new 'Hash' + set_global "Win32console", $P0 _WIN32_CONSOLE_INFO() .end .sub _win32_shutdown # void win32_shutdown(void) .end .sub _WIN32_CONSOLE_INFO # void WIN32_CONSOLE_INFO(void) - find_global P1, "kernel32" + get_global P1, "kernel32" dlfunc P0, P1, "GetConsoleScreenBufferInfo", "ipp" - find_global P5, "Win32handle" - P6=new .ManagedStruct + get_global P5, "Win32handle" + P6=new 'ManagedStruct' set P6, SIZEOF_CONSOLE_SCREEN_BUFFER_INFO set I0, 1 invoke set P5, P6 - find_global P0, "Win32console" + get_global P0, "Win32console" $I1 = _UMS_GET_SHORT(0,P5) # 0==dwSize.X set P0["xbuf"], $I1 @@ -65,21 +65,21 @@ I can't test this on windows, and it's currently broken. Please fix it. _WIN32_CONSOLE_HOME() .end .sub _WIN32_CONSOLE_HOME # void Win32_console_home(void) - find_global P2, "kernel32" + get_global P2, "kernel32" dlfunc P0, P2, "SetConsoleCursorPosition", "ipi" set I0, 1 - find_global P5, "Win32handle" + get_global P5, "Win32handle" set I5, 0 invoke .end .sub _WIN32_CONSOLE_CLEAR # void Win32_console_clear(void) - find_global P1, "Win32console" - find_global P2, "kernel32" + get_global P1, "Win32console" + get_global P2, "kernel32" dlfunc P0, P2, "FillConsoleOutputCharacterA", "ipcilp" set I0, 1 - find_global P5, "Win32handle" - P6=new .ManagedStruct + get_global P5, "Win32handle" + P6=new 'ManagedStruct' set P6, SIZEOF_DWORD set I5, 32 # Char (space) set I1, P1["xbuf"] @@ -91,8 +91,8 @@ I can't test this on windows, and it's currently broken. Please fix it. # in effect. dlfunc P0, P2, "FillConsoleOutputAttribute", "ipiilp" set I0, 1 - find_global P5, "Win32handle" - P6= new .ManagedStruct + get_global P5, "Win32handle" + P6= new 'ManagedStruct' set P6, SIZEOF_DWORD set I5, P1["attr"] # Attrib set I1, P1["xbuf"] @@ -105,12 +105,12 @@ I can't test this on windows, and it's currently broken. Please fix it. _WIN32_CONSOLE_INFO() .end .sub _WIN32_SCREEN_GETXCUR # int win32_screen_getxcur(void) - find_global P1, "Win32console" + get_global P1, "Win32console" set $I0, P1["curx"] .return($I0) .end .sub _WIN32_SCREEN_GETYCUR # int win32_screen_getycur(void) - find_global P1, "Win32console" + get_global P1, "Win32console" set $I0, P1["cury"] .return($I0) .end @@ -136,11 +136,11 @@ I can't test this on windows, and it's currently broken. Please fix it. set I5, x shl I5, I5, 16 add I5, I5, y - find_global P1, "Win32console" - find_global P2, "kernel32" + get_global P1, "Win32console" + get_global P2, "kernel32" dlfunc P0, P2, "SetConsoleCursorPosition", "ipi" set I0, 1 - find_global P5, "Win32handle" + get_global P5, "Win32handle" invoke .end @@ -178,9 +178,9 @@ I can't test this on windows, and it's currently broken. Please fix it. .param int back shl I5, back, 4 add I5, I5, fore - find_global P2, "kernel32" + get_global P2, "kernel32" dlfunc P0, P2, "SetConsoleTextAttribute", "ipi" - find_global P5, "Win32handle" + get_global P5, "Win32handle" set I0, 1 invoke _WIN32_CONSOLE_INFO() # refresh this. @@ -192,18 +192,18 @@ I can't test this on windows, and it's currently broken. Please fix it. .sub _WIN32_INKEY # string Win32_inkey(void) set S0, "" set I9, 0 - find_global P1, "kernel32" + get_global P1, "kernel32" dlfunc P0, P1, "SetConsoleMode", "ipi" set I0, 1 - find_global P5, "Win32Inputhandle" + get_global P5, "Win32Inputhandle" set I5, 0 invoke INKEY: dlfunc P9, P1, "PeekConsoleInputA", "ippip" dlfunc P10, P1, "ReadConsoleInputA", "ippip" - find_global P5, "Win32Inputhandle" - P6=new .ManagedStruct - P7=new .ManagedStruct + get_global P5, "Win32Inputhandle" + P6=new 'ManagedStruct' + P7=new 'ManagedStruct' set P6, INPUT_BUFFER set P7, SIZEOF_DWORD @@ -245,7 +245,7 @@ NEXT_EVENT: inc I5 set P0, P10 # ReadConsoleInput set I0, 1 - find_global P5, "Win32Inputhandle" + get_global P5, "Win32Inputhandle" invoke branch END diff --git a/languages/BASIC/compiler/RT_support.pir b/languages/BASIC/compiler/RT_support.pir index 236c1da4ba..22439eed1a 100644 --- a/languages/BASIC/compiler/RT_support.pir +++ b/languages/BASIC/compiler/RT_support.pir @@ -27,8 +27,8 @@ .sub _READ # ResizablePMCArray READ(void) .local pmc READDATA .local int READPOINTER - find_global READDATA, "READDATA" - find_global $P0, "READPOINTER" + get_global READDATA, "READDATA" + get_global $P0, "READPOINTER" set READPOINTER, $P0["value"] set $I0, READDATA @@ -39,7 +39,7 @@ inc READPOINTER set $P0["value"], READPOINTER - store_global "READPOINTER", $P0 + set_global "READPOINTER", $P0 .return($S1) ERR_READ: @@ -50,14 +50,14 @@ ERR_READ: .param string where .local int READPOINTER .local pmc RESTOREINFO - find_global RESTOREINFO, "RESTOREINFO" - find_global $P0, "READPOINTER" + get_global RESTOREINFO, "RESTOREINFO" + get_global $P0, "READPOINTER" set READPOINTER, $P0["value"] set READPOINTER, RESTOREINFO[where] set $P0["value"], READPOINTER - store_global "READPOINTER", $P0 + set_global "READPOINTER", $P0 .end .sub _get_little_endian # int get_little_endian(struct, offset, bytes) diff --git a/languages/BASIC/compiler/compile.pl b/languages/BASIC/compiler/compile.pl index 7fb873ba5f..6acd2cabae 100644 --- a/languages/BASIC/compiler/compile.pl +++ b/languages/BASIC/compiler/compile.pl @@ -93,7 +93,7 @@ } if (@saves) { print CODE qq{\t\t# Grab "COMMON" variables from global stash\n}; - print CODE qq{\t\tfind_global _GLOBALS, "COMMON"\n}; + print CODE qq{\t\tget_global _GLOBALS, "COMMON"\n}; foreach (@saves) { print CODE qq{\t\t$_=_GLOBALS["$_"]\n}; } @@ -111,11 +111,11 @@ } } if (@saves) { - $edit .= qq{\tfind_global _GLOBALS, "COMMON"\n}; + $edit .= qq{\tget_global _GLOBALS, "COMMON"\n}; foreach (@saves) { $edit .= qq{\t_GLOBALS["$_"]=$_\n}; } - $edit .= qq{\tstore_global "COMMON", _GLOBALS\n}; + $edit .= qq{\tset_global "COMMON", _GLOBALS\n}; } s/#SAVECOMMON/$edit/; } @@ -128,7 +128,7 @@ } } if (@saves) { - $edit .= qq{\tfind_global _GLOBALS, "COMMON"\n}; + $edit .= qq{\tget_global _GLOBALS, "COMMON"\n}; foreach (@saves) { $edit .= qq{\t$_=_GLOBALS["$_"]\n}; } @@ -147,11 +147,11 @@ } } if (@saves) { - print CODE qq{\t\tfind_global _GLOBALS, "COMMON"\n}; + print CODE qq{\t\tget_global _GLOBALS, "COMMON"\n}; foreach (@saves) { print CODE qq{\t_GLOBALS["$_"]=$_\n}; } - print CODE qq{\t\tstore_global "COMMON", _GLOBALS\n\t}; + print CODE qq{\t\tset_global "COMMON", _GLOBALS\n\t}; } delete $code{$seg}; if ( !$debug ) { @@ -163,7 +163,7 @@ print CODE< 25 goto LOAD__COMPLETE - line = readline fh + line = fh.'readline'() len = length line if len <= 0 goto LOAD__EOF @@ -50,9 +53,21 @@ # file loaded, return the playfield LOAD__COMPLETE: - close fh + fh.'close'() .return(playfield) + catch: + .local pmc ex + .get_results (ex) + $S0 = "Can't open '" + $S0 .= file + $S0 .= "' (" + $S1 = err + $S0 .= $S1 + $S0 .= ")" + ex = $S0 + rethrow ex + .end diff --git a/languages/dotnet/build/translator.pl b/languages/dotnet/build/translator.pl index 35fd7bba5f..356ecb6476 100644 --- a/languages/dotnet/build/translator.pl +++ b/languages/dotnet/build/translator.pl @@ -455,7 +455,7 @@ sub generate_initial_pir { stypes = new "ResizablePMCArray" # Instantiate a bytecode escaper. - escaper = find_global "Data::Escape", "String" + escaper = get_global ["Data::Escape"], "String" # Source of generated label numbers set to zero. label_num = 0 diff --git a/languages/ecmascript/js.pir b/languages/ecmascript/js.pir index ebe1d38ab8..ddab73eb17 100644 --- a/languages/ecmascript/js.pir +++ b/languages/ecmascript/js.pir @@ -16,7 +16,16 @@ js is a compiler for ECMAScript-262 (3rd edition) running on Parrot. ## Create a 'List' class; stolen from Rakudo. ## At some point, this should be refactored/reused. ## +.HLL 'js' .namespace [] +.sub 'onload' :anon :load :init + load_bytecode 'PCT.pbc' + .local pmc parrotns, jsns, exports + parrotns = get_root_namespace ['parrot'] + jsns = get_hll_namespace + exports = split ' ', 'PAST PCT PGE P6metaclass' + parrotns.'export_to'(jsns, exports) +.end .sub '__onload' :load :init $P0 = subclass 'ResizablePMCArray', 'List' @@ -52,17 +61,24 @@ js is a compiler for ECMAScript-262 (3rd edition) running on Parrot. .sub 'onload' :load :init :anon load_bytecode 'PCT.pbc' + #.local pmc jsmeta + #jsmeta = get_hll_global ['JSObject'], '!JSMETA' + #jsmeta.'new_class'('JS::Compiler', 'parent'=>'PCT::HLLCompiler') + $P0 = get_hll_global ['PCT'], 'HLLCompiler' $P1 = $P0.'new'() $P1.'language'('JS') - $P1.'parsegrammar'('JS::Grammar') - $P1.'parseactions'('JS::Grammar::Actions') + $P0 = get_hll_namespace ['JS';'Grammar'] + $P1.'parsegrammar'($P0) + $P0 = get_hll_namespace ['JS';'Grammar';'Actions'] + $P1.'parseactions'($P0) ## Create a list called '@?BLOCK' and store it, so it can ## be used in the parse actions. ## $P0 = new 'List' set_hll_global ['JS';'Grammar';'Actions'], '@?BLOCK', $P0 + .end diff --git a/languages/ecmascript/src/classes/Array.pir b/languages/ecmascript/src/classes/Array.pir index d195702a7d..5ba231e394 100644 --- a/languages/ecmascript/src/classes/Array.pir +++ b/languages/ecmascript/src/classes/Array.pir @@ -19,9 +19,11 @@ care of much of that. .local pmc jsmeta load_bytecode 'PCT.pbc' $P0 = get_root_global ['parrot'], 'P6metaclass' - $P0.'new_class'('JSArray', 'parent'=>'JSObject') + $P0.'new_class'('Array', 'parent'=>'JSObject') jsmeta = $P0.'HOW'() - set_hll_global ['JSArray'], '$!JSMETA', jsmeta + set_hll_global ['Array'], '$!JSMETA', jsmeta + get_class $P0, 'Array' + addattribute $P0, '__array' .end =head2 Methods @@ -39,23 +41,7 @@ like this. =cut -.namespace ['JSArray'] -.sub 'Set' :method - .param pmc key - .param pmc val - self[key] = val - .return(self) -.end - -.namespace ['JSArray'] -.sub 'Get' :method - .param pmc key - .local pmc val - val = self[key] - .return(val) -.end - -.namespace ['JSArray'] +.namespace ['Array'] .sub 'clone' :method .param pmc new_attrs :slurpy :named @@ -90,7 +76,7 @@ Return true if the object is defined. =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'defined' :method $P0 = get_hll_global ['Bool'], 'True' .return ($P0) @@ -103,7 +89,7 @@ Return invocant in hash context. =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'hash' :method .tailcall self.'Hash'() .end @@ -120,7 +106,7 @@ Return invocant in item context. Default is to return self. =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'item' :method .return (self) .end @@ -146,7 +132,7 @@ Return invocant in list context. Default is to return a List containing self. =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'list' :method $P0 = new 'List' push $P0, self @@ -159,7 +145,7 @@ Print the object. =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'print' :method $P0 = get_hll_global 'print' .tailcall $P0(self) @@ -171,7 +157,7 @@ Print the object, followed by a newline. =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'say' :method $P0 = get_hll_global 'say' .tailcall $P0(self) @@ -183,7 +169,7 @@ Boolean value of object -- defaults to C<.defined> (S02). =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'true' :method .tailcall self.'defined'() .end @@ -198,9 +184,9 @@ Boolean value of object -- defaults to C<.defined> (S02). =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'Array' :method - $P0 = new 'JSArray' + $P0 = new 'Array' $P0.'!STORE'(self) .return ($P0) .end @@ -209,7 +195,7 @@ Boolean value of object -- defaults to C<.defined> (S02). =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'Hash' :method $P0 = new 'JSHash' $P0.'!STORE'(self) @@ -232,7 +218,7 @@ an object reference (unless the invocant already is one). =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub '' :method('Scalar') :anon $I0 = isa self, 'ObjectRef' unless $I0 goto not_ref @@ -264,7 +250,7 @@ the object's type and address. =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'Str' :method $P0 = new 'ResizableStringArray' $P1 = self.'WHAT'() @@ -288,14 +274,14 @@ Create a new object having the same class as the invocant. =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub 'new' :method .param pmc init_parents :slurpy .param pmc init_this :named :slurpy # Instantiate. .local pmc jsmeta - jsmeta = get_hll_global ['JSArray'], '$!JSMETA' + jsmeta = get_hll_global ['Array'], '$!JSMETA' $P0 = jsmeta.'get_parrotclass'(self) $P1 = new $P0 .return ($P1) @@ -307,7 +293,7 @@ Create a new object having the same class as the invocant. =cut -.namespace ['JSArray'] +.namespace ['Array'] .sub '' :vtable('decrement') :method $P0 = self.'pred'() 'infix:='(self, $P0) @@ -328,11 +314,30 @@ Create a new object having the same class as the invocant. .tailcall self.'Iterator'() .end +#.sub '' :vtable('get_string') :method +# $S0 = self.'Str'() +# .return ($S0) +#.end + .sub '' :vtable('get_string') :method - $S0 = self.'Str'() - .return ($S0) + $S0 = '' + .local pmc iter + iter = new 'Iterator', self + goto loop_start + loop: + unless iter goto end + $S0 = concat $S0, ',' + loop_start: + $S1 = shift iter + $S2 = iter[$S1] + concat $S0, $S2 + goto loop + end: +.return ($S0) .end + + .sub '' :vtable('increment') :method $P0 = self.'succ'() 'infix:='(self, $P0) diff --git a/languages/ecmascript/src/classes/Boolean.pir b/languages/ecmascript/src/classes/Boolean.pir index 4490660524..d129a6d1dd 100644 --- a/languages/ecmascript/src/classes/Boolean.pir +++ b/languages/ecmascript/src/classes/Boolean.pir @@ -18,9 +18,10 @@ symbols for C and C. .namespace ['JSBoolean'] .sub 'onload' :anon :init :load - .local pmc jsmeta, boolproto + .local pmc jsmeta, boolproto, booleanclass + booleanclass = get_root_global ['parrot'], 'Boolean' jsmeta = get_hll_global ['JSObject'], '$!JSMETA' - boolproto = jsmeta.'new_class'('JSBoolean', 'parent'=>'Boolean') + boolproto = jsmeta.'new_class'('JSBoolean', 'parent'=>booleanclass) #boolproto = jsmeta.'new_class'('Boolean') #boolproto.'!IMMUTABLE'() jsmeta.'register'('Boolean', 'parent'=>boolproto, 'protoobject'=>boolproto) diff --git a/languages/ecmascript/src/classes/Null.pir b/languages/ecmascript/src/classes/Null.pir index 026889067a..98d1ce9ec7 100644 --- a/languages/ecmascript/src/classes/Null.pir +++ b/languages/ecmascript/src/classes/Null.pir @@ -11,9 +11,10 @@ src/classes/Nil.pir - Nil objects .namespace [] .sub '' :anon :load :init - .local pmc jsmeta, nilproto + .local pmc jsmeta, nilproto, nullclass + nullclass = get_hll_global ['parrot'], 'Null' jsmeta = get_hll_global ['JSObject'], '$!JSMETA' - nilproto = jsmeta.'new_class'('JSNull', 'parent'=>'Null') + nilproto = jsmeta.'new_class'('JSNull', 'parent'=>nullclass) jsmeta.'register'('Null', 'parent'=>nilproto, 'protoobject'=>nilproto) $P0 = nilproto.'new'() diff --git a/languages/ecmascript/src/classes/Object.pir b/languages/ecmascript/src/classes/Object.pir index 8996a59b26..be7bab2242 100644 --- a/languages/ecmascript/src/classes/Object.pir +++ b/languages/ecmascript/src/classes/Object.pir @@ -18,8 +18,9 @@ care of much of that. .sub '' :anon :init :load .local pmc jsmeta load_bytecode 'PCT.pbc' + $P1 = get_root_global ['parrot'], 'Hash' $P0 = get_root_global ['parrot'], 'P6metaclass' - $P0.'new_class'('JSObject', 'parent'=>'Hash') + $P0.'new_class'('JSObject', 'parent'=>$P1) jsmeta = $P0.'HOW'() set_hll_global ['JSObject'], '$!JSMETA', jsmeta .end diff --git a/languages/ecmascript/src/parser/actions.pm b/languages/ecmascript/src/parser/actions.pm index 90bfcf54c6..219b1fcbbc 100644 --- a/languages/ecmascript/src/parser/actions.pm +++ b/languages/ecmascript/src/parser/actions.pm @@ -10,6 +10,8 @@ method TOP($/, $key) { if $key eq 'open' { ## create a 'global' current block and stuff it into the scope stack. $?BLOCK := PAST::Block.new( :blocktype('declaration'), :node($/) ); + $?BLOCK.hll('js'); + @?BLOCK.unshift($?BLOCK); } elsif $key eq 'close' { @@ -631,7 +633,7 @@ method new_expression($/) { ## past as argument. This is done 'inside out', so the last 'new' is invoked ## first, so to say. for $ { - $past := PAST::Op.new( $past, :name('new'), :pasttype('call'), :node($/) ); + $past := PAST::Op.new( $past, :name('new'), :pasttype('callmethod'), :node($/) ); } make $past; } @@ -683,8 +685,8 @@ method object_literal($/) { my $type := PAST::Var.new( :name('JSObject'), :scope('package'), :node($/) ); my $objvar := PAST::Var.new(:scope('register'), :name('obj')); - $past.push( - PAST::Op.new(:pasttype('bind'), + $past.push( + PAST::Op.new(:pasttype('bind'), PAST::Var.new(:scope('register'), :name('obj'), :isdecl(1)), PAST::Op.new( :pasttype('callmethod'), :name("new"), :node($/), $type), :node($/))); @@ -700,7 +702,7 @@ method object_literal($/) { method property($/) { my $key := $( $ ); my $val := $( $ ); - my $past := PAST::Op.new( :pasttype('callmethod'), :name('Set'), $key, $val, :node($/) ); + my $past := PAST::Op.new( :inline(' %0[%1] = %2'), $key, $val, :node($/) ); make $past; } @@ -717,17 +719,17 @@ method property_name($/, $key) { method array_literal($/) { my $past := PAST::Stmts.new( :node($/) ); - my $type := PAST::Var.new( :name('JSArray'), :scope('package'), :node($/) ); + my $type := PAST::Var.new( :name('Array'), :scope('package'), :node($/) ); my $objvar := PAST::Var.new(:scope('register'), :name('obj')); - $past.push( - PAST::Op.new(:pasttype('bind'), + $past.push( + PAST::Op.new(:pasttype('bind'), PAST::Var.new(:scope('register'), :name('obj'), :isdecl(1)), PAST::Op.new( :pasttype('callmethod'), :name("new"), :node($/), $type), :node($/))); my $i := 0; for $ { - $past.push( - PAST::Op.new( :pasttype('callmethod'), :name('Set'), $objvar, $i, $($_), :node($/) )); + $past.push( + PAST::Op.new( :inline(' %0[%1] = %2'), $objvar, $i, $($_), :node($/) )); $i := $i + 1; } $past.push($objvar); @@ -755,7 +757,7 @@ method element_list($/) { method elision($/) { my $past := PAST::Stmts.new( :node($/) ); my $undef := PAST::Var.new( :name('undef'), :namespace('JSUndefined'), :scope('package'), :node($/) ); - + for $ { $past.push(PAST::Op.new( :pasttype('callmethod'), :name('append'), $undef, :node($/) )); } diff --git a/languages/ecmascript/t/js_pt/09-array.t b/languages/ecmascript/t/js_pt/09-array.t index ca20e4e6e4..d3b983752a 100644 --- a/languages/ecmascript/t/js_pt/09-array.t +++ b/languages/ecmascript/t/js_pt/09-array.t @@ -11,7 +11,7 @@ use Parrot::Test tests => 1; language_output_is( 'JS', <<'CODE', <<'OUT', 'new array into var', todo => 'NOTIMPLEMENTED'); var a = new Array(); -print a.length +print(a.length); CODE 0 OUT diff --git a/languages/hq9plus/MAINTAINER b/languages/hq9plus/MAINTAINER deleted file mode 100644 index b22a55fa09..0000000000 --- a/languages/hq9plus/MAINTAINER +++ /dev/null @@ -1,4 +0,0 @@ -# $Id$ - -N: Bernhard Schmalhofer -E: Bernhard.Schmalhofer@gmx.de diff --git a/languages/hq9plus/README b/languages/hq9plus/README deleted file mode 100644 index 2fe1685d76..0000000000 --- a/languages/hq9plus/README +++ /dev/null @@ -1,6 +0,0 @@ -$Id$ - -HQ9plus is a non turing-complete joke language. -Please test with 'make test'. Test scripts are located in the directory 't'. - -See http://www.esolangs.org/wiki/HQ9_Plus for details. diff --git a/languages/hq9plus/config/makefiles/root.in b/languages/hq9plus/config/makefiles/root.in deleted file mode 100644 index 3530b0c402..0000000000 --- a/languages/hq9plus/config/makefiles/root.in +++ /dev/null @@ -1,99 +0,0 @@ -## $Id$ - -## arguments we want to run parrot with -PARROT_ARGS = - -## configuration settings -BUILD_DIR = @build_dir@ - -## Setup some commands -PERL = @perl@ -RM_RF = @rm_rf@ -PARROT = ../../parrot@exe@ -CAT = $(PERL) -MExtUtils::Command -e cat -RECONFIGURE = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl -#CONDITIONED_LINE(darwin): -#CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking -#CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@ - -## places to look for things -PGE_LIBRARY = $(BUILD_DIR)/runtime/parrot/library/PGE -PERL6GRAMMAR = $(PGE_LIBRARY)/Perl6Grammar.pbc -NQP = $(BUILD_DIR)/compilers/nqp/nqp.pbc -PCT = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc - -all: hq9plus.pbc - -SOURCES = hq9plus.pir \ - src/gen_grammar.pir \ - src/gen_actions.pir \ - src/gen_builtins.pir \ - -BUILTINS_PIR = \ - src/builtins/hello.pir \ - src/builtins/quine.pir \ - src/builtins/nintynine_bottles_of_beer.pir \ - src/builtins/plus.pir \ - -# the default target -hq9plus.pbc: $(PARROT) $(SOURCES) - $(PARROT) $(PARROT_ARGS) -o hq9plus.pbc hq9plus.pir - -src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg - $(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \ - --output=src/gen_grammar.pir \ - src/parser/grammar.pg - -src/gen_actions.pir: $(NQP) $(PCT) src/parser/actions.pm - $(PARROT) $(PARROT_ARGS) $(NQP) --output=src/gen_actions.pir \ - --target=pir src/parser/actions.pm - -src/gen_builtins.pir: $(BUILTINS_PIR) - $(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir - -# regenerate the Makefile -Makefile: config/makefiles/root.in - cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=hq9plus - -# This is a listing of all targets, that are meant to be called by users -help: - @echo "" - @echo "Following targets are available for the user:" - @echo "" - @echo " all: hq9plus.pbc" - @echo " This is the default." - @echo "Testing:" - @echo " test: Run the test suite." - @echo " testclean: Clean up test results." - @echo "" - @echo "Cleaning:" - @echo " clean: Basic cleaning up." - @echo " realclean: Removes also files generated by 'Configure.pl'" - @echo " distclean: Removes also anything built, in theory" - @echo "" - @echo "Misc:" - @echo " help: Print this help message." - @echo "" - -test: all - $(PERL) t/harness - -# this target has nothing to do -testclean: - -CLEANUPS = \ - hq9plus.pbc \ - src/gen_grammar.pir \ - src/gen_actions.pir \ - src/gen_builtins.pir \ - t/*.HQ9plus \ - t/*.out - - -clean: - $(RM_RF) $(CLEANUPS) - -realclean: clean - $(RM_RF) Makefile - -distclean: realclean diff --git a/languages/hq9plus/hq9plus.pir b/languages/hq9plus/hq9plus.pir deleted file mode 100644 index 3e745d13a2..0000000000 --- a/languages/hq9plus/hq9plus.pir +++ /dev/null @@ -1,65 +0,0 @@ -=head1 TITLE - -hq9plus.pir - A HQ9plus compiler. - -=head2 Description - -This is the driver for the HQ9plus compiler. - -This file includes the parsing and grammar rules from -the src/ directory, loads the relevant PGE libraries, -and registers the compiler under the name 'HQ9plus'. - -=head2 Functions - -=over 4 - -=item onload() - -Creates the HQ9plus compiler using a C -object. - -=cut - -.namespace [ 'HQ9plus';'Compiler' ] - -.sub 'onload' :anon :load :init - load_bytecode 'PCT.pbc' - - $P1 = new ['PCT';'HLLCompiler'] - - $P1.'language'('HQ9plus') - $P1.'parsegrammar'('HQ9plus::Grammar') - $P1.'parseactions'('HQ9plus::Grammar::Actions') - - .return() -.end - -=item main(args :slurpy) :main - -Start compilation by passing any command line C -to the HQ9plus compiler. - -=cut - -.sub 'main' :main - .param pmc args - - $P0 = compreg 'HQ9plus' - $P1 = $P0.'command_line'(args) -.end - - -.include 'src/gen_builtins.pir' -.include 'src/gen_grammar.pir' -.include 'src/gen_actions.pir' - -=back - -=cut - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff --git a/languages/hq9plus/lib/Parrot/Test/Hq9plus.pm b/languages/hq9plus/lib/Parrot/Test/Hq9plus.pm deleted file mode 100644 index f3eed154f4..0000000000 --- a/languages/hq9plus/lib/Parrot/Test/Hq9plus.pm +++ /dev/null @@ -1,93 +0,0 @@ -# $Id$ - -# Copyright (C) 2005-2008, The Perl Foundation. - -package Parrot::Test::Hq9plus; - -use strict; -use warnings; - -use Data::Dumper; -use File::Basename; - -use Parrot::Test; - -=head1 NAME - -Parrot::Test::Hq9plus - Testing routines specific to 'HQ9plus'. - -=head1 DESCRIPTION - -Call hq9plus.pbc - -=cut - -# Generate output_is(), output_isnt() and output_like() in current package. -Parrot::Test::generate_languages_functions(); - -=head1 METHODS - -=head2 new - -=cut -sub new { - return bless {}; -} - -sub get_out_fn { - my $self = shift; - my ( $count, $options ) = @_; - - return Parrot::Test::per_test( '.out', $count ); -} - -sub get_test_prog { - my $self = shift; - my ( $count, $options ) = @_; - - my $lang_fn = Parrot::Test::per_test( '.HQ9plus', $count ); - ( undef, undef, my $current_dir ) = File::Spec->splitpath( Cwd::getcwd() ); - if ( $current_dir eq 'languages' ) { - $lang_fn = File::Spec->catdir( '..', $lang_fn ); - } - - my $test_prog_args = $ENV{TEST_PROG_ARGS} || q{}; - - return - join( ' ', - "../../$self->{parrot}", - 'hq9plus.pbc', - $test_prog_args, - $lang_fn ); -} - -sub get_cd { - my $self = shift; - my ( $options ) = @_; - - return "$self->{relpath}/languages/hq9plus"; -} - -sub get_lang_fn { - my $self = shift; - my ( $count, $options ) = @_; - - return Parrot::Test::per_test( '.HQ9plus', $count ); -} - -# never skip -sub skip_why { - my $self = shift; - my ($options) = @_; - - return; -} - -1; - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff --git a/languages/hq9plus/src/builtins/hello.pir b/languages/hq9plus/src/builtins/hello.pir deleted file mode 100644 index 9249643668..0000000000 --- a/languages/hq9plus/src/builtins/hello.pir +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2006-2008, The Perl Foundation. -# $Id$ - -=head1 - -hello.pir -- simple implementation of a hello function - -=cut - -.namespace [] - -.sub 'hello' - - print "Hello, world!\n" - - .return ( ) -.end - - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: - diff --git a/languages/hq9plus/src/builtins/nintynine_bottles_of_beer.pir b/languages/hq9plus/src/builtins/nintynine_bottles_of_beer.pir deleted file mode 100644 index 04f5d4c537..0000000000 --- a/languages/hq9plus/src/builtins/nintynine_bottles_of_beer.pir +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright (C) 2008, The Perl Foundation. -# $Id$ - -=head1 - -nintynine_bottles_of_beer.pir -- simple implementation of a nintynine_bottles_of_beer function - -=cut - -.namespace [] - -.sub 'nintynine_bottles_of_beer' - - set $I1, 99 # bottles of beer - set $I2, 1 # single bottle - - set $S1, " of beer on the wall,\n" - set $S2, " of beer,\n" - set $S3, "Take one down, pass it around,\n" - set $S4, " of beer on the wall.\n\n" - - set $S5, " bottle" - set $S6, " bottles" - - set $S7, "No more bottles of beer on the wall.\n\n" - - set $S8, "*Buuurrp*\n" - - branch N_BOTTLES # start drinking - - N_BOTTLES: - print $I1 - print $S6 - print $S1 - print $I1 - print $S6 - print $S2 - print $S3 - dec $I1 - eq $I1, $I2, BOTTLE_OF # Aww, we're getting low - print $I1 - print $S6 - print $S4 - ne $I1, $I2, N_BOTTLES # keep on drinking - - BOTTLE_OF: - print $I1 - print $S5 - print $S4 - branch ONE_BOTTLE # 'bout time for a liver transplant - - ONE_BOTTLE: # it's been fun - print $I1 - print $S5 - print $S1 - print $I1 - print $S5 - print $S2 - print $S3 - print $S7 - print $S8 - - .return ( ) -.end - - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: - diff --git a/languages/hq9plus/src/builtins/plus.pir b/languages/hq9plus/src/builtins/plus.pir deleted file mode 100644 index f12ed23f2f..0000000000 --- a/languages/hq9plus/src/builtins/plus.pir +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2006-2008, The Perl Foundation. -# $Id$ - -=head1 - -plus.pir -- simple implementation of a plus function - -=cut - -.namespace [] - -.sub 'postfix:++' :multi(_) - .param pmc a - $P0 = clone a - inc a - .return ($P0) -.end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: - diff --git a/languages/hq9plus/src/builtins/quine.pir b/languages/hq9plus/src/builtins/quine.pir deleted file mode 100644 index eb27a753b2..0000000000 --- a/languages/hq9plus/src/builtins/quine.pir +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2008, The Perl Foundation. -# $Id$ - -=head1 - -quine.pir -- a simple print, the code is passed in - -=cut - -.namespace [] - -.sub 'quine' - - .param pmc code_string - - print code_string - - .return ( ) -.end - - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff --git a/languages/hq9plus/src/parser/actions.pm b/languages/hq9plus/src/parser/actions.pm deleted file mode 100644 index d1e3c306a6..0000000000 --- a/languages/hq9plus/src/parser/actions.pm +++ /dev/null @@ -1,91 +0,0 @@ -# $Id$ -# Copyright (C) 2008, The Perl Foundation. - -=begin comments - -HQ9plus::Grammar::Actions - ast transformations for HQ9plus - -This file contains the methods that are used by the parse grammar -to build the PAST representation of an HQ9plus program. -Each method below corresponds to a rule in F, -and is invoked at the point where C<{*}> appears in the rule, -with the current match object as the first argument. If the -line containing C<{*}> also has a C<#= key> comment, then the -value of the comment is passed as the second argument to the method. - -=end comments - -class HQ9plus::Grammar::Actions; - -method TOP($/) { - my $past := - PAST::Block.new( - :blocktype('declaration'), - :node( $/ ), - PAST::Op.new( - :name('infix:='), - :pasttype('copy'), - PAST::Var.new( - :name('hq9plus_code'), - :viviself('String'), - :isdecl(1), - :scope('lexical') - ), - PAST::Val.new( - :value(~$/) - ) - ), - PAST::Op.new( - :name('infix:='), - :pasttype('copy'), - PAST::Var.new( - :name('hq9plus_accumulator'), - :viviself('Integer'), - :isdecl(1), - :scope('lexical') - ), - PAST::Val.new( - :value(0) - ) - ) - ); - for $ { - $past.push( $( $_ ) ); - } - make $past; -} - -method statement($/,$key) { - my $past; - if ( $key eq 'quine' ) { - $past := PAST::Op.new( :name($key), - :pasttype('call'), - :node( $/ ), - PAST::Var.new( - :name('hq9plus_code'), - :scope('lexical') - ) ); - } - elsif ( $key eq 'plus' ) { - $past := PAST::Op.new( :name('postfix:++'), - :lvalue(1), - PAST::Var.new( - :name('hq9plus_accumulator'), - :scope('lexical') - ) ); - } - else { - $past := PAST::Op.new( :name($key), - :pasttype('call'), - :node( $/ ) ); - } - make $past; -} - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: - diff --git a/languages/hq9plus/src/parser/grammar.pg b/languages/hq9plus/src/parser/grammar.pg deleted file mode 100644 index 8fbdc6851d..0000000000 --- a/languages/hq9plus/src/parser/grammar.pg +++ /dev/null @@ -1,39 +0,0 @@ -# $Id$ -# Copyright (C) 2008, The Perl Foundation. - -=begin overview - -This is the grammar for HQ9plus written as a sequence of Perl 6 rules. - -=end overview - -grammar HQ9plus::Grammar is PCT::Grammar; - -token TOP { - * - [ $ || ] - {*} -} - -token statement { - | {*} #= hello - | {*} #= quine - | {*} #= nintynine_bottles_of_beer - | {*} #= plus -} - -token hello { - 'H' \s* {*} -} - -token quine { - 'Q' \s* {*} -} - -token nintynine_bottles_of_beer { - '9' \s* {*} -} - -token plus { - '+' \s* {*} -} diff --git a/languages/hq9plus/t/basic.t b/languages/hq9plus/t/basic.t deleted file mode 100644 index 57cebac70d..0000000000 --- a/languages/hq9plus/t/basic.t +++ /dev/null @@ -1,568 +0,0 @@ -#! perl - -# Copyright (C) 2006-2008, The Perl Foundation. -# $Id$ - -=head1 NAME - -hq9plus/t/basic.t - tests for HQ9plus - -=head1 DESCRIPTION - -Very basic checks, but all tests of HQ9plus are necessarily basic. - -=cut - -use strict; -use warnings; -use FindBin (); -use lib "$FindBin::Bin/../lib", "$FindBin::Bin/../../../lib"; - -use Parrot::Test tests => 13; - -my $song_text = <<'END_SONG'; -99 bottles of beer on the wall, -99 bottles of beer, -Take one down, pass it around, -98 bottles of beer on the wall. - -98 bottles of beer on the wall, -98 bottles of beer, -Take one down, pass it around, -97 bottles of beer on the wall. - -97 bottles of beer on the wall, -97 bottles of beer, -Take one down, pass it around, -96 bottles of beer on the wall. - -96 bottles of beer on the wall, -96 bottles of beer, -Take one down, pass it around, -95 bottles of beer on the wall. - -95 bottles of beer on the wall, -95 bottles of beer, -Take one down, pass it around, -94 bottles of beer on the wall. - -94 bottles of beer on the wall, -94 bottles of beer, -Take one down, pass it around, -93 bottles of beer on the wall. - -93 bottles of beer on the wall, -93 bottles of beer, -Take one down, pass it around, -92 bottles of beer on the wall. - -92 bottles of beer on the wall, -92 bottles of beer, -Take one down, pass it around, -91 bottles of beer on the wall. - -91 bottles of beer on the wall, -91 bottles of beer, -Take one down, pass it around, -90 bottles of beer on the wall. - -90 bottles of beer on the wall, -90 bottles of beer, -Take one down, pass it around, -89 bottles of beer on the wall. - -89 bottles of beer on the wall, -89 bottles of beer, -Take one down, pass it around, -88 bottles of beer on the wall. - -88 bottles of beer on the wall, -88 bottles of beer, -Take one down, pass it around, -87 bottles of beer on the wall. - -87 bottles of beer on the wall, -87 bottles of beer, -Take one down, pass it around, -86 bottles of beer on the wall. - -86 bottles of beer on the wall, -86 bottles of beer, -Take one down, pass it around, -85 bottles of beer on the wall. - -85 bottles of beer on the wall, -85 bottles of beer, -Take one down, pass it around, -84 bottles of beer on the wall. - -84 bottles of beer on the wall, -84 bottles of beer, -Take one down, pass it around, -83 bottles of beer on the wall. - -83 bottles of beer on the wall, -83 bottles of beer, -Take one down, pass it around, -82 bottles of beer on the wall. - -82 bottles of beer on the wall, -82 bottles of beer, -Take one down, pass it around, -81 bottles of beer on the wall. - -81 bottles of beer on the wall, -81 bottles of beer, -Take one down, pass it around, -80 bottles of beer on the wall. - -80 bottles of beer on the wall, -80 bottles of beer, -Take one down, pass it around, -79 bottles of beer on the wall. - -79 bottles of beer on the wall, -79 bottles of beer, -Take one down, pass it around, -78 bottles of beer on the wall. - -78 bottles of beer on the wall, -78 bottles of beer, -Take one down, pass it around, -77 bottles of beer on the wall. - -77 bottles of beer on the wall, -77 bottles of beer, -Take one down, pass it around, -76 bottles of beer on the wall. - -76 bottles of beer on the wall, -76 bottles of beer, -Take one down, pass it around, -75 bottles of beer on the wall. - -75 bottles of beer on the wall, -75 bottles of beer, -Take one down, pass it around, -74 bottles of beer on the wall. - -74 bottles of beer on the wall, -74 bottles of beer, -Take one down, pass it around, -73 bottles of beer on the wall. - -73 bottles of beer on the wall, -73 bottles of beer, -Take one down, pass it around, -72 bottles of beer on the wall. - -72 bottles of beer on the wall, -72 bottles of beer, -Take one down, pass it around, -71 bottles of beer on the wall. - -71 bottles of beer on the wall, -71 bottles of beer, -Take one down, pass it around, -70 bottles of beer on the wall. - -70 bottles of beer on the wall, -70 bottles of beer, -Take one down, pass it around, -69 bottles of beer on the wall. - -69 bottles of beer on the wall, -69 bottles of beer, -Take one down, pass it around, -68 bottles of beer on the wall. - -68 bottles of beer on the wall, -68 bottles of beer, -Take one down, pass it around, -67 bottles of beer on the wall. - -67 bottles of beer on the wall, -67 bottles of beer, -Take one down, pass it around, -66 bottles of beer on the wall. - -66 bottles of beer on the wall, -66 bottles of beer, -Take one down, pass it around, -65 bottles of beer on the wall. - -65 bottles of beer on the wall, -65 bottles of beer, -Take one down, pass it around, -64 bottles of beer on the wall. - -64 bottles of beer on the wall, -64 bottles of beer, -Take one down, pass it around, -63 bottles of beer on the wall. - -63 bottles of beer on the wall, -63 bottles of beer, -Take one down, pass it around, -62 bottles of beer on the wall. - -62 bottles of beer on the wall, -62 bottles of beer, -Take one down, pass it around, -61 bottles of beer on the wall. - -61 bottles of beer on the wall, -61 bottles of beer, -Take one down, pass it around, -60 bottles of beer on the wall. - -60 bottles of beer on the wall, -60 bottles of beer, -Take one down, pass it around, -59 bottles of beer on the wall. - -59 bottles of beer on the wall, -59 bottles of beer, -Take one down, pass it around, -58 bottles of beer on the wall. - -58 bottles of beer on the wall, -58 bottles of beer, -Take one down, pass it around, -57 bottles of beer on the wall. - -57 bottles of beer on the wall, -57 bottles of beer, -Take one down, pass it around, -56 bottles of beer on the wall. - -56 bottles of beer on the wall, -56 bottles of beer, -Take one down, pass it around, -55 bottles of beer on the wall. - -55 bottles of beer on the wall, -55 bottles of beer, -Take one down, pass it around, -54 bottles of beer on the wall. - -54 bottles of beer on the wall, -54 bottles of beer, -Take one down, pass it around, -53 bottles of beer on the wall. - -53 bottles of beer on the wall, -53 bottles of beer, -Take one down, pass it around, -52 bottles of beer on the wall. - -52 bottles of beer on the wall, -52 bottles of beer, -Take one down, pass it around, -51 bottles of beer on the wall. - -51 bottles of beer on the wall, -51 bottles of beer, -Take one down, pass it around, -50 bottles of beer on the wall. - -50 bottles of beer on the wall, -50 bottles of beer, -Take one down, pass it around, -49 bottles of beer on the wall. - -49 bottles of beer on the wall, -49 bottles of beer, -Take one down, pass it around, -48 bottles of beer on the wall. - -48 bottles of beer on the wall, -48 bottles of beer, -Take one down, pass it around, -47 bottles of beer on the wall. - -47 bottles of beer on the wall, -47 bottles of beer, -Take one down, pass it around, -46 bottles of beer on the wall. - -46 bottles of beer on the wall, -46 bottles of beer, -Take one down, pass it around, -45 bottles of beer on the wall. - -45 bottles of beer on the wall, -45 bottles of beer, -Take one down, pass it around, -44 bottles of beer on the wall. - -44 bottles of beer on the wall, -44 bottles of beer, -Take one down, pass it around, -43 bottles of beer on the wall. - -43 bottles of beer on the wall, -43 bottles of beer, -Take one down, pass it around, -42 bottles of beer on the wall. - -42 bottles of beer on the wall, -42 bottles of beer, -Take one down, pass it around, -41 bottles of beer on the wall. - -41 bottles of beer on the wall, -41 bottles of beer, -Take one down, pass it around, -40 bottles of beer on the wall. - -40 bottles of beer on the wall, -40 bottles of beer, -Take one down, pass it around, -39 bottles of beer on the wall. - -39 bottles of beer on the wall, -39 bottles of beer, -Take one down, pass it around, -38 bottles of beer on the wall. - -38 bottles of beer on the wall, -38 bottles of beer, -Take one down, pass it around, -37 bottles of beer on the wall. - -37 bottles of beer on the wall, -37 bottles of beer, -Take one down, pass it around, -36 bottles of beer on the wall. - -36 bottles of beer on the wall, -36 bottles of beer, -Take one down, pass it around, -35 bottles of beer on the wall. - -35 bottles of beer on the wall, -35 bottles of beer, -Take one down, pass it around, -34 bottles of beer on the wall. - -34 bottles of beer on the wall, -34 bottles of beer, -Take one down, pass it around, -33 bottles of beer on the wall. - -33 bottles of beer on the wall, -33 bottles of beer, -Take one down, pass it around, -32 bottles of beer on the wall. - -32 bottles of beer on the wall, -32 bottles of beer, -Take one down, pass it around, -31 bottles of beer on the wall. - -31 bottles of beer on the wall, -31 bottles of beer, -Take one down, pass it around, -30 bottles of beer on the wall. - -30 bottles of beer on the wall, -30 bottles of beer, -Take one down, pass it around, -29 bottles of beer on the wall. - -29 bottles of beer on the wall, -29 bottles of beer, -Take one down, pass it around, -28 bottles of beer on the wall. - -28 bottles of beer on the wall, -28 bottles of beer, -Take one down, pass it around, -27 bottles of beer on the wall. - -27 bottles of beer on the wall, -27 bottles of beer, -Take one down, pass it around, -26 bottles of beer on the wall. - -26 bottles of beer on the wall, -26 bottles of beer, -Take one down, pass it around, -25 bottles of beer on the wall. - -25 bottles of beer on the wall, -25 bottles of beer, -Take one down, pass it around, -24 bottles of beer on the wall. - -24 bottles of beer on the wall, -24 bottles of beer, -Take one down, pass it around, -23 bottles of beer on the wall. - -23 bottles of beer on the wall, -23 bottles of beer, -Take one down, pass it around, -22 bottles of beer on the wall. - -22 bottles of beer on the wall, -22 bottles of beer, -Take one down, pass it around, -21 bottles of beer on the wall. - -21 bottles of beer on the wall, -21 bottles of beer, -Take one down, pass it around, -20 bottles of beer on the wall. - -20 bottles of beer on the wall, -20 bottles of beer, -Take one down, pass it around, -19 bottles of beer on the wall. - -19 bottles of beer on the wall, -19 bottles of beer, -Take one down, pass it around, -18 bottles of beer on the wall. - -18 bottles of beer on the wall, -18 bottles of beer, -Take one down, pass it around, -17 bottles of beer on the wall. - -17 bottles of beer on the wall, -17 bottles of beer, -Take one down, pass it around, -16 bottles of beer on the wall. - -16 bottles of beer on the wall, -16 bottles of beer, -Take one down, pass it around, -15 bottles of beer on the wall. - -15 bottles of beer on the wall, -15 bottles of beer, -Take one down, pass it around, -14 bottles of beer on the wall. - -14 bottles of beer on the wall, -14 bottles of beer, -Take one down, pass it around, -13 bottles of beer on the wall. - -13 bottles of beer on the wall, -13 bottles of beer, -Take one down, pass it around, -12 bottles of beer on the wall. - -12 bottles of beer on the wall, -12 bottles of beer, -Take one down, pass it around, -11 bottles of beer on the wall. - -11 bottles of beer on the wall, -11 bottles of beer, -Take one down, pass it around, -10 bottles of beer on the wall. - -10 bottles of beer on the wall, -10 bottles of beer, -Take one down, pass it around, -9 bottles of beer on the wall. - -9 bottles of beer on the wall, -9 bottles of beer, -Take one down, pass it around, -8 bottles of beer on the wall. - -8 bottles of beer on the wall, -8 bottles of beer, -Take one down, pass it around, -7 bottles of beer on the wall. - -7 bottles of beer on the wall, -7 bottles of beer, -Take one down, pass it around, -6 bottles of beer on the wall. - -6 bottles of beer on the wall, -6 bottles of beer, -Take one down, pass it around, -5 bottles of beer on the wall. - -5 bottles of beer on the wall, -5 bottles of beer, -Take one down, pass it around, -4 bottles of beer on the wall. - -4 bottles of beer on the wall, -4 bottles of beer, -Take one down, pass it around, -3 bottles of beer on the wall. - -3 bottles of beer on the wall, -3 bottles of beer, -Take one down, pass it around, -2 bottles of beer on the wall. - -2 bottles of beer on the wall, -2 bottles of beer, -Take one down, pass it around, -1 bottle of beer on the wall. - -1 bottle of beer on the wall, -1 bottle of beer, -Take one down, pass it around, -No more bottles of beer on the wall. - -*Buuurrp* -END_SONG - -my $hello = "Hello, world!\n"; - -my $code = 'H'; -language_output_is( 'hq9plus', $code, $hello, "code: $code" ); - -$code = 'H H'; -language_output_is( 'hq9plus', $code, $hello x 2, "code: $code" ); - -$code = 'HHH'; -language_output_is( 'hq9plus', $code, $hello x length($code), "code: $code" ); - -$code = 'Q'; -language_output_is( 'hq9plus', $code, $code, "code: $code" ); - -$code = 'Q Q'; -language_output_is( 'hq9plus', $code, $code x 2, "code: $code" ); - -$code = 'QQQ'; -language_output_is( 'hq9plus', $code, $code x length($code), "code: $code" ); - -$code = '9'; -language_output_is( 'hq9plus', $code, $song_text, "code: $code" ); - -$code = '9 9'; -language_output_is( 'hq9plus', $code, $song_text x 2, "code: $code" ); - -$code = '999'; -language_output_is( 'hq9plus', $code, $song_text x length($code), "code: $code" ); - -$code = '+'; -language_output_is( 'hq9plus', $code, '', "code: $code" ); - -$code = '+ +'; -language_output_is( 'hq9plus', $code, '' x 2, "code: $code" ); - -$code = '+++++++++++++++++++'; -language_output_is( 'hq9plus', $code, '', "code: $code" ); - -$code = 'HQ9+'; -language_output_is( 'hq9plus', $code, $hello . $code . $song_text, "code: $code" ); - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff --git a/languages/hq9plus/t/harness b/languages/hq9plus/t/harness deleted file mode 100644 index 5793f92a36..0000000000 --- a/languages/hq9plus/t/harness +++ /dev/null @@ -1,8 +0,0 @@ -#! perl - -# $Id$ - -use FindBin; -use lib qw( . lib ../lib ../../lib ); -use Parrot::Test::Harness language => 'hq9plus'; - diff --git a/languages/lua/config/makefiles/root.in b/languages/lua/config/makefiles/root.in index fc05ccfb44..08817a30c9 100644 --- a/languages/lua/config/makefiles/root.in +++ b/languages/lua/config/makefiles/root.in @@ -136,7 +136,6 @@ src/PASTGrammar_gen.pir: src/PASTGrammar.tg src/POSTGrammar_gen.pir: src/POSTGrammar.tg $(TGE) --output=src/POSTGrammar_gen.pir src/POSTGrammar.tg - $(PERL) -i.bak -pe "s|'PAST::|'PAST;|" src/POSTGrammar_gen.pir lua.pbc: lua.pir src/lua51.pir src/grammar51.pir src/lua51_gen.pir src/PASTGrammar_gen.pir src/POSTGrammar_gen.pir $(LIB_SRCS) $(PARROT) -o lua.pbc --output-pbc lua.pir diff --git a/languages/lua/luap.pir b/languages/lua/luap.pir index 9567446b28..53981174d0 100644 --- a/languages/lua/luap.pir +++ b/languages/lua/luap.pir @@ -22,7 +22,7 @@ C is a compiler for Lua 5.1 on Parrot. .sub 'main' :anon :main .param pmc args load_bytecode 'languages/lua/lua.pbc' - $P0 = compreg 'Lua' + $P0 = compreg 'lua' $S0 = "Compiler Lua 5.1 on Parrot Copyright (C) 2005-2008, The Perl Foundation.\n" $P0.'commandline_banner'($S0) $P0.'command_line'(args) diff --git a/languages/lua/src/POSTGrammar.tg b/languages/lua/src/POSTGrammar.tg index 2320103f45..472b68c100 100644 --- a/languages/lua/src/POSTGrammar.tg +++ b/languages/lua/src/POSTGrammar.tg @@ -14,7 +14,7 @@ into an opcode syntax tree (POST). grammar Lua::POST::Grammar is TGE::Grammar; -transform post (PAST::Block) :language('PIR') { +transform post (PAST;Block) :language('PIR') { null $P0 set_hll_global ['Lua';'POST'], '$?environ', $P0 .local pmc endlabels @@ -117,7 +117,7 @@ PIRCODE } -transform post (PAST::Stmts) :language('PIR') { +transform post (PAST;Stmts) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -136,18 +136,18 @@ transform post (PAST::Stmts) :language('PIR') { } -transform void (PAST::Stmts) :language('PIR') { +transform void (PAST;Stmts) :language('PIR') { .tailcall tree.'get'('post', node) } -transform void (PAST::Op) :language('PIR') { +transform void (PAST;Op) :language('PIR') { $S0 = node.'pasttype'() .tailcall tree.'get'($S0, node) } -transform cond (PAST::Op) :language('PIR') { +transform cond (PAST;Op) :language('PIR') { $S0 = node.'pirop'() $I0 = index $S0, 'is' unless $I0 >= 0 goto L1 @@ -157,7 +157,7 @@ transform cond (PAST::Op) :language('PIR') { } -transform post (PAST::Op) :language('PIR') { +transform post (PAST;Op) :language('PIR') { $S0 = node.'pasttype'() unless $S0 == 'call' goto L1 .local pmc post @@ -175,7 +175,7 @@ transform post (PAST::Op) :language('PIR') { } -transform pirop (PAST::Op) :language('PIR') { +transform pirop (PAST;Op) :language('PIR') { .local string result $S0 = node.'pirop'() $I0 = index $S0, 'is' @@ -212,7 +212,7 @@ transform pirop (PAST::Op) :language('PIR') { } -transform cmp (PAST::Op) :language('PIR') { +transform cmp (PAST;Op) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -233,7 +233,7 @@ transform cmp (PAST::Op) :language('PIR') { } -transform call (PAST::Op) :language('PIR') { +transform call (PAST;Op) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -268,7 +268,7 @@ transform call (PAST::Op) :language('PIR') { } -transform len (PAST::Op) :language('PIR') { +transform len (PAST;Op) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -285,7 +285,7 @@ transform len (PAST::Op) :language('PIR') { } -transform and (PAST::Op) :language('PIR') { +transform and (PAST;Op) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -325,12 +325,12 @@ transform and (PAST::Op) :language('PIR') { } -transform or (PAST::Op) :language('PIR') { +transform or (PAST;Op) :language('PIR') { .tailcall tree.'get'('and', node) } -transform vararg (PAST::Op) :language('PIR') { +transform vararg (PAST;Op) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -343,7 +343,7 @@ transform vararg (PAST::Op) :language('PIR') { } -transform if (PAST::Op) :language('PIR') { +transform if (PAST;Op) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -379,7 +379,7 @@ transform if (PAST::Op) :language('PIR') { } -transform while (PAST::Op) :language('PIR') { +transform while (PAST;Op) :language('PIR') { .local pmc endlabels endlabels = get_hll_global ['Lua';'POST'], '@endlabels' .local pmc ops @@ -409,7 +409,7 @@ transform while (PAST::Op) :language('PIR') { } -transform repeat (PAST::Op) :language('PIR') { +transform repeat (PAST;Op) :language('PIR') { .local pmc endlabels endlabels = get_hll_global ['Lua';'POST'], '@endlabels' .local pmc ops @@ -439,7 +439,7 @@ transform repeat (PAST::Op) :language('PIR') { } -transform fornum (PAST::Op) :language('PIR') { +transform fornum (PAST;Op) :language('PIR') { .local pmc endlabels endlabels = get_hll_global ['Lua';'POST'], '@endlabels' .local pmc ops @@ -505,7 +505,7 @@ transform fornum (PAST::Op) :language('PIR') { } -transform forlist (PAST::Op) :language('PIR') { +transform forlist (PAST;Op) :language('PIR') { .local pmc endlabels endlabels = get_hll_global ['Lua';'POST'], '@endlabels' .local pmc ops @@ -629,7 +629,7 @@ transform forlist (PAST::Op) :language('PIR') { } -transform return (PAST::Op) :language('PIR') { +transform return (PAST;Op) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -667,7 +667,7 @@ transform return (PAST::Op) :language('PIR') { } -transform break (PAST::Op) :language('PIR') { +transform break (PAST;Op) :language('PIR') { .local pmc endlabels endlabels = get_hll_global ['Lua';'POST'], '@endlabels' $S0 = endlabels[0] @@ -676,7 +676,7 @@ transform break (PAST::Op) :language('PIR') { } -transform assign (PAST::Op) :language('PIR') { +transform assign (PAST;Op) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -698,7 +698,7 @@ transform assign (PAST::Op) :language('PIR') { } -transform assignlist (PAST::Op) :language('PIR') { +transform assignlist (PAST;Op) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -766,7 +766,7 @@ transform assignlist (PAST::Op) :language('PIR') { } -transform parenthese (PAST::Op) :language('PIR') { +transform parenthese (PAST;Op) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -779,12 +779,12 @@ transform parenthese (PAST::Op) :language('PIR') { } -transform cond (PAST::Val) :language('PIR') { +transform cond (PAST;Val) :language('PIR') { .tailcall tree.'get'('post', node) } -transform post (PAST::Val) :language('PIR') { +transform post (PAST;Val) :language('PIR') { .local string type type = node.'name'() $I0 = index type, 'Lua' @@ -811,7 +811,7 @@ transform post (PAST::Val) :language('PIR') { } -transform key (PAST::Val) :language('PIR') { +transform key (PAST;Val) :language('PIR') { .local pmc subpost subpost = get_hll_global ['Lua';'POST'], '$?SUB' .local pmc storage_const @@ -836,7 +836,7 @@ transform key (PAST::Val) :language('PIR') { } -transform constructor (PAST::Val) :language('PIR') { +transform constructor (PAST;Val) :language('PIR') { .local pmc ops $P0 = get_hll_global ['POST'], 'Ops' ops = $P0.'new'('node'=>node) @@ -898,18 +898,18 @@ transform constructor (PAST::Val) :language('PIR') { } -transform cond (PAST::Var) :language('PIR') { +transform cond (PAST;Var) :language('PIR') { .tailcall tree.'get'('post', node) } -transform post (PAST::Var) :language('PIR') { +transform post (PAST;Var) :language('PIR') { $S0 = node.'scope'() .tailcall tree.'get'($S0, node) } -transform parameter (PAST::Var) :language('PIR') { +transform parameter (PAST;Var) :language('PIR') { .local pmc subpost subpost = get_hll_global ['Lua';'POST'], '$?SUB' .local pmc ops @@ -943,7 +943,7 @@ transform parameter (PAST::Var) :language('PIR') { } -transform lexical (PAST::Var) :language('PIR') { +transform lexical (PAST;Var) :language('PIR') { .local pmc subpost subpost = get_hll_global ['Lua';'POST'], '$?SUB' .local pmc storage_lex @@ -987,7 +987,7 @@ transform lexical (PAST::Var) :language('PIR') { } -transform package (PAST::Var) :language('PIR') { +transform package (PAST;Var) :language('PIR') { .local pmc ops .local string result $P0 = get_hll_global ['POST'], 'Ops' @@ -1060,7 +1060,7 @@ PIRCODE } -transform keyed (PAST::Var) :language('PIR') { +transform keyed (PAST;Var) :language('PIR') { .tailcall tree.'get'('package', node) } diff --git a/languages/lua/src/lib/luaaux.pir b/languages/lua/src/lib/luaaux.pir index c74673e5db..a488ed9e06 100644 --- a/languages/lua/src/lib/luaaux.pir +++ b/languages/lua/src/lib/luaaux.pir @@ -35,7 +35,7 @@ CAUTION: don't used it in an exception handler, but lua_x_argerror & rethrow. .param int narg .param pmc extramsg :slurpy $S0 = lua_x_argerror(narg, extramsg :flat) - lua_error($S0) + die $S0 .end .sub 'lua_x_argerror' @@ -605,7 +605,7 @@ messages and in debug information. .param string data .param string chunkname .local pmc lua_comp - lua_comp = compreg 'Lua' + lua_comp = compreg 'lua' push_eh _handler $P0 = lua_comp.'compile'(data) $P0 = $P0[1] @@ -1010,11 +1010,10 @@ This function never returns. .local pmc bt bt = ex.'backtrace'() $S0 = where() - $S0 .= ' ' $S1 = ex $S0 .= $S1 $S0 .= "\n" - $S1 = traceback(bt) + $S1 = str_traceback(bt) $S0 .= $S1 .return (1, $S0) L2: @@ -1023,10 +1022,10 @@ This function never returns. .sub 'where' :anon # dummy implementation - .return ("_._:0:") + .return ("_._:0: ") .end -.sub 'traceback' :anon +.sub 'str_traceback' .param pmc bt .local pmc iter, sub, outer, annos new iter, 'Iterator', bt @@ -1037,7 +1036,13 @@ This function never returns. $P0 = shift iter sub = $P0['sub'] if null sub goto L2 + $I0 = isa sub, 'LuaFunction' + unless $I0 goto L5 $S0 = sub.'get_name'() + goto L6 + L5: + $S0 = sub + L6: outer = sub.'get_outer'() ret .= "\n\t" unless null outer goto L3 diff --git a/languages/lua/src/lib/luadebug.pir b/languages/lua/src/lib/luadebug.pir index dce1e4072d..adcaef1cde 100644 --- a/languages/lua/src/lib/luadebug.pir +++ b/languages/lua/src/lib/luadebug.pir @@ -377,7 +377,8 @@ STILL INCOMPLETE. unless $S1 goto L1 $S1 .= "\n" L1: - $S0 = _traceback($I2) + $P0 = _traceback($I2) + $S0 = str_traceback($P0) $S1 .= $S0 new res, 'LuaString' set res, $S1 @@ -387,29 +388,22 @@ STILL INCOMPLETE. .sub '_traceback' :anon .param int level $P0 = getinterp + .local pmc res, hash, sub, annos + new res, 'ResizablePMCArray' $I0 = 0 - $S0 = "stack traceback:" - .local pmc sub, outer L1: inc $I0 push_eh _handler sub = $P0['sub'; $I0] + annos = $P0['annotations'; $I0] pop_eh - outer = sub.'get_outer'() - $S0 .= "\n\t" - unless null outer goto L3 - $S0 .= "[PIR]:" - goto L4 - L3: - $S0 .= "_._:0:" - L4: - $S0 .= " in function '" - $S1 = sub.'get_name'() - $S0 .= $S1 - $S0 .= "'" + new hash, 'Hash' + hash['sub'] = sub + hash['annotations'] = annos + push res, hash goto L1 _handler: - .return ($S0) + .return (res) .end diff --git a/languages/lua/src/lib/luaperl.pir b/languages/lua/src/lib/luaperl.pir index f94b0a0fa0..a3a60ac531 100644 --- a/languages/lua/src/lib/luaperl.pir +++ b/languages/lua/src/lib/luaperl.pir @@ -34,7 +34,7 @@ It's a temporary work. Waiting for the real PIR compiler/interpreter. .sub '__onload' :anon :load :init $P0 = newclass [ 'Lua'; 'PerlCompiler' ] new $P1, $P0 - compreg 'Lua', $P1 + compreg 'lua', $P1 .end .namespace [ 'Lua'; 'PerlCompiler' ] diff --git a/languages/lua/src/lib/markdown.pir b/languages/lua/src/lib/markdown.pir index a1d415363c..46fb15acce 100644 --- a/languages/lua/src/lib/markdown.pir +++ b/languages/lua/src/lib/markdown.pir @@ -60,8 +60,9 @@ LIST .param pmc extra :slurpy .local pmc res $S1 = lua_checkstring(1, str) - $P0 = compreg 'Markdown' - $S0 = $P0.'compile'($S1) + $P0 = compreg 'markdown' + $P1 = $P0.'compile'($S1) + $S0 = $P1() new res, 'LuaString' set res, $S0 .return (res) diff --git a/languages/lua/src/lua51.pir b/languages/lua/src/lua51.pir index 75d4926c19..7f6f0acf52 100644 --- a/languages/lua/src/lua51.pir +++ b/languages/lua/src/lua51.pir @@ -36,7 +36,7 @@ Used by F. $P0.'new_class'('Lua::Compiler', 'parent'=>'PCT::HLLCompiler', 'attr'=>'$ostgrammar') $P0 = new ['Lua';'Compiler'] - $P0.'language'('Lua') + $P0.'language'('lua') $P0.'parsegrammar'('Lua::Grammar') $P0.'astgrammar'('Lua::PAST::Grammar') $P0.'ostgrammar'('Lua::POST::Grammar') diff --git a/languages/lua/t/table.t b/languages/lua/t/table.t index f432237830..bd6dd16c70 100644 --- a/languages/lua/t/table.t +++ b/languages/lua/t/table.t @@ -78,12 +78,11 @@ CODE 3 c OUTPUT -language_output_is( 'lua', << 'CODE', << 'OUTPUT', 'function foreach (hash)' ); +language_output_like( 'lua', << 'CODE', << 'OUTPUT', 'function foreach (hash)' ); t = {a=10, b=100} table.foreach(t, print) CODE -a 10 -b 100 +/^(a\t10\nb\t100|b\t100\na\t10)$/ OUTPUT language_output_is( 'lua', << 'CODE', << 'OUTPUT', 'function foreachi' ); diff --git a/languages/markdown/markdown.pir b/languages/markdown/markdown.pir index 7597959fd9..eac9650cc4 100644 --- a/languages/markdown/markdown.pir +++ b/languages/markdown/markdown.pir @@ -16,15 +16,16 @@ as a command line (without interactive mode) : or as a library : - load_bytecode 'Markdown.pbc' - $P0 = compreg 'Markdown' + load_bytecode 'markdown.pbc' + $P0 = compreg 'markdown' $S0 = <<'MARKDOWN' Title ===== Some text. MARKDOWN $P1 = $P0.'compile'($S0) - print $P1 + $S0 = $P1() + print $S0 =head1 DESCRIPTION @@ -54,13 +55,11 @@ object. p6meta = new 'P6metaclass' $P0 = p6meta.'new_class'('Markdown::Compiler', 'parent'=>'PCT::HLLCompiler') $P1 = $P0.'new'() - $P1.'language'('Markdown') + $P1.'language'('markdown') $P1.'parsegrammar'('Markdown::Grammar') $P1.'parseactions'('Markdown::Grammar::Actions') $P1.'removestage'('post') - $P1.'removestage'('pir') - $P1.'removestage'('evalpmc') - $P1.'addstage'('html') + $P1.'addstage'('html', 'before' => 'pir') .end =item html(source [, adverbs :slurpy :named]) @@ -78,6 +77,25 @@ Transform MAST C into a String containing HTML. .end +.sub 'pir' :method + .param pmc source + .param pmc adverbs :slurpy :named + + new $P0, 'CodeString' + $P0 = <<'PIRCODE' +.sub 'main' :anon + $S0 = <<'PIR' +PIRCODE + $P0 .= source + $P0 .= <<'PIRCODE' +PIR + .return ($S0) +.end +PIRCODE + .return ($P0) +.end + + =item main(args :slurpy) :main Start compilation by passing any command line C @@ -91,7 +109,7 @@ to the Markdown compiler. load_bytecode 'dumper.pbc' load_bytecode 'PGE/Dumper.pbc' - $P0 = compreg 'Markdown' + $P0 = compreg 'markdown' .local pmc opts opts = $P0.'process_args'(args) diff --git a/languages/perl6/docs/spectest-progress.csv b/languages/perl6/docs/spectest-progress.csv index 6bbd1a9408..70931bacda 100644 --- a/languages/perl6/docs/spectest-progress.csv +++ b/languages/perl6/docs/spectest-progress.csv @@ -232,3 +232,7 @@ "2009-01-07 00:00",35093,6171,0,343,1416,7930,11256,279 "2009-01-08 00:00",35189,6175,0,338,1417,7930,11256,279 "2009-01-09 00:00",35243,6172,0,337,1424,7933,11263,279 +"2009-01-10 00:00",35329,6141,0,331,1479,7951,11287,279 +"2009-01-11 00:00",35386,6143,0,331,1478,7952,11288,279 +"2009-01-12 00:00",35432,6218,0,331,1425,7974,11470,281 +"2009-01-13 00:00",35477,6233,0,333,1425,7991,11487,282 diff --git a/languages/perl6/src/builtins/any-list.pir b/languages/perl6/src/builtins/any-list.pir index e1c52ca2e7..93b6a3c2d8 100644 --- a/languages/perl6/src/builtins/any-list.pir +++ b/languages/perl6/src/builtins/any-list.pir @@ -639,7 +639,7 @@ Return values of the list .namespace ['Any'] .sub 'values' :method - self.'!flatten'() + self.'list'() .return (self) .end diff --git a/languages/perl6/src/builtins/any-str.pir b/languages/perl6/src/builtins/any-str.pir index 8db737ab7c..db7c540850 100644 --- a/languages/perl6/src/builtins/any-str.pir +++ b/languages/perl6/src/builtins/any-str.pir @@ -18,10 +18,12 @@ the size of that file down and to emphasize their generic, =cut +.include 'cclass.pasm' + .namespace [] .sub 'onload' :anon :init :load $P0 = get_hll_namespace ['Any'] - '!EXPORT'('capitalize,chop,chomp,chars,:d,:e,:f,index,lc,lcfirst,rindex,ord,substr,uc,ucfirst,unpack', 'from'=>$P0) + '!EXPORT'('capitalize,chop,chomp,chars,:d,:e,:f,index,lc,lcfirst,rindex,ord,substr,trim,uc,ucfirst,unpack', 'from'=>$P0) .end @@ -128,6 +130,39 @@ Returns string with one Char removed from the end. .return (retv) .end +=item trim() + +Remove leading and trailing whitespace from a string. + +=cut + +.sub 'trim' :method :multi(_) + .local string s + .local int start, end, temp, len + .local int is_whitespace + s = self + start = 0 + end = length s + if end == 0 goto donetrailing + trimleading: + is_whitespace = is_cclass .CCLASS_WHITESPACE, s, start + unless is_whitespace goto doneleading + inc start + goto trimleading + doneleading: + temp = end + trimtrailing: + dec temp + is_whitespace = is_cclass .CCLASS_WHITESPACE, s, temp + unless is_whitespace goto donetrailing + end = temp + goto trimtrailing + donetrailing: + len = end - start + s = substr s, start, len + .return(s) +.end + =item comb() Partial implementation for now, returns a list of strings diff --git a/languages/perl6/src/builtins/assign.pir b/languages/perl6/src/builtins/assign.pir index 8be53352cc..af62ac93d4 100644 --- a/languages/perl6/src/builtins/assign.pir +++ b/languages/perl6/src/builtins/assign.pir @@ -49,7 +49,7 @@ src/builtins/assign.pir - assignments .sub 'infix:=' :multi(['Perl6Array'], _) .param pmc cont .param pmc source - $I0 = isa cont, 'ObjectRef' + $I0 = isa cont, 'Perl6Scalar' unless $I0 goto cont_array # FIXME: use a :subid to directly lookup and call infix:=(_,_) above $P0 = get_hll_global 'Object' @@ -57,6 +57,12 @@ src/builtins/assign.pir - assignments .tailcall 'infix:='(cont, source) cont_array: + .local pmc ro + getprop ro, 'readonly', cont + if null ro goto ro_ok + unless ro goto ro_ok + 'die'('Cannot assign to readonly variable.') + ro_ok: .tailcall cont.'!STORE'(source) .end @@ -64,7 +70,7 @@ src/builtins/assign.pir - assignments .sub 'infix:=' :multi(['Perl6Hash'], _) .param pmc cont .param pmc source - $I0 = isa cont, 'ObjectRef' + $I0 = isa cont, 'Perl6Scalar' unless $I0 goto cont_hash # FIXME: use a :subid to directly lookup and call infix:=(_,_) above $P0 = get_hll_global 'Object' @@ -72,6 +78,12 @@ src/builtins/assign.pir - assignments .tailcall 'infix:='(cont, source) cont_hash: + .local pmc ro + getprop ro, 'readonly', cont + if null ro goto ro_ok + unless ro goto ro_ok + 'die'('Cannot assign to readonly variable.') + ro_ok: .tailcall cont.'!STORE'(source) .end @@ -100,7 +112,7 @@ src/builtins/assign.pir - assignments unless i < $I0 goto mark_done .local pmc cont cont = list[i] - $I0 = isa cont, ['ObjectRef'] + $I0 = isa cont, ['Perl6Scalar'] if $I0 goto mark_next $I0 = isa cont, ['Perl6Array'] if $I0 goto mark_next @@ -138,7 +150,7 @@ src/builtins/assign.pir - assignments .local pmc cont cont = shift it setprop cont, 'target', pmcnull - $I0 = isa cont, 'ObjectRef' + $I0 = isa cont, 'Perl6Scalar' if $I0 goto assign_scalar $I0 = isa cont, 'Perl6Array' if $I0 goto assign_array diff --git a/languages/perl6/src/builtins/guts.pir b/languages/perl6/src/builtins/guts.pir index e160394f6d..7fa13b5452 100644 --- a/languages/perl6/src/builtins/guts.pir +++ b/languages/perl6/src/builtins/guts.pir @@ -71,7 +71,7 @@ from C. .sub '!CALLMETHOD' .param string method .param pmc obj - $I0 = isa obj, 'ObjectRef' + $I0 = isa obj, 'Perl6Scalar' if $I0 goto any_method $I0 = can obj, method unless $I0 goto any_method @@ -105,6 +105,24 @@ Helper function for implementing the VAR and .VAR macros. .end +=item !DEREF + +Helper function to dereference any chains + +=cut + +.sub '!DEREF' + .param pmc x + loop: + $I0 = isa x, ['ObjectRef'] + unless $I0 goto done + x = deref x + goto loop + done: + .return (x) +.end + + =item !SAMETYPE_EXACT Takes two types and returns true if they match exactly (not accounting for any @@ -185,6 +203,10 @@ to find a real, non-subtype and stash that away for fast access later. .const 'Sub' $P0 = "!SUBTYPE_ACCEPTS" subset.'add_method'('ACCEPTS', $P0) + # It's an abstraction. + $P0 = get_hll_global 'Abstraction' + subset.'add_role'($P0) + # Instantiate it - we'll only ever create this one instance. subset = subset.'new'() @@ -369,6 +391,7 @@ is composed (see C below). metaclass = newclass ns $P0 = box type setprop metaclass, 'pkgtype', $P0 + '!set_resolves_list'(metaclass) .return (metaclass) is_also: metaclass = get_class ns @@ -644,6 +667,28 @@ in an ambiguous multiple dispatch. .end +=item !set_resolves_list(class) + +Gets all the methods that the class has and adds them to the resolves list. + +=cut + +.sub '!set_resolves_list' + .param pmc class + .local pmc meths, it, res_list + meths = class.'methods'() + it = iter meths + res_list = new 'ResizableStringArray' + it_loop: + unless it goto it_loop_end + $S0 = shift it + push res_list, $S0 + goto it_loop + it_loop_end: + class.'resolve_method'(res_list) +.end + + =item !compose_role_attributes(class, role) Helper method to compose the attributes of a role into a class. diff --git a/languages/perl6/src/classes/Bool.pir b/languages/perl6/src/classes/Bool.pir index 68c7927a48..01ed0546af 100644 --- a/languages/perl6/src/classes/Bool.pir +++ b/languages/perl6/src/classes/Bool.pir @@ -31,6 +31,11 @@ symbols for C and C. $P0 = boolproto.'new'() $P0 = 1 set_hll_global ['Bool'], 'True', $P0 + + # Mark as enum elements. + $P0 = class $P0 + $P1 = box 1 + setprop $P0, 'enum', $P1 .end diff --git a/languages/perl6/src/classes/IO.pir b/languages/perl6/src/classes/IO.pir index 1bcaaa52e7..d7cbea0058 100644 --- a/languages/perl6/src/classes/IO.pir +++ b/languages/perl6/src/classes/IO.pir @@ -14,7 +14,8 @@ This file implements the IO file handle class. .sub '' :anon :init :load .local pmc p6meta p6meta = get_hll_global ['Perl6Object'], '$!P6META' - p6meta.'new_class'('IO', 'parent'=>'Any', 'attr'=>'$!PIO') + $P0 = p6meta.'new_class'('IO', 'parent'=>'Any', 'attr'=>'$!PIO') + $P0.'!MUTABLE'() p6meta.'new_class'('IOIterator', 'parent'=>'Perl6Object', 'attr'=>'$!IO') $P0 = get_hll_namespace ['IO'] @@ -33,9 +34,9 @@ Closes the file. .namespace ['IO'] .sub 'close' :method - .local pmc PIO - PIO = getattribute self, "$!PIO" - close PIO + .local pmc pio + pio = getattribute self, "$!PIO" + close pio .return(1) .end @@ -70,13 +71,14 @@ See also slurp. .namespace ['IO'] .sub 'lines' :method :multi('IO') - .local pmc PIO, res, chomper - PIO = getattribute self, "$!PIO" + .local pmc pio, res, chomper + pio = getattribute self, "$!PIO" + pio = '!DEREF'(pio) res = new 'List' chomper = get_hll_global 'chomp' loop: - $S0 = PIO.'readline'() + $S0 = pio.'readline'() unless $S0 goto done $S0 = chomper($S0) res.'push'($S0) @@ -97,14 +99,14 @@ Writes the given list of items to the file. .sub 'print' :method .param pmc args :slurpy .local pmc it - .local pmc PIO - PIO = getattribute self, "$!PIO" + .local pmc pio + pio = getattribute self, "$!PIO" args = 'list'(args) it = iter args iter_loop: unless it goto iter_end $S0 = shift it - print PIO, $S0 + print pio, $S0 goto iter_loop iter_end: .return (1) @@ -119,10 +121,10 @@ Parses a format string and prints formatted output according to it. .sub 'printf' :method .param pmc args :slurpy - .local pmc PIO - PIO = getattribute self, "$!PIO" + .local pmc pio + pio = getattribute self, "$!PIO" $S0 = 'sprintf'(args :flat) - print PIO, $S0 + print pio, $S0 .return (1) .end @@ -148,10 +150,10 @@ Writes the given list of items to the file, then a newline character. .sub 'say' :method .param pmc list :slurpy - .local pmc PIO - PIO = getattribute self, "$!PIO" + .local pmc pio + pio = getattribute self, "$!PIO" self.'print'(list) - print PIO, "\n" + print pio, "\n" .return (1) .end @@ -163,9 +165,10 @@ Slurp a file into a string. =cut .sub 'slurp' :method - .local pmc PIO - PIO = getattribute self, "$!PIO" - $S0 = PIO.'readall'() + .local pmc pio + pio = getattribute self, "$!PIO" + pio = '!DEREF'(pio) + $S0 = pio.'readall'() .return($S0) .end @@ -209,6 +212,7 @@ Read a single line and return it. .local pmc pio, chomper $P0 = getattribute self, "$!IO" pio = getattribute $P0, "$!PIO" + pio = '!DEREF'(pio) $P0 = pio.'readline'() chomper = get_hll_global 'chomp' .tailcall chomper($P0) @@ -225,6 +229,7 @@ Read all of the lines and return them as a List. .local pmc pio, res, chomper $P0 = getattribute self, "$!IO" pio = getattribute $P0, "$!PIO" + pio = '!DEREF'(pio) res = new 'List' chomper = get_hll_global 'chomp' @@ -284,10 +289,10 @@ Return the remainder of the input in flattening context. .namespace ['IOIterator'] .sub '' :vtable('get_bool') :method - .local pmc PIO + .local pmc pio $P0 = getattribute self, "$!IO" - PIO = getattribute $P0, "$!PIO" - if PIO goto more + pio = getattribute $P0, "$!PIO" + if pio goto more .return (0) more: .return (1) diff --git a/languages/perl6/src/classes/List.pir b/languages/perl6/src/classes/List.pir index 7756b82c0d..96062f2d11 100644 --- a/languages/perl6/src/classes/List.pir +++ b/languages/perl6/src/classes/List.pir @@ -223,8 +223,13 @@ Returns a Perl representation of a List. unless iter goto iter_done iter_loop: $P1 = shift iter + if null $P1 goto iter_null $S1 = $P1.'perl'() result .= $S1 + goto iter_next + iter_null: + result .= 'undef' + iter_next: unless iter goto iter_done result .= ', ' goto iter_loop @@ -278,7 +283,7 @@ layer. It will likely change substantially when we have lazy lists. flat_loop_1: .local pmc elem elem = self[i] - $I0 = isa elem, 'ObjectRef' + $I0 = isa elem, 'Perl6Scalar' if $I0 goto flat_next $I0 = can elem, '!flatten' if $I0 goto flat_elem diff --git a/languages/perl6/src/classes/Num.pir b/languages/perl6/src/classes/Num.pir index 863a2a266a..e1dda4a495 100644 --- a/languages/perl6/src/classes/Num.pir +++ b/languages/perl6/src/classes/Num.pir @@ -51,7 +51,13 @@ Num - Perl 6 numbers .sub 'ACCEPTS' :method .param num topic + $S0 = self + if $S0 == 'nan' goto test_nan .tailcall 'infix:=='(topic, self) + test_nan: + $S0 = topic + $I0 = iseq $S0, 'nan' + .tailcall 'prefix:?'($I0) .end diff --git a/languages/perl6/src/classes/Order.pir b/languages/perl6/src/classes/Order.pir index 2695cf3d9d..023ac61e4e 100644 --- a/languages/perl6/src/classes/Order.pir +++ b/languages/perl6/src/classes/Order.pir @@ -33,6 +33,10 @@ disappear and the definition moved into a prelude. $P0 = -1 set_hll_global ['Order'], 'Increase', $P0 + # Mark as enum elements. + $P0 = class $P0 + $P1 = box 1 + setprop $P0, 'enum', $P1 .end diff --git a/languages/perl6/src/classes/Protoobject.pir b/languages/perl6/src/classes/Protoobject.pir index f24c7984fe..5056f851c2 100644 --- a/languages/perl6/src/classes/Protoobject.pir +++ b/languages/perl6/src/classes/Protoobject.pir @@ -94,6 +94,7 @@ Return a clone of the protoobject with a new WHENCE property set. =cut +.namespace ['P6protoobject'] .sub '!flatten' :method $P0 = new 'ResizablePMCArray' push $P0, self @@ -108,18 +109,48 @@ Indicate that objects in the class are mutable or immutable. =cut +.namespace ['P6protoobject'] .sub '!IMMUTABLE' :method $P0 = get_hll_global ['Int'], 'Scalar' $P1 = self.'HOW'() $P1.'add_method'('Scalar', $P0, 'to'=>self) .end +.namespace ['P6protoobject'] .sub '!MUTABLE' :method $P0 = get_hll_global ['Perl6Object'], 'Scalar' $P1 = self.'HOW'() $P1.'add_method'('Scalar', $P0, 'to'=>self) .end +=back + +=head2 Vtable functions + +=over + +=cut + +.namespace ['P6protoobject'] +.sub '' :vtable('get_bool') :method + $P0 = '!FAIL'('Use of protoobject as value') + $I0 = istrue $P0 + .return ($I0) +.end + +.namespace ['P6protoobject'] +.sub '' :vtable('get_integer') :method + $P0 = '!FAIL'('Use of protoobject as value') + $I0 = $P0 + .return ($I0) +.end + +.namespace ['P6protoobject'] +.sub '' :vtable('get_number') :method + $P0 = '!FAIL'('Use of protoobject as value') + $N0 = $P0 + .return ($N0) +.end =back diff --git a/languages/perl6/src/classes/Signature.pir b/languages/perl6/src/classes/Signature.pir index d748c4d8c8..5636bce23e 100644 --- a/languages/perl6/src/classes/Signature.pir +++ b/languages/perl6/src/classes/Signature.pir @@ -295,10 +295,22 @@ lexicals as needed and performing type checks. unless $P0 goto err_param_type goto param_val_done param_array: - var = '!CALLMETHOD'('Array', orig) + $I0 = does orig, 'Positional' + if $I0 goto param_array_1 + $I0 = does orig, 'array' + unless $I0 goto err_array + param_array_1: + var = '!DEREF'(orig) + var = '!CALLMETHOD'('Array', var) goto param_val_done param_hash: - var = '!CALLMETHOD'('Hash', orig) + $I0 = does orig, 'Associative' + if $I0 goto param_hash_1 + $I0 = does orig, 'hash' + unless $I0 goto err_hash + param_hash_1: + var = '!DEREF'(orig) + var = '!CALLMETHOD'('Hash', var) param_val_done: ## handle readonly/copy traits $S0 = param['readtype'] @@ -321,12 +333,23 @@ lexicals as needed and performing type checks. param_done: end: .return () + err_param_type: - $S0 = callersub - if $S0 goto have_callersub_name - $S0 = '' - have_callersub_name: - 'die'('Parameter type check failed in call to ', $S0) + .local string errmsg + errmsg = 'Parameter type check failed' + goto err_throw + err_array: + errmsg = 'Non-Positional argument' + goto err_throw + err_hash: + errmsg = 'Non-Associative argument' + err_throw: + .local string callername + callername = callersub + if callername goto have_callername + callername = '' + have_callername: + 'die'(errmsg, ' for ', name, ' in call to ', callername) .end diff --git a/languages/perl6/src/classes/Whatever.pir b/languages/perl6/src/classes/Whatever.pir index f92ace37ec..9eacc6a096 100644 --- a/languages/perl6/src/classes/Whatever.pir +++ b/languages/perl6/src/classes/Whatever.pir @@ -32,12 +32,18 @@ This file implements the Whatever class. .sub '' :vtable('get_integer') :method $P0 = get_global '$!slice' + unless null $P0 goto have_whatever + $P0 = 'undef'() + have_whatever: $I0 = $P0 .return ($I0) .end .sub '' :vtable('get_number') :method $P0 = get_global '$!slice' + unless null $P0 goto have_whatever + $P0 = 'undef'() + have_whatever: $N0 = $P0 .return ($N0) .end diff --git a/languages/perl6/src/parser/actions.pm b/languages/perl6/src/parser/actions.pm index 813786eb1a..8c656b2f1f 100644 --- a/languages/perl6/src/parser/actions.pm +++ b/languages/perl6/src/parser/actions.pm @@ -776,7 +776,9 @@ method enum_declarator($/, $key) { # Now we need to create instances of each of these and install them # in a package starting with the enum's name, plus an alias to them - # in the current package. + # in the current package. Register the symbols in the current block + # as we go. + our @?BLOCK; for %values.keys() { # Instantiate with value. $class_past.push(PAST::Op.new( @@ -799,6 +801,7 @@ method enum_declarator($/, $key) { ) ) )); + @?BLOCK[0].symbol($name ~ '::' ~ $_, :does_abstraction(1)); # Add alias in current package. # XXX Need to do collision detection, once we've a registry. @@ -814,11 +817,11 @@ method enum_declarator($/, $key) { :scope('package') ) )); + @?BLOCK[0].symbol($_, :does_abstraction(1)); } # Assemble all that we build into a statement list and then place it # into the init code. - our @?BLOCK; my $loadinit := @?BLOCK[0].loadinit(); $loadinit.push($role_past); $loadinit.push($class_past); @@ -1098,11 +1101,11 @@ method parameter($/) { elsif $ eq ':' { # named $var.named(~$); if $quant ne '!' { # required (optional is default) - $var.viviself('Nil'); + $var.viviself(container_itype($sigil)); } } elsif $quant eq '?' { # positional optional - $var.viviself('Nil'); + $var.viviself(container_itype($sigil)); } ## handle any default value @@ -2082,16 +2085,60 @@ method quote_term($/, $key) { method term($/, $key) { my $past; + + my @ns; + my $short_name; + if $ { + @ns := Perl6::Compiler.parse_name(~$); + $short_name := @ns.pop(); + } + if $key eq 'noarg' { - $past := PAST::Op.new( :name( ~$ ), :pasttype('call') ); + if @ns { + $past := PAST::Op.new( + PAST::Var.new( + :name($short_name), + :namespace(@ns), + :scope('package') + ), + :pasttype('call') + ); + } + else { + if $short_name eq 'print' || $short_name eq 'say' { + $/.panic($short_name ~ ' requires an argument'); + } + $past := PAST::Op.new( :name( $short_name ), :pasttype('call') ); + } } elsif $key eq 'args' { $past := $($); - $past.name( ~$ ); + if @ns { + $past.unshift(PAST::Var.new( + :name($short_name), + :namespace(@ns), + :scope('package') + )); + } + else { + if +@($past) == 0 && ($short_name eq 'print' || $short_name eq 'say') { + $/.panic($short_name ~ ' requires an argument'); + } + $past.name( $short_name ); + } } elsif $key eq 'func args' { $past := build_call( $( $ ) ); - $past.name( ~$ ); + if @ns { + $past.unshift(PAST::Var.new( + :name($short_name), + :namespace(@ns), + :scope('package') + )); + } + else { + $past.name( $short_name ); + } } elsif $key eq 'VAR' { $past := PAST::Op.new( diff --git a/languages/perl6/src/parser/grammar.pg b/languages/perl6/src/parser/grammar.pg index 9562c3001f..805655d7c3 100644 --- a/languages/perl6/src/parser/grammar.pg +++ b/languages/perl6/src/parser/grammar.pg @@ -625,10 +625,11 @@ rule package_declarator { rule package_def { [ - + {{ $P0 = match['module_name'] $P0 = $P0[0] + $P0 = $P0['name'] $S0 = $P0.'text'() match.'add_type'($S0) }} @@ -728,6 +729,21 @@ token circumfix { | '(' ')' {*} #= $( ) } +token module_name { + + [ + :dba('generic role') + + '[' ~ ']' + ]? +} + token name { | * | + @@ -747,11 +763,11 @@ token value { } token typename { - | '::' > + {*} } diff --git a/languages/perl6/src/parser/methods.pir b/languages/perl6/src/parser/methods.pir index 8a8fdc8a39..30027950c1 100644 --- a/languages/perl6/src/parser/methods.pir +++ b/languages/perl6/src/parser/methods.pir @@ -19,7 +19,35 @@ Registers a type in the namespace. .namespace [ "Perl6";"Grammar" ] .sub "add_type" :method .param string name - # XXX TODO + + # Parse name. + .local pmc ns + .local string short_name + $P0 = compreg 'Perl6' + ns = $P0.'parse_name'(name) + short_name = pop ns + + # Check if the symbol already exists in the NS; if so we're done. + $P0 = get_hll_global ns, short_name + unless null $P0 goto done + + # Work outwards to find a block defining a package and put the type + # there. XXX This makes it too visible for lexical types, but if we + # assume lexical rather than package scope then we will fail various + # tests/code. + .local pmc blocks, it, cur_block + blocks = get_hll_global ['Perl6';'Grammar';'Actions'], '@?BLOCK' + it = iter blocks + it_loop: + unless it goto it_loop_end + cur_block = shift it + $P0 = cur_block['sym'] + if null $P0 goto it_loop + if $P0 == '' goto it_loop + it_loop_end: + cur_block.'symbol'(name, 'does_abstraction'=>1) + + done: .end @@ -30,9 +58,62 @@ Checks if the name we have been passed represents a type. =cut .sub 'is_type' :method - .param string name - # XXX TODO - .return (1) + .param string full_name + + # Get blocks. + .local pmc blocks + blocks = get_hll_global [ 'Perl6' ; 'Grammar' ; 'Actions' ], '@?BLOCK' + + # If it starts with ::, it's a declaration; note it in the block. + $S0 = substr full_name, 0, 2 + if $S0 != '::' goto not_decl + $S0 = substr full_name, 2 + $P0 = blocks[0] + $P0.'symbol'($S0, 'does_abstraction'=>1) + goto type_ok + not_decl: + + # Look in @?BLOCK first. + .local pmc block_it, block, sym_info + block_it = iter blocks + block_it_loop: + unless block_it goto block_it_loop_end + block = shift block_it + sym_info = block.'symbol'(full_name) + if null sym_info goto block_it_loop + $P0 = sym_info['does_abstraction'] + if null $P0 goto block_it_loop + unless $P0 goto block_it_loop + goto type_ok + block_it_loop_end: + + # Parse name and look for the symbol in the namespace, then check if + # it's a type. + .local pmc compiler_obj, check_ns, check_symbol + .local string short_name + compiler_obj = get_hll_global [ 'Perl6' ], 'Compiler' + check_ns = compiler_obj.'parse_name'(full_name) + short_name = pop check_ns + check_symbol = get_hll_global check_ns, short_name + if null check_symbol goto fail_it + $I0 = does check_symbol, 'Abstraction' + if $I0 goto type_ok + # XXX The following should be covered by a check for does Abstraction + $I0 = isa check_symbol, 'P6protoobject' + if $I0 goto type_ok + $I0 = isa check_symbol, 'Role' + if $I0 goto type_ok + $P0 = class check_symbol + $P0 = getprop 'enum', $P0 + if null $P0 goto not_enum + if $P0 goto type_ok + not_enum: + goto fail_it + + type_ok: + .return (1) + fail_it: + .return (0) .end =back diff --git a/languages/perl6/src/pmc/objectref_pmc.template b/languages/perl6/src/pmc/objectref_pmc.template index e25e6f4193..d27ba9b415 100644 --- a/languages/perl6/src/pmc/objectref_pmc.template +++ b/languages/perl6/src/pmc/objectref_pmc.template @@ -24,7 +24,7 @@ pmclass ObjectRef need_ext dynpmc group perl6_group { VTABLE void init() { PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(INTERP); - STRING * const s_obj = string_from_literal(INTERP, "!$OBJECTREF"); + STRING * const s_obj = string_from_literal(INTERP, "$!OBJECTREF"); PMC * const objectpmc = Parrot_find_global_n(INTERP, hll_ns, s_obj); STATICSELF.init_pmc(objectpmc); } diff --git a/languages/perl6/t/pmc/objectref.t b/languages/perl6/t/pmc/objectref.t index e8d4a7b4b1..54186d5f86 100644 --- a/languages/perl6/t/pmc/objectref.t +++ b/languages/perl6/t/pmc/objectref.t @@ -35,7 +35,7 @@ Tests the ObjectRef PMC. # ObjectRef is initialized to contain an undef. $P1 = new "ObjectRef" $S1 = typeof $P1 - is($S1, 'Undef', 'typeof newclass retval') + is($S1, 'Failure', 'typeof newclass retval') .end diff --git a/languages/perl6/t/spectest.data b/languages/perl6/t/spectest.data index 834c892664..50c1c08ad8 100644 --- a/languages/perl6/t/spectest.data +++ b/languages/perl6/t/spectest.data @@ -44,6 +44,7 @@ S02-builtin_data_types/pair.t S02-builtin_data_types/range.t S02-builtin_data_types/subscripts_and_context.t S02-builtin_data_types/type.t +S02-builtin_data_types/whatever.t S02-literals/array-interpolation.t S02-literals/autoref.t S02-literals/char-by-number.t @@ -202,6 +203,7 @@ S12-class/is_also_instead.t S12-class/namespaced.t S12-class/open.t S12-class/parent_attributes.t +S12-construction/new.t S12-enums/anonymous.t S12-enums/as-role.t S12-enums/basic.t @@ -284,6 +286,7 @@ S29-str/rindex.t S29-str/split-simple.t S29-str/sprintf.t S29-str/substr.t +S29-str/trim.t S29-str/ucfirst.t S29-str/uc.t S29-str/unpack.t diff --git a/languages/pheme/config/makefiles/root.in b/languages/pheme/config/makefiles/root.in index b2d8f34598..bf5b8e109b 100644 --- a/languages/pheme/config/makefiles/root.in +++ b/languages/pheme/config/makefiles/root.in @@ -56,12 +56,10 @@ test: all $(PERL) -Ilib t/harness testclean: - $(RM_F) "t/*.out" clean: testclean $(RM_F) pheme.pbc $(RM_F) lib/pheme_grammar_gen.pir - $(RM_F) lib/*.pbc $(RM_F) lib/ASTGrammar.pir realclean: clean diff --git a/languages/pheme/lib/PhemeCompiler.pir b/languages/pheme/lib/PhemeCompiler.pir deleted file mode 100644 index d8f65e8829..0000000000 --- a/languages/pheme/lib/PhemeCompiler.pir +++ /dev/null @@ -1,169 +0,0 @@ -.namespace [ 'PhemeCompiler' ] - -.sub __onload :load - load_bytecode 'PGE.pbc' - load_bytecode 'PGE/Text.pbc' - - .local pmc compiler, p6meta - p6meta = get_hll_global 'P6metaclass' - compiler = p6meta.'new_class'('PhemeCompiler','attr'=>'ast ost pir') - - .return() -.end - -.sub init :method - .param pmc ast :named('ast') - .param pmc ost :named('ost') - .param pmc pir :named('pir') - - setattribute self, 'ast', ast - setattribute self, 'ost', ost - setattribute self, 'pir', pir -.end - -.sub 'compile' :method - .param pmc source - - .local pmc parse_tree - parse_tree = self.'get_parse_tree'( source ) - unless parse_tree goto err_parse_fail - - # self.dump_parse_tree( parse_tree ) - - .local pmc past_tree - past_tree = self.get_past_tree( parse_tree ) - unless past_tree goto err_past_fail - - # self.dump_it( past_tree ) - - .local pmc post_tree - post_tree = self.get_post_tree( past_tree ) - unless post_tree goto err_post_fail - - # self.dump_it( post_tree ) - - .local pmc pir - pir = self.get_pir( post_tree ) - unless pir goto err_pir_fail - # print pir - # end - - .local pmc pir_compiled - pir_compiled = self.compile_pir( pir ) - unless pir_compiled goto err_no_pir_compiled - - pir_compiled() - end - - err_parse_fail: - print "Parse failed\n" - - err_past_fail: - print "Unable to construct AST.\n" - - err_post_fail: - print "Unable to construct OST.\n" - - err_pir_fail: - print "Unable to construct PIR.\n" - - err_no_pir_compiled: - print "Unable to compile PIR.\n" - - cleanup: - .return() -.end - -.sub get_parse_tree :method - .param pmc source - - .local pmc start_rule - .local pmc match - - start_rule = find_global ['Pheme';'Grammar'], 'prog' - match = get_root_global ['parrot';'PGE'], 'Match' - source = match.'new'(source, 'grammar'=>'Pheme::Grammar') - - .return start_rule( source ) -.end - -.sub get_past_tree :method - .param pmc parse_tree - - load_bytecode 'TGE.pbc' - load_bytecode 'Node.pbc' - load_bytecode 'PAST.pbc' - - .local pmc compiled_symbols - compiled_symbols = new 'Hash' - - store_global 'PhemeCompiler', 'symbols', compiled_symbols - - .local pmc tge_past - tge_past = getattribute self, 'ast' - - .local pmc compiler - compiler = new ['TGE';'Compiler'] - - .local pmc ast_builder - ast_builder = tge_past.apply( parse_tree ) - - .return ast_builder.get( 'result' ) -.end - -.sub get_post_tree :method - .param pmc past_tree - - load_bytecode 'lib/POST.pir' - - .local pmc tge_ost - tge_ost = getattribute self, 'ost' - - .local pmc post_builder - post_builder = tge_ost.apply( past_tree ) - - .return post_builder.get( 'result' ) -.end - -.sub get_pir :method - .param pmc post_tree - - .local pmc tge_pir - tge_pir = getattribute self, 'pir' - - .local pmc pir_builder - pir_builder = tge_pir.apply( post_tree ) - - .return pir_builder.get( 'result' ) -.end - -.sub compile_pir :method - .param pmc pir - - .local pmc pir_compiler - pir_compiler = compreg "PIR" - .return pir_compiler( pir ) -.end - -.sub dump_parse_tree :method - .param pmc match - load_bytecode 'dumper.pbc' - load_bytecode 'PGE/Dumper.pbc' - - .local pmc dumper - dumper = find_global '_dumper' - dumper( match, '$/' ) - .return() -.end - -.sub dump_it :method - .param pmc tree - tree.'dump'() - end -.end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff --git a/languages/pheme/lib/PhemeGrammar.pir b/languages/pheme/lib/PhemeGrammar.pir index 333c15f245..d91eefe894 100644 --- a/languages/pheme/lib/PhemeGrammar.pir +++ b/languages/pheme/lib/PhemeGrammar.pir @@ -1,13 +1,13 @@ .namespace [ 'PhemeGrammar' ] -.sub _load :load - load_bytecode 'PGE.pbc' +.sub '_load' :load + load_bytecode 'PGE.pbc' - .local pmc pge_rule_class - .local pmc pheme_grammar_class + .local pmc pge_rule_class + .local pmc pheme_grammar_class pge_rule_class = get_class ['PGE';'Grammar'] - pheme_grammar_class = subclass pge_rule_class, 'PhemeGrammar' + pheme_grammar_class = subclass pge_rule_class, 'PhemeGrammar' .end .include "languages/pheme/lib/pheme_grammar_gen.pir" diff --git a/languages/pheme/lib/PhemeObjects.pir b/languages/pheme/lib/PhemeObjects.pir index 1324aec89e..61a4846ffe 100644 --- a/languages/pheme/lib/PhemeObjects.pir +++ b/languages/pheme/lib/PhemeObjects.pir @@ -1,6 +1,6 @@ .namespace [ 'Pheme'; 'Cons' ] -.sub _initialize :anon :load :init +.sub '_initialize' :anon :load :init .local pmc cons_class cons_class = get_class [ 'Pheme'; 'Cons' ] $I0 = defined cons_class @@ -15,31 +15,31 @@ .end .sub 'get_bool' :vtable - .return( 1 ) + .return( 1 ) .end .sub 'get_string' :vtable :method - .local pmc head - .local string output - head = self.'head'() + .local pmc head + .local string output + head = self.'head'() - .local int head_defined - head_defined = defined head - unless head_defined goto return_it - output = head + .local int head_defined + head_defined = defined head + unless head_defined goto return_it + output = head - .local pmc tail - tail = self.'tail'() + .local pmc tail + tail = self.'tail'() - .local string tail_output - tail_output = tail - unless tail_output goto return_it + .local string tail_output + tail_output = tail + unless tail_output goto return_it - output .= ':' - output .= tail_output + output .= ':' + output .= tail_output return_it: - .return( output ) + .return( output ) .end .sub 'head' :method @@ -56,29 +56,29 @@ .return( head ) .end -.sub get_integer :vtable :method - .local pmc elem - elem = self.'head'() +.sub 'get_integer' :vtable :method + .local pmc elem + elem = self.'head'() - .local int elem_defined - elem_defined = defined elem + .local int elem_defined + elem_defined = defined elem - if elem_defined goto count_tail - .return( 0 ) + if elem_defined goto count_tail + .return( 0 ) count_tail: - .local int count - count = 0 - elem = self + .local int count + count = 0 + elem = self loop_start: - inc count - elem = elem.'tail'() - elem_defined = defined elem - if elem_defined goto loop_start + inc count + elem = elem.'tail'() + elem_defined = defined elem + if elem_defined goto loop_start loop_end: - .return( count ) + .return( count ) .end .sub 'tail' :method @@ -97,18 +97,18 @@ .namespace [ 'Pheme'; 'Atom' ] -.sub _initialize :anon :load :init - .local pmc atom_class - newclass atom_class, [ 'Pheme'; 'Atom' ] +.sub '_initialize' :anon :load :init + .local pmc atom_class + newclass atom_class, [ 'Pheme'; 'Atom' ] - addattribute atom_class, 'value' + addattribute atom_class, 'value' .end .namespace [ 'Pheme'; 'Atom'; 'Symbol' ] -.sub _initialize :anon :load :init - .local pmc symbol_class - subclass symbol_class, [ 'Pheme'; 'Atom' ], [ 'Pheme'; 'Atom'; 'Symbol' ] +.sub '_initialize' :anon :load :init + .local pmc symbol_class + subclass symbol_class, [ 'Pheme'; 'Atom' ], [ 'Pheme'; 'Atom'; 'Symbol' ] .end # Local Variables: diff --git a/languages/pheme/lib/PhemeSymbols.pir b/languages/pheme/lib/PhemeSymbols.pir index 8e81be6410..bcf326f807 100644 --- a/languages/pheme/lib/PhemeSymbols.pir +++ b/languages/pheme/lib/PhemeSymbols.pir @@ -1,399 +1,399 @@ .namespace [ 'PhemeCompiler' ] -.sub __onload :anon :load :init - .local pmc symbols - symbols = new 'Hash' - - symbols["'define'"] = 1 - symbols["'car'"] = 1 - symbols["'cdr'"] = 1 - symbols["'cons'"] = 1 - symbols["'cond'"] = 1 - symbols["'include_file'"] = 1 - symbols["'write'"] = 1 - symbols["'+'"] = 1 - symbols["'-'"] = 1 - symbols["'*'"] = 1 - symbols["'/'"] = 1 - - store_global 'PhemeCompiler', 'symbols', symbols - .return() +.sub '__onload' :anon :load :init + .local pmc symbols + symbols = new 'Hash' + + symbols["'define'"] = 1 + symbols["'car'"] = 1 + symbols["'cdr'"] = 1 + symbols["'cons'"] = 1 + symbols["'cond'"] = 1 + symbols["'include_file'"] = 1 + symbols["'write'"] = 1 + symbols["'+'"] = 1 + symbols["'-'"] = 1 + symbols["'*'"] = 1 + symbols["'/'"] = 1 + + set_hll_global ['PhemeCompiler'], 'symbols', symbols + .return() .end .namespace [ 'Pheme' ] -.sub __resolve_at_runtime :multi( [ 'Pheme'; 'Cons' ] ) - .param pmc args :slurpy +.sub '__resolve_at_runtime' :multi( [ 'Pheme'; 'Cons' ] ) + .param pmc args :slurpy - .tailcall __list_to_cons( args :flat ) + .tailcall __list_to_cons( args :flat ) .end -.sub __resolve_at_runtime :multi( string ) - .param string symbol_name - .param pmc args :slurpy +.sub '__resolve_at_runtime' :multi( string ) + .param string symbol_name + .param pmc args :slurpy - .local pmc function - push_eh return_list - function = find_global symbol_name - unless function goto return_list - pop_eh + .local pmc function + push_eh return_list + function = get_global symbol_name + unless function goto return_list + pop_eh - .tailcall function( args :flat ) + .tailcall function( args :flat ) return_list: - .tailcall __list_to_cons( symbol_name, args :flat ) + .tailcall __list_to_cons( symbol_name, args :flat ) .end -.sub __list_to_cons - .param pmc args :slurpy +.sub '__list_to_cons' + .param pmc args :slurpy - .local pmc result - result = new [ 'Pheme'; 'Cons' ] + .local pmc result + result = new [ 'Pheme'; 'Cons' ] - .local int args_count - .local pmc arg + .local int args_count + .local pmc arg loop_start: - args_count = args - unless args_count goto loop_end - arg = pop args - result = cons( arg, result ) - goto loop_start + args_count = args + unless args_count goto loop_end + arg = pop args + result = cons( arg, result ) + goto loop_start loop_end: - .return( result ) + .return( result ) .end .sub '__evaluate' :multi( [ 'Pheme'; 'Cons' ] ) - .param pmc cons + .param pmc cons - .local pmc cons_list - cons_list = new 'ResizablePMCArray' + .local pmc cons_list + cons_list = new 'ResizablePMCArray' - # walk through cons - # push onto stack backwards - # evaluate that way - .local pmc head - .local int item_defined + # walk through cons + # push onto stack backwards + # evaluate that way + .local pmc head + .local int item_defined get_loop: - head = cons.'head'() - item_defined = defined head - unless item_defined goto end_get_loop - push cons_list, head + head = cons.'head'() + item_defined = defined head + unless item_defined goto end_get_loop + push cons_list, head - cons = cons.'tail'() - goto get_loop + cons = cons.'tail'() + goto get_loop end_get_loop: - .local pmc first - first = cons_list[0] + .local pmc first + first = cons_list[0] - .local string first_type - first_type = typeof first + .local string first_type + first_type = typeof first - if first_type == 'String' goto call_func + if first_type == 'String' goto call_func - .tailcall __list_to_cons( cons_list :flat ) + .tailcall __list_to_cons( cons_list :flat ) call_func: - first = shift cons_list + first = shift cons_list - .local string func_name - func_name = first + .local string func_name + func_name = first - .tailcall __resolve_at_runtime( func_name, cons_list :flat ) + .tailcall __resolve_at_runtime( func_name, cons_list :flat ) .end .sub '__evaluate' :multi( pmc ) - .param pmc atom - .return( atom ) + .param pmc atom + .return( atom ) .end -.sub car - .param pmc cons +.sub 'car' + .param pmc cons - .local pmc head - head = cons.'head'() + .local pmc head + head = cons.'head'() - .local int defined_head - defined_head = defined head + .local int defined_head + defined_head = defined head - unless defined_head goto return_nil - .return( head ) + unless defined_head goto return_nil + .return( head ) return_nil: - .return( 'nil' ) + .return( 'nil' ) .end -.sub cdr - .param pmc cons +.sub 'cdr' + .param pmc cons - .local pmc tail - .tailcall cons.'tail'() + .local pmc tail + .tailcall cons.'tail'() .end -.sub include_file - .param pmc file_path +.sub 'include_file' + .param pmc file_path - .local string filename - filename = file_path + .local string filename + filename = file_path - load_bytecode filename - .return() + load_bytecode filename + .return() .end -.sub cons - .param pmc l - .param pmc r +.sub 'cons' + .param pmc l + .param pmc r - .local pmc result - result = new [ 'Pheme'; 'Cons' ] + .local pmc result + result = new [ 'Pheme'; 'Cons' ] - result.'head'( l ) - result.'tail'( r ) + result.'head'( l ) + result.'tail'( r ) - .return( result ) + .return( result ) .end .sub 'cond' - .param pmc exps :slurpy + .param pmc exps :slurpy - .local pmc iter - iter = new 'Iterator', exps - iter = 0 + .local pmc iter + iter = new 'Iterator', exps + iter = 0 - .local pmc cond - .local pmc action + .local pmc cond + .local pmc action iter_loop: - unless iter goto iter_end - cond = shift iter - action = shift iter + unless iter goto iter_end + cond = shift iter + action = shift iter - .local pmc result - result = __evaluate( cond ) - unless result goto iter_loop + .local pmc result + result = __evaluate( cond ) + unless result goto iter_loop - .tailcall __evaluate( action ) + .tailcall __evaluate( action ) iter_end: - .return() + .return() .end .sub 'write' :multi() - .param pmc messages :slurpy + .param pmc messages :slurpy - .local string message - .local pmc iter - iter = new 'Iterator', messages - iter = 0 + .local string message + .local pmc iter + iter = new 'Iterator', messages + iter = 0 iter_loop: - unless iter goto iter_end - message = shift iter - print message - goto iter_loop + unless iter goto iter_end + message = shift iter + print message + goto iter_loop iter_end: - .return() + .return() .end .sub 'eqlist?' - .param pmc l_cons - .param pmc r_cons + .param pmc l_cons + .param pmc r_cons - .local int l_count - .local int r_count - l_count = l_cons - r_count = r_cons + .local int l_count + .local int r_count + l_count = l_cons + r_count = r_cons - unless l_count == 0 goto not_empty - unless r_count == 0 goto not_empty - .return( 1 ) + unless l_count == 0 goto not_empty + unless r_count == 0 goto not_empty + .return( 1 ) not_empty: - if l_count == r_count goto compare_head - .return( 0 ) + if l_count == r_count goto compare_head + .return( 0 ) compare_head: - .local pmc l_head - .local pmc r_head + .local pmc l_head + .local pmc r_head - l_head = l_cons.'head'() - r_head = r_cons.'head'() + l_head = l_cons.'head'() + r_head = r_cons.'head'() - .local int head_equal - head_equal = 'eq?'( l_head, r_head ) + .local int head_equal + head_equal = 'eq?'( l_head, r_head ) - if head_equal goto compare_tail - .return( 0 ) + if head_equal goto compare_tail + .return( 0 ) compare_tail: - .local pmc l_tail - .local pmc r_tail + .local pmc l_tail + .local pmc r_tail - l_tail = l_cons.'tail'() - r_tail = r_cons.'tail'() + l_tail = l_cons.'tail'() + r_tail = r_cons.'tail'() - .tailcall 'eqlist?'( l_head, r_head ) + .tailcall 'eqlist?'( l_head, r_head ) .end .sub 'eq?' :multi( pmc, pmc ) - .param pmc l_atom - .param pmc r_atom + .param pmc l_atom + .param pmc r_atom - eq l_atom, r_atom, return_true - .return( 0 ) + eq l_atom, r_atom, return_true + .return( 0 ) return_true: - .return( 1 ) + .return( 1 ) .end .sub 'eq?' :multi( [ 'Pheme'; 'Cons' ], [ 'Pheme'; 'Cons' ] ) - .param pmc l_cons - .param pmc r_cons + .param pmc l_cons + .param pmc r_cons - .tailcall 'eqlist?'( l_cons, r_cons ) + .tailcall 'eqlist?'( l_cons, r_cons ) .end # XXX - return #t .sub 'atom?' :multi( [ 'Pheme'; 'Atom' ] ) - .param pmc atom + .param pmc atom - .return( 1 ) + .return( 1 ) .end # XXX - return #f .sub 'atom?' :multi( [ 'Pheme'; 'Cons' ] ) - .param pmc cons + .param pmc cons - .return( 0 ) + .return( 0 ) .end # XXX - a cheat for now .sub 'atom?' :multi( String ) - .param pmc val - .return( 1 ) + .param pmc val + .return( 1 ) .end # XXX - a cheat for now .sub 'atom?' :multi( string ) - .param pmc val - .return( 1 ) + .param pmc val + .return( 1 ) .end .sub 'null?' :multi( [ 'Pheme'; 'Cons' ] ) - .param pmc cons - .local int count - count = cons + .param pmc cons + .local int count + count = cons - eq count, 0, indeed_empty - .return( 0 ) + eq count, 0, indeed_empty + .return( 0 ) indeed_empty: - .return( 1 ) + .return( 1 ) .end .sub '+' :multi( _ ) - .param num first - .param pmc rest :slurpy + .param num first + .param pmc rest :slurpy - .local num result - result = first + .local num result + result = first - .local pmc iter - iter = new 'Iterator', rest + .local pmc iter + iter = new 'Iterator', rest - .local pmc next - .local num next_val + .local pmc next + .local num next_val loop: - unless iter goto end_loop - next = shift iter - next_val = next - result += next_val - goto loop + unless iter goto end_loop + next = shift iter + next_val = next + result += next_val + goto loop end_loop: - .return( result ) + .return( result ) .end .sub '*' :multi( _ ) - .param num first - .param pmc rest :slurpy + .param num first + .param pmc rest :slurpy - .local num result - result = first + .local num result + result = first - .local pmc iter - iter = new 'Iterator', rest + .local pmc iter + iter = new 'Iterator', rest - .local pmc next - .local num next_val + .local pmc next + .local num next_val loop: - unless iter goto end_loop - next = shift iter - next_val = next - result *= next_val - goto loop + unless iter goto end_loop + next = shift iter + next_val = next + result *= next_val + goto loop end_loop: - .return( result ) + .return( result ) .end .sub '-' :multi( _ ) - .param num first - .param pmc rest :slurpy + .param num first + .param pmc rest :slurpy - .local num result - result = first + .local num result + result = first - .local pmc iter - iter = new 'Iterator', rest + .local pmc iter + iter = new 'Iterator', rest - .local pmc next - .local num next_val + .local pmc next + .local num next_val loop: - unless iter goto end_loop - next = shift iter - next_val = next - result -= next_val - goto loop + unless iter goto end_loop + next = shift iter + next_val = next + result -= next_val + goto loop end_loop: - .return( result ) + .return( result ) .end .sub '/' - .param num l - .param num r + .param num l + .param num r - .local num result - result = l / r + .local num result + result = l / r - .return( result ) + .return( result ) .end .sub 'null?' :multi( _ ) - .param pmc dummy - .return( 0 ) + .param pmc dummy + .return( 0 ) .end .sub 'write' :multi( string ) - .param string message_string + .param string message_string - print message_string - .return() + print message_string + .return() .end .sub '__make_empty_cons' - .local pmc result + .local pmc result - .local pmc result - result = new [ 'Pheme'; 'Cons' ] - .return( result ) + .local pmc result + result = new [ 'Pheme'; 'Cons' ] + .return( result ) .end # Local Variables: diff --git a/languages/pheme/lib/PhemeTest.pir b/languages/pheme/lib/PhemeTest.pir index 629402b853..a40eb899c2 100644 --- a/languages/pheme/lib/PhemeTest.pir +++ b/languages/pheme/lib/PhemeTest.pir @@ -6,13 +6,13 @@ .param string description :optional .local pmc eqlist - eqlist = find_global 'Pheme', 'eqlist?' + eqlist = get_hll_global ['Pheme'], 'eqlist?' .local int equal equal = eqlist( l_cons, r_cons ) .local pmc test - find_global test, [ 'Test'; 'More' ], '_test' + test = get_hll_global [ 'Test'; 'More' ], '_test' test.'ok'( equal, description ) .return( equal ) @@ -24,13 +24,13 @@ .param string description :optional .local pmc eqlist - eqlist = find_global 'Pheme', 'eqlist?' + eqlist = get_hll_global ['Pheme'], 'eqlist?' .local int equal equal = eqlist( l_cons, r_cons ) .local pmc test - find_global test, [ 'Test'; 'More' ], '_test' + test = get_hll_global [ 'Test'; 'More' ], '_test' test.'ok'( equal, description ) .return( equal ) @@ -54,8 +54,8 @@ iter_loop: unless iter goto iter_end name = shift iter - sub = find_global [ 'Test'; 'More' ], name - store_global name, sub + sub = get_hll_global [ 'Test'; 'More' ], name + set_global name, sub goto iter_loop iter_end: diff --git a/languages/pheme/lib/pge2past.tg b/languages/pheme/lib/pge2past.tg index 5dbb1d9a35..9c5a509565 100644 --- a/languages/pheme/lib/pge2past.tg +++ b/languages/pheme/lib/pge2past.tg @@ -144,7 +144,7 @@ transform application (PAST;Op) :language('PIR') { func_name = substr func_name, 1, name_length .local pmc func_func - func_func = find_global 'Pheme', func_name + func_func = get_hll_global ['Pheme'], func_name .local int have_func have_func = defined func_func @@ -370,14 +370,14 @@ transform lambda (PAST;Op) :language('PIR') { goto args_iter_loop args_iter_end: .local pmc arg_names_stack - arg_names_stack = find_global 'arg_names_stack' + arg_names_stack = get_global 'arg_names_stack' .local int have_stack have_stack = defined arg_names_stack if have_stack goto add_names_to_stack arg_names_stack = new 'ResizablePMCArray' - store_global 'arg_names_stack', arg_names_stack + set_global 'arg_names_stack', arg_names_stack add_names_to_stack: push arg_names_stack, rewrite_args @@ -420,7 +420,7 @@ transform rewrite_var_name (PAST;Op) :language('PIR') { transform rewrite_var_name (PAST;Val) :language('PIR') { .local pmc arg_names_stack - arg_names_stack = find_global 'arg_names_stack' + arg_names_stack = get_global 'arg_names_stack' .local pmc arg_names arg_names = arg_names_stack[-1] diff --git a/languages/pipp/Configure.pl b/languages/pipp/Configure.pl index 6342f31753..6494f63f4a 100644 --- a/languages/pipp/Configure.pl +++ b/languages/pipp/Configure.pl @@ -1,31 +1,17 @@ # $Id$ +# Copyright (C) 2009, The Perl Foundation. -# Copyright (C) 2006-2007, The Perl Foundation. - -# Configuration script for Pipp. - -# RT#31633: need to steal from gen::languages and tools/dev/reconfigure.pl -# in order to make this work - -package main; - -# pragmata use strict; use warnings; use 5.008; -use FindBin; -use lib "$FindBin::Bin/../../lib"; -# Parrot specific Perl modules -use Parrot::Configure::Step (); +my $build_dir = '../..'; +my $cmd = qq{$^X -Ilib tools/dev/reconfigure.pl --step=gen::languages --languages=pipp}; -# RT#31633: This is too simplistic -# Parrot::Configure::Step::genfile( 'config/makefiles/root.in' => 'Makefile' ); +print "Running '$cmd' in $build_dir\n"; -print <<'END_TEXT'; -Hi, -I'm Configure.pl. Eventually I'll generate Makefile. -END_TEXT +chdir $build_dir; +`$cmd` # Local Variables: # mode: cperl diff --git a/languages/pipp/README b/languages/pipp/README index 14f9be3462..a080226d7c 100644 --- a/languages/pipp/README +++ b/languages/pipp/README @@ -1,11 +1,11 @@ # $Id$ Pipp is Parrot's PHP. -Pipp is an implementation of the language PHP that runs on Parrot -and uses the Parrot Compiler Toolkit. +Pipp is an implementation of the language PHP that runs on Parrot. +Pipp is implemtented with the Parrot Compiler Toolkit. -Run 'make test' for building and running the tests in F. -Run 'make smolder_test' for testing and submitting the test result to +Run 'make test' for building and running the tests in the directory F. +Run 'make smoke' for testing and submitting the test result to http://smolder.plusthree.com/app/public_projects/smoke_reports/10 For more information see F or visit L. diff --git a/languages/pipp/config/makefiles/root.in b/languages/pipp/config/makefiles/root.in index a99d170470..09d14cb92f 100644 --- a/languages/pipp/config/makefiles/root.in +++ b/languages/pipp/config/makefiles/root.in @@ -16,7 +16,6 @@ PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext PARROT = $(BUILD_DIR)/parrot@exe@ PERL = @perl@ RM_F = @rm_f@ -RECONFIGURE = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl PMCBUILD = $(PERL) @build_dir@/tools/build/dynpmc.pl NQP = $(BUILD_DIR)/compilers/nqp/nqp.pbc PCT = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc @@ -148,7 +147,7 @@ help: # regenerate the Makefile Makefile: config/makefiles/root.in - cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=pipp + $(PERL) Configure.pl build: build-common diff --git a/languages/pipp/docs/antlr3.pod b/languages/pipp/docs/antlr3.pod deleted file mode 100644 index 2edc7d2eb0..0000000000 --- a/languages/pipp/docs/antlr3.pod +++ /dev/null @@ -1,107 +0,0 @@ -# $Id$ - -=head1 Overview - -These are some ramblings on using ANTLR 3 for Pipp, or with Parrot in general. - -=head1 Making it work - -Pipp.java needs to find the needed classes. This works for me: - - export ANTLR_HOME=/home/bernhard/devel/antlr/antlr-3 - export PARROT_HOME=/home/bernhard/devel/Parrot/trunk - export CLASSPATH=$ANTLR_HOME/lib/antlr-2.7.7.jar:\ -$ANTLR_HOME/lib/antlr-3.0.1.jar:\ -$ANTLR_HOME:/lib/antlr-runtime-3.0.1.jar:\ -$ANTLR_HOME/lib/stringtemplate-3.1b1.jar:\ -$PARROT_HOME/languages/pipp/src/antlr3:\ -$PARROT_HOME/languages/pipp - -Now try: - cd languages/pipp - make maintain-antlr3 - make build-antlr3 - make test-antlr3 - -=head1 ANTLR 3 Syntax - -Lexer, Parser and TreeParser are in the same file, speak grammar. -C and C++ style comments are accepted. - -'+' is one or many - -'( )' is for grouping -'|' as for alternation -"''" Sring delimeter, honoring '\t', '\n', '\r' - -'{ }' are actions -';' delimits rules -'grammar ', set name of Parser, Name of autogenerated Lexer is generated from it - -Tell to generate an AST and set lookahead -options -{ - output=AST; - ASTLabelType=CommonTree; - k = 2; -} - -'Sigil $' is for referencing alternations in actions, Lexer items only ???, also for setting returns - -'->' Is for tree construction -'^^' Makes a mother -'^' Is for matching of tree nodes -'[]' declaration and passing of parameters - -@members declare additional member variables in the parser class - -@init ?? - -scope a stack for symbols - -{ - $channel = HIDDEN; -} -put match into Nirwana - - -=head2 Lexer - -The lexer specification can be in the parser specification. -A lexer grammar is automatically generated. -'protected' is gone. - -=head2 Parser - -=head2 TreeParser - -=head2 StringTemplate - -=head1 ANTLR Backends - -=head2 Java - -=head2 Python - -=head2 Perl5 - -=head1 ANTLR and Parrot - -=head2 Backend for Parrot - -=head2 Pipp - -=head1 Glossary - -=head1 AUTHOR - -Bernhard Schmalhofer - - -=head1 SEE ALSO - - L - L - L - L - -=cut diff --git a/languages/pipp/docs/internals.pod b/languages/pipp/docs/internals.pod new file mode 100644 index 0000000000..f789c58833 --- /dev/null +++ b/languages/pipp/docs/internals.pod @@ -0,0 +1,121 @@ +# $Id$ + +=head1 TITLE + +internals - Design and Implementation of Pipp + +=head1 Source code + +See L. + +=head1 Issue tracking + +See F<../ROADMAP> and L. + +=head1 Testing + +See L. + +=head1 Parsing + +Parsing is done with Parrot Compiler Toolkit, PCT. + +=head1 Bytecode generation + +The parse tree is transformed to a Parrot Abstrace Syntax Tree. +PIR und Bytecode is theb generated from the PAST. + +=head1 Variables + +=over 4 + +=item globals in top file + +=item globals in included files + +=item class scope + +=item function and method scope + +=item constants + +=back + +=head1 Functions and closures + +=head2 Builtin functions + +=head2 Closures + +=head2 Internal functions + +=head1 Object orientation + +=head1 Namespaces + +A namespace is introduced with the keyword B. +The namespaced code can be enclosed in brackets. +The namespace declaration needs to be the first statement in the file. +With brackets, there can be multiple namespaces per file. Nesting is not possible. +Namespaces don't carry over to included files. +B doesn't define in the current namespace. +The backslash character serves as the namespace separator. +Short names can be defined with B. +Only classes, functions and constants are namespaced. +The current namespace can be queried with B<__NAMESPACE__>. +Namespaces are case insensitive. +No global code can precede the first B directive. +Free code is disallowed within namespaces. + +=head2 Implementation in Pipp + +In order to ease implementation and testing, there will be +some divergences in Pipp. +Only the bracketed syntax is supported. +Code outside the scope of namespaces directives is allowed. + +=head2 SEE ALSO + + L + L + L + L + L + L + L + L + L + L + +=head1 Including and requiring + +C is supported, but might have issues with variables. + +=head1 Extensions + +=head2 Implementation in Pipp + +Currently, Pipp has no support at all for extensions. + +=head2 SEE ALSO + + TODO: Embedding and Extending PHP, by Sahrah ... + L + +=head1 Interaction with the Parrot world + +Using Modules from other HLLs. Inlining PIR and other languages. + +=head1 Compatability + +See L for a list of divergences. + +=head1 Related projects. + +See the Wiki. Roadsend, Zend, PHC. + +=head1 AUTHOR + +Bernhard Schmalhofer - + +=cut diff --git a/languages/pipp/docs/namespaces.pod b/languages/pipp/docs/namespaces.pod deleted file mode 100644 index d1e62e0b74..0000000000 --- a/languages/pipp/docs/namespaces.pod +++ /dev/null @@ -1,51 +0,0 @@ -# $Id$ - -=head1 TITLE - -namespaces - Notes on namespaces in PHP - -=head1 Namespaces in Pipp - -A namespace is introduced with the keyword B. -There can be multiple namespaces per file. They are not nested. -Namespaces don't carry over to included files. -B doesn't define in the current namespace. -The backslash character serves as the namespace separator. -Short names can be defined with B. -Only classes, functions and constants are namespaced. -The current namespace can be queried with B<__NAMESPACE__>. -Namespaces are case insensitive. -No global code can precede the first B directive. -Free code is disallowed within namespaces. - -=head1 Implementation in Pipp - -Currently the namespace directive is only parsed. - -In order to ease implementation and testing, there will be -some divergences in Pipp. -Code before the first namespace directive is allowed. -Free code within namespace is allowed. -There will be namespaced variables as well. -'namespace \;' indicates the return to the root namespace. - - - -=head1 AUTHOR - -Bernhard Schmalhofer - - -=head1 SEE ALSO - - L - L - L - L - L - L - L - L - L - L - -=cut diff --git a/languages/pipp/docs/pipp.pod b/languages/pipp/docs/pipp.pod index c081926163..3bcc80dbc9 100644 --- a/languages/pipp/docs/pipp.pod +++ b/languages/pipp/docs/pipp.pod @@ -29,11 +29,13 @@ A listing of things that Pipp does differently from the standard PHP. =item No old style constructors, where the constructor is named after the class. +=item Only bracketed version of namespaces. No check for unnamespaced code. + =back =head1 Implementation -Pipp is based on the Parrot Compiler Toolkit. +Pipp is based on the Parrot Compiler Toolkit. See L for details. =head1 Status @@ -61,22 +63,12 @@ Bernhard Schmalhofer - =item L -=item L - =item L -=item L - -=item L - -=item L - =item L =item L -=item L - =back =cut diff --git a/languages/pipp/docs/testing.pod b/languages/pipp/docs/testing.pod index 5e014c0c7e..ce90747373 100644 --- a/languages/pipp/docs/testing.pod +++ b/languages/pipp/docs/testing.pod @@ -8,10 +8,10 @@ Pipp - Testing For testing the test-suite from PHP 5.3 is used. For sanity checking there are also few tests in -the subdirs of F. -These tests are used by 'make test'. +below the directory subdirs of F. +These tests are executed by 'make test'. -Run individual tests like: +Run individual tests e.g.: perl t/harness --verbose t/in_php/01_sea_only.t diff --git a/languages/pipp/src/pct/actions.pm b/languages/pipp/src/pct/actions.pm index 4891a50cab..c7ab80ab6d 100644 --- a/languages/pipp/src/pct/actions.pm +++ b/languages/pipp/src/pct/actions.pm @@ -114,17 +114,18 @@ method inline_sea_short_tag($/) { } method namespace_statement($/) { - our $?NS := ~$; - my $past := PAST::Op.new( - :pasttype('call'), - :name('echo'), - :node($/), - PAST::Val.new( - :value('Encountered namespace: ' ~ $?NS ~ "\n"), - :returns('PhpString'), - ), - ); - make $past; + my $ns_name := +$ ?? ~$[0] !! ''; + my $block := + PAST::Block.new( + :namespace($ns_name), + $( $ ) + ); + + # set up scope 'package' for the superglobals + our @?SUPER_GLOBALS; + for ( @?SUPER_GLOBALS ) { $block.symbol( :scope('package'), $_ ); } + + make $block; } method return_statement($/) { @@ -814,11 +815,9 @@ method quote($/) { method quote_expression($/, $key) { my $past; if $key eq 'quote_regex' { - our $?NS; $past := PAST::Block.new( $, :compiler('PGE::Perl6Regex'), - :namespace($?NS), :blocktype('declaration'), :node( $/ ) ); diff --git a/languages/pipp/src/pct/grammar.pg b/languages/pipp/src/pct/grammar.pg index 1c68c5fa45..5cee7a558c 100644 --- a/languages/pipp/src/pct/grammar.pg +++ b/languages/pipp/src/pct/grammar.pg @@ -146,7 +146,7 @@ rule statement_delimiter { } rule namespace_statement { - 'namespace' ';' + 'namespace' ? '{' '}' {*} } diff --git a/languages/pipp/t/php/namespace.t b/languages/pipp/t/php/namespace.t index 6470caf381..96206ce2b5 100644 --- a/languages/pipp/t/php/namespace.t +++ b/languages/pipp/t/php/namespace.t @@ -24,90 +24,43 @@ use warnings; use FindBin; use lib "$FindBin::Bin/../../../../lib", "$FindBin::Bin/../../lib"; -use Parrot::Test tests => 5; +use Parrot::Test tests => 3; language_output_is( 'Pipp', <<'CODE', <<'OUT', 'parsing of namespace directive' ); CODE -Encountered namespace: A\B -Encountered namespace: \A\B\C OUT language_output_is( 'Pipp', <<'CODE', <<'OUT', 'namespace with constant', todo => 'not implemented yet' ); -CODE -FOO in A::B -FOO in A::B -FOO in root -FOO in root -FOO in A::B -FOO in root -OUT - -language_output_is( 'Pipp', <<'CODE', <<'OUT', 'case insensitive namespace', todo => 'not implemented yet' ); - -CODE -FOO in a::b -FOO in a::b -FOO in a::b -FOO in a::b -OUT - -language_output_is( 'Pipp', <<'CODE', <<'OUT', 'namespace with variable', todo => 'not implemented yet' ); - CODE @@ -122,7 +75,7 @@ OUT language_output_is( 'Pipp', <<'CODE', <<'OUT', 'namespace with class', todo => 'not implemented yet' ); bums(); +} + ?> CODE The function bums() in class A\Dings has been called. diff --git a/languages/regex/regex-compiler.pir b/languages/regex/regex-compiler.pir index c564c3a497..960a054cbc 100644 --- a/languages/regex/regex-compiler.pir +++ b/languages/regex/regex-compiler.pir @@ -38,7 +38,7 @@ pir_to_pbc: # $P1 = $P0(pirfile) # $P1 = compile $P0, pirfile - $P1 = find_global "_regex" + $P1 = get_global "_regex" .return($P1) .end diff --git a/languages/t/harness b/languages/t/harness index 498f2fa870..ecfa5026f5 100644 --- a/languages/t/harness +++ b/languages/t/harness @@ -1,6 +1,5 @@ #! perl - -# Copyright (C) 2004-2008, The Perl Foundation. +# Copyright (C) 2004-2009, The Perl Foundation. # $Id$ use strict; @@ -85,7 +84,6 @@ my @unified_testable_languages befunge bf cola dotnet - hq9plus jako lazy-k lisp lua m4 markdown diff --git a/lib/Parrot/Distribution.pm b/lib/Parrot/Distribution.pm index 1c4a0155f7..13768ab1c2 100644 --- a/lib/Parrot/Distribution.pm +++ b/lib/Parrot/Distribution.pm @@ -1,9 +1,9 @@ -# Copyright (C) 2004-2008, The Perl Foundation. +# Copyright (C) 2004-2009, The Perl Foundation. # $Id$ =head1 NAME -Parrot::Distribution - Parrot Distribution Directory +Parrot::Distribution - Info on the Parrot Distribution =head1 SYNOPSIS @@ -34,6 +34,7 @@ use warnings; use ExtUtils::Manifest; use File::Spec; + use lib qw( lib ); use Parrot::BuildUtil (); @@ -52,51 +53,52 @@ Raises an exception if the distribution root is not found. =cut -## i'm a singleton -my $dist; +{ + my $dist; ## i'm a singleton -sub new { - my ($class) = @_; + sub new { + my ($class) = @_; - return $dist if defined $dist; + return $dist if defined $dist; - my $self = bless {}, $class; + my $self = bless {}, $class; - return $self->_initialize; -} + return $self->_initialize; + } -sub _initialize { - my ($self) = @_; + sub _initialize { + my ($self) = @_; - my $file = 'README'; - my $path = '.'; + my $file = 'README'; + my $path = '.'; - while ( $self = $self->SUPER::new($path) ) { - if ( $self->file_exists_with_name($file) - and $self->file_with_name($file)->read =~ m/^This is Parrot/os ) - { - $dist = $self; - last; + while ( $self = $self->SUPER::new($path) ) { + if ( $self->file_exists_with_name($file) + and $self->file_with_name($file)->read =~ m/^This is Parrot/os ) + { + $dist = $self; + last; + } + + $path = $self->parent_path(); } - $path = $self->parent_path(); - } + # non-object call syntax since $self is undefined + _croak( undef, "Failed to find Parrot distribution root\n" ) + unless $self; + + if ( defined $dist ) { + $self->_dist_files( + [ + sort keys %{ + ExtUtils::Manifest::maniread( File::Spec->catfile( $self->path, "MANIFEST" ) ) + }, + ] + ); + } - # non-object call syntax since $self is undefined - _croak( undef, "Failed to find Parrot distribution root\n" ) - unless $self; - - if ( defined $dist ) { - $self->_dist_files( - [ - sort keys %{ - ExtUtils::Manifest::maniread( File::Spec->catfile( $self->path, "MANIFEST" ) ) - }, - ] - ); + return $self; } - - return $self; } sub _croak { @@ -136,46 +138,60 @@ BEGIN { =item C -=item C +Check the type of checkout. =item C -=item C - -=item C +=item C =item C =item C +=item C + +=item C + +=item C + +=item C + Returns the directories which contain source files of the appropriate filetype. -=item C +=item C -=item C +=item C -=item C +=item C -=item C +=item C -=item C +=item C -=item C +=item C -Returns the source file with the specified name and of the appropriate filetype. +=item C -=item C +=item C -=item C +Returns the source file with the specified name and of the appropriate filetype. -=item C +=item C -=item C +=item C =item C =item C +=item C + +=item C + +=item C + +=item C + Returns a sorted list of the source files listed within the MANIFEST of Parrot. Returns a list of Parrot::IO::File objects of the appropriate filetype. @@ -477,7 +493,6 @@ sub get_perl_exemption_regexp { my @paths = map { File::Spec->catdir( $parrot_dir, File::Spec->canonpath($_) ) } qw{ languages/regex/lib/Regex/Grammar.pm languages/pipp/src/pct/actions.pm - languages/hq9plus/src/parser/actions.pm compilers/nqp/ compilers/ncigen/src/parser/actions.pm lib/Digest/Perl/ @@ -675,7 +690,6 @@ sub perl_module_file_directories { map( "languages/$_" => qw< APL/t BASIC/compiler - HQ9plus/lib/Parrot/Test WMLScript/build/SRM WMLScript/t/Parrot/Test bc/lib/Parrot/Test bc/lib/Parrot/Test/Bc dotnet/build/SRM dotnet/t @@ -776,7 +790,7 @@ sub generated_files { my $self = shift; my $generated = ExtUtils::Manifest::maniread('MANIFEST.generated'); - my $path = $dist->path(); + my $path = $self->path(); return { map { File::Spec->catfile( $path, $_ ) => $generated->{$_} } diff --git a/lib/Parrot/Docs/Section/C.pm b/lib/Parrot/Docs/Section/C.pm index b356a7a11a..5b6afb4382 100644 --- a/lib/Parrot/Docs/Section/C.pm +++ b/lib/Parrot/Docs/Section/C.pm @@ -235,8 +235,7 @@ sub new { 'pairs' => ['resources'], 'sources' => ['res_lea'] ), - $self->c_pair_item( '', 'smallobject' ), - $self->c_pair_item( '', 'headers' ), + $self->c_source_item( '', 'mark_sweep' ), ), $self->new_group( 'Garbage Collection', diff --git a/lib/Parrot/Docs/Section/Languages.pm b/lib/Parrot/Docs/Section/Languages.pm index 6ef2fa6bb0..406828c378 100644 --- a/lib/Parrot/Docs/Section/Languages.pm +++ b/lib/Parrot/Docs/Section/Languages.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2008, The Perl Foundation. +# Copyright (C) 2004-2009, The Perl Foundation. # $Id$ =head1 NAME @@ -55,7 +55,6 @@ sub new { $self->new_section( 'eclectus', 'eclectus.html', '', 'languages/eclectus' ), $self->new_section( 'ecmascript', 'ecmascript.html', '', 'languages/ecmascript' ), $self->new_section( 'forth', 'forth.html', '', 'languages/forth' ), - $self->new_section( 'HQ9plus', 'hq9plus.html', '', 'languages/hq9plus' ), $self->new_section( 'Jako', 'jako.html', '', 'languages/jako' ), $self->new_section( 'lazy-k', 'lazy-k.html', '', 'languages/lazy-k' ), $self->new_section( 'lolcode', 'lolcode.html', '', 'languages/lolcode' ), diff --git a/lib/Parrot/Test.pm b/lib/Parrot/Test.pm index 5fc3a05ab6..0e058eafba 100644 --- a/lib/Parrot/Test.pm +++ b/lib/Parrot/Test.pm @@ -740,7 +740,7 @@ sub _generate_test_functions { $args =~ s/--run-exec//; $cmd = qq{$parrot $args "$code_f"}; } elsif ($func =~ /^pirc_/) { - $cmd = qq{$pirc -p "$code_f"}; + $cmd = qq{$pirc -b -x "$code_f"}; } write_code_to_file( $code, $code_f ); diff --git a/runtime/parrot/library/Data/Replace.pir b/runtime/parrot/library/Data/Replace.pir index 5dff16cf21..819881d55a 100644 --- a/runtime/parrot/library/Data/Replace.pir +++ b/runtime/parrot/library/Data/Replace.pir @@ -12,7 +12,7 @@ Data::Replace - data replacing implemented in PIR .local pmc replace - replace = find_global "Data::Replace", "replace" + replace = get_hll_global ['Data::Replace'], 'replace' replace( array, old, new ) @@ -95,7 +95,7 @@ CANT_REPLACE: typeof name, where .include 'errors.pasm' errorsoff .PARROT_ERRORS_GLOBALS_FLAG - find_global temp, "Data::Replace", name + temp = get_hll_global ['"Data::Replace'], name errorson .PARROT_ERRORS_GLOBALS_FLAG # invoke it if found $I0 = defined temp @@ -111,9 +111,9 @@ END: .end .sub __onload :load - $P0 = find_global "Data::Replace", "ResizablePMCArray" - store_global "Data::Replace", "PMCArray", $P0 - store_global "Data::Replace", "StringArray", $P0 + $P0 = get_hll_global ['Data::Replace'], 'ResizablePMCArray' + set_hll_global ['Data::Replace'], 'PMCArray', $P0 + set_hll_global ['Data::Replace'], 'StringArray', $P0 .end .sub ResizablePMCArray diff --git a/runtime/parrot/library/Digest/MD5.pir b/runtime/parrot/library/Digest/MD5.pir index c2f31cf43e..d807d15bd7 100644 --- a/runtime/parrot/library/Digest/MD5.pir +++ b/runtime/parrot/library/Digest/MD5.pir @@ -54,11 +54,11 @@ consumption which should be resolved soon. .sub onload :load .local pmc f - f = find_global "Digest", "_md5sum" + f = get_hll_global ['Digest'], '_md5sum' set_global "_md5sum", f - f = find_global "Digest", "_md5_hex" + f = get_hll_global ['Digest'], '_md5_hex' set_global "_md5_hex", f - f = find_global "Digest", "_md5_print" + f = get_hll_global ['Digest'], '_md5_print' set_global "_md5_print", f .end diff --git a/runtime/parrot/library/STM.pir b/runtime/parrot/library/STM.pir index 8562aef188..90096135d9 100644 --- a/runtime/parrot/library/STM.pir +++ b/runtime/parrot/library/STM.pir @@ -4,9 +4,9 @@ # print "loaded STM runtime library\n" # Create globals $P0 = new 'ResizablePMCArray' - store_global 'STM', 'ends', $P0 + set_hll_global ['STM'], 'ends', $P0 $P0 = new 'ResizableIntegerArray' - store_global 'STM', 'statuses', $P0 + set_hll_global ['STM'], 'statuses', $P0 .end .const int STATUS_COMMIT = 0 diff --git a/runtime/parrot/library/Stream/Base.pir b/runtime/parrot/library/Stream/Base.pir index 950fd522e6..b494cc3919 100644 --- a/runtime/parrot/library/Stream/Base.pir +++ b/runtime/parrot/library/Stream/Base.pir @@ -40,7 +40,7 @@ END: .local pmc close # call our own close - close = find_global "Stream::Base", "close" + close = get_hll_global ['Stream::Base'], 'close' close(self) .end @@ -91,7 +91,7 @@ Returns nothing. .local int i .local pmc escape - escape = find_global "Data::Escape", "String" + escape = get_hll_global ['Data::Escape'], 'String' LOOP: i = self."connected"() unless i goto END diff --git a/runtime/parrot/library/Stream/Writer.pir b/runtime/parrot/library/Stream/Writer.pir index 3acb3d80a3..76c7a3403d 100644 --- a/runtime/parrot/library/Stream/Writer.pir +++ b/runtime/parrot/library/Stream/Writer.pir @@ -64,7 +64,7 @@ END: source() # close the source - source = find_global "Stream::Base", "close" + source = get_hll_global ['Stream::Base'], 'close' self."setSource"() # mark it as closed diff --git a/runtime/parrot/library/Test/Builder/Test.pir b/runtime/parrot/library/Test/Builder/Test.pir index 5e45d8d71f..d6305b3ea5 100644 --- a/runtime/parrot/library/Test/Builder/Test.pir +++ b/runtime/parrot/library/Test/Builder/Test.pir @@ -280,7 +280,7 @@ Returns the TAP-compatible string representation of this test. .local pmc status .local pmc parent_status - parent_status = find_global 'Test::Builder::Test::WithReason', 'status' + parent_status = get_hll_global ['Test::Builder::Test::WithReason'], 'status' status = parent_status() reason = self.'reason'() @@ -315,7 +315,7 @@ Returns the TAP-compatible string representation of this test. .local pmc status .local pmc parent_status - parent_status = find_global 'Test::Builder::Test::WithReason', 'status' + parent_status = get_hll_global ['Test::Builder::Test::WithReason'], 'status' status = parent_status() set status['skip'], 1 @@ -360,7 +360,7 @@ Returns the TAP-compatible string representation of this test. .local pmc status .local pmc parent_status - parent_status = find_global 'Test::Builder::Test::WithReason', 'status' + parent_status = get_hll_global ['Test::Builder::Test::WithReason'], 'status' status = parent_status() passed = self.'passed'() diff --git a/runtime/parrot/library/dumper.pir b/runtime/parrot/library/dumper.pir index d90aac1497..c58fa4bdb5 100644 --- a/runtime/parrot/library/dumper.pir +++ b/runtime/parrot/library/dumper.pir @@ -161,13 +161,13 @@ Returns the global dumper instance used by the non object interface. TYPE_OK: errorsoff .PARROT_ERRORS_GLOBALS_FLAG - find_global self, "Data::Dumper", "global" + self = get_hll_global ['Data::Dumper'], 'global' errorson .PARROT_ERRORS_GLOBALS_FLAG if null self goto create_type create_type: new self, "Data::Dumper" - store_global "Data::Dumper", "global", self + set_hll_global ['Data::Dumper'], 'global', self END: .return( self ) diff --git a/runtime/parrot/library/libpcre.pir b/runtime/parrot/library/libpcre.pir index 2f881f58de..9454dc04fc 100644 --- a/runtime/parrot/library/libpcre.pir +++ b/runtime/parrot/library/libpcre.pir @@ -35,7 +35,7 @@ See 'library/pcre.pir' for details on the user interface. ## allocate space in string for error message repeat error, " ", error_size - PCRE_NCI_compile= find_global 'PCRE::NCI', 'PCRE_compile' + PCRE_NCI_compile= get_hll_global ['PCRE::NCI'], 'PCRE_compile' .local pmc code @@ -81,7 +81,7 @@ RETURN: ## on 32 bit systems .local pmc PCRE_NCI_exec - PCRE_NCI_exec = find_global 'PCRE::NCI', 'PCRE_exec' + PCRE_NCI_exec = get_hll_global ['PCRE::NCI'], 'PCRE_exec' .local int ok diff --git a/runtime/parrot/library/parrotlib.pir b/runtime/parrot/library/parrotlib.pir index 26fdf422a3..1bd0f39bbc 100644 --- a/runtime/parrot/library/parrotlib.pir +++ b/runtime/parrot/library/parrotlib.pir @@ -45,10 +45,10 @@ OKAY: # create includes array includes = new 'ResizablePMCArray' - store_global "_parrotlib", "include_paths", includes + set_hll_global ['_parrotlib'], 'include_paths', includes # get the directory handler - $P0 = find_global "_parrotlib", "handle_directory" + $P0 = get_hll_global ['_parrotlib'], 'handle_directory' # fill the includes array LOOP: @@ -73,9 +73,9 @@ LOOP: $P1 = new 'String' $P1 = sig - find_global $P0, "_parrotlib", name + $P0 = get_hll_global ['_parrotlib'], name setprop $P0, "signature", $P1 - store_global "_parrotlib", name, $P0 + set_hll_global ['_parrotlib'], name, $P0 .end =item STRING = include_file_location( STRING ) @@ -90,7 +90,7 @@ This function returns the absolute filename of the requested file. .sub include_file_location .param string name - find_global $P0, "_parrotlib", "include_paths" + $P0 = get_hll_global ['_parrotlib'], 'include_paths' $S0 = find_file_path( name, $P0 ) .begin_return @@ -110,7 +110,8 @@ This function returns the absolute filename of the requested file. .sub imcc_compile_file_location .param string name - find_global $P0, "_parrotlib", "include_paths" + $P0 = get_hll_global ['_parrotlib'], 'include_paths' + $S0 = find_file_path( name, $P0 ) .begin_return diff --git a/runtime/parrot/library/pcre.pir b/runtime/parrot/library/pcre.pir index f285e56a28..e10854a256 100644 --- a/runtime/parrot/library/pcre.pir +++ b/runtime/parrot/library/pcre.pir @@ -10,13 +10,13 @@ pcre.pir - user interface to Perl-Compatible Regular Expression library load_bytecode 'library/pcre.pir' lib = pcre_init() - func = find_global 'PCRE', 'compile' + func = get_hll_global ['PCRE'], 'compile' ( regex, error, errptr )= func( pat, options ) - func = find_global 'PCRE', 'match' + func = get_hll_global ['PCRE'], 'match' ( ok, result )= func( regex, string, start, options ) - func = find_global 'PCRE', 'dollar' + func = get_hll_global ['PCRE'], 'dollar' match = func( string, ok, result, i ) =head1 DESCRIPTION @@ -79,7 +79,7 @@ LIB_CYGWIN: branch LIB_FAILED LIB_LOADED: - store_global 'PCRE', 'lib', libpcre + set_hll_global ['PCRE'], 'lib', libpcre load_bytecode 'library/libpcre.pir' @@ -87,23 +87,23 @@ LIB_LOADED: # const char **errptr, int *erroffset, # const unsigned char *tableptr dlfunc pcre_function, libpcre, 'pcre_compile', 'ptiB3P' - store_global 'PCRE::NCI', 'PCRE_compile', pcre_function + set_hll_global ['PCRE::NCI'], 'PCRE_compile', pcre_function #int pcre_exec(const pcre *code, const pcre_extra *extra, # const char *subject, int length, int startoffset, # int options, int *ovector, int ovecsize); dlfunc pcre_function, libpcre, 'pcre_exec', 'ipPtiiipi' - store_global 'PCRE::NCI', 'PCRE_exec', pcre_function + set_hll_global ['PCRE::NCI'], 'PCRE_exec', pcre_function #int pcre_copy_substring(const char *subject, int *ovector, # int stringcount, int stringnumber, char *buffer, # int buffersize); dlfunc pcre_function, libpcre, 'pcre_copy_substring', 'itpiibi' - store_global 'PCRE::NCI', 'PCRE_copy_substring', pcre_function + set_hll_global ['PCRE::NCI'], 'PCRE_copy_substring', pcre_function # const char *pcre_version(void); dlfunc pcre_function, libpcre, 'pcre_version', 't' - store_global 'PCRE::NCI', 'PCRE_version', pcre_function + set_hll_global ['PCRE::NCI'], 'PCRE_version', pcre_function .return( libpcre ) @@ -124,7 +124,7 @@ Returns pmc B, string B and int B. .param int options .local pmc pcre_function - pcre_function= find_global 'PCRE::NCI', 'compile' + pcre_function= get_hll_global ['PCRE::NCI'], 'compile' .local pmc regex .local string error @@ -152,7 +152,7 @@ in pmc B. .param int options .local pmc pcre_function - pcre_function= find_global 'PCRE::NCI', 'exec' + pcre_function= get_hll_global ['PCRE::NCI'], 'exec' .local int ok .local pmc res @@ -177,7 +177,7 @@ Returns the match. .param int n .local pmc pcre_function - pcre_function= find_global 'PCRE::NCI', 'result' + pcre_function= get_hll_global ['PCRE::NCI'], 'result' .local string matched @@ -194,7 +194,7 @@ Returns the match. .sub version .local pmc pcre_function - pcre_function= find_global 'PCRE::NCI', 'PCRE_version' + pcre_function= get_hll_global ['PCRE::NCI'], 'PCRE_version' .local string ver diff --git a/src/cpu_dep.c b/src/cpu_dep.c index b4fe65cca0..a2a4cbb924 100644 --- a/src/cpu_dep.c +++ b/src/cpu_dep.c @@ -14,7 +14,7 @@ function gets the current processor context and either traces it directly or stores it on the system stack. C sets up a trace of the system stack using two marker addresses as boundaries. The code to actually perform the trace of a memory block -between two boundaries is located in C. +between two boundaries is located in C. =head2 Functions @@ -26,7 +26,7 @@ between two boundaries is located in C. #include "parrot/parrot.h" -/* HEADERIZER HFILE: include/parrot/dod.h */ +/* HEADERIZER HFILE: include/parrot/gc_api.h */ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ @@ -169,7 +169,7 @@ trace_system_stack(PARROT_INTERP) =head1 SEE ALSO -F and F. +F and F. =cut diff --git a/src/gc/api.c b/src/gc/api.c new file mode 100644 index 0000000000..11a01294f8 --- /dev/null +++ b/src/gc/api.c @@ -0,0 +1,664 @@ +/* +Copyright (C) 2001-2009, The Perl Foundation. +$Id$ + +=head1 NAME + +src/gc/api.c - general Parrot API for GC functions + +=head1 DESCRIPTION + +This file implements I. This is documented in +PDD 9 with supplementary notes in F and +F. + +It's possible to turn on/off the checking of the system stack and +processor registers. The actual checking is set up in F +and is performed in the function C here. + +There's also a verbose mode for garbage collection. + +=head1 FUNCTIONS + +=over 4 + +=cut + +*/ + +#define DOD_C_SOURCE +#include "parrot/parrot.h" +#include "parrot/gc_api.h" + +/* HEADERIZER HFILE: include/parrot/gc_api.h */ + +/* HEADERIZER BEGIN: static */ +/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ + +PARROT_CONST_FUNCTION +static size_t find_common_mask(PARROT_INTERP, size_t val1, size_t val2) + __attribute__nonnull__(1); + +PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static PMC_EXT * new_pmc_ext(PARROT_INTERP) + __attribute__nonnull__(1); + +#define ASSERT_ARGS_find_common_mask __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) +#define ASSERT_ARGS_new_pmc_ext __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 */ + +#if ! DISABLE_GC_DEBUG + +/* Set when walking the system stack */ +int CONSERVATIVE_POINTER_CHASING = 0; + +#endif + +/* + +=item C + +Gets a new PMC header from the PMC pool's free list. Guaranteed to return a +valid PMC object or else Parrot will panic. Sets the necessary flags for the +objects and initializes the PMC data pointer to C. + +=cut + +*/ + +PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +PMC * +new_pmc_header(PARROT_INTERP, UINTVAL flags) +{ + ASSERT_ARGS(new_pmc_header) + Small_Object_Pool * const pool = flags & PObj_constant_FLAG + ? interp->arena_base->constant_pmc_pool + : interp->arena_base->pmc_pool; + PMC * const pmc = (PMC *)pool->get_free_object(interp, pool); + + if (!pmc) + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ALLOCATION_ERROR, + "Parrot VM: PMC allocation failed!\n"); + + /* clear flags, set is_PMC_FLAG */ + if (flags & PObj_is_PMC_EXT_FLAG) { + flags |= PObj_is_special_PMC_FLAG; + pmc->pmc_ext = new_pmc_ext(interp); + + if (flags & PObj_is_PMC_shared_FLAG) + add_pmc_sync(interp, pmc); + } + else + pmc->pmc_ext = NULL; + + PObj_get_FLAGS(pmc) = PObj_is_PMC_FLAG|flags; + pmc->vtable = NULL; + +#if ! PMC_DATA_IN_EXT + PMC_data(pmc) = NULL; +#endif + + return pmc; +} + + +/* + +=item C + +Gets a new free C structure from the PMC_EXT pool. A pointer to the +new PMC_EXT is returned. Does not check to ensure the PMC_EXT is non-null +before it is returned (yet). + +=cut + +*/ + +PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static PMC_EXT * +new_pmc_ext(PARROT_INTERP) +{ + ASSERT_ARGS(new_pmc_ext) + Small_Object_Pool * const pool = interp->arena_base->pmc_ext_pool; + /* XXX: Should we check here to ensure the PMC_EXT is non-null + like we do in C? */ + return (PMC_EXT *)pool->get_free_object(interp, pool); +} + + +/* + +=item C + +Obtains a new C structure, and attaches it to the given C. +Sets the necessary flags associated with the PMC_EXT structure. Ensures +that the PMC_EXT structure is marked as "alive" by the GC. + +=cut + +*/ + +void +add_pmc_ext(PARROT_INTERP, ARGMOD(PMC *pmc)) +{ + ASSERT_ARGS(add_pmc_ext) + pmc->pmc_ext = new_pmc_ext(interp); + PObj_is_PMC_EXT_SET(pmc); + +#ifdef PARROT_GC_IMS + /* + * preserve DDD color: a simple PMC live = black + * an aggregate live = grey + * set'em black + */ + if (PObj_live_TEST(pmc)) + PObj_get_FLAGS(pmc) |= PObj_custom_GC_FLAG; +#endif + + PMC_next_for_GC(pmc) = PMCNULL; +} + + +/* + +=item C + +Adds a C structure to the given C. Initializes the PMC's owner +field and the synchronization mutext. Does not check to ensure the C is +non-null. + +=cut + +*/ + +void +add_pmc_sync(PARROT_INTERP, ARGMOD(PMC *pmc)) +{ + ASSERT_ARGS(add_pmc_sync) + if (!PObj_is_PMC_EXT_TEST(pmc)) + add_pmc_ext(interp, pmc); + + /* XXX: Should we test the Sync * for non-null? should we allocate these + from a bufferlike pool instead of directly from the system? */ + PMC_sync(pmc) = mem_allocate_typed(Sync); + PMC_sync(pmc)->owner = interp; + + MUTEX_INIT(PMC_sync(pmc)->pmc_lock); +} + + +/* + +=item C + +Returns a new C header from the string pool or the constant string +pool. Sets default flags on the string object: C, +C, and C (for GC). Initializes the data +field of the string buffer to C. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +STRING * +new_string_header(PARROT_INTERP, UINTVAL flags) +{ + ASSERT_ARGS(new_string_header) + STRING * const string = (STRING *)get_free_buffer(interp, + (flags & PObj_constant_FLAG) + ? interp->arena_base->constant_string_header_pool + : interp->arena_base->string_header_pool); + + string->strstart = NULL; + PObj_get_FLAGS(string) |= + flags | PObj_is_string_FLAG | PObj_is_COWable_FLAG | PObj_live_FLAG; + + return string; +} + + +/* + +=item C + +Creates and returns a new C from the buffer header pool. Calls +C to do all the work. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +Buffer * +new_buffer_header(PARROT_INTERP) +{ + ASSERT_ARGS(new_buffer_header) + return (Buffer *)get_free_buffer(interp, + interp->arena_base->buffer_header_pool); +} + + +/* + +=item C + +Returns a new buffer-like header from the appropriate sized pool. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +void * +new_bufferlike_header(PARROT_INTERP, size_t size) +{ + ASSERT_ARGS(new_bufferlike_header) + Small_Object_Pool * const pool = get_bufferlike_pool(interp, size); + + return get_free_buffer(interp, pool); +} + + +/* + +=item C + +Frees a PMC that is no longer being used. Calls a custom C VTABLE +method if one is available. If the PMC uses a PMC_EXT structure, that is freed +as well. + +=cut + +*/ + +void +Parrot_gc_free_pmc(PARROT_INTERP, SHIM(Small_Object_Pool *pool), + ARGMOD(PObj *p)) +{ + ASSERT_ARGS(Parrot_gc_free_pmc) + PMC * const pmc = (PMC *)p; + Arenas * const arena_base = interp->arena_base; + + /* TODO collect objects with finalizers */ + if (PObj_needs_early_DOD_TEST(p)) + --arena_base->num_early_DOD_PMCs; + + if (PObj_active_destroy_TEST(p)) + VTABLE_destroy(interp, pmc); + + if (PObj_is_PMC_EXT_TEST(p)) + Parrot_gc_free_pmc_ext(interp, pmc); + +#ifndef NDEBUG + + pmc->pmc_ext = (PMC_EXT *)0xdeadbeef; + pmc->vtable = (VTABLE *)0xdeadbeef; + PMC_pmc_val(pmc) = (PMC *)0xdeadbeef; + +#endif + +} + +/* + +=item C + +Frees the C structure attached to a PMC, if it exists. + +=cut + +*/ + +void +Parrot_gc_free_pmc_ext(PARROT_INTERP, ARGMOD(PMC *p)) +{ + ASSERT_ARGS(Parrot_gc_free_pmc_ext) + /* if the PMC has a PMC_EXT structure, return it to the pool/arena */ + Arenas * const arena_base = interp->arena_base; + Small_Object_Pool * const ext_pool = arena_base->pmc_ext_pool; + + if (PObj_is_PMC_shared_TEST(p) && PMC_sync(p)) { + MUTEX_DESTROY(PMC_sync(p)->pmc_lock); + mem_internal_free(PMC_sync(p)); + PMC_sync(p) = NULL; + } + + if (p->pmc_ext) + ext_pool->add_free_object(interp, ext_pool, p->pmc_ext); + + ext_pool->num_free_objects++; + + p->pmc_ext = NULL; +} + +/* + +=item C + +If the PMC uses memory allocated directly from the system, this function +frees that memory. + +=cut + +*/ + +void +Parrot_gc_free_sysmem(SHIM_INTERP, SHIM(Small_Object_Pool *pool), + ARGMOD(PObj *b)) +{ + ASSERT_ARGS(Parrot_gc_free_sysmem) + /* has sysmem allocated, e.g. string_pin */ + if (PObj_sysmem_TEST(b) && PObj_bufstart(b)) + mem_sys_free(PObj_bufstart(b)); + + PObj_bufstart(b) = NULL; + PObj_buflen(b) = 0; +} + +/* + +=item C + +Frees the given buffer, returning the storage space to the operating system +and removing it from Parrot's memory management system. If the buffer is COW, +The buffer is not freed if the reference count is greater then 1. + +=cut + +*/ + +void +Parrot_gc_free_buffer_malloc(SHIM_INTERP, SHIM(Small_Object_Pool *pool), + ARGMOD(PObj *b)) +{ + ASSERT_ARGS(Parrot_gc_free_buffer_malloc) + /* free allocated space at (int *)bufstart - 1, but not if it used COW or is + * external */ + PObj_buflen(b) = 0; + + if (!PObj_bufstart(b) || PObj_is_external_or_free_TESTALL(b)) + return; + + if (PObj_COW_TEST(b)) { + INTVAL * const refcount = PObj_bufrefcountptr(b); + + if (--(*refcount) == 0) { + mem_sys_free(refcount); /* the actual bufstart */ + } + } + else + mem_sys_free(PObj_bufrefcountptr(b)); +} + +/* + +=item C + +Frees a buffer, returning it to the memory pool for Parrot to possibly +reuse later. + +=cut + +*/ + +void +Parrot_gc_free_buffer(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool), ARGMOD(PObj *b)) +{ + ASSERT_ARGS(Parrot_gc_free_buffer) + Memory_Pool * const mem_pool = (Memory_Pool *)pool->mem_pool; + + /* XXX Jarkko reported that on irix pool->mem_pool was NULL, which really + * shouldn't happen */ + if (mem_pool) { + if (!PObj_COW_TEST(b)) + mem_pool->guaranteed_reclaimable += PObj_buflen(b); + + mem_pool->possibly_reclaimable += PObj_buflen(b); + } + + PObj_buflen(b) = 0; +} + +#ifndef PLATFORM_STACK_WALK + +/* + +=item C + +Finds a mask covering the longest common bit-prefix of C +and C. + +=cut + +*/ + +PARROT_CONST_FUNCTION +static size_t +find_common_mask(PARROT_INTERP, size_t val1, size_t val2) +{ + ASSERT_ARGS(find_common_mask) + int i; + const int bound = sizeof (size_t) * 8; + + /* Shifting a value by its size (in bits) or larger is undefined behaviour. + So need an explicit check to return 0 if there is no prefix, rather than + attempting to rely on (say) 0xFFFFFFFF << 32 being 0. */ + for (i = 0; i < bound; i++) { + if (val1 == val2) + return ~(size_t)0 << i; + + val1 >>= 1; + val2 >>= 1; + } + + if (val1 == val2) { + PARROT_ASSERT(i == bound); + return 0; + } + + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INTERP_ERROR, + "Unexpected condition in find_common_mask()!\n"); +} + +/* + +=item C + +Traces the memory block between C and C. +Attempt to find pointers to PObjs or buffers, and mark them as "alive" +if found. See src/cpu_dep.c for more information about tracing memory +areas. + +=cut + +*/ + +void +trace_mem_block(PARROT_INTERP, size_t lo_var_ptr, size_t hi_var_ptr) +{ + ASSERT_ARGS(trace_mem_block) + size_t prefix; + ptrdiff_t cur_var_ptr; + + const size_t buffer_min = get_min_buffer_address(interp); + const size_t buffer_max = get_max_buffer_address(interp); + const size_t pmc_min = get_min_pmc_address(interp); + const size_t pmc_max = get_max_pmc_address(interp); + + const size_t mask = + find_common_mask(interp, + buffer_min < pmc_min ? buffer_min : pmc_min, + buffer_max > pmc_max ? buffer_max : pmc_max); + + if (!lo_var_ptr || !hi_var_ptr) + return; + + if (lo_var_ptr < hi_var_ptr) { + const size_t tmp_ptr = hi_var_ptr; + hi_var_ptr = lo_var_ptr; + lo_var_ptr = tmp_ptr; + } + + /* Get the expected prefix */ + prefix = mask & buffer_min; + + for (cur_var_ptr = hi_var_ptr; + (ptrdiff_t)cur_var_ptr < (ptrdiff_t)lo_var_ptr; + cur_var_ptr = (size_t)((ptrdiff_t)cur_var_ptr + sizeof (void *))) { + const size_t ptr = *(size_t *)cur_var_ptr; + + /* Do a quick approximate range check by bit-masking */ + if ((ptr & mask) == prefix || !prefix) { + /* Note that what we find via the stack or registers are not + * guaranteed to be live pmcs/buffers, and could very well have + * had their bufstart/vtable destroyed due to the linked list of + * free headers... */ + if (pmc_min <= ptr && ptr < pmc_max && + is_pmc_ptr(interp, (void *)ptr)) { + /* ...so ensure that pobject_lives checks PObj_on_free_list_FLAG + * before adding it to the next_for_GC list, to have + * vtable->mark() called. */ + pobject_lives(interp, (PObj *)ptr); + } + else if (buffer_min <= ptr && ptr < buffer_max && + is_buffer_ptr(interp, (void *)ptr)) { + /* ...and since pobject_lives doesn't care about bufstart, it + * doesn't really matter if it sets a flag */ + pobject_lives(interp, (PObj *)ptr); + } + } + } + + return; +} +#endif + +/* + +=item C + +Records the start time of a DOD run when profiling is enabled. + +=cut + +*/ + +void +Parrot_gc_profile_start(PARROT_INTERP) +{ + ASSERT_ARGS(Parrot_gc_profile_start) + if (Interp_flags_TEST(interp, PARROT_PROFILE_FLAG)) + interp->profile->dod_time = Parrot_floatval_time(); +} + +/* + +=item C + +Records the end time of the DOD part C run when profiling is +enabled. Also record start time of next part. + +=cut + +*/ + +void +Parrot_gc_profile_end(PARROT_INTERP, int what) +{ + ASSERT_ARGS(Parrot_gc_profile_end) + if (Interp_flags_TEST(interp, PARROT_PROFILE_FLAG)) { + RunProfile * const profile = interp->profile; + const FLOATVAL now = Parrot_floatval_time(); + + profile->data[what].numcalls++; + profile->data[what].time += now - profile->dod_time; + + /* + * we've recorded the time of a DOD/GC piece from + * dod_time until now, so add this to the start of the + * currently executing opcode, which hasn't run this + * interval. + */ + profile->starttime += now - profile->dod_time; + + /* prepare start for next step */ + profile->dod_time = now; + } +} + +/* + +=item C + +Prepares the collector for a mark & sweep DOD run. This is the +initializer function for the MS garbage collector. + +=cut + +*/ + +void +Parrot_gc_ms_run_init(PARROT_INTERP) +{ + ASSERT_ARGS(Parrot_gc_ms_run_init) + Arenas * const arena_base = interp->arena_base; + + arena_base->dod_trace_ptr = NULL; + arena_base->dod_mark_start = NULL; + arena_base->num_early_PMCs_seen = 0; + arena_base->num_extended_PMCs = 0; +} + + +/* + +=item C + +Calls the configured garbage collector to find and reclaim unused +headers. + +=cut + +*/ + +void +Parrot_do_dod_run(PARROT_INTERP, UINTVAL flags) +{ + ASSERT_ARGS(Parrot_do_dod_run) + interp->arena_base->do_gc_mark(interp, flags); + parrot_gc_context(interp); +} + +/* + +=back + +=head1 SEE ALSO + +F, F, F and +F. + +=head1 HISTORY + +Initial version by Mike Lambert on 2002.05.27. + +=cut + +*/ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff --git a/src/gc/gc_malloc.c b/src/gc/gc_malloc.c new file mode 100644 index 0000000000..eaf47bfc17 --- /dev/null +++ b/src/gc/gc_malloc.c @@ -0,0 +1,188 @@ +/* +Copyright (C) 2001-2009, The Perl Foundation. +$Id$ + +=head1 NAME + +src/gc/gc_malloc.c - a malloc()/free()-based garbage collector. + +=head1 DESCRIPTION + +Handles garbage collection with malloc()/free(). Note that this doesn't +currently work; this file just collects all of the #GC_MALLOC functions in one +convenient place. + +=head2 Functions + +=over 4 + +=cut + +*/ + +#include "parrot/parrot.h" + +/* HEADERIZER HFILE: include/parrot/gc_api.h */ + +/* HEADERIZER BEGIN: static */ +/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ + +static void clear_cow(PARROT_INTERP, + ARGMOD(Small_Object_Pool *pool), + int cleanup) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*pool); + +static int sweep_cb(PARROT_INTERP, + ARGMOD(Small_Object_Pool *pool), + int flag, + ARGMOD(void *arg)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(4) + FUNC_MODIFIES(*pool) + FUNC_MODIFIES(*arg); + +static void used_cow(PARROT_INTERP, + ARGMOD(Small_Object_Pool *pool), + int cleanup) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*pool); + +/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ +/* HEADERIZER END: static */ + +#ifdef GC_IS_MALLOC + +/* + +=item C + +Sweeps the given pool for the MS collector. This function also ends +the profiling timer, if profiling is enabled. Returns the total number +of objects freed. + +=cut + +*/ + +static int +sweep_cb(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int flag, + ARGMOD(void *arg)) +{ + int * const total_free = (int *) arg; + + if (flag & POOL_BUFFER) + used_cow(interp, pool, 0); + + Parrot_gc_sweep(interp, pool); + + if (flag & POOL_BUFFER) + clear_cow(interp, pool, 0); + + if (interp->profile && (flag & POOL_PMC)) + Parrot_gc_profile_end(interp, PARROT_PROF_DOD_cp); + + *total_free += pool->num_free_objects; + + return 0; +} + + +/* + +=item C + +Clears the COW ref count. + +=cut + +*/ + +static void +clear_cow(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int cleanup) +{ + const UINTVAL object_size = pool->object_size; + Small_Object_Arena *cur_arena; + + /* clear refcount for COWable objects. */ + for (cur_arena = pool->last_Arena; + NULL != cur_arena; cur_arena = cur_arena->prev) { + UINTVAL i; + Buffer *b = cur_arena->start_objects; + + for (i = 0; i < cur_arena->used; i++) { + if (!PObj_on_free_list_TEST(b)) { + if (cleanup) { + /* clear COWed external FLAG */ + PObj_external_CLEAR(b); + + /* if cleanup (Parrot_destroy) constants are dead too */ + PObj_constant_CLEAR(b); + PObj_live_CLEAR(b); + } + + if (PObj_COW_TEST(b) && PObj_bufstart(b) && + !PObj_external_TEST(b)) { + INTVAL * const refcount = PObj_bufrefcountptr(b); + *refcount = 0; + } + } + + b = (Buffer *)((char *)b + object_size); + } + } +} + + +/* + +=item C + +Finds other users of COW's C. + +=cut + +*/ + +static void +used_cow(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int cleanup) +{ + const UINTVAL object_size = pool->object_size; + Small_Object_Arena *cur_arena; + + for (cur_arena = pool->last_Arena; + NULL != cur_arena; cur_arena = cur_arena->prev) { + const Buffer *b = cur_arena->start_objects; + UINTVAL i; + + for (i = 0; i < cur_arena->used; i++) { + if (!PObj_on_free_list_TEST(b) && + PObj_COW_TEST(b) && + PObj_bufstart(b) && + !PObj_external_TEST(b)) { + + INTVAL * const refcount = PObj_bufrefcountptr(b); + + /* mark users of this bufstart by incrementing refcount */ + if (PObj_live_TEST(b)) + *refcount = 1 << 29; /* ~infinite usage */ + else + (*refcount)++; /* dead usage */ + } + + b = (Buffer *)((char *)b + object_size); + } + } +} + +#endif /* GC_IS_MALLOC */ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff --git a/src/gc/gc_gms.c b/src/gc/generational_ms.c similarity index 99% rename from src/gc/gc_gms.c rename to src/gc/generational_ms.c index fb94605d6b..4ed9f72503 100644 --- a/src/gc/gc_gms.c +++ b/src/gc/generational_ms.c @@ -1,10 +1,10 @@ /* -Copyright (C) 2001-2007, The Perl Foundation. +Copyright (C) 2001-2009, The Perl Foundation. $Id$ =head1 NAME -src/gc/gc_gms.c - Generational mark and sweep garbage collection +src/gc/generational_ms.c - Generational mark and sweep garbage collection =head1 OVERVIEW @@ -111,7 +111,8 @@ A chained list of headers used e.g. for the IGP list. */ #include "parrot/parrot.h" -#include "parrot/dod.h" +#include "parrot/gc_api.h" +#include "parrot/gc_mark_sweep.h" #if PARROT_GC_GMS @@ -119,7 +120,7 @@ typedef struct Gc_gms_private { UINTVAL current_gen_no; /* the nursery generation number */ } Gc_gms_private; -/* HEADERIZER HFILE: include/parrot/dod.h */ +/* HEADERIZER HFILE: include/parrot/gc_api.h */ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ @@ -1350,7 +1351,7 @@ gc_gms_setto_gray(PARROT_INTERP, ARGIN(Gc_gms_hdr *h), int priority) ASSERT_ARGS(gc_gms_setto_gray) Small_Object_Pool * const pool = h->gen->pool; /* - * TODO high_priority like in src/dod.c + * TODO high_priority like in src/gc/api.c */ /* * if the white is adjacent to gray, move pointer @@ -1414,7 +1415,7 @@ gc_gms_setto_black(PARROT_INTERP, ARGMOD(Gc_gms_hdr *h), int priority) Small_Object_Pool * const pool = h->gen->pool; /* - * TODO high_priority like src/dod.c + * TODO high_priority like src/gc/api.c * TODO if h needs destructions insert in front of chain */ /* @@ -1574,7 +1575,7 @@ static int gc_gms_trace_root(PARROT_INTERP, int trace_stack) { ASSERT_ARGS(gc_gms_trace_root) - const int ret = Parrot_dod_trace_root(interp, trace_stack); + const int ret = Parrot_gc_trace_root(interp, trace_stack); if (ret == 0) return 0; @@ -1958,8 +1959,8 @@ gms_debug_verify(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), ARGIN(const cha =head1 SEE ALSO -F, F, F, -F +F, F, F, +F =head1 HISTORY diff --git a/src/gc/gc_ims.c b/src/gc/incremental_ms.c similarity index 96% rename from src/gc/gc_ims.c rename to src/gc/incremental_ms.c index ca71585dc9..927fc7c711 100644 --- a/src/gc/gc_ims.c +++ b/src/gc/incremental_ms.c @@ -1,10 +1,10 @@ /* -Copyright (C) 2001-2008, The Perl Foundation. +Copyright (C) 2001-2009, The Perl Foundation. $Id$ =head1 NAME -src/gc/gc_ims.c - Incremental mark and sweep garbage collection +src/gc/incremental_ms.c - Incremental mark and sweep garbage collection =head1 DESCRIPTION @@ -155,7 +155,7 @@ The graph of all objects found live during the last collection. The work area of the collector. During marking live objects are "moved" from the from-space into the to-space. This is the same as the text_for_GC -list used in src/dod.c. The to-space is initially empty. During marking +list used in src/gc/api.c. The to-space is initially empty. During marking it gets greyed and finally all reachable objects are black. =item free-list @@ -334,9 +334,10 @@ a sleep opcode. */ #include "parrot/parrot.h" -#include "parrot/dod.h" +#include "parrot/gc_api.h" +#include "parrot/gc_mark_sweep.h" -/* HEADERIZER HFILE: include/parrot/dod.h */ +/* HEADERIZER HFILE: include/parrot/gc_api.h */ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ @@ -700,13 +701,13 @@ parrot_gc_ims_reinit(PARROT_INTERP) Arenas * const arena_base = interp->arena_base; arena_base->lazy_dod = 0; - Parrot_dod_ms_run_init(interp); + Parrot_gc_ms_run_init(interp); /* * trace root set w/o system areas * TODO also skip volatile roots */ - Parrot_dod_trace_root(interp, 0); + Parrot_gc_trace_root(interp, GC_TRACE_ROOT_ONLY); g_ims = (Gc_ims_private *)arena_base->gc_private; g_ims->state = GC_IMS_MARKING; @@ -747,7 +748,7 @@ parrot_gc_ims_mark(PARROT_INTERP) todo = (size_t)(g_ims->alloc_trigger * g_ims->throttle * work_factor); PARROT_ASSERT(arena_base->lazy_dod == 0); - Parrot_dod_trace_children(interp, todo); + Parrot_gc_trace_children(interp, todo); /* check if we are finished with marking -- the end is self-referential */ next = arena_base->dod_mark_start; @@ -770,12 +771,13 @@ Callback to sweep a header pool (see Parrot_forall_header_pools). static int sweep_cb(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int flag, ARGIN(void *arg)) { + ASSERT_ARGS(sweep_cb) int * const n_obj = (int *)arg; - Parrot_dod_sweep(interp, pool); + Parrot_gc_sweep(interp, pool); if (interp->profile && (flag & POOL_PMC)) - Parrot_dod_profile_end(interp, PARROT_PROF_DOD_cp); + Parrot_gc_profile_end(interp, PARROT_PROF_DOD_cp); *n_obj += pool->total_objects - pool->num_free_objects; @@ -813,10 +815,11 @@ parrot_gc_ims_sweep(PARROT_INTERP) */ /* TODO mark volatile roots */ - Parrot_dod_trace_root(interp, g_ims->lazy ? 0 : (int)GC_trace_stack_FLAG); + Parrot_gc_trace_root(interp, g_ims->lazy ? GC_TRACE_ROOT_ONLY + : GC_TRACE_FULL); /* mark (again) rest of children */ - Parrot_dod_trace_children(interp, (size_t) -1); + Parrot_gc_trace_children(interp, (size_t) -1); /* now sweep all */ n_objects = 0; @@ -825,7 +828,7 @@ parrot_gc_ims_sweep(PARROT_INTERP) UNUSED(ignored); if (interp->profile) - Parrot_dod_profile_end(interp, PARROT_PROF_DOD_cb); + Parrot_gc_profile_end(interp, PARROT_PROF_DOD_cb); g_ims->state = GC_IMS_COLLECT; g_ims->n_objects = n_objects; @@ -906,7 +909,7 @@ parrot_gc_ims_collect(PARROT_INTERP, int check_only) int ret; if (!check_only && interp->profile) - Parrot_dod_profile_start(interp); + Parrot_gc_profile_start(interp); g_ims = (Gc_ims_private *)arena_base->gc_private; @@ -920,7 +923,7 @@ parrot_gc_ims_collect(PARROT_INTERP, int check_only) return 0; if (interp->profile) - Parrot_dod_profile_end(interp, PARROT_PROF_GC); + Parrot_gc_profile_end(interp, PARROT_PROF_GC); g_ims->state = GC_IMS_FINISHED; #endif @@ -1039,9 +1042,9 @@ parrot_gc_ims_run(PARROT_INTERP, UINTVAL flags) * Be sure live bits are clear. */ if (g_ims->state >= GC_IMS_RE_INIT || g_ims->state < GC_IMS_FINISHED) - Parrot_dod_clear_live_bits(interp); + Parrot_gc_clear_live_bits(interp); - Parrot_dod_sweep(interp, interp->arena_base->pmc_pool); + Parrot_gc_sweep(interp, interp->arena_base->pmc_pool); g_ims->state = GC_IMS_DEAD; return; @@ -1111,7 +1114,7 @@ parrot_gc_ims_run(PARROT_INTERP, UINTVAL flags) /* -=item C +=item C Write barrier called by the GC_WRITE_BARRIER macro. Always when storing a white object into a black aggregate, either the object must @@ -1124,9 +1127,9 @@ be greyed or the aggregate must be rescanned -- so grey it. #define DOD_IMS_GREY_NEW 1 void -Parrot_dod_ims_wb(PARROT_INTERP, ARGMOD(PMC *agg), ARGMOD(PMC *_new)) +Parrot_gc_ims_wb(PARROT_INTERP, ARGMOD(PMC *agg), ARGMOD(PMC *_new)) { - ASSERT_ARGS(Parrot_dod_ims_wb) + ASSERT_ARGS(Parrot_gc_ims_wb) #if DOD_IMS_GREY_NEW IMS_DEBUG((stderr, "%d agg %p mark %p\n", ((Gc_ims_private *)interp->arena_base-> @@ -1144,7 +1147,7 @@ Parrot_dod_ims_wb(PARROT_INTERP, ARGMOD(PMC *agg), ARGMOD(PMC *_new)) =head1 SEE ALSO -F, F, F, +F, F, F, =head1 HISTORY diff --git a/src/gc/dod.c b/src/gc/mark_sweep.c similarity index 50% rename from src/gc/dod.c rename to src/gc/mark_sweep.c index f07cbd80de..20b8719bd0 100644 --- a/src/gc/dod.c +++ b/src/gc/mark_sweep.c @@ -1,24 +1,17 @@ /* -Copyright (C) 2001-2008, The Perl Foundation. +Copyright (C) 2001-2009, The Perl Foundation. $Id$ =head1 NAME -src/gc/dod.c - Dead object destruction of the various headers +src/gc/mark_sweep.c - Small Object Pools and general mark/sweep GC behavior =head1 DESCRIPTION -This file implements I. This is documented in -PDD 9 with supplementary notes in F and -F. +Handles the accessing of small object pools (header pools). All of the +mark/sweep garbage collectors use this code. -It's possible to turn on/off the checking of the system stack and -processor registers. The actual checking is set up in F -and is performed in the function C here. - -There's also a verbose mode for garbage collection. - -=head1 FUNCTIONS +=head2 Functions =over 4 @@ -26,11 +19,10 @@ There's also a verbose mode for garbage collection. */ -#define DOD_C_SOURCE #include "parrot/parrot.h" -#include "parrot/dod.h" +#include "parrot/gc_mark_sweep.h" -/* HEADERIZER HFILE: include/parrot/dod.h */ +/* HEADERIZER HFILE: include/parrot/gc_mark_sweep.h */ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ @@ -38,14 +30,56 @@ There's also a verbose mode for garbage collection. static void clear_live_bits(ARGIN(const Small_Object_Pool *pool)) __attribute__nonnull__(1); -PARROT_CONST_FUNCTION -static size_t find_common_mask(PARROT_INTERP, size_t val1, size_t val2) - __attribute__nonnull__(1); +static void gc_ms_add_free_object(SHIM_INTERP, + ARGMOD(Small_Object_Pool *pool), + ARGIN(void *to_add)) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*pool); + +static void gc_ms_add_free_pmc_ext(SHIM_INTERP, + ARGMOD(Small_Object_Pool *pool), + ARGIN(void *to_add)) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*pool); + +static void gc_ms_alloc_objects(PARROT_INTERP, + ARGMOD(Small_Object_Pool *pool)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*pool); + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +static void * gc_ms_get_free_object(PARROT_INTERP, + ARGMOD(Small_Object_Pool *pool)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*pool); + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +static void * gc_ms_get_free_pmc_ext(PARROT_INTERP, + ARGMOD(Small_Object_Pool *pool)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*pool); + +static void gc_ms_pool_init(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool)) + __attribute__nonnull__(2) + FUNC_MODIFIES(*pool); static void mark_special(PARROT_INTERP, ARGIN(PMC *obj)) __attribute__nonnull__(1) __attribute__nonnull__(2); +static void more_traceable_objects(PARROT_INTERP, + ARGMOD(Small_Object_Pool *pool)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*pool); + static int sweep_cb(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int flag, @@ -56,16 +90,34 @@ static int sweep_cb(PARROT_INTERP, FUNC_MODIFIES(*pool) FUNC_MODIFIES(*arg); -static int trace_active_PMCs(PARROT_INTERP, int trace_stack) +static int trace_active_PMCs(PARROT_INTERP, Parrot_gc_trace_type trace) __attribute__nonnull__(1); #define ASSERT_ARGS_clear_live_bits __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(pool) -#define ASSERT_ARGS_find_common_mask __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) +#define ASSERT_ARGS_gc_ms_add_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(pool) \ + || PARROT_ASSERT_ARG(to_add) +#define ASSERT_ARGS_gc_ms_add_free_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(pool) \ + || PARROT_ASSERT_ARG(to_add) +#define ASSERT_ARGS_gc_ms_alloc_objects __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) \ + || PARROT_ASSERT_ARG(pool) +#define ASSERT_ARGS_gc_ms_get_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) \ + || PARROT_ASSERT_ARG(pool) +#define ASSERT_ARGS_gc_ms_get_free_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) \ + || PARROT_ASSERT_ARG(pool) +#define ASSERT_ARGS_gc_ms_pool_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(pool) #define ASSERT_ARGS_mark_special __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(obj) +#define ASSERT_ARGS_more_traceable_objects __attribute__unused__ int _ASSERT_ARGS_CHECK = \ + PARROT_ASSERT_ARG(interp) \ + || PARROT_ASSERT_ARG(pool) #define ASSERT_ARGS_sweep_cb __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(pool) \ @@ -76,193 +128,153 @@ static int trace_active_PMCs(PARROT_INTERP, int trace_stack) /* HEADERIZER END: static */ -/* Set this to 1 to see if unanchored objects are found in system areas. - * Please note: these objects might be bogus - */ -#define GC_VERBOSE 0 +#define GC_DEBUG_REPLENISH_LEVEL_FACTOR 0.0 +#define GC_DEBUG_UNITS_PER_ALLOC_GROWTH_FACTOR 1 +#define REPLENISH_LEVEL_FACTOR 0.3 -#if ! DISABLE_GC_DEBUG -/* Set when walking the system stack */ -int CONSERVATIVE_POINTER_CHASING = 0; -#endif +/* this factor is totally arbitrary, but gives good timings for stress.pasm */ +#define UNITS_PER_ALLOC_GROWTH_FACTOR 1.75 + +#define POOL_MAX_BYTES 65536 * 128 /* -=item C +=item C -Marks the children of a special PMC. Handles the marking necessary -for shared PMCs, and ensures timely marking of high-priority PMCs. -Ensures PMC_EXT structures are properly organized for garbage -collection. +Runs the stop-the-world mark & sweep (MS) collector. =cut */ -static void -mark_special(PARROT_INTERP, ARGIN(PMC *obj)) +void +Parrot_gc_ms_run(PARROT_INTERP, UINTVAL flags) { - ASSERT_ARGS(mark_special) - int hi_prio; - Arenas *arena_base; - - /* - * If the object is shared, we have to use the arena and dod - * pointers of the originating interpreter. - * - * We are possibly changing another interpreter's data here, so - * the mark phase of DOD must run only on one interpreter of a pool - * at a time. However, freeing unused objects can occur in parallel. - * And: to be sure that a shared object is dead, we have to finish - * the mark phase of all interpreters in a pool that might reference - * the object. - */ - if (PObj_is_PMC_shared_TEST(obj)) { - interp = PMC_sync(obj)->owner; - PARROT_ASSERT(interp); - /* XXX FIXME hack */ - if (!interp->arena_base->dod_mark_ptr) - interp->arena_base->dod_mark_ptr = obj; - } - - arena_base = interp->arena_base; - - if (PObj_needs_early_DOD_TEST(obj)) - ++arena_base->num_early_PMCs_seen; + ASSERT_ARGS(Parrot_gc_ms_run) + Arenas * const arena_base = interp->arena_base; - if (PObj_high_priority_DOD_TEST(obj) && arena_base->dod_trace_ptr) { - /* set obj's parent to high priority */ - PObj_high_priority_DOD_SET(arena_base->dod_trace_ptr); - hi_prio = 1; - } - else - hi_prio = 0; + /* XXX these should go into the interpreter */ + int total_free = 0; - if (obj->pmc_ext) { - PMC * const tptr = arena_base->dod_trace_ptr; + if (arena_base->DOD_block_level) + return; - ++arena_base->num_extended_PMCs; + if (interp->debugger) { /* - * XXX this basically invalidates the high-priority marking - * of PMCs by putting all PMCs onto the front of the list. - * The reason for this is the by far better cache locality - * when aggregates and their contents are marked "together". - * - * To enable high priority marking again we should probably - * use a second pointer chain, which is, when not empty, - * processed first. + * if the other interpreter did a DOD run, it can set + * live bits of shared objects, but these aren't reset, because + * they are in a different arena. When now such a PMC points to + * other non-shared object, these wouldn't be marked and hence + * collected. */ - if (hi_prio && tptr) { - if (PMC_next_for_GC(tptr) == tptr) { - PMC_next_for_GC(obj) = obj; - } - else { - /* put it at the head of the list */ - PMC_next_for_GC(obj) = PMC_next_for_GC(tptr); - } + Parrot_gc_clear_live_bits(interp); + } - PMC_next_for_GC(tptr) = (PMC*)obj; - } - else { - /* put it on the end of the list */ - PMC_next_for_GC(arena_base->dod_mark_ptr) = obj; + /* + * the sync sweep is always at the end, so that + * the live bits are cleared + */ + if (flags & GC_finish_FLAG) { + clear_live_bits(interp->arena_base->pmc_pool); + clear_live_bits(interp->arena_base->constant_pmc_pool); - /* Explicitly make the tail of the linked list be - * self-referential */ - arena_base->dod_mark_ptr = PMC_next_for_GC(obj) = obj; + /* keep the scheduler and its kids alive for Task-like PMCs to destroy + * themselves; run a sweep to collect them */ + if (interp->scheduler) { + pobject_lives(interp, (PObj *)interp->scheduler); + VTABLE_mark(interp, interp->scheduler); + Parrot_gc_sweep(interp, interp->arena_base->pmc_pool); } - } - else if (PObj_custom_mark_TEST(obj)) { - PObj_get_FLAGS(obj) |= PObj_custom_GC_FLAG; - VTABLE_mark(interp, obj); - } -} -/* + /* now sweep everything that's left */ + Parrot_gc_sweep(interp, interp->arena_base->pmc_pool); + Parrot_gc_sweep(interp, interp->arena_base->constant_pmc_pool); -=item C + return; + } -Marks the PObj as "alive" for the Garbage Collector. Takes a pointer to a -PObj, and performs necessary marking to ensure the PMC and it's direct -children nodes are marked alive. Implementation is generally dependant on -the particular garbage collector in use. + ++arena_base->DOD_block_level; + arena_base->lazy_dod = flags & GC_lazy_FLAG; -=cut + /* tell the threading system that we're doing DOD mark */ + pt_DOD_start_mark(interp); + Parrot_gc_ms_run_init(interp); -*/ + /* compact STRING pools to collect free headers and allocated buffers */ + Parrot_go_collect(interp); -PARROT_EXPORT -void -pobject_lives(PARROT_INTERP, ARGMOD(PObj *obj)) -{ - ASSERT_ARGS(pobject_lives) -#if PARROT_GC_GMS - do { - if (!PObj_live_TEST(obj) && \ - PObj_to_GMSH(obj)->gen->gen_no >= interp->gc_generation) \ - parrot_gc_gms_pobject_lives(interp, obj); \ - } while (0); -#else /* not PARROT_GC_GMS */ + /* Now go trace the PMCs */ + if (trace_active_PMCs(interp, (flags & GC_trace_stack_FLAG) + ? GC_TRACE_FULL + : GC_TRACE_ROOT_ONLY)) { + int ignored; - /* if object is live or on free list return */ - if (PObj_is_live_or_free_TESTALL(obj)) - return; + arena_base->dod_trace_ptr = NULL; + arena_base->dod_mark_ptr = NULL; -# if ! DISABLE_GC_DEBUG -# if GC_VERBOSE - if (CONSERVATIVE_POINTER_CHASING) - fprintf(stderr, "GC Warning! Unanchored %s %p found in system areas \n", - PObj_is_PMC_TEST(obj) ? "PMC" : "Buffer", obj); + /* mark is now finished */ + pt_DOD_stop_mark(interp); -# endif -# endif - /* mark it live */ - PObj_live_SET(obj); + /* Now put unused PMCs and Buffers on the free list */ + ignored = Parrot_forall_header_pools(interp, POOL_BUFFER | POOL_PMC, + (void*)&total_free, sweep_cb); + UNUSED(ignored); - /* if object is a PMC and contains buffers or PMCs, then attach the PMC - * to the chained mark list. */ - if (PObj_is_PMC_TEST(obj)) { - PMC * const p = (PMC *)obj; + if (interp->profile) + Parrot_gc_profile_end(interp, PARROT_PROF_DOD_cb); + } + else { + pt_DOD_stop_mark(interp); /* XXX */ - if (PObj_is_special_PMC_TEST(obj)) - mark_special(interp, p); + /* successful lazy DOD count */ + ++arena_base->lazy_dod_runs; -# ifndef NDEBUG - else if (p->pmc_ext && PMC_metadata(p)) - fprintf(stderr, "GC: error obj %p (%s) has properties\n", - (void *)p, (char*)p->vtable->whoami->strstart); -# endif + Parrot_gc_clear_live_bits(interp); + if (interp->profile) + Parrot_gc_profile_end(interp, PARROT_PROF_DOD_p2); } -# if GC_VERBOSE - /* buffer GC_DEBUG stuff */ - if (GC_DEBUG(interp) && PObj_report_TEST(obj)) - fprintf(stderr, "GC: buffer %p pointing to %p marked live\n", - obj, PObj_bufstart((Buffer *)obj)); -# endif -#endif /* PARROT_GC_GMS */ + + /* Note it */ + arena_base->dod_runs++; + --arena_base->DOD_block_level; + + return; } + /* -=item C +=item C Traces the root set. Returns 0 if it's a lazy DOD run and all objects that need timely destruction were found. C can have these values: - 0 ... trace normal roots, no system areas - 1 ... trace whole root set - 2 ... trace system areas only +=over 4 + +=item * GC_TRACE_FULL + +trace whole root set, including system areas + +=item * GC_TRACE_ROOT_ONLY + +trace normal roots, no system areas + +=item * GC_TRACE_SYSTEM_ONLY + +trace system areas only + +=back =cut */ int -Parrot_dod_trace_root(PARROT_INTERP, int trace_stack) +Parrot_gc_trace_root(PARROT_INTERP, Parrot_gc_trace_type trace) { - ASSERT_ARGS(Parrot_dod_trace_root) + ASSERT_ARGS(Parrot_gc_trace_root) Arenas * const arena_base = interp->arena_base; Parrot_Context *ctx; PObj *obj; @@ -270,13 +282,13 @@ Parrot_dod_trace_root(PARROT_INTERP, int trace_stack) /* note: adding locals here did cause increased DOD runs */ mark_context_start(); - if (trace_stack == 2) { + if (trace == GC_TRACE_SYSTEM_ONLY) { trace_system_areas(interp); return 0; } if (interp->profile) - Parrot_dod_profile_start(interp); + Parrot_gc_profile_start(interp); /* We have to start somewhere; the interpreter globals is a good place */ if (!arena_base->dod_mark_start) { @@ -349,11 +361,11 @@ Parrot_dod_trace_root(PARROT_INTERP, int trace_stack) return 0; /* Find important stuff on the system stack */ - if (trace_stack) + if (trace == GC_TRACE_FULL) trace_system_areas(interp); if (interp->profile) - Parrot_dod_profile_end(interp, PARROT_PROF_DOD_p1); + Parrot_gc_profile_end(interp, PARROT_PROF_DOD_p1); return 1; } @@ -361,897 +373,1003 @@ Parrot_dod_trace_root(PARROT_INTERP, int trace_stack) /* -=item C +=item C -Performs a full trace run and marks all the PMCs as active if they -are. Returns whether the run completed, that is, whether it's safe -to proceed with GC. +Puts any buffers/PMCs that are now unused onto the pool's free list. If +C, bufstart gets freed too, if possible. Avoids buffers that +are immune from collection (i.e. constant). =cut */ -static int -trace_active_PMCs(PARROT_INTERP, int trace_stack) +void +Parrot_gc_sweep(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) { - ASSERT_ARGS(trace_active_PMCs) - if (!Parrot_dod_trace_root(interp, trace_stack)) - return 0; + ASSERT_ARGS(Parrot_gc_sweep) + UINTVAL total_used = 0; + const UINTVAL object_size = pool->object_size; - /* Okay, we've marked the whole root set, and should have a good-sized - * list of things to look at. Run through it */ - return Parrot_dod_trace_children(interp, (size_t) -1); -} + Small_Object_Arena *cur_arena; + dod_object_fn_type dod_object = pool->dod_object; -/* +#if GC_VERBOSE + if (Interp_trace_TEST(interp, 1)) { + Interp * const tracer = interp->debugger; + PMC *pio = Parrot_io_STDERR(interp); -=item C + Parrot_io_flush(interp, pio); -Returns whether the tracing process has completed. + if (tracer) { + pio = Parrot_io_STDERR(tracer); + Parrot_io_flush(tracer, pio); + } + } +#endif -=cut + /* Run through all the buffer header pools and mark */ + for (cur_arena = pool->last_Arena; cur_arena; cur_arena = cur_arena->prev) { + Buffer *b = (Buffer *)cur_arena->start_objects; + UINTVAL i; -*/ + /* loop only while there are objects in the arena */ + for (i = cur_arena->total_objects; i; i--) { -int -Parrot_dod_trace_children(PARROT_INTERP, size_t how_many) -{ - ASSERT_ARGS(Parrot_dod_trace_children) - Arenas * const arena_base = interp->arena_base; - const int lazy_dod = arena_base->lazy_dod; - PMC *current = arena_base->dod_mark_start; + if (PObj_on_free_list_TEST(b)) + ; /* if it's on free list, do nothing */ + else if (PObj_live_TEST(b)) { + total_used++; + PObj_live_CLEAR(b); + PObj_get_FLAGS(b) &= ~PObj_custom_GC_FLAG; + } + else { + /* it must be dead */ - const UINTVAL mask = PObj_data_is_PMC_array_FLAG | PObj_custom_mark_FLAG; +#if GC_VERBOSE + if (Interp_trace_TEST(interp, 1)) { + fprintf(stderr, "Freeing pobject %p\n", b); + if (PObj_is_PMC_TEST(b)) { + fprintf(stderr, "\t = PMC type %s\n", + (char*) ((PMC*)b)->vtable->whoami->strstart); + } + } +#endif - /* - * First phase of mark is finished. Now if we are the owner - * of a shared pool, we must run the mark phase of other - * interpreters in our pool, so that live shared PMCs in that - * interpreter are appended to our mark_ptrs chain. - * - * If there is a count of shared PMCs and we have already seen - * all these, we could skip that. - */ - if (interp->profile) - Parrot_dod_profile_start(interp); + if (PObj_is_shared_TEST(b)) { + /* only mess with shared objects if we + * (and thus everyone) is suspended for + * a GC run. + * XXX wrong thing to do with "other" GCs + */ + if (!(interp->thread_data && + (interp->thread_data->state & + THREAD_STATE_SUSPENDED_GC))) { + ++total_used; + goto next; + } + } - pt_DOD_mark_root_finished(interp); + dod_object(interp, pool, b); + pool->add_free_object(interp, pool, b); + } +next: + b = (Buffer *)((char *)b + object_size); + } + } + + pool->num_free_objects = pool->total_objects - total_used; +} + + + +/* + +=item C + +Marks the PObj as "alive" for the Garbage Collector. Takes a pointer to a PObj, +and performs necessary marking to ensure the PMC and its direct children nodes +are marked alive. Implementation is generally dependant on the particular +garbage collector in use. + +=cut + +*/ + +PARROT_EXPORT +void +pobject_lives(PARROT_INTERP, ARGMOD(PObj *obj)) +{ + ASSERT_ARGS(pobject_lives) +#if PARROT_GC_GMS do { - const UINTVAL bits = PObj_get_FLAGS(current) & mask; - PMC *next; + if (!PObj_live_TEST(obj) && \ + PObj_to_GMSH(obj)->gen->gen_no >= interp->gc_generation) \ + parrot_gc_gms_pobject_lives(interp, obj); \ + } while (0); +#else /* not PARROT_GC_GMS */ - if (lazy_dod && arena_base->num_early_PMCs_seen >= - arena_base->num_early_DOD_PMCs) { - return 0; - } + /* if object is live or on free list return */ + if (PObj_is_live_or_free_TESTALL(obj)) + return; - arena_base->dod_trace_ptr = current; +# if ! DISABLE_GC_DEBUG +# if GC_VERBOSE + if (CONSERVATIVE_POINTER_CHASING) + fprintf(stderr, "GC Warning! Unanchored %s %p found in system areas \n", + PObj_is_PMC_TEST(obj) ? "PMC" : "Buffer", obj); - /* short-term hack to color objects black */ - PObj_get_FLAGS(current) |= PObj_custom_GC_FLAG; +# endif +# endif + /* mark it live */ + PObj_live_SET(obj); - /* clearing the flag is much more expensive then testing */ - if (!PObj_needs_early_DOD_TEST(current)) - PObj_high_priority_DOD_CLEAR(current); + /* if object is a PMC and contains buffers or PMCs, then attach the PMC + * to the chained mark list. */ + if (PObj_is_PMC_TEST(obj)) { + PMC * const p = (PMC *)obj; - /* mark properties */ - if (PMC_metadata(current)) - pobject_lives(interp, (PObj *)PMC_metadata(current)); + if (PObj_is_special_PMC_TEST(obj)) + mark_special(interp, p); - /* Start by checking if there's anything at all. This assumes that the - * largest percentage of PMCs won't have anything in their data - * pointer that we need to trace. */ - if (bits) { - if (bits == PObj_data_is_PMC_array_FLAG) - Parrot_dod_trace_pmc_data(interp, current); - else { - /* All that's left is the custom */ - PARROT_ASSERT(!PObj_on_free_list_TEST(current)); - VTABLE_mark(interp, current); - } - } +# ifndef NDEBUG + else if (p->pmc_ext && PMC_metadata(p)) + fprintf(stderr, "GC: error obj %p (%s) has properties\n", + (void *)p, (char*)p->vtable->whoami->strstart); +# endif + } +# if GC_VERBOSE + /* buffer GC_DEBUG stuff */ + if (GC_DEBUG(interp) && PObj_report_TEST(obj)) + fprintf(stderr, "GC: buffer %p pointing to %p marked live\n", + obj, PObj_bufstart((Buffer *)obj)); +# endif +#endif /* PARROT_GC_GMS */ +} +/* - next = PMC_next_for_GC(current); +=item C - if (!PMC_IS_NULL(next) && next == current) - break; +Returns whether the given C<*ptr> points to a location in C. - current = next; - } while (--how_many > 0); +=cut - arena_base->dod_mark_start = current; - arena_base->dod_trace_ptr = NULL; +*/ - if (interp->profile) - Parrot_dod_profile_end(interp, PARROT_PROF_DOD_p2); +PARROT_WARN_UNUSED_RESULT +INTVAL +contained_in_pool(ARGIN(const Small_Object_Pool *pool), ARGIN(const void *ptr)) +{ + ASSERT_ARGS(contained_in_pool) + const Small_Object_Arena *arena; - return 1; + ptr = PObj_to_ARENA(ptr); + + for (arena = pool->last_Arena; arena; arena = arena->prev) { + const ptrdiff_t ptr_diff = + (ptrdiff_t)ptr - (ptrdiff_t)arena->start_objects; + + if (0 <= ptr_diff + && ptr_diff < (ptrdiff_t)(arena->used * pool->object_size) + && ptr_diff % pool->object_size == 0) + return 1; + } + + return 0; } /* -=item C +=item C -If the PMC is an array of PMCs, trace all elements in the array as children. -Touches each object in the array to mark it as being alive. To determine -whether a PMC is an array to be marked in this way, it is tested for the -C flag. +Returns whether C<*pmc> is a constant PMC. The given pointer is a constant +PMC if it points into the constant PMC pool. =cut */ -void -Parrot_dod_trace_pmc_data(PARROT_INTERP, ARGIN(PMC *p)) +int +Parrot_is_const_pmc(PARROT_INTERP, ARGIN(const PMC *pmc)) { - ASSERT_ARGS(Parrot_dod_trace_pmc_data) - /* malloced array of PMCs */ - PMC ** const data = PMC_data_typed(p, PMC **); + ASSERT_ARGS(Parrot_is_const_pmc) + Small_Object_Pool * const pool = interp->arena_base->constant_pmc_pool; + const int c = contained_in_pool(pool, pmc); - if (data) { - INTVAL i; + /* some paranoia first. */ + /* I wonder if it would save any machine cycles to write + !(PObj_constant_TEST(pmc) ^ c) + instead. */ + PARROT_ASSERT(!!PObj_constant_TEST(pmc) == !!c); - for (i = PMC_int_val(p) - 1; i >= 0; --i) - if (data[i]) - pobject_lives(interp, (PObj *)data[i]); - } + return c; } -#ifdef GC_IS_MALLOC /* -=item C +=item C -Clears the COW ref count. +Marks the children of a special PMC. Handles the marking necessary +for shared PMCs, and ensures timely marking of high-priority PMCs. +Ensures PMC_EXT structures are properly organized for garbage +collection. =cut */ -void -clear_cow(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int cleanup) +static void +mark_special(PARROT_INTERP, ARGIN(PMC *obj)) { - ASSERT_ARGS(clear_cow) - const UINTVAL object_size = pool->object_size; - Small_Object_Arena *cur_arena; + ASSERT_ARGS(mark_special) + int hi_prio; + Arenas *arena_base; - /* clear refcount for COWable objects. */ - for (cur_arena = pool->last_Arena; - NULL != cur_arena; cur_arena = cur_arena->prev) { - UINTVAL i; - Buffer *b = cur_arena->start_objects; + /* + * If the object is shared, we have to use the arena and dod + * pointers of the originating interpreter. + * + * We are possibly changing another interpreter's data here, so + * the mark phase of DOD must run only on one interpreter of a pool + * at a time. However, freeing unused objects can occur in parallel. + * And: to be sure that a shared object is dead, we have to finish + * the mark phase of all interpreters in a pool that might reference + * the object. + */ + if (PObj_is_PMC_shared_TEST(obj)) { + interp = PMC_sync(obj)->owner; + PARROT_ASSERT(interp); + /* XXX FIXME hack */ + if (!interp->arena_base->dod_mark_ptr) + interp->arena_base->dod_mark_ptr = obj; + } - for (i = 0; i < cur_arena->used; i++) { - if (!PObj_on_free_list_TEST(b)) { - if (cleanup) { - /* clear COWed external FLAG */ - PObj_external_CLEAR(b); + arena_base = interp->arena_base; - /* if cleanup (Parrot_destroy) constants are dead too */ - PObj_constant_CLEAR(b); - PObj_live_CLEAR(b); - } + if (PObj_needs_early_DOD_TEST(obj)) + ++arena_base->num_early_PMCs_seen; - if (PObj_COW_TEST(b) && PObj_bufstart(b) && - !PObj_external_TEST(b)) { - INTVAL * const refcount = PObj_bufrefcountptr(b); - *refcount = 0; - } + if (PObj_high_priority_DOD_TEST(obj) && arena_base->dod_trace_ptr) { + /* set obj's parent to high priority */ + PObj_high_priority_DOD_SET(arena_base->dod_trace_ptr); + hi_prio = 1; + } + else + hi_prio = 0; + + if (obj->pmc_ext) { + PMC * const tptr = arena_base->dod_trace_ptr; + + ++arena_base->num_extended_PMCs; + /* + * XXX this basically invalidates the high-priority marking + * of PMCs by putting all PMCs onto the front of the list. + * The reason for this is the by far better cache locality + * when aggregates and their contents are marked "together". + * + * To enable high priority marking again we should probably + * use a second pointer chain, which is, when not empty, + * processed first. + */ + if (hi_prio && tptr) { + if (PMC_next_for_GC(tptr) == tptr) { + PMC_next_for_GC(obj) = obj; + } + else { + /* put it at the head of the list */ + PMC_next_for_GC(obj) = PMC_next_for_GC(tptr); } - b = (Buffer *)((char *)b + object_size); + PMC_next_for_GC(tptr) = (PMC*)obj; + } + else { + /* put it on the end of the list */ + PMC_next_for_GC(arena_base->dod_mark_ptr) = obj; + + /* Explicitly make the tail of the linked list be + * self-referential */ + arena_base->dod_mark_ptr = PMC_next_for_GC(obj) = obj; } } + else if (PObj_custom_mark_TEST(obj)) { + PObj_get_FLAGS(obj) |= PObj_custom_GC_FLAG; + VTABLE_mark(interp, obj); + } } + /* -=item C +=item C -Finds other users of COW's C. +We're out of traceable objects. First we try a DOD run to free some up. If +that doesn't work, allocate a new arena. =cut */ -void -used_cow(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int cleanup) +static void +more_traceable_objects(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) { - ASSERT_ARGS(used_cow) - const UINTVAL object_size = pool->object_size; - Small_Object_Arena *cur_arena; + ASSERT_ARGS(more_traceable_objects) + if (pool->skip) + pool->skip = 0; + else { + Small_Object_Arena * const arena = pool->last_Arena; + if (arena) { + if (arena->used == arena->total_objects) + Parrot_do_dod_run(interp, GC_trace_stack_FLAG); - for (cur_arena = pool->last_Arena; - NULL != cur_arena; cur_arena = cur_arena->prev) { - const Buffer *b = cur_arena->start_objects; - UINTVAL i; + if (pool->num_free_objects <= pool->replenish_level) + pool->skip = 1; + } + } - for (i = 0; i < cur_arena->used; i++) { - if (!PObj_on_free_list_TEST(b) && - PObj_COW_TEST(b) && - PObj_bufstart(b) && - !PObj_external_TEST(b)) { + /* requires that num_free_objects be updated in Parrot_do_dod_run. If dod + * is disabled, then we must check the free list directly. */ + if (!pool->free_list) + (*pool->alloc_objects) (interp, pool); +} - INTVAL * const refcount = PObj_bufrefcountptr(b); +/* - /* mark users of this bufstart by incrementing refcount */ - if (PObj_live_TEST(b)) - *refcount = 1 << 29; /* ~infinite usage */ - else - (*refcount)++; /* dead usage */ - } +=item C - b = (Buffer *)((char *)b + object_size); - } - } +Add a freed PMC_EXT structure to the free list in the PMC_EXT pool. Objects +on the free list can be reused later. + +=cut + +*/ + +static void +gc_ms_add_free_pmc_ext(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool), ARGIN(void *to_add)) +{ + ASSERT_ARGS(gc_ms_add_free_pmc_ext) + PMC_EXT *object = (PMC_EXT *)to_add; + object->_metadata = NULL; + + /* yes, this cast is a hack for now, but a pointer is a pointer */ + object->_next_for_GC = (PMC *)pool->free_list; + pool->free_list = object; } -#endif /* GC_IS_MALLOC */ /* -=item C +=item C -Puts any buffers/PMCs that are now unused onto the pool's free list. If -C, bufstart gets freed too, if possible. Avoids buffers that -are immune from collection (i.e. constant). +Add an unused object back to the pool's free list for later reuse. Set +the PObj flags to indicate that the item is free. =cut */ -void -Parrot_dod_sweep(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) +static void +gc_ms_add_free_object(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool), ARGIN(void *to_add)) { - ASSERT_ARGS(Parrot_dod_sweep) - UINTVAL total_used = 0; - const UINTVAL object_size = pool->object_size; + ASSERT_ARGS(gc_ms_add_free_object) + PObj *object = (PObj *)to_add; - Small_Object_Arena *cur_arena; - dod_object_fn_type dod_object = pool->dod_object; + PObj_flags_SETTO(object, PObj_on_free_list_FLAG); -#if GC_VERBOSE - if (Interp_trace_TEST(interp, 1)) { - Interp * const tracer = interp->debugger; - PMC *pio = Parrot_io_STDERR(interp); + /* during GC buflen is used to check for objects on the free_list */ + PObj_buflen(object) = 0; + PMC_struct_val(object) = pool->free_list; + pool->free_list = object; +} - Parrot_io_flush(interp, pio); - if (tracer) { - pio = Parrot_io_STDERR(tracer); - Parrot_io_flush(tracer, pio); - } +/* + +=item C + +Free object allocator for the MS garbage collector system. If there are no +free objects, call C to either free them up with a +DOD run, or allocate new objects. If there are objects available on the +free list, pop it off and return it. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +static void * +gc_ms_get_free_object(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) +{ + ASSERT_ARGS(gc_ms_get_free_object) + PObj *ptr; + PObj *free_list = (PObj *)pool->free_list; + + /* if we don't have any objects */ + if (!free_list) { + (*pool->more_objects)(interp, pool); + free_list = (PObj *)pool->free_list; } -#endif - /* Run through all the buffer header pools and mark */ - for (cur_arena = pool->last_Arena; cur_arena; cur_arena = cur_arena->prev) { - Buffer *b = (Buffer *)cur_arena->start_objects; - UINTVAL i; + ptr = free_list; + pool->free_list = PMC_struct_val(ptr); - /* loop only while there are objects in the arena */ - for (i = cur_arena->total_objects; i; i--) { + PObj_flags_SETTO(ptr, 0); - if (PObj_on_free_list_TEST(b)) - ; /* if it's on free list, do nothing */ - else if (PObj_live_TEST(b)) { - total_used++; - PObj_live_CLEAR(b); - PObj_get_FLAGS(b) &= ~PObj_custom_GC_FLAG; - } - else { - /* it must be dead */ + --pool->num_free_objects; -#if GC_VERBOSE - if (Interp_trace_TEST(interp, 1)) { - fprintf(stderr, "Freeing pobject %p\n", b); - if (PObj_is_PMC_TEST(b)) { - fprintf(stderr, "\t = PMC type %s\n", - (char*) ((PMC*)b)->vtable->whoami->strstart); - } - } -#endif + return ptr; +} - if (PObj_is_shared_TEST(b)) { - /* only mess with shared objects if we - * (and thus everyone) is suspended for - * a GC run. - * XXX wrong thing to do with "other" GCs - */ - if (!(interp->thread_data && - (interp->thread_data->state & - THREAD_STATE_SUSPENDED_GC))) { - ++total_used; - goto next; - } - } - dod_object(interp, pool, b); +/* - pool->add_free_object(interp, pool, b); - } -next: - b = (Buffer *)((char *)b + object_size); - } +=item C + +Get a new PMC_EXT structure from the free pool and return it. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +static void * +gc_ms_get_free_pmc_ext(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) +{ + ASSERT_ARGS(gc_ms_get_free_pmc_ext) + PMC_EXT *ptr; + PMC_EXT *free_list = (PMC_EXT *)pool->free_list; + + /* if we don't have any objects */ + if (!free_list) { + (*pool->more_objects)(interp, pool); + free_list = (PMC_EXT *)pool->free_list; } - pool->num_free_objects = pool->total_objects - total_used; + ptr = free_list; + pool->free_list = ptr->_next_for_GC; + ptr->_next_for_GC = NULL; + + --pool->num_free_objects; + + return ptr; } + /* -=item C +=item C -Frees a PMC that is no longer being used. Calls a custom C -VTABLE method if one is available. If the PMC uses a PMC_EXT -structure, that is freed as well. +Sweeps the given pool for the MS collector. This function also ends +the profiling timer, if profiling is enabled. Returns the total number +of objects freed. =cut */ -void -Parrot_dod_free_pmc(PARROT_INTERP, SHIM(Small_Object_Pool *pool), - ARGMOD(PObj *p)) +static int +sweep_cb(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int flag, + ARGMOD(void *arg)) { - ASSERT_ARGS(Parrot_dod_free_pmc) - PMC * const pmc = (PMC *)p; - Arenas * const arena_base = interp->arena_base; + ASSERT_ARGS(sweep_cb) + int * const total_free = (int *) arg; - /* TODO collect objects with finalizers */ - if (PObj_needs_early_DOD_TEST(p)) - --arena_base->num_early_DOD_PMCs; + Parrot_gc_sweep(interp, pool); - if (PObj_active_destroy_TEST(p)) - VTABLE_destroy(interp, pmc); + if (interp->profile && (flag & POOL_PMC)) + Parrot_gc_profile_end(interp, PARROT_PROF_DOD_cp); - if (PObj_is_PMC_EXT_TEST(p)) - Parrot_free_pmc_ext(interp, pmc); + *total_free += pool->num_free_objects; -#ifndef NDEBUG + return 0; +} - pmc->pmc_ext = (PMC_EXT *)0xdeadbeef; - pmc->vtable = (VTABLE *)0xdeadbeef; - PMC_pmc_val(pmc) = (PMC *)0xdeadbeef; -#endif +/* + +=item C + +Performs a full trace run and marks all the PMCs as active if they +are. Returns whether the run completed, that is, whether it's safe +to proceed with GC. + +=cut + +*/ + +static int +trace_active_PMCs(PARROT_INTERP, Parrot_gc_trace_type trace) +{ + ASSERT_ARGS(trace_active_PMCs) + if (!Parrot_gc_trace_root(interp, trace)) + return 0; + + /* Okay, we've marked the whole root set, and should have a good-sized + * list of things to look at. Run through it */ + return Parrot_gc_trace_children(interp, (size_t) -1); +} + + +/* + +=item C + +Runs through all PMC arenas and clear live bits. This is used to reset +the GC system after a full system sweep. + +=cut + +*/ + +static void +clear_live_bits(ARGIN(const Small_Object_Pool *pool)) +{ + ASSERT_ARGS(clear_live_bits) + Small_Object_Arena *arena; + const UINTVAL object_size = pool->object_size; + + for (arena = pool->last_Arena; arena; arena = arena->prev) { + Buffer *b = (Buffer *)arena->start_objects; + UINTVAL i; + + for (i = 0; i < arena->used; i++) { + PObj_live_CLEAR(b); + b = (Buffer *)((char *)b + object_size); + } + } } + /* -=item C +=item C -Frees the C structure attached to a PMC, if it exists. +Resets the PMC pool, so all objects are marked as "White". This +is done after a GC run to reset the system and prepare for the +next mark phase. =cut */ void -Parrot_free_pmc_ext(PARROT_INTERP, ARGMOD(PMC *p)) +Parrot_gc_clear_live_bits(PARROT_INTERP) { - ASSERT_ARGS(Parrot_free_pmc_ext) - /* if the PMC has a PMC_EXT structure, return it to the pool/arena */ - Arenas * const arena_base = interp->arena_base; - Small_Object_Pool * const ext_pool = arena_base->pmc_ext_pool; - - if (PObj_is_PMC_shared_TEST(p) && PMC_sync(p)) { - MUTEX_DESTROY(PMC_sync(p)->pmc_lock); - mem_internal_free(PMC_sync(p)); - PMC_sync(p) = NULL; - } - - if (p->pmc_ext) - ext_pool->add_free_object(interp, ext_pool, p->pmc_ext); - - ext_pool->num_free_objects++; - - p->pmc_ext = NULL; + ASSERT_ARGS(Parrot_gc_clear_live_bits) + Small_Object_Pool * const pool = interp->arena_base->pmc_pool; + clear_live_bits(pool); } + /* -=item C +=item C -If the PMC uses memory allocated directly from the system, this function -frees that memory. +Returns whether the tracing process has completed. =cut */ -void -Parrot_dod_free_sysmem(SHIM_INTERP, SHIM(Small_Object_Pool *pool), - ARGMOD(PObj *b)) +int +Parrot_gc_trace_children(PARROT_INTERP, size_t how_many) { - ASSERT_ARGS(Parrot_dod_free_sysmem) - /* has sysmem allocated, e.g. string_pin */ - if (PObj_sysmem_TEST(b) && PObj_bufstart(b)) - mem_sys_free(PObj_bufstart(b)); + ASSERT_ARGS(Parrot_gc_trace_children) + Arenas * const arena_base = interp->arena_base; + const int lazy_dod = arena_base->lazy_dod; + PMC *current = arena_base->dod_mark_start; - PObj_bufstart(b) = NULL; - PObj_buflen(b) = 0; -} + const UINTVAL mask = PObj_data_is_PMC_array_FLAG | PObj_custom_mark_FLAG; -/* + /* + * First phase of mark is finished. Now if we are the owner + * of a shared pool, we must run the mark phase of other + * interpreters in our pool, so that live shared PMCs in that + * interpreter are appended to our mark_ptrs chain. + * + * If there is a count of shared PMCs and we have already seen + * all these, we could skip that. + */ + if (interp->profile) + Parrot_gc_profile_start(interp); -=item C + pt_DOD_mark_root_finished(interp); -Frees the given buffer, returning the storage space to the operating system -and removing it from Parrot's memory management system. If the buffer is COW, -The buffer is not freed if the reference count is greater then 1. + do { + const UINTVAL bits = PObj_get_FLAGS(current) & mask; + PMC *next; -=cut + if (lazy_dod && arena_base->num_early_PMCs_seen >= + arena_base->num_early_DOD_PMCs) { + return 0; + } -*/ + arena_base->dod_trace_ptr = current; -void -Parrot_dod_free_buffer_malloc(SHIM_INTERP, SHIM(Small_Object_Pool *pool), - ARGMOD(PObj *b)) -{ - ASSERT_ARGS(Parrot_dod_free_buffer_malloc) - /* free allocated space at (int *)bufstart - 1, but not if it used COW or is - * external */ - PObj_buflen(b) = 0; + /* short-term hack to color objects black */ + PObj_get_FLAGS(current) |= PObj_custom_GC_FLAG; - if (!PObj_bufstart(b) || PObj_is_external_or_free_TESTALL(b)) - return; + /* clearing the flag is much more expensive then testing */ + if (!PObj_needs_early_DOD_TEST(current)) + PObj_high_priority_DOD_CLEAR(current); - if (PObj_COW_TEST(b)) { - INTVAL * const refcount = PObj_bufrefcountptr(b); + /* mark properties */ + if (PMC_metadata(current)) + pobject_lives(interp, (PObj *)PMC_metadata(current)); - if (--(*refcount) == 0) { - mem_sys_free(refcount); /* the actual bufstart */ + /* Start by checking if there's anything at all. This assumes that the + * largest percentage of PMCs won't have anything in their data + * pointer that we need to trace. */ + if (bits) { + if (bits == PObj_data_is_PMC_array_FLAG) + Parrot_gc_trace_pmc_data(interp, current); + else { + /* All that's left is the custom */ + PARROT_ASSERT(!PObj_on_free_list_TEST(current)); + VTABLE_mark(interp, current); + } } - } - else - mem_sys_free(PObj_bufrefcountptr(b)); + + next = PMC_next_for_GC(current); + + if (!PMC_IS_NULL(next) && next == current) + break; + + current = next; + } while (--how_many > 0); + + arena_base->dod_mark_start = current; + arena_base->dod_trace_ptr = NULL; + + if (interp->profile) + Parrot_gc_profile_end(interp, PARROT_PROF_DOD_p2); + + return 1; } + /* -=item C +=item C -Frees a buffer, returning it to the memory pool for Parrot to possibly -reuse later. +If the PMC is an array of PMCs, trace all elements in the array as children. +Touches each object in the array to mark it as being alive. To determine +whether a PMC is an array to be marked in this way, it is tested for the +C flag. =cut */ void -Parrot_dod_free_buffer(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool), ARGMOD(PObj *b)) +Parrot_gc_trace_pmc_data(PARROT_INTERP, ARGIN(PMC *p)) { - ASSERT_ARGS(Parrot_dod_free_buffer) - Memory_Pool * const mem_pool = (Memory_Pool *)pool->mem_pool; + ASSERT_ARGS(Parrot_gc_trace_pmc_data) + /* malloced array of PMCs */ + PMC ** const data = PMC_data_typed(p, PMC **); - /* XXX Jarkko reported that on irix pool->mem_pool was NULL, which really - * shouldn't happen */ - if (mem_pool) { - if (!PObj_COW_TEST(b)) - mem_pool->guaranteed_reclaimable += PObj_buflen(b); + if (data) { + INTVAL i; - mem_pool->possibly_reclaimable += PObj_buflen(b); + for (i = PMC_int_val(p) - 1; i >= 0; --i) + if (data[i]) + pobject_lives(interp, (PObj *)data[i]); } - - PObj_buflen(b) = 0; } -#ifndef PLATFORM_STACK_WALK /* -=item C +=item C -Finds a mask covering the longest common bit-prefix of C -and C. +Adds the objects in the newly allocated C to the free list. =cut */ -PARROT_CONST_FUNCTION -static size_t -find_common_mask(PARROT_INTERP, size_t val1, size_t val2) +void +Parrot_add_to_free_list(PARROT_INTERP, + ARGMOD(Small_Object_Pool *pool), + ARGMOD(Small_Object_Arena *arena)) { - ASSERT_ARGS(find_common_mask) - int i; - const int bound = sizeof (size_t) * 8; - - /* Shifting a value by its size (in bits) or larger is undefined behaviour. - So need an explicit check to return 0 if there is no prefix, rather than - attempting to rely on (say) 0xFFFFFFFF << 32 being 0. */ - for (i = 0; i < bound; i++) { - if (val1 == val2) - return ~(size_t)0 << i; - - val1 >>= 1; - val2 >>= 1; - } + ASSERT_ARGS(Parrot_add_to_free_list) + UINTVAL i; + void *object; + const UINTVAL num_objects = pool->objects_per_alloc; - if (val1 == val2) { - PARROT_ASSERT(i == bound); - return 0; + pool->total_objects += num_objects; + arena->used = num_objects; + + /* Move all the new objects into the free list */ + object = (void *)arena->start_objects; + + for (i = 0; i < num_objects; i++) { + pool->add_free_object(interp, pool, object); + object = (void *)((char *)object + pool->object_size); } - Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INTERP_ERROR, - "Unexpected condition in find_common_mask()!\n"); + pool->num_free_objects += num_objects; } + /* -=item C +=item C -Traces the memory block between C and C. -Attempt to find pointers to PObjs or buffers, and mark them as "alive" -if found. See src/cpu_dep.c for more information about tracing memory -areas. +Insert the new arena into the pool's structure. Arenas are stored in a +linked list, so add the new arena to the list. Set information in the +arenas structure, such as the number of objects allocated in it. =cut */ - void -trace_mem_block(PARROT_INTERP, size_t lo_var_ptr, size_t hi_var_ptr) +Parrot_append_arena_in_pool(PARROT_INTERP, + ARGMOD(Small_Object_Pool *pool), + ARGMOD(Small_Object_Arena *new_arena), size_t size) { - ASSERT_ARGS(trace_mem_block) - size_t prefix; - ptrdiff_t cur_var_ptr; - - const size_t buffer_min = get_min_buffer_address(interp); - const size_t buffer_max = get_max_buffer_address(interp); - const size_t pmc_min = get_min_pmc_address(interp); - const size_t pmc_max = get_max_pmc_address(interp); + ASSERT_ARGS(Parrot_append_arena_in_pool) - const size_t mask = - find_common_mask(interp, - buffer_min < pmc_min ? buffer_min : pmc_min, - buffer_max > pmc_max ? buffer_max : pmc_max); + /* Maintain the *_arena_memory invariant for stack walking code. Set it + * regardless if we're the first pool to be added. */ + if (!pool->last_Arena + || (pool->start_arena_memory > (size_t)new_arena->start_objects)) + pool->start_arena_memory = (size_t)new_arena->start_objects; - if (!lo_var_ptr || !hi_var_ptr) - return; + if (!pool->last_Arena + || (pool->end_arena_memory < (size_t)new_arena->start_objects + size)) + pool->end_arena_memory = (size_t)new_arena->start_objects + size; - if (lo_var_ptr < hi_var_ptr) { - const size_t tmp_ptr = hi_var_ptr; - hi_var_ptr = lo_var_ptr; - lo_var_ptr = tmp_ptr; - } + new_arena->total_objects = pool->objects_per_alloc; + new_arena->next = NULL; + new_arena->prev = pool->last_Arena; - /* Get the expected prefix */ - prefix = mask & buffer_min; - - for (cur_var_ptr = hi_var_ptr; - (ptrdiff_t)cur_var_ptr < (ptrdiff_t)lo_var_ptr; - cur_var_ptr = (size_t)((ptrdiff_t)cur_var_ptr + sizeof (void *))) { - const size_t ptr = *(size_t *)cur_var_ptr; - - /* Do a quick approximate range check by bit-masking */ - if ((ptr & mask) == prefix || !prefix) { - /* Note that what we find via the stack or registers are not - * guaranteed to be live pmcs/buffers, and could very well have - * had their bufstart/vtable destroyed due to the linked list of - * free headers... */ - if (pmc_min <= ptr && ptr < pmc_max && - is_pmc_ptr(interp, (void *)ptr)) { - /* ...so ensure that pobject_lives checks PObj_on_free_list_FLAG - * before adding it to the next_for_GC list, to have - * vtable->mark() called. */ - pobject_lives(interp, (PObj *)ptr); - } - else if (buffer_min <= ptr && ptr < buffer_max && - is_buffer_ptr(interp, (void *)ptr)) { - /* ...and since pobject_lives doesn't care about bufstart, it - * doesn't really matter if it sets a flag */ - pobject_lives(interp, (PObj *)ptr); - } - } - } + if (new_arena->prev) + new_arena->prev->next = new_arena; - return; + pool->last_Arena = new_arena; + interp->arena_base->header_allocs_since_last_collect++; } -#endif + /* -=item C +=item C -Runs through all PMC arenas and clear live bits. This is used to reset -the GC system after a full system sweep. +New arena allocator function for the MS garbage collector system. Allocates +and initializes a new memory arena in the given pool. Adds all the new +objects to the pool's free list for later allocation. =cut */ static void -clear_live_bits(ARGIN(const Small_Object_Pool *pool)) +gc_ms_alloc_objects(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) { - ASSERT_ARGS(clear_live_bits) - Small_Object_Arena *arena; - const UINTVAL object_size = pool->object_size; - - for (arena = pool->last_Arena; arena; arena = arena->prev) { - Buffer *b = (Buffer *)arena->start_objects; - UINTVAL i; - - for (i = 0; i < arena->used; i++) { - PObj_live_CLEAR(b); - b = (Buffer *)((char *)b + object_size); - } - } + ASSERT_ARGS(gc_ms_alloc_objects) + /* Setup memory for the new objects */ + Small_Object_Arena * const new_arena = + mem_internal_allocate_typed(Small_Object_Arena); -} + const size_t size = pool->object_size * pool->objects_per_alloc; + size_t alloc_size; -/* + /* could be mem_internal_allocate too, but calloc is fast */ + new_arena->start_objects = mem_internal_allocate_zeroed(size); -=item C + Parrot_append_arena_in_pool(interp, pool, new_arena, size); -Resets the PMC pool, so all objects are marked as "White". This -is done after a GC run to reset the system and prepare for the -next mark phase. + Parrot_add_to_free_list(interp, pool, new_arena); -=cut + /* Allocate more next time */ + if (GC_DEBUG(interp)) { + pool->objects_per_alloc *= GC_DEBUG_UNITS_PER_ALLOC_GROWTH_FACTOR; + pool->replenish_level = + (size_t)(pool->total_objects * + GC_DEBUG_REPLENISH_LEVEL_FACTOR); + } + else { + pool->objects_per_alloc = (size_t)(pool->objects_per_alloc * + UNITS_PER_ALLOC_GROWTH_FACTOR); + pool->replenish_level = + (size_t)(pool->total_objects * REPLENISH_LEVEL_FACTOR); + } -*/ + /* check alloc size against maximum */ + alloc_size = pool->object_size * pool->objects_per_alloc; -void -Parrot_dod_clear_live_bits(PARROT_INTERP) -{ - ASSERT_ARGS(Parrot_dod_clear_live_bits) - Small_Object_Pool * const pool = interp->arena_base->pmc_pool; - clear_live_bits(pool); + if (alloc_size > POOL_MAX_BYTES) + pool->objects_per_alloc = POOL_MAX_BYTES / pool->object_size; } + /* -=item C +=item C -Records the start time of a DOD run when profiling is enabled. +Creates a new C and returns a pointer to it. +Initializes the pool structure based on the size of objects in the +pool and the number of items to allocate in each arena. =cut */ -void -Parrot_dod_profile_start(PARROT_INTERP) +PARROT_MALLOC +PARROT_CANNOT_RETURN_NULL +Small_Object_Pool * +new_small_object_pool(size_t object_size, size_t objects_per_alloc) { - ASSERT_ARGS(Parrot_dod_profile_start) - if (Interp_flags_TEST(interp, PARROT_PROFILE_FLAG)) - interp->profile->dod_time = Parrot_floatval_time(); + ASSERT_ARGS(new_small_object_pool) + Small_Object_Pool * const pool = + mem_internal_allocate_zeroed_typed(Small_Object_Pool); + + pool->last_Arena = NULL; + pool->free_list = NULL; + pool->mem_pool = NULL; + pool->object_size = object_size; + pool->objects_per_alloc = objects_per_alloc; + + return pool; } + /* -=item C +=item C -Records the end time of the DOD part C run when profiling is -enabled. Also record start time of next part. +Initialize the PMC_EXT pool functions. This is done separately from other +pools. =cut */ void -Parrot_dod_profile_end(PARROT_INTERP, int what) +gc_pmc_ext_pool_init(ARGMOD(Small_Object_Pool *pool)) { - ASSERT_ARGS(Parrot_dod_profile_end) - if (Interp_flags_TEST(interp, PARROT_PROFILE_FLAG)) { - RunProfile * const profile = interp->profile; - const FLOATVAL now = Parrot_floatval_time(); - - profile->data[what].numcalls++; - profile->data[what].time += now - profile->dod_time; - - /* - * we've recorded the time of a DOD/GC piece from - * dod_time until now, so add this to the start of the - * currently executing opcode, which hasn't run this - * interval. - */ - profile->starttime += now - profile->dod_time; - - /* prepare start for next step */ - profile->dod_time = now; - } + ASSERT_ARGS(gc_pmc_ext_pool_init) + pool->add_free_object = gc_ms_add_free_pmc_ext; + pool->get_free_object = gc_ms_get_free_pmc_ext; + pool->alloc_objects = gc_ms_alloc_objects; + pool->more_objects = gc_ms_alloc_objects; } + /* -=item C +=item C -Prepares the collector for a mark & sweep DOD run. This is the -initializer function for the MS garbage collector. +Initialize a memory pool for the MS garbage collector system. Sets the +function pointers necessary to perform basic operations on a pool, such +as object allocation. =cut */ -void -Parrot_dod_ms_run_init(PARROT_INTERP) +static void +gc_ms_pool_init(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool)) { - ASSERT_ARGS(Parrot_dod_ms_run_init) - Arenas * const arena_base = interp->arena_base; - - arena_base->dod_trace_ptr = NULL; - arena_base->dod_mark_start = NULL; - arena_base->num_early_PMCs_seen = 0; - arena_base->num_extended_PMCs = 0; + ASSERT_ARGS(gc_ms_pool_init) + pool->add_free_object = gc_ms_add_free_object; + pool->get_free_object = gc_ms_get_free_object; + pool->alloc_objects = gc_ms_alloc_objects; + pool->more_objects = more_traceable_objects; } + /* -=item C +=item C -Sweeps the given pool for the MS collector. This function also ends -the profiling timer, if profiling is enabled. Returns the total number -of objects freed. +Initialize the state structures of the gc system. Called immediately before +creation of memory pools. This function must set the function pointers +for C, C, C, and +C. =cut */ -static int -sweep_cb(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int flag, - ARGMOD(void *arg)) +void +Parrot_gc_ms_init(PARROT_INTERP) { - ASSERT_ARGS(sweep_cb) - int * const total_free = (int *) arg; - -#ifdef GC_IS_MALLOC - if (flag & POOL_BUFFER) - used_cow(interp, pool, 0); -#endif - - Parrot_dod_sweep(interp, pool); - -#ifdef GC_IS_MALLOC - if (flag & POOL_BUFFER) - clear_cow(interp, pool, 0); -#endif - - if (interp->profile && (flag & POOL_PMC)) - Parrot_dod_profile_end(interp, PARROT_PROF_DOD_cp); - - *total_free += pool->num_free_objects; + ASSERT_ARGS(Parrot_gc_ms_init) + Arenas * const arena_base = interp->arena_base; - return 0; + arena_base->do_gc_mark = Parrot_gc_ms_run; + arena_base->finalize_gc_system = NULL; + arena_base->init_pool = gc_ms_pool_init; } + /* -=item C +=item C -Runs the stop-the-world mark & sweep (MS) collector. +Merge pool C into pool C. Combines the free lists directly, +moves all arenas to the new pool, and remove the old pool. To merge, the +two pools must have the same object size, and the same name (if they have +names). =cut */ void -Parrot_dod_ms_run(PARROT_INTERP, UINTVAL flags) +Parrot_small_object_pool_merge(PARROT_INTERP, + ARGMOD(Small_Object_Pool *dest), ARGMOD(Small_Object_Pool *source)) { - ASSERT_ARGS(Parrot_dod_ms_run) - Arenas * const arena_base = interp->arena_base; - - /* XXX these should go into the interpreter */ - int total_free = 0; + ASSERT_ARGS(Parrot_small_object_pool_merge) + Small_Object_Arena *cur_arena; + void **free_list_end; - if (arena_base->DOD_block_level) + /* XXX num_free_objects doesn't seem to be accounted correctly in, e.g., + * the PMC_EXT pool. + */ +#if 0 + if (source->num_free_objects == source->total_objects) { return; - - if (interp->debugger) { - /* - * if the other interpreter did a DOD run, it can set - * live bits of shared objects, but these aren't reset, because - * they are in a different arena. When now such a PMC points to - * other non-shared object, these wouldn't be marked and hence - * collected. - */ - Parrot_dod_clear_live_bits(interp); } +#endif - /* - * the sync sweep is always at the end, so that - * the live bits are cleared - */ - if (flags & GC_finish_FLAG) { - clear_live_bits(interp->arena_base->pmc_pool); - clear_live_bits(interp->arena_base->constant_pmc_pool); - - /* keep the scheduler and its kids alive for Task-like PMCs to destroy - * themselves; run a sweep to collect them */ - if (interp->scheduler) { - pobject_lives(interp, (PObj *)interp->scheduler); - VTABLE_mark(interp, interp->scheduler); - Parrot_dod_sweep(interp, interp->arena_base->pmc_pool); - } - - /* now sweep everything that's left */ - Parrot_dod_sweep(interp, interp->arena_base->pmc_pool); - Parrot_dod_sweep(interp, interp->arena_base->constant_pmc_pool); + /* PARROT_ASSERT(source->total_objects); */ + PARROT_ASSERT(dest->object_size == source->object_size); + PARROT_ASSERT((dest->name == NULL && source->name == NULL) + || STREQ(dest->name, source->name)); - return; - } + dest->total_objects += source->total_objects; - ++arena_base->DOD_block_level; - arena_base->lazy_dod = flags & GC_lazy_FLAG; + /* append new free_list to old */ + /* XXX this won't work with, e.g., gc_gms */ + free_list_end = &dest->free_list; - /* tell the threading system that we're doing DOD mark */ - pt_DOD_start_mark(interp); - Parrot_dod_ms_run_init(interp); + while (*free_list_end) + free_list_end = (void **)*free_list_end; - /* compact STRING pools to collect free headers and allocated buffers */ - Parrot_go_collect(interp); + *free_list_end = source->free_list; - /* Now go trace the PMCs */ - if (trace_active_PMCs(interp, (int)(flags & GC_trace_stack_FLAG))) { - int ignored; + /* now append source arenas */ + cur_arena = source->last_Arena; - arena_base->dod_trace_ptr = NULL; - arena_base->dod_mark_ptr = NULL; + while (cur_arena) { + size_t total_objects; + Small_Object_Arena * const next_arena = cur_arena->prev; - /* mark is now finished */ - pt_DOD_stop_mark(interp); + cur_arena->next = cur_arena->prev = NULL; - /* Now put unused PMCs and Buffers on the free list */ - ignored = Parrot_forall_header_pools(interp, POOL_BUFFER | POOL_PMC, - (void*)&total_free, sweep_cb); - UNUSED(ignored); + total_objects = cur_arena->total_objects; - if (interp->profile) - Parrot_dod_profile_end(interp, PARROT_PROF_DOD_cb); - } - else { - pt_DOD_stop_mark(interp); /* XXX */ + Parrot_append_arena_in_pool(interp, dest, cur_arena, + cur_arena->total_objects); - /* successful lazy DOD count */ - ++arena_base->lazy_dod_runs; + /* XXX needed? */ + cur_arena->total_objects = total_objects; - Parrot_dod_clear_live_bits(interp); - if (interp->profile) - Parrot_dod_profile_end(interp, PARROT_PROF_DOD_p2); + cur_arena = next_arena; } - /* Note it */ - arena_base->dod_runs++; - --arena_base->DOD_block_level; - - return; + /* remove things from source */ + /* XXX is this enough? */ + source->last_Arena = NULL; + source->free_list = NULL; + source->total_objects = 0; + source->num_free_objects = 0; } -/* - -=item C - -Calls the configured garbage collector to find and reclaim unused -headers. - -=cut - -*/ - -void -Parrot_do_dod_run(PARROT_INTERP, UINTVAL flags) -{ - ASSERT_ARGS(Parrot_do_dod_run) - interp->arena_base->do_gc_mark(interp, flags); - parrot_gc_context(interp); -} - /* =back =head1 SEE ALSO -F, F, F and -F. - -=head1 HISTORY - -Initial version by Mike Lambert on 2002.05.27. +F, F. =cut diff --git a/src/headers.c b/src/gc/pools.c similarity index 57% rename from src/headers.c rename to src/gc/pools.c index ab35882cbe..b754ee6159 100644 --- a/src/headers.c +++ b/src/gc/pools.c @@ -1,23 +1,23 @@ /* -Copyright (C) 2001-2008, The Perl Foundation. +Copyright (C) 2001-2009, The Perl Foundation. $Id$ =head1 NAME -src/headers.c - Header management functions +src/gc/pools.c - Header management functions =head1 DESCRIPTION -Handles getting of various headers, and pool creation. +Handles pool creation for PMC headers. =cut */ #include "parrot/parrot.h" -#include "parrot/headers.h" +#include "parrot/gc_pools.h" -/* HEADERIZER HFILE: include/parrot/headers.h */ +/* HEADERIZER HFILE: include/parrot/gc_pools.h */ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ @@ -33,17 +33,6 @@ static void free_pool(ARGMOD(Small_Object_Pool *pool)) __attribute__nonnull__(1) FUNC_MODIFIES(*pool); -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static void * get_free_buffer(PARROT_INTERP, ARGIN(Small_Object_Pool *pool)) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static PMC_EXT * new_pmc_ext(PARROT_INTERP) - __attribute__nonnull__(1); - static int sweep_cb_buf(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), SHIM(int flag), @@ -66,11 +55,6 @@ static int sweep_cb_pmc(PARROT_INTERP, || PARROT_ASSERT_ARG(pool) #define ASSERT_ARGS_free_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(pool) -#define ASSERT_ARGS_get_free_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(pool) -#define ASSERT_ARGS_new_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_sweep_cb_buf __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(pool) \ @@ -100,11 +84,11 @@ static int sweep_cb_pmc(PARROT_INTERP, =over 4 -=item C +=item C -Gets a free object or buffer from the given C and returns it. -If the object is larger then a starndard C structure, all -additional memory is cleared. +Gets a free object or buffer from the given C and returns it. If the +object is larger then a standard C structure, all additional memory is +cleared. =cut @@ -112,7 +96,7 @@ additional memory is cleared. PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL -static void * +void * get_free_buffer(PARROT_INTERP, ARGIN(Small_Object_Pool *pool)) { ASSERT_ARGS(get_free_buffer) @@ -120,14 +104,16 @@ get_free_buffer(PARROT_INTERP, ARGIN(Small_Object_Pool *pool)) /* don't mess around with flags */ PObj_bufstart(buffer) = NULL; - PObj_buflen(buffer) = 0; + PObj_buflen(buffer) = 0; if (pool->object_size - GC_HEADER_SIZE > sizeof (PObj)) memset(buffer + 1, 0, pool->object_size - sizeof (PObj) - GC_HEADER_SIZE); + return buffer; } + /* =back @@ -155,18 +141,19 @@ new_pmc_pool(PARROT_INTERP) new_small_object_pool(sizeof (PMC), num_headers); pmc_pool->mem_pool = NULL; - pmc_pool->dod_object = Parrot_dod_free_pmc; + pmc_pool->dod_object = Parrot_gc_free_pmc; (interp->arena_base->init_pool)(interp, pmc_pool); return pmc_pool; } + /* =item C Creates a new pool for buffer-like structures. This is called from -C, and should probably not be called directly. +C, and should probably not be called directly. =cut @@ -184,20 +171,20 @@ new_bufferlike_pool(PARROT_INTERP, size_t actual_buffer_size) Small_Object_Pool * const pool = new_small_object_pool(buffer_size, num_headers); - pool->dod_object = Parrot_dod_free_sysmem; + pool->dod_object = Parrot_gc_free_sysmem; pool->mem_pool = interp->arena_base->memory_pool; (interp->arena_base->init_pool)(interp, pool); return pool; } + /* =item C Creates a new C structure for managing buffer objects. -Non-constant strings and plain Buffers are stored in the sized header -pools. +Non-constant strings and plain Buffers are stored in the sized header pools. =cut @@ -209,24 +196,24 @@ Small_Object_Pool * new_buffer_pool(PARROT_INTERP) { ASSERT_ARGS(new_buffer_pool) - Small_Object_Pool * const pool = make_bufferlike_pool(interp, sizeof (Buffer)); + Small_Object_Pool * const pool = get_bufferlike_pool(interp, sizeof (Buffer)); #ifdef GC_IS_MALLOC - pool->dod_object = Parrot_dod_free_buffer_malloc; + pool->dod_object = Parrot_gc_free_buffer_malloc; #else - pool->dod_object = Parrot_dod_free_buffer; + pool->dod_object = Parrot_gc_free_buffer; #endif return pool; } + /* =item C -Creates a new pool for C and returns it. This calls -C internally, which in turn calls -C. +Creates a new pool for Cs and returns it. This calls +C internally, which in turn calls C. =cut @@ -244,20 +231,21 @@ new_string_pool(PARROT_INTERP, INTVAL constant) pool->mem_pool = interp->arena_base->constant_string_pool; } else - pool = make_bufferlike_pool(interp, sizeof (STRING)); + pool = get_bufferlike_pool(interp, sizeof (STRING)); pool->objects_per_alloc = STRING_HEADERS_PER_ALLOC; return pool; } + /* -=item C +=item C -Make and return a bufferlike header pool for objects of a given size. If -a pool for objects of that size already exists no new pool will be -created, and the pointer to the existing pool is returned. +Makes and return a bufferlike header pool for objects of a given size. If a +pool for objects of that size already exists, no new pool will be created and +the pointer to the existing pool is returned. =cut @@ -266,16 +254,15 @@ created, and the pointer to the existing pool is returned. PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool * -make_bufferlike_pool(PARROT_INTERP, size_t buffer_size) +get_bufferlike_pool(PARROT_INTERP, size_t buffer_size) { - ASSERT_ARGS(make_bufferlike_pool) - const UINTVAL num_old = interp->arena_base->num_sized; - Small_Object_Pool **sized_pools = - interp->arena_base->sized_header_pools; - - const UINTVAL idx = (buffer_size - sizeof (Buffer)) / sizeof (void *); + ASSERT_ARGS(get_bufferlike_pool) + Small_Object_Pool **sized_pools = interp->arena_base->sized_header_pools; + const UINTVAL num_old = interp->arena_base->num_sized; + const UINTVAL idx = + (buffer_size - sizeof (Buffer)) / sizeof (void *); - /* Expand the array of sized resource pools, if necessary */ + /* Expands the array of sized resource pools, if necessary */ if (num_old <= idx) { const UINTVAL num_new = idx + 1; /* XXX: use mem_sys_realloc_zeroed to do this easier? If we want the @@ -290,251 +277,22 @@ make_bufferlike_pool(PARROT_INTERP, size_t buffer_size) interp->arena_base->num_sized = num_new; } - if (sized_pools[idx] == NULL) { + if (sized_pools[idx] == NULL) sized_pools[idx] = new_bufferlike_pool(interp, buffer_size); - } return sized_pools[idx]; } -/* - -=item C - -Returns a bufferlike header pool for objects of a given size. Does -not check to see if the pool already exists, so if the pool is -non-existant, this will return an invalid pointer. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -Small_Object_Pool * -get_bufferlike_pool(PARROT_INTERP, size_t buffer_size) -{ - ASSERT_ARGS(get_bufferlike_pool) - Small_Object_Pool ** const sized_pools = - interp->arena_base->sized_header_pools; - - return sized_pools[ (buffer_size - sizeof (Buffer)) / sizeof (void *) ]; -} - -/* - -=item C - -Gets a new PMC header from the PMC pool's free list. Guaranteed to -return a valid PMC object or else Parrot will panic. Set's the -necessary flags for the objects and initializes the PMC data pointer -to C. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -PMC * -new_pmc_header(PARROT_INTERP, UINTVAL flags) -{ - ASSERT_ARGS(new_pmc_header) - Small_Object_Pool * const pool = - flags & PObj_constant_FLAG - ? interp->arena_base->constant_pmc_pool - : interp->arena_base->pmc_pool; - PMC * const pmc = (PMC *)pool->get_free_object(interp, pool); - - if (!pmc) - Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ALLOCATION_ERROR, - "Parrot VM: PMC allocation failed!\n"); - - /* clear flags, set is_PMC_FLAG */ - if (flags & PObj_is_PMC_EXT_FLAG) { - flags |= PObj_is_special_PMC_FLAG; - pmc->pmc_ext = new_pmc_ext(interp); - - if (flags & PObj_is_PMC_shared_FLAG) - add_pmc_sync(interp, pmc); - } - else - pmc->pmc_ext = NULL; - PObj_get_FLAGS(pmc) = PObj_is_PMC_FLAG|flags; - pmc->vtable = NULL; -#if ! PMC_DATA_IN_EXT - PMC_data(pmc) = NULL; -#endif - return pmc; -} - -/* - -=item C - -Gets a new free C structure from the PMC_EXT pool. A pointer to -the new PMC_EXT is returned. Does not check to ensure the PMC_EXT is -non-null before it is returned (yet). - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static PMC_EXT * -new_pmc_ext(PARROT_INTERP) -{ - ASSERT_ARGS(new_pmc_ext) - Small_Object_Pool * const pool = interp->arena_base->pmc_ext_pool; - /* XXX: Should we check here to ensure the PMC_EXT is non-null - like we do in C? */ - return (PMC_EXT *)pool->get_free_object(interp, pool); -} - -/* - -=item C - -Obtains a new C structure, and attaches it to the given C. -Sets the necessary flags associated with the PMC_EXT structure. Ensures -that the PMC_EXT structure is marked as "alive" by the GC. - -=cut - -*/ - -void -add_pmc_ext(PARROT_INTERP, ARGMOD(PMC *pmc)) -{ - ASSERT_ARGS(add_pmc_ext) - pmc->pmc_ext = new_pmc_ext(interp); - PObj_is_PMC_EXT_SET(pmc); -#ifdef PARROT_GC_IMS - /* - * preserve DDD color: a simple PMC live = black - * an aggregate live = grey - * set'em black - */ - if (PObj_live_TEST(pmc)) - PObj_get_FLAGS(pmc) |= PObj_custom_GC_FLAG; -#endif - PMC_next_for_GC(pmc) = PMCNULL; -} - -/* - -=item C - -Adds a C structure to the given C. Initializes the PMC's owner -field and the synchronization mutext. Does not check to ensure the C -is non-null. - -=cut - -*/ - -void -add_pmc_sync(PARROT_INTERP, ARGMOD(PMC *pmc)) -{ - ASSERT_ARGS(add_pmc_sync) - if (!PObj_is_PMC_EXT_TEST(pmc)) { - add_pmc_ext(interp, pmc); - } - /* XXX: Should we test the Sync* for non-null? should we allocate these - from a bufferlike pool instead of directly from the system? */ - PMC_sync(pmc) = (Sync *)mem_internal_allocate(sizeof (*PMC_sync(pmc))); - PMC_sync(pmc)->owner = interp; - MUTEX_INIT(PMC_sync(pmc)->pmc_lock); -} - -/* - -=item C - -Returns a new C structure from the string pool or the constant -string pool. Sets default flags on the string object: -C, C, and C -(for GC). Initializes the data field of the string buffer to C. - -=cut - -*/ - -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -STRING * -new_string_header(PARROT_INTERP, UINTVAL flags) -{ - ASSERT_ARGS(new_string_header) - STRING * const string = (STRING *)get_free_buffer(interp, - (flags & PObj_constant_FLAG) - ? interp->arena_base->constant_string_header_pool - : interp->arena_base->string_header_pool); - - PObj_get_FLAGS(string) |= - flags | PObj_is_string_FLAG | PObj_is_COWable_FLAG | PObj_live_FLAG; - - string->strstart = NULL; - - return string; -} - -/* - -=item C - -Creates and returns a new C from the buffer header pool. Does -not check that the pointer is non-null. Calls C to do -all the work. - -=cut - -*/ - -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -Buffer * -new_buffer_header(PARROT_INTERP) -{ - ASSERT_ARGS(new_buffer_header) - return (Buffer *)get_free_buffer(interp, - interp->arena_base->buffer_header_pool); -} - - -/* - -=item C - -Returns a new buffer-like header from the appropriate sized pool. Does -not check to ensure the header is non-null. - -=cut - -*/ - -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -void * -new_bufferlike_header(PARROT_INTERP, size_t size) -{ - ASSERT_ARGS(new_bufferlike_header) - Small_Object_Pool * const pool = get_bufferlike_pool(interp, size); - - return get_free_buffer(interp, pool); -} /* =item C -Calculates the maximum buffer address and returns it. This is done by -looping through all the sized pools, and finding the pool whose -C field is the highest. Notice that arenas in each -pool are not necessarily located directly next to each other in memory, -and the last arena in the pool's list may not be located at the highest -memory address. +Calculates the maximum buffer address and returns it. This is done by looping +through all the sized pools, and finding the pool whose C +field is the highest. Notice that arenas in each pool are not necessarily +located directly next to each other in memory, and the last arena in the pool's +list may not be located at the highest memory address. =cut @@ -545,9 +303,9 @@ size_t get_max_buffer_address(PARROT_INTERP) { ASSERT_ARGS(get_max_buffer_address) - UINTVAL i; - size_t max = 0; Arenas * const arena_base = interp->arena_base; + size_t max = 0; + UINTVAL i; for (i = 0; i < arena_base->num_sized; i++) { if (arena_base->sized_header_pools[i]) { @@ -559,16 +317,17 @@ get_max_buffer_address(PARROT_INTERP) return max; } + /* =item C -Calculates the minimum buffer address and returns it. Loops through -all sized pools, and finds the one with the smallest -C field. Notice that the memory region between -C and C may be -fragmented, and parts of it may not be available for Parrot to use -directly (such as bookkeeping data for the OS memory manager). +Calculates the minimum buffer address and returns it. Loops through all sized +pools, and finds the one with the smallest C field. Notice +that the memory region between C and +C may be fragmented, and parts of it may not be +available for Parrot to use directly (such as bookkeeping data for the OS +memory manager). =cut @@ -579,20 +338,22 @@ size_t get_min_buffer_address(PARROT_INTERP) { ASSERT_ARGS(get_min_buffer_address) - UINTVAL i; Arenas * const arena_base = interp->arena_base; - size_t min = (size_t) -1; + size_t min = (size_t) -1; + UINTVAL i; for (i = 0; i < arena_base->num_sized; i++) { - if (arena_base->sized_header_pools[i] && - arena_base->sized_header_pools[i]->start_arena_memory) { + if (arena_base->sized_header_pools[i] + && arena_base->sized_header_pools[i]->start_arena_memory) { if (arena_base->sized_header_pools[i]->start_arena_memory < min) min = arena_base->sized_header_pools[i]->start_arena_memory; } } + return min; } + /* =item C @@ -611,14 +372,14 @@ get_max_pmc_address(PARROT_INTERP) return interp->arena_base->pmc_pool->end_arena_memory; } + /* =item C -Returns the minimum memory address used by the C. Notice that -the memory region between C and -C may be fragmented, and not all of it may be -used directly by Parrot for storing PMCs. +Returns the minimum memory address used by the C. Notice that the +memory region between C and C may be +fragmented, and not all of it may be used directly by Parrot for storing PMCs. =cut @@ -632,6 +393,7 @@ get_min_pmc_address(PARROT_INTERP) return interp->arena_base->pmc_pool->start_arena_memory; } + /* =item C @@ -648,24 +410,25 @@ int is_buffer_ptr(PARROT_INTERP, ARGIN(const void *ptr)) { ASSERT_ARGS(is_buffer_ptr) - UINTVAL i; Arenas * const arena_base = interp->arena_base; + UINTVAL i; for (i = 0; i < arena_base->num_sized; i++) { - if (arena_base->sized_header_pools[i] && - contained_in_pool(arena_base->sized_header_pools[i], ptr)) + if (arena_base->sized_header_pools[i] + && contained_in_pool(arena_base->sized_header_pools[i], ptr)) return 1; } return 0; } + /* =item C -Checks that C is actually a PMC pointer. Returns C<1> if it is, -returns C<0> otherwise. +Checks that C is actually a PMC pointer. Returns C<1> if it is, C<0> +otherwise. =cut @@ -685,11 +448,11 @@ is_pmc_ptr(PARROT_INTERP, ARGIN(const void *ptr)) =item C The initialization routine for the interpreter's header pools. Initializes -pools for string headers, constant string headers, buffers, PMCs, -PMC_EXTs, and constant PMCs. +pools for string headers, constant string headers, buffers, PMCs, PMC_EXTs, and +constant PMCs. -The C and C are actually both in -the sized pools, although no other sized pools are created here. +The C and C are actually both in the +sized pools, although no other sized pools are created here. =cut @@ -699,7 +462,7 @@ void Parrot_initialize_header_pools(PARROT_INTERP) { ASSERT_ARGS(Parrot_initialize_header_pools) - Arenas * const arena_base = interp->arena_base; + Arenas * const arena_base = interp->arena_base; /* Init the constant string header pool */ arena_base->constant_string_header_pool = new_string_pool(interp, 1); @@ -707,10 +470,9 @@ Parrot_initialize_header_pools(PARROT_INTERP) /* Init the buffer header pool * - * note: the buffer_header_pool and the string_header_pool are actually - * living in the sized_header_pools, this pool pointers are only - * here for faster access in new_*_header - */ + * The buffer_header_pool and the string_header_pool actually live in the + * sized_header_pools. These pool pointers only provide faster access in + * new_*_header */ arena_base->buffer_header_pool = new_buffer_pool(interp); arena_base->buffer_header_pool->name = "buffer_header"; @@ -719,11 +481,11 @@ Parrot_initialize_header_pools(PARROT_INTERP) arena_base->string_header_pool->name = "string_header"; /* Init the PMC header pool */ - arena_base->pmc_pool = new_pmc_pool(interp); - arena_base->pmc_pool->name = "pmc"; + arena_base->pmc_pool = new_pmc_pool(interp); + arena_base->pmc_pool->name = "pmc"; /* pmc extension buffer */ - arena_base->pmc_ext_pool = + arena_base->pmc_ext_pool = new_small_object_pool(sizeof (PMC_EXT), 1024); #if PARROT_GC_MS @@ -737,6 +499,7 @@ Parrot_initialize_header_pools(PARROT_INTERP) #else /* rational, consistant behavior (as yet unwritten) */ #endif + arena_base->pmc_ext_pool->name = "pmc_ext"; /* constant PMCs */ @@ -746,15 +509,16 @@ Parrot_initialize_header_pools(PARROT_INTERP) CONSTANT_PMC_HEADERS_PER_ALLOC; } + /* =item C -Iterates through header pools, invoking the given callback function -on each pool in the list matching the given criteria. Determines -which pools to iterate over depending on flags passed to the function. -Returns the callback's return value, if non-zero. A non-zero return -value from the callback function will terminate the iteration prematurely. +Iterates through header pools, invoking the given callback function on each +pool in the list matching the given criteria. Determines which pools to iterate +over depending on flags passed to the function. Returns the callback's return +value, if non-zero. A non-zero return value from the callback function will +terminate the iteration prematurely. =over 4 @@ -767,8 +531,8 @@ value from the callback function will terminate the iteration prematurely. Only matching pools will be used. Notice that it is not possible to iterate over certain sets of pools using the provided flags in the single pass. For -instance, both the PMC pool and the constant PMC pool cannot be iterated -over in a single pass. +instance, both the PMC pool and the constant PMC pool cannot be iterated over +in a single pass. =item arg @@ -776,8 +540,8 @@ This argument is passed on to the iteration function. =item pool_iter_fn -It is called with C<(Interp*, Small_Object_Pool *, int flag, void *arg)> -If the function returns a non-zero value iteration will stop. +Called with C<(Parrot_Interp, Small_Object_Pool *, int flag, void *arg)>. If +the function returns a non-zero value, iteration will stop. =back @@ -805,7 +569,6 @@ Parrot_forall_header_pools(PARROT_INTERP, int flag, ARGIN_NULLOK(void *arg), return ret_val; } - if (flag & POOL_BUFFER) { INTVAL i; @@ -832,13 +595,13 @@ Parrot_forall_header_pools(PARROT_INTERP, int flag, ARGIN_NULLOK(void *arg), return 0; } + /* =item C -Frees a pool and all of it's arenas. Loops through the list of arenas -backwards and returns each to the memory manager. Then, it frees the -pool structure itself. +Frees a pool and all of its arenas. Loops through the list of arenas backwards +and returns each to the memory manager. Then, frees the pool structure itself. =cut @@ -859,13 +622,14 @@ free_pool(ARGMOD(Small_Object_Pool *pool)) mem_internal_free(pool); } + /* =item C -Performs a final garbage collection sweep, and then frees the pool. Calls -C to perform the sweep, and C to free the -pool and all it's arenas. +Performs a final garbage collection sweep, then frees the pool. Calls +C to perform the sweep, and C to free the pool and +all its arenas. =cut @@ -884,22 +648,24 @@ sweep_cb_buf(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), SHIM(int flag), used_cow(interp, pool, 1); else #endif + { UNUSED(arg); - Parrot_dod_sweep(interp, pool); + Parrot_gc_sweep(interp, pool); free_pool(pool); } - return 0; + return 0; } + /* =item C -Performs a garbage collection sweep of the given pmc pool, and then frees -it. Calls C to perform the sweep, and C to -free the pool and all it's arenas. Always returns C<0>. +Performs a garbage collection sweep of the given pmc pool, then frees it. Calls +C to perform the sweep, and C to free the pool and +all its arenas. Always returns C<0>. =cut @@ -909,19 +675,20 @@ static int sweep_cb_pmc(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), SHIM(int flag), SHIM(void *arg)) { - Parrot_dod_sweep(interp, pool); + Parrot_gc_sweep(interp, pool); free_pool(pool); return 0; } + /* =item C -Performs a garbage collection sweep on all pools, and then frees them. -Calls C to loop over all the pools, passing -C and C callback routines. Frees the array -of sized header pointers in the C structure too. +Performs a garbage collection sweep on all pools, then frees them. Calls +C to loop over all the pools, passing +C and C callback routines. Frees the array of sized +header pointers in the C structure too. =cut @@ -960,12 +727,13 @@ Parrot_destroy_header_pools(PARROT_INTERP) interp->arena_base->sized_header_pools = NULL; } + /* =item C Walks through the given arena, looking for all live and shared PMCs, -transferring their sync values to the destionation interpreter. +transferring their sync values to the destination interpreter. =cut @@ -976,10 +744,10 @@ fix_pmc_syncs(ARGMOD(Interp *dest_interp), ARGIN(Small_Object_Pool *pool)) { ASSERT_ARGS(fix_pmc_syncs) Small_Object_Arena *cur_arena; - const UINTVAL object_size = pool->object_size; + const UINTVAL object_size = pool->object_size; for (cur_arena = pool->last_Arena; cur_arena; cur_arena = cur_arena->prev) { - PMC * p = (PMC *)((char*)cur_arena->start_objects + GC_HEADER_SIZE); + PMC *p = (PMC *)((char*)cur_arena->start_objects + GC_HEADER_SIZE); size_t i; for (i = 0; i < cur_arena->used; i++) { @@ -989,8 +757,8 @@ fix_pmc_syncs(ARGMOD(Interp *dest_interp), ARGIN(Small_Object_Pool *pool)) else Parrot_ex_throw_from_c_args(dest_interp, NULL, EXCEPTION_INTERP_ERROR, - "Unshared PMC still alive after interpreter \ - destruction. address=%p, base_type=%d\n", + "Unshared PMC still alive after interpreter" + "destruction. address=%p, base_type=%d\n", p, p->vtable->base_type); } @@ -999,11 +767,12 @@ fix_pmc_syncs(ARGMOD(Interp *dest_interp), ARGIN(Small_Object_Pool *pool)) } } + /* =item C -Merge the header pools of C into those of C. +Merges the header pools of C into those of C. (Used to deal with shared objects left after interpreter destruction.) =cut @@ -1014,34 +783,34 @@ void Parrot_merge_header_pools(ARGMOD(Interp *dest_interp), ARGIN(Interp *source_interp)) { ASSERT_ARGS(Parrot_merge_header_pools) - UINTVAL i; - Arenas * const dest_arena = dest_interp->arena_base; + Arenas * const dest_arena = dest_interp->arena_base; Arenas * const source_arena = source_interp->arena_base; + UINTVAL i; /* heavily borrowed from forall_header_pools */ - fix_pmc_syncs(dest_interp, source_arena->constant_pmc_pool); Parrot_small_object_pool_merge(dest_interp, dest_arena->constant_pmc_pool, source_arena->constant_pmc_pool); + fix_pmc_syncs(dest_interp, source_arena->pmc_pool); Parrot_small_object_pool_merge(dest_interp, dest_arena->pmc_pool, source_arena->pmc_pool); + Parrot_small_object_pool_merge(dest_interp, dest_arena->constant_string_header_pool, source_arena->constant_string_header_pool); + Parrot_small_object_pool_merge(dest_interp, - dest_arena->pmc_ext_pool, - source_arena->pmc_ext_pool); + dest_arena->pmc_ext_pool, source_arena->pmc_ext_pool); for (i = 0; i < source_arena->num_sized; ++i) { - if (!source_arena->sized_header_pools[i]) { + if (!source_arena->sized_header_pools[i]) continue; - } - if (i >= dest_arena->num_sized || - !dest_arena->sized_header_pools[i]) { - Small_Object_Pool *ignored = make_bufferlike_pool(dest_interp, + if (i >= dest_arena->num_sized + || !dest_arena->sized_header_pools[i]) { + Small_Object_Pool *ignored = get_bufferlike_pool(dest_interp, i * sizeof (void *) + sizeof (Buffer)); UNUSED(ignored); PARROT_ASSERT(dest_arena->sized_header_pools[i]); @@ -1053,42 +822,6 @@ Parrot_merge_header_pools(ARGMOD(Interp *dest_interp), ARGIN(Interp *source_inte } } -#if 0 - -/* - -=item C - -UNUSED. Sets the C parameter of the various header pools to a -Parrot string structure for the name of the pool. - -=cut - -*/ - -void -Parrot_initialize_header_pool_names(PARROT_INTERP) -{ - ASSERT_ARGS(Parrot_initialize_header_pool_names) - interp->arena_base->string_header_pool->name - = string_make(interp, "String Pool", strlen("String Pool"), - 0, PObj_constant_FLAG, 0); - interp->arena_base->pmc_pool->name - = string_make(interp, "PMC Pool", strlen("PMC Pool"), - 0, PObj_constant_FLAG, 0); - /* Set up names for each header pool, * now that we have a constant string - * - * * pool available to us */ - interp->arena_base->constant_string_header_pool->name - = - string_make(interp, "Constant String Pool", - strlen("Constant String Pool"), 0, PObj_constant_FLAG, 0); - interp->arena_base->buffer_header_pool->name = - string_make(interp, "Generic Header Pool", - strlen("Generic Header Pool"), 0, PObj_constant_FLAG, 0); -} - -#endif /* @@ -1096,7 +829,7 @@ Parrot_initialize_header_pool_names(PARROT_INTERP) =head1 SEE ALSO -F. +F. =head1 HISTORY diff --git a/src/gc/resources.c b/src/gc/resources.c index cf3aecfaa9..bd48218b5d 100644 --- a/src/gc/resources.c +++ b/src/gc/resources.c @@ -378,7 +378,7 @@ compact_pool(PARROT_INTERP, ARGMOD(Memory_Pool *pool)) ++arena_base->GC_block_level; if (interp->profile) - Parrot_dod_profile_start(interp); + Parrot_gc_profile_start(interp); /* We're collecting */ arena_base->mem_allocs_since_last_collect = 0; @@ -579,7 +579,7 @@ compact_pool(PARROT_INTERP, ARGMOD(Memory_Pool *pool)) pool->possibly_reclaimable = 0; if (interp->profile) - Parrot_dod_profile_end(interp, PARROT_PROF_GC); + Parrot_gc_profile_end(interp, PARROT_PROF_GC); --arena_base->GC_block_level; } diff --git a/src/gc/smallobject.c b/src/gc/smallobject.c deleted file mode 100644 index 801c9934fa..0000000000 --- a/src/gc/smallobject.c +++ /dev/null @@ -1,634 +0,0 @@ -/* -Copyright (C) 2001-2007, The Perl Foundation. -$Id$ - -=head1 NAME - -src/gc/resources.c - Handling Small Object Pools - -=head1 DESCRIPTION - -Handles the accessing of small object pools (header pools). - -=head2 Functions - -=over 4 - -=cut - -*/ - -#include "parrot/parrot.h" -#include "parrot/smallobject.h" - -/* HEADERIZER HFILE: include/parrot/smallobject.h */ - -/* HEADERIZER BEGIN: static */ -/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ - -static void gc_ms_add_free_object(SHIM_INTERP, - ARGMOD(Small_Object_Pool *pool), - ARGIN(void *to_add)) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(*pool); - -static void gc_ms_add_free_pmc_ext(SHIM_INTERP, - ARGMOD(Small_Object_Pool *pool), - ARGIN(void *to_add)) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(*pool); - -static void gc_ms_alloc_objects(PARROT_INTERP, - ARGMOD(Small_Object_Pool *pool)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*pool); - -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -static void * gc_ms_get_free_object(PARROT_INTERP, - ARGMOD(Small_Object_Pool *pool)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*pool); - -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -static void * gc_ms_get_free_pmc_ext(PARROT_INTERP, - ARGMOD(Small_Object_Pool *pool)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*pool); - -static void gc_ms_pool_init(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool)) - __attribute__nonnull__(2) - FUNC_MODIFIES(*pool); - -static void more_traceable_objects(PARROT_INTERP, - ARGMOD(Small_Object_Pool *pool)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*pool); - -#define ASSERT_ARGS_gc_ms_add_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(pool) \ - || PARROT_ASSERT_ARG(to_add) -#define ASSERT_ARGS_gc_ms_add_free_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(pool) \ - || PARROT_ASSERT_ARG(to_add) -#define ASSERT_ARGS_gc_ms_alloc_objects __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(pool) -#define ASSERT_ARGS_gc_ms_get_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(pool) -#define ASSERT_ARGS_gc_ms_get_free_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(pool) -#define ASSERT_ARGS_gc_ms_pool_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(pool) -#define ASSERT_ARGS_more_traceable_objects __attribute__unused__ int _ASSERT_ARGS_CHECK = \ - PARROT_ASSERT_ARG(interp) \ - || PARROT_ASSERT_ARG(pool) -/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -/* HEADERIZER END: static */ - - -#define GC_DEBUG_REPLENISH_LEVEL_FACTOR 0.0 -#define GC_DEBUG_UNITS_PER_ALLOC_GROWTH_FACTOR 1 -#define REPLENISH_LEVEL_FACTOR 0.3 - -/* this factor is totally arbitrary, but gives good timings for stress.pasm */ -#define UNITS_PER_ALLOC_GROWTH_FACTOR 1.75 - -#define POOL_MAX_BYTES 65536 * 128 - -/* - -=item C - -Returns whether the given C<*ptr> points to a location in C. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -INTVAL -contained_in_pool(ARGIN(const Small_Object_Pool *pool), ARGIN(const void *ptr)) -{ - ASSERT_ARGS(contained_in_pool) - const Small_Object_Arena *arena; - - ptr = PObj_to_ARENA(ptr); - - for (arena = pool->last_Arena; arena; arena = arena->prev) { - const ptrdiff_t ptr_diff = - (ptrdiff_t)ptr - (ptrdiff_t)arena->start_objects; - - if (0 <= ptr_diff - && ptr_diff < (ptrdiff_t)(arena->used * pool->object_size) - && ptr_diff % pool->object_size == 0) - return 1; - } - - return 0; -} - -/* - -=item C - -Returns whether C<*pmc> is a constant PMC. The given pointer is a constant -PMC if it points into the constant PMC pool. - -=cut - -*/ - -int -Parrot_is_const_pmc(PARROT_INTERP, ARGIN(const PMC *pmc)) -{ - ASSERT_ARGS(Parrot_is_const_pmc) - Small_Object_Pool * const pool = interp->arena_base->constant_pmc_pool; - const int c = contained_in_pool(pool, pmc); - - /* some paranoia first. */ - /* I wonder if it would save any machine cycles to write - !(PObj_constant_TEST(pmc) ^ c) - instead. */ - PARROT_ASSERT(!!PObj_constant_TEST(pmc) == !!c); - - return c; -} - - -/* - -=item C - -We're out of traceable objects. First we try a DOD run to free some up. If -that doesn't work, allocate a new arena. - -=cut - -*/ - -static void -more_traceable_objects(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) -{ - ASSERT_ARGS(more_traceable_objects) - if (pool->skip) - pool->skip = 0; - else { - Small_Object_Arena * const arena = pool->last_Arena; - if (arena) { - if (arena->used == arena->total_objects) - Parrot_do_dod_run(interp, GC_trace_stack_FLAG); - - if (pool->num_free_objects <= pool->replenish_level) - pool->skip = 1; - } - } - - /* requires that num_free_objects be updated in Parrot_do_dod_run. If dod - * is disabled, then we must check the free list directly. */ - if (!pool->free_list) - (*pool->alloc_objects) (interp, pool); -} - -/* - -=item C - -Add a freed PMC_EXT structure to the free list in the PMC_EXT pool. Objects -on the free list can be reused later. - -=cut - -*/ - -static void -gc_ms_add_free_pmc_ext(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool), ARGIN(void *to_add)) -{ - ASSERT_ARGS(gc_ms_add_free_pmc_ext) - PMC_EXT *object = (PMC_EXT *)to_add; - object->_metadata = NULL; - - /* yes, this cast is a hack for now, but a pointer is a pointer */ - object->_next_for_GC = (PMC *)pool->free_list; - pool->free_list = object; -} - -/* - -=item C - -Add an unused object back to the pool's free list for later reuse. Set -the PObj flags to indicate that the item is free. - -=cut - -*/ - -static void -gc_ms_add_free_object(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool), ARGIN(void *to_add)) -{ - ASSERT_ARGS(gc_ms_add_free_object) - PObj *object = (PObj *)to_add; - - PObj_flags_SETTO(object, PObj_on_free_list_FLAG); - - /* during GC buflen is used to check for objects on the free_list */ - PObj_buflen(object) = 0; - PMC_struct_val(object) = pool->free_list; - pool->free_list = object; -} - -/* - -=item C - -Free object allocator for the MS garbage collector system. If there are no -free objects, call C to either free them up with a -DOD run, or allocate new objects. If there are objects available on the -free list, pop it off and return it. - -=cut - -*/ - -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -static void * -gc_ms_get_free_object(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) -{ - ASSERT_ARGS(gc_ms_get_free_object) - PObj *ptr; - PObj *free_list = (PObj *)pool->free_list; - - /* if we don't have any objects */ - if (!free_list) { - (*pool->more_objects)(interp, pool); - free_list = (PObj *)pool->free_list; - } - - ptr = free_list; - pool->free_list = PMC_struct_val(ptr); - - PObj_flags_SETTO(ptr, 0); - - --pool->num_free_objects; - - return ptr; -} - -/* - -=item C - -Get a new PMC_EXT structure from the free pool and return it. - -=cut - -*/ - -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -static void * -gc_ms_get_free_pmc_ext(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) -{ - ASSERT_ARGS(gc_ms_get_free_pmc_ext) - PMC_EXT *ptr; - PMC_EXT *free_list = (PMC_EXT *)pool->free_list; - - /* if we don't have any objects */ - if (!free_list) { - (*pool->more_objects)(interp, pool); - free_list = (PMC_EXT *)pool->free_list; - } - - ptr = free_list; - pool->free_list = ptr->_next_for_GC; - ptr->_next_for_GC = NULL; - - --pool->num_free_objects; - - return ptr; -} - -/* - -=item C - -Adds the objects in the newly allocated C to the free list. - -=cut - -*/ - -void -Parrot_add_to_free_list(PARROT_INTERP, - ARGMOD(Small_Object_Pool *pool), - ARGMOD(Small_Object_Arena *arena)) -{ - ASSERT_ARGS(Parrot_add_to_free_list) - UINTVAL i; - void *object; - const UINTVAL num_objects = pool->objects_per_alloc; - - pool->total_objects += num_objects; - arena->used = num_objects; - - /* Move all the new objects into the free list */ - object = (void *)arena->start_objects; - - for (i = 0; i < num_objects; i++) { - pool->add_free_object(interp, pool, object); - object = (void *)((char *)object + pool->object_size); - } - - pool->num_free_objects += num_objects; -} - -/* - -=item C - -Insert the new arena into the pool's structure. Arenas are stored in a -linked list, so add the new arena to the list. Set information in the -arenas structure, such as the number of objects allocated in it. - -=cut - -*/ -void -Parrot_append_arena_in_pool(PARROT_INTERP, - ARGMOD(Small_Object_Pool *pool), - ARGMOD(Small_Object_Arena *new_arena), size_t size) -{ - ASSERT_ARGS(Parrot_append_arena_in_pool) - - /* Maintain the *_arena_memory invariant for stack walking code. Set it - * regardless if we're the first pool to be added. */ - if (!pool->last_Arena - || (pool->start_arena_memory > (size_t)new_arena->start_objects)) - pool->start_arena_memory = (size_t)new_arena->start_objects; - - if (!pool->last_Arena || (pool->end_arena_memory < - (size_t)new_arena->start_objects + size)) - pool->end_arena_memory = (size_t)new_arena->start_objects + size; - - new_arena->total_objects = pool->objects_per_alloc; - new_arena->next = NULL; - new_arena->prev = pool->last_Arena; - - if (new_arena->prev) - new_arena->prev->next = new_arena; - - pool->last_Arena = new_arena; - interp->arena_base->header_allocs_since_last_collect++; -} - -/* - -=item C - -New arena allocator function for the MS garbage collector system. Allocates -and initializes a new memory arena in the given pool. Adds all the new -objects to the pool's free list for later allocation. - -=cut - -*/ - -static void -gc_ms_alloc_objects(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool)) -{ - ASSERT_ARGS(gc_ms_alloc_objects) - /* Setup memory for the new objects */ - Small_Object_Arena * const new_arena = - mem_internal_allocate_typed(Small_Object_Arena); - - const size_t size = pool->object_size * pool->objects_per_alloc; - size_t alloc_size; - - /* could be mem_internal_allocate too, but calloc is fast */ - new_arena->start_objects = mem_internal_allocate_zeroed(size); - - Parrot_append_arena_in_pool(interp, pool, new_arena, size); - - Parrot_add_to_free_list(interp, pool, new_arena); - - /* Allocate more next time */ - if (GC_DEBUG(interp)) { - pool->objects_per_alloc *= GC_DEBUG_UNITS_PER_ALLOC_GROWTH_FACTOR; - pool->replenish_level = - (size_t)(pool->total_objects * - GC_DEBUG_REPLENISH_LEVEL_FACTOR); - } - else { - pool->objects_per_alloc = (size_t)(pool->objects_per_alloc * - UNITS_PER_ALLOC_GROWTH_FACTOR); - pool->replenish_level = - (size_t)(pool->total_objects * REPLENISH_LEVEL_FACTOR); - } - - /* check alloc size against maximum */ - alloc_size = pool->object_size * pool->objects_per_alloc; - - if (alloc_size > POOL_MAX_BYTES) - pool->objects_per_alloc = POOL_MAX_BYTES / pool->object_size; -} - -/* - -=item C - -Creates a new C and returns a pointer to it. -Initializes the pool structure based on the size of objects in the -pool and the number of items to allocate in each arena. - -=cut - -*/ - -PARROT_MALLOC -PARROT_CANNOT_RETURN_NULL -Small_Object_Pool * -new_small_object_pool(size_t object_size, size_t objects_per_alloc) -{ - ASSERT_ARGS(new_small_object_pool) - Small_Object_Pool * const pool = - mem_internal_allocate_zeroed_typed(Small_Object_Pool); - - pool->last_Arena = NULL; - pool->free_list = NULL; - pool->mem_pool = NULL; - pool->object_size = object_size; - pool->objects_per_alloc = objects_per_alloc; - - return pool; -} - -/* - -=item C - -Initialize the PMC_EXT pool functions. This is done separately from other -pools. - -=cut - -*/ - -void -gc_pmc_ext_pool_init(ARGMOD(Small_Object_Pool *pool)) -{ - ASSERT_ARGS(gc_pmc_ext_pool_init) - pool->add_free_object = gc_ms_add_free_pmc_ext; - pool->get_free_object = gc_ms_get_free_pmc_ext; - pool->alloc_objects = gc_ms_alloc_objects; - pool->more_objects = gc_ms_alloc_objects; -} - -/* - -=item C - -Initialize a memory pool for the MS garbage collector system. Sets the -function pointers necessary to perform basic operations on a pool, such -as object allocation. - -=cut - -*/ - -static void -gc_ms_pool_init(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool)) -{ - ASSERT_ARGS(gc_ms_pool_init) - pool->add_free_object = gc_ms_add_free_object; - pool->get_free_object = gc_ms_get_free_object; - pool->alloc_objects = gc_ms_alloc_objects; - pool->more_objects = more_traceable_objects; -} - -/* - -=item C - -Initialize the state structures of the gc system. Called immediately before -creation of memory pools. This function must set the function pointers -for C, C, C, and -C. - -=cut - -*/ - -void -Parrot_gc_ms_init(PARROT_INTERP) -{ - ASSERT_ARGS(Parrot_gc_ms_init) - Arenas * const arena_base = interp->arena_base; - - arena_base->do_gc_mark = Parrot_dod_ms_run; - arena_base->finalize_gc_system = NULL; - arena_base->init_pool = gc_ms_pool_init; -} - -/* - -=item C - -Merge pool C into pool C. Combines the free lists directly, -moves all arenas to the new pool, and remove the old pool. To merge, the -two pools must have the same object size, and the same name (if they have -names). - -=cut - -*/ - -void -Parrot_small_object_pool_merge(PARROT_INTERP, - ARGMOD(Small_Object_Pool *dest), ARGMOD(Small_Object_Pool *source)) -{ - ASSERT_ARGS(Parrot_small_object_pool_merge) - Small_Object_Arena *cur_arena; - void **free_list_end; - - /* XXX num_free_objects doesn't seem to be accounted correctly in, e.g., - * the PMC_EXT pool. - */ -#if 0 - if (source->num_free_objects == source->total_objects) { - return; - } -#endif - - /* PARROT_ASSERT(source->total_objects); */ - PARROT_ASSERT(dest->object_size == source->object_size); - PARROT_ASSERT((dest->name == NULL && source->name == NULL) || - STREQ(dest->name, source->name)); - - dest->total_objects += source->total_objects; - - /* append new free_list to old */ - /* XXX this won't work with, e.g., gc_gms */ - free_list_end = &dest->free_list; - - while (*free_list_end) - free_list_end = (void **)*free_list_end; - - *free_list_end = source->free_list; - - /* now append source arenas */ - cur_arena = source->last_Arena; - - while (cur_arena) { - size_t total_objects; - Small_Object_Arena * const next_arena = cur_arena->prev; - - cur_arena->next = cur_arena->prev = NULL; - - total_objects = cur_arena->total_objects; - - Parrot_append_arena_in_pool(interp, dest, cur_arena, - cur_arena->total_objects); - - /* XXX needed? */ - cur_arena->total_objects = total_objects; - - cur_arena = next_arena; - } - - /* remove things from source */ - /* XXX is this enough? */ - source->last_Arena = NULL; - source->free_list = NULL; - source->total_objects = 0; - source->num_free_objects = 0; -} - -/* - -=back - -=head1 SEE ALSO - -F, F. - -=cut - -*/ - -/* - * Local variables: - * c-file-style: "parrot" - * End: - * vim: expandtab shiftwidth=4: - */ diff --git a/src/inter_call.c b/src/inter_call.c index b546d4de1e..bc22e61a71 100644 --- a/src/inter_call.c +++ b/src/inter_call.c @@ -559,8 +559,6 @@ start_flatten(PARROT_INTERP, ARGMOD(call_state *st), ARGIN(PMC *p_arg)) st->key = pmc_new(interp, enum_class_Key); PMC_int_val(st->key) = 0; PMC_data(st->key) = (void *)INITBucketIndex; - - dod_register_pmc(interp, st->key); } else { /* src ought to be an array */ @@ -654,7 +652,6 @@ fetch_arg_sig(PARROT_INTERP, ARGMOD(call_state *st)) UVal_pmc(st->val) = CONTEXT(interp)->current_object; else { UVal_pmc(st->val) = va_arg(*ap, PMC *); - dod_register_pmc(interp, UVal_pmc(st->val)); } if (st->src.sig & PARROT_ARG_FLATTEN) { @@ -670,9 +667,6 @@ fetch_arg_sig(PARROT_INTERP, ARGMOD(call_state *st)) st->src.used = 1; retval = Parrot_fetch_arg(interp, st); - if (!PMC_IS_NULL(st->key)) - dod_unregister_pmc(interp, st->key); - return retval; } break; @@ -738,9 +732,6 @@ fetch_arg_op(PARROT_INTERP, ARGMOD(call_state *st)) st->src.used = 1; retval = Parrot_fetch_arg(interp, st); - if (!PMC_IS_NULL(st->key)) - dod_unregister_pmc(interp, st->key); - return retval; } break; @@ -803,9 +794,6 @@ Parrot_fetch_arg(PARROT_INTERP, ARGMOD(call_state *st)) if (st->src.slurp_i == st->src.slurp_n) { st->src.mode &= ~CALL_STATE_FLATTEN; - if (!PMC_IS_NULL(st->key)) - dod_unregister_pmc(interp, st->key); - st->key = PMCNULL; st->src.i++; } @@ -866,7 +854,6 @@ Parrot_fetch_arg_nci(PARROT_INTERP, ARGMOD(call_state *st)) } UVal_pmc(st->val) = slurped; - dod_register_pmc(interp, slurped); } else { Parrot_fetch_arg(interp, st); @@ -906,7 +893,6 @@ convert_arg_from_int(PARROT_INTERP, ARGMOD(call_state *st)) VTABLE_set_integer_native(interp, d, UVal_int(st->val)); UVal_pmc(st->val) = d; - dod_register_pmc(interp, d); } break; default: @@ -942,7 +928,6 @@ convert_arg_from_num(PARROT_INTERP, ARGMOD(call_state *st)) VTABLE_set_number_native(interp, d, UVal_num(st->val)); UVal_pmc(st->val) = d; - dod_register_pmc(interp, d); } break; default: @@ -979,7 +964,6 @@ convert_arg_from_str(PARROT_INTERP, ARGMOD(call_state *st)) VTABLE_set_string_native(interp, d, UVal_str(st->val)); UVal_pmc(st->val) = d; - dod_register_pmc(interp, d); } break; default: @@ -1143,7 +1127,6 @@ init_first_dest_named(PARROT_INTERP, ARGMOD(call_state *st)) * otherwise it may get collected. */ st->dest.slurp = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Hash)); - dod_register_pmc(interp, st->dest.slurp); /* pass the slurpy hash */ idx = st->dest.u.op.pc[i]; @@ -1611,7 +1594,6 @@ Parrot_process_args(PARROT_INTERP, ARGMOD(call_state *st), arg_pass_t param_or_r /* Must register this PMC or it may get collected when only the struct * references it. */ - dod_register_pmc(interp, array); CTX_REG_PMC(st->dest.ctx, idx) = array; while (Parrot_fetch_arg(interp, st)) { @@ -1629,7 +1611,6 @@ Parrot_process_args(PARROT_INTERP, ARGMOD(call_state *st), arg_pass_t param_or_r } dest->i++; - dod_unregister_pmc(interp, array); } /* is there another argument? if we're throwing errors, that's an error */ @@ -1681,10 +1662,6 @@ Parrot_process_args(PARROT_INTERP, ARGMOD(call_state *st), arg_pass_t param_or_r } check_named(interp, st); - - /* we may or may not have registered this pmc */ - if (dest->slurp) - dod_unregister_pmc(interp, dest->slurp); } @@ -1776,8 +1753,6 @@ parrot_pass_args(PARROT_INTERP, /* If we created a slurpy, we had to DOD register it so it did not get * collected during arg processing; we'll now unregister it. */ - if (st.dest.slurp) - dod_unregister_pmc(interp, st.dest.slurp); } @@ -1873,7 +1848,6 @@ set_retval(PARROT_INTERP, int sig_ret, ARGIN(Parrot_Context *ctx)) case 'P': if (set_retval_util(interp, "P", ctx, &st)) { PMC *retval = UVal_pmc(st.val); - dod_unregister_pmc(interp, retval); return (void *)retval; } default: @@ -2130,13 +2104,24 @@ count_signature_elements(PARROT_INTERP, ARGIN(const char *signature), break; case 'P': arg_ret_cnt[seen_arrow]++; - max_regs[seen_arrow * 4 + REGNO_PMC]++; + { + /* Lookahead to see if PMC is marked as invocant */ + if (*(++x) == 'i') { + max_regs[REGNO_PMC]++; + } + else { + x--; /* Undo lookahead */ + max_regs[seen_arrow * 4 + REGNO_PMC]++; + } + } break; case 'f': case 'n': case 's': case 'o': case 'p': + /* case 'l': */ /* lookahead parameter */ + case 'i': break; default: Parrot_ex_throw_from_c_args(interp, NULL, @@ -2165,8 +2150,8 @@ count_signature_elements(PARROT_INTERP, ARGIN(const char *signature), =item C -Called by Parrot_pcc_invoke_sub_from_sig_object when it reaches the end of each -arg in the arg signature. See C for +Called by Parrot_pcc_invoke_from_sig_object when it reaches the end of each +arg in the arg signature. See C for signature syntax. =cut @@ -2191,7 +2176,22 @@ commit_last_arg_sig_object(PARROT_INTERP, int index, int cur, case PARROT_ARG_STRING: reg_offset = n_regs_used[seen_arrow * 4 + REGNO_STR]++; break; case PARROT_ARG_PMC : - reg_offset = n_regs_used[seen_arrow * 4 + REGNO_PMC]++; break; + if (cur & PARROT_ARG_INVOCANT) { + if (seen_arrow == 0 && index == 0) { + n_regs_used[REGNO_PMC]++; + reg_offset = 0; + } + else { + Parrot_ex_throw_from_c_args(interp, NULL, + EXCEPTION_INVALID_OPERATION, + "Parrot_pcc_invoke: Only the first parameter can be an invocant %d, %d", + seen_arrow, index); + } + } + else { + reg_offset = n_regs_used[seen_arrow * 4 + REGNO_PMC]++; + } + break; default: Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "Parrot_PCCINVOKE: invalid reg type"); @@ -2218,11 +2218,14 @@ commit_last_arg_sig_object(PARROT_INTERP, int index, int cur, break; case PARROT_ARG_PMC: CTX_REG_PMC(ctx, reg_offset) = VTABLE_get_pmc_keyed_int(interp, sig_obj, index); + if (cur & PARROT_ARG_INVOCANT) { + interp->current_object = CTX_REG_PMC(ctx, reg_offset); + } break; default: Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, - "Parrot_pcc_invoke_sub_from_sig_object: invalid reg type"); + "Parrot_pcc_invoke_from_sig_object: invalid reg type"); } } } @@ -2282,7 +2285,7 @@ set_context_sig_returns(PARROT_INTERP, default: Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, - "Parrot_pcc_invoke_sub_from_sig_object: invalid reg type %c!", *x); + "Parrot_pcc_invoke_from_sig_object: invalid reg type %c!", *x); } /* invalidate the CPointer's pointers so that GC doesn't try to @@ -2365,7 +2368,7 @@ set_context_sig_returns_varargs(PARROT_INTERP, ARGMOD(Parrot_Context *ctx), Sets the subroutine arguments in the C context, according to the signature string C. Currently this function is only called -from C, but eventually when +from C, but eventually when things are unified enough it should be called from C as well. The only difference currently between the two implementations are the calls to C and C. @@ -2434,7 +2437,7 @@ set_context_sig_params(PARROT_INTERP, ARGIN(const char *signature), default: Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, - "Parrot_pcc_invoke_sub_from_sig_object: invalid reg type %c!", *x); + "Parrot_pcc_invoke_from_sig_object: invalid reg type %c!", *x); } } @@ -2446,10 +2449,12 @@ set_context_sig_params(PARROT_INTERP, ARGIN(const char *signature), case 's': cur |= PARROT_ARG_SLURPY_ARRAY; break; case 'o': cur |= PARROT_ARG_OPTIONAL; break; case 'p': cur |= PARROT_ARG_OPT_FLAG; break; + case 'l': cur |= PARROT_ARG_LOOKAHEAD; break; + case 'i': cur |= PARROT_ARG_INVOCANT; break; default: Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, - "Parrot_pcc_invoke_sub_from_sig_object: invalid adverb type %c!", *x); + "Parrot_pcc_invoke_from_sig_object: invalid adverb type %c!", *x); } } } @@ -2486,11 +2491,10 @@ Parrot_pcc_invoke_sub_from_c_args(PARROT_INTERP, ARGIN(PMC *sub_obj), PMC *sig_obj; va_list args; va_start(args, sig); - sig_obj = Parrot_build_sig_object_from_varargs(interp, sig, args); + sig_obj = Parrot_build_sig_object_from_varargs(interp, PMCNULL, sig, args); va_end(args); - Parrot_pcc_invoke_sub_from_sig_object(interp, sub_obj, sig_obj); - dod_unregister_pmc(interp, sig_obj); + Parrot_pcc_invoke_from_sig_object(interp, sub_obj, sig_obj); } /* @@ -2523,6 +2527,8 @@ results, of course. s slurpy o optional p opt flag + l lookahead parameter (next positional, or next named if no positionals) + i invocant -> is the separator between args and results, similar to type theory notation. @@ -2672,6 +2678,7 @@ Parrot_PCCINVOKE(PARROT_INTERP, ARGIN(PMC* pmc), ARGMOD(STRING *method_name), case 's': cur |= PARROT_ARG_SLURPY_ARRAY; break; case 'o': cur |= PARROT_ARG_OPTIONAL; break; case 'p': cur |= PARROT_ARG_OPT_FLAG; break; + /* case 'l': cur |= PARROT_ARG_LOOKAHEAD; break; */ default: Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, @@ -2719,7 +2726,48 @@ Parrot_PCCINVOKE(PARROT_INTERP, ARGIN(PMC* pmc), ARGMOD(STRING *method_name), /* -=item C +=item C + +Makes a method call given the name of the method and the arguments as a +C variadic argument list. C is the invocant, C is the +string name of the method, C is a C string describing the +signature of the invocation, according to the Parrot calling +conventions. The variadic argument list contains the input arguments +followed by the output results in the same order that they appear in the +function signature. + +=cut + +*/ + +PARROT_EXPORT +void +Parrot_pcc_invoke_method_from_c_args(PARROT_INTERP, ARGIN(PMC* pmc), + ARGMOD(STRING *method_name), + ARGIN(const char *signature), ...) +{ + PMC *sig_obj; + PMC *sub_obj; + va_list args; + va_start(args, signature); + sig_obj = Parrot_build_sig_object_from_varargs(interp, pmc, signature, args); + va_end(args); + + /* Find the subroutine object as a named method on pmc */ + sub_obj = VTABLE_find_method(interp, pmc, method_name); + if (PMC_IS_NULL(sub_obj)) + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_METHOD_NOT_FOUND, + "Method '%Ss' not found", method_name); + + /* Invoke the subroutine object with the given CallSignature object */ + Parrot_pcc_invoke_from_sig_object(interp, sub_obj, sig_obj); + dod_unregister_pmc(interp, sig_obj); + +} + +/* + +=item C Follows the same conventions as C, but the subroutine object to invoke is passed as an argument rather than looked up by name, and the @@ -2731,7 +2779,7 @@ signature string and call arguments are passed in a CallSignature PMC. PARROT_EXPORT void -Parrot_pcc_invoke_sub_from_sig_object(PARROT_INTERP, ARGIN(PMC *sub_obj), +Parrot_pcc_invoke_from_sig_object(PARROT_INTERP, ARGIN(PMC *sub_obj), ARGIN(PMC *sig_obj)) { ASSERT_ARGS(Parrot_pcc_invoke_sub_from_sig_object) @@ -2798,8 +2846,10 @@ Parrot_pcc_invoke_sub_from_sig_object(PARROT_INTERP, ARGIN(PMC *sub_obj), /* Invoke the function */ dest = VTABLE_invoke(interp, sub_obj, NULL); - /* PIR Subs need runops to run their opcodes. */ - if (sub_obj->vtable->base_type == enum_class_Sub) { + /* PIR Subs need runops to run their opcodes. Methods and NCI subs + * don't. */ + if (sub_obj->vtable->base_type == enum_class_Sub + && PMC_IS_NULL(interp->current_object)) { INTVAL old_core = interp->run_core; opcode_t offset = dest - interp->code->base.data; diff --git a/src/inter_run.c b/src/inter_run.c index 630d0a9d03..02680d6146 100644 --- a/src/inter_run.c +++ b/src/inter_run.c @@ -146,7 +146,7 @@ Parrot_runops_fromc(PARROT_INTERP, ARGIN(PMC *sub)) PMC * const ret_c = new_ret_continuation_pmc(interp, NULL); interp->current_cont = ret_c; #if defined GC_VERBOSE && GC_VERBOSE - PObj_report_SET(ret_c); /* s. also dod.c */ + PObj_report_SET(ret_c); /* s. also src/gc/api.c */ #endif /* invoke the sub, which places the context of the sub in the * interpreter, and switches code segments if needed diff --git a/src/jit/i386/exec_dep.c b/src/jit/i386/exec_dep.c index 11ff27e1ee..30edebaff4 100644 --- a/src/jit/i386/exec_dep.c +++ b/src/jit/i386/exec_dep.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2008, The Perl Foundation. + * Copyright (C) 2003-2009, The Perl Foundation. */ /* @@ -80,7 +80,7 @@ Parrot_exec_normal_op(Parrot_jit_info_t *jit_info, PARROT_INTERP) cur_section->done = 1; } - i = (int)(((op_func_t*)interp->op_lib->op_func_table)[2]); + i = (int)(((op_func_t*)interp->op_lib->op_func_table)[PARROT_OP_cpu_ret]); j = (int)cgp_core; *offset = (void *)(i - j); diff --git a/src/jit/i386/jit_defs.c b/src/jit/i386/jit_defs.c index 7a574f0ea3..16cc306283 100644 --- a/src/jit/i386/jit_defs.c +++ b/src/jit/i386/jit_defs.c @@ -2060,8 +2060,7 @@ Parrot_jit_normal_op(Parrot_jit_info_t *jit_info, jit_emit_mov_ri_i(interp, jit_info->native_ptr, emit_ESI, offset); emitm_callm(jit_info->native_ptr, emit_ESI, 0, 0, 0); /* now patch a B opcode after the end of the - * prederefed (non JIT) section - */ + * prederefed (non JIT) section */ if (last_is_branch) { offset = (cur_section->end - interp->code->base.data) + interp->code->prederef.code; @@ -2078,7 +2077,7 @@ Parrot_jit_normal_op(Parrot_jit_info_t *jit_info, + interp->code->prederef.code; cur_section->done = 1; } - *offset = ((op_func_t*)interp->op_lib->op_func_table)[2]; + *offset = ((op_func_t*)interp->op_lib->op_func_table)[PARROT_OP_cpu_ret]; } else { /* else call normal funtion */ diff --git a/src/multidispatch.c b/src/multidispatch.c index c1e1a72626..c46bb9a5e6 100644 --- a/src/multidispatch.c +++ b/src/multidispatch.c @@ -297,7 +297,8 @@ PARROT_EXPORT PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL PMC* -Parrot_build_sig_object_from_varargs(PARROT_INTERP, ARGIN(const char *sig), va_list args) +Parrot_build_sig_object_from_varargs(PARROT_INTERP, ARGIN_NULLOK(PMC* obj), + ARGIN(const char *sig), va_list args) { ASSERT_ARGS(Parrot_build_sig_object_from_varargs) PMC *type_tuple = PMCNULL; @@ -313,6 +314,7 @@ Parrot_build_sig_object_from_varargs(PARROT_INTERP, ARGIN(const char *sig), va_l VTABLE_set_string_native(interp, call_object, string_sig); + /* Process the varargs list */ for (i = 0; i < sig_len; ++i) { const INTVAL type = string_index(interp, string_sig, i); @@ -382,8 +384,17 @@ Parrot_build_sig_object_from_varargs(PARROT_INTERP, ARGIN(const char *sig), va_l } } + /* Check if we have an invocant, and add it to the front of the arguments */ + if (!PMC_IS_NULL(obj)) { + string_sig = string_concat(interp, CONST_STRING(interp, "Pi"), string_sig, 0); + VTABLE_set_string_native(interp, call_object, string_sig); + VTABLE_unshift_pmc(interp, call_object, obj); + } + + /* Build a type_tuple for multiple dispatch */ type_tuple = Parrot_mmd_build_type_tuple_from_sig_obj(interp, call_object); VTABLE_set_pmc(interp, call_object, type_tuple); + return call_object; } @@ -414,7 +425,7 @@ Parrot_mmd_multi_dispatch_from_c_args(PARROT_INTERP, va_list args; va_start(args, sig); - sig_object = Parrot_build_sig_object_from_varargs(interp, sig, args); + sig_object = Parrot_build_sig_object_from_varargs(interp, PMCNULL, sig, args); va_end(args); /* Check the cache. */ @@ -442,7 +453,7 @@ Parrot_mmd_multi_dispatch_from_c_args(PARROT_INTERP, VTABLE_name(interp, sub)); #endif - Parrot_pcc_invoke_sub_from_sig_object(interp, sub, sig_object); + Parrot_pcc_invoke_from_sig_object(interp, sub, sig_object); } @@ -862,13 +873,22 @@ Parrot_mmd_build_type_tuple_from_sig_obj(PARROT_INTERP, ARGIN(PMC *sig_obj)) break; case 'P': { - PMC *pmc_arg = VTABLE_get_pmc_keyed_int(interp, sig_obj, i); - if (PMC_IS_NULL(pmc_arg)) - VTABLE_set_integer_keyed_int(interp, type_tuple, - i, enum_type_PMC); - else - VTABLE_set_integer_keyed_int(interp, type_tuple, i, - VTABLE_type(interp, pmc_arg)); + INTVAL type_lookahead = string_index(interp, string_sig, (i + 1)); + if (type_lookahead == 'i') { + if (i != 0) + Parrot_ex_throw_from_c_args(interp, NULL, + EXCEPTION_INVALID_OPERATION, + "Multiple Dispatch: only the first argument can be an invocant"); + } + else { + PMC *pmc_arg = VTABLE_get_pmc_keyed_int(interp, sig_obj, i); + if (PMC_IS_NULL(pmc_arg)) + VTABLE_set_integer_keyed_int(interp, type_tuple, + i, enum_type_PMC); + else + VTABLE_set_integer_keyed_int(interp, type_tuple, i, + VTABLE_type(interp, pmc_arg)); + } break; } diff --git a/src/ops/ops.num b/src/ops/ops.num index c239ab321c..debf24bfaa 100644 --- a/src/ops/ops.num +++ b/src/ops/ops.num @@ -1268,13 +1268,5 @@ set_root_global_p_s_p 1237 set_root_global_pc_s_p 1238 set_root_global_p_sc_p 1239 set_root_global_pc_sc_p 1240 -store_global_s_s_p 1241 -store_global_sc_s_p 1242 -store_global_s_sc_p 1243 -store_global_sc_sc_p 1244 -find_global_p_s_s 1245 -find_global_p_sc_s 1246 -find_global_p_s_sc 1247 -find_global_p_sc_sc 1248 -find_name_p_s 1249 -find_name_p_sc 1250 +find_name_p_s 1241 +find_name_p_sc 1242 diff --git a/src/ops/var.ops b/src/ops/var.ops index 3fd81fa2e8..6465330cef 100644 --- a/src/ops/var.ops +++ b/src/ops/var.ops @@ -370,36 +370,6 @@ Operations to modify global variables ######################################## -=item B(in STR, in STR, invar PMC) - -Store global $3 as global symbol $2 in namespace designated by $1. If -namespace does not exist, create it. $1 may be a key, a string, or an array -of strings. - -=cut - -op store_global(in STR, in STR, invar PMC) :deprecated { - Parrot_store_global_s(interp, $1, $2, $3); -} - -######################################## - -=item B(out PMC, in STR, in STR) - -Find the global named $3 in the namespace named $2 and store it in $1. - -If the global doesn't exist either throws an exception or sets $1 to the -Null PMC, depending on current errors settings. See B. - -=cut - -op find_global(out PMC, in STR, in STR) :deprecated { - PMC * const ns = Parrot_get_namespace_keyed_str(interp, - Parrot_get_ctx_HLL_namespace(interp), - $2); - $1 = Parrot_find_global_op(interp, ns, $3, expr NEXT()); -} - =item B(out PMC, in STR) Find the name $2 in lexical, current, global, or builtin namespace and @@ -424,7 +394,7 @@ op find_name(out PMC, in STR) { =head1 COPYRIGHT -Copyright (C) 2001-2008, The Perl Foundation. +Copyright (C) 2001-2009, The Perl Foundation. =head1 LICENSE diff --git a/src/pmc.c b/src/pmc.c index 7c46502918..35ca02f137 100644 --- a/src/pmc.c +++ b/src/pmc.c @@ -197,7 +197,7 @@ pmc_reuse(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type, } else { if (has_ext) - Parrot_free_pmc_ext(interp, pmc); + Parrot_gc_free_pmc_ext(interp, pmc); #if ! PMC_DATA_IN_EXT PMC_data(pmc) = NULL; @@ -302,7 +302,7 @@ get_new_pmc_header(PARROT_INTERP, INTVAL base_type, UINTVAL flags) pmc = new_pmc_header(interp, flags); pmc->vtable = vtable; -#ifdef GC_VERBOSE +#if GC_VERBOSE if (Interp_flags_TEST(interp, PARROT_TRACE_FLAG)) { /* XXX make a more verbose trace flag */ fprintf(stderr, "\t=> new %p type %d\n", pmc, (int)base_type); @@ -491,7 +491,7 @@ pmc_free_to_pool(PARROT_INTERP, ARGMOD(PMC *pmc), VTABLE_destroy(interp, pmc); if (PObj_is_PMC_EXT_TEST(pmc)) - Parrot_free_pmc_ext(interp, pmc); + Parrot_gc_free_pmc_ext(interp, pmc); PObj_flags_SETTO((PObj *)pmc, PObj_on_free_list_FLAG); pool->add_free_object(interp, pool, (PObj *)pmc); @@ -662,7 +662,7 @@ create_class_pmc(PARROT_INTERP, INTVAL type) } else { if (PObj_is_PMC_EXT_TEST(_class)) - Parrot_free_pmc_ext(interp, _class); + Parrot_gc_free_pmc_ext(interp, _class); DOD_flag_CLEAR(is_special_PMC, _class); diff --git a/src/pmc/array.pmc b/src/pmc/array.pmc index 906b68b0eb..3241613664 100644 --- a/src/pmc/array.pmc +++ b/src/pmc/array.pmc @@ -121,9 +121,9 @@ Class initialization. Creates the required memory pools. void class_init() { /* class_init_code; called for side effects */ Small_Object_Pool *List_chunks = - make_bufferlike_pool(INTERP, sizeof (List_chunk)); + get_bufferlike_pool(INTERP, sizeof (List_chunk)); Small_Object_Pool *Lists = - make_bufferlike_pool(INTERP, sizeof (List)); + get_bufferlike_pool(INTERP, sizeof (List)); /* XXX until there's a function to allocate a pool in an arena */ UNUSED(List_chunks); diff --git a/src/pmc/deleg_pmc.pmc b/src/pmc/deleg_pmc.pmc index 8b3ac2e181..414345a42c 100644 --- a/src/pmc/deleg_pmc.pmc +++ b/src/pmc/deleg_pmc.pmc @@ -45,7 +45,7 @@ pmclass deleg_pmc no_ro { /* don't pass that on * * NB objects have the flag PObj_data_is_PMC_array_FLAG set, - * marking is done internally in src/dod.c + * marking is done internally in src/gc/api.c */ } diff --git a/src/pmc/integer.pmc b/src/pmc/integer.pmc index c3ef36c6d8..18da2224d4 100644 --- a/src/pmc/integer.pmc +++ b/src/pmc/integer.pmc @@ -67,12 +67,10 @@ Initializes the integer with a default value of C<0>. */ VTABLE PMC *instantiate(PMC *sig) { - PMC * const ret = new_pmc_header(INTERP, 0); + PMC * const ret = pmc_new(INTERP, VTABLE_type(INTERP, SELF)); opcode_t *arg_op = interp->current_args; INTVAL init = 0; - ret->vtable = interp->vtables[SELF->vtable->base_type]; - if (SIG_ELEMS(sig) == 2) { switch (SIG_ITEM(sig, 1)) { case PARROT_ARG_I: @@ -89,7 +87,7 @@ VTABLE PMC *instantiate(PMC *sig) { } } - PMC_int_val(ret) = init; + VTABLE_set_integer_native(INTERP, ret, init); return ret; } diff --git a/src/pmc/parrotinterpreter.pmc b/src/pmc/parrotinterpreter.pmc index edb6775e57..874f247bfd 100644 --- a/src/pmc/parrotinterpreter.pmc +++ b/src/pmc/parrotinterpreter.pmc @@ -360,6 +360,7 @@ Introspection interface. C can be: "namespace" ... return namespace PMC for this sub "outer" ... return outer sub of this closure ""; level ... same for caller + "annotations"; level > 0 ... annotations at point of call s down "outer"; "" ... same for outer level 1 "outer"; ""; level ... same for outer "globals" ... return global stash @@ -452,6 +453,29 @@ Introspection interface. C can be: if (string_equal(interp, item, s) == 0) return VTABLE_clone(interp, ctx->current_cont); + s = CONST_STRING(interp, "annotations"); + + if (string_equal(interp, item, s) == 0) { + PMC *sub = ctx->current_sub; + if (ctx == CONTEXT(interp)) { + /* We can't know the current program counter for the currently + * executing sub, so can't return annotations for that. */ + if (ctx == CONTEXT(interp)) + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, + "Cannot get annotations at depth 0; use annotations op instead."); + } + if (!PMC_IS_NULL(sub) && sub->vtable->base_type == enum_class_Sub && + PMC_sub(sub)->seg->annotations) { + PackFile_ByteCode *seg = PMC_sub(sub)->seg; + opcode_t *pc = ctx->current_pc; + return PackFile_Annotations_lookup(interp, seg->annotations, + pc - seg->base.data, NULL); + } + else { + return pmc_new(interp, enum_class_Hash); + } + } + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ATTRIB_NOT_FOUND, "No such item %Ss", item); } diff --git a/src/stacks.c b/src/stacks.c index 73aba33e61..7ab486127e 100644 --- a/src/stacks.c +++ b/src/stacks.c @@ -103,7 +103,7 @@ Stack_Chunk_t * new_stack(PARROT_INTERP, ARGIN(const char *name)) { ASSERT_ARGS(new_stack) - Small_Object_Pool * const pool = make_bufferlike_pool(interp, sizeof (Stack_Chunk_t)); + Small_Object_Pool * const pool = get_bufferlike_pool(interp, sizeof (Stack_Chunk_t)); Stack_Chunk_t * const chunk = (Stack_Chunk_t *)(pool->get_free_object)(interp, pool); chunk->prev = chunk; /* mark the top of the stack */ diff --git a/src/stm/backend.c b/src/stm/backend.c index 1bccb45936..07e46a7c06 100644 --- a/src/stm/backend.c +++ b/src/stm/backend.c @@ -298,7 +298,7 @@ Parrot_STM_alloc(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc)) Small_Object_Pool *ignored; STM_TRACE("Parrot_STM_alloc"); - ignored = make_bufferlike_pool(interp, sizeof (Parrot_STM_PMC_handle_data)); + ignored = get_bufferlike_pool(interp, sizeof (Parrot_STM_PMC_handle_data)); UNUSED(ignored); handle = (Parrot_STM_PMC_handle_data *)new_bufferlike_header(interp, sizeof (Parrot_STM_PMC_handle_data)); diff --git a/src/thread.c b/src/thread.c index fa895a49ec..951a41c00c 100644 --- a/src/thread.c +++ b/src/thread.c @@ -1263,7 +1263,7 @@ pt_suspend_self_for_gc(PARROT_INTERP) /* mark and sweep our world -- later callbacks will keep * it sync'd */ - Parrot_dod_ms_run(interp, GC_trace_stack_FLAG); + Parrot_gc_ms_run(interp, GC_trace_stack_FLAG); PARROT_ASSERT(!(interp->thread_data->state & THREAD_STATE_SUSPENDED_GC)); } diff --git a/t/codingstd/c_arg_assert.t b/t/codingstd/c_arg_assert.t index 07e2fa1231..cc0801cb9e 100644 --- a/t/codingstd/c_arg_assert.t +++ b/t/codingstd/c_arg_assert.t @@ -46,7 +46,7 @@ sub check_asserts { my @lines = ($file->read()); foreach my $line (@lines) { if($line =~ /^#define ASSERT_ARGS_([_a-zA-Z0-9]+)\s/s) { - push(@defines, $1); + push(@defines, [$1, $path] ); } if($line =~ /^\s+ASSERT_ARGS\(([_a-zA-Z0-9]+)\)$/) { my $func = $1; @@ -60,12 +60,12 @@ sub check_asserts { } # next, cross reference them. - my @missing = grep { !exists($usages{$_}) } @defines; + my @missing = grep { !exists($usages{$_->[0]}) } @defines; ok(!scalar @missing); if(scalar @missing) { diag("unused assert macros found:"); - foreach my $missing (sort @missing) { - diag($missing); + foreach my $missing (sort { $a->[1] . $a->[0] cmp $b->[1] . $b->[0]} @missing) { + diag($missing->[1] . ": " . $missing->[0]); } diag(scalar(@missing) . " unused assert macros found in total."); } diff --git a/t/codingstd/linelength.t b/t/codingstd/linelength.t index 6150af7c0d..f131417078 100644 --- a/t/codingstd/linelength.t +++ b/t/codingstd/linelength.t @@ -44,7 +44,6 @@ my %lang_is_checked = map { $_ => 1 } qw{ cardinal dotnet eclectus - hq9plus lazy-k lua m4 diff --git a/t/codingstd/perlcritic.t b/t/codingstd/perlcritic.t index 374d6b8b16..41d53dde8c 100644 --- a/t/codingstd/perlcritic.t +++ b/t/codingstd/perlcritic.t @@ -1,5 +1,5 @@ #! perl -# Copyright (C) 2008, The Perl Foundation. +# Copyright (C) 2008-2009, The Perl Foundation. # $Id$ use strict; @@ -45,7 +45,7 @@ if ( !@ARGV ) { # they wish to be tested. Language developers: don't break the build! my $languages_dir = File::Spec->catdir( $PConfig{build_dir}, 'languages'); - my $filter_languages = qr/^\Q$languages_dir$PConfig{slash}\E(?!eclectus|hq9plus|m4|pipp)/x; + my $filter_languages = qr/^\Q$languages_dir$PConfig{slash}\E(?!eclectus|m4|pipp)/x; @files = grep {! m/$filter_languages/} map { $_->path } diff --git a/t/library/File_Spec.t b/t/library/File_Spec.t index 87663b912c..0030dfdfb3 100644 --- a/t/library/File_Spec.t +++ b/t/library/File_Spec.t @@ -1,20 +1,14 @@ -#! perl -# Copyright (C) 2001-2008, The Perl Foundation. +#! parrot +# Copyright (C) 2001-2009, The Perl Foundation. # $Id$ -use strict; -use warnings; -use lib qw( t . lib ../lib ../../lib ); -use Test::More; -use Parrot::Test tests => 20; - =head1 NAME -t/library/File-Spec.t - test File::Spec module +t/library/File_Spec.t - test File::Spec module =head1 SYNOPSIS - % prove t/library/File-Spec.t + % prove t/library/File_Spec.t =head1 DESCRIPTION @@ -25,93 +19,87 @@ Tests file specifications. ############################## # File::Spec -my $PRE = <<'PRE'; -.sub 'main' :main - load_bytecode 'library/File/Spec.pir' +.sub main :main + .include 'test_more.pir' + plan(22) + + FS_load_bytecode() + FS_new() + FS_can() + FS_isa() + FS_version() + FS_private_subs() +.end + +.sub FS_load_bytecode + load_bytecode 'File/Spec.pir' + ok(1, 'load_bytecode') +.end + +.sub FS_new + .local pmc spec + + spec = new 'File::Spec' + ok(1, 'new') +.end + +.sub FS_can + .local pmc spec + .local pmc method_list + + $S0 = '__isa VERSION devnull tmpdir case_tolerant file_name_is_absolute ' + $S0 = concat $S0, 'catfile catdir path canonpath splitpath splitdir ' + $S0 = concat $S0, 'catpath abs2rel rel2abs' + method_list = split ' ', $S0 + + spec = new 'File::Spec' + + LOOP: + $I0 = elements method_list + if $I0 == 0 goto END_TEST + $S0 = method_list.'shift'() + $I0 = can spec, $S0 + $S1 = concat 'File::Spec can ', $S0 + ok($I0, $S1) + goto LOOP + + END_TEST: +.end + +.sub FS_isa + .local pmc spec + + spec = new 'File::Spec' + isa_ok(spec, 'File::Spec') + $S0 = spec.'__isa'() + like($S0, "File '::' Spec '::' .+", 'The object isa File::Spec::.+') +.end + +.sub FS_version + .local pmc spec + + spec = new 'File::Spec' + $S0 = spec.'VERSION'() + is($S0, '0.1', 'VERSION 0.1') +.end + +.sub FS_private_subs + .local pmc spec - .local int classtype - .local pmc spec + spec = new 'File::Spec' + .local string module + .local pmc get_module + get_module = get_hll_global [ 'File::Spec' ], '_get_module' - spec = new 'File::Spec' + module = get_module( 'MSWin32' ) + is(module, 'Win32', 'File::Spec module for MSWin32 is Win32') -PRE -my $POST = <<'POST'; - goto OK -NOK: - print "not " -OK: - print "ok" -END: - print "\n" + module = get_module( 'foobar' ) + is(module, 'Unix', 'File::Spec module for foobar is Unix') .end -POST - -## 1 -pir_output_is( <<'CODE'. $POST, <<'OUT', "load_bytecode" ); -.sub 'main' :main - load_bytecode 'File/Spec.pir' -CODE -ok -OUT - -pir_output_is( $PRE . <<'CODE'. $POST, <<'OUT', "new" ); -CODE -ok -OUT - -my @meths = ( - qw/ - __isa VERSION devnull tmpdir case_tolerant file_name_is_absolute catfile - catdir path canonpath splitpath splitdir catpath abs2rel rel2abs - / -); -pir_output_is( $PRE . <<"CODE". $POST, <<'OUT', "can ($_)" ) for @meths; - .local pmc meth - \$I0 = can spec, "$_" - unless \$I0, NOK -CODE -ok -OUT - -pir_output_like( $PRE . <<'CODE'. $POST, <<'OUT', "isa" ); - .local pmc class - class= new 'String' - - class= spec.'__isa'() - print class - print "\n" -CODE -/^File::Spec::.+/ -OUT - -pir_output_is( $PRE . <<'CODE'. $POST, <<'OUT', "version" ); - .local pmc version - version= spec.'VERSION'() - print version - goto END -CODE -0.1 -OUT - -## testing private subs -pir_output_is( $PRE . <<'CODE'. $POST, <<'OUT', "_get_module" ); - .local string module - .local pmc get_module - get_module = get_hll_global [ 'File::Spec' ], '_get_module' - module= get_module( 'MSWin32' ) - print module - print "\n" - module= get_module( 'foobar' ) - print module - goto END -CODE -Win32 -Unix -OUT # Local Variables: -# mode: cperl -# cperl-indent-level: 4 +# mode: pir # fill-column: 100 # End: -# vim: expandtab shiftwidth=4: +# vim: expandtab shiftwidth=4 ft=pir: diff --git a/t/library/data_escape.t b/t/library/data_escape.t index 372d11db40..d49264a657 100644 --- a/t/library/data_escape.t +++ b/t/library/data_escape.t @@ -1,13 +1,7 @@ -#!perl -# Copyright (C) 2001-2006, The Perl Foundation. +#! parrot +# Copyright (C) 2001-2009, The Perl Foundation. # $Id$ -use strict; -use warnings; -use lib qw( t . lib ../lib ../../lib ); -use Test::More; -use Parrot::Test tests => 22; - =head1 NAME t/library/data_escape.t - Data::Escape tests @@ -18,108 +12,92 @@ t/library/data_escape.t - Data::Escape tests =cut -my $lib = 'Data/Escape.pir'; -my $ns = 'Data::Escape'; -my @subs = qw/ String /; - -my $PRE = <<"PRE"; .sub main :main - load_bytecode "$lib" + .include 'test_more.pir' + plan(22) + + DE_load_bytecode() + DE_get_global() + DE_escape_string_empty_string() + DE_escape_string_no_escapes() + DE_escape_string_tab_carriage_return_linefeed() + DE_escape_string_other_characters_less_than_32() + DE_escape_string_single_quote() + DE_escape_string_double_quote() + DE_escape_string_single_and_double_escape_single() + DE_escape_string_single_and_double_escape_double() + DE_escape_string_backslash() + DE_escape_string_unprintable_followed_by_numbers() + DE_escape_string_non_ascii() + DE_escape_string_freeze_a_simple_pmc() + DE_unicode_test() +.end - .local pmc escape_string +.sub DE_load_bytecode + load_bytecode 'Data/Escape.pir' + ok(1, 'load_bytecode') +.end - escape_string = get_global ['$ns'], 'String' -PRE +.sub DE_get_global + .local pmc sub_list, sub_obj + .local string test_message -my $POST = <<'POST'; -NOK: - print "not " -OK: - print "ok" -END: - print "\n" -.end -POST + $S0 = 'String' + sub_list = split ' ', $S0 -## 1 -pir_output_is( <= 32 goto DONE x = chr index @@ -128,98 +106,80 @@ LOOP: inc index branch LOOP -DONE: + DONE: str = escape_string( str, "'" ) + is(str, '\000\001\002\003\004\005\006\007\010\t\n\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037', 'escape_string: other characters less than 32') +.end - print str - goto END -CODE -\000\001\002\003\004\005\006\007\010\t\n\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 -OUT +.sub DE_escape_string_single_quote + .local pmc escape_string + escape_string = get_global ['Data::Escape'], 'String' -pir_output_is( $PRE . <<'CODE' . $POST, <<'OUT', "escape_string: single quote" ); .local string str - - str = "a'b'c'" + str = "a'b'c" str = escape_string( str, "'" ) + is(str, "a\\'b\\'c", 'escape_string: single quote') +.end - print str - goto END -CODE -a\'b\'c\' -OUT +.sub DE_escape_string_double_quote + .local pmc escape_string + escape_string = get_global ['Data::Escape'], 'String' -pir_output_is( $PRE . <<'CODE' . $POST, <<'OUT', "escape_string: double quote" ); .local string str - - str = 'a"b"c"' + str = 'a"b"c' str = escape_string( str, '"' ) + is(str, 'a\"b\"c', 'escape_string: double quote') +.end - print str - goto END -CODE -a\"b\"c\" -OUT +.sub DE_escape_string_single_and_double_escape_single + .local pmc escape_string + escape_string = get_global ['Data::Escape'], 'String' -pir_output_is( $PRE . <<'CODE' . $POST, <<'OUT', "escape_string: single double: escape single" ); .local string str - str = "ab\"'\"'c" str = escape_string( str, "'" ) + is(str, "ab\"\\'\"\\'c",'escape_string: single and double, escape single') +.end - print str - goto END -CODE -ab"\'"\'c -OUT +.sub DE_escape_string_single_and_double_escape_double + .local pmc escape_string + escape_string = get_global ['Data::Escape'], 'String' -pir_output_is( $PRE . <<'CODE' . $POST, <<'OUT', "escape_string: single & double: escape double" ); .local string str - str = "ab\"'\"'c" str = escape_string( str, '"' ) + is(str, "ab\\\"'\\\"'c", 'escape_string: single and double, escape double') +.end - print str - goto END -CODE -ab\"'\"'c -OUT +.sub DE_escape_string_backslash + .local pmc escape_string + escape_string = get_global ['Data::Escape'], 'String' -pir_output_is( $PRE . <<'CODE' . $POST, <<'OUT', "escape_string: backslash" ); .local string str - str = '\ abc \t' str = escape_string( str, '"' ) + is(str, '\\ abc \\t', 'escape_string: backslash') +.end - print str - goto END -CODE -\\ abc \\t -OUT +.sub DE_escape_string_unprintable_followed_by_numbers + .local pmc escape_string + escape_string = get_global ['Data::Escape'], 'String' -pir_output_is( $PRE . <<'CODE' . $POST, <<'OUT', "escape_string: unprintable followed by numbers" ); .local string str - str = chr 2 concat str, '123' str = escape_string( str, '"' ) + is(str, '\002123', 'escape_string: unprintable followed by numbers') +.end + +.sub DE_escape_string_non_ascii + todo(0, 'escape_string: non-ascii', 'test not written') +.end + +.sub DE_escape_string_freeze_a_simple_pmc + .local pmc escape_string + escape_string = get_global ['Data::Escape'], 'String' - print str - goto END -CODE -\002123 -OUT - -SKIP: { - skip 'test not written' => 1; - pir_output_is( - $PRE . <<'CODE' . $POST, <<'OUT', "escape_string: non-ascii", todo => 'test not written' ); -CODE -ok -OUT -} - -pir_output_is( $PRE . <<'CODE', <<'OUT', "escape_string: freeze a simple pmc" ); .local pmc original_pmc original_pmc = new 'String' original_pmc = "ok\n" @@ -234,40 +194,67 @@ pir_output_is( $PRE . <<'CODE', <<'OUT', "escape_string: freeze a simple pmc" ); pir_code = ".sub test :anon\n$P1 = thaw binary:\"" pir_code .= escaped_frozen_pmc - pir_code .= "\"\nprint $P1\n.end\n" + pir_code .= "\"\n.return($P1)\n.e" + # split sub ending to play nice with some editors + pir_code .= "nd\n" .local pmc pir_compiler pir_compiler = compreg "PIR" .local pmc compiled_sub compiled_sub = pir_compiler(pir_code) - compiled_sub() + $P0 = compiled_sub() + is($P0, "ok\n", 'escape_string: freeze a simple pmc') .end -CODE -ok -OUT -my @codes = qw/ 0666 0777 0888 0999 6666 7777 8888 9999/; +.sub _unicode_gen + .param string codepoint + + .local string pir_code + pir_code = ".sub ugen :anon\n$S0 = unicode:\"\\u" + pir_code .= codepoint + pir_code .= "\"\n.return($S0)\n.e" + # split sub ending to play nice with some editors + pir_code .= "nd\n" + + .local pmc pir_compiler, compiled_sub + pir_compiler = compreg "PIR" + compiled_sub = pir_compiler(pir_code) + .tailcall compiled_sub() +.end + +.sub DE_unicode_test + .local pmc escape_string + escape_string = get_global ['Data::Escape'], 'String' + + .local pmc codepoint_list + $S0 = '0666 0777 0888 0999 6666 7777 8888 9999' + codepoint_list = split ' ', $S0 + + .local string s_codepoint, i_codepoint + .local string str, expected, test_message + + LOOP: + $I0 = elements codepoint_list + if $I0 == 0 goto TEST_END + s_codepoint = codepoint_list.'shift'() + $I1 = s_codepoint + i_codepoint = $I1 + + expected = concat "\\x{", i_codepoint + expected .= "}" + test_message = concat "escape_string: unicode: ", s_codepoint + str = _unicode_gen(s_codepoint) -my $unicode_test = $PRE . << 'CODE' . $POST; - .local string str - str = unicode:"\u%s" str = escape_string( str, '"' ) - print str - goto END -CODE - -foreach my $codepoint (@codes) { - pir_output_is( - ( sprintf $unicode_test, $codepoint ), - ( sprintf "\\x{%i}\n", $codepoint ), - "escape_string: unicode: $codepoint" - ); -} + is(str, expected, test_message) + goto LOOP + + TEST_END: +.end # Local Variables: -# mode: cperl -# cperl-indent-level: 4 +# mode: pir # fill-column: 100 # End: -# vim: expandtab shiftwidth=4: +# vim: expandtab shiftwidth=4 ft=pir: diff --git a/t/op/annotate.t b/t/op/annotate.t index a0d230cbc0..c186771a25 100644 --- a/t/op/annotate.t +++ b/t/op/annotate.t @@ -19,12 +19,13 @@ Test various use cases of the annotate directive. .sub main :main .include 'include/test_more.pir' - plan(25) + plan(29) 'no_annotations'() 'annotations_exception'() 'annotations_ops'() 'backtrace_annotations'() + 'parrotinterpreter_annotations'() .end @@ -162,6 +163,36 @@ Test various use cases of the annotate directive. .end +.sub 'parrotinterpreter_annotations' + .annotate 'file', 'answer.p6' + .annotate 'line', 42 + $P0 = new 'ParrotInterpreter' + + .annotate 'line', 43 + 'test_callee'() +.end + +.sub 'test_callee' + .annotate 'line', 100 + $P0 = new 'ParrotInterpreter' + $P1 = $P0['annotations'; 1] + $S0 = $P1['file'] + 'is'($S0, 'answer.p6', 'annotations for caller sub returend with level 1') + $I0 = $P1['line'] + 'is'($I0, 43, 'annotations from caller sub returned at point of call with level 1') + 'test_outer'() +.end + +.sub 'test_outer' :outer('parrotinterpreter_annotations') + .annotate 'line', 101 + $P0 = new 'ParrotInterpreter' + $P1 = $P0['outer'; 'annotations'; 1] + $S0 = $P1['file'] + 'is'($S0, 'answer.p6', 'annotations for outer sub returend with level 1') + $I0 = $P1['line'] + 'is'($I0, 43, 'annotations from outer sub returned at point of call with level 1') +.end + # Local Variables: # mode: pir # fill-column: 100 diff --git a/t/pmc/complex.t b/t/pmc/complex.t index a98df3a308..52d5bc51e1 100644 --- a/t/pmc/complex.t +++ b/t/pmc/complex.t @@ -719,13 +719,6 @@ handler: .endm .sub ln_of_complex_numbers - .local pmc config_hash, interp - .local string osname - interp = getinterp - config_hash = interp[.IGLOBALS_CONFIG_HASH] - osname = config_hash["os_name"] - eq osname, "MSWin32", win32fail - .complex_op_is("-2+0i", "0.693147+3.141593i", 'ln' ) .complex_op_is("-1+0i", "0.000000+3.141593i", 'ln' ) .complex_op_is("-0.5+0i", "-0.693147+3.141593i", 'ln' ) @@ -747,10 +740,6 @@ handler: .complex_op_is("2-3i", "1.282475-0.982794i", 'ln' ) .complex_op_is("-2+3i", "1.282475+2.158799i", 'ln' ) .complex_op_is("-2-3i", "1.282475-2.158799i", 'ln' ) - .return() - -win32fail: - skip( 17, 'inf is not platform-independent' ) .end .sub exp_of_complex_numbers @@ -1031,10 +1020,10 @@ win32fail: .sub sinh_of_complex_numbers .local pmc config_hash, interp + .local string osname interp = getinterp config_hash = interp[.IGLOBALS_CONFIG_HASH] - $S0 = config_hash["os_name"] - eq $S0, "MSWin32", win32fail + osname = config_hash["osname"] .complex_op_is("-2+0i", "-3.626860+0.000000i", 'sinh' ) .complex_op_is("-1+0i", "-1.175201+0.000000i", 'sinh' ) @@ -1042,21 +1031,23 @@ win32fail: .complex_op_is("0.5+0i", "0.521095+0.000000i", 'sinh' ) .complex_op_is("1+0i", "1.175201+0.000000i", 'sinh' ) .complex_op_is("2+0i", "3.626860+0.000000i", 'sinh' ) - .complex_op_is("0-2i", "-0.000000-0.909297i", 'sinh' ) .complex_op_is("0-1i", "0.000000-0.841471i", 'sinh' ) .complex_op_is("0-0.5i", "0.000000-0.479426i", 'sinh' ) .complex_op_is("0+0.5i", "0.000000+0.479426i", 'sinh' ) .complex_op_is("0+1i", "0.000000+0.841471i", 'sinh' ) - .complex_op_is("0+2i", "-0.000000+0.909297i", 'sinh' ) .complex_op_is("0+0i", "0.000000+0.000000i", 'sinh' ) .complex_op_is("2+3i", "-3.590565+0.530921i", 'sinh' ) .complex_op_is("2-3i", "-3.590565-0.530921i", 'sinh' ) .complex_op_is("-2+3i", "3.590565+0.530921i", 'sinh' ) .complex_op_is("-2-3i", "3.590565-0.530921i", 'sinh' ) + + eq osname, "MSWin32", win32fail + .complex_op_is("0-2i", "-0.000000-0.909297i", 'sinh' ) + .complex_op_is("0+2i", "-0.000000+0.909297i", 'sinh' ) .return() win32fail: - skip( 17, 'failing on win32' ) + skip( 2, 'failing on win32' ) .end .sub cosh_of_complex_numbers diff --git a/t/pmc/fixedstringarray.t b/t/pmc/fixedstringarray.t index e02314b3f2..528d04171f 100644 --- a/t/pmc/fixedstringarray.t +++ b/t/pmc/fixedstringarray.t @@ -24,7 +24,7 @@ out-of-bounds test. Checks INT and PMC keys. =cut pasm_output_is( <<'CODE', <<'OUTPUT', "Setting array size" ); - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] set I0,P0 eq I0,0,OK_1 @@ -44,7 +44,7 @@ ok 2 OUTPUT pasm_error_output_like( <<'CODE', <<'OUTPUT', "Resetting array size (and getting an exception)" ); - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] set I0,P0 set P0,1 @@ -61,7 +61,7 @@ OUTPUT #VIM's syntax highlighter needs this line pasm_output_is( <<'CODE', <<'OUTPUT', "Setting first element" ); - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] set P0, 1 set P0[0],-7 @@ -90,7 +90,7 @@ ok 3 OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "Setting second element" ); - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] set P0, 2 set P0[1], -7 @@ -119,7 +119,7 @@ ok 3 OUTPUT pasm_error_output_like( <<'CODE', <<'OUTPUT', "Setting out-of-bounds elements" ); - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] set P0, 1 set P0[1], -7 @@ -131,7 +131,7 @@ current instr\.:/ OUTPUT pasm_error_output_like( <<'CODE', <<'OUTPUT', "Getting out-of-bounds elements" ); - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] set P0, 1 set I0, P0[1] @@ -143,9 +143,9 @@ OUTPUT pasm_output_is( <<"CODE", <<'OUTPUT', "Set via PMC keys, access via INTs" ); .include 'include/fp_equality.pasm' - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] set P0, 3 - new P1, 'Key' + new P1, ['Key'] set P1, 0 set P0[P1], 25 @@ -180,17 +180,17 @@ OUTPUT pasm_output_is( <<"CODE", <<'OUTPUT', "Set via INTs, access via PMC Keys" ); .include 'include/fp_equality.pasm' - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] set P0, 1024 set P0[25], 125 set P0[128], 10.2 set P0[513], "cow" - new P1, 'Integer' + new P1, ['Integer'] set P1, 123456 set P0[1023], P1 - new P2, 'Key' + new P2, ['Key'] set P2, 25 set I0, P0[P2] eq I0, 125, OK1 @@ -228,7 +228,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "check whether interface is done" ); .sub _main .local pmc pmc1 - pmc1 = new 'FixedStringArray' + pmc1 = new ['FixedStringArray'] .local int bool1 does bool1, pmc1, "scalar" print bool1 @@ -248,7 +248,7 @@ CODE OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "Clone" ); - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] set P0, 3 set P0[0], "abcde" set P0[1], "fghi" @@ -270,7 +270,7 @@ abcdefghijkl OUTPUT pasm_error_output_like( <<'CODE', <<'OUTPUT', "Cloning before size is set" ); - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] clone P1, P0 set P0, 10 set P1, 20 @@ -287,7 +287,7 @@ OUTPUT #VIM's syntax highlighter needs this line pasm_output_is( <<'CODE', <<'OUTPUT', "Truth" ); - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] unless P0, OK1 print "not " OK1: print "ok 1\n" @@ -302,7 +302,7 @@ ok 2 OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "Garbage collection" ); - new P0, 'FixedStringArray' + new P0, ['FixedStringArray'] set P0, 8192 set I0, 0 L1: set P0[I0], I0 @@ -331,7 +331,7 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "get_iter" ); .sub 'main' :main - new $P0, 'FixedStringArray' + new $P0, ['FixedStringArray'] set $P0, 3 $P0[0] = 42 $P0[1] = 43 @@ -355,7 +355,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw" ); .local pmc fsa, it .local string s - new fsa, 'FixedStringArray' + new fsa, ['FixedStringArray'] fsa = 5 fsa[0] = 42 fsa[1] = 43 diff --git a/t/pmc/float.t b/t/pmc/float.t index f4c47b9456..12e223f3c4 100644 --- a/t/pmc/float.t +++ b/t/pmc/float.t @@ -26,7 +26,7 @@ Tests the Float PMC. pasm_output_is( <<"CODE", < 1 if $^O =~ m/win32/i; pasm_output_like( << 'CODE', << 'OUTPUT', "neg 0" ); - new P0, 'Float' + new P0, ['Float'] set P0, 0.0 neg P0 print P0 @@ -519,11 +519,11 @@ OUTPUT } pasm_output_is( << 'CODE', << 'OUTPUT', "Equality" ); - new P0, 'Float' + new P0, ['Float'] set P0, 1e8 - new P1, 'Float' + new P1, ['Float'] set P1, 1e8 - new P2, 'Float' + new P2, ['Float'] set P2, 2.4 eq P0, P1, OK1 @@ -577,7 +577,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "check whether interface is done" ); .sub _main .local pmc pmc1 - pmc1 = new 'Float' + pmc1 = new ['Float'] .local int bool1 does bool1, pmc1, "scalar" print bool1 @@ -598,7 +598,7 @@ OUTPUT pasm_output_is( << "CODE", << 'OUTPUT', "Abs" ); .include 'include/fp_equality.pasm' - new P0, 'Float' + new P0, ['Float'] set P0, 1.0 abs P0 eq P0, P0, OK1 @@ -613,7 +613,7 @@ OK1: print "ok 1\\n" print "not " OK2: print "ok 2\\n" - new P1, 'Float' + new P1, ['Float'] set P0, -5.0 abs P1, P0 .fp_eq_pasm(P1, 5.0, OK3) @@ -628,7 +628,7 @@ ok 3 OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: lt" ); - new P1, 'Float' + new P1, ['Float'] set P1, 111.1 set N1, P1 @@ -653,13 +653,13 @@ ok 3 OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: lt_num" ); - new P1, 'Float' + new P1, ['Float'] set P1, 1.1 - new P2, 'Float' + new P2, ['Float'] set P2, 1.2 - new P3, 'Float' + new P3, ['Float'] set P3, 1.0 - new P4, 'Float' + new P4, ['Float'] set P4, P1 lt_num P1, P2, OK1 @@ -683,7 +683,7 @@ ok 3 OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: le" ); - new P1, 'Float' + new P1, ['Float'] set P1, 111.1 set N1, P1 @@ -707,13 +707,13 @@ ok 3 OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: le_num" ); - new P1, 'Float' + new P1, ['Float'] set P1, 1.1 - new P2, 'Float' + new P2, ['Float'] set P2, 1.2 - new P3, 'Float' + new P3, ['Float'] set P3, 1.0 - new P4, 'Float' + new P4, ['Float'] set P4, P1 le_num P1, P2, OK1 @@ -736,7 +736,7 @@ ok 3 OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: gt" ); - new P1, 'Float' + new P1, ['Float'] set P1, 111.1 set N1, P1 @@ -761,13 +761,13 @@ ok 3 OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: gt_num" ); - new P1, 'Float' + new P1, ['Float'] set P1, 1.1 - new P2, 'Float' + new P2, ['Float'] set P2, 1.2 - new P3, 'Float' + new P3, ['Float'] set P3, 1.0 - new P4, 'Float' + new P4, ['Float'] set P4, P1 gt_num P1, P2, BAD1 @@ -791,7 +791,7 @@ ok 3 OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: ge" ); - new P1, 'Float' + new P1, ['Float'] set P1, 111.1 set N1, P1 @@ -815,13 +815,13 @@ ok 3 OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: ge_num" ); - new P1, 'Float' + new P1, ['Float'] set P1, 1.1 - new P2, 'Float' + new P2, ['Float'] set P2, 1.2 - new P3, 'Float' + new P3, ['Float'] set P3, 1.0 - new P4, 'Float' + new P4, ['Float'] set P4, P1 ge_num P1, P2, BAD1 @@ -844,7 +844,7 @@ ok 3 OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: cmp_p_n" ); - new P1, 'Float' + new P1, ['Float'] set P1, 123.45 set N1, 123.45 set N2, -1.0 @@ -867,12 +867,12 @@ CODE OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: isgt" ); - new P1, 'Float' - new P2, 'Float' - new P3, 'Float' - new P4, 'Integer' - new P5, 'Integer' - new P6, 'Float' + new P1, ['Float'] + new P2, ['Float'] + new P3, ['Float'] + new P4, ['Integer'] + new P5, ['Integer'] + new P6, ['Float'] set P1, 10.0 set P2, 20.0 @@ -910,12 +910,12 @@ CODE OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: isge" ); - new P1, 'Float' - new P2, 'Float' - new P3, 'Float' - new P4, 'Integer' - new P5, 'Integer' - new P6, 'Float' + new P1, ['Float'] + new P2, ['Float'] + new P3, ['Float'] + new P4, ['Integer'] + new P5, ['Integer'] + new P6, ['Float'] set P1, 10.0 set P2, 20.0 @@ -953,12 +953,12 @@ CODE OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: islt" ); - new P1, 'Float' - new P2, 'Float' - new P3, 'Float' - new P4, 'Integer' - new P5, 'Integer' - new P6, 'Float' + new P1, ['Float'] + new P2, ['Float'] + new P3, ['Float'] + new P4, ['Integer'] + new P5, ['Integer'] + new P6, ['Float'] set P1, 10.0 set P2, 20.0 @@ -996,12 +996,12 @@ CODE OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: isle" ); - new P1, 'Float' - new P2, 'Float' - new P3, 'Float' - new P4, 'Integer' - new P5, 'Integer' - new P6, 'Float' + new P1, ['Float'] + new P2, ['Float'] + new P3, ['Float'] + new P4, ['Integer'] + new P5, ['Integer'] + new P6, ['Float'] set P1, 10.0 set P2, 20.0 @@ -1039,10 +1039,10 @@ CODE OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: iseq" ); - new P1, 'Float' - new P2, 'Float' - new P3, 'Float' - new P4, 'Integer' + new P1, ['Float'] + new P2, ['Float'] + new P3, ['Float'] + new P4, ['Integer'] set P1, 2.5 set P2, 2.6 @@ -1070,10 +1070,10 @@ CODE OUTPUT pasm_output_is( << 'CODE', << 'OUTPUT', "comparison ops: isne" ); - new P1, 'Float' - new P2, 'Float' - new P3, 'Float' - new P4, 'Integer' + new P1, ['Float'] + new P2, ['Float'] + new P3, ['Float'] + new P4, ['Integer'] set P1, 2.5 set P2, 2.6 @@ -1114,9 +1114,9 @@ pir_output_is( <<'CODE', <<'OUTPUT', 'cmp functions for subclasses' ); .sub main :main $P0 = subclass 'Float', 'Flt' - $P1 = new 'Flt' + $P1 = new ['Flt'] $P1 = 1.5 - $P2 = new 'Flt' + $P2 = new ['Flt'] $P2 = 2.73 $I0 = cmp $P1, $P2 diff --git a/t/pmc/freeze.t b/t/pmc/freeze.t index c403b2a01c..66b071c16c 100644 --- a/t/pmc/freeze.t +++ b/t/pmc/freeze.t @@ -26,7 +26,7 @@ Tests the freeze/thaw archiving subsystem. END { unlink "temp.fpmc"; } pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a Integer" ); - new P1, 'Integer' + new P1, ['Integer'] set P1, 777 freeze S0, P1 @@ -42,7 +42,7 @@ Integer 777 OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a String" ); - new P1, 'String' + new P1, ['String'] set P1, "foo" freeze S0, P1 @@ -58,7 +58,7 @@ String foo OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a Float" ); - new P1, 'Float' + new P1, ['Float'] set P1, 3.14159 freeze S0, P1 @@ -74,11 +74,11 @@ Float 3.14159 OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a Hash" ); - new P1, 'Integer' + new P1, ['Integer'] set P1, 666 - new P0, 'Hash' + new P0, ['Hash'] set P0["k1"], P1 - new P1, 'Integer' + new P1, ['Integer'] set P1, 777 set P0["k2"], P1 freeze S0, P0 @@ -104,11 +104,11 @@ Hash 2 OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a Hash" ); - new P1, 'Integer' + new P1, ['Integer'] set P1, 666 - new P0, 'Hash' + new P0, ['Hash'] set P0["k1"], P1 - new P1, 'Integer' + new P1, ['Integer'] set P1, 777 set P0["k2"], P1 freeze S0, P0 @@ -134,9 +134,9 @@ Hash 2 OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a Integer with prop" ); - new P1, 'Integer' + new P1, ['Integer'] set P1, 666 - new P2, 'Integer' + new P2, ['Integer'] set P2, 42 setprop P1, "answer", P2 freeze S0, P1 @@ -158,14 +158,14 @@ Integer 666 OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw Array w Integer with prop" ); - new P0, 'ResizablePMCArray' - new P1, 'Integer' + new P0, ['ResizablePMCArray'] + new P1, ['Integer'] set P1, 666 push P0, P1 - new P2, 'Integer' + new P2, ['Integer'] set P2, 777 push P0, P2 - new P3, 'Integer' + new P3, ['Integer'] set P3, 42 setprop P1, "answer", P3 @@ -209,10 +209,10 @@ ok OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw array w NULL pmc" ); - new P0, 'ResizablePMCArray' + new P0, ['ResizablePMCArray'] null P1 push P0, P1 - new P1, 'Integer' + new P1, ['Integer'] set P1, 10 push P0, P1 @@ -261,15 +261,15 @@ back OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a FixedPMCArray" ); - new P0, 'FixedPMCArray' + new P0, ['FixedPMCArray'] set P0, 3 - new P1, 'Integer' + new P1, ['Integer'] set P1, 666 set P0[0], P1 - new P2, 'Integer' + new P2, ['Integer'] set P2, 777 set P0[1], P2 - new P1, 'Integer' + new P1, ['Integer'] set P1, 666 set P0[2], P1 freeze S0, P0 @@ -303,12 +303,12 @@ ok diff OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a FixedPMCArray" ); - new P0, 'FixedPMCArray' + new P0, ['FixedPMCArray'] set P0, 3 - new P1, 'Integer' + new P1, ['Integer'] set P1, 666 set P0[0], P1 - new P2, 'Integer' + new P2, ['Integer'] set P2, 777 set P0[1], P2 set P0[2], P1 @@ -444,7 +444,7 @@ ok1: new P5, S10 print "ok 3\n" - new P6, 'String' + new P6, ['String'] set P6, "ok 5\n" setattribute P5, '.aa', P6 print "ok 4\n" @@ -483,10 +483,10 @@ pasm_output_is( <<'CODE', <<'OUTPUT', "thaw class w attr same interp" ); new P5, S10 print "ok 3\n" - new P6, 'String' + new P6, ['String'] set P6, "ok 5\n" setattribute P5, ["Foo"], ".aa", P6 - new P6, 'String' + new P6, ['String'] set P6, "ok 6\n" setattribute P5, ["Foo"], ".bb", P6 print "ok 4\n" @@ -512,7 +512,7 @@ pasm_output_is( <<'CODE', <<'OUTPUT', "thaw object w attr into same interpreter" newclass P10, "Foo" addattribute P10, ".aa" addattribute P10, ".bb" - new P10, "Foo" + new P10, ['Foo'] print S10 freeze S3, P10 open P3, "temp.fpmc", 'w' @@ -527,10 +527,10 @@ pasm_output_is( <<'CODE', <<'OUTPUT', "thaw object w attr into same interpreter" print "\n" print "ok 3\n" - new P6, 'String' + new P6, ['String'] set P6, "ok 5\n" setattribute P5, ["Foo"], ".aa", P6 - new P6, 'String' + new P6, ['String'] set P6, "ok 6\n" setattribute P5, ["Foo"], ".bb", P6 print "ok 4\n" @@ -568,10 +568,10 @@ ok1: print "\n" print "ok 3\n" - new P6, 'String' + new P6, ['String'] set P6, "ok 5\n" setattribute P5, ["Foo"], ".aa", P6 - new P6, 'String' + new P6, ['String'] set P6, "ok 6\n" setattribute P5, ["Foo"], ".bb", P6 print "ok 4\n" @@ -590,17 +590,17 @@ ok 6 OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "freeze Key" ); - new P0, 'Hash' - new P1, 'FixedPMCArray' + new P0, ['Hash'] + new P1, ['FixedPMCArray'] set P1, 2 set P1[1], P0 set P0["foo"], "ok\n" set S0, P1[1; "foo"] print S0 - new P3, 'Key' + new P3, ['Key'] set P3, 1 - new P4, 'Key' + new P4, ['Key'] set P4, "foo" push P3, P4 @@ -627,7 +627,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a ResizableBooleanArray" ); .sub test :main .local pmc original_arr, thawed_arr .local string frozen_arr - original_arr = new 'ResizableBooleanArray' + original_arr = new ['ResizableBooleanArray'] set original_arr, 666 original_arr[555] = 777 @@ -691,7 +691,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a ResizablePMCArray" ); .sub test :main .local pmc original_arr, thawed_arr .local string frozen_arr - original_arr = new 'ResizablePMCArray' + original_arr = new ['ResizablePMCArray'] original_arr[0] = 1 original_arr[1] = 2.72 original_arr[2] = "three.14" @@ -757,7 +757,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a Conure" ); .local pmc cl, o cl = newclass 'Conure' addattribute cl, 'temperature' - o = new 'Conure' + o = new ['Conure'] $S0 = freeze o $P1 = thaw $S0 $P2 = getattribute $P1, 'temperature' @@ -766,7 +766,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw a Conure" ); .namespace ['Conure'] .sub __init :method - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 37 setattribute self, 'temperature', $P0 .end @@ -782,7 +782,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw obj of class w Hash attrs" ); addattribute cl, '%!key' addattribute cl, '%!klen' addattribute cl, '&!ws' - o = new 'OPTable' + o = new ['OPTable'] o."init"() o."test"() $S0 = freeze o @@ -794,8 +794,8 @@ pir_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw obj of class w Hash attrs" ); .sub "init" :method :vtable .local pmc keytable, klentable - keytable = new 'Hash' - klentable = new 'Hash' + keytable = new ['Hash'] + klentable = new ['Hash'] setattribute self, '%!key', keytable setattribute self, '%!klen', klentable .end diff --git a/t/pmc/hash.t b/t/pmc/hash.t index ebf216fc95..2c1fa211d9 100644 --- a/t/pmc/hash.t +++ b/t/pmc/hash.t @@ -102,11 +102,11 @@ well. .end .sub more_than_one_hash - new $P0, 'Hash' + new $P0, ['Hash'] set $S0, "key" set $P0[$S0], 1 - new $P1, 'Hash' + new $P1, ['Hash'] set $S1, "another_key" set $P1[$S1], 2 @@ -119,12 +119,12 @@ well. .sub null_key # See RT #59542 - new $P0, 'Hash' + new $P0, ['Hash'] $P0['yum'] = 5 null $S0 $I0 = 0 - $P2 = new 'ExceptionHandler' + $P2 = new ['ExceptionHandler'] $P2.'handle_types'(.EXCEPTION_UNEXPECTED_NULL) set_addr $P2, null_ex_eh push_eh $P2 @@ -142,7 +142,7 @@ check: .end .sub hash_keys_with_nulls_in_them - new $P0, 'Hash' + new $P0, ['Hash'] set $S0, "parp\0me" set $S1, "parp\0you" @@ -157,7 +157,7 @@ check: .end .sub nearly_the_same_hash_keys - new $P0, 'Hash' + new $P0, ['Hash'] set $S0, "a\0" set $S1, "\0a" @@ -172,7 +172,7 @@ check: .end .sub the_same_hash_keys - new $P0, 'Hash' + new $P0, ['Hash'] set $S0, "Happy" set $S1, "Happy" @@ -191,7 +191,7 @@ check: # XXX - really? .sub key_that_hashes_to_zero - new $P0, 'Hash' + new $P0, ['Hash'] set $S0, "key2" set $P0[$S0], 1 set $I0, $P0[$S0] @@ -200,7 +200,7 @@ check: .end .sub size_of_the_hash - new $P0, 'Hash' + new $P0, ['Hash'] set $P0["0"], 1 set $I0, $P0 @@ -388,7 +388,7 @@ DONE: .end .sub testing_two_hash_indices_with_integers_at_a_time - new $P0, 'Hash' + new $P0, ['Hash'] set $P0["foo"],37 set $P0["bar"],-15 @@ -409,7 +409,7 @@ DONE: .end .sub testing_two_hash_indices_with_numbers_at_a_time - new $P0, 'Hash' + new $P0, ['Hash'] set $P0["foo"],37.100000 set $P0["bar"],-15.100000 @@ -431,7 +431,7 @@ DONE: .end .sub testing_two_hash_indices_with_strings_at_a_time - new $P0, 'Hash' + new $P0, ['Hash'] set $P0["foo"],"baz" set $P0["bar"],"qux" @@ -456,9 +456,9 @@ DONE: # and/or keys. Now we try PMCs. .sub setting_and_getting_scalar_pmcs - new $P0, 'Hash' - new $P1, 'Integer' - new $P2, 'Integer' + new $P0, ['Hash'] + new $P1, ['Integer'] + new $P2, ['Integer'] set $S0, "non-PMC key" @@ -477,7 +477,7 @@ DONE: set $P2, $P0[$S0] is( $P2, $P1, 'lookup string' ) - new $P1, 'Undef' + new $P1, ['Undef'] set $P0[$S0], $P1 set $P2, $P0[$S0] typeof $S1, $P2 @@ -486,8 +486,8 @@ DONE: .end .sub setting_scalar_pmcs_and_getting_scalar_values - new $P0, 'Hash' - new $P1, 'Integer' + new $P0, ['Hash'] + new $P1, ['Integer'] set $S0, "A rather large key" @@ -512,7 +512,7 @@ DONE: .end .sub getting_values_from_undefined_keys - new $P2, 'Hash' + new $P2, ['Hash'] set $I0, $P2["qwerty"] set $N0, $P2["asdfgh"] @@ -531,9 +531,9 @@ DONE: .end .sub setting_and_getting_non_scalar_pmcs - new $P0,'Hash' - new $P1,'ResizablePMCArray' - new $P2,'ResizablePMCArray' + new $P0, ['Hash'] + new $P1, ['ResizablePMCArray'] + new $P2, ['ResizablePMCArray'] set $P1[4],"string" set $P0["one"],$P1 set $P2,$P0["one"] @@ -542,10 +542,10 @@ DONE: .end .sub testing_clone - new $P0, 'Hash' + new $P0, ['Hash'] set $S0, "a" set $P0[$S0], $S0 - new $P2, 'ResizablePMCArray' + new $P2, ['ResizablePMCArray'] set $P2, 2 set $P0["b"], $P2 @@ -596,7 +596,7 @@ DONE: .local int all_ok all_ok = 1 - h = new 'Hash' + h = new ['Hash'] h['a'] = 1 h['b'] = 2 @@ -619,7 +619,7 @@ DONE: if s1 != s2 goto fail - h = new 'Hash' + h = new ['Hash'] h['aa'] = 1 h['bb'] = 2 @@ -639,7 +639,7 @@ DONE: s2 = get_repr cloned if s1 != s2 goto fail - h = new 'Hash' + h = new ['Hash'] h['one'] = 1 h['two'] = 2 @@ -672,7 +672,7 @@ end: .local int all_ok all_ok = 1 - h = new 'Hash' + h = new ['Hash'] h['a'] = 1 h['b'] = 2 @@ -694,7 +694,7 @@ end: if s1 != s2 goto fail - h = new 'Hash' + h = new ['Hash'] h['aa'] = 1 h['bb'] = 2 @@ -715,7 +715,7 @@ end: s2 = get_repr cloned if s1 != s2 goto fail - h = new 'Hash' + h = new ['Hash'] h['one'] = 1 h['two'] = 2 @@ -744,9 +744,9 @@ end: .end .sub compound_keys - new $P0, 'Hash' - new $P1, 'Hash' - new $P2, 'ResizablePMCArray' + new $P0, ['Hash'] + new $P1, ['Hash'] + new $P2, ['ResizablePMCArray'] set $P1["b"], "ab" set $P0["a"], $P1 set $S0, $P0["a";"b"] @@ -780,9 +780,9 @@ end: .end .sub getting_pmcs_from_compound_keys - new $P0, 'Hash' - new $P1, 'Hash' - new $P2, 'Integer' + new $P0, ['Hash'] + new $P1, ['Hash'] + new $P2, ['Integer'] set $P2, 12 set $P1["b"], $P2 set $P0["a"], $P1 @@ -793,9 +793,9 @@ end: # 12 .sub getting_pmcs_from_string_int_compound_keys - new $P0, 'Hash' - new $P1, 'Hash' - new $P2, 'Integer' + new $P0, ['Hash'] + new $P1, ['Hash'] + new $P2, ['Integer'] set $P2, 4 set $P1[9], $P2 set $I0, $P1[9] @@ -809,7 +809,7 @@ end: # A hash is only false if it has size 0 .sub if_hash - new $P0, 'Hash' + new $P0, ['Hash'] ## Could just use Test::More tests directly, but then we are really ## checking casting to Int then testing value (I think) @@ -835,7 +835,7 @@ end: L3: ok( $I1, 'Hash with one value ("") is true' ) - new $P1, 'Undef' + new $P1, ['Undef'] set $P0["key"], $P1 $I1 = 1 if $P0, L4 @@ -846,7 +846,7 @@ end: .end .sub unless_hash - new $P0, 'Hash' + new $P0, ['Hash'] $I0 = 1 unless $P0, L1 @@ -869,7 +869,7 @@ end: ok( $I0, 'Hash with one value ("\0") is true' ) $I0 = 0 - new $P1, 'Undef' + new $P1, ['Undef'] set $P0["key"], $P1 unless $P0, L4 $I0 = 1 @@ -879,7 +879,7 @@ end: .end .sub defined_hash - new $P0, 'Hash' + new $P0, ['Hash'] defined $I0, $P0 ok( $I0, 'Empty has is defined' ) @@ -898,7 +898,7 @@ end: $I0 = not $I0 ok( $I0, 'Unassigned hash slot is undefined' ) - new $P1, 'Undef' + new $P1, ['Undef'] set $P0["c"], $P1 defined $I0, $P0["c"] $I0 = not $I0 @@ -906,7 +906,7 @@ end: .end .sub exists_hash_key - new $P0, 'Hash' + new $P0, ['Hash'] set $P0["a"], 1 exists $I0, $P0["a"] @@ -916,14 +916,14 @@ end: $I0 = not $I0 ok( $I0, 'unassigned hash key does not exist' ) - new $P1, 'Undef' + new $P1, ['Undef'] set $P0["c"], $P1 exists $I0, $P0["c"] ok( $I0, 'hash key assigned Undef PMC exists' ) .end .sub delete_hash_key - new $P0, 'Hash' + new $P0, ['Hash'] set $P0["a"], 1 exists $I0, $P0["a"] @@ -936,8 +936,8 @@ end: .end .sub cloning_keys - new $P10, 'Hash' - new $P1, 'Key' + new $P10, ['Hash'] + new $P1, ['Key'] set $P1, "Bar" set $P10[$P1], "Food" @@ -953,13 +953,13 @@ end: .end .sub cloning_pmc_vals - new $P10, 'Hash' + new $P10, ['Hash'] - new $P1, 'Undef' + new $P1, ['Undef'] set $P1, "value" set $P10["str"], $P1 - new $P1, 'Undef' + new $P1, ['Undef'] set $P1, 42 set $P10["int"], $P1 @@ -973,9 +973,9 @@ end: .sub delete_and_free_list set $I2, 10 set $I1, 1 - new $P0, 'SArray' + new $P0, ['SArray'] set $P0, 1 - new $P1, 'Hash' + new $P1, ['Hash'] outer: set $P0[0], $I1 sprintf $S0, "ok %vd\n", $P0 @@ -1000,7 +1000,7 @@ lp: ## XXX already tested? .sub exists_with_constant_string_key - new $P16, 'Hash' + new $P16, ['Hash'] set $P16["key1"], "value for key1" set $S16, $P16["key1"] @@ -1016,7 +1016,7 @@ lp: .sub hash_in_pir .local pmc hash1 - hash1 = new 'Hash' + hash1 = new ['Hash'] hash1['X'] = 'U' .local string val1 val1 = hash1['X'] @@ -1025,11 +1025,11 @@ lp: .sub setting_with_compound_keys .local pmc outer_hash - outer_hash = new 'Hash' + outer_hash = new ['Hash'] .local pmc inner_hash - inner_hash = new 'Hash' + inner_hash = new ['Hash'] .local pmc inner_array - inner_array = new 'ResizablePMCArray' + inner_array = new ['ResizablePMCArray'] .local string elem_string .local int elem_int .local pmc elem_pmc @@ -1073,7 +1073,7 @@ lp: # setting and retrieving a PMC in an inner ResizablePMCArray .local pmc in_pmc - in_pmc = new 'String' + in_pmc = new ['String'] in_pmc = 'inner_array:132' inner_array[132] = in_pmc outer_hash['inner_array'] = inner_array @@ -1116,7 +1116,7 @@ lp: .end .sub mutating_the_lookup_string - new $P0, 'Hash' + new $P0, ['Hash'] set $P0["a"], "one" set $P0["ab"], "two" set $P0["abc"], "three" @@ -1136,7 +1136,7 @@ lp: .sub check_whether_interface_is_done .local pmc pmc1 - pmc1 = new 'Hash' + pmc1 = new ['Hash'] .local int bool1 does bool1, pmc1, "scalar" @@ -1152,7 +1152,7 @@ lp: .end .sub iter_over_hash - new $P0, 'Hash' + new $P0, ['Hash'] set $P0['a'], 'x' iter $P1, $P0 @@ -1181,13 +1181,13 @@ lp: .local pmc thash # just put in some dummy data... - thash = new 'Hash' + thash = new ['Hash'] thash["a"] = "b" thash["c"] = "d" thash["e"] = "f" .local pmc iter - iter = new 'Iterator', thash + iter = new ['Iterator'], thash iter = .ITERATE_FROM_START .local string key @@ -1210,7 +1210,7 @@ preit_end: # what do we have after deletion? result = "" - iter = new 'Iterator', thash + iter = new ['Iterator'], thash iter = .ITERATE_FROM_START # go through the hash, print out all the keys... I believe it should be a and e? @@ -1228,7 +1228,7 @@ postit_end: .end .sub unicode_keys_register_rt_39249 - $P1 = new 'Hash' + $P1 = new ['Hash'] $S99 = unicode:"\u7777" $P1[$S99] = "ok" @@ -1237,7 +1237,7 @@ postit_end: .end .sub unicode_keys_literal_rt_39249 - $P1 = new 'Hash' + $P1 = new ['Hash'] $P1[unicode:"\u7777"] = "ok" $S1 = $P1[unicode:"\u7777"] diff --git a/t/pmc/integer.t b/t/pmc/integer.t index 9fbdfa0bb3..a9e9ca9460 100644 --- a/t/pmc/integer.t +++ b/t/pmc/integer.t @@ -27,7 +27,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "basic math" ); .sub _main .local pmc int_1 - int_1 = new 'Integer' + int_1 = new ['Integer'] print int_1 print "\n" int_1 = 1 @@ -66,7 +66,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "truth and definedness" ); .sub _main .local pmc int_1 - int_1 = new 'Integer' + int_1 = new ['Integer'] print "A newly created Integer is " if int_1 goto LABEL_1 @@ -113,7 +113,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "set_string_native" ); .sub _main .local pmc pmc1 - pmc1 = new 'Integer' + pmc1 = new ['Integer'] pmc1 = "-123456789" print pmc1 print "\n" @@ -127,7 +127,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "isa" ); .sub _main .local pmc pmc1 - pmc1 = new 'Integer' + pmc1 = new ['Integer'] .local int pmc1_is_a pmc1_is_a = isa pmc1, "Integer" @@ -147,7 +147,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "check whether interface is done" ); .sub _main .local pmc pmc1 - pmc1 = new 'Integer' + pmc1 = new ['Integer'] .local int bool1 does bool1, pmc1, "scalar" print bool1 @@ -170,7 +170,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "Comparison ops: ne" ); .sub _main .local pmc pmc1 - pmc1 = new 'Integer' + pmc1 = new ['Integer'] .local int int1 pmc1 = 10 int1 = 20 @@ -196,7 +196,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "Comparison ops: gt" ); .sub _main .local pmc pmc1 - pmc1 = new 'Integer' + pmc1 = new ['Integer'] .local int int1 pmc1 = 10 int1 = 5 @@ -230,7 +230,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "Comparison ops: ge" ); .sub _main .local pmc pmc1 - pmc1 = new 'Integer' + pmc1 = new ['Integer'] .local int int1 pmc1 = 10 int1 = 5 @@ -262,7 +262,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "Logical ops: istrue & isfalse" ); .sub _main .local pmc pmc1 - pmc1 = new 'Integer' + pmc1 = new ['Integer'] .local int int1 pmc1 = 10 istrue int1, pmc1 @@ -289,7 +289,7 @@ CODE OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "if/unless with Integer PMC" ); - new P0, 'Integer' + new P0, ['Integer'] set P0, 10 if P0, OK1 print "not " @@ -315,11 +315,11 @@ ok 4 OUTPUT pasm_output_is( <<'CODE', <<'OUT', "add" ); - new P0, 'Integer' + new P0, ['Integer'] set P0, 5 - new P1, 'Integer' + new P1, ['Integer'] set P1, 10 - new P2, 'Integer' + new P2, ['Integer'] add P2, P0, P1 set S0, P2 print S0 @@ -338,8 +338,8 @@ OUT pir_output_is( << 'CODE', << 'OUTPUT', "" ); .sub main :main - $P0 = new 'Integer' - $P1 = new 'Integer' + $P0 = new ['Integer'] + $P1 = new ['Integer'] set $P0, 6 set $P1, 2 @@ -377,7 +377,7 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "can get_as_base()" ); .sub main :main - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 42 $I0 = can $P0, 'get_as_base' if $I0, OK @@ -390,7 +390,7 @@ OUTPUT pir_error_output_like( <<'CODE', <<'OUTPUT', "get_as_base() bounds check" ); .sub main :main - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 42 $S0 = $P0.'get_as_base'(1) @@ -405,7 +405,7 @@ OUTPUT pir_error_output_like( <<'CODE', <<'OUTPUT', "get_as_base() bounds check" ); .sub main :main - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 42 $S0 = $P0.'get_as_base'(37) @@ -420,7 +420,7 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "get_as_base(10)" ); .sub main :main - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 42 $S0 = $P0.'get_as_base'(10) @@ -434,7 +434,7 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "get_as_base(various)" ); .sub main :main - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 42 $S0 = $P0.'get_as_base'(2) @@ -495,9 +495,9 @@ pir_output_is( <<'CODE', <<'OUTPUT', 'cmp functions for subclasses' ); .sub main :main $P0 = subclass 'Integer', 'Int' - $P1 = new 'Int' + $P1 = new ['Int'] $P1 = 1 - $P2 = new 'Int' + $P2 = new ['Int'] $P2 = 2 $I0 = cmp $P1, $P2 @@ -515,7 +515,7 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', 'cmp for Integers more than 2^31 apart, RT #59336' ); .sub 'main' :main - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 2147483600 test_10: diff --git a/t/pmc/intlist.t b/t/pmc/intlist.t index ed6bca2823..da3bf92213 100644 --- a/t/pmc/intlist.t +++ b/t/pmc/intlist.t @@ -455,7 +455,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "check whether interface is done" ); .sub _main .local pmc pmc1 - pmc1 = new 'IntList' + pmc1 = new ['IntList'] .local int bool1 does bool1, pmc1, "scalar" print bool1 diff --git a/t/pmc/io.t b/t/pmc/io.t index a2c1f067e6..65c13ead68 100644 --- a/t/pmc/io.t +++ b/t/pmc/io.t @@ -46,11 +46,11 @@ TODO: { .sub main $P0 = null test($P0, "Undef") - new $P0, 'Integer' + new $P0, ['Integer'] test($P0, "null") - new $P0, 'Undef' + new $P0, ['Undef'] test($P0, "Integer") - new $P0, 'String' + new $P0, ['String'] test($P0, "String") .end .sub test @@ -205,7 +205,7 @@ ok 6 OUTPUT pasm_output_is( <<"CODE", <<'OUTPUT', "read on invalid fh should throw exception" ); - new P0, 'FileHandle' + new P0, ['FileHandle'] push_eh _readline_handler readline S0, P0 @@ -295,7 +295,7 @@ pasm_output_is( <<"CODE", <<'OUTPUT', "open & print" ); set I0, -12 set N0, 2.2 set S0, "Foo" - new P0, 'String' + new P0, ['String'] set P0, "Bar\\n" open P1, "$temp_file", "w" @@ -516,7 +516,7 @@ ok 3 OUT pasm_output_is( <<'CODE', <<'OUTPUT', 'printerr' ); - new P0, 'String' + new P0, ['String'] set P0, "This is a test\n" printerr 10 printerr "\n" @@ -829,7 +829,7 @@ pir_output_is( <<'CODE', <<"OUTPUT", "string read/write handle", todo => "no str .local string greeting .local string layer - pio = new 'StringHandle' + pio = new ['StringHandle'] print pio, "Hello" print pio, ", " print pio, "world!" @@ -855,7 +855,7 @@ EOS pio = open "$temp_file", 'w' print pio, \$S0 close pio - cl = new 'FileHandle' + cl = new ['FileHandle'] \$S1 = cl.'readall'('$temp_file') if \$S0 == \$S1 goto ok print "not " diff --git a/t/pmc/io_iterator.t b/t/pmc/io_iterator.t index 14e602a8ff..5064e6b28f 100644 --- a/t/pmc/io_iterator.t +++ b/t/pmc/io_iterator.t @@ -26,18 +26,18 @@ Tests the I/O Iterator PMC described in PDD22. pir_output_is( <<'CODE', <<'OUT', 'new', todo => 'not yet implemented' ); .sub 'test' :main $P99 = 1 # RT #46847 replace with io object - $P0 = new 'Iterator', $P99 - say "ok 1 - $P0 = new 'Iterator', $P1" + $P0 = new ['Iterator'], $P99 + say "ok 1 - $P0 = new ['Iterator'], $P1" .end CODE -ok 1 - $P0 = new 'Iterator', $P1 +ok 1 - $P0 = new ['Iterator'], $P1 OUT # L pir_output_is( <<'CODE', <<'OUT', 'shift', todo => 'not yet implemented' ); .sub 'test' :main $P99 = 1 # RT #46847 replace with io object - $P0 = new 'Iterator', $P99 + $P0 = new ['Iterator'], $P99 $S0 = shift $P0 @@ -56,7 +56,7 @@ OUT pir_output_is( <<'CODE', <<'OUT', 'get_bool (vtable)', todo => 'not yet implemented' ); .sub 'test' :main $P99 = 1 # RT #46847 replace with io object - $P0 = new 'Iterator', $P99 + $P0 = new ['Iterator'], $P99 # empty i/o object unless $P0 goto ok_1 diff --git a/t/pmc/io_status.t b/t/pmc/io_status.t index fd8f943b05..72add977d1 100644 --- a/t/pmc/io_status.t +++ b/t/pmc/io_status.t @@ -26,16 +26,16 @@ Tests the Status PMC described in PDD22. pir_output_is( <<'CODE', <<'OUT', 'new', todo => 'not yet implemented' ); .sub 'test' :main new P0, 'Status' - say "ok 1 - $P0 = new 'Status'" + say "ok 1 - $P0 = new ['Status']" .end CODE -ok 1 - $P0 = new 'Status' +ok 1 - $P0 = new ['Status'] OUT # L pir_output_is( <<'CODE', <<'OUT', 'get_integer (vtable)', todo => 'not yet implemented' ); .sub 'test' :main - $P0 = new 'Status' + $P0 = new ['Status'] # TODO test more return values # TODO figure out how to set the values to make testing possible @@ -65,7 +65,7 @@ OUT # L pir_output_is( <<'CODE', <<'OUT', 'get_bool (vtable)', todo => 'not yet implemented' ); .sub 'test' :main - $P0 = new 'Status' + $P0 = new ['Status'] # TODO figure out how to set the values to make testing possible @@ -93,7 +93,7 @@ OUT # L pir_output_is( <<'CODE', <<'OUT', 'return', todo => 'not yet implemented' ); .sub 'test' :main - $P0 = new 'Status' + $P0 = new ['Status'] # TODO test all return values # TODO figure out how to set the values to make testing possible @@ -126,7 +126,7 @@ OUT # L pir_output_is( <<'CODE', <<'OUT', 'error', todo => 'not yet implemented' ); .sub 'test' :main - $P0 = new 'Status' + $P0 = new ['Status'] # TODO test all error values # TODO figure out how to set the values to make testing possible @@ -178,7 +178,7 @@ OUT # L pir_output_is( <<'CODE', <<'OUT', 'throw', todo => 'not yet implemented' ); .sub 'test' :main - $P0 = new 'Status' + $P0 = new ['Status'] # TODO figure out how to set the values to make testing possible @@ -189,7 +189,7 @@ pir_output_is( <<'CODE', <<'OUT', 'throw', todo => 'not yet implemented' ); say 'ok 1 - $P0.throw() # no error' test_2: - $P0 = new 'Status' # need error here + $P0 = new ['Status'] # need error here push_eh eh_error $P0.throw() diff --git a/t/pmc/iterator.t b/t/pmc/iterator.t index 520b1796d0..a7baa93d55 100644 --- a/t/pmc/iterator.t +++ b/t/pmc/iterator.t @@ -24,8 +24,8 @@ Tests the C PMC. =cut pasm_output_is( <<'CODE', <<'OUTPUT', "new iter" ); - new P2, 'ResizablePMCArray' - new P1, 'Iterator', P2 + new P2, ['ResizablePMCArray'] + new P1, ['Iterator'], P2 print "ok 1\n" end CODE @@ -34,24 +34,24 @@ OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "int test" ); .include "iterator.pasm" - new P0, 'ResizablePMCArray' # empty array - new P2, 'ResizablePMCArray' # array with 2 elements + new P0, ['ResizablePMCArray'] # empty array + new P2, ['ResizablePMCArray'] # array with 2 elements push P2, 10 push P2, 20 set I0, P2 - new P1, 'Iterator', P2 + new P1, ['Iterator'], P2 print "ok 1\n" set I1, P1 eq I0, I1, ok2 # iter.length() == array.length() print "not " ok2: print "ok 2\n" - new P1, 'Iterator', P0 + new P1, ['Iterator'], P0 set P1, .ITERATE_FROM_START print "ok 3\n" unless P1, ok4 # if(iter) == false on empty print "not " ok4: print "ok 4\n" - new P1, 'Iterator', P2 + new P1, ['Iterator'], P2 set P1, .ITERATE_FROM_START if P1, ok5 # if(iter) == true on non empty print "not " @@ -110,24 +110,24 @@ OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "Hash iter 1" ); .include "iterator.pasm" - new P0, 'Hash' # empty Hash - new P2, 'Hash' # Hash with 2 elements + new P0, ['Hash'] # empty Hash + new P2, ['Hash'] # Hash with 2 elements set P2["ab"], 100 set P2["xy"], "value" set I0, P2 - new P1, 'Iterator', P2 + new P1, ['Iterator'], P2 print "ok 1\n" set I1, P1 eq I0, I1, ok2 # iter.length() == hash.length() print "not " ok2: print "ok 2\n" - new P1, 'Iterator', P0 + new P1, ['Iterator'], P0 set P1, .ITERATE_FROM_START print "ok 3\n" unless P1, ok4 # if(iter) == false on empty print "not " ok4: print "ok 4\n" - new P1, 'Iterator', P2 + new P1, ['Iterator'], P2 set P1, .ITERATE_FROM_START if P1, ok5 # if(iter) == true on non empty print "not " @@ -164,24 +164,24 @@ OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "Hash iter 1" ); .include "iterator.pasm" - new P0, 'Hash' # empty Hash - new P2, 'Hash' # Hash with 2 elements + new P0, ['Hash'] # empty Hash + new P2, ['Hash'] # Hash with 2 elements set P2["ab"], 100 set P2["xy"], "value" set I0, P2 - new P1, 'Iterator', P2 + new P1, ['Iterator'], P2 print "ok 1\n" set I1, P1 eq I0, I1, ok2 # iter.length() == hash.length() print "not " ok2: print "ok 2\n" - new P1, 'Iterator', P0 + new P1, ['Iterator'], P0 set P1, .ITERATE_FROM_START print "ok 3\n" unless P1, ok4 # if(iter) == false on empty print "not " ok4: print "ok 4\n" - new P1, 'Iterator', P2 + new P1, ['Iterator'], P2 set P1, .ITERATE_FROM_START if P1, ok5 # if(iter) == true on non empty print "not " @@ -218,8 +218,8 @@ OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "Hash iter 2" ); .include "iterator.pasm" - new P0, 'Hash' # Hash for iteration - new P2, 'Hash' # for test + new P0, ['Hash'] # Hash for iteration + new P2, ['Hash'] # for test set I0, 65 set I1, 35 @@ -231,7 +231,7 @@ fill: dec I1 if I1, fill - new P1, 'Iterator', P0 + new P1, ['Iterator'], P0 set I0, P1 eq I0, I10, ok1 print "not " @@ -258,9 +258,9 @@ ok 2 OUTPUT pasm_output_is( <<'CODE', < PMC. .local string result result = '' - new $P0, 'Key' + new $P0, ['Key'] set $P0, "1" - new $P1, 'Key' + new $P1, ['Key'] set $P1, "2" push $P0, $P1 - new $P2, 'Key' + new $P2, ['Key'] set $P2, "3" push $P1, $P2 @@ -66,7 +66,7 @@ e2: .end .sub extract_int_from_string_keys - new $P0, 'ResizableStringArray' + new $P0, ['ResizableStringArray'] push $P0, 'ok1' push $P0, 'ok2' set $S0, 0 @@ -77,7 +77,7 @@ e2: .end .sub extract_string_from_int_keys - new $P0, 'Hash' + new $P0, ['Hash'] set $P0['1'], 'ok1' set $P0['2'], 'ok2' set $I0, 1 @@ -126,10 +126,10 @@ end: .sub 'xxx' :anon .local pmc call_chain, lexpad call_chain = get_root_global ['_tcl'], 'call_chain' - lexpad = new 'Hash' + lexpad = new ['Hash'] push call_chain, lexpad .local pmc arg_list - arg_list = new 'ResizablePMCArray' + arg_list = new ['ResizablePMCArray'] lexpad['args'] = arg_list $P14 = find_name "&info" $P14() @@ -142,7 +142,7 @@ code pir_compiler = compreg 'PIR' $P0 = pir_compiler($S0) $P0 = $P0[0] - $P1 = new 'TclProc' + $P1 = new ['TclProc'] assign $P1, $P0 .local pmc ns_target ns_target = get_hll_namespace @@ -156,7 +156,7 @@ code load_bytecode 'PGE.pbc' $P0 = get_class 'Sub' $P1 = subclass $P0, 'TclProc' - $P1 = new 'ResizablePMCArray' + $P1 = new ['ResizablePMCArray'] set_global 'call_chain', $P1 .end diff --git a/t/pmc/lexinfo.t b/t/pmc/lexinfo.t index d65fcad293..c30a70053f 100644 --- a/t/pmc/lexinfo.t +++ b/t/pmc/lexinfo.t @@ -26,7 +26,7 @@ Tests the LexInfo PMC. .sub new_test push_eh eh - $P0 = new 'LexInfo' + $P0 = new ['LexInfo'] pop_eh ok(0, "shouldn't be able to create a LexInfo without an initializer") goto end diff --git a/t/pmc/lexpad.t b/t/pmc/lexpad.t index f7850b2e23..06247ba81e 100644 --- a/t/pmc/lexpad.t +++ b/t/pmc/lexpad.t @@ -26,7 +26,7 @@ Tests the LexPad PMC. .sub new_test push_eh eh - $P0 = new 'LexPad' + $P0 = new ['LexPad'] pop_eh ok(0, "shouldn't be able to create a LexPad without an initializer") goto end diff --git a/t/pmc/managedstruct.t b/t/pmc/managedstruct.t index 4cbcd3e787..39680a8895 100644 --- a/t/pmc/managedstruct.t +++ b/t/pmc/managedstruct.t @@ -28,7 +28,7 @@ Tests the ManagedStruct PMC. Checks element access and memory allocation. .end .sub set_managedstruct_size - new $P0, 'ManagedStruct' + new $P0, ['ManagedStruct'] set $I0,$P0 is($I0, 0, "empty ManagedStruct has size 0") set $P0,1 @@ -43,7 +43,7 @@ Tests the ManagedStruct PMC. Checks element access and memory allocation. .sub element_access #element access - float, double - new $P2, 'ResizablePMCArray' + new $P2, ['ResizablePMCArray'] .include "datatypes.pasm" push $P2, .DATATYPE_FLOAT push $P2, 2 # 2 elem array @@ -51,7 +51,7 @@ Tests the ManagedStruct PMC. Checks element access and memory allocation. push $P2, .DATATYPE_DOUBLE push $P2, 0 push $P2, 0 - new $P0, 'ManagedStruct', $P2 + new $P0, ['ManagedStruct'], $P2 # must have set size automatically # this is hopefully 2*4+8 everywhere set $I0, $P0 @@ -75,11 +75,11 @@ Tests the ManagedStruct PMC. Checks element access and memory allocation. #element access - char, short - new $P2, 'ResizablePMCArray' + new $P2, ['ResizablePMCArray'] push $P2, .DATATYPE_CHAR push $P2, 2 # 2 elem char array push $P2, 0 - new $P0, 'ManagedStruct', $P2 + new $P0, ['ManagedStruct'], $P2 set $I0, $P0 $I1 = ge $I0, 2 ok($I1, "ManagedStruct size is at least 2") @@ -91,7 +91,7 @@ Tests the ManagedStruct PMC. Checks element access and memory allocation. set $I0, $P0[0;1] is($I0, 2, "char val of 258 retrieved as 2") # now acces that as a short - new $P2, 'ResizablePMCArray' + new $P2, ['ResizablePMCArray'] push $P2, .DATATYPE_SHORT push $P2, 1 push $P2, 0 @@ -109,7 +109,7 @@ Tests the ManagedStruct PMC. Checks element access and memory allocation. #.include "datatypes.pasm" # .sub named_element_access_int16 - new $P1, 'OrderedHash' + new $P1, ['OrderedHash'] set $P1['x'], .DATATYPE_INT16 push $P1, 0 push $P1, 0 @@ -119,7 +119,7 @@ Tests the ManagedStruct PMC. Checks element access and memory allocation. push $P1, 0 # need a ManagedStruct to allocate data memory - new $P2, 'ManagedStruct', $P1 + new $P2, ['ManagedStruct'], $P1 # calc allocation size set $I0, 0 @@ -156,16 +156,16 @@ Tests the ManagedStruct PMC. Checks element access and memory allocation. .sub nested_struct_offsets # the nested structure - new $P3, 'ResizablePMCArray' + new $P3, ['ResizablePMCArray'] push $P3, .DATATYPE_INT push $P3, 0 push $P3, 0 push $P3, .DATATYPE_INT push $P3, 0 push $P3, 0 - new $P4, 'UnManagedStruct', $P3 + new $P4, ['UnManagedStruct'], $P3 # outer structure - new $P2, 'ResizablePMCArray' + new $P2, ['ResizablePMCArray'] push $P2, .DATATYPE_INT push $P2, 0 push $P2, 0 @@ -179,7 +179,7 @@ Tests the ManagedStruct PMC. Checks element access and memory allocation. push $P2, 0 push $P2, 0 # attach struct initializer - new $P5, 'UnManagedStruct', $P2 + new $P5, ['UnManagedStruct'], $P2 # now check offsets set $I0, $P2[2] @@ -204,7 +204,7 @@ Tests the ManagedStruct PMC. Checks element access and memory allocation. .sub interface_check .local pmc pmc1 - pmc1 = new 'ManagedStruct' + pmc1 = new ['ManagedStruct'] .local int bool1 does bool1, pmc1, "scalar" is(bool1, 1, "ManagedStruct does scalar") diff --git a/t/pmc/multiarray.t b/t/pmc/multiarray.t index 4bd1f90b84..98682eafcd 100644 --- a/t/pmc/multiarray.t +++ b/t/pmc/multiarray.t @@ -24,20 +24,20 @@ and cloning. =cut pasm_output_is( <<'CODE', <<'OUTPUT', "multiarray creation" ); - new P1, 'ResizablePMCArray' + new P1, ['ResizablePMCArray'] # intial size set P1[0], 0 set P1[1], 50 # dimensions 10x5 2D array # XXX can this be done w/o push/append a key? - new P2, 'Key' + new P2, ['Key'] set P2, 10 - new P3, 'Key' + new P3, ['Key'] set P3, 5 push P2, P3 set P1[2], 1 set P1[3], P2 - new P0, 'MultiArray', P1 + new P0, ['MultiArray'], P1 print "ok\n" end CODE @@ -45,19 +45,19 @@ ok OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "multiarray access 2d" ); - new P1, 'ResizablePMCArray' + new P1, ['ResizablePMCArray'] # intial size set P1[0], 0 set P1[1], 100 # dimensions - new P2, 'Key' + new P2, ['Key'] set P2, 10 - new P3, 'Key' + new P3, ['Key'] set P3, 5 push P2, P3 set P1[2], 1 set P1[3], P2 - new P0, 'MultiArray', P1 + new P0, ['MultiArray'], P1 # array size, multiarray doesnt autogrow set P0, 200 @@ -102,22 +102,22 @@ ok 2 OUTPUT pasm_output_is( <<'CODE', <<'OUTPUT', "multiarray access 3d" ); - new P1, 'ResizablePMCArray' + new P1, ['ResizablePMCArray'] # initial size set P1[0], 0 set P1[1], 200 # dimensions 10x5x4 - new P2, 'Key' + new P2, ['Key'] set P2, 10 - new P3, 'Key' + new P3, ['Key'] set P3, 5 push P2, P3 - new P3, 'Key' + new P3, ['Key'] set P3, 4 push P2, P3 set P1[2], 1 set P1[3], P2 - new P0, 'MultiArray', P1 + new P0, ['MultiArray'], P1 set P0, 200 set I10, 10 @@ -200,7 +200,7 @@ pir_output_is( << 'CODE', << 'OUTPUT', "check whether interface is done" ); .sub _main .local pmc pmc1 - pmc1 = new 'MultiArray' + pmc1 = new ['MultiArray'] .local int bool1 does bool1, pmc1, "scalar" print bool1 @@ -221,28 +221,28 @@ OUTPUT pir_output_is( << 'CODE', << 'OUTPUT', 'Verify Basic Iterator support' ); .sub test :main - $P1 = new 'ResizablePMCArray' + $P1 = new ['ResizablePMCArray'] $P1[0] = 0 $P1[1] = 4 - $P2 = new 'Key' + $P2 = new ['Key'] $P2 = 2 - $P3 = new 'Key' + $P3 = new ['Key'] $P3 = 2 push $P2, $P3 $P1[2] = 1 $P1[3] = $P2 - $P0 = new 'MultiArray', $P1 + $P0 = new ['MultiArray'], $P1 $P0[0;0] = 1 $P0[1;0] = 2 $P0[0;1] = 3 $P0[1;1] = 4 - $P9 = new 'Iterator', $P0 + $P9 = new ['Iterator'], $P0 loop: unless $P9 goto end_loop $P10 = shift $P9 diff --git a/t/pmc/multidispatch.t b/t/pmc/multidispatch.t index 995934c1e1..d3aa181ffe 100644 --- a/t/pmc/multidispatch.t +++ b/t/pmc/multidispatch.t @@ -32,9 +32,9 @@ pir_output_is( <<'CODE', <<'OUTPUT', 'Integer_divide_Integer 10 / 3 = 1003' ); divide = get_global "Integer_divide_Integer" add_multi "divide", "Integer,Integer,Integer", divide - $P0 = new 'Integer' - $P1 = new 'Integer' - $P2 = new 'Integer' + $P0 = new ['Integer'] + $P1 = new ['Integer'] + $P2 = new ['Integer'] $P1 = 10 $P2 = 3 $P0 = $P1 / $P2 @@ -64,9 +64,9 @@ pir_output_is( <<'CODE', <<'OUTPUT', "1+1=3" ); add = get_global "add" add_multi "add", "Integer,Integer,Integer", add - $P0 = new 'Integer' - $P1 = new 'Integer' - $P2 = new 'Integer' + $P0 = new ['Integer'] + $P1 = new ['Integer'] + $P2 = new ['Integer'] $P1 = 1 $P2 = 1 $P0 = $P1 + $P2 @@ -96,9 +96,9 @@ pir_output_is( <<'CODE', <<'OUTPUT', "PASM divide - override builtin 10 / 3 = 42 divide = get_global "Integer_divide_Integer" add_multi "divide", "Integer,Integer,Integer", divide - $P0 = new 'Integer' - $P1 = new 'Integer' - $P2 = new 'Integer' + $P0 = new ['Integer'] + $P1 = new ['Integer'] + $P2 = new ['Integer'] $P1 = 10 $P2 = 3 $P0 = $P1 / $P2 @@ -124,8 +124,8 @@ pir_output_is( <<'CODE', <<'OUTPUT', "INTVAL return numeq" ); comp = get_global "Float_cmp_Integer" add_multi "cmp", "Float,Integer", comp - $P1 = new 'Float' - $P2 = new 'Integer' + $P1 = new ['Float'] + $P2 = new ['Integer'] $P1 = 47.11 $P2 = 47 $I0 = cmp $P1, $P2 # XXX cmp calls cmp_num @@ -183,8 +183,8 @@ pir_output_is( <<'CODE', <<'OUTPUT', "find_multi - invoke it" ); print "ok 1\n" ne_addr $P0, comp, nok print "ok 2\n" - $P1 = new 'Float' - $P2 = new 'Integer' + $P1 = new ['Float'] + $P2 = new ['Integer'] $P1 = 47.11 $P2 = 47 $I0 = $P0($P1, $P2) @@ -227,9 +227,9 @@ pir_output_is( <<"CODE", <<'OUTPUT', "PASM MMD divide - loaded sub" ); divide = get_global "Integer_divide_Integer" add_multi "divide", "Integer,Integer,Integer", divide - \$P0 = new 'Integer' - \$P1 = new 'Integer' - \$P2 = new 'Integer' + \$P0 = new ['Integer'] + \$P1 = new ['Integer'] + \$P2 = new ['Integer'] \$P1 = 10 \$P2 = 3 \$P0 = \$P1 / \$P2 @@ -244,7 +244,7 @@ pasm_output_is( <<'CODE', <<'OUTPUT', "PASM INTVAL - new result" ); get_global P10, "Integer_bxor_Intval" add_multi "bitwise_xor_int", "Integer,INTVAL,PMC", P10 - new P1, 'Integer' + new P1, ['Integer'] set P1, 3 bxor P9, P1, 2 print P9 @@ -255,7 +255,7 @@ pasm_output_is( <<'CODE', <<'OUTPUT', "PASM INTVAL - new result" ); print "ok\n" set I10, P5 bxor I11, I10, I5 - new P6, 'Integer' + new P6, ['Integer'] set P6, I11 set_returns "0", P6 returncc @@ -269,8 +269,8 @@ pasm_output_is( <<'CODE', <<'OUTPUT', "PASM INTVAL - existing result" ); get_global P10, "Integer_bxor_Intval" add_multi "bitwise_xor_int", "Integer,INTVAL,PMC", P10 - new P0, 'Integer' - new P1, 'Integer' + new P0, ['Integer'] + new P1, ['Integer'] set P1, 3 bxor P0, P1, 2 print P0 @@ -294,8 +294,8 @@ pasm_output_is( <<'CODE', <<'OUTPUT', "PASM INTVAL - mixed" ); get_global P10, "Integer_bxor_Intval" add_multi "bitwise_xor_int", "Integer,INTVAL,PMC", P10 - new P0, 'Integer' - new P1, 'Integer' + new P0, ['Integer'] + new P1, ['Integer'] set P1, 3 bxor P0, P1, 2 print P0 @@ -309,7 +309,7 @@ pasm_output_is( <<'CODE', <<'OUTPUT', "PASM INTVAL - mixed" ); print "ok\n" set I10, P5 bxor I11, I10, I5 - new P6, 'Integer' + new P6, ['Integer'] set P6, I11 set_returns "0", P6 returncc @@ -326,9 +326,9 @@ pir_output_is( <<'CODE', <<'OUT', "first dynamic MMD call" ); .sub main :main .local pmc F, B, f, b, m, s newclass F, "Foo" - f = new "Foo" + f = new ['Foo'] newclass B, "Bar" - b = new "Bar" + b = new ['Bar'] # create a multi the hard way ## m = new MultiSub ## s = get_global "Foo", "foo" @@ -380,10 +380,10 @@ pir_output_is( <<'CODE', <<'OUT', "MMD second arg int/float dispatch" ); print "\n" .end .sub main :main - $P0 = new 'Float' + $P0 = new ['Float'] $P0 = 9.5 foo(1, $P0) - $P1 = new 'Integer' + $P1 = new ['Integer'] $P1 = 3 foo(1, $P1) .end @@ -404,10 +404,10 @@ pir_error_output_like( <<'CODE', <<'OUT', "MMD single method, dispatch failure" print "\n" .end .sub main :main - $P0 = new 'Float' + $P0 = new ['Float'] $P0 = 9.5 foo(1, $P0) - $P1 = new 'Integer' + $P1 = new ['Integer'] $P1 = 3 foo(1, $P1) .end @@ -466,21 +466,21 @@ OUT pir_output_is( <<'CODE', <<'OUT', 'MMD on PMC types' ); .sub 'test' :main - $P0 = new 'String' + $P0 = new ['String'] $P0 = "ok 1\n" p($P0) .local pmc pstring pstring = subclass 'String', 'PString' - $P1 = new 'PString' + $P1 = new ['PString'] $P1 = "ok 2\n" p($P1) $P0 = subclass 'PString', "Xstring" - $P0 = new "Xstring" + $P0 = new ['Xstring'] $P0 = "ok 3\n" $P1 = subclass 'String', "Ystring" - $P1 = new "Ystring" + $P1 = new ['Ystring'] $P1 = "ok 4\n" p($P0) p($P1) @@ -506,21 +506,21 @@ OUT pir_output_is( <<'CODE', <<'OUT', 'MMD on PMC types quoted' ); .sub main :main - $P0 = new 'String' + $P0 = new ['String'] $P0 = "ok 1\n" p($P0) .local pmc pstring pstring = subclass 'String', 'PString' - $P1 = new 'PString' + $P1 = new ['PString'] $P1 = "ok 2\n" p($P1) $P0 = subclass "PString", "Xstring" - $P0 = new "Xstring" + $P0 = new ['Xstring'] $P0 = "ok 3\n" $P1 = subclass "String", "Ystring" - $P1 = new "Ystring" + $P1 = new ['Ystring'] $P1 = "ok 4\n" p($P0) p($P1) @@ -546,24 +546,24 @@ OUT pir_error_output_like( <<'CODE', <<'OUT', 'MMD on PMC types, invalid' ); .sub main :main - $P0 = new 'String' + $P0 = new ['String'] $P0 = "ok 1\n" p($P0) .local pmc pstring pstring = subclass 'String', 'PString' - $P1 = new 'PString' + $P1 = new ['PString'] $P1 = "ok 2\n" p($P1) $P0 = subclass "PString", "Xstring" - $P0 = new "Xstring" + $P0 = new ['Xstring'] $P0 = "ok 3\n" $P1 = subclass "String", "Ystring" - $P1 = new "Ystring" + $P1 = new ['Ystring'] $P1 = "ok 4\n" p($P0) p($P1) - $P0 = new 'Integer' + $P0 = new ['Integer'] p($P0) .end @@ -588,28 +588,28 @@ OUT pir_output_is( <<'CODE', <<'OUT', 'MMD on PMC types 3' ); .sub main :main - $P0 = new 'String' + $P0 = new ['String'] $P0 = "ok 1\n" p($P0) .local pmc pstring pstring = subclass 'String', 'PString' - $P1 = new 'PString' + $P1 = new ['PString'] $P1 = "ok 2\n" p($P1) $P0 = subclass "PString", "Xstring" - $P0 = new "Xstring" + $P0 = new ['Xstring'] $P0 = "ok 3\n" $P1 = subclass "String", "Ystring" - $P1 = new "Ystring" + $P1 = new ['Ystring'] $P1 = "ok 4\n" p($P0) p($P1) .local pmc pint pint = subclass 'Integer', 'PInt' - $P0 = new 'PInt' + $P0 = new ['PInt'] $P0 = 42 p($P0) .end @@ -643,21 +643,21 @@ OUT pir_output_is( <<'CODE', <<'OUT', 'MMD on PMC types, global namespace' ); .sub main :main - $P0 = new 'String' + $P0 = new ['String'] $P0 = "ok 1\n" p($P0) .local pmc pstring pstring = subclass 'String', 'PString' - $P1 = new 'PString' + $P1 = new ['PString'] $P1 = "ok 2\n" p($P1) $P0 = subclass "PString", "Xstring" - $P0 = new "Xstring" + $P0 = new ['Xstring'] $P0 = "ok 3\n" $P1 = subclass "String", "Ystring" - $P1 = new "Ystring" + $P1 = new ['Ystring'] $P1 = "ok 4\n" p($P0) p($P1) @@ -685,21 +685,21 @@ pir_output_is( <<'CODE', <<'OUT', 'MMD on PMC types, package namespace' ); .namespace ["Some"] .sub main :main - $P0 = new 'String' + $P0 = new ['String'] $P0 = "ok 1\n" p($P0) .local pmc pstring pstring = subclass 'String', 'PString' - $P1 = new 'PString' + $P1 = new ['PString'] $P1 = "ok 2\n" p($P1) $P0 = subclass "PString", "Xstring" - $P0 = new "Xstring" + $P0 = new ['Xstring'] $P0 = "ok 3\n" $P1 = subclass "String", "Ystring" - $P1 = new "Ystring" + $P1 = new ['Ystring'] $P1 = "ok 4\n" p($P0) p($P1) @@ -726,16 +726,16 @@ OUT pir_output_is( <<'CODE', <<'OUT', "MMD on PMC types - Any", todo => 'RT #41374' ); .sub main :main - $P0 = new 'String' + $P0 = new ['String'] $P0 = "ok 1\n" - $P1 = new 'PerlInt' + $P1 = new ['PerlInt'] $P1 = "ok 2\n" p($P0) p($P1) - $P0 = new 'PerlInt' + $P0 = new ['PerlInt'] $P0 = 42 p($P0) - $P0 = new 'PerlInt' + $P0 = new ['PerlInt'] $P0 = 43 q($P0) .end @@ -778,9 +778,9 @@ OUT pir_output_is( <<'CODE', <<'OUTPUT', "add as function - Int, Float" ); .sub main :main .local pmc d, l, r, a - d = new 'Integer' - l = new 'Integer' - r = new 'Float' + d = new ['Integer'] + l = new ['Integer'] + r = new ['Float'] l = 3 r = 39.42 a = get_root_global ["MULTI"], "add" @@ -796,8 +796,8 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "add as method" ); .sub main :main .local pmc d, l, r - l = new 'Integer' - r = new 'Integer' + l = new ['Integer'] + r = new ['Integer'] l = 3 r = 39 d = l."add"(r, d) @@ -814,8 +814,8 @@ pir_output_is( <<'CODE', <<'OUTPUT', "add as method - inherited", todo => 'RT #4 .local pmc d, l, r .local pmc pint pint = subclass 'Integer', 'PInt' - l = new 'PInt' - r = new 'PInt' + l = new ['PInt'] + r = new ['PInt'] l = 3 r = 39 d = l."add"(r, d) @@ -829,8 +829,8 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "add as method - Int, Float" ); .sub main :main .local pmc d, l, r - l = new 'Integer' - r = new 'Float' + l = new ['Integer'] + r = new ['Float'] l = 3 r = 39.42 d = l."add"(r, d) @@ -845,16 +845,16 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "bound add method" ); .sub main :main .local pmc d, l, r, m - d = new 'Integer' - l = new 'Integer' - r = new 'Float' + d = new ['Integer'] + l = new ['Integer'] + r = new ['Float'] l = 3 r = 39.42 m = get_global ['scalar'], "add" d = m(r, l, d) print d print "\n" - r = new 'Integer' + r = new ['Integer'] r = 39 m = get_global ['Integer'], "add" d = m(r, l, d) @@ -871,9 +871,9 @@ pir_output_is( <<'CODE', <<'OUTPUT', "Integer subclasses" ); .sub main :main .local pmc d, l, r, cl cl = subclass "Integer", "AInt" - d = new "AInt" - l = new "AInt" - r = new "AInt" + d = new ['AInt'] + l = new ['AInt'] + r = new ['AInt'] l = 4 r = 38 print l @@ -899,8 +899,8 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "Integer subclasses, add" ); .sub main :main $P0 = subclass "Integer", "AInt" - $P0 = new "AInt" - $P1 = new 'Integer' + $P0 = new ['AInt'] + $P1 = new ['Integer'] set $P0, 6 set $P1, 2 @@ -916,7 +916,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "Integer subclasses, add" ); print l print r print "\n" - d = new 'Integer' + d = new ['Integer'] d = 2 .return(d) .end @@ -936,7 +936,7 @@ print $TEMP <<'EOF'; print l print r print "\n" - d = new 'Integer' + d = new ['Integer'] d = 2 .return(d) .end @@ -947,8 +947,8 @@ pir_output_is( <<"CODE", <<'OUTPUT', "override builtin add" ); .sub main load_bytecode "$temp_pir" \$P0 = subclass "Integer", "AInt" - \$P0 = new "AInt" - \$P1 = new 'Integer' + \$P0 = new ['AInt'] + \$P1 = new ['Integer'] set \$P0, 6 set \$P1, 2 @@ -982,11 +982,11 @@ pir_output_is( <<'CODE', <<'OUTPUT', "mmd bug reported by Jeff" ); .sub main :main newclass $P0, 'Foo' - $P0 = new 'Foo' + $P0 = new ['Foo'] $P0.'bar'('Bar!') - $P1 = new 'String' + $P1 = new ['String'] $P1 = "Bar!" $P0.'bar'($P1) @@ -1003,9 +1003,9 @@ pir_output_is( <<'CODE', <<'OUTPUT', "use a core func for an object", todo => 'R .local pmc d, l, r, cl cl = newclass "AInt" addattribute cl, ".i" - d = new "AInt" - l = new "AInt" - r = new "AInt" + d = new ['AInt'] + l = new ['AInt'] + r = new ['AInt'] .local pmc func .local string typ func = find_multi "add", "Float,Float,PMC" @@ -1027,7 +1027,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "use a core func for an object", todo => 'R .end .namespace ["AInt"] .sub init :vtable :method - $P0 = new 'Integer' + $P0 = new ['Integer'] setattribute self, ".i", $P0 .end .sub set_integer_native :vtable :method @@ -1096,13 +1096,13 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "multisub w/o .HLL" ); .sub main :main - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 3 $P9 = 'foo'($P0) - $P0 = new 'ResizablePMCArray' + $P0 = new ['ResizablePMCArray'] push $P0, 4 - $P1 = new 'String' + $P1 = new ['String'] $P1 = 'hello' $P9 = 'foo'($P0, $P1) .end @@ -1124,13 +1124,13 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "multisub w/ .HLL, rt #39161" ); .HLL 'Perl6' .sub main :main - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 3 $P9 = 'foo'($P0) - $P0 = new 'ResizablePMCArray' + $P0 = new ['ResizablePMCArray'] push $P0, 4 - $P1 = new 'String' + $P1 = new ['String'] $P1 = 'hello' $P9 = 'foo'($P0, $P1) .end @@ -1153,19 +1153,19 @@ pir_output_is( <<'CODE', <<'OUTPUT', "multisub w/ flatten" ); # see also 'rt #39173 .sub main :main .local pmc int_pmc - int_pmc = new 'Integer' + int_pmc = new ['Integer'] int_pmc = 3 .local pmc args - args = new 'ResizablePMCArray' + args = new ['ResizablePMCArray'] push args, int_pmc 'foo'( args :flat ) .local pmc string_pmc - string_pmc = new 'String' + string_pmc = new ['String'] string_pmc = 'hello' - args = new 'ResizablePMCArray' + args = new ['ResizablePMCArray'] push args, string_pmc 'foo'( args :flat ) end @@ -1303,15 +1303,15 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', 'type mix with _' ); .sub main :main - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 3 'foo'($P0) 'foo'(2) 'foo'("1") - $P0 = new 'String' + $P0 = new ['String'] $P0 = "0" 'foo'($P0) - $P0 = new 'Hash' + $P0 = new ['Hash'] 'foo'($P0) .end @@ -1349,9 +1349,9 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', ':multi with :outer' ); .sub main :main - new $P0, 'String' + new $P0, ['String'] assign $P0, 'arg0' - new $P1, 'String' + new $P1, ['String'] assign $P1, 'arg1' $P99 = "foo"($P0) diff --git a/t/pmc/multisub.t b/t/pmc/multisub.t index f6b13cc333..a0f9669603 100644 --- a/t/pmc/multisub.t +++ b/t/pmc/multisub.t @@ -22,7 +22,7 @@ Tests the creation and invocation of Perl6 multi subs. plan( 8 ) - $P0 = new 'MultiSub' + $P0 = new ['MultiSub'] $I0 = defined $P0 ok($I0, "create PMC") @@ -39,15 +39,15 @@ Tests the creation and invocation of Perl6 multi subs. is($S0, "testing 42, goodbye", "int and string variant") ## Test handling of :flat parameters. - $P0 = new 'ResizablePMCArray' + $P0 = new ['ResizablePMCArray'] push $P0, 42 push $P0, "goodbye" $S0 = foo($P0 :flat) is($S0, "testing 42, goodbye", "Int and String :flat") ## Now try double :flat (regression test for RT #43869). - $P1 = new 'ResizablePMCArray' + $P1 = new ['ResizablePMCArray'] push $P1, 42 - $P2 = new 'ResizablePMCArray' + $P2 = new ['ResizablePMCArray'] push $P2, "goodbye" $S0 = foo($P1 :flat, $P2 :flat) is($S0, "testing 42, goodbye", "Int and String double :flat") diff --git a/t/pmc/n_arithmetics.t b/t/pmc/n_arithmetics.t index f307205918..6a153322e3 100644 --- a/t/pmc/n_arithmetics.t +++ b/t/pmc/n_arithmetics.t @@ -47,7 +47,7 @@ various combinations of Parrot integer and number types. ### Operations on a single INTVAL ### .sub take_the_negative_of_an_integer - $P0 = new 'Integer' + $P0 = new ['Integer'] ## negate zero. set $P0, 0 n_neg $P1, $P0 @@ -71,7 +71,7 @@ various combinations of Parrot integer and number types. .end .sub take_the_absolute_value_of_an_integer - $P0 = new 'Integer' + $P0 = new ['Integer'] ## find absolute zero (so to speak). set $P0, 0 $P1 = n_abs $P0 @@ -98,11 +98,11 @@ various combinations of Parrot integer and number types. ### first arg is Integer, second arg is Integer ### .sub add_integer_to_integer - $P0 = new 'Integer' + $P0 = new ['Integer'] set $P0, 4000 - $P1 = new 'Integer' + $P1 = new ['Integer'] set $P1, -123 - $P2 = new 'Integer' + $P2 = new ['Integer'] set $P2, 666 add $P2, $P0, $P1 is( $P2, 3877, 'add integer to integer' ) @@ -124,11 +124,11 @@ various combinations of Parrot integer and number types. .end .sub subtract_integer_from_integer - $P0 = new 'Integer' + $P0 = new ['Integer'] set $P0, 4000 - $P1 = new 'Integer' + $P1 = new ['Integer'] set $P1, -123 - $P2 = new 'Integer' + $P2 = new ['Integer'] set $P2, 666 sub $P2, $P0, $P1 is( $P2, 4123, 'subtract Integer from Integer' ) @@ -150,11 +150,11 @@ various combinations of Parrot integer and number types. .end .sub multiply_integer_by_integer - $P0 = new 'Integer' + $P0 = new ['Integer'] set $P0, 4000 - $P1 = new 'Integer' + $P1 = new ['Integer'] set $P1, -123 - $P2 = new 'Integer' + $P2 = new ['Integer'] set $P2, 666 mul $P2, $P0, $P1 is( $P2, -492000, 'multiply Integer by Integer' ) @@ -168,11 +168,11 @@ various combinations of Parrot integer and number types. .end .sub divide_integer_by_integer - $P0 = new 'Integer' + $P0 = new ['Integer'] set $P0, 4000 - $P1 = new 'Integer' + $P1 = new ['Integer'] set $P1, -123 - $P2 = new 'Integer' + $P2 = new ['Integer'] set $P2, 666 div $P2, $P0, $P1 is( $P2, -32.5203, 'divide Integer by Integer', 0.0001 ) @@ -189,7 +189,7 @@ various combinations of Parrot integer and number types. ### Operations on a single NUMVAL ### .sub negate_a_float - $P0 = new 'Float' + $P0 = new ['Float'] set $P0, 0 $P1 = n_neg $P0 is( $P1, 0, 'neg of Float 0 is 0' ) @@ -205,7 +205,7 @@ various combinations of Parrot integer and number types. .end .sub take_the_absolute_value_of_a_float - $P0 = new 'Integer' + $P0 = new ['Integer'] set $P0, 0 $P1 = n_abs $P0 is( $P1, 0, 'abs value of float 0 is zero' ) @@ -224,9 +224,9 @@ various combinations of Parrot integer and number types. ### FLOATVAL and INTVAL tests ### .sub add_integer_to_float - $P10 = new 'Integer' + $P10 = new ['Integer'] set $P10, 4000 - $P0 = new 'Float' + $P0 = new ['Float'] set $P0, -123.123 add $P1, $P0, $P10 is( $P1, 3876.877, 'add Float and Int' ) @@ -248,9 +248,9 @@ various combinations of Parrot integer and number types. .end .sub subtract_integer_from_float - $P10 = new 'Integer' + $P10 = new ['Integer'] set $P10, 4000 - $P0 = new 'Float' + $P0 = new ['Float'] set $P0, -123.123 sub $P1, $P0, $P10 is( $P1, -4123.123, 'subtract Int from Float' ) @@ -272,9 +272,9 @@ various combinations of Parrot integer and number types. .end .sub multiply_float_by_integer - $P10 = new 'Integer' + $P10 = new ['Integer'] set $P10, 4000 - $P0 = new 'Float' + $P0 = new ['Float'] set $P0, -123.123 mul $P1, $P0, $P10 is( $P1, -492492, 'multiply Float by Int' ) @@ -296,9 +296,9 @@ various combinations of Parrot integer and number types. .end .sub divide_float_by_integer - $P10 = new 'Integer' + $P10 = new ['Integer'] set $P10, 4000 - $P0 = new 'Float' + $P0 = new ['Float'] set $P0, -123.123 div $P1, $P0, $P10 is( $P1, -0.03078075, 'divide Float by Int', 0.0001 ) @@ -326,11 +326,11 @@ various combinations of Parrot integer and number types. ### FLOATVAL and FLOATVAL tests ### .sub add_float_to_float - $P0 = new 'Float' + $P0 = new ['Float'] set $P0, 4000.246 - $P1 = new 'Float' + $P1 = new ['Float'] set $P1, -123.123 - $P2 = new 'Float' + $P2 = new ['Float'] set $P2, 6.66 add $P2, $P0, $P1 is( $P2, 3877.123, 'add Float to Float' ) @@ -350,9 +350,9 @@ various combinations of Parrot integer and number types. ## This tests n_infix_ic_p_p_nc for n_add, n_sub, n_mul, and n_div. Note that ## there is no n_infix_ic_p_nc_p op; the PMC argument always comes first. .sub add_sub_mul_div_of_float_with_constants - $P0 = new 'Float' + $P0 = new ['Float'] set $P0, 4000.246 - $P1 = new 'Float' + $P1 = new ['Float'] set $P1, -123.123 $P2 = add $P1, 6.78 is( $P2, -116.343, 'add neg Float to constant Float' ) @@ -365,11 +365,11 @@ various combinations of Parrot integer and number types. .end .sub subtract_float_from_float - $P0 = new 'Float' + $P0 = new ['Float'] set $P0, 4000.246 - $P1 = new 'Float' + $P1 = new ['Float'] set $P1, -123.123 - $P2 = new 'Float' + $P2 = new ['Float'] set $P2, 6.66 sub $P2, $P0, $P1 is( $P2, 4123.369, 'subtract Float from Float' ) @@ -387,11 +387,11 @@ various combinations of Parrot integer and number types. .end .sub multiply_float_by_float - $P0 = new 'Float' + $P0 = new ['Float'] set $P0, 400.0246 - $P1 = new 'Float' + $P1 = new ['Float'] set $P1, -123.123 - $P2 = new 'Float' + $P2 = new ['Float'] set $P2, 6.66 mul $P2, $P0, $P1 is( $P2, -49252.2288258, 'multiply Float from Float', 0.000001 ) @@ -409,11 +409,11 @@ various combinations of Parrot integer and number types. .end .sub divide_float_by_float - $P0 = new 'Float' + $P0 = new ['Float'] set $P0, 4000.246 - $P1 = new 'Float' + $P1 = new ['Float'] set $P1, -123.123 - $P2 = new 'Float' + $P2 = new ['Float'] set $P2, 6.66 div $P2, $P1, $P0 is( $P2, -0.0307788571002883, 'divide neg Float by pos Float', 0.0000001 ) @@ -431,7 +431,7 @@ various combinations of Parrot integer and number types. .end .sub verify_new_pmc - $P0 = new 'Integer' + $P0 = new ['Integer'] $P1 = $P0 $P0 = add $P0, 1 is( $P0, 1, 'add constant to new (unassigned) PMC' ) diff --git a/t/pmc/namespace.t b/t/pmc/namespace.t index 360e5bffdf..91494a30a8 100644 --- a/t/pmc/namespace.t +++ b/t/pmc/namespace.t @@ -26,17 +26,17 @@ Test the NameSpace PMC as described in PDD21. # L pir_output_is( <<'CODE', <<'OUT', 'new' ); .sub 'test' :main - new $P0, 'NameSpace' - say "ok 1 - $P0 = new 'NameSpace'" + new $P0, ['NameSpace'] + say "ok 1 - $P0 = new ['NameSpace']" .end CODE -ok 1 - $P0 = new 'NameSpace' +ok 1 - $P0 = new ['NameSpace'] OUT # L pir_output_is( <<'CODE', <<'OUT', 'NameSpace does "hash"' ); .sub 'test' :main - new $P0, 'NameSpace' + new $P0, ['NameSpace'] $I0 = does $P0, 'hash' if $I0 goto ok_1 print 'not ' @@ -426,7 +426,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "ns.name()" ); .include "interpinfo.pasm" $P0 = get_root_namespace $P1 = $P0["parrot"] - $P3 = new 'NameSpace' + $P3 = new ['NameSpace'] $P1["Foo"] = $P3 $P2 = $P3.'get_name'() $I2 = elements $P2 @@ -444,10 +444,10 @@ OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', "get_namespace_p_p, getnamespace_p_kc" ); .sub main :main .include "interpinfo.pasm" - $P3 = new 'NameSpace' + $P3 = new ['NameSpace'] set_hll_global "Foo", $P3 # fetch w array - $P4 = new 'FixedStringArray' + $P4 = new ['FixedStringArray'] $P4 = 1 $P4[0] = 'Foo' $P0 = get_hll_namespace $P4 @@ -565,7 +565,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "HLL and vars" ); .HLL '_Tcl' .sub huh - $P0 = new 'Integer' + $P0 = new ['Integer'] $P0 = 3.14 set_global '$variable', $P0 .end @@ -614,7 +614,7 @@ OUTPUT .HLL 'eek' .sub foo :load :anon - $P1 = new 'String' + $P1 = new ['String'] $P1 = "3.14\n" set_global '$whee', $P1 .end @@ -653,7 +653,7 @@ SKIP: .namespace [] .sub a :immediate - $P1 = new 'String' + $P1 = new ['String'] $P1 = "ok\n" set_global ['sub_namespace'], "eek", $P1 .end @@ -682,9 +682,9 @@ pir_error_output_like( <<'CODE', <<'OUTPUT', 'export_to() with null destination .sub 'test' :main .local pmc nsa, nsb, ar - ar = new 'ResizableStringArray' + ar = new ['ResizableStringArray'] push ar, 'foo' - nsa = new 'Null' + nsa = new ['Null'] nsb = get_namespace ['B'] nsb.'export_to'(nsa, ar) .end @@ -701,7 +701,7 @@ pir_error_output_like( .sub 'test' :main .local pmc nsa, nsb, ar - ar = new 'Null' + ar = new ['Null'] nsa = get_namespace nsb = get_namespace ['B'] nsb.'export_to'(nsa, ar) @@ -719,7 +719,7 @@ pir_error_output_like( .sub 'test' :main .local pmc nsa, nsb, ar - ar = new 'ResizableStringArray' + ar = new ['ResizableStringArray'] nsa = get_namespace nsb = get_namespace ['B'] nsb.'export_to'(nsa, ar) @@ -737,7 +737,7 @@ pir_error_output_like( .sub 'test' :main .local pmc nsa, nsb, ar - ar = new 'Hash' + ar = new ['Hash'] nsa = get_namespace nsb = get_namespace ['B'] nsb.'export_to'(nsa, ar) @@ -756,7 +756,7 @@ pir_output_is( <<"CODE", <<'OUTPUT', "export_to -- success with array" ); a_foo() load_bytecode "$temp_b.pir" .local pmc nsr, nsa, nsb, ar - ar = new 'ResizableStringArray' + ar = new ['ResizableStringArray'] push ar, "b_foo" nsr = get_root_namespace nsa = nsr['a'] @@ -779,7 +779,7 @@ pir_output_is( <<"CODE", <<'OUTPUT', "export_to -- success with hash (empty valu a_foo() load_bytecode "$temp_b.pir" .local pmc nsr, nsa, nsb, ar - ar = new 'Hash' + ar = new ['Hash'] ar["b_foo"] = "" nsr = get_root_namespace nsa = nsr['a'] @@ -802,8 +802,8 @@ pir_output_is( <<"CODE", <<'OUTPUT', "export_to -- success with hash (null value a_foo() load_bytecode "$temp_b.pir" .local pmc nsr, nsa, nsb, ar, nul - nul = new 'Null' - ar = new 'Hash' + nul = new ['Null'] + ar = new ['Hash'] ar["b_foo"] = nul nsr = get_root_namespace nsa = nsr['a'] @@ -826,7 +826,7 @@ pir_error_output_like( <<"CODE", <<'OUTPUT', "export_to -- success with hash (an a_foo() load_bytecode "$temp_b.pir" .local pmc nsr, nsa, nsb, ar - ar = new 'Hash' + ar = new ['Hash'] ar["b_foo"] = "c_foo" nsr = get_root_namespace nsa = nsr['a'] @@ -890,7 +890,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "get_global with array ('')" ); .namespace ['foo'] .sub main :main - $P0 = new 'ResizableStringArray' + $P0 = new ['ResizableStringArray'] $P0[0] = '' $P0 = get_hll_global $P0, 'print_ok' $P0() @@ -911,7 +911,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "get_global with empty array" ); .namespace ['foo'] .sub main :main - $P0 = new 'ResizablePMCArray' + $P0 = new ['ResizablePMCArray'] $P0 = 0 $P0 = get_hll_global $P0, 'print_ok' $P0() @@ -932,7 +932,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "Namespace.get_global() with array ('')" ); .namespace ['foo'] .sub main :main - $P1 = new 'ResizableStringArray' + $P1 = new ['ResizableStringArray'] $P1[0] = '' $P1 = get_hll_global $P1, 'print_ok' $P1() @@ -1033,7 +1033,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "Nested namespace introspection" ); .sub a_sub .local pmc some_var - some_var = new 'String' + some_var = new ['String'] some_var = 'a string PMC' set_hll_global [ 'Foo'; 'Bar' ], 'a_var', some_var .end @@ -1111,7 +1111,7 @@ my $create_nested_key = <<'CREATE_NESTED_KEY'; .param pmc other_names :slurpy .local pmc key - key = new 'Key' + key = new ['Key'] key = name .local int elem @@ -1206,15 +1206,15 @@ $create_nested_key root_ns = get_namespace .local pmc child_ns - child_ns = new 'NameSpace' + child_ns = new ['NameSpace'] root_ns.'add_namespace'( 'Nested', child_ns ) .local pmc grandchild_ns - grandchild_ns = new 'NameSpace' + grandchild_ns = new ['NameSpace'] child_ns.'add_namespace'( 'Grandkid', grandchild_ns ) .local pmc great_grandchild_ns - great_grandchild_ns = new 'NameSpace' + great_grandchild_ns = new ['NameSpace'] grandchild_ns.'add_namespace'( 'Greatgrandkid', great_grandchild_ns ) .local pmc parent @@ -1251,7 +1251,7 @@ pir_output_like( <<'CODE', <<'OUTPUT', 'add_namespace() with error' ); ns_child = subclass 'NameSpace', 'NSChild' .local pmc child - child = new 'NSChild' + child = new ['NSChild'] .local pmc root_ns root_ns = get_namespace @@ -1259,7 +1259,7 @@ pir_output_like( <<'CODE', <<'OUTPUT', 'add_namespace() with error' ); root_ns.'add_namespace'( 'Really nested', child ) .local pmc not_a_ns - not_a_ns = new 'Integer' + not_a_ns = new ['Integer'] push_eh _invalid_ns root_ns.'add_namespace'( 'Nested', not_a_ns ) @@ -1342,7 +1342,7 @@ pir_error_output_like( <<'CODE', <<'OUTPUT', 'add_sub() with error', todo => 'ne e_child = subclass 'Closure', 'ClosureChild' .local pmc child - child = new 'SubChild' + child = new ['SubChild'] .local pmc root_ns root_ns = get_namespace @@ -1350,24 +1350,24 @@ pir_error_output_like( <<'CODE', <<'OUTPUT', 'add_sub() with error', todo => 'ne root_ns.'add_sub'( 'child', child ) print "Added sub child\n" - child = new 'Closure' + child = new ['Closure'] root_ns.'add_sub'( 'closure', child ) print "Added closure\n" - child = new 'Coroutine' + child = new ['Coroutine'] root_ns.'add_sub'( 'coroutine', child ) print "Added coroutine\n" - child = new 'Eval' + child = new ['Eval'] root_ns.'add_sub'( 'eval', child ) print "Added eval\n" - child = new 'ClosureChild' + child = new ['ClosureChild'] root_ns.'add_sub'( 'closure_child', child ) print "Added closure child\n" .local pmc not_a_sub - not_a_sub = new 'Integer' + not_a_sub = new ['Integer'] push_eh _invalid_sub root_ns.'add_sub'( 'Nested', not_a_sub ) @@ -1396,11 +1396,11 @@ $create_nested_key .sub 'main' :main .local pmc foo - foo = new 'String' + foo = new ['String'] foo = 'Foo' .local pmc bar - bar = new 'String' + bar = new ['String'] bar = 'Bar' .local pmc key @@ -1521,7 +1521,7 @@ pir_output_like( <<'CODE', <<'OUTPUT', 'del_namespace() with error' ); .sub main :main .local pmc not_a_ns - not_a_ns = new 'Array' + not_a_ns = new ['Array'] set_global 'Not_A_NS', not_a_ns @@ -1612,7 +1612,7 @@ OUTPUT pir_output_like( <<'CODE', <<'OUTPUT', 'del_sub() with error' ); .sub main :main .local pmc not_a_ns - not_a_ns = new 'Array' + not_a_ns = new ['Array'] set_global 'Not_A_Sub', not_a_ns @@ -1639,11 +1639,11 @@ OUTPUT pir_output_is( <<"CODE", <<'OUTPUT', 'del_var()' ); .sub 'main' :main .local pmc foo - foo = new 'String' + foo = new ['String'] foo = 'Foo' .local pmc bar - bar = new 'String' + bar = new ['String'] bar = 'Bar' set_global [ 'Parent' ], 'Foo', foo @@ -1690,7 +1690,7 @@ OUTPUT pir_error_output_like( <<'CODE', <<'OUTPUT', 'overriding find_method()' ); .sub 'main' :main $P0 = newclass 'Override' - $P1 = new 'Override' + $P1 = new ['Override'] $P2 = find_method $P1, 'foo' .end @@ -1705,17 +1705,17 @@ OUTPUT pir_output_is( <<'CODE', <