diff --git a/dump.c b/dump.c index 7502214b0151..b4d56a0f08b4 100644 --- a/dump.c +++ b/dump.c @@ -1804,6 +1804,11 @@ S_do_op_dump_bar(pTHX_ I32 level, UV bar, PerlIO *file, const OP *o, S_opdump_indent(aTHX_ o, level, bar, file, " PARAM [%zd] ANON\n", i); } + for(size_t i = 0; i < aux->n_named; i++) { + struct op_multiparam_named_aux *named = aux->named + i; + S_opdump_indent(aTHX_ o, level, bar, file, " NAMEDPARAM <%.*s> PADIX = %" UVuf "%s\n", + named->namelen, named->namepv, named->padix, named->is_required ? "" : " OPT"); + } if(aux->slurpy) S_opdump_indent(aTHX_ o, level, bar, file, "SLURPY = '%c' PADIX = %" UVuf "\n", diff --git a/embed.fnc b/embed.fnc index cde6813dcb25..470deba3ac8f 100644 --- a/embed.fnc +++ b/embed.fnc @@ -3209,6 +3209,11 @@ p |void |sub_crush_depth|NN CV *cv : Used in perly.y p |void |subsignature_append_fence_op \ |NN OP *o +p |void |subsignature_append_named \ + |NN const char *paramname \ + |PADOFFSET padix \ + |OPCODE defmode \ + |NULLOK OP *defexpr p |void |subsignature_append_positional \ |PADOFFSET padix \ |OPCODE defmode \ diff --git a/embed.h b/embed.h index 12a3eb7d4833..7394c28366f1 100644 --- a/embed.h +++ b/embed.h @@ -1163,6 +1163,7 @@ # define sighandler3 Perl_sighandler3 # define sub_crush_depth(a) Perl_sub_crush_depth(aTHX_ a) # define subsignature_append_fence_op(a) Perl_subsignature_append_fence_op(aTHX_ a) +# define subsignature_append_named(a,b,c,d) Perl_subsignature_append_named(aTHX_ a,b,c,d) # define subsignature_append_positional(a,b,c) Perl_subsignature_append_positional(aTHX_ a,b,c) # define subsignature_append_slurpy(a,b) Perl_subsignature_append_slurpy(aTHX_ a,b) # define subsignature_finish() Perl_subsignature_finish(aTHX) diff --git a/lib/warnings.pm b/lib/warnings.pm index 5e3a483b22e3..2db07f77d082 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -5,7 +5,7 @@ package warnings; -our $VERSION = "1.74"; +our $VERSION = "1.75"; # Verify that we're called correctly so that warnings will work. # Can't use Carp, since Carp uses us! @@ -133,172 +133,177 @@ our %Offsets = ( # Warnings Categories added in Perl 5.041 'experimental::keyword_all' => 156, 'experimental::keyword_any' => 158, + + # Warnings Categories added in Perl 5.043 + 'experimental::signature_named_parameters'=> 160, ); our %Bits = ( - 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55", # [0..79] - 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [29] - 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [30] - 'closed' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6] - 'closure' => "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1] - 'debugging' => "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22] - 'deprecated' => "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x10\x00\x00\x14\x05", # [2,48,49,62,73,74,76,77] - 'deprecated::delimiter_will_be_paired'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [74] - 'deprecated::dot_in_inc' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [62] - 'deprecated::goto_construct' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", # [48] - 'deprecated::missing_import_called_with_args'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [76] - 'deprecated::subsequent_use_version'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [77] - 'deprecated::unicode_property_name' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00", # [49] - 'deprecated::version_downgrade' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [73] - 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [31] - 'exec' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7] - 'exiting' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3] - 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x05\x04\x55\x55\x40\x50", # [53,54,56,57,61,64..71,75,78,79] - 'experimental::args_array_with_signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [68] - 'experimental::builtin' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [69] - 'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [75] - 'experimental::declared_refs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [61] - 'experimental::defer' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [70] - 'experimental::extra_paired_delimiters'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [71] - 'experimental::keyword_all' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [78] - 'experimental::keyword_any' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40", # [79] - 'experimental::private_use' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00", # [64] - 'experimental::re_strict' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [56] - 'experimental::refaliasing' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [57] - 'experimental::regex_sets' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [54] - 'experimental::try' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00", # [67] - 'experimental::uniprop_wildcards' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [65] - 'experimental::vlb' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [66] - 'glob' => "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4] - 'illegalproto' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [47] - 'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [46] - 'inplace' => "\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23] - 'internal' => "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [24] - 'io' => "\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [5..11,55] - 'layer' => "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8] - 'locale' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00", # [58] - 'malloc' => "\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [25] - 'misc' => "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12] - 'missing' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [59] - 'newline' => "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9] - 'non_unicode' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [50] - 'nonchar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [51] - 'numeric' => "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13] - 'once' => "\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14] - 'overflow' => "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15] - 'pack' => "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [16] - 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [32] - 'pipe' => "\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10] - 'portable' => "\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [17] - 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [33] - 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [34] - 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [35] - 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [36] - 'recursion' => "\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [18] - 'redefine' => "\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [19] - 'redundant' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", # [60] - 'regexp' => "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20] - 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [37] - 'scalar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [72] - 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [38] - 'severe' => "\x00\x00\x00\x00\x00\x54\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25] - 'shadow' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [63] - 'signal' => "\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [26] - 'substr' => "\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [27] - 'surrogate' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00", # [52] - 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\x55\x55\x15\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [28..38,47] - 'syscalls' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [55] - 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [39] - 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [40] - 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [41] - 'unopened' => "\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11] - 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [42] - 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [43] - 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x50\x01\x00\x00\x00\x00\x00\x00", # [44,50..52] - 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [45] + 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55", # [0..83] + 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [29] + 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [30] + 'closed' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6] + 'closure' => "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1] + 'debugging' => "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22] + 'deprecated' => "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x10\x00\x00\x14\x05\x00", # [2,48,49,62,73,74,76,77] + 'deprecated::delimiter_will_be_paired'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [74] + 'deprecated::dot_in_inc' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00", # [62] + 'deprecated::goto_construct' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", # [48] + 'deprecated::missing_import_called_with_args'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [76] + 'deprecated::subsequent_use_version'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [77] + 'deprecated::unicode_property_name' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [49] + 'deprecated::version_downgrade' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [73] + 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [31] + 'exec' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7] + 'exiting' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3] + 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x05\x04\x55\x55\x40\x50\x01", # [53,54,56,57,61,64..71,75,78..80] + 'experimental::args_array_with_signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00", # [68] + 'experimental::builtin' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [69] + 'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [75] + 'experimental::declared_refs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [61] + 'experimental::defer' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [70] + 'experimental::extra_paired_delimiters'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00", # [71] + 'experimental::keyword_all' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [78] + 'experimental::keyword_any' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [79] + 'experimental::private_use' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", # [64] + 'experimental::re_strict' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00", # [56] + 'experimental::refaliasing' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00", # [57] + 'experimental::regex_sets' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [54] + 'experimental::signature_named_parameters'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [80] + 'experimental::try' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [67] + 'experimental::uniprop_wildcards' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [65] + 'experimental::vlb' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [66] + 'glob' => "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4] + 'illegalproto' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [47] + 'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [46] + 'inplace' => "\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23] + 'internal' => "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [24] + 'io' => "\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [5..11,55] + 'layer' => "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8] + 'locale' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [58] + 'malloc' => "\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [25] + 'misc' => "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12] + 'missing' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [59] + 'newline' => "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9] + 'non_unicode' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [50] + 'nonchar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [51] + 'numeric' => "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13] + 'once' => "\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14] + 'overflow' => "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15] + 'pack' => "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [16] + 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [32] + 'pipe' => "\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10] + 'portable' => "\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [17] + 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [33] + 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [34] + 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [35] + 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [36] + 'recursion' => "\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [18] + 'redefine' => "\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [19] + 'redundant' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [60] + 'regexp' => "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20] + 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [37] + 'scalar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [72] + 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [38] + 'severe' => "\x00\x00\x00\x00\x00\x54\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25] + 'shadow' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [63] + 'signal' => "\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [26] + 'substr' => "\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [27] + 'surrogate' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", # [52] + 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\x55\x55\x15\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [28..38,47] + 'syscalls' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [55] + 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [39] + 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [40] + 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [41] + 'unopened' => "\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11] + 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [42] + 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [43] + 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x50\x01\x00\x00\x00\x00\x00\x00\x00", # [44,50..52] + 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [45] ); our %DeadBits = ( - 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", # [0..79] - 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [29] - 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [30] - 'closed' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6] - 'closure' => "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1] - 'debugging' => "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22] - 'deprecated' => "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x20\x00\x00\x28\x0a", # [2,48,49,62,73,74,76,77] - 'deprecated::delimiter_will_be_paired'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [74] - 'deprecated::dot_in_inc' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [62] - 'deprecated::goto_construct' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00", # [48] - 'deprecated::missing_import_called_with_args'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [76] - 'deprecated::subsequent_use_version'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [77] - 'deprecated::unicode_property_name' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00", # [49] - 'deprecated::version_downgrade' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [73] - 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [31] - 'exec' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7] - 'exiting' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3] - 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x0a\x08\xaa\xaa\x80\xa0", # [53,54,56,57,61,64..71,75,78,79] - 'experimental::args_array_with_signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [68] - 'experimental::builtin' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [69] - 'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [75] - 'experimental::declared_refs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [61] - 'experimental::defer' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [70] - 'experimental::extra_paired_delimiters'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [71] - 'experimental::keyword_all' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20", # [78] - 'experimental::keyword_any' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80", # [79] - 'experimental::private_use' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00", # [64] - 'experimental::re_strict' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [56] - 'experimental::refaliasing' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [57] - 'experimental::regex_sets' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [54] - 'experimental::try' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00", # [67] - 'experimental::uniprop_wildcards' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [65] - 'experimental::vlb' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [66] - 'glob' => "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4] - 'illegalproto' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [47] - 'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [46] - 'inplace' => "\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23] - 'internal' => "\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [24] - 'io' => "\x00\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [5..11,55] - 'layer' => "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8] - 'locale' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00", # [58] - 'malloc' => "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [25] - 'misc' => "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12] - 'missing' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [59] - 'newline' => "\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9] - 'non_unicode' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [50] - 'nonchar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [51] - 'numeric' => "\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13] - 'once' => "\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14] - 'overflow' => "\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15] - 'pack' => "\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [16] - 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [32] - 'pipe' => "\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10] - 'portable' => "\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [17] - 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [33] - 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [34] - 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [35] - 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [36] - 'recursion' => "\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [18] - 'redefine' => "\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [19] - 'redundant' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00", # [60] - 'regexp' => "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20] - 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [37] - 'scalar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [72] - 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [38] - 'severe' => "\x00\x00\x00\x00\x00\xa8\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25] - 'shadow' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [63] - 'signal' => "\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [26] - 'substr' => "\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [27] - 'surrogate' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00", # [52] - 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\x2a\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [28..38,47] - 'syscalls' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [55] - 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [39] - 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [40] - 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [41] - 'unopened' => "\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11] - 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [42] - 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [43] - 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xa0\x02\x00\x00\x00\x00\x00\x00", # [44,50..52] - 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [45] + 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", # [0..83] + 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [29] + 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [30] + 'closed' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6] + 'closure' => "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1] + 'debugging' => "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22] + 'deprecated' => "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x20\x00\x00\x28\x0a\x00", # [2,48,49,62,73,74,76,77] + 'deprecated::delimiter_will_be_paired'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [74] + 'deprecated::dot_in_inc' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00", # [62] + 'deprecated::goto_construct' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00", # [48] + 'deprecated::missing_import_called_with_args'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [76] + 'deprecated::subsequent_use_version'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [77] + 'deprecated::unicode_property_name' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [49] + 'deprecated::version_downgrade' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [73] + 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [31] + 'exec' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7] + 'exiting' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3] + 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x0a\x08\xaa\xaa\x80\xa0\x02", # [53,54,56,57,61,64..71,75,78..80] + 'experimental::args_array_with_signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00", # [68] + 'experimental::builtin' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [69] + 'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [75] + 'experimental::declared_refs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [61] + 'experimental::defer' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [70] + 'experimental::extra_paired_delimiters'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00", # [71] + 'experimental::keyword_all' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [78] + 'experimental::keyword_any' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [79] + 'experimental::private_use' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00", # [64] + 'experimental::re_strict' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00", # [56] + 'experimental::refaliasing' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00", # [57] + 'experimental::regex_sets' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [54] + 'experimental::signature_named_parameters'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [80] + 'experimental::try' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [67] + 'experimental::uniprop_wildcards' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [65] + 'experimental::vlb' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [66] + 'glob' => "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4] + 'illegalproto' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [47] + 'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [46] + 'inplace' => "\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23] + 'internal' => "\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [24] + 'io' => "\x00\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [5..11,55] + 'layer' => "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8] + 'locale' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [58] + 'malloc' => "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [25] + 'misc' => "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12] + 'missing' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [59] + 'newline' => "\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9] + 'non_unicode' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [50] + 'nonchar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [51] + 'numeric' => "\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13] + 'once' => "\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14] + 'overflow' => "\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15] + 'pack' => "\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [16] + 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [32] + 'pipe' => "\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10] + 'portable' => "\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [17] + 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [33] + 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [34] + 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [35] + 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [36] + 'recursion' => "\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [18] + 'redefine' => "\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [19] + 'redundant' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [60] + 'regexp' => "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20] + 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [37] + 'scalar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [72] + 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [38] + 'severe' => "\x00\x00\x00\x00\x00\xa8\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25] + 'shadow' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [63] + 'signal' => "\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [26] + 'substr' => "\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [27] + 'surrogate' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00", # [52] + 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\x2a\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [28..38,47] + 'syscalls' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [55] + 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [39] + 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [40] + 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [41] + 'unopened' => "\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11] + 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [42] + 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [43] + 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xa0\x02\x00\x00\x00\x00\x00\x00\x00", # [44,50..52] + 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [45] ); our %NoOp = ( @@ -316,10 +321,10 @@ our %NoOp = ( ); # These are used by various things, including our own tests -our $NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; -our $DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x05\x00\x15\x14\x55\x55\x54\x55"; # [2,4,22,23,25,48,49,56..58,61,62,64..71,73..79] -our $LAST_BIT = 160 ; -our $BYTES = 20 ; +our $NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; +our $DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x05\x00\x15\x14\x55\x55\x54\x55\x01"; # [2,4,22,23,25,48,49,56..58,61,62,64..71,73..80] +our $LAST_BIT = 162 ; +our $BYTES = 21 ; sub Croaker { @@ -963,6 +968,8 @@ The current hierarchy is: | | | +- experimental::regex_sets | | + | +- experimental::signature_named_parameters + | | | +- experimental::try | | | +- experimental::uniprop_wildcards diff --git a/op.c b/op.c index 4e302ccdca77..8897612a8cbe 100644 --- a/op.c +++ b/op.c @@ -1227,7 +1227,17 @@ Perl_op_clear(pTHX_ OP *o) break; case OP_MULTIPARAM: - PerlMemShared_free(cUNOP_AUXo->op_aux); + { + struct op_multiparam_aux *aux = (struct op_multiparam_aux *)cUNOP_AUXo->op_aux; + if(aux->named) { + for(size_t namedix = 0; namedix < aux->n_named; namedix++) { + struct op_multiparam_named_aux *named = aux->named + namedix; + PerlMemShared_free((void *)named->namepv); + } + PerlMemShared_free(aux->named); + } + PerlMemShared_free(aux); + } break; case OP_MULTICONCAT: @@ -16721,7 +16731,8 @@ Perl_rcpv_copy(pTHX_ char *pv) { /* Subroutine signature parsing */ struct yy_parser_signature_param { - size_t argix; /* positional index of the param */ + size_t argix; /* positional params: index of the param */ + SV *paramname; /* named params: name of the param */ PADOFFSET padix; /* pad index of the var holding the param */ OP *defcop; OPCODE defmode; @@ -16737,9 +16748,10 @@ struct yy_parser_signature { * parameter. Here, while it is exactly one *parameter*, it may account * zero or more arguments. */ - UV next_argix; /* the argument index of the next parameter we add */ - UV opt_params; /* number of optional scalar parameters */ - char slurpy; /* the sigil of the slurpy var (or null) */ + UV next_argix; /* the argument index of the next parameter we add */ + UV opt_params; /* number of optional positional scalar parameters */ + UV named_params; /* number of named scalar parameters */ + char slurpy; /* the sigil of the slurpy var (or null) */ UV nparams; /* number of elements of the following array that are in use */ UV params_size; /* number of elements we could store in the following array */ @@ -16757,6 +16769,8 @@ destroy_subsignature_context(pTHX_ void *p) for(size_t parami = 0; parami < signature->nparams; parami++) { struct yy_parser_signature_param *param = signature->params + parami; + if(param->paramname) + SvREFCNT_dec(param->paramname); if(param->defcop) op_free(param->defcop); if(param->defexpr) @@ -16787,6 +16801,7 @@ S_subsignature_push_param(pTHX) signature->nparams++; param->argix = 0; + param->paramname = NULL; param->padix = 0; param->defcop = NULL; param->defmode = 0; @@ -16852,6 +16867,38 @@ Perl_subsignature_append_fence_op(pTHX_ OP *o) signature->fenceops = newLISTOP(OP_LINESEQ, 0, o, NULL); } +#define subsignature_param_add_defexpr(param, defmode, defexpr) S_subsignature_param_add_defexpr(aTHX_ param, defmode, defexpr) +static void +S_subsignature_param_add_defexpr(pTHX_ struct yy_parser_signature_param *param, OPCODE defmode, OP *defexpr) +{ + if(defexpr->op_type == OP_NULL && !(defexpr->op_flags & OPf_KIDS)) + { + /* caller passed in newOP(OP_NULL, 0), so we should not leak it */ + op_free(defexpr); + + defexpr = newOP(OP_STUB, OPf_WANT_SCALAR); + + /* handle '$=' special case */ + if(param->padix) + yyerror("Optional parameter lacks default expression"); + } + + /* generate the COP here so the line number is correct */ + param->defcop = newSTATEOP(0, NULL, NULL); + + param->defmode = defmode; + param->defexpr = defexpr; + scalar(defexpr); + + if(!param->padix) { + /* A defaulting expression with anonymous var still needs to be + * conditional. We'll just have to allocate a pad temporary to + * store the value in anyway, so OP_PARAMTEST can check it. + */ + param->padix = pad_add_name_pvn("$", 1, padadd_NO_DUP_CHECK, NULL, NULL); + } +} + /* Appends another positional scalar parameter to the accumulated set of * subroutine params. `padix` may be zero, but if not it must be the pad * index of a scalar pad lexical to store the incoming argument value into. @@ -16878,6 +16925,11 @@ Perl_subsignature_append_positional(pTHX_ PADOFFSET padix, OPCODE defmode, OP *d return; } + if(signature->named_params) { + yyerror("Positional parameter follows named parameter"); + return; + } + UV argix = signature->next_argix; signature->next_argix++; @@ -16902,36 +16954,75 @@ Perl_subsignature_append_positional(pTHX_ PADOFFSET padix, OPCODE defmode, OP *d if(defexpr) { signature->opt_params++; + subsignature_param_add_defexpr(param, defmode, defexpr); + } - if(defexpr->op_type == OP_NULL && !(defexpr->op_flags & OPf_KIDS)) - { - /* caller passed in newOP(OP_NULL, 0), so we should not leak it */ - op_free(defexpr); + assert(param->padix || param->defexpr); +} + +/* Appends another named scalar parameter to the accumulated set of subroutine + * params. `padix` gives the pad index of a scalar pad lexical to store the + * incoming argument value into. It must not be zero, as "anonymous" named + * parameters are not allowed (in any case it's hard to imagine how that would + * be parsed ;) ). + * If `defexpr` is not NULL, it gives a defaulting expression to be evaluated + * if required, according to `defmode` - one of zero, `OP_DORASSIGN` or + * `OP_ORASSIGN`. + */ - defexpr = newOP(OP_STUB, OPf_WANT_SCALAR); +void +Perl_subsignature_append_named(pTHX_ const char *paramname, PADOFFSET padix, OPCODE defmode, OP *defexpr) +{ + PERL_ARGS_ASSERT_SUBSIGNATURE_APPEND_NAMED; + assert(padix); - /* handle '$=' special case */ - if(padix) - yyerror("Optional parameter lacks default expression"); - } + assert(PL_parser); + yy_parser_signature *signature = PL_parser->signature; + assert(signature); - /* generate the COP here so the line number is correct */ - param->defcop = newSTATEOP(0, NULL, NULL); + if(!signature->named_params) + /* Only warn about the first one to avoid noise on multiple */ + ck_warner_d(packWARN(WARN_EXPERIMENTAL__SIGNATURE_NAMED_PARAMETERS), + "Named parameters in signatures are experimental"); - param->defmode = defmode; - param->defexpr = defexpr; - scalar(defexpr); + if(signature->slurpy) { + yyerror("Slurpy parameter not last"); + return; + } - if(!padix) { - /* A defaulting expression with anonymous var still needs to be - * conditional. We'll just have to allocate a pad temporary to - * store the value in anyway, so OP_PARAMTEST can check it. - */ - param->padix = pad_add_name_pvn("$", 1, padadd_NO_DUP_CHECK, NULL, NULL); - } + if(!defexpr && signature->opt_params) { + yyerror("Mandatory parameter follows optional parameter"); + return; } - assert(param->padix || param->defexpr); + SV *namesv = newSVpvn_utf8(paramname, strlen(paramname), true); + + for(size_t parami = 0; parami < signature->named_params; parami++) { + struct yy_parser_signature_param *param = signature->params + parami; + + if(!param->paramname || !sv_streq(param->paramname, namesv)) + continue; + + SvREFCNT_dec(namesv); + yyerror("Duplicated subroutine parameter name"); + return; + } + + struct yy_parser_signature_param *param = subsignature_push_param(); + param->paramname = namesv; + + signature->named_params++; + + param->padix = padix; + + intro_my(); /* introduce the new pad variable now */ + + if(defexpr) { + subsignature_param_add_defexpr(param, defmode, defexpr); + } + + assert(param->padix); + assert(param->paramname); } /* Appends a final slurpy parameter to the accumulated set of subroutine @@ -16969,6 +17060,40 @@ Perl_subsignature_append_slurpy(pTHX_ I32 sigil, PADOFFSET padix) param->padix = padix; } +#define subsignature_build_defop(param) S_subsignature_build_defop(aTHX_ param) +static OP * +S_subsignature_build_defop(pTHX_ struct yy_parser_signature_param *param) +{ + OP *defexpr = param->defexpr; + assert(defexpr); + OP *defexpr_start = LINKLIST(defexpr); + + /* Need to build OP_PARAMTEST[ other: OP_PARAMSTORE[ default-expr ] ] */ + OP *paramstore = newUNOP(OP_PARAMSTORE, 0, defexpr); + OP *paramtest = (OP *)alloc_LOGOP(OP_PARAMTEST, paramstore, defexpr_start); + + paramtest->op_flags |= OPf_WANT_VOID; + paramtest->op_targ = paramstore->op_targ = param->padix; + + if(param->defmode == OP_DORASSIGN) + paramtest->op_private |= OPpPARAM_IF_UNDEF; + if(param->defmode == OP_ORASSIGN) + paramtest->op_private |= OPpPARAM_IF_FALSE; + + defexpr->op_next = paramstore; + + /* Wrap both in an outer OP_NULL so we can point both ->op_next + * pointers within into it + */ + OP *o = newUNOP(OP_NULL, 0, paramtest); + + paramstore->op_next = o; + paramtest->op_next = o; + o->op_next = paramtest; /* set start of o */ + + return o; +} + /* Called from perly.y on encountering the closing `)` of a subroutine * signature. This creates the optree fragment responsible for processing all * the accumulated subroutine params, to be inserted at the start of the @@ -16990,13 +17115,29 @@ Perl_subsignature_finish(pTHX) newSTATEOP(0, NULL, NULL)); size_t end_argix = signature->next_argix; + size_t n_named = signature->named_params; + /* This allocates two sections in one chunk: + * the op_multiparam_aux header + * an array of end_argix * PADOFFSETs + */ struct op_multiparam_aux *aux = (struct op_multiparam_aux *)PerlMemShared_malloc( - sizeof(struct op_multiparam_aux) + (end_argix * sizeof(PADOFFSET))); - aux->param_padix = (PADOFFSET *)((char *)aux + sizeof(struct op_multiparam_aux)); + sizeof(struct op_multiparam_aux) + + (end_argix * sizeof(PADOFFSET))); + + aux->param_padix = (PADOFFSET *)( + (char *)aux + sizeof(struct op_multiparam_aux)); + + if(n_named) { + aux->named = (struct op_multiparam_named_aux *)PerlMemShared_malloc( + n_named * sizeof(struct op_multiparam_named_aux)); + } + else + aux->named = NULL; aux->min_args = end_argix - signature->opt_params; aux->n_positional = end_argix; + aux->n_named = signature->named_params; aux->slurpy = signature->slurpy; aux->slurpy_padix = 0; @@ -17021,13 +17162,20 @@ Perl_subsignature_finish(pTHX) struct yy_parser_signature_param *params = signature->params; size_t max_argix = 0; + size_t namedix = 0; + + size_t parami = 0; - for(size_t parami = 0; parami < signature->nparams; parami++) { + /* Collect up the positional scalar params */ + for(/**/; parami < signature->nparams; parami++) { struct yy_parser_signature_param *param = params + parami; size_t argix = param->argix; PADOFFSET padix = param->padix; + if(param->paramname || argix >= aux->n_positional) + break; + while(max_argix < argix) { aux->param_padix[max_argix] = 0; max_argix++; @@ -17043,46 +17191,16 @@ Perl_subsignature_finish(pTHX) aux->param_padix[argix] = padix; - OP *defexpr = param->defexpr; - assert(defexpr); - OP *defexpr_start = LINKLIST(defexpr); - - /* Need to build OP_PARAMTEST[ other: OP_PARAMSTORE[ default-expr ] ] */ - OP *paramstore; - OP *paramtest = (OP *)alloc_LOGOP(OP_PARAMTEST, - paramstore = newUNOP(OP_PARAMSTORE, 0, defexpr), - defexpr_start); - - paramtest->op_flags |= OPf_WANT_VOID; - paramtest->op_targ = paramstore->op_targ = padix; - - if(param->defmode == OP_DORASSIGN) - paramtest->op_private |= OPpPARAM_IF_UNDEF; - if(param->defmode == OP_ORASSIGN) - paramtest->op_private |= OPpPARAM_IF_FALSE; - - defexpr->op_next = paramstore; - - /* Wrap both in an outer OP_NULL so we can point both ->op_next - * pointers within into it - */ - OP *o = newUNOP(OP_NULL, 0, paramtest); - - paramstore->op_next = o; - paramtest->op_next = o; - o->op_next = paramtest; /* set start of o */ - sigops = op_append_elem(OP_LINESEQ, sigops, param->defcop); param->defcop = NULL; sigops = op_append_elem(OP_LINESEQ, sigops, - o); + subsignature_build_defop(param)); param->defexpr = NULL; } else { - /* This is the final slurpy */ - aux->slurpy_padix = padix; + NOT_REACHED; } max_argix = argix + 1; @@ -17093,6 +17211,54 @@ Perl_subsignature_finish(pTHX) max_argix++; } + /* Collect up the named params */ + for(/**/; parami < signature->nparams; parami++) { + struct yy_parser_signature_param *param = params + parami; + + if(!param->paramname) + /* this is final slurpy */ + break; + + /* For now, build the named param array in iteration order. We'll + * sort it at the end. + */ + STRLEN namelen; + char *namepv = SvPVutf8(param->paramname, namelen); + U32 namehash; + PERL_HASH(namehash, namepv, namelen); + + struct op_multiparam_named_aux *named = aux->named + namedix; + namedix++; + + named->namepv = savesharedpv(namepv); + named->namelen = namelen; + named->namehash = namehash; + named->padix = param->padix; + + if(param->defexpr) { + named->is_required = false; + + sigops = op_append_elem(OP_LINESEQ, sigops, + param->defcop); + param->defcop = NULL; + + sigops = op_append_elem(OP_LINESEQ, sigops, + subsignature_build_defop(param)); + param->defexpr = NULL; + } + else + named->is_required = true; + } + + /* The final slurpy */ + if(parami < signature->nparams) { + struct yy_parser_signature_param *param = params + parami; + + assert(param->argix >= aux->n_positional); + + aux->slurpy_padix = param->padix; + } + /* a nextstate at the end handles context correctly for an empty sub body */ sigops = op_append_elem(OP_LINESEQ, sigops, newSTATEOP(0, NULL, NULL)); diff --git a/op.h b/op.h index 1ee8d06ed543..e25aa5d9ba6d 100644 --- a/op.h +++ b/op.h @@ -1193,12 +1193,31 @@ struct op_argcheck_aux { /* for OP_MULTIPARAM */ +struct op_multiparam_named_aux { + const char *namepv; + STRLEN namelen; + U32 namehash; + PADOFFSET padix; + + bool is_required : 1; +}; + struct op_multiparam_aux { + /* This struct will be allocated in one big chunk, containing this header + * itself, followed an array whose size is given by n_positional. The + * pointer at the end will point into the same malloc block + */ size_t min_args; /* = the number of mandatory scalar parameters */ - size_t n_positional; /* = the number of mandatory + optional scalar parameters, not counting a final slurpy */ + size_t n_positional; /* = the number of mandatory + optional positional scalar parameters, not counting a final slurpy */ + size_t n_named; /* = the number of (mandatory or optional) named scalar parameters */ char slurpy; - PADOFFSET *param_padix; /* points at storage allocated along with the struct itself, immediately following */ PADOFFSET slurpy_padix; + + /* The following points at storage allocated along with the struct itself, immediately afterwards */ + PADOFFSET *param_padix; + + /* The following may be separately allocated */ + struct op_multiparam_named_aux *named; }; #define MI_INIT_WORKAROUND_PACK "Module::Install::DSL" diff --git a/perly.act b/perly.act index 34bfba27efa2..23bb54a16b72 100644 --- a/perly.act +++ b/perly.act @@ -5,7 +5,7 @@ */ case 2: /* @1: %empty */ -#line 187 "perly.y" +#line 188 "perly.y" { parser->expect = XSTATE; (yyval.ival) = 0; @@ -14,7 +14,7 @@ case 2: /* @1: %empty */ break; case 3: /* grammar: GRAMPROG @1 remember stmtseq */ -#line 192 "perly.y" +#line 193 "perly.y" { newPROG(block_end((ps[-1].val.ival),(ps[0].val.opval))); PL_compiling.cop_seq = 0; @@ -24,7 +24,7 @@ case 2: /* @1: %empty */ break; case 4: /* @2: %empty */ -#line 198 "perly.y" +#line 199 "perly.y" { parser->expect = XTERM; (yyval.ival) = 0; @@ -33,7 +33,7 @@ case 2: /* @1: %empty */ break; case 5: /* grammar: GRAMEXPR @2 optexpr */ -#line 203 "perly.y" +#line 204 "perly.y" { PL_eval_root = (ps[0].val.opval); (yyval.ival) = 0; @@ -42,7 +42,7 @@ case 2: /* @1: %empty */ break; case 6: /* @3: %empty */ -#line 208 "perly.y" +#line 209 "perly.y" { parser->expect = XBLOCK; (yyval.ival) = 0; @@ -51,7 +51,7 @@ case 2: /* @1: %empty */ break; case 7: /* grammar: GRAMBLOCK @3 block */ -#line 213 "perly.y" +#line 214 "perly.y" { PL_pad_reset_pending = TRUE; PL_eval_root = (ps[0].val.opval); @@ -63,7 +63,7 @@ case 2: /* @1: %empty */ break; case 8: /* @4: %empty */ -#line 221 "perly.y" +#line 222 "perly.y" { parser->expect = XSTATE; (yyval.ival) = 0; @@ -72,7 +72,7 @@ case 2: /* @1: %empty */ break; case 9: /* grammar: GRAMBARESTMT @4 barestmt */ -#line 226 "perly.y" +#line 227 "perly.y" { PL_pad_reset_pending = TRUE; PL_eval_root = (ps[0].val.opval); @@ -84,7 +84,7 @@ case 2: /* @1: %empty */ break; case 10: /* @5: %empty */ -#line 234 "perly.y" +#line 235 "perly.y" { parser->expect = XSTATE; (yyval.ival) = 0; @@ -93,7 +93,7 @@ case 2: /* @1: %empty */ break; case 11: /* grammar: GRAMFULLSTMT @5 fullstmt */ -#line 239 "perly.y" +#line 240 "perly.y" { PL_pad_reset_pending = TRUE; PL_eval_root = (ps[0].val.opval); @@ -105,7 +105,7 @@ case 2: /* @1: %empty */ break; case 12: /* @6: %empty */ -#line 247 "perly.y" +#line 248 "perly.y" { parser->expect = XSTATE; (yyval.ival) = 0; @@ -114,7 +114,7 @@ case 2: /* @1: %empty */ break; case 13: /* grammar: GRAMSTMTSEQ @6 stmtseq */ -#line 252 "perly.y" +#line 253 "perly.y" { PL_eval_root = (ps[0].val.opval); (yyval.ival) = 0; @@ -123,7 +123,7 @@ case 2: /* @1: %empty */ break; case 14: /* @7: %empty */ -#line 257 "perly.y" +#line 258 "perly.y" { parser->expect = XSTATE; (yyval.ival) = 0; @@ -132,7 +132,7 @@ case 2: /* @1: %empty */ break; case 15: /* grammar: GRAMSUBSIGNATURE @7 subsigguts */ -#line 262 "perly.y" +#line 263 "perly.y" { PL_eval_root = (ps[0].val.opval); (yyval.ival) = 0; @@ -141,7 +141,7 @@ case 2: /* @1: %empty */ break; case 16: /* bare_statement_block: block cont */ -#line 271 "perly.y" +#line 272 "perly.y" { (yyval.opval) = new_block_statement ((ps[-1].val.opval), (ps[0].val.opval)); } @@ -149,7 +149,7 @@ case 2: /* @1: %empty */ break; case 17: /* bare_statement_class_declaration: KW_CLASS BAREWORD BAREWORD subattrlist PERLY_SEMICOLON */ -#line 282 "perly.y" +#line 283 "perly.y" { package ((ps[-2].val.opval), (ps[-3].val.opval)); (yyval.opval) = NULL; @@ -162,7 +162,7 @@ case 2: /* @1: %empty */ break; case 18: /* $@8: %empty */ -#line 299 "perly.y" +#line 300 "perly.y" { package ((ps[-3].val.opval), (ps[-4].val.opval)); class_setup_stash(PL_curstash); @@ -174,7 +174,7 @@ case 2: /* @1: %empty */ break; case 19: /* bare_statement_class_definition: KW_CLASS BAREWORD BAREWORD subattrlist PERLY_BRACE_OPEN remember $@8 stmtseq PERLY_BRACE_CLOSE */ -#line 308 "perly.y" +#line 309 "perly.y" { (yyval.opval) = new_block_statement (block_end ((ps[-3].val.ival), (ps[-1].val.opval)), NULL); if (parser->copline > (line_t)(ps[-4].val.ival)) @@ -184,7 +184,7 @@ case 2: /* @1: %empty */ break; case 20: /* bare_statement_default: KW_DEFAULT block */ -#line 318 "perly.y" +#line 319 "perly.y" { (yyval.opval) = newWHENOP(0, op_scope((ps[0].val.opval))); } @@ -192,7 +192,7 @@ case 2: /* @1: %empty */ break; case 21: /* bare_statement_defer: KW_DEFER mblock */ -#line 325 "perly.y" +#line 326 "perly.y" { (yyval.opval) = newDEFEROP(0, op_scope((ps[0].val.opval))); } @@ -200,7 +200,7 @@ case 2: /* @1: %empty */ break; case 22: /* bare_statement_expression: sideff PERLY_SEMICOLON */ -#line 333 "perly.y" +#line 334 "perly.y" { (yyval.opval) = (ps[-1].val.opval); } @@ -208,7 +208,7 @@ case 2: /* @1: %empty */ break; case 23: /* bare_statement_field_declaration: fielddecl PERLY_SEMICOLON */ -#line 341 "perly.y" +#line 342 "perly.y" { (yyval.opval) = (ps[-1].val.opval); } @@ -216,7 +216,7 @@ case 2: /* @1: %empty */ break; case 24: /* $@9: %empty */ -#line 352 "perly.y" +#line 353 "perly.y" { parser->expect = XTERM; } @@ -224,7 +224,7 @@ case 2: /* @1: %empty */ break; case 25: /* $@10: %empty */ -#line 357 "perly.y" +#line 358 "perly.y" { parser->expect = XTERM; } @@ -232,7 +232,7 @@ case 2: /* @1: %empty */ break; case 26: /* bare_statement_for: KW_FOR PERLY_PAREN_OPEN remember mnexpr PERLY_SEMICOLON $@9 texpr PERLY_SEMICOLON $@10 mintro mnexpr PERLY_PAREN_CLOSE mblock */ -#line 364 "perly.y" +#line 365 "perly.y" { OP *initop = (ps[-9].val.opval); OP *forop = newWHILEOP(0, 1, NULL, scalar((ps[-6].val.opval)), (ps[0].val.opval), (ps[-2].val.opval), (ps[-3].val.ival)); @@ -251,7 +251,7 @@ case 2: /* @1: %empty */ break; case 27: /* bare_statement_for: KW_FOR KW_MY remember my_scalar PERLY_PAREN_OPEN mexpr PERLY_PAREN_CLOSE mblock cont */ -#line 387 "perly.y" +#line 388 "perly.y" { (yyval.opval) = block_end((ps[-6].val.ival), newFOROP(0, (ps[-5].val.opval), (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval))); parser->copline = (line_t)(ps[-8].val.ival); @@ -260,7 +260,7 @@ case 2: /* @1: %empty */ break; case 28: /* bare_statement_for: KW_FOR KW_MY remember PERLY_PAREN_OPEN my_list_of_scalars PERLY_PAREN_CLOSE PERLY_PAREN_OPEN mexpr PERLY_PAREN_CLOSE mblock cont */ -#line 402 "perly.y" +#line 403 "perly.y" { if ((ps[-6].val.opval)->op_type == OP_PADSV) /* degenerate case of 1 var: for my ($x) .... @@ -273,7 +273,7 @@ case 2: /* @1: %empty */ break; case 29: /* bare_statement_for: KW_FOR scalar PERLY_PAREN_OPEN remember mexpr PERLY_PAREN_CLOSE mblock cont */ -#line 418 "perly.y" +#line 419 "perly.y" { (yyval.opval) = block_end((ps[-4].val.ival), newFOROP(0, op_lvalue((ps[-6].val.opval), OP_ENTERLOOP), (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval))); parser->copline = (line_t)(ps[-7].val.ival); @@ -282,7 +282,7 @@ case 2: /* @1: %empty */ break; case 30: /* @11: %empty */ -#line 426 "perly.y" +#line 427 "perly.y" { parser->in_my = 0; (yyval.opval) = my((ps[0].val.opval)); @@ -291,7 +291,7 @@ case 2: /* @1: %empty */ break; case 31: /* bare_statement_for: KW_FOR my_refgen remember my_var @11 PERLY_PAREN_OPEN mexpr PERLY_PAREN_CLOSE mblock cont */ -#line 435 "perly.y" +#line 436 "perly.y" { (yyval.opval) = block_end( (ps[-7].val.ival), @@ -312,7 +312,7 @@ case 2: /* @1: %empty */ break; case 32: /* bare_statement_for: KW_FOR REFGEN refgen_topic PERLY_PAREN_OPEN remember mexpr PERLY_PAREN_CLOSE mblock cont */ -#line 460 "perly.y" +#line 461 "perly.y" { (yyval.opval) = block_end ( (ps[-4].val.ival), @@ -330,7 +330,7 @@ case 2: /* @1: %empty */ break; case 33: /* bare_statement_for: KW_FOR PERLY_PAREN_OPEN remember mexpr PERLY_PAREN_CLOSE mblock cont */ -#line 480 "perly.y" +#line 481 "perly.y" { (yyval.opval) = block_end((ps[-4].val.ival), newFOROP(0, NULL, (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval))); parser->copline = (line_t)(ps[-6].val.ival); @@ -339,7 +339,7 @@ case 2: /* @1: %empty */ break; case 34: /* bare_statement_format: KW_FORMAT startformsub formname formblock */ -#line 491 "perly.y" +#line 492 "perly.y" { CV *fmtcv = PL_compcv; newFORM((ps[-2].val.ival), (ps[-1].val.opval), (ps[0].val.opval)); @@ -353,7 +353,7 @@ case 2: /* @1: %empty */ break; case 35: /* bare_statement_given: KW_GIVEN PERLY_PAREN_OPEN remember mexpr PERLY_PAREN_CLOSE mblock */ -#line 509 "perly.y" +#line 510 "perly.y" { (yyval.opval) = block_end((ps[-3].val.ival), newGIVENOP((ps[-2].val.opval), op_scope((ps[0].val.opval)), 0)); parser->copline = (line_t)(ps[-5].val.ival); @@ -362,7 +362,7 @@ case 2: /* @1: %empty */ break; case 36: /* bare_statement_if: KW_IF PERLY_PAREN_OPEN remember mexpr PERLY_PAREN_CLOSE mblock else */ -#line 523 "perly.y" +#line 524 "perly.y" { (yyval.opval) = block_end((ps[-4].val.ival), newCONDOP(0, (ps[-3].val.opval), op_scope((ps[-1].val.opval)), (ps[0].val.opval))); parser->copline = (line_t)(ps[-6].val.ival); @@ -371,7 +371,7 @@ case 2: /* @1: %empty */ break; case 37: /* bare_statement_null: PERLY_SEMICOLON */ -#line 531 "perly.y" +#line 532 "perly.y" { (yyval.opval) = NULL; parser->copline = NOLINE; @@ -380,7 +380,7 @@ case 2: /* @1: %empty */ break; case 38: /* bare_statement_package_declaration: KW_PACKAGE BAREWORD BAREWORD PERLY_SEMICOLON */ -#line 547 "perly.y" +#line 548 "perly.y" { package ((ps[-1].val.opval), (ps[-2].val.opval)); (yyval.opval) = NULL; @@ -389,7 +389,7 @@ case 2: /* @1: %empty */ break; case 39: /* $@12: %empty */ -#line 559 "perly.y" +#line 560 "perly.y" { package ((ps[-2].val.opval), (ps[-3].val.opval)); } @@ -397,7 +397,7 @@ case 2: /* @1: %empty */ break; case 40: /* bare_statement_package_definition: KW_PACKAGE BAREWORD BAREWORD PERLY_BRACE_OPEN remember $@12 stmtseq PERLY_BRACE_CLOSE */ -#line 564 "perly.y" +#line 565 "perly.y" { (yyval.opval) = new_block_statement (block_end ((ps[-3].val.ival), (ps[-1].val.opval)), NULL); if (parser->copline > (line_t)(ps[-4].val.ival)) @@ -407,7 +407,7 @@ case 2: /* @1: %empty */ break; case 41: /* $@13: %empty */ -#line 574 "perly.y" +#line 575 "perly.y" { switch((ps[-1].val.ival)) { case KEY_ADJUST: @@ -422,7 +422,7 @@ case 2: /* @1: %empty */ break; case 42: /* bare_statement_phaser: PHASER startsub $@13 optsubbody */ -#line 585 "perly.y" +#line 586 "perly.y" { OP *body = (ps[0].val.opval); SvREFCNT_inc_simple_void(PL_compcv); @@ -442,7 +442,7 @@ case 2: /* @1: %empty */ break; case 43: /* $@14: %empty */ -#line 609 "perly.y" +#line 610 "perly.y" { init_named_cv(PL_compcv, (ps[-1].val.opval)); if((ps[-2].val.ival) == KW_METHOD_named) { @@ -456,7 +456,7 @@ case 2: /* @1: %empty */ break; case 44: /* bare_statement_sub_signature: sigsub_or_method_named subname startsub $@14 subattrlist optsigsubbody */ -#line 620 "perly.y" +#line 621 "perly.y" { OP *body = (ps[0].val.opval); @@ -473,7 +473,7 @@ case 2: /* @1: %empty */ break; case 45: /* $@15: %empty */ -#line 639 "perly.y" +#line 640 "perly.y" { init_named_cv(PL_compcv, (ps[-1].val.opval)); parser->in_my = 0; @@ -483,7 +483,7 @@ case 2: /* @1: %empty */ break; case 46: /* bare_statement_sub_traditional: KW_SUB_named subname startsub $@15 proto subattrlist optsubbody */ -#line 647 "perly.y" +#line 648 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); (ps[-5].val.opval)->op_type == OP_CONST @@ -498,7 +498,7 @@ case 2: /* @1: %empty */ break; case 47: /* $@16: %empty */ -#line 665 "perly.y" +#line 666 "perly.y" { if(!(ps[0].val.opval)) { yyerror("catch block requires a (VAR)"); @@ -509,7 +509,7 @@ case 2: /* @1: %empty */ break; case 48: /* bare_statement_try_catch: KW_TRY mblock KW_CATCH remember catch_paren $@16 mblock finally */ -#line 673 "perly.y" +#line 674 "perly.y" { (yyval.opval) = newTRYCATCHOP(0, (ps[-6].val.opval), (ps[-3].val.opval), block_end((ps[-4].val.ival), op_scope((ps[-1].val.opval)))); if((ps[0].val.opval)) @@ -520,7 +520,7 @@ case 2: /* @1: %empty */ break; case 49: /* bare_statement_unless: KW_UNLESS PERLY_PAREN_OPEN remember mexpr PERLY_PAREN_CLOSE mblock else */ -#line 689 "perly.y" +#line 690 "perly.y" { (yyval.opval) = block_end((ps[-4].val.ival), newCONDOP(0, (ps[-3].val.opval), (ps[0].val.opval), op_scope((ps[-1].val.opval)))); parser->copline = (line_t)(ps[-6].val.ival); @@ -529,7 +529,7 @@ case 2: /* @1: %empty */ break; case 50: /* bare_statement_until: KW_UNTIL PERLY_PAREN_OPEN remember iexpr PERLY_PAREN_CLOSE mintro mblock cont */ -#line 704 "perly.y" +#line 705 "perly.y" { (yyval.opval) = block_end((ps[-5].val.ival), newWHILEOP(0, 1, NULL, (ps[-4].val.opval), (ps[-1].val.opval), (ps[0].val.opval), (ps[-2].val.ival))); parser->copline = (line_t)(ps[-7].val.ival); @@ -538,13 +538,13 @@ case 2: /* @1: %empty */ break; case 51: /* $@17: %empty */ -#line 713 "perly.y" +#line 714 "perly.y" { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ } break; case 52: /* bare_statement_utilize: KW_USE_or_NO startsub $@17 BAREWORD BAREWORD optlistexpr PERLY_SEMICOLON */ -#line 720 "perly.y" +#line 721 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); utilize((ps[-6].val.ival), (ps[-5].val.ival), (ps[-3].val.opval), (ps[-2].val.opval), (ps[-1].val.opval)); @@ -555,7 +555,7 @@ case 2: /* @1: %empty */ break; case 53: /* bare_statement_when: KW_WHEN PERLY_PAREN_OPEN remember mexpr PERLY_PAREN_CLOSE mblock */ -#line 735 "perly.y" +#line 736 "perly.y" { (yyval.opval) = block_end((ps[-3].val.ival), newWHENOP((ps[-2].val.opval), op_scope((ps[0].val.opval)))); } @@ -563,7 +563,7 @@ case 2: /* @1: %empty */ break; case 54: /* bare_statement_while: KW_WHILE PERLY_PAREN_OPEN remember texpr PERLY_PAREN_CLOSE mintro mblock cont */ -#line 749 "perly.y" +#line 750 "perly.y" { (yyval.opval) = block_end((ps[-5].val.ival), newWHILEOP(0, 1, NULL, (ps[-4].val.opval), (ps[-1].val.opval), (ps[0].val.opval), (ps[-2].val.ival))); parser->copline = (line_t)(ps[-7].val.ival); @@ -572,7 +572,7 @@ case 2: /* @1: %empty */ break; case 55: /* bare_statement_yadayada: YADAYADA PERLY_SEMICOLON */ -#line 757 "perly.y" +#line 758 "perly.y" { /* diag_listed_as: Unimplemented */ (yyval.opval) = newLISTOP(OP_DIE, 0, newOP(OP_PUSHMARK, 0), newSVOP(OP_CONST, 0, newSVpvs("Unimplemented"))); @@ -581,19 +581,19 @@ case 2: /* @1: %empty */ break; case 56: /* sigsub_or_method_named: KW_SUB_named_sig */ -#line 766 "perly.y" +#line 767 "perly.y" { (yyval.ival) = KW_SUB_named_sig; } break; case 57: /* sigsub_or_method_named: KW_METHOD_named */ -#line 768 "perly.y" +#line 769 "perly.y" { (yyval.ival) = KW_METHOD_named; } break; case 58: /* block: PERLY_BRACE_OPEN remember stmtseq PERLY_BRACE_CLOSE */ -#line 773 "perly.y" +#line 774 "perly.y" { if (parser->copline > (line_t)(ps[-3].val.ival)) parser->copline = (line_t)(ps[-3].val.ival); (yyval.opval) = block_end((ps[-2].val.ival), (ps[-1].val.opval)); @@ -602,13 +602,13 @@ case 2: /* @1: %empty */ break; case 59: /* empty: %empty */ -#line 780 "perly.y" +#line 781 "perly.y" { (yyval.opval) = NULL; } break; case 60: /* formblock: PERLY_EQUAL_SIGN remember PERLY_SEMICOLON FORMRBRACK formstmtseq PERLY_SEMICOLON PERLY_DOT */ -#line 785 "perly.y" +#line 786 "perly.y" { if (parser->copline > (line_t)(ps[-6].val.ival)) parser->copline = (line_t)(ps[-6].val.ival); (yyval.opval) = block_end((ps[-5].val.ival), (ps[-2].val.opval)); @@ -617,14 +617,14 @@ case 2: /* @1: %empty */ break; case 61: /* remember: %empty */ -#line 792 "perly.y" +#line 793 "perly.y" { (yyval.ival) = block_start(TRUE); parser->parsed_sub = 0; } break; case 62: /* mblock: PERLY_BRACE_OPEN mremember stmtseq PERLY_BRACE_CLOSE */ -#line 797 "perly.y" +#line 798 "perly.y" { if (parser->copline > (line_t)(ps[-3].val.ival)) parser->copline = (line_t)(ps[-3].val.ival); (yyval.opval) = block_end((ps[-2].val.ival), (ps[-1].val.opval)); @@ -633,32 +633,32 @@ case 2: /* @1: %empty */ break; case 63: /* mremember: %empty */ -#line 804 "perly.y" +#line 805 "perly.y" { (yyval.ival) = block_start(FALSE); parser->parsed_sub = 0; } break; case 65: /* $@18: %empty */ -#line 813 "perly.y" +#line 814 "perly.y" { parser->in_my = KEY_catch; } break; case 66: /* $@19: %empty */ -#line 815 "perly.y" +#line 816 "perly.y" { parser->in_my = 0; intro_my(); } break; case 67: /* catch_paren: PERLY_PAREN_OPEN $@18 scalar $@19 PERLY_PAREN_CLOSE */ -#line 817 "perly.y" +#line 818 "perly.y" { (yyval.opval) = (ps[-2].val.opval); } break; case 69: /* stmtseq: stmtseq fullstmt */ -#line 824 "perly.y" +#line 825 "perly.y" { (yyval.opval) = op_append_list(OP_LINESEQ, (ps[-1].val.opval), (ps[0].val.opval)); PL_pad_reset_pending = TRUE; if ((ps[-1].val.opval) && (ps[0].val.opval)) @@ -668,7 +668,7 @@ case 2: /* @1: %empty */ break; case 71: /* formstmtseq: formstmtseq formline */ -#line 835 "perly.y" +#line 836 "perly.y" { (yyval.opval) = op_append_list(OP_LINESEQ, (ps[-1].val.opval), (ps[0].val.opval)); PL_pad_reset_pending = TRUE; if ((ps[-1].val.opval) && (ps[0].val.opval)) @@ -678,7 +678,7 @@ case 2: /* @1: %empty */ break; case 72: /* fullstmt: barestmt */ -#line 844 "perly.y" +#line 845 "perly.y" { (yyval.opval) = (ps[0].val.opval) ? newSTATEOP(0, NULL, (ps[0].val.opval)) : NULL; } @@ -686,13 +686,13 @@ case 2: /* @1: %empty */ break; case 73: /* fullstmt: labfullstmt */ -#line 848 "perly.y" +#line 849 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; case 74: /* labfullstmt: LABEL barestmt */ -#line 852 "perly.y" +#line 853 "perly.y" { SV *label = cSVOPx_sv((ps[-1].val.opval)); (yyval.opval) = newSTATEOP(SvFLAGS(label) & SVf_UTF8, @@ -703,7 +703,7 @@ case 2: /* @1: %empty */ break; case 75: /* labfullstmt: LABEL labfullstmt */ -#line 859 "perly.y" +#line 860 "perly.y" { SV *label = cSVOPx_sv((ps[-1].val.opval)); (yyval.opval) = newSTATEOP(SvFLAGS(label) & SVf_UTF8, @@ -714,7 +714,7 @@ case 2: /* @1: %empty */ break; case 101: /* formline: THING formarg */ -#line 904 "perly.y" +#line 905 "perly.y" { OP *list; if ((ps[0].val.opval)) { OP *term = (ps[0].val.opval); @@ -733,62 +733,62 @@ case 2: /* @1: %empty */ break; case 103: /* formarg: FORMLBRACK stmtseq FORMRBRACK */ -#line 923 "perly.y" +#line 924 "perly.y" { (yyval.opval) = op_unscope((ps[-1].val.opval)); } break; case 105: /* sideff: error */ -#line 931 "perly.y" +#line 932 "perly.y" { (yyval.opval) = NULL; } break; case 106: /* sideff: expr */ -#line 933 "perly.y" +#line 934 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; case 107: /* sideff: expr KW_IF condition */ -#line 935 "perly.y" +#line 936 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[0].val.opval), (ps[-2].val.opval)); } break; case 108: /* sideff: expr KW_UNLESS condition */ -#line 937 "perly.y" +#line 938 "perly.y" { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[0].val.opval), (ps[-2].val.opval)); } break; case 109: /* sideff: expr KW_WHILE condition */ -#line 939 "perly.y" +#line 940 "perly.y" { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((ps[0].val.opval)), (ps[-2].val.opval)); } break; case 110: /* sideff: expr KW_UNTIL iexpr */ -#line 941 "perly.y" +#line 942 "perly.y" { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (ps[0].val.opval), (ps[-2].val.opval)); } break; case 111: /* sideff: expr KW_FOR condition */ -#line 943 "perly.y" +#line 944 "perly.y" { (yyval.opval) = newFOROP(0, NULL, (ps[0].val.opval), (ps[-2].val.opval), NULL); parser->copline = (line_t)(ps[-1].val.ival); } break; case 112: /* sideff: expr KW_WHEN condition */ -#line 946 "perly.y" +#line 947 "perly.y" { (yyval.opval) = newWHENOP((ps[0].val.opval), op_scope((ps[-2].val.opval))); } break; case 114: /* else: KW_ELSE mblock */ -#line 953 "perly.y" +#line 954 "perly.y" { ((ps[0].val.opval))->op_flags |= OPf_PARENS; (yyval.opval) = op_scope((ps[0].val.opval)); @@ -797,7 +797,7 @@ case 2: /* @1: %empty */ break; case 115: /* else: KW_ELSIF PERLY_PAREN_OPEN mexpr PERLY_PAREN_CLOSE mblock else */ -#line 958 "perly.y" +#line 959 "perly.y" { parser->copline = (line_t)(ps[-5].val.ival); (yyval.opval) = newCONDOP(0, newSTATEOP(OPf_SPECIAL,NULL,(ps[-3].val.opval)), @@ -808,25 +808,25 @@ case 2: /* @1: %empty */ break; case 117: /* cont: KW_CONTINUE block */ -#line 970 "perly.y" +#line 971 "perly.y" { (yyval.opval) = op_scope((ps[0].val.opval)); } break; case 118: /* finally: %empty */ -#line 975 "perly.y" +#line 976 "perly.y" { (yyval.opval) = NULL; } break; case 119: /* finally: KW_FINALLY block */ -#line 977 "perly.y" +#line 978 "perly.y" { (yyval.opval) = op_scope((ps[0].val.opval)); } break; case 120: /* mintro: %empty */ -#line 982 "perly.y" +#line 983 "perly.y" { (yyval.ival) = (PL_min_intro_pending && PL_max_intro_pending >= PL_min_intro_pending); intro_my(); } @@ -834,7 +834,7 @@ case 2: /* @1: %empty */ break; case 123: /* texpr: %empty */ -#line 994 "perly.y" +#line 995 "perly.y" { YYSTYPE tmplval; (void)scan_num("1", &tmplval); (yyval.opval) = tmplval.opval; } @@ -842,59 +842,59 @@ case 2: /* @1: %empty */ break; case 125: /* iexpr: expr */ -#line 1002 "perly.y" +#line 1003 "perly.y" { (yyval.opval) = invert(scalar((ps[0].val.opval))); } break; case 126: /* mexpr: expr */ -#line 1007 "perly.y" +#line 1008 "perly.y" { (yyval.opval) = (ps[0].val.opval); intro_my(); } break; case 127: /* mnexpr: nexpr */ -#line 1011 "perly.y" +#line 1012 "perly.y" { (yyval.opval) = (ps[0].val.opval); intro_my(); } break; case 128: /* formname: BAREWORD */ -#line 1014 "perly.y" +#line 1015 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; case 130: /* startsub: %empty */ -#line 1019 "perly.y" +#line 1020 "perly.y" { (yyval.ival) = start_subparse(FALSE, 0); SAVEFREESV(PL_compcv); } break; case 131: /* startanonsub: %empty */ -#line 1025 "perly.y" +#line 1026 "perly.y" { (yyval.ival) = start_subparse(FALSE, CVf_ANON); SAVEFREESV(PL_compcv); } break; case 132: /* startanonmethod: %empty */ -#line 1030 "perly.y" +#line 1031 "perly.y" { (yyval.ival) = start_subparse(FALSE, CVf_ANON|CVf_IsMETHOD); SAVEFREESV(PL_compcv); } break; case 133: /* startformsub: %empty */ -#line 1035 "perly.y" +#line 1036 "perly.y" { (yyval.ival) = start_subparse(TRUE, 0); SAVEFREESV(PL_compcv); } break; case 139: /* subattrlist: COLONATTR THING */ -#line 1054 "perly.y" +#line 1055 "perly.y" { OP *attrlist = (ps[0].val.opval); if(attrlist && !PL_parser->sig_seen) @@ -905,49 +905,49 @@ case 2: /* @1: %empty */ break; case 140: /* subattrlist: COLONATTR */ -#line 1061 "perly.y" +#line 1062 "perly.y" { (yyval.opval) = NULL; } break; case 141: /* myattrlist: COLONATTR THING */ -#line 1066 "perly.y" +#line 1067 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; case 142: /* myattrlist: COLONATTR */ -#line 1068 "perly.y" +#line 1069 "perly.y" { (yyval.opval) = NULL; } break; case 143: /* sigvar: %empty */ -#line 1079 "perly.y" +#line 1080 "perly.y" { parser->in_my = 0; (yyval.ival) = 0; } break; case 144: /* sigvar: PRIVATEREF */ -#line 1081 "perly.y" +#line 1082 "perly.y" { parser->in_my = 0; (yyval.ival) = (ps[0].val.opval)->op_targ; op_free((ps[0].val.opval)); } break; case 145: /* sigslurpsigil: PERLY_SNAIL */ -#line 1086 "perly.y" +#line 1087 "perly.y" { (yyval.ival) = '@'; } break; case 146: /* sigslurpsigil: PERLY_PERCENT_SIGN */ -#line 1088 "perly.y" +#line 1089 "perly.y" { (yyval.ival) = '%'; } break; case 147: /* sigslurpelem: sigslurpsigil sigvar */ -#line 1092 "perly.y" +#line 1093 "perly.y" { subsignature_append_slurpy((ps[-1].val.ival), (ps[0].val.ival)); (yyval.opval) = NULL; @@ -956,7 +956,7 @@ case 2: /* @1: %empty */ break; case 148: /* sigslurpelem: sigslurpsigil sigvar ASSIGNOP */ -#line 1097 "perly.y" +#line 1098 "perly.y" { yyerror("A slurpy parameter may not have a default value"); } @@ -964,57 +964,79 @@ case 2: /* @1: %empty */ break; case 149: /* sigslurpelem: sigslurpsigil sigvar ASSIGNOP term */ -#line 1101 "perly.y" +#line 1102 "perly.y" { yyerror("A slurpy parameter may not have a default value"); } break; - case 150: /* sigscalarelem: PERLY_DOLLAR sigvar */ -#line 1109 "perly.y" + case 150: /* optcolon: %empty */ +#line 1108 "perly.y" + { (yyval.ival) = 0; } + + break; + + case 151: /* optcolon: PERLY_COLON */ +#line 1110 "perly.y" + { (yyval.ival) = ':'; } + + break; + + case 152: /* sigscalarelem: optcolon PERLY_DOLLAR sigvar */ +#line 1116 "perly.y" { - subsignature_append_positional((ps[0].val.ival), 0, NULL); + if((ps[-2].val.ival)) { + PADNAME *pn = PadnamelistARRAY(PL_comppad_name)[(ps[0].val.ival)]; + subsignature_append_named(PadnamePV(pn)+1, (ps[0].val.ival), 0, NULL); + } + else + subsignature_append_positional((ps[0].val.ival), 0, NULL); (yyval.opval) = NULL; } break; - case 151: /* sigscalarelem: PERLY_DOLLAR sigvar ASSIGNOP optsigscalardefault */ -#line 1114 "perly.y" + case 153: /* sigscalarelem: optcolon PERLY_DOLLAR sigvar ASSIGNOP optsigscalardefault */ +#line 1126 "perly.y" { - subsignature_append_positional((ps[-2].val.ival), (ps[-1].val.ival), (ps[0].val.opval)); + if((ps[-4].val.ival)) { + PADNAME *pn = PadnamelistARRAY(PL_comppad_name)[(ps[-2].val.ival)]; + subsignature_append_named(PadnamePV(pn)+1, (ps[-2].val.ival), (ps[-1].val.ival), (ps[0].val.opval)); + } + else + subsignature_append_positional((ps[-2].val.ival), (ps[-1].val.ival), (ps[0].val.opval)); (yyval.opval) = NULL; } break; - case 152: /* optsigscalardefault: %empty */ -#line 1122 "perly.y" + case 154: /* optsigscalardefault: %empty */ +#line 1139 "perly.y" { (yyval.opval) = newOP(OP_NULL, 0); } break; - case 154: /* sigelem: sigscalarelem */ -#line 1129 "perly.y" + case 156: /* sigelem: sigscalarelem */ +#line 1146 "perly.y" { parser->in_my = KEY_sigvar; (yyval.opval) = (ps[0].val.opval); } break; - case 155: /* sigelem: sigslurpelem */ -#line 1131 "perly.y" + case 157: /* sigelem: sigslurpelem */ +#line 1148 "perly.y" { parser->in_my = KEY_sigvar; (yyval.opval) = (ps[0].val.opval); } break; - case 163: /* subsignature: PERLY_PAREN_OPEN subsigguts PERLY_PAREN_CLOSE */ -#line 1157 "perly.y" + case 165: /* subsignature: PERLY_PAREN_OPEN subsigguts PERLY_PAREN_CLOSE */ +#line 1174 "perly.y" { (yyval.opval) = (ps[-1].val.opval); } break; - case 164: /* $@20: %empty */ -#line 1160 "perly.y" + case 166: /* $@20: %empty */ +#line 1177 "perly.y" { ENTER; subsignature_start(); @@ -1023,8 +1045,8 @@ case 2: /* @1: %empty */ break; - case 165: /* subsigguts: $@20 optsiglist */ -#line 1166 "perly.y" + case 167: /* subsigguts: $@20 optsiglist */ +#line 1183 "perly.y" { if (!FEATURE_SIGNATURES_IS_ENABLED && !CvIsMETHOD(PL_compcv)) croak("Experimental " @@ -1051,14 +1073,14 @@ case 2: /* @1: %empty */ break; - case 167: /* optsubbody: PERLY_SEMICOLON */ -#line 1194 "perly.y" + case 169: /* optsubbody: PERLY_SEMICOLON */ +#line 1211 "perly.y" { (yyval.opval) = NULL; } break; - case 168: /* subbody: remember PERLY_BRACE_OPEN stmtseq PERLY_BRACE_CLOSE */ -#line 1200 "perly.y" + case 170: /* subbody: remember PERLY_BRACE_OPEN stmtseq PERLY_BRACE_CLOSE */ +#line 1217 "perly.y" { if (parser->copline > (line_t)(ps[-2].val.ival)) parser->copline = (line_t)(ps[-2].val.ival); @@ -1067,20 +1089,20 @@ case 2: /* @1: %empty */ break; - case 170: /* optsigsubbody: PERLY_SEMICOLON */ -#line 1212 "perly.y" + case 172: /* optsigsubbody: PERLY_SEMICOLON */ +#line 1229 "perly.y" { (yyval.opval) = NULL; } break; - case 171: /* $@21: %empty */ -#line 1217 "perly.y" + case 173: /* $@21: %empty */ +#line 1234 "perly.y" { PL_parser->sig_seen = FALSE; } break; - case 172: /* sigsubbody: remember optsubsignature PERLY_BRACE_OPEN $@21 stmtseq PERLY_BRACE_CLOSE */ -#line 1219 "perly.y" + case 174: /* sigsubbody: remember optsubsignature PERLY_BRACE_OPEN $@21 stmtseq PERLY_BRACE_CLOSE */ +#line 1236 "perly.y" { if (parser->copline > (line_t)(ps[-3].val.ival)) parser->copline = (line_t)(ps[-3].val.ival); @@ -1090,38 +1112,38 @@ case 2: /* @1: %empty */ break; - case 173: /* expr: expr ANDOP expr */ -#line 1230 "perly.y" + case 175: /* expr: expr ANDOP expr */ +#line 1247 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 174: /* expr: expr PLUGIN_LOGICAL_AND_LOW_OP expr */ -#line 1232 "perly.y" + case 176: /* expr: expr PLUGIN_LOGICAL_AND_LOW_OP expr */ +#line 1249 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 175: /* expr: expr OROP expr */ -#line 1234 "perly.y" + case 177: /* expr: expr OROP expr */ +#line 1251 "perly.y" { (yyval.opval) = newLOGOP((ps[-1].val.ival), 0, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 176: /* expr: expr PLUGIN_LOGICAL_OR_LOW_OP expr */ -#line 1236 "perly.y" + case 178: /* expr: expr PLUGIN_LOGICAL_OR_LOW_OP expr */ +#line 1253 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 178: /* listexpr: listexpr PERLY_COMMA */ -#line 1242 "perly.y" + case 180: /* listexpr: listexpr PERLY_COMMA */ +#line 1259 "perly.y" { (yyval.opval) = (ps[-1].val.opval); } break; - case 179: /* listexpr: listexpr PERLY_COMMA term */ -#line 1244 "perly.y" + case 181: /* listexpr: listexpr PERLY_COMMA term */ +#line 1261 "perly.y" { OP* term = (ps[0].val.opval); (yyval.opval) = op_append_elem(OP_LIST, (ps[-2].val.opval), term); @@ -1129,32 +1151,32 @@ case 2: /* @1: %empty */ break; - case 181: /* listop: LSTOP indirob listexpr */ -#line 1253 "perly.y" + case 183: /* listop: LSTOP indirob listexpr */ +#line 1270 "perly.y" { (yyval.opval) = op_convert_list((ps[-2].val.ival), OPf_STACKED, op_prepend_elem(OP_LIST, newGVREF((ps[-2].val.ival),(ps[-1].val.opval)), (ps[0].val.opval)) ); } break; - case 182: /* listop: BLKLSTOP block listexpr */ -#line 1257 "perly.y" + case 184: /* listop: BLKLSTOP block listexpr */ +#line 1274 "perly.y" { (yyval.opval) = op_convert_list((ps[-2].val.ival), OPf_STACKED, op_prepend_elem(OP_LIST, newUNOP(OP_NULL, 0, op_scope((ps[-1].val.opval))), (ps[0].val.opval)) ); } break; - case 183: /* listop: FUNC PERLY_PAREN_OPEN indirob expr PERLY_PAREN_CLOSE */ -#line 1261 "perly.y" + case 185: /* listop: FUNC PERLY_PAREN_OPEN indirob expr PERLY_PAREN_CLOSE */ +#line 1278 "perly.y" { (yyval.opval) = op_convert_list((ps[-4].val.ival), OPf_STACKED, op_prepend_elem(OP_LIST, newGVREF((ps[-4].val.ival),(ps[-2].val.opval)), (ps[-1].val.opval)) ); } break; - case 184: /* listop: term ARROW methodname PERLY_PAREN_OPEN optexpr PERLY_PAREN_CLOSE */ -#line 1265 "perly.y" + case 186: /* listop: term ARROW methodname PERLY_PAREN_OPEN optexpr PERLY_PAREN_CLOSE */ +#line 1282 "perly.y" { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, op_prepend_elem(OP_LIST, scalar((ps[-5].val.opval)), (ps[-1].val.opval)), @@ -1163,8 +1185,8 @@ case 2: /* @1: %empty */ break; - case 185: /* listop: term ARROW methodname */ -#line 1271 "perly.y" + case 187: /* listop: term ARROW methodname */ +#line 1288 "perly.y" { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, scalar((ps[-2].val.opval)), newMETHOP(OP_METHOD, 0, (ps[0].val.opval)))); @@ -1172,8 +1194,8 @@ case 2: /* @1: %empty */ break; - case 186: /* listop: term ARROW PERLY_AMPERSAND subname PERLY_PAREN_OPEN optexpr PERLY_PAREN_CLOSE */ -#line 1276 "perly.y" + case 188: /* listop: term ARROW PERLY_AMPERSAND subname PERLY_PAREN_OPEN optexpr PERLY_PAREN_CLOSE */ +#line 1293 "perly.y" { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, op_prepend_elem(OP_LIST, scalar((ps[-6].val.opval)), (ps[-1].val.opval)), @@ -1182,8 +1204,8 @@ case 2: /* @1: %empty */ break; - case 187: /* listop: term ARROW PERLY_AMPERSAND subname */ -#line 1282 "perly.y" + case 189: /* listop: term ARROW PERLY_AMPERSAND subname */ +#line 1299 "perly.y" { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, scalar((ps[-3].val.opval)), @@ -1192,8 +1214,8 @@ case 2: /* @1: %empty */ break; - case 188: /* listop: METHCALL0 indirob optlistexpr */ -#line 1288 "perly.y" + case 190: /* listop: METHCALL0 indirob optlistexpr */ +#line 1305 "perly.y" { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, op_prepend_elem(OP_LIST, (ps[-1].val.opval), (ps[0].val.opval)), @@ -1202,8 +1224,8 @@ case 2: /* @1: %empty */ break; - case 189: /* listop: METHCALL indirob PERLY_PAREN_OPEN optexpr PERLY_PAREN_CLOSE */ -#line 1294 "perly.y" + case 191: /* listop: METHCALL indirob PERLY_PAREN_OPEN optexpr PERLY_PAREN_CLOSE */ +#line 1311 "perly.y" { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, op_prepend_elem(OP_LIST, (ps[-3].val.opval), (ps[-1].val.opval)), @@ -1212,26 +1234,26 @@ case 2: /* @1: %empty */ break; - case 190: /* listop: LSTOP optlistexpr */ -#line 1300 "perly.y" + case 192: /* listop: LSTOP optlistexpr */ +#line 1317 "perly.y" { (yyval.opval) = op_convert_list((ps[-1].val.ival), 0, (ps[0].val.opval)); } break; - case 191: /* listop: FUNC PERLY_PAREN_OPEN optexpr PERLY_PAREN_CLOSE */ -#line 1302 "perly.y" + case 193: /* listop: FUNC PERLY_PAREN_OPEN optexpr PERLY_PAREN_CLOSE */ +#line 1319 "perly.y" { (yyval.opval) = op_convert_list((ps[-3].val.ival), 0, (ps[-1].val.opval)); } break; - case 192: /* listop: FUNC SUBLEXSTART optexpr SUBLEXEND */ -#line 1304 "perly.y" + case 194: /* listop: FUNC SUBLEXSTART optexpr SUBLEXEND */ +#line 1321 "perly.y" { (yyval.opval) = op_convert_list((ps[-3].val.ival), 0, (ps[-1].val.opval)); } break; - case 193: /* @22: %empty */ -#line 1306 "perly.y" + case 195: /* @22: %empty */ +#line 1323 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); (yyval.opval) = newANONATTRSUB((ps[-1].val.ival), 0, NULL, (ps[0].val.opval)); /* prevent double op_free() if the following fails to parse */ @@ -1240,8 +1262,8 @@ case 2: /* @1: %empty */ break; - case 194: /* listop: LSTOPSUB startanonsub block @22 optlistexpr */ -#line 1312 "perly.y" + case 196: /* listop: LSTOPSUB startanonsub block @22 optlistexpr */ +#line 1329 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, op_prepend_elem(OP_LIST, (ps[-1].val.opval), (ps[0].val.opval)), (ps[-4].val.opval))); @@ -1249,21 +1271,21 @@ case 2: /* @1: %empty */ break; - case 197: /* subscripted: gelem PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ -#line 1327 "perly.y" + case 199: /* subscripted: gelem PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ +#line 1344 "perly.y" { (yyval.opval) = newBINOP(OP_GELEM, 0, (ps[-4].val.opval), scalar((ps[-2].val.opval))); } break; - case 198: /* subscripted: scalar PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ -#line 1329 "perly.y" + case 200: /* subscripted: scalar PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ +#line 1346 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((ps[-3].val.opval)), scalar((ps[-1].val.opval))); } break; - case 199: /* subscripted: term ARROW PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ -#line 1332 "perly.y" + case 201: /* subscripted: term ARROW PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ +#line 1349 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, ref(newAVREF((ps[-4].val.opval)),OP_RV2AV), scalar((ps[-1].val.opval))); @@ -1271,8 +1293,8 @@ case 2: /* @1: %empty */ break; - case 200: /* subscripted: subscripted PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ -#line 1337 "perly.y" + case 202: /* subscripted: subscripted PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ +#line 1354 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, ref(newAVREF((ps[-3].val.opval)),OP_RV2AV), scalar((ps[-1].val.opval))); @@ -1280,31 +1302,31 @@ case 2: /* @1: %empty */ break; - case 201: /* subscripted: scalar PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ -#line 1342 "perly.y" + case 203: /* subscripted: scalar PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ +#line 1359 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((ps[-4].val.opval)), jmaybe((ps[-2].val.opval))); } break; - case 202: /* subscripted: term ARROW PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ -#line 1345 "perly.y" + case 204: /* subscripted: term ARROW PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ +#line 1362 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, ref(newHVREF((ps[-5].val.opval)),OP_RV2HV), jmaybe((ps[-2].val.opval))); } break; - case 203: /* subscripted: subscripted PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ -#line 1349 "perly.y" + case 205: /* subscripted: subscripted PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ +#line 1366 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, ref(newHVREF((ps[-4].val.opval)),OP_RV2HV), jmaybe((ps[-2].val.opval))); } break; - case 204: /* subscripted: term ARROW PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ -#line 1353 "perly.y" + case 206: /* subscripted: term ARROW PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ +#line 1370 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, newCVREF(0, scalar((ps[-3].val.opval)))); if (parser->expect == XBLOCK) @@ -1313,8 +1335,8 @@ case 2: /* @1: %empty */ break; - case 205: /* subscripted: term ARROW PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ -#line 1359 "perly.y" + case 207: /* subscripted: term ARROW PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ +#line 1376 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, (ps[-1].val.opval), newCVREF(0, scalar((ps[-4].val.opval))))); @@ -1324,8 +1346,8 @@ case 2: /* @1: %empty */ break; - case 206: /* subscripted: subscripted PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ -#line 1367 "perly.y" + case 208: /* subscripted: subscripted PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ +#line 1384 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, (ps[-1].val.opval), newCVREF(0, scalar((ps[-3].val.opval))))); @@ -1335,8 +1357,8 @@ case 2: /* @1: %empty */ break; - case 207: /* subscripted: subscripted PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ -#line 1374 "perly.y" + case 209: /* subscripted: subscripted PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ +#line 1391 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, newCVREF(0, scalar((ps[-2].val.opval)))); if (parser->expect == XBLOCK) @@ -1345,56 +1367,56 @@ case 2: /* @1: %empty */ break; - case 208: /* subscripted: PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ -#line 1380 "perly.y" + case 210: /* subscripted: PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ +#line 1397 "perly.y" { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), (ps[-4].val.opval)); } break; - case 209: /* subscripted: QWLIST PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ -#line 1382 "perly.y" + case 211: /* subscripted: QWLIST PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ +#line 1399 "perly.y" { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), (ps[-3].val.opval)); } break; - case 210: /* subscripted: PERLY_PAREN_OPEN PERLY_PAREN_CLOSE PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ -#line 1384 "perly.y" + case 212: /* subscripted: PERLY_PAREN_OPEN PERLY_PAREN_CLOSE PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ +#line 1401 "perly.y" { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), NULL); } break; - case 211: /* termbinop: term PLUGIN_HIGH_OP term */ -#line 1389 "perly.y" + case 213: /* termbinop: term PLUGIN_HIGH_OP term */ +#line 1406 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 212: /* termbinop: term ASSIGNOP term */ -#line 1391 "perly.y" + case 214: /* termbinop: term ASSIGNOP term */ +#line 1408 "perly.y" { (yyval.opval) = newASSIGNOP(OPf_STACKED, (ps[-2].val.opval), (ps[-1].val.ival), (ps[0].val.opval)); } break; - case 213: /* termbinop: term PLUGIN_ASSIGN_OP term */ -#line 1393 "perly.y" + case 215: /* termbinop: term PLUGIN_ASSIGN_OP term */ +#line 1410 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 214: /* termbinop: term POWOP term */ -#line 1395 "perly.y" + case 216: /* termbinop: term POWOP term */ +#line 1412 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 215: /* termbinop: term PLUGIN_POW_OP term */ -#line 1397 "perly.y" + case 217: /* termbinop: term PLUGIN_POW_OP term */ +#line 1414 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 216: /* termbinop: term MULOP term */ -#line 1399 "perly.y" + case 218: /* termbinop: term MULOP term */ +#line 1416 "perly.y" { if ((ps[-1].val.ival) != OP_REPEAT) scalar((ps[-2].val.opval)); (yyval.opval) = newBINOP((ps[-1].val.ival), 0, (ps[-2].val.opval), scalar((ps[0].val.opval))); @@ -1402,220 +1424,220 @@ case 2: /* @1: %empty */ break; - case 217: /* termbinop: term PLUGIN_MUL_OP term */ -#line 1404 "perly.y" + case 219: /* termbinop: term PLUGIN_MUL_OP term */ +#line 1421 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 218: /* termbinop: term ADDOP term */ -#line 1406 "perly.y" + case 220: /* termbinop: term ADDOP term */ +#line 1423 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 219: /* termbinop: term PLUGIN_ADD_OP term */ -#line 1408 "perly.y" + case 221: /* termbinop: term PLUGIN_ADD_OP term */ +#line 1425 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 220: /* termbinop: term SHIFTOP term */ -#line 1410 "perly.y" + case 222: /* termbinop: term SHIFTOP term */ +#line 1427 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 221: /* termbinop: termrelop */ -#line 1412 "perly.y" + case 223: /* termbinop: termrelop */ +#line 1429 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 222: /* termbinop: termeqop */ -#line 1414 "perly.y" + case 224: /* termbinop: termeqop */ +#line 1431 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 223: /* termbinop: term BITANDOP term */ -#line 1416 "perly.y" + case 225: /* termbinop: term BITANDOP term */ +#line 1433 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 224: /* termbinop: term BITOROP term */ -#line 1418 "perly.y" + case 226: /* termbinop: term BITOROP term */ +#line 1435 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 225: /* termbinop: term DOTDOT term */ -#line 1420 "perly.y" + case 227: /* termbinop: term DOTDOT term */ +#line 1437 "perly.y" { (yyval.opval) = newRANGE((ps[-1].val.ival), scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 226: /* termbinop: term ANDAND term */ -#line 1422 "perly.y" + case 228: /* termbinop: term ANDAND term */ +#line 1439 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 227: /* termbinop: term PLUGIN_LOGICAL_AND_OP term */ -#line 1424 "perly.y" + case 229: /* termbinop: term PLUGIN_LOGICAL_AND_OP term */ +#line 1441 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 228: /* termbinop: term OROR term */ -#line 1426 "perly.y" + case 230: /* termbinop: term OROR term */ +#line 1443 "perly.y" { (yyval.opval) = newLOGOP((ps[-1].val.ival), 0, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 229: /* termbinop: term PLUGIN_LOGICAL_OR_OP term */ -#line 1428 "perly.y" + case 231: /* termbinop: term PLUGIN_LOGICAL_OR_OP term */ +#line 1445 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 230: /* termbinop: term DORDOR term */ -#line 1430 "perly.y" + case 232: /* termbinop: term DORDOR term */ +#line 1447 "perly.y" { (yyval.opval) = newLOGOP(OP_DOR, 0, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 231: /* termbinop: term MATCHOP term */ -#line 1432 "perly.y" + case 233: /* termbinop: term MATCHOP term */ +#line 1449 "perly.y" { (yyval.opval) = bind_match((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 232: /* termbinop: term PLUGIN_LOW_OP term */ -#line 1434 "perly.y" + case 234: /* termbinop: term PLUGIN_LOW_OP term */ +#line 1451 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 233: /* termrelop: relopchain */ -#line 1438 "perly.y" + case 235: /* termrelop: relopchain */ +#line 1455 "perly.y" { (yyval.opval) = cmpchain_finish((ps[0].val.opval)); } break; - case 234: /* termrelop: term NCRELOP term */ -#line 1440 "perly.y" + case 236: /* termrelop: term NCRELOP term */ +#line 1457 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 235: /* termrelop: termrelop NCRELOP */ -#line 1442 "perly.y" + case 237: /* termrelop: termrelop NCRELOP */ +#line 1459 "perly.y" { yyerror("syntax error"); YYERROR; } break; - case 236: /* termrelop: termrelop CHRELOP */ -#line 1444 "perly.y" + case 238: /* termrelop: termrelop CHRELOP */ +#line 1461 "perly.y" { yyerror("syntax error"); YYERROR; } break; - case 237: /* termrelop: term PLUGIN_REL_OP term */ -#line 1446 "perly.y" + case 239: /* termrelop: term PLUGIN_REL_OP term */ +#line 1463 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 238: /* relopchain: term CHRELOP term */ -#line 1450 "perly.y" + case 240: /* relopchain: term CHRELOP term */ +#line 1467 "perly.y" { (yyval.opval) = cmpchain_start((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 239: /* relopchain: relopchain CHRELOP term */ -#line 1452 "perly.y" + case 241: /* relopchain: relopchain CHRELOP term */ +#line 1469 "perly.y" { (yyval.opval) = cmpchain_extend((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 240: /* termeqop: eqopchain */ -#line 1456 "perly.y" + case 242: /* termeqop: eqopchain */ +#line 1473 "perly.y" { (yyval.opval) = cmpchain_finish((ps[0].val.opval)); } break; - case 241: /* termeqop: term NCEQOP term */ -#line 1458 "perly.y" + case 243: /* termeqop: term NCEQOP term */ +#line 1475 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 242: /* termeqop: termeqop NCEQOP */ -#line 1460 "perly.y" + case 244: /* termeqop: termeqop NCEQOP */ +#line 1477 "perly.y" { yyerror("syntax error"); YYERROR; } break; - case 243: /* termeqop: termeqop CHEQOP */ -#line 1462 "perly.y" + case 245: /* termeqop: termeqop CHEQOP */ +#line 1479 "perly.y" { yyerror("syntax error"); YYERROR; } break; - case 244: /* eqopchain: term CHEQOP term */ -#line 1466 "perly.y" + case 246: /* eqopchain: term CHEQOP term */ +#line 1483 "perly.y" { (yyval.opval) = cmpchain_start((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 245: /* eqopchain: eqopchain CHEQOP term */ -#line 1468 "perly.y" + case 247: /* eqopchain: eqopchain CHEQOP term */ +#line 1485 "perly.y" { (yyval.opval) = cmpchain_extend((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 246: /* termunop: PERLY_MINUS term */ -#line 1473 "perly.y" + case 248: /* termunop: PERLY_MINUS term */ +#line 1490 "perly.y" { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((ps[0].val.opval))); } break; - case 247: /* termunop: PERLY_PLUS term */ -#line 1475 "perly.y" + case 249: /* termunop: PERLY_PLUS term */ +#line 1492 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 248: /* termunop: PERLY_EXCLAMATION_MARK term */ -#line 1478 "perly.y" + case 250: /* termunop: PERLY_EXCLAMATION_MARK term */ +#line 1495 "perly.y" { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[0].val.opval))); } break; - case 249: /* termunop: PERLY_TILDE term */ -#line 1480 "perly.y" + case 251: /* termunop: PERLY_TILDE term */ +#line 1497 "perly.y" { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, scalar((ps[0].val.opval))); } break; - case 250: /* termunop: term POSTINC */ -#line 1482 "perly.y" + case 252: /* termunop: term POSTINC */ +#line 1499 "perly.y" { (yyval.opval) = newUNOP(OP_POSTINC, 0, op_lvalue(scalar((ps[-1].val.opval)), OP_POSTINC)); } break; - case 251: /* termunop: term POSTDEC */ -#line 1485 "perly.y" + case 253: /* termunop: term POSTDEC */ +#line 1502 "perly.y" { (yyval.opval) = newUNOP(OP_POSTDEC, 0, op_lvalue(scalar((ps[-1].val.opval)), OP_POSTDEC));} break; - case 252: /* termunop: term POSTJOIN */ -#line 1488 "perly.y" + case 254: /* termunop: term POSTJOIN */ +#line 1505 "perly.y" { (yyval.opval) = op_convert_list(OP_JOIN, 0, op_append_elem( OP_LIST, @@ -1629,60 +1651,60 @@ case 2: /* @1: %empty */ break; - case 253: /* termunop: PREINC term */ -#line 1499 "perly.y" + case 255: /* termunop: PREINC term */ +#line 1516 "perly.y" { (yyval.opval) = newUNOP(OP_PREINC, 0, op_lvalue(scalar((ps[0].val.opval)), OP_PREINC)); } break; - case 254: /* termunop: PREDEC term */ -#line 1502 "perly.y" + case 256: /* termunop: PREDEC term */ +#line 1519 "perly.y" { (yyval.opval) = newUNOP(OP_PREDEC, 0, op_lvalue(scalar((ps[0].val.opval)), OP_PREDEC)); } break; - case 255: /* anonymous: PERLY_BRACKET_OPEN optexpr PERLY_BRACKET_CLOSE */ -#line 1510 "perly.y" + case 257: /* anonymous: PERLY_BRACKET_OPEN optexpr PERLY_BRACKET_CLOSE */ +#line 1527 "perly.y" { (yyval.opval) = newANONLIST((ps[-1].val.opval)); } break; - case 256: /* anonymous: HASHBRACK optexpr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ -#line 1512 "perly.y" + case 258: /* anonymous: HASHBRACK optexpr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ +#line 1529 "perly.y" { (yyval.opval) = newANONHASH((ps[-2].val.opval)); } break; - case 257: /* anonymous: KW_SUB_anon startanonsub proto subattrlist subbody */ -#line 1514 "perly.y" + case 259: /* anonymous: KW_SUB_anon startanonsub proto subattrlist subbody */ +#line 1531 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); (yyval.opval) = newANONATTRSUB((ps[-3].val.ival), (ps[-2].val.opval), (ps[-1].val.opval), (ps[0].val.opval)); } break; - case 258: /* anonymous: KW_SUB_anon startanonsub proto subattrlist */ -#line 1517 "perly.y" + case 260: /* anonymous: KW_SUB_anon startanonsub proto subattrlist */ +#line 1534 "perly.y" { yyerror("Illegal declaration of anonymous subroutine"); YYERROR; } break; - case 259: /* anonymous: KW_SUB_anon_sig startanonsub subattrlist sigsubbody */ -#line 1519 "perly.y" + case 261: /* anonymous: KW_SUB_anon_sig startanonsub subattrlist sigsubbody */ +#line 1536 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); (yyval.opval) = newANONATTRSUB((ps[-2].val.ival), NULL, (ps[-1].val.opval), (ps[0].val.opval)); } break; - case 260: /* anonymous: KW_SUB_anon_sig startanonsub subattrlist */ -#line 1522 "perly.y" + case 262: /* anonymous: KW_SUB_anon_sig startanonsub subattrlist */ +#line 1539 "perly.y" { yyerror("Illegal declaration of anonymous subroutine"); YYERROR; } break; - case 261: /* anonymous: KW_METHOD_anon startanonmethod subattrlist sigsubbody */ -#line 1524 "perly.y" + case 263: /* anonymous: KW_METHOD_anon startanonmethod subattrlist sigsubbody */ +#line 1541 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); (yyval.opval) = newANONATTRSUB((ps[-2].val.ival), NULL, (ps[-1].val.opval), (ps[0].val.opval)); @@ -1690,104 +1712,104 @@ case 2: /* @1: %empty */ break; - case 262: /* anonymous: KW_METHOD_anon startanonmethod subattrlist */ -#line 1529 "perly.y" + case 264: /* anonymous: KW_METHOD_anon startanonmethod subattrlist */ +#line 1546 "perly.y" { yyerror("Illegal declaration of anonymous subroutine"); YYERROR; } break; - case 263: /* termdo: KW_DO term */ -#line 1534 "perly.y" + case 265: /* termdo: KW_DO term */ +#line 1551 "perly.y" { (yyval.opval) = dofile((ps[0].val.opval), (ps[-1].val.ival));} break; - case 264: /* termdo: KW_DO block */ -#line 1536 "perly.y" + case 266: /* termdo: KW_DO block */ +#line 1553 "perly.y" { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, op_scope((ps[0].val.opval)));} break; - case 269: /* term: term PERLY_QUESTION_MARK term PERLY_COLON term */ -#line 1544 "perly.y" + case 271: /* term: term PERLY_QUESTION_MARK term PERLY_COLON term */ +#line 1561 "perly.y" { (yyval.opval) = newCONDOP(0, (ps[-4].val.opval), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 270: /* term: REFGEN term */ -#line 1546 "perly.y" + case 272: /* term: REFGEN term */ +#line 1563 "perly.y" { (yyval.opval) = newUNOP(OP_REFGEN, 0, (ps[0].val.opval)); } break; - case 271: /* term: myattrterm */ -#line 1548 "perly.y" + case 273: /* term: myattrterm */ +#line 1565 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 272: /* term: KW_LOCAL term */ -#line 1550 "perly.y" + case 274: /* term: KW_LOCAL term */ +#line 1567 "perly.y" { (yyval.opval) = localize((ps[0].val.opval),0); } break; - case 273: /* term: PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ -#line 1552 "perly.y" + case 275: /* term: PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ +#line 1569 "perly.y" { (yyval.opval) = sawparens((ps[-1].val.opval)); } break; - case 274: /* term: QWLIST */ -#line 1554 "perly.y" + case 276: /* term: QWLIST */ +#line 1571 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 275: /* term: PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ -#line 1556 "perly.y" + case 277: /* term: PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ +#line 1573 "perly.y" { (yyval.opval) = sawparens(newNULLLIST()); } break; - case 276: /* term: scalar */ -#line 1558 "perly.y" + case 278: /* term: scalar */ +#line 1575 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 277: /* term: star */ -#line 1560 "perly.y" + case 279: /* term: star */ +#line 1577 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 278: /* term: hsh */ -#line 1562 "perly.y" + case 280: /* term: hsh */ +#line 1579 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 279: /* term: ary */ -#line 1564 "perly.y" + case 281: /* term: ary */ +#line 1581 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 280: /* term: arylen */ -#line 1566 "perly.y" + case 282: /* term: arylen */ +#line 1583 "perly.y" { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((ps[0].val.opval), OP_AV2ARYLEN));} break; - case 281: /* term: subscripted */ -#line 1568 "perly.y" + case 283: /* term: subscripted */ +#line 1585 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 282: /* term: sliceme PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ -#line 1570 "perly.y" + case 284: /* term: sliceme PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ +#line 1587 "perly.y" { (yyval.opval) = op_prepend_elem(OP_ASLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_ASLICE, 0, @@ -1800,8 +1822,8 @@ case 2: /* @1: %empty */ break; - case 283: /* term: kvslice PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ -#line 1580 "perly.y" + case 285: /* term: kvslice PERLY_BRACKET_OPEN expr PERLY_BRACKET_CLOSE */ +#line 1597 "perly.y" { (yyval.opval) = op_prepend_elem(OP_KVASLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_KVASLICE, 0, @@ -1814,8 +1836,8 @@ case 2: /* @1: %empty */ break; - case 284: /* term: sliceme PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ -#line 1590 "perly.y" + case 286: /* term: sliceme PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ +#line 1607 "perly.y" { (yyval.opval) = op_prepend_elem(OP_HSLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_HSLICE, 0, @@ -1828,8 +1850,8 @@ case 2: /* @1: %empty */ break; - case 285: /* term: kvslice PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ -#line 1600 "perly.y" + case 287: /* term: kvslice PERLY_BRACE_OPEN expr PERLY_SEMICOLON PERLY_BRACE_CLOSE */ +#line 1617 "perly.y" { (yyval.opval) = op_prepend_elem(OP_KVHSLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_KVHSLICE, 0, @@ -1842,27 +1864,27 @@ case 2: /* @1: %empty */ break; - case 286: /* term: THING */ -#line 1610 "perly.y" + case 288: /* term: THING */ +#line 1627 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 287: /* term: amper */ -#line 1612 "perly.y" + case 289: /* term: amper */ +#line 1629 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((ps[0].val.opval))); } break; - case 288: /* term: amper PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ -#line 1614 "perly.y" + case 290: /* term: amper PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ +#line 1631 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[-2].val.opval))); } break; - case 289: /* term: amper PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ -#line 1617 "perly.y" + case 291: /* term: amper PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ +#line 1634 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, (ps[-1].val.opval), scalar((ps[-3].val.opval)))); @@ -1870,153 +1892,153 @@ case 2: /* @1: %empty */ break; - case 290: /* term: NOAMP subname optlistexpr */ -#line 1622 "perly.y" + case 292: /* term: NOAMP subname optlistexpr */ +#line 1639 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, (ps[0].val.opval), scalar((ps[-1].val.opval)))); } break; - case 291: /* term: term ARROW PERLY_DOLLAR PERLY_STAR */ -#line 1626 "perly.y" + case 293: /* term: term ARROW PERLY_DOLLAR PERLY_STAR */ +#line 1643 "perly.y" { (yyval.opval) = newSVREF((ps[-3].val.opval)); } break; - case 292: /* term: term ARROW PERLY_SNAIL PERLY_STAR */ -#line 1628 "perly.y" + case 294: /* term: term ARROW PERLY_SNAIL PERLY_STAR */ +#line 1645 "perly.y" { (yyval.opval) = newAVREF((ps[-3].val.opval)); } break; - case 293: /* term: term ARROW PERLY_PERCENT_SIGN PERLY_STAR */ -#line 1630 "perly.y" + case 295: /* term: term ARROW PERLY_PERCENT_SIGN PERLY_STAR */ +#line 1647 "perly.y" { (yyval.opval) = newHVREF((ps[-3].val.opval)); } break; - case 294: /* term: term ARROW PERLY_AMPERSAND PERLY_STAR */ -#line 1632 "perly.y" + case 296: /* term: term ARROW PERLY_AMPERSAND PERLY_STAR */ +#line 1649 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar(newCVREF((ps[-1].val.ival),(ps[-3].val.opval)))); } break; - case 295: /* term: term ARROW PERLY_STAR PERLY_STAR */ -#line 1635 "perly.y" + case 297: /* term: term ARROW PERLY_STAR PERLY_STAR */ +#line 1652 "perly.y" { (yyval.opval) = newGVREF(0,(ps[-3].val.opval)); } break; - case 296: /* term: LOOPEX */ -#line 1637 "perly.y" + case 298: /* term: LOOPEX */ +#line 1654 "perly.y" { (yyval.opval) = newOP((ps[0].val.ival), OPf_SPECIAL); PL_hints |= HINT_BLOCK_SCOPE; } break; - case 297: /* term: LOOPEX term */ -#line 1640 "perly.y" + case 299: /* term: LOOPEX term */ +#line 1657 "perly.y" { (yyval.opval) = newLOOPEX((ps[-1].val.ival),(ps[0].val.opval)); } break; - case 298: /* term: NOTOP listexpr */ -#line 1642 "perly.y" + case 300: /* term: NOTOP listexpr */ +#line 1659 "perly.y" { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[0].val.opval))); } break; - case 299: /* term: UNIOP */ -#line 1644 "perly.y" + case 301: /* term: UNIOP */ +#line 1661 "perly.y" { (yyval.opval) = newOP((ps[0].val.ival), 0); } break; - case 300: /* term: UNIOP block */ -#line 1646 "perly.y" + case 302: /* term: UNIOP block */ +#line 1663 "perly.y" { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, (ps[0].val.opval)); } break; - case 301: /* term: UNIOP term */ -#line 1648 "perly.y" + case 303: /* term: UNIOP term */ +#line 1665 "perly.y" { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, (ps[0].val.opval)); } break; - case 302: /* term: KW_REQUIRE */ -#line 1650 "perly.y" + case 304: /* term: KW_REQUIRE */ +#line 1667 "perly.y" { (yyval.opval) = newOP(OP_REQUIRE, (ps[0].val.ival) ? OPf_SPECIAL : 0); } break; - case 303: /* term: KW_REQUIRE term */ -#line 1652 "perly.y" + case 305: /* term: KW_REQUIRE term */ +#line 1669 "perly.y" { (yyval.opval) = newUNOP(OP_REQUIRE, (ps[-1].val.ival) ? OPf_SPECIAL : 0, (ps[0].val.opval)); } break; - case 304: /* term: UNIOPSUB */ -#line 1654 "perly.y" + case 306: /* term: UNIOPSUB */ +#line 1671 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[0].val.opval))); } break; - case 305: /* term: UNIOPSUB term */ -#line 1656 "perly.y" + case 307: /* term: UNIOPSUB term */ +#line 1673 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, (ps[0].val.opval), scalar((ps[-1].val.opval)))); } break; - case 306: /* term: FUNC0 */ -#line 1659 "perly.y" + case 308: /* term: FUNC0 */ +#line 1676 "perly.y" { (yyval.opval) = newOP((ps[0].val.ival), 0); } break; - case 307: /* term: FUNC0 PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ -#line 1661 "perly.y" + case 309: /* term: FUNC0 PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ +#line 1678 "perly.y" { (yyval.opval) = newOP((ps[-2].val.ival), 0);} break; - case 308: /* term: FUNC0OP */ -#line 1663 "perly.y" + case 310: /* term: FUNC0OP */ +#line 1680 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 309: /* term: FUNC0OP PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ -#line 1665 "perly.y" + case 311: /* term: FUNC0OP PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ +#line 1682 "perly.y" { (yyval.opval) = (ps[-2].val.opval); } break; - case 310: /* term: FUNC0SUB */ -#line 1667 "perly.y" + case 312: /* term: FUNC0SUB */ +#line 1684 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[0].val.opval))); } break; - case 311: /* term: FUNC1 PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ -#line 1669 "perly.y" + case 313: /* term: FUNC1 PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ +#line 1686 "perly.y" { (yyval.opval) = ((ps[-2].val.ival) == OP_NOT) ? newUNOP((ps[-2].val.ival), 0, newSVOP(OP_CONST, 0, newSViv(0))) : newOP((ps[-2].val.ival), OPf_SPECIAL); } break; - case 312: /* term: FUNC1 PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ -#line 1673 "perly.y" + case 314: /* term: FUNC1 PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ +#line 1690 "perly.y" { (yyval.opval) = newUNOP((ps[-3].val.ival), 0, (ps[-1].val.opval)); } break; - case 313: /* @23: %empty */ -#line 1675 "perly.y" + case 315: /* @23: %empty */ +#line 1692 "perly.y" { if ( (ps[0].val.opval)->op_type != OP_TRANS && (ps[0].val.opval)->op_type != OP_TRANSR @@ -2030,68 +2052,68 @@ case 2: /* @1: %empty */ break; - case 314: /* term: PMFUNC @23 SUBLEXSTART listexpr optrepl SUBLEXEND */ -#line 1686 "perly.y" + case 316: /* term: PMFUNC @23 SUBLEXSTART listexpr optrepl SUBLEXEND */ +#line 1703 "perly.y" { (yyval.opval) = pmruntime((ps[-5].val.opval), (ps[-2].val.opval), (ps[-1].val.opval), 1, (ps[-4].val.ival)); } break; - case 318: /* myattrterm: KW_MY myterm myattrlist */ -#line 1695 "perly.y" + case 320: /* myattrterm: KW_MY myterm myattrlist */ +#line 1712 "perly.y" { (yyval.opval) = my_attrs((ps[-1].val.opval),(ps[0].val.opval)); } break; - case 319: /* myattrterm: KW_MY myterm */ -#line 1697 "perly.y" + case 321: /* myattrterm: KW_MY myterm */ +#line 1714 "perly.y" { (yyval.opval) = localize((ps[0].val.opval),1); } break; - case 320: /* myattrterm: KW_MY REFGEN myterm myattrlist */ -#line 1699 "perly.y" + case 322: /* myattrterm: KW_MY REFGEN myterm myattrlist */ +#line 1716 "perly.y" { (yyval.opval) = newUNOP(OP_REFGEN, 0, my_attrs((ps[-1].val.opval),(ps[0].val.opval))); } break; - case 321: /* myattrterm: KW_MY REFGEN term */ -#line 1701 "perly.y" + case 323: /* myattrterm: KW_MY REFGEN term */ +#line 1718 "perly.y" { (yyval.opval) = newUNOP(OP_REFGEN, 0, localize((ps[0].val.opval),1)); } break; - case 322: /* myterm: PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ -#line 1706 "perly.y" + case 324: /* myterm: PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE */ +#line 1723 "perly.y" { (yyval.opval) = sawparens((ps[-1].val.opval)); } break; - case 323: /* myterm: PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ -#line 1708 "perly.y" + case 325: /* myterm: PERLY_PAREN_OPEN PERLY_PAREN_CLOSE */ +#line 1725 "perly.y" { (yyval.opval) = sawparens(newNULLLIST()); } break; - case 324: /* myterm: scalar */ -#line 1711 "perly.y" + case 326: /* myterm: scalar */ +#line 1728 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 325: /* myterm: hsh */ -#line 1713 "perly.y" + case 327: /* myterm: hsh */ +#line 1730 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 326: /* myterm: ary */ -#line 1715 "perly.y" + case 328: /* myterm: ary */ +#line 1732 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 327: /* fieldvar: scalar */ -#line 1720 "perly.y" + case 329: /* fieldvar: scalar */ +#line 1737 "perly.y" { (yyval.pval) = PadnamelistARRAY(PL_comppad_name)[(ps[0].val.opval)->op_targ]; op_free((ps[0].val.opval)); @@ -2099,8 +2121,8 @@ case 2: /* @1: %empty */ break; - case 328: /* fieldvar: hsh */ -#line 1725 "perly.y" + case 330: /* fieldvar: hsh */ +#line 1742 "perly.y" { (yyval.pval) = PadnamelistARRAY(PL_comppad_name)[(ps[0].val.opval)->op_targ]; op_free((ps[0].val.opval)); @@ -2108,8 +2130,8 @@ case 2: /* @1: %empty */ break; - case 329: /* fieldvar: ary */ -#line 1730 "perly.y" + case 331: /* fieldvar: ary */ +#line 1747 "perly.y" { (yyval.pval) = PadnamelistARRAY(PL_comppad_name)[(ps[0].val.opval)->op_targ]; op_free((ps[0].val.opval)); @@ -2117,20 +2139,20 @@ case 2: /* @1: %empty */ break; - case 330: /* optfieldattrlist: COLONATTR THING */ -#line 1738 "perly.y" + case 332: /* optfieldattrlist: COLONATTR THING */ +#line 1755 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 331: /* optfieldattrlist: COLONATTR */ -#line 1740 "perly.y" + case 333: /* optfieldattrlist: COLONATTR */ +#line 1757 "perly.y" { (yyval.opval) = NULL; } break; - case 333: /* fielddecl: KW_FIELD fieldvar optfieldattrlist */ -#line 1746 "perly.y" + case 335: /* fielddecl: KW_FIELD fieldvar optfieldattrlist */ +#line 1763 "perly.y" { parser->in_my = 0; if((ps[0].val.opval)) @@ -2140,8 +2162,8 @@ case 2: /* @1: %empty */ break; - case 334: /* $@24: %empty */ -#line 1753 "perly.y" + case 336: /* $@24: %empty */ +#line 1770 "perly.y" { parser->in_my = 0; if((ps[-1].val.opval)) @@ -2152,8 +2174,8 @@ case 2: /* @1: %empty */ break; - case 335: /* fielddecl: KW_FIELD fieldvar optfieldattrlist ASSIGNOP $@24 term */ -#line 1761 "perly.y" + case 337: /* fielddecl: KW_FIELD fieldvar optfieldattrlist ASSIGNOP $@24 term */ +#line 1778 "perly.y" { class_set_field_defop((PADNAME *)(ps[-4].val.pval), (ps[-2].val.ival), (ps[0].val.opval)); LEAVE; @@ -2162,122 +2184,122 @@ case 2: /* @1: %empty */ break; - case 341: /* optrepl: PERLY_SLASH expr */ -#line 1781 "perly.y" + case 343: /* optrepl: PERLY_SLASH expr */ +#line 1798 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 342: /* my_scalar: scalar */ -#line 1787 "perly.y" + case 344: /* my_scalar: scalar */ +#line 1804 "perly.y" { parser->in_my = 0; (yyval.opval) = my((ps[0].val.opval)); } break; - case 343: /* list_of_scalars: list_of_scalars PERLY_COMMA */ -#line 1792 "perly.y" + case 345: /* list_of_scalars: list_of_scalars PERLY_COMMA */ +#line 1809 "perly.y" { (yyval.opval) = (ps[-1].val.opval); } break; - case 344: /* list_of_scalars: list_of_scalars PERLY_COMMA scalar */ -#line 1794 "perly.y" + case 346: /* list_of_scalars: list_of_scalars PERLY_COMMA scalar */ +#line 1811 "perly.y" { (yyval.opval) = op_append_elem(OP_LIST, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 346: /* my_list_of_scalars: list_of_scalars */ -#line 1801 "perly.y" + case 348: /* my_list_of_scalars: list_of_scalars */ +#line 1818 "perly.y" { parser->in_my = 0; (yyval.opval) = (ps[0].val.opval); } break; - case 354: /* amper: PERLY_AMPERSAND indirob */ -#line 1818 "perly.y" + case 356: /* amper: PERLY_AMPERSAND indirob */ +#line 1835 "perly.y" { (yyval.opval) = newCVREF((ps[-1].val.ival),(ps[0].val.opval)); } break; - case 355: /* scalar: PERLY_DOLLAR indirob */ -#line 1822 "perly.y" + case 357: /* scalar: PERLY_DOLLAR indirob */ +#line 1839 "perly.y" { (yyval.opval) = newSVREF((ps[0].val.opval)); } break; - case 356: /* ary: PERLY_SNAIL indirob */ -#line 1826 "perly.y" + case 358: /* ary: PERLY_SNAIL indirob */ +#line 1843 "perly.y" { (yyval.opval) = newAVREF((ps[0].val.opval)); if ((yyval.opval)) (yyval.opval)->op_private |= (ps[-1].val.ival); } break; - case 357: /* hsh: PERLY_PERCENT_SIGN indirob */ -#line 1832 "perly.y" + case 359: /* hsh: PERLY_PERCENT_SIGN indirob */ +#line 1849 "perly.y" { (yyval.opval) = newHVREF((ps[0].val.opval)); if ((yyval.opval)) (yyval.opval)->op_private |= (ps[-1].val.ival); } break; - case 358: /* arylen: DOLSHARP indirob */ -#line 1838 "perly.y" + case 360: /* arylen: DOLSHARP indirob */ +#line 1855 "perly.y" { (yyval.opval) = newAVREF((ps[0].val.opval)); } break; - case 359: /* arylen: term ARROW DOLSHARP PERLY_STAR */ -#line 1840 "perly.y" + case 361: /* arylen: term ARROW DOLSHARP PERLY_STAR */ +#line 1857 "perly.y" { (yyval.opval) = newAVREF((ps[-3].val.opval)); } break; - case 360: /* star: PERLY_STAR indirob */ -#line 1844 "perly.y" + case 362: /* star: PERLY_STAR indirob */ +#line 1861 "perly.y" { (yyval.opval) = newGVREF(0,(ps[0].val.opval)); } break; - case 362: /* sliceme: term ARROW PERLY_SNAIL */ -#line 1849 "perly.y" + case 364: /* sliceme: term ARROW PERLY_SNAIL */ +#line 1866 "perly.y" { (yyval.opval) = newAVREF((ps[-2].val.opval)); } break; - case 364: /* kvslice: term ARROW PERLY_PERCENT_SIGN */ -#line 1854 "perly.y" + case 366: /* kvslice: term ARROW PERLY_PERCENT_SIGN */ +#line 1871 "perly.y" { (yyval.opval) = newHVREF((ps[-2].val.opval)); } break; - case 366: /* gelem: term ARROW PERLY_STAR */ -#line 1859 "perly.y" + case 368: /* gelem: term ARROW PERLY_STAR */ +#line 1876 "perly.y" { (yyval.opval) = newGVREF(0,(ps[-2].val.opval)); } break; - case 367: /* indirob: BAREWORD */ -#line 1864 "perly.y" + case 369: /* indirob: BAREWORD */ +#line 1881 "perly.y" { (yyval.opval) = scalar((ps[0].val.opval)); } break; - case 368: /* indirob: scalar */ -#line 1866 "perly.y" + case 370: /* indirob: scalar */ +#line 1883 "perly.y" { (yyval.opval) = scalar((ps[0].val.opval)); } break; - case 369: /* indirob: block */ -#line 1868 "perly.y" + case 371: /* indirob: block */ +#line 1885 "perly.y" { (yyval.opval) = op_scope((ps[0].val.opval)); } break; - case 370: /* indirob: PRIVATEREF */ -#line 1871 "perly.y" + case 372: /* indirob: PRIVATEREF */ +#line 1888 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; @@ -2289,6 +2311,6 @@ case 2: /* @1: %empty */ /* Generated from: - * 518d99fb6b32e38f3b668033ccd9846a65b84d5b9381db7009114282219cbe63 perly.y + * 1579ea304eb388b1cee0a714a2acd39920dbe5a8a06aa165703783e2c2dc2502 perly.y * f13e9c08cea6302f0c1d1f467405bd0e0880d0ea92d0669901017a7f7e94ab28 regen_perly.pl * ex: set ro ft=c: */ diff --git a/perly.h b/perly.h index e7373ad33149..078957226611 100644 --- a/perly.h +++ b/perly.h @@ -246,6 +246,6 @@ int yyparse (void); /* Generated from: - * 518d99fb6b32e38f3b668033ccd9846a65b84d5b9381db7009114282219cbe63 perly.y + * 1579ea304eb388b1cee0a714a2acd39920dbe5a8a06aa165703783e2c2dc2502 perly.y * f13e9c08cea6302f0c1d1f467405bd0e0880d0ea92d0669901017a7f7e94ab28 regen_perly.pl * ex: set ro ft=c: */ diff --git a/perly.tab b/perly.tab index 71029d5f59d1..7e573b5915e0 100644 --- a/perly.tab +++ b/perly.tab @@ -224,61 +224,62 @@ enum yysymbol_kind_t YYSYMBOL_sigvar = 213, /* sigvar */ YYSYMBOL_sigslurpsigil = 214, /* sigslurpsigil */ YYSYMBOL_sigslurpelem = 215, /* sigslurpelem */ - YYSYMBOL_sigscalarelem = 216, /* sigscalarelem */ - YYSYMBOL_optsigscalardefault = 217, /* optsigscalardefault */ - YYSYMBOL_sigelem = 218, /* sigelem */ - YYSYMBOL_siglist = 219, /* siglist */ - YYSYMBOL_optsiglist = 220, /* optsiglist */ - YYSYMBOL_optsubsignature = 221, /* optsubsignature */ - YYSYMBOL_subsignature = 222, /* subsignature */ - YYSYMBOL_subsigguts = 223, /* subsigguts */ - YYSYMBOL_224_20 = 224, /* $@20 */ - YYSYMBOL_optsubbody = 225, /* optsubbody */ - YYSYMBOL_subbody = 226, /* subbody */ - YYSYMBOL_optsigsubbody = 227, /* optsigsubbody */ - YYSYMBOL_sigsubbody = 228, /* sigsubbody */ - YYSYMBOL_229_21 = 229, /* $@21 */ - YYSYMBOL_expr = 230, /* expr */ - YYSYMBOL_listexpr = 231, /* listexpr */ - YYSYMBOL_listop = 232, /* listop */ - YYSYMBOL_233_22 = 233, /* @22 */ - YYSYMBOL_methodname = 234, /* methodname */ - YYSYMBOL_subscripted = 235, /* subscripted */ - YYSYMBOL_termbinop = 236, /* termbinop */ - YYSYMBOL_termrelop = 237, /* termrelop */ - YYSYMBOL_relopchain = 238, /* relopchain */ - YYSYMBOL_termeqop = 239, /* termeqop */ - YYSYMBOL_eqopchain = 240, /* eqopchain */ - YYSYMBOL_termunop = 241, /* termunop */ - YYSYMBOL_anonymous = 242, /* anonymous */ - YYSYMBOL_termdo = 243, /* termdo */ - YYSYMBOL_term = 244, /* term */ - YYSYMBOL_245_23 = 245, /* @23 */ - YYSYMBOL_myattrterm = 246, /* myattrterm */ - YYSYMBOL_myterm = 247, /* myterm */ - YYSYMBOL_fieldvar = 248, /* fieldvar */ - YYSYMBOL_optfieldattrlist = 249, /* optfieldattrlist */ - YYSYMBOL_fielddecl = 250, /* fielddecl */ - YYSYMBOL_251_24 = 251, /* $@24 */ - YYSYMBOL_optlistexpr = 252, /* optlistexpr */ - YYSYMBOL_optexpr = 253, /* optexpr */ - YYSYMBOL_optrepl = 254, /* optrepl */ - YYSYMBOL_my_scalar = 255, /* my_scalar */ - YYSYMBOL_list_of_scalars = 256, /* list_of_scalars */ - YYSYMBOL_my_list_of_scalars = 257, /* my_list_of_scalars */ - YYSYMBOL_my_var = 258, /* my_var */ - YYSYMBOL_refgen_topic = 259, /* refgen_topic */ - YYSYMBOL_my_refgen = 260, /* my_refgen */ - YYSYMBOL_amper = 261, /* amper */ - YYSYMBOL_scalar = 262, /* scalar */ - YYSYMBOL_ary = 263, /* ary */ - YYSYMBOL_hsh = 264, /* hsh */ - YYSYMBOL_arylen = 265, /* arylen */ - YYSYMBOL_star = 266, /* star */ - YYSYMBOL_sliceme = 267, /* sliceme */ - YYSYMBOL_kvslice = 268, /* kvslice */ - YYSYMBOL_gelem = 269, /* gelem */ - YYSYMBOL_indirob = 270 /* indirob */ + YYSYMBOL_optcolon = 216, /* optcolon */ + YYSYMBOL_sigscalarelem = 217, /* sigscalarelem */ + YYSYMBOL_optsigscalardefault = 218, /* optsigscalardefault */ + YYSYMBOL_sigelem = 219, /* sigelem */ + YYSYMBOL_siglist = 220, /* siglist */ + YYSYMBOL_optsiglist = 221, /* optsiglist */ + YYSYMBOL_optsubsignature = 222, /* optsubsignature */ + YYSYMBOL_subsignature = 223, /* subsignature */ + YYSYMBOL_subsigguts = 224, /* subsigguts */ + YYSYMBOL_225_20 = 225, /* $@20 */ + YYSYMBOL_optsubbody = 226, /* optsubbody */ + YYSYMBOL_subbody = 227, /* subbody */ + YYSYMBOL_optsigsubbody = 228, /* optsigsubbody */ + YYSYMBOL_sigsubbody = 229, /* sigsubbody */ + YYSYMBOL_230_21 = 230, /* $@21 */ + YYSYMBOL_expr = 231, /* expr */ + YYSYMBOL_listexpr = 232, /* listexpr */ + YYSYMBOL_listop = 233, /* listop */ + YYSYMBOL_234_22 = 234, /* @22 */ + YYSYMBOL_methodname = 235, /* methodname */ + YYSYMBOL_subscripted = 236, /* subscripted */ + YYSYMBOL_termbinop = 237, /* termbinop */ + YYSYMBOL_termrelop = 238, /* termrelop */ + YYSYMBOL_relopchain = 239, /* relopchain */ + YYSYMBOL_termeqop = 240, /* termeqop */ + YYSYMBOL_eqopchain = 241, /* eqopchain */ + YYSYMBOL_termunop = 242, /* termunop */ + YYSYMBOL_anonymous = 243, /* anonymous */ + YYSYMBOL_termdo = 244, /* termdo */ + YYSYMBOL_term = 245, /* term */ + YYSYMBOL_246_23 = 246, /* @23 */ + YYSYMBOL_myattrterm = 247, /* myattrterm */ + YYSYMBOL_myterm = 248, /* myterm */ + YYSYMBOL_fieldvar = 249, /* fieldvar */ + YYSYMBOL_optfieldattrlist = 250, /* optfieldattrlist */ + YYSYMBOL_fielddecl = 251, /* fielddecl */ + YYSYMBOL_252_24 = 252, /* $@24 */ + YYSYMBOL_optlistexpr = 253, /* optlistexpr */ + YYSYMBOL_optexpr = 254, /* optexpr */ + YYSYMBOL_optrepl = 255, /* optrepl */ + YYSYMBOL_my_scalar = 256, /* my_scalar */ + YYSYMBOL_list_of_scalars = 257, /* list_of_scalars */ + YYSYMBOL_my_list_of_scalars = 258, /* my_list_of_scalars */ + YYSYMBOL_my_var = 259, /* my_var */ + YYSYMBOL_refgen_topic = 260, /* refgen_topic */ + YYSYMBOL_my_refgen = 261, /* my_refgen */ + YYSYMBOL_amper = 262, /* amper */ + YYSYMBOL_scalar = 263, /* scalar */ + YYSYMBOL_ary = 264, /* ary */ + YYSYMBOL_hsh = 265, /* hsh */ + YYSYMBOL_arylen = 266, /* arylen */ + YYSYMBOL_star = 267, /* star */ + YYSYMBOL_sliceme = 268, /* sliceme */ + YYSYMBOL_kvslice = 269, /* kvslice */ + YYSYMBOL_gelem = 270, /* gelem */ + YYSYMBOL_indirob = 271 /* indirob */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -287,16 +288,16 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; #define YYFINAL 16 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 3749 +#define YYLAST 3755 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 133 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 138 +#define YYNNTS 139 /* YYNRULES -- Number of rules. */ -#define YYNRULES 370 +#define YYNRULES 372 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 701 +#define YYNSTATES 703 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 387 @@ -358,44 +359,44 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 187, 187, 186, 198, 197, 208, 207, 221, 220, - 234, 233, 247, 246, 257, 256, 269, 277, 299, 293, - 316, 324, 332, 339, 352, 357, 347, 378, 391, 410, - 426, 422, 451, 473, 487, 503, 516, 530, 538, 559, - 554, 574, 572, 609, 606, 639, 636, 665, 660, 682, - 696, 713, 711, 729, 741, 756, 765, 767, 772, 780, - 784, 791, 796, 803, 809, 813, 815, 812, 822, 823, - 833, 834, 843, 847, 851, 858, 875, 876, 877, 878, - 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, - 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, - 899, 903, 921, 922, 926, 930, 932, 934, 936, 938, - 940, 942, 945, 951, 952, 957, 968, 969, 974, 976, - 981, 988, 989, 993, 997, 1001, 1006, 1010, 1014, 1015, - 1018, 1024, 1029, 1034, 1040, 1041, 1046, 1047, 1052, 1053, - 1060, 1065, 1067, 1078, 1080, 1085, 1087, 1091, 1096, 1100, - 1108, 1113, 1121, 1123, 1128, 1130, 1138, 1139, 1140, 1145, - 1146, 1151, 1152, 1156, 1160, 1160, 1193, 1194, 1199, 1211, - 1212, 1217, 1216, 1229, 1231, 1233, 1235, 1237, 1241, 1243, - 1248, 1252, 1256, 1260, 1264, 1270, 1275, 1281, 1287, 1293, - 1299, 1301, 1303, 1306, 1305, 1319, 1320, 1324, 1328, 1331, - 1336, 1341, 1344, 1348, 1352, 1358, 1366, 1373, 1379, 1381, - 1383, 1388, 1390, 1392, 1394, 1396, 1398, 1403, 1405, 1407, - 1409, 1411, 1413, 1415, 1417, 1419, 1421, 1423, 1425, 1427, - 1429, 1431, 1433, 1437, 1439, 1441, 1443, 1445, 1449, 1451, - 1455, 1457, 1459, 1461, 1465, 1467, 1472, 1474, 1477, 1479, - 1481, 1484, 1487, 1498, 1501, 1509, 1511, 1513, 1516, 1518, - 1521, 1523, 1528, 1533, 1535, 1539, 1540, 1541, 1542, 1543, - 1545, 1547, 1549, 1551, 1553, 1555, 1557, 1559, 1561, 1563, - 1565, 1567, 1569, 1579, 1589, 1599, 1609, 1611, 1613, 1616, - 1621, 1625, 1627, 1629, 1631, 1634, 1636, 1639, 1641, 1643, - 1645, 1647, 1649, 1651, 1653, 1655, 1658, 1660, 1662, 1664, - 1666, 1668, 1672, 1675, 1674, 1687, 1688, 1689, 1694, 1696, - 1698, 1700, 1705, 1707, 1710, 1712, 1714, 1719, 1724, 1729, - 1737, 1739, 1741, 1745, 1753, 1752, 1770, 1771, 1775, 1776, - 1780, 1781, 1786, 1791, 1793, 1797, 1800, 1804, 1805, 1806, - 1809, 1810, 1813, 1814, 1817, 1821, 1825, 1831, 1837, 1839, - 1843, 1847, 1848, 1852, 1853, 1857, 1858, 1863, 1865, 1867, - 1870 + 0, 188, 188, 187, 199, 198, 209, 208, 222, 221, + 235, 234, 248, 247, 258, 257, 270, 278, 300, 294, + 317, 325, 333, 340, 353, 358, 348, 379, 392, 411, + 427, 423, 452, 474, 488, 504, 517, 531, 539, 560, + 555, 575, 573, 610, 607, 640, 637, 666, 661, 683, + 697, 714, 712, 730, 742, 757, 766, 768, 773, 781, + 785, 792, 797, 804, 810, 814, 816, 813, 823, 824, + 834, 835, 844, 848, 852, 859, 876, 877, 878, 879, + 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, + 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, + 900, 904, 922, 923, 927, 931, 933, 935, 937, 939, + 941, 943, 946, 952, 953, 958, 969, 970, 975, 977, + 982, 989, 990, 994, 998, 1002, 1007, 1011, 1015, 1016, + 1019, 1025, 1030, 1035, 1041, 1042, 1047, 1048, 1053, 1054, + 1061, 1066, 1068, 1079, 1081, 1086, 1088, 1092, 1097, 1101, + 1107, 1109, 1115, 1125, 1138, 1140, 1145, 1147, 1155, 1156, + 1157, 1162, 1163, 1168, 1169, 1173, 1177, 1177, 1210, 1211, + 1216, 1228, 1229, 1234, 1233, 1246, 1248, 1250, 1252, 1254, + 1258, 1260, 1265, 1269, 1273, 1277, 1281, 1287, 1292, 1298, + 1304, 1310, 1316, 1318, 1320, 1323, 1322, 1336, 1337, 1341, + 1345, 1348, 1353, 1358, 1361, 1365, 1369, 1375, 1383, 1390, + 1396, 1398, 1400, 1405, 1407, 1409, 1411, 1413, 1415, 1420, + 1422, 1424, 1426, 1428, 1430, 1432, 1434, 1436, 1438, 1440, + 1442, 1444, 1446, 1448, 1450, 1454, 1456, 1458, 1460, 1462, + 1466, 1468, 1472, 1474, 1476, 1478, 1482, 1484, 1489, 1491, + 1494, 1496, 1498, 1501, 1504, 1515, 1518, 1526, 1528, 1530, + 1533, 1535, 1538, 1540, 1545, 1550, 1552, 1556, 1557, 1558, + 1559, 1560, 1562, 1564, 1566, 1568, 1570, 1572, 1574, 1576, + 1578, 1580, 1582, 1584, 1586, 1596, 1606, 1616, 1626, 1628, + 1630, 1633, 1638, 1642, 1644, 1646, 1648, 1651, 1653, 1656, + 1658, 1660, 1662, 1664, 1666, 1668, 1670, 1672, 1675, 1677, + 1679, 1681, 1683, 1685, 1689, 1692, 1691, 1704, 1705, 1706, + 1711, 1713, 1715, 1717, 1722, 1724, 1727, 1729, 1731, 1736, + 1741, 1746, 1754, 1756, 1758, 1762, 1770, 1769, 1787, 1788, + 1792, 1793, 1797, 1798, 1803, 1808, 1810, 1814, 1817, 1821, + 1822, 1823, 1826, 1827, 1830, 1831, 1834, 1838, 1842, 1848, + 1854, 1856, 1860, 1864, 1865, 1869, 1870, 1874, 1875, 1880, + 1882, 1884, 1887 }; #endif @@ -459,7 +460,7 @@ static const char *const yytname[] = "nexpr", "texpr", "iexpr", "mexpr", "mnexpr", "formname", "startsub", "startanonsub", "startanonmethod", "startformsub", "subname", "proto", "subattrlist", "myattrlist", "sigvar", "sigslurpsigil", "sigslurpelem", - "sigscalarelem", "optsigscalardefault", "sigelem", "siglist", + "optcolon", "sigscalarelem", "optsigscalardefault", "sigelem", "siglist", "optsiglist", "optsubsignature", "subsignature", "subsigguts", "$@20", "optsubbody", "subbody", "optsigsubbody", "sigsubbody", "$@21", "expr", "listexpr", "listop", "@22", "methodname", "subscripted", "termbinop", @@ -478,12 +479,12 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-575) +#define YYPACT_NINF (-584) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-369) +#define YYTABLE_NINF (-371) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -492,77 +493,77 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 193, -575, -575, -575, -575, -575, -575, -575, 38, -575, - 3067, 45, 2009, 1892, -575, -575, -575, -575, 25, 3067, - 25, 3067, 25, 3067, 25, 25, 3067, 35, 3067, 2338, - -575, -575, -575, -575, 25, 25, -575, -575, 50, -66, - -575, 3067, -575, -575, 3067, -62, -59, -52, 2338, 2257, - 45, 25, 3067, 42, 3067, 3067, 3067, 3067, 3067, 3067, - 2419, -575, 237, 64, -575, 11, -575, 19, -29, 61, - -8, -575, -575, -575, 742, -575, -575, -27, 104, 216, - 243, -575, 124, 270, 273, 170, -575, -575, -575, -575, - -575, 65, 90, 135, 26, 100, 18, 108, 117, 121, - 129, 45, 178, 178, -575, 42, -575, -575, -575, 200, - -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, - -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, - -575, -575, -575, -575, -575, 42, 153, -575, 226, 439, - 249, 1892, -575, -575, -575, -575, 712, -575, 150, 910, - -575, -575, -575, -575, -575, 274, -575, 219, -575, 219, - -575, -575, 430, 3148, 2500, 203, -575, -575, -575, 430, - -575, 430, 220, 208, 208, 3067, 164, 209, 3067, 166, - 430, 45, 742, 182, 2581, 3067, 2257, -575, 430, 3229, - -575, 64, -575, 2662, 3067, 3067, -575, 295, -575, -575, - 3067, 64, 219, 219, 219, 254, 254, 288, 392, 3067, - 3067, 3067, 3067, 3067, 3067, 3067, 2743, -575, -575, 3067, - -575, -575, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, + 783, -584, -584, -584, -584, -584, -584, -584, 32, -584, + 3067, 63, 2009, 1892, -584, -584, -584, -584, 51, 3067, + 51, 3067, 51, 3067, 51, 51, 3067, 49, 3067, 2338, + -584, -584, -584, -584, 51, 51, -584, -584, 67, -55, + -584, 3067, -584, -584, 3067, -48, -43, -49, 2338, 2257, + 63, 51, 3067, 85, 3067, 3067, 3067, 3067, 3067, 3067, + 2419, -584, 118, 79, -584, 2, -584, 61, -2, 94, + 47, -584, -584, -584, 3259, -584, -584, 17, 159, 180, + 309, -584, 168, 313, 321, 176, -584, -584, -584, -584, + -584, 136, 173, 222, 101, 124, 11, 155, 160, 203, + 209, 63, 185, 185, -584, 85, -584, -584, -584, 232, + -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, + -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, + -584, -584, -584, -584, -584, 85, 211, -584, 274, 404, + 324, 1892, -584, -584, -584, -584, 687, -584, 33, 884, + -584, -584, -584, -584, -584, 336, -584, 347, -584, 347, + -584, -584, 3625, 3148, 2500, 265, -584, -584, -584, 3625, + -584, 3625, 288, 279, 279, 3067, 234, 271, 3067, 240, + 3625, 63, 3259, 241, 2581, 3067, 2257, -584, 3625, 3229, + -584, 79, -584, 2662, 3067, 3067, -584, 351, -584, -584, + 3067, 79, 347, 347, 347, 520, 520, 361, 365, 3067, + 3067, 3067, 3067, 3067, 3067, 3067, 2743, -584, -584, 3067, + -584, -584, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, - 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, -575, -575, - -575, 3067, 103, 2824, 3067, 3067, 3067, 3067, 3067, 3067, - 3067, -575, 262, 263, 265, 238, -575, -575, -575, -575, - -575, 217, 570, -575, -575, 212, -575, -575, -575, -575, - -575, -575, 281, -575, -575, -575, -575, -575, -575, 45, - -575, -575, -575, 3067, 3067, 3067, 3067, 3067, 3067, -575, - -575, -575, -575, 289, -575, -575, -575, 289, -575, -575, - -575, 325, -575, -575, 2905, 219, 203, 39, 93, 97, - -575, 407, 298, -575, -575, -575, 208, 300, -575, 15, - 15, -575, 3067, 3067, 110, -575, -575, -575, -575, 411, - 277, 229, 3067, 64, 64, 352, -575, 3067, 378, 56, - 56, -575, -575, 3367, 163, 116, -575, 470, 3580, 3560, - 3419, 219, 571, 3619, 3315, 3367, 3367, 3263, 3458, 3458, - 3458, 3481, 3481, 3520, 3541, 3560, 3560, 3580, 3580, 3599, - 367, 3619, 571, 219, 219, 79, 51, 3067, 3067, 399, - 370, 380, 389, -575, 394, 2986, 271, -575, -575, 475, - 258, 120, 292, 142, 304, 147, 336, 1027, -575, -575, - 404, 32, 208, 364, -575, 328, 3067, 3067, -575, 7, - -575, -575, 296, -575, -575, -575, -575, 2095, 135, -575, - 3067, 3067, 3067, 3067, -575, -575, 379, -575, 412, -575, - -575, -575, 237, -575, -575, -575, 237, -575, -575, -575, - 338, 339, 150, 14, 534, -575, -575, -575, 432, -575, - 312, -575, -575, 314, 122, -575, 3067, -575, -575, -575, - 545, -575, 214, 3067, 440, -575, -575, 3067, -575, 319, - 368, 233, -575, -575, -575, -575, -575, -575, 732, 3067, - -575, 441, -575, 445, -575, 446, -575, 449, -575, -575, - -575, -575, -575, 46, -575, -575, 335, 237, 342, 451, - 337, -575, -575, -575, -575, -575, 347, 448, 241, -575, - 3067, 350, 360, 237, 361, 369, 1190, 377, 443, 220, - -575, 502, -575, -575, 208, 3067, 3067, -575, 36, -575, - -575, -575, 503, -575, -575, 3067, -575, 425, -575, -575, - -575, 279, -575, 1060, 3067, 504, -575, -575, 387, -575, - -575, -575, -575, 498, -575, -575, -575, 3067, 178, 178, - 507, 395, -575, 3067, 3067, 178, -575, 393, 397, -575, - -575, 178, 178, -575, -575, -575, -575, 3067, 208, -575, - 509, -575, 742, 742, 401, -575, 237, -575, -575, 408, - -575, -575, 452, -575, -575, 742, 197, 197, 451, 419, - 421, 424, 153, 3067, 3067, 178, 178, 178, -575, -575, - 451, 178, 521, 412, 1307, -575, -575, -575, -575, -575, - -575, -575, 1424, -575, 178, 444, -575, -575, -575, -575, - 3067, 178, 178, -575, 557, 450, 153, 153, 153, -575, - 539, -575, -575, -575, 1541, -575, 31, -575, 1658, -575, - 3067, 454, 153, 153, -575, 178, -575, -575, -575, 457, - 45, -575, -575, 572, 505, -575, -575, 464, 178, -575, - -575, -575, 153, -575, -575, -575, -575, -575, -575, 178, - 153, 2176, -575, 1775, 197, -575, 467, -575, -575, 178, - -575 + 3067, 3067, 3067, 3067, 3067, 3067, 3067, 3067, -584, -584, + -584, 3067, 305, 2824, 3067, 3067, 3067, 3067, 3067, 3067, + 3067, -584, 323, 327, 328, 294, -584, -584, -584, -584, + -584, 263, 602, -584, -584, 255, -584, -584, -584, -584, + -584, -584, 352, -584, -584, -584, -584, -584, -584, 63, + -584, -584, -584, 3067, 3067, 3067, 3067, 3067, 3067, -584, + -584, -584, -584, -584, -584, -584, -584, 345, -584, 381, + -584, -584, 392, -584, -584, 2905, 347, 265, 37, 53, + 111, -584, 388, 350, -584, -584, -584, 279, 354, -584, + 12, 12, -584, 3067, 3067, 72, -584, -584, -584, -584, + 416, 320, 280, 3067, 79, 79, 403, -584, 3067, 409, + 170, 170, -584, -584, 3363, 21, 89, -584, 437, 3546, + 3586, 3467, 347, 302, 272, 3311, 3363, 3363, 1035, 714, + 714, 714, 3506, 3506, 3528, 3567, 3586, 3586, 3546, 3546, + 3606, 1050, 272, 302, 347, 347, 198, 34, 3067, 3067, + 228, 391, 399, 410, -584, 413, 2986, 311, -584, -584, + 470, 243, 113, 260, 122, 273, 140, 281, 1001, -584, + -584, 428, 82, 279, 393, -584, 355, 3067, 3067, -584, + 13, -584, -584, 331, -584, -584, -584, -584, 2095, 222, + -584, 3067, 3067, 3067, 3067, -584, -584, 397, -584, 444, + -584, -584, -584, 118, -584, -584, -584, 118, -584, -584, + -584, 369, 345, 33, 25, 486, -584, -584, -584, 458, + -584, 339, -584, -584, 341, 105, -584, 3067, -584, -584, + -584, 510, -584, 164, 3067, 466, -584, -584, 3067, -584, + 349, 297, 184, -584, -584, -584, -584, -584, -584, 514, + 3067, -584, 467, -584, 474, -584, 476, -584, 477, -584, + -584, -584, -584, -584, 87, -584, -584, 360, 118, 363, + 479, 372, -584, -584, -584, -584, -584, 366, 483, 64, + -584, 3067, 376, 377, 118, 383, 386, 1190, 389, 436, + 288, -584, 511, -584, -584, 279, 3067, 424, -584, 39, + -584, -584, -584, 513, -584, -584, 3067, -584, 439, -584, + -584, -584, 248, -584, 3415, 3067, 515, -584, -584, 395, + -584, -584, -584, -584, 516, -584, -584, -584, 3067, 185, + 185, 521, 408, -584, 3067, 3067, 185, -584, 411, 420, + -584, -584, 185, 185, -584, -584, -584, -584, 3067, 279, + -584, 518, 3259, 3067, 421, -584, 118, -584, -584, 422, + -584, -584, 447, -584, -584, 3259, 314, 314, 479, 423, + 425, 426, 211, 3067, 3067, 185, 185, 185, -584, -584, + 479, 185, 537, 444, 1307, -584, -584, -584, -584, 3259, + -584, -584, -584, -584, 1424, -584, 185, 429, -584, -584, + -584, -584, 3067, 185, 185, -584, 538, 432, 211, 211, + 211, -584, 497, -584, -584, -584, 1541, -584, 29, -584, + 1658, -584, 3067, 441, 211, 211, -584, 185, -584, -584, + -584, 442, 63, -584, -584, 553, 488, -584, -584, 453, + 185, -584, -584, -584, 211, -584, -584, -584, -584, -584, + -584, 185, 211, 2176, -584, 1775, 314, -584, 454, -584, + -584, 185, -584 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -571,114 +572,114 @@ static const yytype_int16 yypact[] = static const yytype_int16 yydefact[] = { 0, 2, 4, 6, 8, 10, 12, 14, 0, 61, - 59, 0, 0, 0, 59, 164, 1, 59, 0, 59, - 0, 0, 0, 0, 0, 0, 0, 0, 302, 0, - 131, 131, 132, 315, 0, 0, 286, 313, 274, 308, - 310, 304, 131, 317, 296, 306, 0, 0, 299, 59, + 59, 0, 0, 0, 59, 166, 1, 59, 0, 59, + 0, 0, 0, 0, 0, 0, 0, 0, 304, 0, + 131, 131, 132, 317, 0, 0, 288, 315, 276, 310, + 312, 306, 131, 319, 298, 308, 0, 0, 301, 59, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, - 0, 338, 339, 177, 316, 281, 265, 221, 233, 222, - 240, 266, 267, 268, 180, 271, 5, 287, 276, 279, - 278, 280, 277, 0, 0, 0, 61, 7, 105, 37, + 0, 340, 341, 179, 318, 283, 267, 223, 235, 224, + 242, 268, 269, 270, 182, 273, 5, 289, 278, 281, + 280, 282, 279, 0, 0, 0, 61, 7, 105, 37, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130, 0, 56, 57, 76, 0, 130, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 0, 59, 9, 0, 106, 0, 0, 11, 73, 72, 68, 0, 15, 59, 0, - 367, 370, 369, 368, 354, 0, 355, 246, 357, 247, - 356, 360, 272, 0, 0, 319, 324, 326, 325, 303, - 264, 263, 59, 59, 59, 59, 0, 0, 0, 0, - 305, 0, 297, 0, 0, 59, 59, 300, 301, 315, - 336, 337, 190, 276, 0, 0, 358, 0, 134, 135, - 59, 298, 248, 249, 270, 253, 254, 275, 0, 0, - 0, 0, 0, 178, 0, 0, 0, 236, 235, 0, - 243, 242, 0, 0, 0, 0, 0, 0, 0, 0, + 369, 372, 371, 370, 356, 0, 357, 248, 359, 249, + 358, 362, 274, 0, 0, 321, 326, 328, 327, 305, + 266, 265, 59, 59, 59, 59, 0, 0, 0, 0, + 307, 0, 299, 0, 0, 59, 59, 302, 303, 317, + 338, 339, 192, 278, 0, 0, 360, 0, 134, 135, + 59, 300, 250, 251, 272, 255, 256, 277, 0, 0, + 0, 0, 0, 180, 0, 0, 0, 238, 237, 0, + 245, 244, 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, 250, 251, - 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 59, 59, 0, 0, 59, 327, 329, 328, 61, + 0, 0, 0, 0, 0, 0, 0, 0, 252, 253, + 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 59, 59, 0, 0, 59, 329, 331, 330, 61, 61, 61, 0, 61, 61, 0, 61, 61, 61, 61, 20, 63, 0, 21, 51, 130, 55, 41, 130, 0, 116, 16, 22, 0, 0, 0, 0, 0, 0, 23, - 75, 74, 69, 143, 146, 145, 159, 143, 155, 154, - 158, 160, 165, 255, 0, 321, 0, 276, 279, 278, - 323, 0, 142, 318, 137, 136, 59, 140, 138, 260, - 262, 188, 59, 0, 0, 309, 193, 307, 311, 0, - 0, 0, 0, 181, 182, 0, 290, 0, 273, 175, - 176, 173, 174, 179, 0, 0, 207, 0, 239, 245, - 225, 214, 216, 218, 232, 212, 213, 0, 228, 230, - 229, 226, 227, 224, 223, 244, 241, 238, 234, 237, - 220, 219, 217, 231, 215, 211, 0, 0, 0, 0, - 364, 362, 366, 195, 0, 0, 185, 196, 288, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 128, 129, - 0, 0, 59, 331, 332, 333, 0, 0, 352, 0, - 353, 350, 0, 351, 347, 348, 349, 0, 0, 61, - 0, 123, 0, 0, 59, 61, 0, 45, 61, 43, - 117, 107, 104, 108, 111, 110, 125, 109, 112, 144, - 150, 147, 156, 275, 0, 320, 322, 141, 258, 139, - 59, 259, 261, 0, 59, 209, 59, 312, 192, 191, - 0, 256, 0, 0, 0, 200, 206, 0, 294, 187, - 0, 0, 291, 293, 292, 295, 359, 204, 0, 59, - 289, 0, 198, 0, 282, 0, 283, 0, 58, 61, - 34, 61, 38, 0, 330, 334, 0, 126, 0, 0, - 0, 342, 61, 121, 122, 127, 0, 0, 106, 30, - 0, 0, 0, 124, 0, 0, 0, 59, 0, 59, - 167, 0, 42, 166, 59, 152, 148, 157, 273, 257, - 164, 161, 0, 162, 189, 0, 340, 0, 194, 183, - 210, 0, 203, 269, 59, 0, 199, 205, 0, 201, - 284, 285, 197, 0, 39, 61, 17, 0, 0, 0, - 346, 0, 345, 0, 0, 0, 24, 0, 0, 120, - 120, 0, 0, 62, 65, 64, 47, 59, 59, 59, - 61, 151, 153, 149, 0, 171, 341, 314, 208, 0, - 202, 184, 0, 59, 18, 335, 59, 59, 343, 0, + 75, 74, 69, 146, 145, 151, 161, 143, 157, 0, + 156, 160, 162, 167, 257, 0, 323, 0, 278, 281, + 280, 325, 0, 142, 320, 137, 136, 59, 140, 138, + 262, 264, 190, 59, 0, 0, 311, 195, 309, 313, + 0, 0, 0, 0, 183, 184, 0, 292, 0, 275, + 177, 178, 175, 176, 181, 0, 0, 209, 0, 241, + 247, 227, 216, 218, 220, 234, 214, 215, 0, 230, + 232, 231, 228, 229, 226, 225, 246, 243, 240, 236, + 239, 222, 221, 219, 233, 217, 213, 0, 0, 0, + 0, 366, 364, 368, 197, 0, 0, 187, 198, 290, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, + 129, 0, 0, 59, 333, 334, 335, 0, 0, 354, + 0, 355, 352, 0, 353, 349, 350, 351, 0, 0, + 61, 0, 123, 0, 0, 59, 61, 0, 45, 61, + 43, 117, 107, 104, 108, 111, 110, 125, 109, 112, + 144, 147, 143, 158, 277, 0, 322, 324, 141, 260, + 139, 59, 261, 263, 0, 59, 211, 59, 314, 194, + 193, 0, 258, 0, 0, 0, 202, 208, 0, 296, + 189, 0, 0, 293, 295, 294, 297, 361, 206, 0, + 59, 291, 0, 200, 0, 284, 0, 285, 0, 58, + 61, 34, 61, 38, 0, 332, 336, 0, 126, 0, + 0, 0, 344, 61, 121, 122, 127, 0, 0, 106, + 30, 0, 0, 0, 124, 0, 0, 0, 59, 0, + 59, 169, 0, 42, 168, 59, 148, 152, 159, 275, + 259, 166, 163, 0, 164, 191, 0, 342, 0, 196, + 185, 212, 0, 205, 271, 59, 0, 201, 207, 0, + 203, 286, 287, 199, 0, 39, 61, 17, 0, 0, + 0, 348, 0, 347, 0, 0, 0, 24, 0, 0, + 120, 120, 0, 0, 62, 65, 64, 47, 59, 59, + 59, 61, 149, 154, 0, 173, 343, 316, 210, 0, + 204, 186, 0, 59, 18, 337, 59, 59, 345, 0, 0, 0, 59, 123, 0, 0, 0, 0, 35, 53, - 0, 0, 0, 61, 0, 170, 44, 169, 163, 59, - 186, 59, 0, 59, 0, 0, 113, 36, 49, 344, - 0, 0, 0, 33, 0, 0, 59, 59, 59, 66, - 118, 52, 46, 168, 0, 70, 0, 40, 0, 114, - 0, 0, 59, 59, 25, 0, 29, 50, 54, 0, - 0, 48, 172, 0, 59, 71, 19, 0, 0, 27, - 32, 120, 59, 67, 119, 60, 59, 102, 101, 0, - 59, 0, 31, 0, 59, 28, 0, 103, 115, 0, - 26 + 0, 0, 0, 61, 0, 172, 44, 171, 153, 155, + 165, 59, 188, 59, 0, 59, 0, 0, 113, 36, + 49, 346, 0, 0, 0, 33, 0, 0, 59, 59, + 59, 66, 118, 52, 46, 170, 0, 70, 0, 40, + 0, 114, 0, 0, 59, 59, 25, 0, 29, 50, + 54, 0, 0, 48, 174, 0, 59, 71, 19, 0, + 0, 27, 32, 120, 59, 67, 119, 60, 59, 102, + 101, 0, 59, 0, 31, 0, 59, 28, 0, 103, + 115, 0, 26 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, - -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, - -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, - -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, - -575, -575, -575, -575, -4, -10, -575, 92, -7, -575, - -575, -575, -575, -16, -575, 586, 462, 3, -575, -575, - 114, -416, -574, -269, -575, -563, -575, -6, 175, -340, - -80, -575, -97, 57, -575, -575, -95, 83, -142, 299, - 309, -575, -575, -575, -575, 167, -575, -575, -575, -575, - 78, -575, -3, 168, -575, -318, -575, 9, -46, -575, - -575, -575, -575, -575, -575, -575, -575, -575, -575, -575, - -575, 662, -575, -575, 461, -575, -575, -575, -575, -171, - -17, -575, -575, -575, -575, 204, -575, -575, 353, 40, - -22, -21, -575, -575, -575, -575, -575, 60 + -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, + -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, + -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, + -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, + -584, -584, -584, -584, -4, -10, -584, 28, -67, -584, + -584, -584, -584, -16, -584, 573, 448, -1, -584, -584, + -74, -425, -583, -401, -584, -562, -584, -25, 161, -281, + -100, -584, -82, 88, -584, -584, -101, 65, -172, 282, + 146, -584, -584, -584, -584, -584, 150, -584, -584, -584, + -584, 73, -584, -7, 162, -584, -314, -584, 16, -44, + -584, -584, -584, -584, -584, -584, -584, -584, -584, -584, + -584, -584, 636, -584, -584, 457, -584, -584, -584, -584, + -167, 3, -584, -584, -584, -584, 196, -584, -584, 356, + 36, -21, -15, -584, -584, -584, -584, -584, 57 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 8, 9, 10, 11, 12, 13, 14, 15, 111, - 112, 113, 633, 114, 115, 116, 117, 118, 613, 681, - 577, 119, 120, 121, 122, 123, 124, 603, 125, 438, - 126, 534, 127, 529, 128, 621, 129, 130, 131, 436, - 132, 133, 134, 135, 136, 145, 500, 460, 282, 434, - 586, 620, 669, 146, 656, 302, 143, 144, 675, 688, - 441, 138, 637, 291, 671, 616, 515, 522, 445, 506, - 517, 410, 284, 172, 174, 262, 200, 326, 329, 323, - 450, 307, 308, 309, 591, 310, 311, 312, 542, 543, - 147, 148, 532, 533, 626, 461, 629, 139, 63, 64, - 466, 396, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 177, 75, 165, 265, 415, 140, 567, 192, - 76, 547, 510, 570, 571, 421, 422, 274, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 156 + 112, 113, 635, 114, 115, 116, 117, 118, 613, 683, + 578, 119, 120, 121, 122, 123, 124, 603, 125, 439, + 126, 535, 127, 530, 128, 621, 129, 130, 131, 437, + 132, 133, 134, 135, 136, 145, 501, 461, 282, 435, + 587, 620, 671, 146, 658, 302, 143, 144, 677, 690, + 442, 138, 639, 291, 673, 616, 516, 523, 446, 507, + 518, 411, 284, 172, 174, 262, 200, 327, 330, 324, + 451, 307, 308, 309, 310, 628, 311, 312, 313, 543, + 544, 147, 148, 533, 534, 626, 462, 631, 139, 63, + 64, 467, 397, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 177, 75, 165, 265, 416, 140, 568, + 192, 76, 548, 511, 571, 572, 422, 423, 274, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 156 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -686,111 +687,77 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 61, 149, 155, 191, 331, 167, 168, 87, 201, 61, - 285, 514, 462, 287, 152, 137, 152, 617, 152, 62, - 152, 152, 214, 20, 215, 170, -61, 347, 62, 346, - 152, 152, 330, 638, 20, 197, 86, 185, 16, 190, - 288, 20, 61, 501, 187, 152, 195, 152, 271, 473, - 254, 20, 255, 673, 502, 22, 86, 565, 153, 24, - 153, 62, 153, 178, 153, 153, 179, 166, 566, 208, - 183, 267, 268, 184, 153, 153, 478, 508, 154, 213, - 186, 150, 158, 219, 160, 161, 151, 516, 173, 193, - 674, 153, 524, 525, 175, 176, 283, 280, 198, 181, - -323, 17, 222, 199, -361, 253, -361, 198, -363, 194, - -363, 196, 199, 386, 387, 254, 388, 255, 691, 389, - 698, 263, -322, 390, 465, -324, 290, 391, 392, 191, - 475, 217, 218, 266, 492, -365, 275, 213, 306, 509, - 272, 318, 319, 216, 301, 545, 264, -61, 343, 344, - 273, 20, 211, 212, 191, 22, 494, 163, 269, 24, - 393, 496, 325, 328, 328, 190, 303, 164, 340, 341, - 304, 220, 221, 321, 305, 61, 61, 336, 261, -326, - 578, 260, 152, -325, 458, 474, 394, 334, 437, 281, - 190, 439, 289, 339, 62, 62, 1, 2, 3, 4, - 5, 6, 7, 317, 209, 210, 211, 212, -369, 252, - 209, 210, 211, 212, 209, 210, 211, 212, 349, 350, - 351, 352, 286, 354, 355, 357, 193, -361, 550, -361, - 634, 635, 270, 610, 611, 395, 209, 210, 211, 212, - 276, 209, 210, 211, 212, 407, 342, 556, 292, 277, - 425, 426, 409, 278, -363, 414, -363, 209, 210, 211, - 212, 279, 399, 400, 401, 402, 403, 404, 405, 406, - 503, 299, 627, 293, 645, 514, 294, 295, 296, 297, - 491, 256, 298, 257, 258, 440, 259, 464, 313, 322, - 324, 479, 397, 598, 327, 548, 332, 335, 333, 224, - 661, 347, 442, 442, 442, 446, 442, 442, 209, 210, - 211, 212, 424, 337, 493, 463, 328, 345, 408, 411, - 677, 412, 61, 454, 413, 435, 495, 209, 210, 211, - 212, 209, 210, 211, 212, 209, 210, 211, 212, 418, - 452, 62, 247, 643, 429, 248, 249, 250, 251, 252, - 449, 470, 209, 210, 211, 212, 472, 457, 497, 459, - 469, 416, 417, 419, 471, 427, 428, 468, 430, 431, - 432, 433, -126, 209, 210, 211, 212, 666, 667, 668, - -369, -369, -369, 251, 252, 152, 209, 210, 211, 212, - 555, 473, 590, 679, 680, 483, 480, 481, 209, 210, - 211, 212, 328, 489, 488, 484, 425, 426, 443, 444, - 86, 447, 448, 692, 485, 20, 622, 513, 526, 486, - 191, 695, 499, 504, 482, 507, 507, 505, 512, 153, - 209, 210, 211, 212, 530, 528, 518, 535, 536, 446, - 523, 507, 507, -61, 540, 544, 623, 224, 225, 226, - 541, 554, 552, 559, 546, 150, 190, 560, 561, 511, - 151, 562, 209, 210, 211, 212, 568, 20, 424, 573, - 576, 293, 558, 569, 294, 295, 296, 297, 575, 61, - 298, 579, 551, 244, 245, 246, 209, 210, 211, 212, - 247, 580, 581, 248, 249, 250, 251, 252, 62, 587, - 582, 209, 210, 211, 212, 209, 210, 211, 212, 584, - 224, 225, 226, 589, 595, 597, 600, 585, 601, 325, - 602, 520, 608, 348, 328, 614, 609, 527, 615, 507, - 531, 625, 628, 209, 210, 211, 212, 599, 456, 630, - 631, 191, 467, 651, 61, 243, 244, 245, 246, 572, - 531, 640, 641, 247, 596, 642, 248, 249, 250, 251, - 252, 606, 607, 62, 209, 210, 211, 212, 612, 209, - 210, 211, 212, 624, 618, 619, 660, 190, 328, 664, - 18, 665, 507, 507, 670, 678, 20, 632, 683, 685, - 22, 563, 686, 564, 24, 689, 636, 636, 699, 142, - 420, 476, 290, 300, 574, 521, 490, 644, 646, 647, - 648, 696, 588, 654, 650, 455, 451, 658, 594, 537, - 652, 655, 523, 507, 316, 423, 539, 659, 209, 210, - 211, 212, 519, 0, 662, 663, 290, 290, 290, 209, - 210, 211, 212, 0, 0, 0, 0, 0, 639, 507, - 0, 224, 290, 290, 0, 0, 0, 604, 682, 0, - 649, 0, 0, 0, 687, 538, 684, 0, 0, 507, - 693, 690, 290, 0, 0, 0, 549, 0, 0, 0, - 290, 513, 694, 157, 636, 159, 0, 0, 162, 246, - 169, 171, 700, 0, 247, 0, 0, 248, 249, 250, - 251, 252, 0, 180, 0, 0, 182, 0, 0, 0, - 188, 0, -13, 88, 0, 531, 0, 202, 203, 204, - 205, 206, 18, 86, 0, 19, 0, 0, 20, 0, - 0, 21, 22, 23, 89, 0, 24, 25, 90, 91, - 92, 26, 27, 93, 94, 0, 0, 95, 96, 97, - 98, 0, 99, 100, 101, 102, 0, 0, 103, 28, - 29, 104, 105, 106, 30, 31, 107, 32, 33, 34, - 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, - 108, 141, 0, 44, 0, 109, 45, 46, 47, 48, - 49, 50, 0, 0, 0, 51, 52, 53, 0, 0, - 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, - 54, 0, 0, 0, 223, 0, 0, 0, 0, 0, - 0, 0, 224, 225, 226, 315, 209, 210, 211, 212, - 0, 55, 56, 0, 57, 227, 58, 59, 0, 0, - 0, 228, 229, 230, 60, 231, 232, 233, 234, 235, - 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - 246, 0, 0, 557, 0, 247, 0, 0, 248, 249, - 250, 251, 252, 0, 0, 353, 0, 0, 0, 0, - 0, 358, 0, 0, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - -3, 88, 0, 385, 0, 0, 0, 0, 0, 0, - 18, 86, 0, 19, 0, 0, 20, 0, 0, 21, - 22, 23, 89, 0, 24, 25, 90, 91, 92, 26, - 27, 93, 94, 0, 0, 95, 96, 97, 98, 0, - 99, 100, 101, 102, 0, 0, 103, 28, 29, 104, - 105, 106, 30, 31, 107, 32, 33, 34, 35, 36, - 37, 0, 38, 39, 40, 41, 42, 43, 108, 141, - 0, 44, 0, 109, 45, 46, 47, 48, 49, 50, - 0, 0, 0, 51, 52, 53, 0, 0, 0, 0, - 0, 110, 0, 0, 0, 0, 0, 0, 54, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 88, 55, - 56, 0, 57, 0, 58, 59, 0, 18, 86, 498, - 19, 0, 60, 20, 0, 0, 21, 22, 23, 89, + 61, 149, 331, 515, 285, 191, 167, 87, 332, 61, + 201, 137, 168, 214, 152, 215, 152, 463, 152, 617, + 152, 152, 155, -61, 640, 170, 62, 20, 287, 20, + 152, 152, 16, 347, 288, 62, 283, 17, 348, 190, + 185, 271, 61, 475, 187, 152, 195, 152, 254, -150, + 255, 675, 474, 303, 153, 197, 153, 304, 153, 479, + 153, 153, 86, 166, -363, 20, -363, 20, 62, 22, + 153, 153, 267, 24, 86, 154, 208, 179, 268, 158, + 178, 160, 161, 186, 183, 193, 466, 153, 676, 184, + 198, 175, 176, 502, 213, 199, 293, 280, 566, 294, + 295, 296, 297, 476, 503, 298, 194, 150, 196, 567, + 219, -325, 151, 700, 261, 209, 210, 211, 212, 173, + 213, 693, -365, -326, -365, -324, 290, 493, 546, 266, + 181, 191, 275, 272, 216, 305, 495, 509, 306, -328, + 301, 198, 319, 273, -61, 510, 199, 517, 320, 253, + 344, 345, 525, 526, 497, 459, 191, 222, 209, 210, + 211, 212, 326, 329, 329, 190, 209, 210, 211, 212, + 254, 163, 255, 217, 218, 61, 61, 337, 551, -367, + 322, 164, 152, 209, 210, 211, 212, 260, 341, 342, + 190, -363, 263, -363, 335, -126, 281, -327, 557, 318, + 340, 62, 62, 438, 220, 221, 440, 209, 210, 211, + 212, 645, 209, 210, 211, 212, 209, 210, 211, 212, + 444, 445, 193, 448, 449, 350, 351, 352, 353, 264, + 355, 356, 358, 269, 209, 210, 211, 212, 20, 86, + 579, 504, 22, 343, 20, 408, 24, 668, 669, 670, + 289, 426, 410, 483, 286, 415, 270, 427, 209, 210, + 211, 212, 598, 681, 682, 492, 211, 212, 515, 400, + 401, 402, 403, 404, 405, 406, 407, 627, 209, 210, + 211, 212, 494, 694, 150, 441, 480, 276, 398, 151, + 465, 697, 277, 610, 611, 496, 292, 417, 418, 420, + 549, 428, 429, 498, 431, 432, 433, 434, 425, 443, + 443, 443, 447, 443, 443, 387, 388, 329, 389, 556, + -365, 390, -365, 61, 256, 391, 257, -371, 252, 392, + 393, 455, 258, 647, 259, 278, 464, 209, 210, 211, + 212, 279, 209, 210, 211, 212, 299, 636, 637, 62, + 314, 323, 224, 225, 209, 210, 211, 212, 325, 471, + 334, 663, 394, 591, 473, 328, 333, 209, 210, 211, + 212, 336, 338, 346, 348, 209, 210, 211, 212, 409, + 414, 679, 224, 412, 413, 419, 152, 430, 395, 245, + 246, 209, 210, 211, 212, 247, 436, 452, 248, 249, + 250, 251, 252, 329, 481, 482, 450, 453, 426, 458, + 469, 470, 489, 460, 427, 472, 484, 623, 514, 527, + 246, 622, 474, 191, 485, 247, 153, 224, 248, 249, + 250, 251, 252, 508, 508, 486, 293, 396, 487, 294, + 295, 296, 297, 490, 519, 298, 500, 447, 524, 508, + 508, 542, 505, 529, 506, 547, 512, 190, 521, 209, + 210, 211, 212, 513, 528, 425, 531, 532, 536, -61, + 247, 541, 545, 248, 249, 250, 251, 252, 553, 560, + 61, 555, 209, 210, 211, 212, 561, 532, 562, 563, + 552, 569, 588, 559, 570, 20, 349, 576, 209, 210, + 211, 212, 606, 607, 574, 577, 62, 580, 581, 612, + 209, 210, 211, 212, 582, 618, 619, 583, 586, 457, + 326, 585, 590, 593, 595, 329, 601, 600, 564, 597, + 565, 209, 210, 211, 212, 633, 608, 508, 602, 609, + 625, 575, 672, 614, 191, 61, 573, 468, 648, 649, + 650, 615, 630, 632, 652, 642, 643, 644, 599, 653, + 666, 662, 596, 667, 209, 210, 211, 212, 477, 661, + 687, 62, 680, 685, 624, 688, 664, 665, 190, 329, + 209, 210, 211, 212, 691, 701, 142, 634, 646, 300, + 508, 508, 522, 698, 604, 589, 638, 638, 537, 456, + 684, 491, 290, 538, 209, 210, 211, 212, 209, 210, + 211, 212, 18, 692, 594, 656, 654, 539, 20, 660, + 317, 540, 22, 657, 696, 520, 24, 0, 424, 524, + 508, 0, 421, 0, 702, 0, 0, 0, 290, 290, + 290, 550, 0, 0, 641, 558, -371, -371, -371, 251, + 252, 532, 0, 0, 290, 290, 651, 157, 508, 159, + 0, 0, 162, 0, 169, 171, 689, 0, 686, 0, + 0, 0, 695, 0, 290, 0, 0, 180, 508, 0, + 182, 0, 290, 514, 188, 0, 638, -13, 88, 0, + 0, 202, 203, 204, 205, 206, 0, 18, 86, 0, + 19, 0, 0, 20, 0, 0, 21, 22, 23, 89, 0, 24, 25, 90, 91, 92, 26, 27, 93, 94, 0, 0, 95, 96, 97, 98, 0, 99, 100, 101, 102, 0, 0, 103, 28, 29, 104, 105, 106, 30, @@ -798,17 +765,51 @@ static const yytype_int16 yytable[] = 39, 40, 41, 42, 43, 108, 141, 0, 44, 0, 109, 45, 46, 47, 48, 49, 50, 0, 0, 0, 51, 52, 53, 0, 0, 0, 0, 0, 110, 0, - 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, - 0, 0, 223, 0, 0, 0, 0, 0, 0, 553, - 224, 225, 226, 0, 0, 0, 55, 56, 0, 57, + 0, 0, 0, 0, 0, 54, 1, 2, 3, 4, + 5, 6, 7, 0, 224, 225, 226, 0, 0, 316, + 0, 0, 0, 0, 0, 0, 55, 56, 0, 57, 0, 58, 59, 0, 0, 0, 0, 0, 0, 60, - 0, 230, 0, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, 244, 245, 246, 0, - 0, 0, 0, 247, 0, 0, 248, 249, 250, 251, - 252, 88, 0, 0, 0, 0, 0, 592, 593, 0, - 18, 86, 583, 19, 0, 0, 20, 0, 0, 21, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 0, 0, 0, 0, 247, 0, 0, + 248, 249, 250, 251, 252, 0, 0, 0, 0, 354, + 0, 0, 0, 0, 0, 359, 0, 0, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, -3, 88, 0, 386, 0, 0, + 0, 0, 0, 0, 18, 86, 0, 19, 0, 0, + 20, 0, 0, 21, 22, 23, 89, 0, 24, 25, + 90, 91, 92, 26, 27, 93, 94, 0, 0, 95, + 96, 97, 98, 0, 99, 100, 101, 102, 0, 0, + 103, 28, 29, 104, 105, 106, 30, 31, 107, 32, + 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, + 42, 43, 108, 141, 0, 44, 0, 109, 45, 46, + 47, 48, 49, 50, 0, 0, 0, 51, 52, 53, + 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, + 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 88, 55, 56, 0, 57, 0, 58, 59, + 0, 18, 86, 499, 19, 0, 60, 20, 0, 0, + 21, 22, 23, 89, 0, 24, 25, 90, 91, 92, + 26, 27, 93, 94, 0, 0, 95, 96, 97, 98, + 0, 99, 100, 101, 102, 0, 0, 103, 28, 29, + 104, 105, 106, 30, 31, 107, 32, 33, 34, 35, + 36, 37, 0, 38, 39, 40, 41, 42, 43, 108, + 141, 0, 44, 0, 109, 45, 46, 47, 48, 49, + 50, 0, 0, 0, 51, 52, 53, 0, 0, 0, + 0, 0, 110, 0, 0, 0, 0, 0, 0, 54, + 0, 0, 0, 0, 0, 0, 0, 223, 0, 0, + 0, 0, 0, 0, 554, 224, 225, 226, 0, 0, + 55, 56, 0, 57, 0, 58, 59, 0, 227, 0, + 224, 225, 226, 60, 228, 229, 230, 478, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 0, 0, 0, 0, 247, 0, + 0, 248, 249, 250, 251, 252, 244, 245, 246, 0, + 0, 0, 592, 247, 0, 0, 248, 249, 250, 251, + 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 88, 0, 0, 0, 0, 0, 0, 0, 0, + 18, 86, 584, 19, 605, 0, 20, 0, 0, 21, 22, 23, 89, 0, 24, 25, 90, 91, 92, 26, - 27, 93, 94, 0, 0, 95, 96, 97, 98, 605, + 27, 93, 94, 0, 0, 95, 96, 97, 98, 629, 99, 100, 101, 102, 0, 0, 103, 28, 29, 104, 105, 106, 30, 31, 107, 32, 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, 108, 141, @@ -817,7 +818,7 @@ static const yytype_int16 yytable[] = 0, 110, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 55, - 56, 0, 57, 0, 58, 59, 0, 18, 86, 653, + 56, 0, 57, 0, 58, 59, 0, 18, 86, 655, 19, 0, 60, 20, 0, 0, 21, 22, 23, 89, 0, 24, 25, 90, 91, 92, 26, 27, 93, 94, 0, 0, 95, 96, 97, 98, 0, 99, 100, 101, @@ -829,7 +830,7 @@ static const yytype_int16 yytable[] = 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 55, 56, 0, 57, - 0, 58, 59, 0, 18, 86, 657, 19, 0, 60, + 0, 58, 59, 0, 18, 86, 659, 19, 0, 60, 20, 0, 0, 21, 22, 23, 89, 0, 24, 25, 90, 91, 92, 26, 27, 93, 94, 0, 0, 95, 96, 97, 98, 0, 99, 100, 101, 102, 0, 0, @@ -841,7 +842,7 @@ static const yytype_int16 yytable[] = 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 55, 56, 0, 57, 0, 58, 59, - 0, 18, 86, 672, 19, 0, 60, 20, 0, 0, + 0, 18, 86, 674, 19, 0, 60, 20, 0, 0, 21, 22, 23, 89, 0, 24, 25, 90, 91, 92, 26, 27, 93, 94, 0, 0, 95, 96, 97, 98, 0, 99, 100, 101, 102, 0, 0, 103, 28, 29, @@ -853,7 +854,7 @@ static const yytype_int16 yytable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 55, 56, 0, 57, 0, 58, 59, 0, 18, 86, - 676, 19, 0, 60, 20, 0, 0, 21, 22, 23, + 678, 19, 0, 60, 20, 0, 0, 21, 22, 23, 89, 0, 24, 25, 90, 91, 92, 26, 27, 93, 94, 0, 0, 95, 96, 97, 98, 0, 99, 100, 101, 102, 0, 0, 103, 28, 29, 104, 105, 106, @@ -872,7 +873,7 @@ static const yytype_int16 yytable[] = 32, 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, 108, 141, 0, 44, 0, 109, 45, 46, 47, 48, 49, 50, 0, 0, 0, 51, 52, - 53, 0, 0, 697, 0, 0, 110, 0, 0, 0, + 53, 0, 0, 699, 0, 0, 110, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 55, 56, 0, 57, 0, 58, @@ -949,23 +950,23 @@ static const yytype_int16 yytable[] = 21, 22, 23, 0, 0, 24, 25, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, 57, 0, 58, 59, 0, 0, 28, 29, - 0, 320, 60, 30, 31, 0, 32, 33, 34, 35, + 0, 321, 60, 30, 31, 0, 32, 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, 0, 0, 0, 44, 0, 0, 45, 46, 47, 48, 49, 50, 0, 0, 0, 51, 52, 53, 0, 0, 0, - 0, 0, -368, 254, 0, 255, 0, 0, -368, 54, - 0, -368, -368, -368, 0, 0, -368, -368, 0, 0, - 0, -368, -368, 0, 0, 0, 0, 0, 0, 0, - 55, 56, 0, 57, 0, 58, 59, 0, 0, -368, - -368, 0, 338, 60, -368, -368, 0, -368, -368, -368, - -368, -368, -368, 0, -368, -368, -368, -368, -368, -368, - 0, 0, 0, -368, 0, 0, -368, -368, -368, -368, - -368, -368, 0, 0, 0, -368, -368, -368, 0, 0, + 0, 0, -370, 254, 0, 255, 0, 0, -370, 54, + 0, -370, -370, -370, 0, 0, -370, -370, 0, 0, + 0, -370, -370, 0, 0, 0, 0, 0, 0, 0, + 55, 56, 0, 57, 0, 58, 59, 0, 0, -370, + -370, 0, 339, 60, -370, -370, 0, -370, -370, -370, + -370, -370, -370, 0, -370, -370, -370, -370, -370, -370, + 0, 0, 0, -370, 0, 0, -370, -370, -370, -370, + -370, -370, 0, 0, 0, -370, -370, -370, 0, 0, 0, 0, 0, 18, 0, 0, 19, 0, 0, 20, - -368, 0, 21, 22, 23, 0, 0, 24, 25, 0, + -370, 0, 21, 22, 23, 0, 0, 24, 25, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, - 0, -368, -368, 0, -368, 0, -368, -368, 0, 0, - 28, 29, 0, 0, -368, 30, 31, 0, 32, 33, + 0, -370, -370, 0, -370, 0, -370, -370, 0, 0, + 28, 29, 0, 0, -370, 30, 31, 0, 32, 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, 0, 0, 0, 44, 0, 0, 45, 46, 47, 48, 49, 50, 0, 0, 0, 51, 52, 53, 0, @@ -973,7 +974,7 @@ static const yytype_int16 yytable[] = 20, 54, 0, 21, 22, 23, 0, 0, 24, 25, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, 57, 0, 58, 59, 0, - 0, 28, 29, 0, 356, 60, 30, 31, 0, 32, + 0, 28, 29, 0, 357, 60, 30, 31, 0, 32, 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, 0, 0, 0, 44, 0, 0, 45, 46, 47, 48, 49, 50, 0, 0, 0, 51, 52, 53, @@ -981,7 +982,7 @@ static const yytype_int16 yytable[] = 0, 20, 54, 0, 21, 22, 23, 0, 0, 24, 25, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, 57, 0, 58, 59, - 0, 0, 28, 29, 0, 398, 60, 30, 31, 0, + 0, 0, 28, 29, 0, 399, 60, 30, 31, 0, 32, 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, 0, 0, 0, 44, 0, 0, 45, 46, 47, 48, 49, 50, 0, 0, 0, 51, 52, @@ -989,7 +990,7 @@ static const yytype_int16 yytable[] = 0, 0, 20, 54, 0, 21, 22, 23, 0, 0, 24, 25, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, 57, 0, 58, - 59, 0, 0, 28, 29, 0, 453, 60, 30, 31, + 59, 0, 0, 28, 29, 0, 454, 60, 30, 31, 0, 32, 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, 0, 0, 0, 44, 0, 0, 45, 46, 47, 48, 49, 50, 0, 0, 0, 51, @@ -997,7 +998,7 @@ static const yytype_int16 yytable[] = 19, 0, 0, 20, 54, 0, 21, 22, 23, 0, 0, 24, 25, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, 57, 0, - 58, 59, 0, 0, 28, 29, 0, 487, 60, 30, + 58, 59, 0, 0, 28, 29, 0, 488, 60, 30, 31, 0, 32, 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, 0, 0, 0, 44, 0, 0, 45, 46, 47, 48, 49, 50, 0, 0, 0, @@ -1009,167 +1010,134 @@ static const yytype_int16 yytable[] = 30, 31, 0, 32, 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, 0, 0, 0, 44, 0, 0, 45, 46, 47, 48, 49, 50, 0, 0, - 0, 51, 52, 53, 0, 0, 0, 0, 0, -367, - 0, 0, -367, 0, 0, -367, 54, 0, -367, -367, - -367, 0, 0, -367, -367, 0, 0, 0, -367, -367, + 0, 51, 52, 53, 0, 0, 0, 0, 0, -369, + 0, 0, -369, 0, 0, -369, 54, 0, -369, -369, + -369, 0, 0, -369, -369, 0, 0, 0, -369, -369, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, - 57, 0, 58, 59, 0, 0, -367, -367, 0, 0, - 314, -367, -367, 0, -367, -367, -367, -367, -367, -367, - 0, -367, -367, -367, -367, -367, -367, 0, 0, 0, - -367, 0, 0, -367, -367, -367, -367, -367, -367, 0, - 0, 0, -367, -367, -367, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -367, 0, 0, - 0, 0, 0, 0, 0, 223, 0, 0, 0, 0, - 0, 0, 0, 224, 225, 226, 0, 0, -367, -367, - 0, -367, 0, -367, -367, 0, 227, 0, 0, 0, - 0, -367, 228, 229, 230, 477, 231, 232, 233, 234, + 57, 0, 58, 59, 0, 0, -369, -369, 0, 0, + 315, -369, -369, 0, -369, -369, -369, -369, -369, -369, + 0, -369, -369, -369, -369, -369, -369, 0, 0, 0, + -369, 0, 0, -369, -369, -369, -369, -369, -369, 0, + 0, 0, -369, -369, -369, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -369, 0, 0, + 0, 223, 0, 0, 0, 0, 0, 0, 0, 224, + 225, 226, 0, 0, 0, 0, 0, 0, -369, -369, + 0, -369, 227, -369, -369, 0, 0, 0, 228, 229, + 230, -369, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 0, 0, + 0, 0, 247, 223, 0, 248, 249, 250, 251, 252, + 0, 224, 225, 226, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -371, 0, 0, 0, 0, 0, + 228, 229, 230, 0, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 0, 0, 0, 0, 247, 223, 0, 248, 249, 250, + 251, 252, 0, 224, 225, 226, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 228, 229, 230, 0, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 0, 0, 0, 0, 247, 223, 0, 248, 249, 250, 251, 252, 0, 224, 225, 226, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -369, 0, - 0, 0, 0, 0, 228, 229, 230, 0, 231, 232, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 230, 0, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 0, 0, 0, 0, 247, 223, + 243, 244, 245, 246, 0, 0, 0, 0, 247, -371, 0, 248, 249, 250, 251, 252, 0, 224, 225, 226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 228, 229, 230, 0, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 0, 0, 0, 0, - 247, -369, 0, 248, 249, 250, 251, 252, 0, 224, - 225, 226, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 245, 246, 224, 225, - 226, 0, 247, 0, 0, 248, 249, 250, 251, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 224, 225, 226, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 0, 0, 0, - 0, 247, 0, 0, 248, 249, 250, 251, 252, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - 224, 225, 226, 0, 247, 0, 0, 248, 249, 250, - 251, 252, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 224, 225, 226, 0, 0, 0, 0, 0, 237, - 238, 239, 240, 241, 242, 243, 244, 245, 246, 0, - 224, 225, 226, 247, 0, 0, 248, 249, 250, 251, - 252, 238, 239, 240, 241, 242, 243, 244, 245, 246, - 224, 225, 226, 0, 247, 0, 0, 248, 249, 250, - 251, 252, 240, 241, 242, 243, 244, 245, 246, 224, - 225, 226, 0, 247, 0, 0, 248, 249, 250, 251, - 252, 0, 0, 0, 242, 243, 244, 245, 246, 224, - 225, 0, 0, 247, 0, 0, 248, 249, 250, 251, - 252, 0, 0, -369, 243, 244, 245, 246, 0, 0, - 0, 0, 247, 0, 0, 248, 249, 250, 251, 252, - 0, 0, 0, 0, 0, 0, 245, 246, 0, 0, - 0, 0, 247, 0, 0, 248, 249, 250, 251, 252 + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 224, 225, 226, 0, + 247, 0, 0, 248, 249, 250, 251, 252, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 224, 225, + 226, 0, 0, 0, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 0, 224, 225, 226, 247, + 0, 0, 248, 249, 250, 251, 252, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 224, 225, 226, + 0, 247, 0, 0, 248, 249, 250, 251, 252, 0, + 242, 243, 244, 245, 246, 0, 224, 225, 226, 247, + 0, 0, 248, 249, 250, 251, 252, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 224, 225, 226, 0, + 247, 0, 0, 248, 249, 250, 251, 252, 240, 241, + 242, 243, 244, 245, 246, 224, 225, 226, 0, 247, + 0, 0, 248, 249, 250, 251, 252, 0, 0, 0, + -371, 243, 244, 245, 246, 0, 0, 0, 0, 247, + 0, 0, 248, 249, 250, 251, 252, 0, 0, 0, + 243, 244, 245, 246, 0, 0, 0, 0, 247, 0, + 0, 248, 249, 250, 251, 252 }; static const yytype_int16 yycheck[] = { - 10, 17, 19, 49, 175, 27, 27, 11, 54, 19, - 105, 427, 330, 110, 18, 12, 20, 580, 22, 10, - 24, 25, 11, 16, 13, 29, 11, 13, 19, 200, - 34, 35, 174, 607, 16, 52, 11, 89, 0, 49, - 135, 16, 52, 11, 48, 49, 50, 51, 30, 13, - 11, 16, 13, 22, 22, 20, 11, 11, 18, 24, - 20, 52, 22, 13, 24, 25, 132, 27, 22, 60, - 132, 93, 93, 132, 34, 35, 25, 417, 18, 15, - 132, 56, 22, 112, 24, 25, 61, 427, 31, 49, - 59, 51, 432, 433, 34, 35, 103, 101, 56, 42, - 86, 9, 110, 61, 11, 132, 13, 56, 11, 49, - 13, 51, 61, 10, 11, 11, 13, 13, 681, 16, - 694, 56, 86, 20, 14, 86, 136, 24, 25, 175, - 14, 112, 113, 93, 14, 11, 96, 15, 148, 132, - 122, 163, 163, 132, 141, 23, 56, 132, 194, 195, - 132, 16, 96, 97, 200, 20, 14, 122, 132, 24, - 57, 14, 172, 173, 174, 175, 16, 132, 185, 186, - 20, 110, 111, 164, 24, 185, 186, 181, 86, 86, - 520, 11, 186, 86, 326, 22, 83, 178, 285, 11, - 200, 288, 39, 184, 185, 186, 3, 4, 5, 6, - 7, 8, 9, 163, 94, 95, 96, 97, 129, 130, - 94, 95, 96, 97, 94, 95, 96, 97, 209, 210, - 211, 212, 22, 214, 215, 216, 186, 11, 14, 13, - 33, 34, 132, 573, 574, 132, 94, 95, 96, 97, - 132, 94, 95, 96, 97, 261, 186, 14, 22, 132, - 272, 272, 262, 132, 11, 265, 13, 94, 95, 96, - 97, 132, 253, 254, 255, 256, 257, 258, 259, 260, - 412, 22, 590, 32, 614, 691, 35, 36, 37, 38, - 22, 11, 41, 13, 11, 289, 13, 333, 14, 86, - 70, 386, 252, 14, 86, 466, 132, 131, 89, 80, - 640, 13, 293, 294, 295, 296, 297, 298, 94, 95, - 96, 97, 272, 131, 22, 332, 326, 22, 56, 56, - 660, 56, 332, 314, 86, 44, 22, 94, 95, 96, - 97, 94, 95, 96, 97, 94, 95, 96, 97, 122, - 15, 332, 123, 612, 132, 126, 127, 128, 129, 130, - 61, 342, 94, 95, 96, 97, 347, 59, 22, 59, - 131, 269, 270, 271, 12, 273, 274, 90, 276, 277, - 278, 279, 131, 94, 95, 96, 97, 646, 647, 648, - 126, 127, 128, 129, 130, 389, 94, 95, 96, 97, - 22, 13, 534, 662, 663, 25, 387, 388, 94, 95, - 96, 97, 412, 132, 395, 25, 428, 428, 294, 295, - 11, 297, 298, 682, 25, 16, 587, 427, 434, 25, - 466, 690, 18, 59, 25, 416, 417, 99, 132, 389, - 94, 95, 96, 97, 22, 56, 427, 99, 99, 430, - 431, 432, 433, 11, 132, 131, 588, 80, 81, 82, - 460, 132, 12, 12, 464, 56, 466, 12, 12, 419, - 61, 12, 94, 95, 96, 97, 131, 16, 428, 132, - 22, 32, 489, 131, 35, 36, 37, 38, 131, 489, - 41, 131, 473, 116, 117, 118, 94, 95, 96, 97, - 123, 131, 131, 126, 127, 128, 129, 130, 489, 56, - 131, 94, 95, 96, 97, 94, 95, 96, 97, 132, - 80, 81, 82, 11, 11, 90, 12, 527, 131, 529, - 22, 429, 15, 131, 534, 132, 131, 435, 131, 520, - 438, 22, 131, 94, 95, 96, 97, 554, 131, 131, - 88, 587, 131, 22, 554, 115, 116, 117, 118, 509, - 458, 132, 131, 123, 545, 131, 126, 127, 128, 129, - 130, 568, 569, 554, 94, 95, 96, 97, 575, 94, - 95, 96, 97, 589, 581, 582, 132, 587, 588, 22, - 10, 131, 573, 574, 45, 131, 16, 603, 131, 17, - 20, 499, 87, 501, 24, 131, 606, 607, 131, 13, - 30, 131, 612, 141, 512, 430, 131, 613, 615, 616, - 617, 691, 529, 629, 621, 316, 307, 633, 540, 452, - 623, 631, 613, 614, 163, 272, 458, 634, 94, 95, - 96, 97, 428, -1, 641, 642, 646, 647, 648, 94, - 95, 96, 97, -1, -1, -1, -1, -1, 608, 640, - -1, 80, 662, 663, -1, -1, -1, 565, 665, -1, - 620, -1, -1, -1, 674, 131, 670, -1, -1, 660, - 686, 678, 682, -1, -1, -1, 131, -1, -1, -1, - 690, 691, 689, 21, 694, 23, -1, -1, 26, 118, - 28, 29, 699, -1, 123, -1, -1, 126, 127, 128, - 129, 130, -1, 41, -1, -1, 44, -1, -1, -1, - 48, -1, 0, 1, -1, 623, -1, 55, 56, 57, - 58, 59, 10, 11, -1, 13, -1, -1, 16, -1, - -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, -1, -1, 35, 36, 37, - 38, -1, 40, 41, 42, 43, -1, -1, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, -1, 62, 63, 64, 65, 66, 67, - 68, 69, -1, 71, -1, 73, 74, 75, 76, 77, - 78, 79, -1, -1, -1, 83, 84, 85, -1, -1, - -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, - 98, -1, -1, -1, 72, -1, -1, -1, -1, -1, - -1, -1, 80, 81, 82, 163, 94, 95, 96, 97, - -1, 119, 120, -1, 122, 93, 124, 125, -1, -1, - -1, 99, 100, 101, 132, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, -1, -1, 131, -1, 123, -1, -1, 126, 127, - 128, 129, 130, -1, -1, 213, -1, -1, -1, -1, - -1, 219, -1, -1, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - 0, 1, -1, 251, -1, -1, -1, -1, -1, -1, - 10, 11, -1, 13, -1, -1, 16, -1, -1, 19, - 20, 21, 22, -1, 24, 25, 26, 27, 28, 29, - 30, 31, 32, -1, -1, 35, 36, 37, 38, -1, - 40, 41, 42, 43, -1, -1, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, -1, 62, 63, 64, 65, 66, 67, 68, 69, - -1, 71, -1, 73, 74, 75, 76, 77, 78, 79, - -1, -1, -1, 83, 84, 85, -1, -1, -1, -1, - -1, 91, -1, -1, -1, -1, -1, -1, 98, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 1, 119, - 120, -1, 122, -1, 124, 125, -1, 10, 11, 12, - 13, -1, 132, 16, -1, -1, 19, 20, 21, 22, + 10, 17, 174, 428, 105, 49, 27, 11, 175, 19, + 54, 12, 27, 11, 18, 13, 20, 331, 22, 581, + 24, 25, 19, 11, 607, 29, 10, 16, 110, 16, + 34, 35, 0, 200, 135, 19, 103, 9, 13, 49, + 89, 30, 52, 22, 48, 49, 50, 51, 11, 16, + 13, 22, 13, 20, 18, 52, 20, 24, 22, 25, + 24, 25, 11, 27, 11, 16, 13, 16, 52, 20, + 34, 35, 93, 24, 11, 18, 60, 132, 93, 22, + 13, 24, 25, 132, 132, 49, 14, 51, 59, 132, + 56, 34, 35, 11, 15, 61, 32, 101, 11, 35, + 36, 37, 38, 14, 22, 41, 49, 56, 51, 22, + 112, 86, 61, 696, 86, 94, 95, 96, 97, 31, + 15, 683, 11, 86, 13, 86, 136, 14, 23, 93, + 42, 175, 96, 122, 132, 102, 14, 418, 148, 86, + 141, 56, 163, 132, 132, 132, 61, 428, 163, 132, + 194, 195, 433, 434, 14, 327, 200, 110, 94, 95, + 96, 97, 172, 173, 174, 175, 94, 95, 96, 97, + 11, 122, 13, 112, 113, 185, 186, 181, 14, 11, + 164, 132, 186, 94, 95, 96, 97, 11, 185, 186, + 200, 11, 56, 13, 178, 131, 11, 86, 14, 163, + 184, 185, 186, 285, 110, 111, 288, 94, 95, 96, + 97, 612, 94, 95, 96, 97, 94, 95, 96, 97, + 294, 295, 186, 297, 298, 209, 210, 211, 212, 56, + 214, 215, 216, 132, 94, 95, 96, 97, 16, 11, + 521, 413, 20, 186, 16, 261, 24, 648, 649, 650, + 39, 272, 262, 25, 22, 265, 132, 272, 94, 95, + 96, 97, 14, 664, 665, 22, 96, 97, 693, 253, + 254, 255, 256, 257, 258, 259, 260, 591, 94, 95, + 96, 97, 22, 684, 56, 289, 387, 132, 252, 61, + 334, 692, 132, 574, 575, 22, 22, 269, 270, 271, + 467, 273, 274, 22, 276, 277, 278, 279, 272, 293, + 294, 295, 296, 297, 298, 10, 11, 327, 13, 22, + 11, 16, 13, 333, 11, 20, 13, 129, 130, 24, + 25, 315, 11, 614, 13, 132, 333, 94, 95, 96, + 97, 132, 94, 95, 96, 97, 22, 33, 34, 333, + 14, 86, 80, 81, 94, 95, 96, 97, 70, 343, + 89, 642, 57, 535, 348, 86, 132, 94, 95, 96, + 97, 131, 131, 22, 13, 94, 95, 96, 97, 56, + 86, 662, 80, 56, 56, 122, 390, 132, 83, 117, + 118, 94, 95, 96, 97, 123, 44, 16, 126, 127, + 128, 129, 130, 413, 388, 389, 61, 15, 429, 59, + 90, 131, 396, 59, 429, 12, 25, 589, 428, 435, + 118, 588, 13, 467, 25, 123, 390, 80, 126, 127, + 128, 129, 130, 417, 418, 25, 32, 132, 25, 35, + 36, 37, 38, 132, 428, 41, 18, 431, 432, 433, + 434, 461, 59, 56, 99, 465, 420, 467, 430, 94, + 95, 96, 97, 132, 436, 429, 22, 439, 99, 11, + 123, 132, 131, 126, 127, 128, 129, 130, 12, 12, + 490, 132, 94, 95, 96, 97, 12, 459, 12, 12, + 474, 131, 56, 490, 131, 16, 131, 131, 94, 95, + 96, 97, 569, 570, 132, 22, 490, 131, 131, 576, + 94, 95, 96, 97, 131, 582, 583, 131, 528, 131, + 530, 132, 11, 99, 11, 535, 131, 12, 500, 90, + 502, 94, 95, 96, 97, 88, 15, 521, 22, 131, + 22, 513, 45, 132, 588, 555, 510, 131, 615, 616, + 617, 131, 131, 131, 621, 132, 131, 131, 555, 22, + 22, 132, 546, 131, 94, 95, 96, 97, 131, 636, + 17, 555, 131, 131, 590, 87, 643, 644, 588, 589, + 94, 95, 96, 97, 131, 131, 13, 603, 613, 141, + 574, 575, 431, 693, 566, 530, 606, 607, 452, 317, + 667, 131, 612, 453, 94, 95, 96, 97, 94, 95, + 96, 97, 10, 680, 541, 631, 623, 131, 16, 635, + 163, 459, 20, 633, 691, 429, 24, -1, 272, 613, + 614, -1, 30, -1, 701, -1, -1, -1, 648, 649, + 650, 131, -1, -1, 608, 131, 126, 127, 128, 129, + 130, 623, -1, -1, 664, 665, 620, 21, 642, 23, + -1, -1, 26, -1, 28, 29, 676, -1, 672, -1, + -1, -1, 688, -1, 684, -1, -1, 41, 662, -1, + 44, -1, 692, 693, 48, -1, 696, 0, 1, -1, + -1, 55, 56, 57, 58, 59, -1, 10, 11, -1, + 13, -1, -1, 16, -1, -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, -1, 35, 36, 37, 38, -1, 40, 41, 42, 43, -1, -1, 46, 47, 48, 49, 50, 51, 52, @@ -1177,17 +1145,51 @@ static const yytype_int16 yycheck[] = 63, 64, 65, 66, 67, 68, 69, -1, 71, -1, 73, 74, 75, 76, 77, 78, 79, -1, -1, -1, 83, 84, 85, -1, -1, -1, -1, -1, 91, -1, - -1, -1, -1, -1, -1, 98, -1, -1, -1, -1, - -1, -1, 72, -1, -1, -1, -1, -1, -1, 477, - 80, 81, 82, -1, -1, -1, 119, 120, -1, 122, + -1, -1, -1, -1, -1, 98, 3, 4, 5, 6, + 7, 8, 9, -1, 80, 81, 82, -1, -1, 163, + -1, -1, -1, -1, -1, -1, 119, 120, -1, 122, -1, 124, 125, -1, -1, -1, -1, -1, -1, 132, - -1, 101, -1, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, -1, - -1, -1, -1, 123, -1, -1, 126, 127, 128, 129, - 130, 1, -1, -1, -1, -1, -1, 535, 536, -1, - 10, 11, 12, 13, -1, -1, 16, -1, -1, 19, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, -1, -1, -1, -1, 123, -1, -1, + 126, 127, 128, 129, 130, -1, -1, -1, -1, 213, + -1, -1, -1, -1, -1, 219, -1, -1, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 0, 1, -1, 251, -1, -1, + -1, -1, -1, -1, 10, 11, -1, 13, -1, -1, + 16, -1, -1, 19, 20, 21, 22, -1, 24, 25, + 26, 27, 28, 29, 30, 31, 32, -1, -1, 35, + 36, 37, 38, -1, 40, 41, 42, 43, -1, -1, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, -1, 62, 63, 64, 65, + 66, 67, 68, 69, -1, 71, -1, 73, 74, 75, + 76, 77, 78, 79, -1, -1, -1, 83, 84, 85, + -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, + -1, -1, 98, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 1, 119, 120, -1, 122, -1, 124, 125, + -1, 10, 11, 12, 13, -1, 132, 16, -1, -1, + 19, 20, 21, 22, -1, 24, 25, 26, 27, 28, + 29, 30, 31, 32, -1, -1, 35, 36, 37, 38, + -1, 40, 41, 42, 43, -1, -1, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, -1, 62, 63, 64, 65, 66, 67, 68, + 69, -1, 71, -1, 73, 74, 75, 76, 77, 78, + 79, -1, -1, -1, 83, 84, 85, -1, -1, -1, + -1, -1, 91, -1, -1, -1, -1, -1, -1, 98, + -1, -1, -1, -1, -1, -1, -1, 72, -1, -1, + -1, -1, -1, -1, 478, 80, 81, 82, -1, -1, + 119, 120, -1, 122, -1, 124, 125, -1, 93, -1, + 80, 81, 82, 132, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, -1, -1, -1, -1, 123, -1, + -1, 126, 127, 128, 129, 130, 116, 117, 118, -1, + -1, -1, 536, 123, -1, -1, 126, 127, 128, 129, + 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, + 10, 11, 12, 13, 568, -1, 16, -1, -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, 28, 29, - 30, 31, 32, -1, -1, 35, 36, 37, 38, 567, + 30, 31, 32, -1, -1, 35, 36, 37, 38, 593, 40, 41, 42, 43, -1, -1, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 65, 66, 67, 68, 69, @@ -1398,48 +1400,49 @@ static const yytype_int16 yycheck[] = 71, -1, -1, 74, 75, 76, 77, 78, 79, -1, -1, -1, 83, 84, 85, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 98, -1, -1, - -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, - -1, -1, -1, 80, 81, 82, -1, -1, 119, 120, - -1, 122, -1, 124, 125, -1, 93, -1, -1, -1, - -1, 132, 99, 100, 101, 102, 103, 104, 105, 106, + -1, 72, -1, -1, -1, -1, -1, -1, -1, 80, + 81, 82, -1, -1, -1, -1, -1, -1, 119, 120, + -1, 122, 93, 124, 125, -1, -1, -1, 99, 100, + 101, 132, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, -1, -1, + -1, -1, 123, 72, -1, 126, 127, 128, 129, 130, + -1, 80, 81, 82, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, + 99, 100, 101, -1, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + -1, -1, -1, -1, 123, 72, -1, 126, 127, 128, + 129, 130, -1, 80, 81, 82, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 99, 100, 101, -1, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, -1, -1, -1, -1, 123, 72, -1, 126, 127, 128, 129, 130, -1, 80, 81, 82, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, - -1, -1, -1, -1, 99, 100, 101, -1, 103, 104, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 101, -1, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, -1, -1, -1, -1, 123, 72, -1, 126, 127, 128, 129, 130, -1, 80, 81, 82, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 99, 100, 101, -1, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, -1, -1, -1, -1, - 123, 72, -1, 126, 127, 128, 129, 130, -1, 80, - 81, 82, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 80, 81, - 82, -1, 123, -1, -1, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 80, 81, 82, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, -1, -1, -1, - -1, 123, -1, -1, 126, 127, 128, 129, 130, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 80, 81, 82, -1, 123, -1, -1, 126, 127, 128, - 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 80, 81, 82, -1, -1, -1, -1, -1, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, -1, - 80, 81, 82, 123, -1, -1, 126, 127, 128, 129, - 130, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 80, 81, 82, -1, 123, -1, -1, 126, 127, 128, - 129, 130, 112, 113, 114, 115, 116, 117, 118, 80, - 81, 82, -1, 123, -1, -1, 126, 127, 128, 129, - 130, -1, -1, -1, 114, 115, 116, 117, 118, 80, - 81, -1, -1, 123, -1, -1, 126, 127, 128, 129, - 130, -1, -1, 114, 115, 116, 117, 118, -1, -1, - -1, -1, 123, -1, -1, 126, 127, 128, 129, 130, - -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, - -1, -1, 123, -1, -1, 126, 127, 128, 129, 130 + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 80, 81, 82, -1, + 123, -1, -1, 126, 127, 128, 129, 130, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, + 82, -1, -1, -1, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, -1, 80, 81, 82, 123, + -1, -1, 126, 127, 128, 129, 130, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 80, 81, 82, + -1, 123, -1, -1, 126, 127, 128, 129, 130, -1, + 114, 115, 116, 117, 118, -1, 80, 81, 82, 123, + -1, -1, 126, 127, 128, 129, 130, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 80, 81, 82, -1, + 123, -1, -1, 126, 127, 128, 129, 130, 112, 113, + 114, 115, 116, 117, 118, 80, 81, 82, -1, 123, + -1, -1, 126, 127, 128, 129, 130, -1, -1, -1, + 114, 115, 116, 117, 118, -1, -1, -1, -1, 123, + -1, -1, 126, 127, 128, 129, 130, -1, -1, -1, + 115, 116, 117, 118, -1, -1, -1, -1, 123, -1, + -1, 126, 127, 128, 129, 130 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -1452,71 +1455,71 @@ static const yytype_int16 yystos[] = 52, 53, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 71, 74, 75, 76, 77, 78, 79, 83, 84, 85, 98, 119, 120, 122, 124, 125, - 132, 178, 230, 231, 232, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 246, 253, 261, 262, 263, - 264, 265, 266, 267, 268, 269, 11, 177, 1, 22, + 132, 178, 231, 232, 233, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 247, 254, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 11, 177, 1, 22, 26, 27, 28, 31, 32, 35, 36, 37, 38, 40, 41, 42, 43, 46, 49, 50, 51, 54, 68, 73, 91, 142, 143, 144, 146, 147, 148, 149, 150, 154, 155, 156, 157, 158, 159, 161, 163, 165, 167, 169, - 170, 171, 173, 174, 175, 176, 177, 190, 194, 230, - 250, 69, 188, 189, 190, 178, 186, 223, 224, 186, - 56, 61, 177, 262, 270, 253, 270, 244, 270, 244, - 270, 270, 244, 122, 132, 247, 262, 263, 264, 244, - 177, 244, 206, 206, 207, 270, 270, 245, 13, 132, - 244, 206, 244, 132, 132, 89, 132, 177, 244, 56, - 178, 231, 252, 262, 270, 177, 270, 253, 56, 61, - 209, 231, 244, 244, 244, 244, 244, 131, 230, 94, + 170, 171, 173, 174, 175, 176, 177, 190, 194, 231, + 251, 69, 188, 189, 190, 178, 186, 224, 225, 186, + 56, 61, 177, 263, 271, 254, 271, 245, 271, 245, + 271, 271, 245, 122, 132, 248, 263, 264, 265, 245, + 177, 245, 206, 206, 207, 271, 271, 246, 13, 132, + 245, 206, 245, 132, 132, 89, 132, 177, 245, 56, + 178, 232, 253, 263, 271, 177, 271, 254, 56, 61, + 209, 232, 245, 245, 245, 245, 245, 131, 231, 94, 95, 96, 97, 15, 11, 13, 132, 112, 113, 112, 110, 111, 110, 72, 80, 81, 82, 93, 99, 100, 101, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 123, 126, 127, 128, 129, 130, 132, 11, 13, 11, 13, 11, 13, - 11, 180, 208, 56, 56, 248, 262, 263, 264, 132, - 132, 30, 122, 132, 260, 262, 132, 132, 132, 132, + 11, 180, 208, 56, 56, 249, 263, 264, 265, 132, + 132, 30, 122, 132, 261, 263, 132, 132, 132, 132, 177, 11, 181, 181, 205, 209, 22, 205, 209, 39, 178, 196, 22, 32, 35, 36, 37, 38, 41, 22, - 189, 190, 188, 16, 20, 24, 178, 214, 215, 216, - 218, 219, 220, 14, 132, 244, 247, 262, 263, 264, - 131, 230, 86, 212, 70, 178, 210, 86, 178, 211, - 211, 252, 132, 89, 230, 131, 177, 131, 131, 230, - 253, 253, 270, 231, 231, 22, 252, 13, 131, 230, - 230, 230, 230, 244, 230, 230, 131, 230, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 244, 244, 244, 244, 244, 10, 11, 13, 16, - 20, 24, 25, 57, 83, 132, 234, 262, 131, 230, - 230, 230, 230, 230, 230, 230, 230, 186, 56, 178, - 204, 56, 56, 86, 178, 249, 180, 180, 122, 180, - 30, 258, 259, 261, 262, 263, 264, 180, 180, 132, - 180, 180, 180, 180, 182, 44, 172, 205, 162, 205, - 177, 193, 230, 193, 193, 201, 230, 193, 193, 61, - 213, 213, 15, 131, 230, 212, 131, 59, 211, 59, - 180, 228, 228, 253, 231, 14, 233, 131, 90, 131, - 230, 12, 230, 13, 22, 14, 131, 102, 25, 209, - 230, 230, 25, 25, 25, 25, 25, 131, 230, 132, - 131, 22, 14, 22, 14, 22, 14, 22, 12, 18, - 179, 11, 22, 211, 59, 99, 202, 230, 202, 132, - 255, 262, 132, 178, 194, 199, 202, 203, 230, 258, - 180, 201, 200, 230, 202, 202, 186, 180, 56, 166, - 22, 180, 225, 226, 164, 99, 99, 218, 131, 226, - 132, 178, 221, 222, 131, 23, 178, 254, 252, 131, - 14, 230, 12, 244, 132, 22, 14, 131, 253, 12, - 12, 12, 12, 180, 180, 11, 22, 251, 131, 131, - 256, 257, 262, 132, 180, 131, 22, 153, 202, 131, - 131, 131, 131, 12, 132, 178, 183, 56, 210, 11, - 211, 217, 244, 244, 223, 11, 230, 90, 14, 253, - 12, 131, 22, 160, 180, 244, 181, 181, 15, 131, + 189, 190, 188, 20, 24, 102, 178, 214, 215, 216, + 217, 219, 220, 221, 14, 132, 245, 248, 263, 264, + 265, 131, 231, 86, 212, 70, 178, 210, 86, 178, + 211, 211, 253, 132, 89, 231, 131, 177, 131, 131, + 231, 254, 254, 271, 232, 232, 22, 253, 13, 131, + 231, 231, 231, 231, 245, 231, 231, 131, 231, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 10, 11, 13, + 16, 20, 24, 25, 57, 83, 132, 235, 263, 131, + 231, 231, 231, 231, 231, 231, 231, 231, 186, 56, + 178, 204, 56, 56, 86, 178, 250, 180, 180, 122, + 180, 30, 259, 260, 262, 263, 264, 265, 180, 180, + 132, 180, 180, 180, 180, 182, 44, 172, 205, 162, + 205, 177, 193, 231, 193, 193, 201, 231, 193, 193, + 61, 213, 16, 15, 131, 231, 212, 131, 59, 211, + 59, 180, 229, 229, 254, 232, 14, 234, 131, 90, + 131, 231, 12, 231, 13, 22, 14, 131, 102, 25, + 209, 231, 231, 25, 25, 25, 25, 25, 131, 231, + 132, 131, 22, 14, 22, 14, 22, 14, 22, 12, + 18, 179, 11, 22, 211, 59, 99, 202, 231, 202, + 132, 256, 263, 132, 178, 194, 199, 202, 203, 231, + 259, 180, 201, 200, 231, 202, 202, 186, 180, 56, + 166, 22, 180, 226, 227, 164, 99, 213, 219, 131, + 227, 132, 178, 222, 223, 131, 23, 178, 255, 253, + 131, 14, 231, 12, 245, 132, 22, 14, 131, 254, + 12, 12, 12, 12, 180, 180, 11, 22, 252, 131, + 131, 257, 258, 263, 132, 180, 131, 22, 153, 202, + 131, 131, 131, 131, 12, 132, 178, 183, 56, 210, + 11, 211, 245, 99, 224, 11, 231, 90, 14, 254, + 12, 131, 22, 160, 180, 245, 181, 181, 15, 131, 202, 202, 181, 151, 132, 131, 198, 198, 181, 181, - 184, 168, 252, 211, 186, 22, 227, 228, 131, 229, - 131, 88, 186, 145, 33, 34, 178, 195, 195, 262, - 132, 131, 131, 196, 200, 202, 181, 181, 181, 262, - 181, 22, 225, 12, 186, 178, 187, 12, 186, 181, - 132, 202, 181, 181, 22, 131, 196, 196, 196, 185, - 45, 197, 12, 22, 59, 191, 12, 202, 131, 196, - 196, 152, 181, 131, 177, 17, 87, 178, 192, 131, - 181, 198, 196, 186, 181, 196, 203, 88, 195, 131, - 181 + 184, 168, 253, 211, 186, 22, 228, 229, 218, 245, + 131, 230, 131, 88, 186, 145, 33, 34, 178, 195, + 195, 263, 132, 131, 131, 196, 200, 202, 181, 181, + 181, 263, 181, 22, 226, 12, 186, 178, 187, 12, + 186, 181, 132, 202, 181, 181, 22, 131, 196, 196, + 196, 185, 45, 197, 12, 22, 59, 191, 12, 202, + 131, 196, 196, 152, 181, 131, 177, 17, 87, 178, + 192, 131, 181, 198, 196, 186, 181, 196, 203, 88, + 195, 131, 181 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -1537,29 +1540,29 @@ static const yytype_int16 yyr1[] = 198, 199, 199, 200, 200, 201, 202, 203, 204, 204, 205, 206, 207, 208, 209, 209, 210, 210, 211, 211, 211, 212, 212, 213, 213, 214, 214, 215, 215, 215, - 216, 216, 217, 217, 218, 218, 219, 219, 219, 220, - 220, 221, 221, 222, 224, 223, 225, 225, 226, 227, - 227, 229, 228, 230, 230, 230, 230, 230, 231, 231, - 231, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 233, 232, 234, 234, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 216, 216, 217, 217, 218, 218, 219, 219, 220, 220, + 220, 221, 221, 222, 222, 223, 225, 224, 226, 226, + 227, 228, 228, 230, 229, 231, 231, 231, 231, 231, + 232, 232, 232, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 234, 233, 235, 235, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 237, 237, 237, 237, 237, 238, 238, - 239, 239, 239, 239, 240, 240, 241, 241, 241, 241, - 241, 241, 241, 241, 241, 242, 242, 242, 242, 242, - 242, 242, 242, 243, 243, 244, 244, 244, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 244, 244, 245, 244, 244, 244, 244, 246, 246, - 246, 246, 247, 247, 247, 247, 247, 248, 248, 248, - 249, 249, 249, 250, 251, 250, 252, 252, 253, 253, - 254, 254, 255, 256, 256, 256, 257, 258, 258, 258, - 259, 259, 260, 260, 261, 262, 263, 264, 265, 265, - 266, 267, 267, 268, 268, 269, 269, 270, 270, 270, - 270 + 236, 236, 236, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 238, 238, 238, 238, 238, + 239, 239, 240, 240, 240, 240, 241, 241, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 243, 243, 243, + 243, 243, 243, 243, 243, 244, 244, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 246, 245, 245, 245, 245, + 247, 247, 247, 247, 248, 248, 248, 248, 248, 249, + 249, 249, 250, 250, 250, 251, 252, 251, 253, 253, + 254, 254, 255, 255, 256, 257, 257, 257, 258, 259, + 259, 259, 260, 260, 261, 261, 262, 263, 264, 265, + 266, 266, 267, 268, 268, 269, 269, 270, 270, 271, + 271, 271, 271 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -1580,29 +1583,29 @@ static const yytype_int8 yyr2[] = 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 0, 1, 1, 1, 2, 3, 4, - 2, 4, 0, 1, 1, 1, 2, 3, 1, 1, - 1, 1, 1, 3, 0, 2, 1, 1, 4, 1, - 1, 0, 6, 3, 3, 3, 3, 1, 2, 3, - 1, 3, 3, 5, 6, 3, 7, 4, 3, 5, - 2, 4, 4, 0, 5, 1, 1, 5, 4, 5, - 4, 5, 6, 5, 4, 5, 4, 3, 6, 4, - 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 1, 1, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 1, 3, 2, 2, 3, 3, 3, - 1, 3, 2, 2, 3, 3, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 3, 4, 5, 4, 4, - 3, 4, 3, 2, 2, 1, 1, 1, 1, 5, - 2, 1, 2, 3, 1, 2, 1, 1, 1, 1, - 1, 1, 4, 4, 5, 5, 1, 1, 3, 4, - 3, 4, 4, 4, 4, 4, 1, 2, 2, 1, - 2, 2, 1, 2, 1, 2, 1, 3, 1, 3, - 1, 3, 4, 0, 6, 1, 1, 1, 3, 2, - 4, 3, 3, 2, 1, 1, 1, 1, 1, 1, - 2, 1, 1, 3, 0, 6, 1, 1, 1, 1, - 1, 2, 1, 2, 3, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 2, 2, 2, 2, 2, 4, - 2, 1, 3, 1, 3, 1, 3, 1, 1, 1, - 1 + 0, 1, 3, 5, 0, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 3, 0, 2, 1, 1, + 4, 1, 1, 0, 6, 3, 3, 3, 3, 1, + 2, 3, 1, 3, 3, 5, 6, 3, 7, 4, + 3, 5, 2, 4, 4, 0, 5, 1, 1, 5, + 4, 5, 4, 5, 6, 5, 4, 5, 4, 3, + 6, 4, 5, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 1, 1, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 1, 3, 2, 2, 3, + 3, 3, 1, 3, 2, 2, 3, 3, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 3, 4, 5, + 4, 4, 3, 4, 3, 2, 2, 1, 1, 1, + 1, 5, 2, 1, 2, 3, 1, 2, 1, 1, + 1, 1, 1, 1, 4, 4, 5, 5, 1, 1, + 3, 4, 3, 4, 4, 4, 4, 4, 1, 2, + 2, 1, 2, 2, 1, 2, 1, 2, 1, 3, + 1, 3, 1, 3, 4, 0, 6, 1, 1, 1, + 3, 2, 4, 3, 3, 2, 1, 1, 1, 1, + 1, 1, 2, 1, 1, 3, 0, 6, 1, 1, + 1, 1, 1, 2, 1, 2, 3, 1, 1, 1, + 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, + 2, 4, 2, 1, 3, 1, 3, 1, 3, 1, + 1, 1, 1 }; typedef enum { @@ -1660,7 +1663,7 @@ static const toketypes yy_type_tab[] = toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_ival, toketype_opval, - toketype_opval, toketype_opval, toketype_opval, toketype_opval, + toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_opval, toketype_opval, toketype_opval, @@ -1673,6 +1676,6 @@ static const toketypes yy_type_tab[] = }; /* Generated from: - * 518d99fb6b32e38f3b668033ccd9846a65b84d5b9381db7009114282219cbe63 perly.y + * 1579ea304eb388b1cee0a714a2acd39920dbe5a8a06aa165703783e2c2dc2502 perly.y * f13e9c08cea6302f0c1d1f467405bd0e0880d0ea92d0669901017a7f7e94ab28 regen_perly.pl * ex: set ro ft=c: */ diff --git a/perly.y b/perly.y index 723d287a32e2..f13efcd810e0 100644 --- a/perly.y +++ b/perly.y @@ -142,6 +142,7 @@ %type termrelop relopchain termeqop eqopchain %type sigslurpsigil sigvar %type sigscalarelem optsigscalardefault sigslurpelem +%type optcolon %type sigelem siglist optsiglist subsigguts subsignature optsubsignature %type subbody optsubbody sigsubbody optsigsubbody %type formstmtseq formline formarg @@ -1103,16 +1104,32 @@ sigslurpelem: sigslurpsigil sigvar } ; +optcolon: %empty + { $$ = 0; } + | PERLY_COLON + { $$ = ':'; } + ; + /* subroutine signature scalar element: e.g. '$x', '$=', '$x = $default' */ sigscalarelem: - PERLY_DOLLAR sigvar + optcolon PERLY_DOLLAR sigvar { - subsignature_append_positional($sigvar, 0, NULL); + if($optcolon) { + PADNAME *pn = PadnamelistARRAY(PL_comppad_name)[$sigvar]; + subsignature_append_named(PadnamePV(pn)+1, $sigvar, 0, NULL); + } + else + subsignature_append_positional($sigvar, 0, NULL); $$ = NULL; } - | PERLY_DOLLAR sigvar ASSIGNOP optsigscalardefault + | optcolon PERLY_DOLLAR sigvar ASSIGNOP optsigscalardefault { - subsignature_append_positional($sigvar, $ASSIGNOP, $optsigscalardefault); + if($optcolon) { + PADNAME *pn = PadnamelistARRAY(PL_comppad_name)[$sigvar]; + subsignature_append_named(PadnamePV(pn)+1, $sigvar, $ASSIGNOP, $optsigscalardefault); + } + else + subsignature_append_positional($sigvar, $ASSIGNOP, $optsigscalardefault); $$ = NULL; } ; diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 45ab285d01c5..ad581390e8cd 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -27,6 +27,21 @@ here, but most should go in the L section. [ List each enhancement as a =head2 entry ] +=head2 Named Parameters in Signatures + +This adds a major new ability to subroutine signatures, allowing callers +to pass parameters by name/value pairs rather than by position. + + sub f ($x, $y, :$alpha, :$beta = undef) { ... } + + f( 123, 456, alpha => 789 ); + +Originally specified in +L. + +This feature is currently considered B, and is described in +further detail in L. + =head1 Security XXX Any security-related notices go here. In particular, any security diff --git a/pod/perldiag.pod b/pod/perldiag.pod index e6250bd970ee..d9ec181e684c 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -248,6 +248,15 @@ sigil; for example: sub foo ($x, $, $y = 1, @z) {} +=item A named signature parameter must start with '$' + +(F) Each subroutine signature parameter declaration that declares a named +parameter must start with a scalar variable sigil; for example: + + sub foo (:$x, :$y, :$z) {} + +Array and hash variables are not permitted as named parameters. + =item A slurpy parameter may not have a default value (F) Only scalar subroutine signature parameters may have a default value; @@ -2347,6 +2356,12 @@ already been freed. (W unpack) You have applied the same modifier more than once after a type in a pack template. See L. +=item Duplicated subroutine parameter name + +(F) You have attempted to use a subroutine parameter name a second time. + + sub f ( :$name, :$name ) { ... } + =item each on anonymous %s will always start from the beginning (W syntax) You called L on an anonymous hash or @@ -3944,6 +3959,10 @@ caller to omit an earlier one and pass a later one. If you want to act as if the parameters are filled from right to left, declare the rightmost optional and then shuffle the parameters around in the subroutine's body. +When using named parameters, no named parameter may be made mandatory if +there exist any optional I parameters, though any named +parameters may be freely mixed between mandatory and optional. + =item Matched non-Unicode code point 0x%X against Unicode property; may not be portable @@ -4132,6 +4151,16 @@ L and L. compiled with C or C with an empty string an undefined value which is forbidden. See L and L. +=item Missing required named parameter '%s' to subroutine '%s' + +(F) A subroutine was invoked that uses a signature that declares a +non-optional named parameter, but the caller did not provide a value associated +with that name. The caller of the subroutine is presumably at fault. + +The message attempts to include the name of the called subroutine. If +the subroutine has been aliased, the subroutine's original name will be +shown, regardless of what name the caller used. + =item Missing right brace on \%c{} in regex; marked by S<<-- HERE> in m/%s/ (F) Missing right brace in C<\x{...}>, C<\p{...}>, C<\P{...}>, or C<\N{...}>. @@ -4331,6 +4360,23 @@ but also uses any of the others it will not trigger this warning. Symbols beginning with an underscore and symbols using special identifiers (q.v. L) are exempt from this warning. +=item Named parameters in signatures are experimental + +(S experimental::signature_named_parameters) This warning is emitted if you +use a named parameter as part of a subroutine signature. This ability is +currently considered experimental and its behaviour may change in future +releases of Perl. + +=item Named parameters must actually have a name + +(F) An attempt was made to declare a named subroutine parameter using the +anonymous scalar notation + + sub foo (:$, ...) + +As named parameters must actually have a declared name in order to match it +against the argument values passed by the caller, this is not allowed. + =item Need exactly 3 octal digits in regex; marked by S<<-- HERE> in m/%s/ (F) Within S>, all constants interpreted as octal need to be @@ -5432,6 +5478,12 @@ fine from VMS' perspective, it's probably not what you intended. (F) The unpack format P must have an explicit size, not "*". +=item Positional parameter follows named parameter + +(F) An attempt was made to declare a positional parameter in a subroutine +signature after adding named parameters. All of the positional parameters +must be declared before any named ones. + =item POSIX class [:%s:] unknown in regex; marked by S<<-- HERE> in m/%s/ (F) The class in the character class [: :] syntax is unknown. The S<<-- HERE> @@ -7466,6 +7518,17 @@ whereabouts in the regular expression the escape was discovered. (F) You attempted to add a named attribute to a C definition, but perl does not recognise the name of the requested attribute. +=item Unrecognized named parameter '%s' to subroutine '%s' + +(F) A subroutine was invoked that uses a signature that declares named parameters but has no +slurpy parameter, and the caller provided a name that did not +match any declared named parameter. The caller of the subroutine is +presumably at fault. + +The message attempts to include the name of the called subroutine. If +the subroutine has been aliased, the subroutine's original name will be +shown, regardless of what name the caller used. + =item Unrecognised parameters for "%s" constructor: %s (F) You called new on a class but supplied a parameter name that diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 595c0b3953d1..ba6bf5d01683 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -445,8 +445,77 @@ If there are multiple optional positional parameters and not enough arguments are supplied to fill them all, they will be filled from left to right. -After positional parameters, additional arguments may be captured in a -slurpy parameter. The simplest form of this is just an array variable: +Since Perl 5.43.5, a signature may also declare named parameters. Like +positional parameters, these are lexical variables which will contain values +passed by the caller when the subroutine is invoked. Whereas positional +parameters take their values from the corresponding position in the list +passed by the caller, named parameters are matched by name-value pairs +from the caller. The passed-in name matches with the variable name of the +parameter but the order of the pairs is not significant. + +Named parameters in signatures are currently considered B, and +their behaviour may change in future releases of Perl. Uses of named +parameters in a signature will currently emit a warning in the +C category. + +Named parameters are declared with a prefixed C<:> symbol in front of the +variable sigil and name. This symbol is not part of the variable's name +within the body of the subroutine. Named parameters may only be declared +after any positional parameters; further positional parameters are not +allowed after any named ones. + + sub foo (:$alpha, :$beta) { + print "The value of alpha was $alpha\n"; + } + +To invoke this function, the caller must pass pairs of names and values to +provide values for the parameters. Each name must match the name of one of +the variables, omitting its leading C<$> sigil. The order of these values +is not important; both of the following lines will cause the same behaviour: + + foo(alpha => "A", beta => "B"); + foo(beta => "B", alpha => "A"); + +It is not important where these parameter names come from in the caller. In +simple cases they could be literal strings such as the previous example, or +they could themselves come from other variables. Expanding a hash variable +into the caller list provides a convenient way to collect multiple variables +at once. + + my %params = ( + alpha => "X", + beta => "Y", + ); + foo(%params); + +As with positional parameters, named parameters may be declared with a +defaulting expression to provide a value to assign into the variable if the +caller does not provide a value. Any parameters that do not have a +defaulting expression become mandatory; an exception is raised if the caller +does not provide an associated value. + + sub foo (:$x, :$y = 123) { ... } + + foo(y => 456); # will complain that 'x' is missing + foo(x => 789); # is allowed, $y will take its default value + +Any of the C<=>, C or C<||=> operators may be used to provide the +defaulting expression, with the same semantics as for positional parameters. + +The defaulting expressions for optional named parameters are invoked in order +left to right, as required. As with positional parameters, each expression +can see and make use of the values assigned to any previous parameter. + +If the subroutine already declares any optional positional parameters, then +all named parameters must also be optional. It would not make sense to +require a mandatory named parameter after any optional positional ones, as +there would be no way for the caller to provide a value for it. However, if +the subroutine does not declare any optional positional parameters, then any +named ones may be freely mixed between mandatory and optional, since they are +processed by name and not position. + +After positional or named parameters, additional arguments may be captured +in a slurpy parameter. The simplest form of this is just an array variable: sub foo ($filter, @inputs) { print $filter->($_) foreach @inputs; @@ -481,10 +550,28 @@ it be even, even though they're not being put into a variable. } A slurpy parameter, either array or hash, must be the last thing in the -signature. It may follow mandatory and optional positional parameters; -it may also be the only thing in the signature. Slurpy parameters cannot -have default values: if no arguments are supplied for them then you get -an empty array or empty hash. +signature. It may follow mandatory and optional positional and named +parameters; it may also be the only thing in the signature. Slurpy +parameters cannot have default values: if no arguments are supplied for +them then you get an empty array or empty hash. + +The presence of a slurpy parameter will alter the behaviour of a subroutine +that uses named parameters, when dealing with a name passed from the caller +that does not match any named parameter declared by that subroutine. + +Without a slurpy parameter, any additional unrecognised names will cause an +exception to be thrown. If a slurpy is used, then these unrecognised names +and values will be collected there instead. + + sub foo (:$x, @rest) { ... } + + foo(x => "one", y => "two"); # @rest will be ("y", "two") + +Z<> + + sub foo (:$x, %rest) { ... } + + foo(x => "one", y => "two"); # %rest will be (y => "two") A signature may be entirely empty, in which case all it does is check that the caller passed no arguments: @@ -493,6 +580,28 @@ that the caller passed no arguments: return 123; } +To summarize: a signature contains, in order: + +=over 2 + +=item * + +zero or more mandatory positional scalar parameters + +=item * + +zero or more optional positional scalar parameters + +=item * + +zero or more mandatory or optional named scalar parameters + +=item * + +zero or one slurpy array or hash parameter + +=back + Prior to Perl 5.36 these were considered experimental, and emitted a warning in the C category. From Perl 5.36 onwards this no longer happens, though the warning category still exists diff --git a/pp.c b/pp.c index 51414d295555..1651de4c3b0c 100644 --- a/pp.c +++ b/pp.c @@ -7901,7 +7901,9 @@ PP(pp_multiparam) assert(!SvMAGICAL(defav)); size_t argc = (AvFILLp(defav) + 1); - S_check_argc(aTHX_ argc, nparams, nparams - aux->min_args, slurpy); + S_check_argc(aTHX_ argc, nparams, nparams - aux->min_args, + /* if there's no slurpy but we have named params, claim it to be '%' for argcheck */ + slurpy ? slurpy : aux->n_named ? '%' : 0); size_t parami; for(parami = 0; parami < nparams; parami++) { @@ -7934,64 +7936,183 @@ PP(pp_multiparam) SvSetMagicSV(*padentry, val); } - if(!slurpy || !aux->slurpy_padix) + if((!slurpy || !aux->slurpy_padix) && !aux->n_named) return PL_op->op_next; - /* Now we know we have a slurpy */ - SV **padentry = &PAD_SVl(aux->slurpy_padix); - save_clearsv(padentry); + /* Now we know we have a slurpy, named params, or both */ + SV **slurpypad = NULL; - if(slurpy == '@') { - AV *av = (AV *)*padentry; - assert(SvTYPE(av) == SVt_PVAV); + if(aux->slurpy_padix) { + /* Prepare the slurpy xV */ + slurpypad = &PAD_SVl(aux->slurpy_padix); + save_clearsv(slurpypad); - if(av_count(av)) { - /* see "target should be empty" comments in pp_argelem above */ - av_refresh_elements_range(defav, parami, parami + argc); - av_clear(av); - } + if(slurpy == '@') { + AV *av = (AV *)*slurpypad; + assert(SvTYPE(av) == SVt_PVAV); - av_extend(av, argc); + if(av_count(av)) { + /* see "target should be empty" comments in pp_argelem above */ + av_refresh_elements_range(defav, parami, parami + argc); + av_clear(av); + } - size_t avidx = 0; - for(; argc; parami++, argc--) { - SV **valp = av_fetch(defav, parami, FALSE); - SV *val = valp ? *valp : &PL_sv_undef; + av_extend(av, argc); + } + else if(slurpy == '%') { + HV *hv = (HV *)*slurpypad; + assert(SvTYPE(hv) == SVt_PVHV); - assert(TAINTING_get || !TAINT_get); - if (UNLIKELY(TAINT_get) && !SvTAINTED(val)) - TAINT_NOT; + if(SvRMAGICAL(hv) || HvUSEDKEYS(hv) > 0) { + /* see "target should be empty" comments in pp_argelem above */ + av_refresh_elements_range(defav, parami, parami + argc); + hv_clear(hv); + } - av_store(av, avidx++, newSVsv(val)); + assert((argc % 2) == 0); } } - else if(slurpy == '%') { - HV *hv = (HV *)*padentry; - assert(SvTYPE(hv) == SVt_PVHV); - if(SvRMAGICAL(hv) || HvUSEDKEYS(hv) > 0) { - /* see "target should be empty" comments in pp_argelem above */ - av_refresh_elements_range(defav, parami, parami + argc); - hv_clear(hv); + size_t n_named = aux->n_named; + if(n_named) { + /* Initially mark the pad slot for every named parameter variable as + * PADSTALE, so afterwards we can detect missing ones + */ + for(size_t namedix = 0; namedix < n_named; namedix++) { + struct op_multiparam_named_aux *named = aux->named + namedix; + SvPADSTALE_on(PAD_SVl(named->padix)); } - assert((argc % 2) == 0); - while(argc) { SV **svp; - svp = av_fetch(defav, parami, FALSE); parami++; - SV *key = svp ? *svp : &PL_sv_undef; - svp = av_fetch(defav, parami, FALSE); parami++; - SV *val = svp ? *svp : &PL_sv_undef; - argc -= 2; + svp = av_fetch(defav, parami, FALSE); parami++; argc--; + SV *name = svp ? *svp : &PL_sv_undef; - if (UNLIKELY(SvGMAGICAL(key))) - key = sv_mortalcopy(key); + SV *val = NULL; + if(argc) { + svp = av_fetch(defav, parami, FALSE); parami++; argc--; + val = svp ? *svp : &PL_sv_undef; + } + + STRLEN namelen; + const char *namepv = SvPV(name, namelen); + /* namepv / namelen are always UTF-8 */ + if(!SvUTF8(name)) + namepv = (const char *)bytes_to_utf8_temp_pv((const U8 *)namepv, &namelen); + + U32 namehash; + PERL_HASH(namehash, namepv, namelen); + + PADOFFSET padix = 0; + for(size_t namedix = 0; namedix < n_named; namedix++) { + struct op_multiparam_named_aux *named = aux->named + namedix; + + if(named->namehash != namehash || named->namelen != namelen) + continue; + if(!strnEQ(named->namepv, namepv, namelen)) + continue; + + padix = named->padix; + break; + } + + if(padix) { + SV **padentry = &PAD_SVl(padix); + save_clearsv(padentry); + + assert(TAINTING_get || !TAINT_get); + if (UNLIKELY(TAINT_get) && !SvTAINTED(val)) + TAINT_NOT; + + if(!val) + val = &PL_sv_undef; - hv_store_ent(hv, key, newSVsv(val), 0); - if (UNLIKELY(TAINT_get) && !SvTAINTED(val)) - TAINT_NOT; + SvPADSTALE_off(*padentry); + SvSetMagicSV(*padentry, val); + } + else if(slurpy && !slurpypad) { + /* unnamed slurpy just ignores extra values */ + } + else if(slurpypad && slurpy == '@') { + AV *av = (AV *)*slurpypad; + + assert(TAINTING_get || !TAINT_get); + if (UNLIKELY(TAINT_get) && !SvTAINTED(name)) + TAINT_NOT; + av_push(av, newSVsv(name)); + + if(val) { + if (UNLIKELY(TAINT_get) && !SvTAINTED(val)) + TAINT_NOT; + av_push(av, newSVsv(val)); + } + } + else if(slurpypad && slurpy == '%') { + HV *hv = (HV *)*slurpypad; + + if (UNLIKELY(SvGMAGICAL(name))) + name = sv_mortalcopy(name); + + assert(val); /* this must have passed the argc parity check */ + if (UNLIKELY(TAINT_get) && !SvTAINTED(val)) + TAINT_NOT; + hv_store_ent(hv, name, newSVsv(val), 0); + } + else { + // TODO: Consider collecting up all the names of unrecognised + // in one string + croak_caller("Unrecognized named parameter '%" UTF8f "' to subroutine '%" SVf "'", + UTF8fARG(true, namelen, namepv), S_find_runcv_name()); + } + } + + for(size_t namedix = 0; namedix < n_named; namedix++) { + struct op_multiparam_named_aux *named = aux->named + namedix; + if(!named->is_required || !SvPADSTALE(PAD_SVl(named->padix))) + continue; + + // TODO: Consider collecting up all the names of missing + // parameters in one string + croak_caller("Missing required named parameter '%" UTF8f "' to subroutine '%" SVf "'", + UTF8fARG(true, named->namelen, named->namepv), S_find_runcv_name()); + } + } + + if(argc && slurpypad) { + if(slurpy == '@') { + AV *av = (AV *)*slurpypad; + size_t avidx = 0; + while(argc) { + SV **valp = av_fetch(defav, parami, FALSE); parami++; + SV *val = valp ? *valp : &PL_sv_undef; + argc -= 1; + + assert(TAINTING_get || !TAINT_get); + if (UNLIKELY(TAINT_get) && !SvTAINTED(val)) + TAINT_NOT; + + av_store(av, avidx++, newSVsv(val)); + } + } + else if(slurpy == '%') { + HV *hv = (HV *)*slurpypad; + while(argc) { + SV **svp; + + svp = av_fetch(defav, parami, FALSE); parami++; + SV *key = svp ? *svp : &PL_sv_undef; + svp = av_fetch(defav, parami, FALSE); parami++; + SV *val = svp ? *svp : &PL_sv_undef; + argc -= 2; + + if (UNLIKELY(SvGMAGICAL(key))) + key = sv_mortalcopy(key); + + hv_store_ent(hv, key, newSVsv(val), 0); + if (UNLIKELY(TAINT_get) && !SvTAINTED(val)) + TAINT_NOT; + } } } diff --git a/proto.h b/proto.h index 110a8f9b0d4a..0703f6997a28 100644 --- a/proto.h +++ b/proto.h @@ -4369,6 +4369,12 @@ Perl_subsignature_append_fence_op(pTHX_ OP *o) #define PERL_ARGS_ASSERT_SUBSIGNATURE_APPEND_FENCE_OP \ assert(o) +PERL_CALLCONV void +Perl_subsignature_append_named(pTHX_ const char *paramname, PADOFFSET padix, OPCODE defmode, OP *defexpr) + __attribute__visibility__("hidden"); +#define PERL_ARGS_ASSERT_SUBSIGNATURE_APPEND_NAMED \ + assert(paramname) + PERL_CALLCONV void Perl_subsignature_append_positional(pTHX_ PADOFFSET padix, OPCODE defmode, OP *defexpr) __attribute__visibility__("hidden"); diff --git a/regen/warnings.pl b/regen/warnings.pl index 5ee1277fb4a4..230d5fa059a6 100644 --- a/regen/warnings.pl +++ b/regen/warnings.pl @@ -16,7 +16,7 @@ # # This script is normally invoked from regen.pl. -$VERSION = '1.74'; +$VERSION = '1.75'; BEGIN { require './regen/regen_lib.pl'; @@ -161,6 +161,8 @@ BEGIN [ 5.041, DEFAULT_ON ], 'experimental::keyword_all' => [ 5.041, DEFAULT_ON ], + 'experimental::signature_named_parameters' => + [ 5.043, DEFAULT_ON ], }], 'missing' => [ 5.021, DEFAULT_OFF], diff --git a/t/class/method.t b/t/class/method.t index 6ae57b4af7a7..eb81b0e825b4 100644 --- a/t/class/method.t +++ b/t/class/method.t @@ -26,15 +26,19 @@ no warnings 'experimental::class'; # Turn off the 'signatures' feature to prove that 'method' is always # signatured even without it no feature 'signatures'; + no warnings 'experimental::signature_named_parameters'; class Testcase2 { method retfirst ( $x = 123 ) { return $x; } + method retnamed ( :$named = 456 ) { return $named; } } my $obj = Testcase2->new; is($obj->retfirst, 123, 'method signature params work'); is($obj->retfirst(456), 456, 'method signature params skip $self'); + is($obj->retnamed(named => 789), 789, 'method signature supports named parameters'); + # argument counts take account of implicit $self my $e = eval { $obj->retfirst(1, 2) } ? undef : $@; like($e, qr/^Too many arguments for subroutine 'Testcase2::retfirst' \(got 3; expected at most 2\) /, diff --git a/t/lib/croak/signatures b/t/lib/croak/signatures index 4454d694e4b3..49fb4e855917 100644 --- a/t/lib/croak/signatures +++ b/t/lib/croak/signatures @@ -16,6 +16,18 @@ EXPECT Mandatory parameter follows optional parameter at - line 2, near "$c," Mandatory parameter follows optional parameter at - line 2, near "$d) " ######## +# NAME named parameter without a name +no warnings 'experimental::signature_named_parameters'; +sub f (:$) { } +EXPECT +Named parameters must actually have a name at - line 3, near "(:$" +######## +# NAME positional after named +no warnings 'experimental::signature_named_parameters'; +sub f (:$x, $y) { } +EXPECT +Positional parameter follows named parameter at - line 3, near "$y) " +######## # NAME slurpy array with default sub t136 (@abc = 222) { } EXPECT @@ -60,10 +72,27 @@ sub t059 (@a, $b) { } EXPECT Slurpy parameter not last at - line 2, near "$b) " ######## +no warnings 'experimental::signature_named_parameters'; +sub t059 (@a, :$b) { } +EXPECT +Slurpy parameter not last at - line 3, near ":$b) " +######## sub t060 (@a, $b = 222) { } EXPECT Slurpy parameter not last at - line 2, near "222) " ######## +# NAME duplicated named parameter +no warnings 'experimental::signature_named_parameters'; +sub f (:$x, :$x) { } +EXPECT +Duplicated subroutine parameter name at - line 3, near ":$x) " +######## +# NAME mandatory named after optional positional +no warnings 'experimental::signature_named_parameters'; +sub f ($x = 1, :$y) { } +EXPECT +Mandatory parameter follows optional parameter at - line 3, near ":$y) " +######## sub t061 (@a, @b) { } EXPECT Multiple slurpy parameters not allowed at - line 2, near "@b) " @@ -194,6 +223,26 @@ EXPECT Illegal operator following parameter in a subroutine signature at - line 2, near "($a 123" syntax error at - line 2, near "($a 123" ######## +sub t096_named (:$a :$b) { } +EXPECT +Illegal operator following parameter in a subroutine signature at - line 2, near "(:$a :" +syntax error at - line 2, near "(:$a :" +######## +sub named (:@x) { } +EXPECT +A named signature parameter must start with '$' at - line 2, near "(:@" +syntax error at - line 2, near ":@x" +######## +sub named (:%x) { } +EXPECT +A named signature parameter must start with '$' at - line 2, near "(:%" +syntax error at - line 2, near ":%x" +######## +sub t094_named (:123) { } +EXPECT +A named signature parameter must start with '$' at - line 2, near "(:1" +syntax error at - line 2, near "(:123" +######## sub t097 ($a { }) { } EXPECT Illegal operator following parameter in a subroutine signature at - line 2, near "($a { }" @@ -228,3 +277,17 @@ Can't use global %_ in subroutine signature at - line 2, near "(%_" sub t101 ($1) { } EXPECT Illegal operator following parameter in a subroutine signature at - line 2, near "($1" +######## +# NAME missing required named +no warnings 'experimental::signature_named_parameters'; +sub f (:$alpha, :$beta) { } ## line 3 +f(alpha => 123); ## line 4 +EXPECT +Missing required named parameter 'beta' to subroutine 'main::f' at - line 4. +######## +# NAME unrecognised named +no warnings 'experimental::signature_named_parameters'; +sub f (:$alpha) { } ## line 3 +f(alpha => 123, gamma => 456); ## line 4 +EXPECT +Unrecognized named parameter 'gamma' to subroutine 'main::f' at - line 4. diff --git a/t/lib/warnings/signatures b/t/lib/warnings/signatures index 3b585525597c..0ab12975af87 100644 --- a/t/lib/warnings/signatures +++ b/t/lib/warnings/signatures @@ -24,3 +24,8 @@ Use of uninitialized value $a in addition (+) at - line 5. Use of uninitialized value $a in addition (+) at - line 6. Use of uninitialized value $a in addition (+) at - line 8. Use of uninitialized value $a in addition (+) at - line 9. +######## +# NAME named parameters provoke warning +sub f (:$alpha, :$beta) { } +EXPECT +Named parameters in signatures are experimental at - line 3. diff --git a/t/op/signatures.t b/t/op/signatures.t index 527bf2c1aaeb..c4c0fd2f1b84 100644 --- a/t/op/signatures.t +++ b/t/op/signatures.t @@ -29,6 +29,7 @@ like $@, qr{syntax error at foo line 8}, "error when not enabled 2"; use feature "signatures"; +no warnings 'experimental::signature_named_parameters'; sub t001 { $a || "z" } is prototype(\&t001), undef; @@ -923,6 +924,88 @@ is eval("t084(456, 789, 987, 654)"), undef; like $@, _create_mismatch_regexp('main::t084', 4, 2); is $a, 123; +sub tnamed01 (:$alpha, :$beta) { "alpha=$alpha beta=$beta"; } +is prototype(\&tnamed01), undef; +is eval("tnamed01(alpha => 123, beta => 456)"), "alpha=123 beta=456"; +is eval("tnamed01(beta => 654, alpha => 321)"), "alpha=321 beta=654"; +is eval("tnamed01(alpha => 1)"), undef; +like $@, qr/^Missing required named parameter 'beta' to subroutine 'main::tnamed01' at /; +is eval("tnamed01(alpha => 1, beta => 2, gamma => 3)"), undef; +like $@, qr/^Unrecognized named parameter 'gamma' to subroutine 'main::tnamed01' at /; +is eval("tnamed01(alpha => 1, beta => 2, beta => 3, beta => 4)"), "alpha=1 beta=4"; +is eval("tnamed01(alpha => 'first', beta => 456, alpha => 'second')"), "alpha=second beta=456", + "last value wins"; + +sub tnamed02 (:$alpha = "A", :$beta = "B") { "alpha=$alpha beta=$beta"; } +is prototype(\&tnamed02), undef; +is eval("tnamed02(alpha => 98, beta => 76)"), "alpha=98 beta=76"; +is eval("tnamed02(alpha => 98)"), "alpha=98 beta=B"; +is eval("tnamed02(beta => 76)"), "alpha=A beta=76"; +is eval("tnamed02()"), "alpha=A beta=B"; + +sub tnamed03 ($a, $b, :$x, :$y) { "a=$a b=$b x=$x y=$y"; } +is prototype(\&tnamed03), undef; +is eval("tnamed03(12, 34, x => 'X', y => 'Y')"), "a=12 b=34 x=X y=Y"; + +sub tnamed04 (:$x, :$y, @rest) { "x=$x y=$y <@rest>"; } +is prototype(\&tnamed04), undef; +is eval("tnamed04(w => 'W', x => 'X', y => 'Y', z => 'Z')"), "x=X y=Y "; +is eval("tnamed04(w => 'W', x => 'X', y => 'Y', 'single')"), "x=X y=Y "; + +sub tnamed05 (:$x, :$y, %rest) { "x=$x y=$y " . join(",", map { "$_=$rest{$_}" } sort keys %rest); } +is prototype(\&tnamed05), undef; +is eval("tnamed05(w => 'W', x => 'X', y => 'Y', z => 'Z')"), "x=X y=Y w=W,z=Z"; +is eval("tnamed05(w => 'W', x => 'X', y => 'Y', 'single')"), undef; +like $@, qr{^Odd name/value argument for subroutine 'main::tnamed05' at }; + +sub tnamed06 (:$x, :$y, @) { "x=$x y=$y"; } +is prototype(\&tnamed06), undef; +is eval("tnamed06(w => 'W', x => 'X', y => 'Y', z => 'Z')"), "x=X y=Y"; +is eval("tnamed06(w => 'W', x => 'X', y => 'Y', 'single')"), "x=X y=Y"; + +sub tnamed07 (:$x, :$y, %) { "x=$x y=$y"; } +is prototype(\&tnamed07), undef; +is eval("tnamed07(w => 'W', x => 'X', y => 'Y', z => 'Z')"), "x=X y=Y"; + +# Unicode handling of parameter names +{ + use utf8; + + sub tnamed08 (:$ĉevaloj) { return "$ĉevaloj horses"; } + + is eval("tnamed08(ĉevaloj => 1)"), "1 horses"; + + is eval("tnamed08()"), undef; + like $@, qr/^Missing required named parameter 'ĉevaloj' to subroutine 'main::tnamed08' at /; + + is eval("tnamed08(ŝafoj => 5)"), undef; + like $@, qr/^Unrecognized named parameter 'ŝafoj' to subroutine 'main::tnamed08' at /; +} + +# Handling of Unicode parameter names from non-utf8 contexts +{ + use utf8; + + sub tnamed09 (:$café) { return $café; } +} +{ + no utf8; + + # "café" = "caf\x{e9}" + my $nonutf8 = "caf\x{e9}"; + is eval('tnamed09($nonutf8, "Ritz")'), "Ritz"; + ok !utf8::is_utf8($nonutf8), 'Non-UTF8 parameter names do not get upgraded in caller'; +} + +# Named params in anonymous subs +{ + my $tnamed10 = sub (:$x) { return "x=$x"; }; + is $tnamed10->(x => 123), "x=123"; + + my $tnamed11 = sub (:$x, :$y, @rest) { return "x=$x y=$y <@rest>"; }; + is $tnamed11->(x => 123, y => 456, z => 789), "x=123 y=456 "; +} + sub t085 ( $ diff --git a/toke.c b/toke.c index aef854a9e641..ece6bb56d5e5 100644 --- a/toke.c +++ b/toke.c @@ -5486,6 +5486,14 @@ yyl_sigvar(pTHX_ char *s) U8 sigil; s = skipspace(s); + + bool is_named = false; + if(*s == ':') { + is_named = true; + s++; + s = skipspace(s); + } + sigil = *s++; PL_bufptr = s; /* for error reporting */ switch (sigil) { @@ -5502,6 +5510,10 @@ yyl_sigvar(pTHX_ char *s) yyerror("'#' not allowed immediately following a sigil in a subroutine signature"); break; } + if (is_named && sigil != '$') { + yyerror("A named signature parameter must start with '$'"); + break; + } s = skipspace(s); if (isIDFIRST_lazy_if_safe(s, PL_bufend, UTF)) { char *dest = PL_tokenbuf + 1; @@ -5512,6 +5524,10 @@ yyl_sigvar(pTHX_ char *s) assert(PL_tokenbuf[1]); /* we have a variable name */ } else { + if (is_named) { + yyerror("Named parameters must actually have a name"); + break; + } *PL_tokenbuf = 0; PL_in_my = 0; } @@ -5573,7 +5589,10 @@ yyl_sigvar(pTHX_ char *s) default: PL_in_my = 0; - yyerror("A signature parameter must start with '$', '@' or '%'"); + if(is_named) + yyerror("A named signature parameter must start with '$'"); + else + yyerror("A signature parameter must start with '$', '@' or '%'"); /* very crude error recovery: skip to likely next signature * element */ while (*s && *s != '$' && *s != '@' && *s != '%' && *s != ')') @@ -5581,6 +5600,12 @@ yyl_sigvar(pTHX_ char *s) break; } + if (!PL_parser->error_count && is_named) { + assert(sigil == '$'); + force_next(PERLY_DOLLAR); + TOKEN (PERLY_COLON); + } + switch (sigil) { case ',': TOKEN (PERLY_COMMA); case '$': TOKEN (PERLY_DOLLAR); diff --git a/warnings.h b/warnings.h index 285a94b4b1b1..161d0028c089 100644 --- a/warnings.h +++ b/warnings.h @@ -162,10 +162,14 @@ #define WARN_EXPERIMENTAL__KEYWORD_ALL 78 #define WARN_EXPERIMENTAL__KEYWORD_ANY 79 -#define WARNsize 20 -#define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125" -#define WARN_NONEstring "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" -#define WARN_DEFAULTstring "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x05\x00\x15\x14\x55\x55\x54\x55" + +/* Warnings Categories added in Perl 5.043 */ + +#define WARN_EXPERIMENTAL__SIGNATURE_NAMED_PARAMETERS 80 +#define WARNsize 21 +#define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125" +#define WARN_NONEstring "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" +#define WARN_DEFAULTstring "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x05\x00\x15\x14\x55\x55\x54\x55\x01" #define isLEXWARN_on \ cBOOL(PL_curcop && PL_curcop->cop_warnings != pWARN_STD) @@ -357,6 +361,7 @@ category parameters passed. =for apidoc Amnh||WARN_DEPRECATED__SUBSEQUENT_USE_VERSION =for apidoc Amnh||WARN_EXPERIMENTAL__KEYWORD_ALL =for apidoc Amnh||WARN_EXPERIMENTAL__KEYWORD_ANY +=for apidoc Amnh||WARN_EXPERIMENTAL__SIGNATURE_NAMED_PARAMETERS =cut */