diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2022-12-24 13:17:47 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2023-02-10 12:07:02 +0000 |
commit | 99b497aa90ed7db99d29a301b47c91fba65c9cb3 (patch) | |
tree | 09e231f3a6838cdb2df9db9454981b9205046ba1 | |
parent | b40895ae558e0aff0c347785dafeaaff40a01801 (diff) | |
download | perl-99b497aa90ed7db99d29a301b47c91fba65c9cb3.tar.gz |
Initial attack at basic 'class' feature
Adds a new experimental warning, feature, keywords and enough parsing to
implement basic classes with an empty `new` constructor method.
Inject a $self lexical into method bodies; populate it with the object instance, suitably shifted
Creates a new OP_METHSTART opcode to perform method setup
Define an aux flag to remark which stashes are classes
Basic implementation of fields.
Basic anonymous methods.
-rw-r--r-- | MANIFEST | 9 | ||||
-rwxr-xr-x | Makefile.SH | 4 | ||||
-rw-r--r-- | class.c | 386 | ||||
-rw-r--r-- | cv.h | 9 | ||||
-rw-r--r-- | embed.fnc | 21 | ||||
-rw-r--r-- | embed.h | 11 | ||||
-rw-r--r-- | ext/Opcode/Opcode.pm | 4 | ||||
-rw-r--r-- | feature.h | 53 | ||||
-rw-r--r-- | gv.c | 19 | ||||
-rw-r--r-- | hv.h | 9 | ||||
-rw-r--r-- | keywords.c | 146 | ||||
-rw-r--r-- | keywords.h | 512 | ||||
-rw-r--r-- | lib/B/Deparse-core.t | 4 | ||||
-rw-r--r-- | lib/B/Op_private.pm | 1 | ||||
-rw-r--r-- | lib/feature.pm | 16 | ||||
-rw-r--r-- | lib/warnings.pm | 17 | ||||
-rw-r--r-- | op.c | 24 | ||||
-rw-r--r-- | opcode.h | 9 | ||||
-rw-r--r-- | opnames.h | 3 | ||||
-rw-r--r-- | pad.c | 45 | ||||
-rw-r--r-- | pad.h | 20 | ||||
-rw-r--r-- | perly.act | 1194 | ||||
-rw-r--r-- | perly.h | 203 | ||||
-rw-r--r-- | perly.tab | 2108 | ||||
-rw-r--r-- | perly.y | 119 | ||||
-rw-r--r-- | pod/perldiag.pod | 68 | ||||
-rw-r--r-- | pp_proto.h | 1 | ||||
-rw-r--r-- | proto.h | 38 | ||||
-rwxr-xr-x | regen/feature.pl | 14 | ||||
-rwxr-xr-x | regen/keywords.pl | 8 | ||||
-rw-r--r-- | regen/opcodes | 2 | ||||
-rw-r--r-- | regen/warnings.pl | 4 | ||||
-rw-r--r-- | t/class/class.t | 86 | ||||
-rw-r--r-- | t/class/construct.t | 55 | ||||
-rw-r--r-- | t/class/destruct.t | 60 | ||||
-rw-r--r-- | t/class/field.t | 132 | ||||
-rw-r--r-- | t/class/method.t | 92 | ||||
-rw-r--r-- | t/class/phasers.t | 39 | ||||
-rw-r--r-- | t/lib/croak/class | 68 | ||||
-rw-r--r-- | t/lib/warnings/class | 32 | ||||
-rw-r--r-- | t/op/coreamp.t | 10 | ||||
-rw-r--r-- | t/op/coresubs.t | 10 | ||||
-rw-r--r-- | t/porting/diag.t | 2 | ||||
-rw-r--r-- | toke.c | 65 | ||||
-rw-r--r-- | warnings.h | 5 | ||||
-rw-r--r-- | win32/GNUmakefile | 1 | ||||
-rw-r--r-- | win32/Makefile | 1 |
47 files changed, 3719 insertions, 2020 deletions
@@ -18,6 +18,7 @@ caretx.c C file to create $^X cflags.SH A script that emits C compilation flags per file Changes Describe how to peruse changes between releases charclass_invlists.h Compiled-in inversion lists +class.c Internals of the `use feature 'class'` object system CODE_OF_CONDUCT.md Information on where to find the Standards of Conduct config_h.SH Produces config.h configpm Produces lib/Config.pm @@ -5638,6 +5639,12 @@ t/bigmem/regexp.t Test regular expressions with large strings t/bigmem/subst.t Test s/// with large strings t/bigmem/vec.t Check vec() handles large offsets t/charset_tools.pl To aid in portable testing across platforms with different character sets +t/class/class.t See if class declarations work +t/class/construct.t See if class constructors work +t/class/destruct.t See if class destruction works +t/class/field.t See if class field declarations work +t/class/method.t See if class method declarations work +t/class/phasers.t See if class phaser blocks work t/cmd/elsif.t See if else-if works t/cmd/for.t See if for loops work t/cmd/mod.t See if statement modifiers work @@ -5721,6 +5728,7 @@ t/lib/common.pl Helper for lib/{warnings,feature}.t t/lib/commonsense.t See if configuration meets basic needs t/lib/Count.pm Helper for t/op/method.t t/lib/croak.t Test calls to Perl_croak() in the C source. +t/lib/croak/class Test croak calls from class.c t/lib/croak/gv Test croak calls from gv.c t/lib/croak/mg Test croak calls from mg.c t/lib/croak/op Test croak calls from op.c @@ -5787,6 +5795,7 @@ t/lib/warnings/9enabled Tests warnings t/lib/warnings/9uninit Tests "Use of uninitialized" warnings t/lib/warnings/av Tests for av.c for warnings.t t/lib/warnings/builtin Tests for builtin.c for warnings.t +t/lib/warnings/class Tests for class.c for warnings.t t/lib/warnings/doio Tests for doio.c for warnings.t t/lib/warnings/gv Tests for gv.c for warnings.t t/lib/warnings/hv Tests for hv.c for warnings.t diff --git a/Makefile.SH b/Makefile.SH index ac05dee120..f39643eaab 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -538,7 +538,7 @@ h = $(h1) $(h2) $(h3) $(h4) $(h5) $(h6) c1 = av.c scope.c op.c peep.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c mro_core.c perl.c c2 = perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c utf8.c sv.c -c3 = taint.c toke.c util.c deb.c run.c builtin.c universal.c pad.c globals.c keywords.c +c3 = taint.c toke.c util.c deb.c run.c builtin.c universal.c class.c pad.c globals.c keywords.c c4 = perlio.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c caretx.c dquote.c time64.c c5 = regcomp.c regcomp_debug.c regcomp_invlist.c regcomp_study.c regcomp_trie.c regexec.c c6 = $(mallocsrc) @@ -559,7 +559,7 @@ c = $(c_base) miniperlmain.c $(mini_only_src) obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) pad$(OBJ_EXT) obj2 = regcomp$(OBJ_EXT) regcomp_debug$(OBJ_EXT) regcomp_invlist$(OBJ_EXT) regcomp_study$(OBJ_EXT) regcomp_trie$(OBJ_EXT) obj3 = regexec$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro_core$(OBJ_EXT) -obj4 = keywords$(OBJ_EXT) builtin$(OBJ_EXT) +obj4 = keywords$(OBJ_EXT) builtin$(OBJ_EXT) class$(OBJ_EXT) obj5 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) obj6 = scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT) peep$(OBJ_EXT) obj7 = doop$(OBJ_EXT) doio$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) diff --git a/class.c b/class.c new file mode 100644 index 0000000000..88a4205a99 --- /dev/null +++ b/class.c @@ -0,0 +1,386 @@ +/* class.c + * + * Copyright (C) 2022 by Paul Evans and others + * + * You may distribute under the terms of either the GNU General Public + * License or the Artistic License, as specified in the README file. + * + */ + +/* This file contains the code that implements perl's new `use feature 'class'` + * object model + */ + +#include "EXTERN.h" +#define PERL_IN_CLASS_C +#include "perl.h" + +#include "XSUB.h" + +enum { + PADIX_SELF = 1, +}; + +void +Perl_croak_kw_unless_class(pTHX_ const char *kw) +{ + PERL_ARGS_ASSERT_CROAK_KW_UNLESS_CLASS; + + if(!HvSTASH_IS_CLASS(PL_curstash)) + croak("Cannot '%s' outside of a 'class'", kw); +} + +XS(injected_constructor); +XS(injected_constructor) +{ + dXSARGS; + + HV *stash = (HV *)XSANY.any_ptr; + assert(HvSTASH_IS_CLASS(stash)); + + struct xpvhv_aux *aux = HvAUX(stash); + + if((items - 1) % 2) + Perl_warn(aTHX_ "Odd number of arguments passed to %" HvNAMEf_QUOTEDPREFIX " constructor", + HvNAMEfARG(stash)); + + HV *params = NULL; + { + /* Set up params HV */ + params = newHV(); + SAVEFREESV((SV *)params); + + for(I32 i = 1; i < items; i += 2) { + SV *name = ST(i); + SV *val = (i+1 < items) ? ST(i+1) : &PL_sv_undef; + + /* TODO: think about sanity-checking name for being + * defined + * not ref (but overloaded objects?? boo) + * not duplicate + * But then, %params = @_; wouldn't do that + */ + + hv_store_ent(params, name, SvREFCNT_inc(val), 0); + } + } + + AV *fields = newAV(); + SV *self = sv_2mortal(newRV_noinc((SV *)fields)); + sv_bless(self, stash); + + /* create fields */ + for(PADOFFSET fieldix = 0; fieldix < aux->xhv_class_next_fieldix; fieldix++) { + PADNAME *pn = PadnamelistARRAY(aux->xhv_class_fields)[fieldix]; + assert(PadnameFIELDINFO(pn)->fieldix == fieldix); + + SV *val = NULL; + + switch(PadnamePV(pn)[0]) { + case '$': + val = newSV(0); + break; + + case '@': + val = (SV *)newAV(); + break; + + case '%': + val = (SV *)newHV(); + break; + + default: + NOT_REACHED; + } + + av_push(fields, val); + } + + if(aux->xhv_class_adjust_blocks) { + CV **cvp = (CV **)AvARRAY(aux->xhv_class_adjust_blocks); + U32 nblocks = av_count(aux->xhv_class_adjust_blocks); + + for(U32 i = 0; i < nblocks; i++) { + ENTER; + SAVETMPS; + SPAGAIN; + + EXTEND(SP, 1); + + PUSHMARK(SP); + PUSHs(self); /* I don't believe this needs to be an sv_mortalcopy() */ + PUTBACK; + + call_sv((SV *)cvp[i], G_VOID); + + SPAGAIN; + + FREETMPS; + LEAVE; + } + } + + if(params && hv_iterinit(params) > 0) { + /* TODO: consider sorting these into a canonical order, but that's awkward */ + HE *he = hv_iternext(params); + + SV *paramnames = newSVsv(HeSVKEY_force(he)); + SAVEFREESV(paramnames); + + while((he = hv_iternext(params))) + Perl_sv_catpvf(aTHX_ paramnames, ", %" SVf, SVfARG(HeSVKEY_force(he))); + + croak("Unrecognised parameters for %" HvNAMEf_QUOTEDPREFIX " constructor: %" SVf, + HvNAMEfARG(stash), SVfARG(paramnames)); + } + + EXTEND(SP, 1); + ST(0) = self; + XSRETURN(1); +} + +/* OP_METHSTART is an UNOP_AUX whose AUX list contains + * [0].uv = count of fieldbinding pairs + * [1].uv = maximum fieldidx found in the binding list + * [...] = pairs of (padix, fieldix) to bind in .uv fields + */ + +/* TODO: People would probably expect to find this in pp.c ;) */ +PP(pp_methstart) +{ + SV *self = av_shift(GvAV(PL_defgv)); + SV *rv = NULL; + + /* pp_methstart happens before the first OP_NEXTSTATE of the method body, + * meaning PL_curcop still points at the callsite. This is useful for + * croak() messages. However, it means we have to find our current stash + * via a different technique. + */ + CV *curcv; + if(LIKELY(CxTYPE(CX_CUR()) == CXt_SUB)) + curcv = CX_CUR()->blk_sub.cv; + else + curcv = find_runcv(NULL); + + if(!SvROK(self) || + !SvOBJECT((rv = SvRV(self))) || + SvTYPE(rv) != SVt_PVAV) { /* TODO: SVt_INSTANCE */ + HEK *namehek = CvGvNAME_HEK(curcv); + croak( + namehek ? "Cannot invoke method %" HEKf_QUOTEDPREFIX " on a non-instance" : + "Cannot invoke method on a non-instance", + namehek); + } + + /* TODO: When we implement inheritence we'll have to do something fancier here */ + if(CvSTASH(curcv) != SvSTASH(rv)) + croak("Cannot invoke a method of %" HvNAMEf_QUOTEDPREFIX " on an instance of %" HvNAMEf_QUOTEDPREFIX, + HvNAMEfARG(CvSTASH(curcv)), HvNAMEfARG(SvSTASH(rv))); + + save_clearsv(&PAD_SVl(PADIX_SELF)); + sv_setsv(PAD_SVl(PADIX_SELF), self); + + UNOP_AUX_item *aux = cUNOP_AUX->op_aux; + if(aux) { + assert(SvTYPE(SvRV(self)) == SVt_PVAV); + AV *fields = MUTABLE_AV(SvRV(self)); + SV **fieldp = AvARRAY(fields); + + U32 fieldcount = (aux++)->uv; + U32 max_fieldix = (aux++)->uv; + + assert(av_count(fields) > max_fieldix); + PERL_UNUSED_VAR(max_fieldix); + + for(Size_t i = 0; i < fieldcount; i++) { + PADOFFSET padix = (aux++)->uv; + U32 fieldix = (aux++)->uv; + + assert(fieldp[fieldix]); + + /* TODO: There isn't a convenient SAVE macro for doing both these + * steps in one go. Add one. */ + SAVESPTR(PAD_SVl(padix)); + SV *sv = PAD_SVl(padix) = SvREFCNT_inc(fieldp[fieldix]); + save_freesv(sv); + } + } + + return NORMAL; +} + +static void +invoke_class_seal(pTHX_ void *_arg) +{ + class_seal_stash((HV *)_arg); +} + +void +Perl_class_setup_stash(pTHX_ HV *stash) +{ + PERL_ARGS_ASSERT_CLASS_SETUP_STASH; + + assert(HvHasAUX(stash)); + + if(HvSTASH_IS_CLASS(stash)) { + croak("Cannot reopen existing class %" HvNAMEf_QUOTEDPREFIX, + HvNAMEfARG(stash)); + } + + char *classname = HvNAME(stash); + U32 nameflags = HvNAMEUTF8(stash) ? SVf_UTF8 : 0; + + /* TODO: + * Set some kind of flag on the stash to point out it's a class + * Allocate storage for all the extra things a class needs + * See https://github.com/leonerd/perl5/discussions/1 + */ + + /* Inject the constructor */ + { + SV *newname = Perl_newSVpvf(aTHX_ "%s::new", classname); + SAVEFREESV(newname); + + CV *newcv = newXS_flags(SvPV_nolen(newname), injected_constructor, __FILE__, NULL, nameflags); + CvXSUBANY(newcv).any_ptr = stash; + } + + /* TODO: + * DOES method + */ + + HvAUX(stash)->xhv_class_adjust_blocks = NULL; + HvAUX(stash)->xhv_class_fields = NULL; + HvAUX(stash)->xhv_class_next_fieldix = 0; + + HvAUX(stash)->xhv_aux_flags |= HvAUXf_IS_CLASS; + + SAVEDESTRUCTOR_X(invoke_class_seal, stash); +} + +void +Perl_class_seal_stash(pTHX_ HV *stash) +{ + PERL_ARGS_ASSERT_CLASS_SEAL_STASH; + + /* TODO: anything? */ +} + +void +Perl_class_prepare_method_parse(pTHX_ CV *cv) +{ + PERL_ARGS_ASSERT_CLASS_PREPARE_METHOD_PARSE; + + assert(cv == PL_compcv); + assert(HvSTASH_IS_CLASS(PL_curstash)); + + /* We expect this to be at the start of sub parsing, so there won't be + * anything in the pad yet + */ + assert(PL_comppad_name_fill == 0); + + PADOFFSET padix; + + padix = pad_add_name_pvs("$self", 0, NULL, NULL); + assert(padix == PADIX_SELF); + PERL_UNUSED_VAR(padix); + + intro_my(); + + CvNOWARN_AMBIGUOUS_on(cv); + CvIsMETHOD_on(cv); +} + +OP * +Perl_class_wrap_method_body(pTHX_ OP *o) +{ + PERL_ARGS_ASSERT_CLASS_WRAP_METHOD_BODY; + + if(!o) + return o; + + PADNAMELIST *pnl = PadlistNAMES(CvPADLIST(PL_compcv)); + + AV *fieldmap = newAV(); + UV max_fieldix = 0; + SAVEFREESV((SV *)fieldmap); + + /* padix 0 == @_; padix 1 == $self. Start at 2 */ + for(PADOFFSET padix = 2; padix <= PadnamelistMAX(pnl); padix++) { + PADNAME *pn = PadnamelistARRAY(pnl)[padix]; + if(!pn || !PadnameIsFIELD(pn)) + continue; + + U32 fieldix = PadnameFIELDINFO(pn)->fieldix; + if(fieldix > max_fieldix) + max_fieldix = fieldix; + + av_push(fieldmap, newSVuv(padix)); + av_push(fieldmap, newSVuv(fieldix)); + } + + UNOP_AUX_item *aux = NULL; + + if(av_count(fieldmap)) { + Newx(aux, 2 + av_count(fieldmap), UNOP_AUX_item); + + UNOP_AUX_item *ap = aux; + + (ap++)->uv = av_count(fieldmap) / 2; + (ap++)->uv = max_fieldix; + + for(Size_t i = 0; i < av_count(fieldmap); i++) + (ap++)->uv = SvUV(AvARRAY(fieldmap)[i]); + } + + /* If this is an empty method body then o will be an OP_STUB and not a + * list. This will confuse op_sibling_splice() */ + if(o->op_type != OP_LINESEQ) + o = newLISTOP(OP_LINESEQ, 0, o, NULL); + + op_sibling_splice(o, NULL, 0, newUNOP_AUX(OP_METHSTART, 0, NULL, aux)); + + return o; +} + +void +Perl_class_add_field(pTHX_ HV *stash, PADNAME *pn) +{ + PERL_ARGS_ASSERT_CLASS_ADD_FIELD; + + assert(HvSTASH_IS_CLASS(stash)); + struct xpvhv_aux *aux = HvAUX(stash); + + PADOFFSET fieldix = aux->xhv_class_next_fieldix; + aux->xhv_class_next_fieldix++; + + Newx(PadnameFIELDINFO(pn), 1, struct padname_fieldinfo); + PadnameFLAGS(pn) |= PADNAMEf_FIELD; + + PadnameFIELDINFO(pn)->fieldix = fieldix; + PadnameFIELDINFO(pn)->fieldstash = (HV *)SvREFCNT_inc(stash); + + if(!aux->xhv_class_fields) + aux->xhv_class_fields = newPADNAMELIST(0); + + padnamelist_store(aux->xhv_class_fields, PadnamelistMAX(aux->xhv_class_fields)+1, pn); + PadnameREFCNT_inc(pn); +} + +void +Perl_class_add_ADJUST(pTHX_ HV *stash, CV *cv) +{ + PERL_ARGS_ASSERT_CLASS_ADD_ADJUST; + + assert(HvSTASH_IS_CLASS(stash)); + struct xpvhv_aux *aux = HvAUX(stash); + + if(!aux->xhv_class_adjust_blocks) + aux->xhv_class_adjust_blocks = newAV(); + + av_push(aux->xhv_class_adjust_blocks, (SV *)cv); +} + +/* + * ex: set ts=8 sts=4 sw=4 et: + */ @@ -108,7 +108,7 @@ See L<perlguts/Autoloading with XSUBs>. ) /* CV has the `:method` attribute. This used to be called CVf_METHOD but is - * renamed to avoid collision with an upcoming feature */ + * renamed to avoid collision with CVf_IsMETHOD */ #define CVf_NOWARN_AMBIGUOUS 0x0001 #define CVf_LVALUE 0x0002 /* CV return value can be used as lvalue */ @@ -135,6 +135,9 @@ See L<perlguts/Autoloading with XSUBs>. #define CVf_ANONCONST 0x20000 /* :const - create anonconst op */ #define CVf_SIGNATURE 0x40000 /* CV uses a signature */ #define CVf_REFCOUNTED_ANYSV 0x80000 /* CvXSUBANY().any_sv is refcounted */ +#define CVf_IsMETHOD 0x100000 /* CV is a (real) method of a real class. Not + to be confused with what used to be called + CVf_METHOD; now CVf_NOWARN_AMBIGUOUS */ /* This symbol for optimised communication between toke.c and op.c: */ #define CVf_BUILTIN_ATTRS (CVf_NOWARN_AMBIGUOUS|CVf_LVALUE|CVf_ANONCONST) @@ -257,6 +260,10 @@ Helper macro to turn off the C<CvREFCOUNTED_ANYSV> flag. #define CvREFCOUNTED_ANYSV_on(cv) (CvFLAGS(cv) |= CVf_REFCOUNTED_ANYSV) #define CvREFCOUNTED_ANYSV_off(cv) (CvFLAGS(cv) &= ~CVf_REFCOUNTED_ANYSV) +#define CvIsMETHOD(cv) (CvFLAGS(cv) & CVf_IsMETHOD) +#define CvIsMETHOD_on(cv) (CvFLAGS(cv) |= CVf_IsMETHOD) +#define CvIsMETHOD_off(cv) (CvFLAGS(cv) &= ~CVf_IsMETHOD) + /* Back-compat */ #ifndef PERL_CORE # define CVf_METHOD CVf_NOWARN_AMBIGUOUS @@ -3679,6 +3679,7 @@ XEop |char *|dup_warnings |NULLOK char *warnings Amd |const char * const|phase_name \ |enum perl_phase + #if ( defined(AF_INET) && defined(HAS_SOCKET) && defined(PF_INET) && \ defined(SOCK_DGRAM) ) || defined(HAS_SOCKETPAIR) pR |int |PerlSock_socketpair_cloexec \ @@ -3963,6 +3964,26 @@ i |bool |PerlEnv_putenv |NN char *str #if defined(PERL_IN_AV_C) S |MAGIC *|get_aux_mg |NN AV *av #endif /* defined(PERL_IN_AV_C) */ +#if defined(PERL_IN_CLASS_C) || defined(PERL_IN_PAD_C) || \ + defined(PERL_IN_PERLY_C) || defined(PERL_IN_TOKE_C) +; Functions in class.c that are called by the parser (perly.c, toke.c, pad.c) +Cp |void |class_add_ADJUST \ + |NN HV *stash \ + |NN CV *cv +Cp |void |class_add_field|NN HV *stash \ + |NN PADNAME *pn +Cp |void |class_prepare_method_parse \ + |NN CV *cv +Cp |void |class_seal_stash \ + |NN HV *stash +Cp |void |class_setup_stash \ + |NN HV *stash +Cp |OP * |class_wrap_method_body \ + |NULLOK OP *o +Cp |void |croak_kw_unless_class \ + |NN const char *kw +#endif /* defined(PERL_IN_CLASS_C) || defined(PERL_IN_PAD_C) || \ + defined(PERL_IN_PERLY_C) || defined(PERL_IN_TOKE_C) */ #if defined(PERL_IN_DEB_C) S |void |deb_stack_n |NN SV **stack_base \ |I32 stack_min \ @@ -1972,6 +1972,17 @@ # define my_pclose(a) Perl_my_pclose(aTHX_ a) # define my_popen(a,b) Perl_my_popen(aTHX_ a,b) # endif /* !defined(PERL_IMPLICIT_SYS) */ +# if defined(PERL_IN_CLASS_C) || defined(PERL_IN_PAD_C) || \ + defined(PERL_IN_PERLY_C) || defined(PERL_IN_TOKE_C) +# define class_add_ADJUST(a,b) Perl_class_add_ADJUST(aTHX_ a,b) +# define class_add_field(a,b) Perl_class_add_field(aTHX_ a,b) +# define class_prepare_method_parse(a) Perl_class_prepare_method_parse(aTHX_ a) +# define class_seal_stash(a) Perl_class_seal_stash(aTHX_ a) +# define class_setup_stash(a) Perl_class_setup_stash(aTHX_ a) +# define class_wrap_method_body(a) Perl_class_wrap_method_body(aTHX_ a) +# define croak_kw_unless_class(a) Perl_croak_kw_unless_class(aTHX_ a) +# endif /* defined(PERL_IN_CLASS_C) || defined(PERL_IN_PAD_C) || \ + defined(PERL_IN_PERLY_C) || defined(PERL_IN_TOKE_C) */ # if defined(PERL_IN_REGEX_ENGINE) # define check_regnode_after(a,b) Perl_check_regnode_after(aTHX_ a,b) # define regnext(a) Perl_regnext(aTHX_ a) diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm index 5b0092d1bb..d5fffa5434 100644 --- a/ext/Opcode/Opcode.pm +++ b/ext/Opcode/Opcode.pm @@ -1,4 +1,4 @@ -package Opcode 1.63; +package Opcode 1.64; use strict; @@ -351,6 +351,8 @@ invert_opset function. leaveeval -- needed for Safe to operate, is safe without entereval + methstart + =item :base_mem These memory related ops are not included in :base_core because they @@ -14,25 +14,26 @@ #define FEATURE_BAREWORD_FILEHANDLES_BIT 0x0001 #define FEATURE_BITWISE_BIT 0x0002 -#define FEATURE___SUB___BIT 0x0004 -#define FEATURE_MYREF_BIT 0x0008 -#define FEATURE_DEFER_BIT 0x0010 -#define FEATURE_EVALBYTES_BIT 0x0020 -#define FEATURE_MORE_DELIMS_BIT 0x0040 -#define FEATURE_FC_BIT 0x0080 -#define FEATURE_INDIRECT_BIT 0x0100 -#define FEATURE_ISA_BIT 0x0200 -#define FEATURE_MODULE_TRUE_BIT 0x0400 -#define FEATURE_MULTIDIMENSIONAL_BIT 0x0800 -#define FEATURE_POSTDEREF_QQ_BIT 0x1000 -#define FEATURE_REFALIASING_BIT 0x2000 -#define FEATURE_SAY_BIT 0x4000 -#define FEATURE_SIGNATURES_BIT 0x8000 -#define FEATURE_STATE_BIT 0x10000 -#define FEATURE_SWITCH_BIT 0x20000 -#define FEATURE_TRY_BIT 0x40000 -#define FEATURE_UNIEVAL_BIT 0x80000 -#define FEATURE_UNICODE_BIT 0x100000 +#define FEATURE_CLASS_BIT 0x0004 +#define FEATURE___SUB___BIT 0x0008 +#define FEATURE_MYREF_BIT 0x0010 +#define FEATURE_DEFER_BIT 0x0020 +#define FEATURE_EVALBYTES_BIT 0x0040 +#define FEATURE_MORE_DELIMS_BIT 0x0080 +#define FEATURE_FC_BIT 0x0100 +#define FEATURE_INDIRECT_BIT 0x0200 +#define FEATURE_ISA_BIT 0x0400 +#define FEATURE_MODULE_TRUE_BIT 0x0800 +#define FEATURE_MULTIDIMENSIONAL_BIT 0x1000 +#define FEATURE_POSTDEREF_QQ_BIT 0x2000 +#define FEATURE_REFALIASING_BIT 0x4000 +#define FEATURE_SAY_BIT 0x8000 +#define FEATURE_SIGNATURES_BIT 0x10000 +#define FEATURE_STATE_BIT 0x20000 +#define FEATURE_SWITCH_BIT 0x40000 +#define FEATURE_TRY_BIT 0x80000 +#define FEATURE_UNIEVAL_BIT 0x100000 +#define FEATURE_UNICODE_BIT 0x200000 #define FEATURE_BUNDLE_DEFAULT 0 #define FEATURE_BUNDLE_510 1 @@ -91,6 +92,12 @@ FEATURE_IS_ENABLED_MASK(FEATURE_TRY_BIT) \ ) +#define FEATURE_CLASS_IS_ENABLED \ + ( \ + CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ + FEATURE_IS_ENABLED_MASK(FEATURE_CLASS_BIT) \ + ) + #define FEATURE_DEFER_IS_ENABLED \ ( \ CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ @@ -303,6 +310,14 @@ S_magic_sethint_feature(pTHX_ SV *keysv, const char *keypv, STRLEN keylen, } return; + case 'c': + if (keylen == sizeof("feature_class")-1 + && memcmp(subf+1, "lass", keylen - sizeof("feature_")) == 0) { + mask = FEATURE_CLASS_BIT; + break; + } + return; + case 'd': if (keylen == sizeof("feature_defer")-1 && memcmp(subf+1, "efer", keylen - sizeof("feature_")) == 0) { @@ -605,23 +605,28 @@ S_maybe_add_coresub(pTHX_ HV * const stash, GV *gv, switch (code < 0 ? -code : code) { /* no support for \&CORE::infix; no support for funcs that do not parse like funcs */ - case KEY___DATA__: case KEY___END__: case KEY_and: case KEY_AUTOLOAD: - case KEY_BEGIN : case KEY_CHECK : case KEY_catch : case KEY_cmp: - case KEY_default : case KEY_defer : case KEY_DESTROY: + case KEY___DATA__: case KEY___END__ : + case KEY_ADJUST : case KEY_AUTOLOAD: case KEY_BEGIN : case KEY_CHECK : + case KEY_DESTROY : case KEY_END : case KEY_INIT : case KEY_UNITCHECK: + case KEY_and : case KEY_catch : case KEY_class : + case KEY_cmp : case KEY_default: case KEY_defer : case KEY_do : case KEY_dump : case KEY_else : case KEY_elsif : - case KEY_END : case KEY_eq : case KEY_eval : case KEY_finally: + case KEY_eq : case KEY_eval : case KEY_field : + case KEY_finally: case KEY_for : case KEY_foreach: case KEY_format: case KEY_ge : case KEY_given : case KEY_goto : case KEY_grep : case KEY_gt : - case KEY_if : case KEY_isa : case KEY_INIT : case KEY_last : + case KEY_if : case KEY_isa : + case KEY_last : case KEY_le : case KEY_local : case KEY_lt : case KEY_m : - case KEY_map : case KEY_my: + case KEY_map : case KEY_method : case KEY_my : case KEY_ne : case KEY_next : case KEY_no: case KEY_or: case KEY_our: case KEY_package: case KEY_print: case KEY_printf: case KEY_q : case KEY_qq : case KEY_qr : case KEY_qw : case KEY_qx : case KEY_redo : case KEY_require: case KEY_return: case KEY_s : case KEY_say : case KEY_sort : case KEY_state: case KEY_sub : - case KEY_tr : case KEY_try : case KEY_UNITCHECK: case KEY_unless: + case KEY_tr : case KEY_try : + case KEY_unless: case KEY_until: case KEY_use : case KEY_when : case KEY_while : case KEY_x : case KEY_xor : case KEY_y : return NULL; @@ -132,10 +132,19 @@ struct xpvhv_aux { used to detect each() after insert for warnings */ #endif U32 xhv_aux_flags; /* assorted extra flags */ + + /* The following fields are only valid if we have the flag HvAUXf_IS_CLASS */ + AV *xhv_class_adjust_blocks; /* CVs containing the ADJUST blocks */ + PADNAMELIST *xhv_class_fields; /* PADNAMEs with PadnameIsFIELD() */ + PADOFFSET xhv_class_next_fieldix; }; #define HvAUXf_SCAN_STASH 0x1 /* stash is being scanned by gv_check */ #define HvAUXf_NO_DEREF 0x2 /* @{}, %{} etc (and nomethod) not present */ +#define HvAUXf_IS_CLASS 0x4 /* the package is a 'class' */ + +#define HvSTASH_IS_CLASS(hv) \ + (HvHasAUX(hv) && HvAUX(hv)->xhv_aux_flags & HvAUXf_IS_CLASS) /* hash structure: */ /* This structure must match the beginning of struct xpvmg in sv.h. */ diff --git a/keywords.c b/keywords.c index ed26717ba0..54f5d94fd1 100644 --- a/keywords.c +++ b/keywords.c @@ -978,7 +978,7 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) goto unknown; } - case 5: /* 41 tokens of length 5 */ + case 5: /* 43 tokens of length 5 */ switch (name[0]) { case 'B': @@ -1119,14 +1119,29 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) } case 'l': - if (name[2] == 'o' && - name[3] == 's' && - name[4] == 'e') - { /* close */ - return -KEY_close; - } + switch (name[2]) + { + case 'a': + if (name[3] == 's' && + name[4] == 's') + { /* class */ + return (all_keywords || FEATURE_CLASS_IS_ENABLED ? -KEY_class : 0); + } - goto unknown; + goto unknown; + + case 'o': + if (name[3] == 's' && + name[4] == 'e') + { /* close */ + return -KEY_close; + } + + goto unknown; + + default: + goto unknown; + } case 'r': if (name[2] == 'y' && @@ -1177,6 +1192,16 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) goto unknown; + case 'i': + if (name[2] == 'e' && + name[3] == 'l' && + name[4] == 'd') + { /* field */ + return (all_keywords || FEATURE_CLASS_IS_ENABLED ? -KEY_field : 0); + } + + goto unknown; + case 'l': if (name[2] == 'o' && name[3] == 'c' && @@ -1494,9 +1519,21 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) goto unknown; } - case 6: /* 33 tokens of length 6 */ + case 6: /* 35 tokens of length 6 */ switch (name[0]) { + case 'A': + if (name[1] == 'D' && + name[2] == 'J' && + name[3] == 'U' && + name[4] == 'S' && + name[5] == 'T') + { /* ADJUST */ + return (all_keywords || FEATURE_CLASS_IS_ENABLED ? KEY_ADJUST : 0); + } + + goto unknown; + case 'a': if (name[1] == 'c' && name[2] == 'c' && @@ -1650,54 +1687,71 @@ Perl_keyword (pTHX_ const char *name, I32 len, bool all_keywords) } case 'm': - if (name[1] == 's' && - name[2] == 'g') + switch (name[1]) { - switch (name[3]) - { - case 'c': - if (name[4] == 't' && - name[5] == 'l') - { /* msgctl */ - return -KEY_msgctl; - } + case 'e': + if (name[2] == 't' && + name[3] == 'h' && + name[4] == 'o' && + name[5] == 'd') + { /* method */ + return (all_keywords || FEATURE_CLASS_IS_ENABLED ? -KEY_method : 0); + } - goto unknown; + goto unknown; - case 'g': - if (name[4] == 'e' && - name[5] == 't') - { /* msgget */ - return -KEY_msgget; - } + case 's': + if (name[2] == 'g') + { + switch (name[3]) + { + case 'c': + if (name[4] == 't' && + name[5] == 'l') + { /* msgctl */ + return -KEY_msgctl; + } - goto unknown; + goto unknown; - case 'r': - if (name[4] == 'c' && - name[5] == 'v') - { /* msgrcv */ - return -KEY_msgrcv; - } + case 'g': + if (name[4] == 'e' && + name[5] == 't') + { /* msgget */ + return -KEY_msgget; + } - goto unknown; + goto unknown; - case 's': - if (name[4] == 'n' && - name[5] == 'd') - { /* msgsnd */ - return -KEY_msgsnd; + case 'r': + if (name[4] == 'c' && + name[5] == 'v') + { /* msgrcv */ + return -KEY_msgrcv; + } + + goto unknown; + + case 's': + if (name[4] == 'n' && + name[5] == 'd') + { /* msgsnd */ + return -KEY_msgsnd; + } + + goto unknown; + + default: + goto unknown; } + } - goto unknown; + goto unknown; - default: - goto unknown; - } + default: + goto unknown; } - goto unknown; - case 'p': if (name[1] == 'r' && name[2] == 'i' && @@ -3504,5 +3558,5 @@ unknown: } /* Generated from: - * b680fb3a27b173b65d9c4e534ad92897c925e336476879a6be1da18ac55cbe8b regen/keywords.pl + * eb67e851da14ede1aad67aec4a387fa250c1345407fad0a02988d2d8d3cc27f2 regen/keywords.pl * ex: set ro: */ diff --git a/keywords.h b/keywords.h index f2304ba9cf..feae6f6dce 100644 --- a/keywords.h +++ b/keywords.h @@ -20,260 +20,264 @@ #define KEY___DATA__ 4 #define KEY___END__ 5 #define KEY___SUB__ 6 -#define KEY_AUTOLOAD 7 -#define KEY_BEGIN 8 -#define KEY_UNITCHECK 9 -#define KEY_DESTROY 10 -#define KEY_END 11 -#define KEY_INIT 12 -#define KEY_CHECK 13 -#define KEY_abs 14 -#define KEY_accept 15 -#define KEY_alarm 16 -#define KEY_and 17 -#define KEY_atan2 18 -#define KEY_bind 19 -#define KEY_binmode 20 -#define KEY_bless 21 -#define KEY_break 22 -#define KEY_caller 23 -#define KEY_catch 24 -#define KEY_chdir 25 -#define KEY_chmod 26 -#define KEY_chomp 27 -#define KEY_chop 28 -#define KEY_chown 29 -#define KEY_chr 30 -#define KEY_chroot 31 -#define KEY_close 32 -#define KEY_closedir 33 -#define KEY_cmp 34 -#define KEY_connect 35 -#define KEY_continue 36 -#define KEY_cos 37 -#define KEY_crypt 38 -#define KEY_dbmclose 39 -#define KEY_dbmopen 40 -#define KEY_default 41 -#define KEY_defer 42 -#define KEY_defined 43 -#define KEY_delete 44 -#define KEY_die 45 -#define KEY_do 46 -#define KEY_dump 47 -#define KEY_each 48 -#define KEY_else 49 -#define KEY_elsif 50 -#define KEY_endgrent 51 -#define KEY_endhostent 52 -#define KEY_endnetent 53 -#define KEY_endprotoent 54 -#define KEY_endpwent 55 -#define KEY_endservent 56 -#define KEY_eof 57 -#define KEY_eq 58 -#define KEY_eval 59 -#define KEY_evalbytes 60 -#define KEY_exec 61 -#define KEY_exists 62 -#define KEY_exit 63 -#define KEY_exp 64 -#define KEY_fc 65 -#define KEY_fcntl 66 -#define KEY_fileno 67 -#define KEY_finally 68 -#define KEY_flock 69 -#define KEY_for 70 -#define KEY_foreach 71 -#define KEY_fork 72 -#define KEY_format 73 -#define KEY_formline 74 -#define KEY_ge 75 -#define KEY_getc 76 -#define KEY_getgrent 77 -#define KEY_getgrgid 78 -#define KEY_getgrnam 79 -#define KEY_gethostbyaddr 80 -#define KEY_gethostbyname 81 -#define KEY_gethostent 82 -#define KEY_getlogin 83 -#define KEY_getnetbyaddr 84 -#define KEY_getnetbyname 85 -#define KEY_getnetent 86 -#define KEY_getpeername 87 -#define KEY_getpgrp 88 -#define KEY_getppid 89 -#define KEY_getpriority 90 -#define KEY_getprotobyname 91 -#define KEY_getprotobynumber 92 -#define KEY_getprotoent 93 -#define KEY_getpwent 94 -#define KEY_getpwnam 95 -#define KEY_getpwuid 96 -#define KEY_getservbyname 97 -#define KEY_getservbyport 98 -#define KEY_getservent 99 -#define KEY_getsockname 100 -#define KEY_getsockopt 101 -#define KEY_given 102 -#define KEY_glob 103 -#define KEY_gmtime 104 -#define KEY_goto 105 -#define KEY_grep 106 -#define KEY_gt 107 -#define KEY_hex 108 -#define KEY_if 109 -#define KEY_index 110 -#define KEY_int 111 -#define KEY_ioctl 112 -#define KEY_isa 113 -#define KEY_join 114 -#define KEY_keys 115 -#define KEY_kill 116 -#define KEY_last 117 -#define KEY_lc 118 -#define KEY_lcfirst 119 -#define KEY_le 120 -#define KEY_length 121 -#define KEY_link 122 -#define KEY_listen 123 -#define KEY_local 124 -#define KEY_localtime 125 -#define KEY_lock 126 -#define KEY_log 127 -#define KEY_lstat 128 -#define KEY_lt 129 -#define KEY_m 130 -#define KEY_map 131 -#define KEY_mkdir 132 -#define KEY_msgctl 133 -#define KEY_msgget 134 -#define KEY_msgrcv 135 -#define KEY_msgsnd 136 -#define KEY_my 137 -#define KEY_ne 138 -#define KEY_next 139 -#define KEY_no 140 -#define KEY_not 141 -#define KEY_oct 142 -#define KEY_open 143 -#define KEY_opendir 144 -#define KEY_or 145 -#define KEY_ord 146 -#define KEY_our 147 -#define KEY_pack 148 -#define KEY_package 149 -#define KEY_pipe 150 -#define KEY_pop 151 -#define KEY_pos 152 -#define KEY_print 153 -#define KEY_printf 154 -#define KEY_prototype 155 -#define KEY_push 156 -#define KEY_q 157 -#define KEY_qq 158 -#define KEY_qr 159 -#define KEY_quotemeta 160 -#define KEY_qw 161 -#define KEY_qx 162 -#define KEY_rand 163 -#define KEY_read 164 -#define KEY_readdir 165 -#define KEY_readline 166 -#define KEY_readlink 167 -#define KEY_readpipe 168 -#define KEY_recv 169 -#define KEY_redo 170 -#define KEY_ref 171 -#define KEY_rename 172 -#define KEY_require 173 -#define KEY_reset 174 -#define KEY_return 175 -#define KEY_reverse 176 -#define KEY_rewinddir 177 -#define KEY_rindex 178 -#define KEY_rmdir 179 -#define KEY_s 180 -#define KEY_say 181 -#define KEY_scalar 182 -#define KEY_seek 183 -#define KEY_seekdir 184 -#define KEY_select 185 -#define KEY_semctl 186 -#define KEY_semget 187 -#define KEY_semop 188 -#define KEY_send 189 -#define KEY_setgrent 190 -#define KEY_sethostent 191 -#define KEY_setnetent 192 -#define KEY_setpgrp 193 -#define KEY_setpriority 194 -#define KEY_setprotoent 195 -#define KEY_setpwent 196 -#define KEY_setservent 197 -#define KEY_setsockopt 198 -#define KEY_shift 199 -#define KEY_shmctl 200 -#define KEY_shmget 201 -#define KEY_shmread 202 -#define KEY_shmwrite 203 -#define KEY_shutdown 204 -#define KEY_sin 205 -#define KEY_sleep 206 -#define KEY_socket 207 -#define KEY_socketpair 208 -#define KEY_sort 209 -#define KEY_splice 210 -#define KEY_split 211 -#define KEY_sprintf 212 -#define KEY_sqrt 213 -#define KEY_srand 214 -#define KEY_stat 215 -#define KEY_state 216 -#define KEY_study 217 -#define KEY_sub 218 -#define KEY_substr 219 -#define KEY_symlink 220 -#define KEY_syscall 221 -#define KEY_sysopen 222 -#define KEY_sysread 223 -#define KEY_sysseek 224 -#define KEY_system 225 -#define KEY_syswrite 226 -#define KEY_tell 227 -#define KEY_telldir 228 -#define KEY_tie 229 -#define KEY_tied 230 -#define KEY_time 231 -#define KEY_times 232 -#define KEY_tr 233 -#define KEY_try 234 -#define KEY_truncate 235 -#define KEY_uc 236 -#define KEY_ucfirst 237 -#define KEY_umask 238 -#define KEY_undef 239 -#define KEY_unless 240 -#define KEY_unlink 241 -#define KEY_unpack 242 -#define KEY_unshift 243 -#define KEY_untie 244 -#define KEY_until 245 -#define KEY_use 246 -#define KEY_utime 247 -#define KEY_values 248 -#define KEY_vec 249 -#define KEY_wait 250 -#define KEY_waitpid 251 -#define KEY_wantarray 252 -#define KEY_warn 253 -#define KEY_when 254 -#define KEY_while 255 -#define KEY_write 256 -#define KEY_x 257 -#define KEY_xor 258 -#define KEY_y 259 +#define KEY_ADJUST 7 +#define KEY_AUTOLOAD 8 +#define KEY_BEGIN 9 +#define KEY_UNITCHECK 10 +#define KEY_DESTROY 11 +#define KEY_END 12 +#define KEY_INIT 13 +#define KEY_CHECK 14 +#define KEY_abs 15 +#define KEY_accept 16 +#define KEY_alarm 17 +#define KEY_and 18 +#define KEY_atan2 19 +#define KEY_bind 20 +#define KEY_binmode 21 +#define KEY_bless 22 +#define KEY_break 23 +#define KEY_caller 24 +#define KEY_catch 25 +#define KEY_chdir 26 +#define KEY_chmod 27 +#define KEY_chomp 28 +#define KEY_chop 29 +#define KEY_chown 30 +#define KEY_chr 31 +#define KEY_chroot 32 +#define KEY_class 33 +#define KEY_close 34 +#define KEY_closedir 35 +#define KEY_cmp 36 +#define KEY_connect 37 +#define KEY_continue 38 +#define KEY_cos 39 +#define KEY_crypt 40 +#define KEY_dbmclose 41 +#define KEY_dbmopen 42 +#define KEY_default 43 +#define KEY_defer 44 +#define KEY_defined 45 +#define KEY_delete 46 +#define KEY_die 47 +#define KEY_do 48 +#define KEY_dump 49 +#define KEY_each 50 +#define KEY_else 51 +#define KEY_elsif 52 +#define KEY_endgrent 53 +#define KEY_endhostent 54 +#define KEY_endnetent 55 +#define KEY_endprotoent 56 +#define KEY_endpwent 57 +#define KEY_endservent 58 +#define KEY_eof 59 +#define KEY_eq 60 +#define KEY_eval 61 +#define KEY_evalbytes 62 +#define KEY_exec 63 +#define KEY_exists 64 +#define KEY_exit 65 +#define KEY_exp 66 +#define KEY_fc 67 +#define KEY_fcntl 68 +#define KEY_field 69 +#define KEY_fileno 70 +#define KEY_finally 71 +#define KEY_flock 72 +#define KEY_for 73 +#define KEY_foreach 74 +#define KEY_fork 75 +#define KEY_format 76 +#define KEY_formline 77 +#define KEY_ge 78 +#define KEY_getc 79 +#define KEY_getgrent 80 +#define KEY_getgrgid 81 +#define KEY_getgrnam 82 +#define KEY_gethostbyaddr 83 +#define KEY_gethostbyname 84 +#define KEY_gethostent 85 +#define KEY_getlogin 86 +#define KEY_getnetbyaddr 87 +#define KEY_getnetbyname 88 +#define KEY_getnetent 89 +#define KEY_getpeername 90 +#define KEY_getpgrp 91 +#define KEY_getppid 92 +#define KEY_getpriority 93 +#define KEY_getprotobyname 94 +#define KEY_getprotobynumber 95 +#define KEY_getprotoent 96 +#define KEY_getpwent 97 +#define KEY_getpwnam 98 +#define KEY_getpwuid 99 +#define KEY_getservbyname 100 +#define KEY_getservbyport 101 +#define KEY_getservent 102 +#define KEY_getsockname 103 +#define KEY_getsockopt 104 +#define KEY_given 105 +#define KEY_glob 106 +#define KEY_gmtime 107 +#define KEY_goto 108 +#define KEY_grep 109 +#define KEY_gt 110 +#define KEY_hex 111 +#define KEY_if 112 +#define KEY_index 113 +#define KEY_int 114 +#define KEY_ioctl 115 +#define KEY_isa 116 +#define KEY_join 117 +#define KEY_keys 118 +#define KEY_kill 119 +#define KEY_last 120 +#define KEY_lc 121 +#define KEY_lcfirst 122 +#define KEY_le 123 +#define KEY_length 124 +#define KEY_link 125 +#define KEY_listen 126 +#define KEY_local 127 +#define KEY_localtime 128 +#define KEY_lock 129 +#define KEY_log 130 +#define KEY_lstat 131 +#define KEY_lt 132 +#define KEY_m 133 +#define KEY_map 134 +#define KEY_method 135 +#define KEY_mkdir 136 +#define KEY_msgctl 137 +#define KEY_msgget 138 +#define KEY_msgrcv 139 +#define KEY_msgsnd 140 +#define KEY_my 141 +#define KEY_ne 142 +#define KEY_next 143 +#define KEY_no 144 +#define KEY_not 145 +#define KEY_oct 146 +#define KEY_open 147 +#define KEY_opendir 148 +#define KEY_or 149 +#define KEY_ord 150 +#define KEY_our 151 +#define KEY_pack 152 +#define KEY_package 153 +#define KEY_pipe 154 +#define KEY_pop 155 +#define KEY_pos 156 +#define KEY_print 157 +#define KEY_printf 158 +#define KEY_prototype 159 +#define KEY_push 160 +#define KEY_q 161 +#define KEY_qq 162 +#define KEY_qr 163 +#define KEY_quotemeta 164 +#define KEY_qw 165 +#define KEY_qx 166 +#define KEY_rand 167 +#define KEY_read 168 +#define KEY_readdir 169 +#define KEY_readline 170 +#define KEY_readlink 171 +#define KEY_readpipe 172 +#define KEY_recv 173 +#define KEY_redo 174 +#define KEY_ref 175 +#define KEY_rename 176 +#define KEY_require 177 +#define KEY_reset 178 +#define KEY_return 179 +#define KEY_reverse 180 +#define KEY_rewinddir 181 +#define KEY_rindex 182 +#define KEY_rmdir 183 +#define KEY_s 184 +#define KEY_say 185 +#define KEY_scalar 186 +#define KEY_seek 187 +#define KEY_seekdir 188 +#define KEY_select 189 +#define KEY_semctl 190 +#define KEY_semget 191 +#define KEY_semop 192 +#define KEY_send 193 +#define KEY_setgrent 194 +#define KEY_sethostent 195 +#define KEY_setnetent 196 +#define KEY_setpgrp 197 +#define KEY_setpriority 198 +#define KEY_setprotoent 199 +#define KEY_setpwent 200 +#define KEY_setservent 201 +#define KEY_setsockopt 202 +#define KEY_shift 203 +#define KEY_shmctl 204 +#define KEY_shmget 205 +#define KEY_shmread 206 +#define KEY_shmwrite 207 +#define KEY_shutdown 208 +#define KEY_sin 209 +#define KEY_sleep 210 +#define KEY_socket 211 +#define KEY_socketpair 212 +#define KEY_sort 213 +#define KEY_splice 214 +#define KEY_split 215 +#define KEY_sprintf 216 +#define KEY_sqrt 217 +#define KEY_srand 218 +#define KEY_stat 219 +#define KEY_state 220 +#define KEY_study 221 +#define KEY_sub 222 +#define KEY_substr 223 +#define KEY_symlink 224 +#define KEY_syscall 225 +#define KEY_sysopen 226 +#define KEY_sysread 227 +#define KEY_sysseek 228 +#define KEY_system 229 +#define KEY_syswrite 230 +#define KEY_tell 231 +#define KEY_telldir 232 +#define KEY_tie 233 +#define KEY_tied 234 +#define KEY_time 235 +#define KEY_times 236 +#define KEY_tr 237 +#define KEY_try 238 +#define KEY_truncate 239 +#define KEY_uc 240 +#define KEY_ucfirst 241 +#define KEY_umask 242 +#define KEY_undef 243 +#define KEY_unless 244 +#define KEY_unlink 245 +#define KEY_unpack 246 +#define KEY_unshift 247 +#define KEY_untie 248 +#define KEY_until 249 +#define KEY_use 250 +#define KEY_utime 251 +#define KEY_values 252 +#define KEY_vec 253 +#define KEY_wait 254 +#define KEY_waitpid 255 +#define KEY_wantarray 256 +#define KEY_warn 257 +#define KEY_when 258 +#define KEY_while 259 +#define KEY_write 260 +#define KEY_x 261 +#define KEY_xor 262 +#define KEY_y 263 /* Generated from: - * b680fb3a27b173b65d9c4e534ad92897c925e336476879a6be1da18ac55cbe8b regen/keywords.pl + * eb67e851da14ede1aad67aec4a387fa250c1345407fad0a02988d2d8d3cc27f2 regen/keywords.pl * ex: set ro: */ diff --git a/lib/B/Deparse-core.t b/lib/B/Deparse-core.t index 48d23f7dce..378365e5e9 100644 --- a/lib/B/Deparse-core.t +++ b/lib/B/Deparse-core.t @@ -354,6 +354,7 @@ my %not_tested = map { $_ => 1} qw( __FILE__ __LINE__ __PACKAGE__ + ADJUST AUTOLOAD BEGIN CHECK @@ -363,10 +364,12 @@ my %not_tested = map { $_ => 1} qw( INIT UNITCHECK catch + class default defer else elsif + field finally for foreach @@ -374,6 +377,7 @@ my %not_tested = map { $_ => 1} qw( given if m + method no package q diff --git a/lib/B/Op_private.pm b/lib/B/Op_private.pm index 173e07b6c6..8d20e0278c 100644 --- a/lib/B/Op_private.pm +++ b/lib/B/Op_private.pm @@ -443,6 +443,7 @@ $bits{method_named}{0} = $bf[0]; $bits{method_redir}{0} = $bf[0]; $bits{method_redir_super}{0} = $bf[0]; $bits{method_super}{0} = $bf[0]; +$bits{methstart}{0} = $bf[0]; @{$bits{mkdir}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); @{$bits{modulo}}{1,0} = ($bf[1], $bf[1]); @{$bits{msgctl}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); diff --git a/lib/feature.pm b/lib/feature.pm index 312c077721..407448832d 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -4,13 +4,14 @@ # Any changes made here will be lost! package feature; -our $VERSION = '1.79'; +our $VERSION = '1.80'; our %feature = ( fc => 'feature_fc', isa => 'feature_isa', say => 'feature_say', try => 'feature_try', + class => 'feature_class', defer => 'feature_defer', state => 'feature_state', switch => 'feature_switch', @@ -38,7 +39,7 @@ our %feature_bundle = ( "5.27" => [qw(bareword_filehandles bitwise current_sub evalbytes fc indirect multidimensional postderef_qq say state switch unicode_eval unicode_strings)], "5.35" => [qw(bareword_filehandles bitwise current_sub evalbytes fc isa postderef_qq say signatures state unicode_eval unicode_strings)], "5.37" => [qw(bitwise current_sub evalbytes fc isa module_true postderef_qq say signatures state unicode_eval unicode_strings)], - "all" => [qw(bareword_filehandles bitwise current_sub declared_refs defer evalbytes extra_paired_delimiters fc indirect isa module_true multidimensional postderef_qq refaliasing say signatures state switch try unicode_eval unicode_strings)], + "all" => [qw(bareword_filehandles bitwise class current_sub declared_refs defer evalbytes extra_paired_delimiters fc indirect isa module_true multidimensional postderef_qq refaliasing say signatures state switch try unicode_eval unicode_strings)], "default" => [qw(bareword_filehandles indirect multidimensional)], ); @@ -876,6 +877,17 @@ failures, but reaching the end of the module when this feature is in effect will prevent C<perl> from throwing an exception that the module "did not return a true value". +=head2 The 'class' feature + +B<WARNING>: This feature is still experimental and the implementation may +change or be removed in future versions of Perl. For this reason, Perl will +warn when you use the feature, unless you have explicitly disabled the warning: + + no warnings "experimental::class"; + +This feature enables the C<class> block syntax and other associated keywords +which implement the "new" object system, previously codenamed "Corinna". + =head1 FEATURE BUNDLES It's possible to load multiple features together, using diff --git a/lib/warnings.pm b/lib/warnings.pm index 8931215ab0..554cd09500 100644 --- a/lib/warnings.pm +++ b/lib/warnings.pm @@ -5,7 +5,7 @@ package warnings; -our $VERSION = "1.61"; +our $VERSION = "1.62"; # Verify that we're called correctly so that warnings will work. # Can't use Carp, since Carp uses us! @@ -110,6 +110,9 @@ our %Offsets = ( 'experimental::extra_paired_delimiters'=> 140, 'experimental::for_list' => 142, 'scalar' => 144, + + # Warnings Categories added in Perl 5.037 + 'experimental::class' => 146, ); our %Bits = ( @@ -123,9 +126,10 @@ our %Bits = ( 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\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", # [7] 'exiting' => "\x40\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\x40\x45\x05\x44\x55\x55\x00", # [51..53,55..57,61,63..71] + 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x45\x05\x44\x55\x55\x04", # [51..53,55..57,61,63..71,73] 'experimental::args_array_with_signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [67] 'experimental::builtin' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [68] + 'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [73] 'experimental::const_attr' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [55] 'experimental::declared_refs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [61] 'experimental::defer' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [69] @@ -199,9 +203,10 @@ our %DeadBits = ( 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\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", # [7] 'exiting' => "\x80\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\x80\x8a\x0a\x88\xaa\xaa\x00", # [51..53,55..57,61,63..71] + 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x8a\x0a\x88\xaa\xaa\x08", # [51..53,55..57,61,63..71,73] 'experimental::args_array_with_signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [67] 'experimental::builtin' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [68] + 'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [73] 'experimental::const_attr' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [55] 'experimental::declared_refs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [61] 'experimental::defer' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [69] @@ -276,8 +281,8 @@ 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"; -our $DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x44\x15\x44\x55\x55\x00"; # [2,4,22,23,25,53,55..58,61,63..71] -our $LAST_BIT = 146 ; +our $DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x44\x15\x44\x55\x55\x04"; # [2,4,22,23,25,53,55..58,61,63..71,73] +our $LAST_BIT = 148 ; our $BYTES = 19 ; sub Croaker @@ -888,6 +893,8 @@ The current hierarchy is: | | | +- experimental::builtin | | + | +- experimental::class + | | | +- experimental::const_attr | | | +- experimental::declared_refs @@ -772,9 +772,15 @@ Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags) /* allocate a spare slot and store the name in that slot */ - off = pad_add_name_pvn(name, len, - (is_our ? padadd_OUR : - PL_parser->in_my == KEY_state ? padadd_STATE : 0), + U32 addflags = 0; + if(is_our) + addflags |= padadd_OUR; + else if(PL_parser->in_my == KEY_state) + addflags |= padadd_STATE; + else if(PL_parser->in_my == KEY_field) + addflags |= padadd_FIELD; + + off = pad_add_name_pvn(name, len, addflags, PL_parser->in_my_stash, (is_our /* $_ is always in main::, even with our */ @@ -1313,6 +1319,14 @@ Perl_op_clear(pTHX_ OP *o) PerlMemShared_free(cUNOP_AUXo->op_aux - 1); } break; + + case OP_METHSTART: + { + UNOP_AUX_item *aux = cUNOP_AUXo->op_aux; + /* Every item in aux is a UV, so nothing in it to free */ + Safefree(aux); + } + break; } if (o->op_targ > 0) { @@ -15357,7 +15371,9 @@ Perl_report_redefined_cv(pTHX_ const SV *name, const CV *old_cv, Perl_warner(aTHX_ packWARN(WARN_REDEFINE), is_const ? "Constant subroutine %" SVf " redefined" - : "Subroutine %" SVf " redefined", + : CvIsMETHOD(old_cv) + ? "Method %" SVf " redefined" + : "Subroutine %" SVf " redefined", SVfARG(name)); } } @@ -565,6 +565,7 @@ EXTCONST char* const PL_op_name[] INIT({ [OP_FLOOR] = "floor", [OP_IS_TAINTED] = "is_tainted", [OP_HELEMEXISTSOR] = "helemexistsor", + [OP_METHSTART] = "methstart", [OP_max] = "freed", }); @@ -988,6 +989,7 @@ EXTCONST char* const PL_op_desc[] INIT({ [OP_FLOOR] = "floor", [OP_IS_TAINTED] = "is_tainted", [OP_HELEMEXISTSOR] = "hash element exists or", + [OP_METHSTART] = "method start", [OP_max] = "freed op", }); @@ -1416,6 +1418,7 @@ INIT({ [OP_FLOOR] = Perl_pp_floor, [OP_IS_TAINTED] = Perl_pp_is_tainted, [OP_HELEMEXISTSOR] = Perl_pp_helemexistsor, + [OP_METHSTART] = Perl_pp_methstart, }); EXT Perl_check_t PL_check[] /* or perlvars.h */ @@ -1839,6 +1842,7 @@ INIT({ [OP_FLOOR] = Perl_ck_null, [OP_IS_TAINTED] = Perl_ck_null, [OP_HELEMEXISTSOR] = Perl_ck_helemexistsor, + [OP_METHSTART] = Perl_ck_null, }); EXTCONST U32 PL_opargs[] INIT({ @@ -2261,6 +2265,7 @@ EXTCONST U32 PL_opargs[] INIT({ [OP_FLOOR] = 0x0000011e, [OP_IS_TAINTED] = 0x00000106, [OP_HELEMEXISTSOR] = 0x00011300, + [OP_METHSTART] = 0x00000f00, }); END_EXTERN_C @@ -2955,6 +2960,7 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { [OP_FLOOR] = 78, [OP_IS_TAINTED] = 0, [OP_HELEMEXISTSOR] = 253, + [OP_METHSTART] = 0, }; @@ -2973,7 +2979,7 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { */ EXTCONST U16 PL_op_private_bitdefs[] = { - 0x0003, /* scalar, prototype, refgen, srefgen, readline, regcmaybe, regcreset, regcomp, substcont, chop, schop, defined, study, preinc, i_preinc, predec, i_predec, postinc, i_postinc, postdec, i_postdec, negate, i_negate, not, ucfirst, lcfirst, uc, lc, quotemeta, aeach, avalues, each, pop, shift, grepstart, mapstart, mapwhile, range, and, or, dor, andassign, orassign, dorassign, argcheck, method, method_named, method_super, method_redir, method_redir_super, entergiven, leavegiven, enterwhen, leavewhen, untie, tied, dbmclose, getsockname, getpeername, lstat, stat, readlink, readdir, telldir, rewinddir, closedir, localtime, alarm, require, dofile, entertry, ghbyname, gnbyname, gpbyname, shostent, snetent, sprotoent, sservent, gpwnam, gpwuid, ggrnam, ggrgid, lock, once, fc, anonconst, cmpchain_and, cmpchain_dup, entertrycatch, catch, is_bool, is_weak, weaken, unweaken, is_tainted */ + 0x0003, /* scalar, prototype, refgen, srefgen, readline, regcmaybe, regcreset, regcomp, substcont, chop, schop, defined, study, preinc, i_preinc, predec, i_predec, postinc, i_postinc, postdec, i_postdec, negate, i_negate, not, ucfirst, lcfirst, uc, lc, quotemeta, aeach, avalues, each, pop, shift, grepstart, mapstart, mapwhile, range, and, or, dor, andassign, orassign, dorassign, argcheck, method, method_named, method_super, method_redir, method_redir_super, entergiven, leavegiven, enterwhen, leavewhen, untie, tied, dbmclose, getsockname, getpeername, lstat, stat, readlink, readdir, telldir, rewinddir, closedir, localtime, alarm, require, dofile, entertry, ghbyname, gnbyname, gpbyname, shostent, snetent, sprotoent, sservent, gpwnam, gpwuid, ggrnam, ggrgid, lock, once, fc, anonconst, cmpchain_and, cmpchain_dup, entertrycatch, catch, is_bool, is_weak, weaken, unweaken, is_tainted, methstart */ 0x353c, 0x4639, /* pushmark */ 0x00bd, /* wantarray, runcv */ 0x0558, 0x1b70, 0x46ec, 0x4288, 0x3a65, /* const */ @@ -3477,6 +3483,7 @@ EXTCONST U8 PL_op_private_valid[] = { [OP_FLOOR] = (OPpARG1_MASK|OPpTARGET_MY), [OP_IS_TAINTED] = (OPpARG1_MASK), [OP_HELEMEXISTSOR] = (OPpARG1_MASK|OPpHELEMEXISTSOR_DELETE), + [OP_METHSTART] = (OPpARG1_MASK), }; @@ -433,10 +433,11 @@ typedef enum opcode { OP_FLOOR = 416, OP_IS_TAINTED = 417, OP_HELEMEXISTSOR = 418, + OP_METHSTART = 419, OP_max } opcode; -#define MAXO 419 +#define MAXO 420 #define OP_FREED MAXO /* the OP_IS_* macros are optimized to a simple range check because @@ -565,6 +565,10 @@ S_pad_alloc_name(pTHX_ PADNAME *name, U32 flags, HV *typestash, else if (flags & padadd_STATE) { PadnameFLAGS(name) |= PADNAMEf_STATE; } + if (flags & padadd_FIELD) { + assert(HvSTASH_IS_CLASS(PL_curstash)); + class_add_field(PL_curstash, name); + } padnamelist_store(PL_comppad_name, offset, name); if (PadnameLEN(name) > 1) @@ -589,6 +593,7 @@ flags can be OR'ed together: padadd_OUR redundantly specifies if it's a package var padadd_STATE variable will retain value persistently padadd_NO_DUP_CHECK skip check for lexical shadowing + padadd_FIELD specifies that the lexical is a field for a class =cut */ @@ -602,7 +607,7 @@ Perl_pad_add_name_pvn(pTHX_ const char *namepv, STRLEN namelen, PERL_ARGS_ASSERT_PAD_ADD_NAME_PVN; - if (flags & ~(padadd_OUR|padadd_STATE|padadd_NO_DUP_CHECK)) + if (flags & ~(padadd_OUR|padadd_STATE|padadd_NO_DUP_CHECK|padadd_FIELD)) Perl_croak(aTHX_ "panic: pad_add_name_pvn illegal flag bits 0x%" UVxf, (UV)flags); @@ -612,7 +617,7 @@ Perl_pad_add_name_pvn(pTHX_ const char *namepv, STRLEN namelen, ENTER; SAVEFREEPADNAME(name); /* in case of fatal warnings */ /* check for duplicate declaration */ - pad_check_dup(name, flags & padadd_OUR, ourstash); + pad_check_dup(name, flags & (padadd_OUR|padadd_FIELD), ourstash); PadnameREFCNT_inc(name); LEAVE; } @@ -864,12 +869,13 @@ S_pad_check_dup(pTHX_ PADNAME *name, U32 flags, const HV *ourstash) PADNAME **svp; PADOFFSET top, off; const U32 is_our = flags & padadd_OUR; + bool is_field = flags & padadd_FIELD; PERL_ARGS_ASSERT_PAD_CHECK_DUP; ASSERT_CURPAD_ACTIVE("pad_check_dup"); - assert((flags & ~padadd_OUR) == 0); + assert((flags & ~(padadd_OUR|padadd_FIELD)) == 0); if (PadnamelistMAX(PL_comppad_name) < 0 || !ckWARN(WARN_SHADOW)) return; /* nothing to check */ @@ -888,12 +894,16 @@ S_pad_check_dup(pTHX_ PADNAME *name, U32 flags, const HV *ourstash) { if (is_our && (PadnameIsOUR(pn))) break; /* "our" masking "our" */ + if (is_field && PadnameIsFIELD(pn) && + PadnameFIELDINFO(pn)->fieldstash != PL_curstash) + break; /* field of a different class */ /* diag_listed_as: "%s" variable %s masks earlier declaration in same %s */ Perl_warner(aTHX_ packWARN(WARN_SHADOW), "\"%s\" %s %" PNf " masks earlier declaration in same %s", ( is_our ? "our" : PL_parser->in_my == KEY_my ? "my" : PL_parser->in_my == KEY_sigvar ? "my" : + PL_parser->in_my == KEY_field ? "field" : "state" ), *PadnamePV(pn) == '&' ? "subroutine" : "variable", PNfARG(pn), @@ -1094,10 +1104,11 @@ S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 flags, const CV* cv, SV **new_capturep; const PADLIST * const padlist = CvPADLIST(cv); const bool staleok = cBOOL(flags & padadd_STALEOK); + const bool fieldok = cBOOL(flags & padfind_FIELD_OK); PERL_ARGS_ASSERT_PAD_FINDLEX; - flags &= ~ padadd_STALEOK; /* one-shot flag */ + flags &= ~(padadd_STALEOK|padfind_FIELD_OK); /* one-shot flags */ if (flags) Perl_croak(aTHX_ "panic: pad_findlex illegal flag bits 0x%" UVxf, (UV)flags); @@ -1136,6 +1147,10 @@ S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 flags, const CV* cv, fake_offset = 0; *out_name = name_p[offset]; /* return the name */ + if (PadnameIsFIELD(*out_name) && !fieldok) + croak("Field %" SVf " is not accessible outside a method", + SVfARG(PadnameSV(*out_name))); + /* set PAD_FAKELEX_MULTI if this lex can have multiple * instances. For now, we just test !CvUNIQUE(cv), but * ideally, we should detect my's declared within loops @@ -1259,13 +1274,27 @@ S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 flags, const CV* cv, new_capturep = out_capture ? out_capture : CvLATE(cv) ? NULL : &new_capture; - offset = pad_findlex(namepv, namelen, - flags | padadd_STALEOK*(new_capturep == &new_capture), + U32 recurse_flags = flags; + if(new_capturep == &new_capture) + recurse_flags |= padadd_STALEOK; + if(CvIsMETHOD(cv)) + recurse_flags |= padfind_FIELD_OK; + + offset = pad_findlex(namepv, namelen, recurse_flags, CvOUTSIDE(cv), CvOUTSIDE_SEQ(cv), 1, new_capturep, out_name, out_flags); if (offset == NOT_IN_PAD) return NOT_IN_PAD; + if (PadnameIsFIELD(*out_name)) { + HV *fieldstash = PadnameFIELDINFO(*out_name)->fieldstash; + + /* fields are only visible to the class that declared them */ + if(fieldstash != PL_curstash) + croak("Field %" SVf " of %" HvNAMEf_QUOTEDPREFIX " is not accessible in a method of %" HvNAMEf_QUOTEDPREFIX, + SVfARG(PadnameSV(*out_name)), HvNAMEfARG(fieldstash), HvNAMEfARG(PL_curstash)); + } + /* found in an outer CV. Add appropriate fake entry to this pad */ /* don't add new fake entries (via eval) to CVs that we have already @@ -2777,6 +2806,10 @@ Perl_newPADNAMEouter(PADNAME *outer) another entry. The original pad name owns the buffer. */ PadnameREFCNT_inc(PADNAME_FROM_PV(PadnamePV(outer))); PadnameFLAGS(pn) = PADNAMEf_OUTER; + if(PadnameIsFIELD(outer)) { + PadnameFIELDINFO(pn) = PadnameFIELDINFO(outer); + PadnameFLAGS(pn) |= PADNAMEf_FIELD; + } PadnameLEN(pn) = PadnameLEN(outer); return pn; } @@ -55,6 +55,8 @@ struct padnamelist { # define PERL_PADNAME_MINIMAL #endif +struct padname_fieldinfo; + #define _PADNAME_BASE \ char * xpadn_pv; \ HV * xpadn_ourstash; \ @@ -62,6 +64,7 @@ struct padnamelist { HV * xpadn_typestash; \ CV * xpadn_protocv; \ } xpadn_type_u; \ + struct padname_fieldinfo *xpadn_fieldinfo; \ U32 xpadn_low; \ U32 xpadn_high; \ U32 xpadn_refcnt; \ @@ -87,6 +90,14 @@ struct padname_with_str { #define PADNAME_FROM_PV(s) \ ((PADNAME *)((s) - STRUCT_OFFSET(struct padname_with_str, xpadn_str))) +/* Most padnames are not field names. Keep all the field-related info in its + * own substructure, stored in ->xpadn_fieldinfo. + */ +struct padname_fieldinfo { + PADOFFSET fieldix; /* index of this field within ObjectFIELDS() array */ + HV *fieldstash; /* original class package which added this field */ +}; + /* a value that PL_cop_seqmax is guaranteed never to be, * flagging that a lexical is being introduced, or has not yet left scope @@ -132,6 +143,8 @@ typedef enum { #define padadd_NO_DUP_CHECK 0x04 /* skip warning on dups. */ #define padadd_STALEOK 0x08 /* allow stale lexical in active * sub, but only one level up */ +#define padadd_FIELD 0x10 /* set PADNAMEt_FIELD */ +#define padfind_FIELD_OK 0x20 /* pad_findlex is permitted to see fields */ /* ASSERT_CURPAD_LEGAL and ASSERT_CURPAD_ACTIVE respectively determine * whether PL_comppad and PL_curpad are consistent and whether they have @@ -244,6 +257,10 @@ are often referred to as 'fake'. =for apidoc m|bool|PadnameIsSTATE|PADNAME * pn Whether this is a "state" variable. +=for apidoc m|bool|PadnameIsFIELD|PADNAME * pn +Whether this is a "field" variable. PADNAMEs where this is true will +have additional information available via C<PadnameFIELDINFO>. + =for apidoc m|HV *|PadnameTYPE|PADNAME * pn The stash associated with a typed lexical. This returns the C<%Foo::> hash for C<my Foo $bar>. @@ -330,9 +347,11 @@ Restore the old pad saved into the local variable C<opad> by C<PAD_SAVE_LOCAL()> #define PadnameREFCNT_dec(pn) Perl_padname_free(aTHX_ pn) #define PadnameOURSTASH_set(pn,s) (PadnameOURSTASH(pn) = (s)) #define PadnameTYPE_set(pn,s) (PadnameTYPE(pn) = (s)) +#define PadnameFIELDINFO(pn) (pn)->xpadn_fieldinfo #define PadnameOUTER(pn) (PadnameFLAGS(pn) & PADNAMEf_OUTER) #define PadnameIsSTATE(pn) (PadnameFLAGS(pn) & PADNAMEf_STATE) #define PadnameLVALUE(pn) (PadnameFLAGS(pn) & PADNAMEf_LVALUE) +#define PadnameIsFIELD(pn) (PadnameFLAGS(pn) & PADNAMEf_FIELD) #define PadnameLVALUE_on(pn) (PadnameFLAGS(pn) |= PADNAMEf_LVALUE) #define PadnameIsSTATE_on(pn) (PadnameFLAGS(pn) |= PADNAMEf_STATE) @@ -342,6 +361,7 @@ Restore the old pad saved into the local variable C<opad> by C<PAD_SAVE_LOCAL()> #define PADNAMEf_LVALUE 0x04 /* used as lvalue */ #define PADNAMEf_TYPED 0x08 /* for B; unused by core */ #define PADNAMEf_OUR 0x10 /* for B; unused by core */ +#define PADNAMEf_FIELD 0x20 /* field var */ /* backward compatibility */ #ifndef PERL_CORE @@ -5,7 +5,7 @@ */ case 2: -#line 156 "perly.y" +#line 161 "perly.y" { parser->expect = XSTATE; (yyval.ival) = 0; @@ -14,7 +14,7 @@ case 2: break; case 3: -#line 161 "perly.y" +#line 166 "perly.y" { newPROG(block_end((ps[-1].val.ival),(ps[0].val.opval))); PL_compiling.cop_seq = 0; @@ -24,7 +24,7 @@ case 2: break; case 4: -#line 167 "perly.y" +#line 172 "perly.y" { parser->expect = XTERM; (yyval.ival) = 0; @@ -33,7 +33,7 @@ case 2: break; case 5: -#line 172 "perly.y" +#line 177 "perly.y" { PL_eval_root = (ps[0].val.opval); (yyval.ival) = 0; @@ -42,7 +42,7 @@ case 2: break; case 6: -#line 177 "perly.y" +#line 182 "perly.y" { parser->expect = XBLOCK; (yyval.ival) = 0; @@ -51,7 +51,7 @@ case 2: break; case 7: -#line 182 "perly.y" +#line 187 "perly.y" { PL_pad_reset_pending = TRUE; PL_eval_root = (ps[0].val.opval); @@ -63,7 +63,7 @@ case 2: break; case 8: -#line 190 "perly.y" +#line 195 "perly.y" { parser->expect = XSTATE; (yyval.ival) = 0; @@ -72,7 +72,7 @@ case 2: break; case 9: -#line 195 "perly.y" +#line 200 "perly.y" { PL_pad_reset_pending = TRUE; PL_eval_root = (ps[0].val.opval); @@ -84,7 +84,7 @@ case 2: break; case 10: -#line 203 "perly.y" +#line 208 "perly.y" { parser->expect = XSTATE; (yyval.ival) = 0; @@ -93,7 +93,7 @@ case 2: break; case 11: -#line 208 "perly.y" +#line 213 "perly.y" { PL_pad_reset_pending = TRUE; PL_eval_root = (ps[0].val.opval); @@ -105,7 +105,7 @@ case 2: break; case 12: -#line 216 "perly.y" +#line 221 "perly.y" { parser->expect = XSTATE; (yyval.ival) = 0; @@ -114,7 +114,7 @@ case 2: break; case 13: -#line 221 "perly.y" +#line 226 "perly.y" { PL_eval_root = (ps[0].val.opval); (yyval.ival) = 0; @@ -123,7 +123,7 @@ case 2: break; case 14: -#line 226 "perly.y" +#line 231 "perly.y" { parser->expect = XSTATE; (yyval.ival) = 0; @@ -132,7 +132,7 @@ case 2: break; case 15: -#line 231 "perly.y" +#line 236 "perly.y" { PL_eval_root = (ps[0].val.opval); (yyval.ival) = 0; @@ -141,7 +141,19 @@ case 2: break; case 16: -#line 239 "perly.y" +#line 245 "perly.y" + { (yyval.ival) = KW_SUB_named_sig; } + + break; + + case 17: +#line 247 "perly.y" + { (yyval.ival) = KW_METHOD_named; } + + break; + + case 18: +#line 252 "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)); @@ -149,14 +161,14 @@ case 2: break; - case 17: -#line 246 "perly.y" + case 19: +#line 259 "perly.y" { (yyval.opval) = NULL; } break; - case 18: -#line 251 "perly.y" + case 20: +#line 264 "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)); @@ -164,15 +176,15 @@ case 2: break; - case 19: -#line 258 "perly.y" + case 21: +#line 271 "perly.y" { (yyval.ival) = block_start(TRUE); parser->parsed_sub = 0; } break; - case 20: -#line 263 "perly.y" + case 22: +#line 276 "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)); @@ -180,33 +192,33 @@ case 2: break; - case 21: -#line 270 "perly.y" + case 23: +#line 283 "perly.y" { (yyval.ival) = block_start(FALSE); parser->parsed_sub = 0; } break; - case 23: -#line 279 "perly.y" + case 25: +#line 292 "perly.y" { parser->in_my = 1; } break; - case 24: -#line 281 "perly.y" + case 26: +#line 294 "perly.y" { parser->in_my = 0; intro_my(); } break; - case 25: -#line 283 "perly.y" + case 27: +#line 296 "perly.y" { (yyval.opval) = (ps[-2].val.opval); } break; - case 27: -#line 290 "perly.y" + case 29: +#line 303 "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)) @@ -215,8 +227,8 @@ case 2: break; - case 29: -#line 301 "perly.y" + case 31: +#line 314 "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)) @@ -225,22 +237,22 @@ case 2: break; - case 30: -#line 310 "perly.y" + case 32: +#line 323 "perly.y" { (yyval.opval) = (ps[0].val.opval) ? newSTATEOP(0, NULL, (ps[0].val.opval)) : NULL; } break; - case 31: -#line 314 "perly.y" + case 33: +#line 327 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 32: -#line 318 "perly.y" + case 34: +#line 331 "perly.y" { SV *label = cSVOPx_sv((ps[-1].val.opval)); (yyval.opval) = newSTATEOP(SvFLAGS(label) & SVf_UTF8, @@ -250,8 +262,8 @@ case 2: break; - case 33: -#line 325 "perly.y" + case 35: +#line 338 "perly.y" { SV *label = cSVOPx_sv((ps[-1].val.opval)); (yyval.opval) = newSTATEOP(SvFLAGS(label) & SVf_UTF8, @@ -261,14 +273,14 @@ case 2: break; - case 34: -#line 335 "perly.y" + case 36: +#line 348 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 35: -#line 337 "perly.y" + case 37: +#line 350 "perly.y" { CV *fmtcv = PL_compcv; newFORM((ps[-2].val.ival), (ps[-1].val.opval), (ps[0].val.opval)); @@ -281,8 +293,8 @@ case 2: break; - case 36: -#line 349 "perly.y" + case 38: +#line 362 "perly.y" { init_named_cv(PL_compcv, (ps[-1].val.opval)); parser->in_my = 0; @@ -291,8 +303,8 @@ case 2: break; - case 37: -#line 355 "perly.y" + case 39: +#line 368 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); (ps[-5].val.opval)->op_type == OP_CONST @@ -306,23 +318,32 @@ case 2: break; - case 38: -#line 370 "perly.y" + case 40: +#line 383 "perly.y" { init_named_cv(PL_compcv, (ps[-1].val.opval)); + if((ps[-2].val.ival) == KW_METHOD_named) { + croak_kw_unless_class("method"); + class_prepare_method_parse(PL_compcv); + } parser->in_my = 0; parser->in_my_stash = NULL; } break; - case 39: -#line 376 "perly.y" + case 41: +#line 393 "perly.y" { + OP *body = (ps[0].val.opval); + SvREFCNT_inc_simple_void(PL_compcv); + if((ps[-5].val.ival) == KW_METHOD_named) { + body = class_wrap_method_body(body); + } (ps[-4].val.opval)->op_type == OP_CONST - ? newATTRSUB((ps[-3].val.ival), (ps[-4].val.opval), NULL, (ps[-1].val.opval), (ps[0].val.opval)) - : newMYSUB( (ps[-3].val.ival), (ps[-4].val.opval), NULL, (ps[-1].val.opval), (ps[0].val.opval)) + ? newATTRSUB((ps[-3].val.ival), (ps[-4].val.opval), NULL, (ps[-1].val.opval), body) + : newMYSUB( (ps[-3].val.ival), (ps[-4].val.opval), NULL, (ps[-1].val.opval), body) ; (yyval.opval) = NULL; intro_my(); @@ -331,8 +352,43 @@ case 2: break; - case 40: -#line 391 "perly.y" + case 42: +#line 409 "perly.y" + { + switch((ps[-1].val.ival)) { + case KEY_ADJUST: + croak_kw_unless_class("ADJUST"); + class_prepare_method_parse(PL_compcv); + break; + default: + NOT_REACHED; + } + } + + break; + + case 43: +#line 420 "perly.y" + { + OP *body = (ps[0].val.opval); + SvREFCNT_inc_simple_void(PL_compcv); + + CV *cv; + + switch((ps[-3].val.ival)) { + case KEY_ADJUST: + body = class_wrap_method_body(body); + cv = newATTRSUB((ps[-2].val.ival), NULL, NULL, NULL, body); + class_add_ADJUST(PL_curstash, cv); + break; + } + (yyval.opval) = NULL; + } + + break; + + case 44: +#line 440 "perly.y" { package((ps[-1].val.opval)); if ((ps[-2].val.opval)) @@ -342,14 +398,26 @@ case 2: break; - case 41: -#line 398 "perly.y" + case 45: +#line 447 "perly.y" + { + package((ps[-1].val.opval)); + if ((ps[-2].val.opval)) + package_version((ps[-2].val.opval)); + (yyval.opval) = NULL; + class_setup_stash(PL_curstash); + } + + break; + + case 46: +#line 455 "perly.y" { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ } break; - case 42: -#line 402 "perly.y" + case 47: +#line 459 "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)); @@ -359,8 +427,8 @@ case 2: break; - case 43: -#line 409 "perly.y" + case 48: +#line 466 "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))); @@ -369,8 +437,8 @@ case 2: break; - case 44: -#line 415 "perly.y" + case 49: +#line 472 "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)))); @@ -379,8 +447,8 @@ case 2: break; - case 45: -#line 421 "perly.y" + case 50: +#line 478 "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); @@ -388,20 +456,20 @@ case 2: break; - case 46: -#line 426 "perly.y" + case 51: +#line 483 "perly.y" { (yyval.opval) = block_end((ps[-3].val.ival), newWHENOP((ps[-2].val.opval), op_scope((ps[0].val.opval)))); } break; - case 47: -#line 428 "perly.y" + case 52: +#line 485 "perly.y" { (yyval.opval) = newWHENOP(0, op_scope((ps[0].val.opval))); } break; - case 48: -#line 430 "perly.y" + case 53: +#line 487 "perly.y" { (yyval.opval) = block_end((ps[-5].val.ival), newWHILEOP(0, 1, NULL, @@ -411,8 +479,8 @@ case 2: break; - case 49: -#line 437 "perly.y" + case 54: +#line 494 "perly.y" { (yyval.opval) = block_end((ps[-5].val.ival), newWHILEOP(0, 1, NULL, @@ -422,20 +490,20 @@ case 2: break; - case 50: -#line 444 "perly.y" + case 55: +#line 501 "perly.y" { parser->expect = XTERM; } break; - case 51: -#line 446 "perly.y" + case 56: +#line 503 "perly.y" { parser->expect = XTERM; } break; - case 52: -#line 449 "perly.y" + case 57: +#line 506 "perly.y" { OP *initop = (ps[-9].val.opval); OP *forop = newWHILEOP(0, 1, NULL, @@ -453,8 +521,8 @@ case 2: break; - case 53: -#line 464 "perly.y" + case 58: +#line 521 "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); @@ -462,8 +530,8 @@ case 2: break; - case 54: -#line 469 "perly.y" + case 59: +#line 526 "perly.y" { if ((ps[-6].val.opval)->op_type == OP_PADSV) /* degenerate case of 1 var: for my ($x) .... @@ -475,8 +543,8 @@ case 2: break; - case 55: -#line 478 "perly.y" + case 60: +#line 535 "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))); @@ -485,14 +553,14 @@ case 2: break; - case 56: -#line 484 "perly.y" + case 61: +#line 541 "perly.y" { parser->in_my = 0; (yyval.opval) = my((ps[0].val.opval)); } break; - case 57: -#line 486 "perly.y" + case 62: +#line 543 "perly.y" { (yyval.opval) = block_end( (ps[-7].val.ival), @@ -508,8 +576,8 @@ case 2: break; - case 58: -#line 499 "perly.y" + case 63: +#line 556 "perly.y" { (yyval.opval) = block_end((ps[-4].val.ival), newFOROP( 0, op_lvalue(newUNOP(OP_REFGEN, 0, @@ -520,8 +588,8 @@ case 2: break; - case 59: -#line 507 "perly.y" + case 64: +#line 564 "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))); @@ -530,8 +598,8 @@ case 2: break; - case 60: -#line 513 "perly.y" + case 65: +#line 570 "perly.y" { if(!(ps[0].val.opval)) { yyerror("catch block requires a (VAR)"); @@ -541,8 +609,8 @@ case 2: break; - case 61: -#line 520 "perly.y" + case 66: +#line 577 "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)))); @@ -553,8 +621,8 @@ case 2: break; - case 62: -#line 528 "perly.y" + case 67: +#line 585 "perly.y" { /* a block is a loop that happens once */ (yyval.opval) = newWHILEOP(0, 1, NULL, @@ -563,8 +631,8 @@ case 2: break; - case 63: -#line 534 "perly.y" + case 68: +#line 591 "perly.y" { package((ps[-2].val.opval)); if ((ps[-3].val.opval)) { @@ -574,8 +642,8 @@ case 2: break; - case 64: -#line 541 "perly.y" + case 69: +#line 598 "perly.y" { /* a block is a loop that happens once */ (yyval.opval) = newWHILEOP(0, 1, NULL, @@ -586,24 +654,56 @@ case 2: break; - case 65: -#line 549 "perly.y" + case 70: +#line 606 "perly.y" + { + package((ps[-2].val.opval)); + if ((ps[-3].val.opval)) { + package_version((ps[-3].val.opval)); + } + class_setup_stash(PL_curstash); + } + + break; + + case 71: +#line 614 "perly.y" + { + /* a block is a loop that happens once */ + (yyval.opval) = newWHILEOP(0, 1, NULL, + NULL, block_end((ps[-3].val.ival), (ps[-1].val.opval)), NULL, 0); + if (parser->copline > (line_t)(ps[-4].val.ival)) + parser->copline = (line_t)(ps[-4].val.ival); + } + + break; + + case 72: +#line 622 "perly.y" { (yyval.opval) = (ps[-1].val.opval); } break; - case 66: -#line 553 "perly.y" + case 73: +#line 626 "perly.y" + { + (yyval.opval) = (ps[-1].val.opval); + } + + break; + + case 74: +#line 630 "perly.y" { (yyval.opval) = newDEFEROP(0, op_scope((ps[0].val.opval))); } break; - case 67: -#line 557 "perly.y" + case 75: +#line 634 "perly.y" { /* diag_listed_as: Unimplemented */ (yyval.opval) = newLISTOP(OP_DIE, 0, newOP(OP_PUSHMARK, 0), @@ -612,8 +712,8 @@ case 2: break; - case 68: -#line 563 "perly.y" + case 76: +#line 640 "perly.y" { (yyval.opval) = NULL; parser->copline = NOLINE; @@ -621,8 +721,8 @@ case 2: break; - case 69: -#line 571 "perly.y" + case 77: +#line 648 "perly.y" { OP *list; if ((ps[0].val.opval)) { OP *term = (ps[0].val.opval); @@ -640,63 +740,63 @@ case 2: break; - case 71: -#line 590 "perly.y" + case 79: +#line 667 "perly.y" { (yyval.opval) = op_unscope((ps[-1].val.opval)); } break; - case 73: -#line 598 "perly.y" + case 81: +#line 675 "perly.y" { (yyval.opval) = NULL; } break; - case 74: -#line 600 "perly.y" + case 82: +#line 677 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 75: -#line 602 "perly.y" + case 83: +#line 679 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[0].val.opval), (ps[-2].val.opval)); } break; - case 76: -#line 604 "perly.y" + case 84: +#line 681 "perly.y" { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[0].val.opval), (ps[-2].val.opval)); } break; - case 77: -#line 606 "perly.y" + case 85: +#line 683 "perly.y" { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((ps[0].val.opval)), (ps[-2].val.opval)); } break; - case 78: -#line 608 "perly.y" + case 86: +#line 685 "perly.y" { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (ps[0].val.opval), (ps[-2].val.opval)); } break; - case 79: -#line 610 "perly.y" + case 87: +#line 687 "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 80: -#line 613 "perly.y" + case 88: +#line 690 "perly.y" { (yyval.opval) = newWHENOP((ps[0].val.opval), op_scope((ps[-2].val.opval))); } break; - case 82: -#line 620 "perly.y" + case 90: +#line 697 "perly.y" { ((ps[0].val.opval))->op_flags |= OPf_PARENS; (yyval.opval) = op_scope((ps[0].val.opval)); @@ -704,8 +804,8 @@ case 2: break; - case 83: -#line 625 "perly.y" + case 91: +#line 702 "perly.y" { parser->copline = (line_t)(ps[-5].val.ival); (yyval.opval) = newCONDOP(0, newSTATEOP(OPf_SPECIAL,NULL,(ps[-3].val.opval)), @@ -715,87 +815,87 @@ case 2: break; - case 85: -#line 637 "perly.y" + case 93: +#line 714 "perly.y" { (yyval.opval) = op_scope((ps[0].val.opval)); } break; - case 86: -#line 642 "perly.y" + case 94: +#line 719 "perly.y" { (yyval.opval) = NULL; } break; - case 87: -#line 644 "perly.y" + case 95: +#line 721 "perly.y" { (yyval.opval) = op_scope((ps[0].val.opval)); } break; - case 88: -#line 649 "perly.y" + case 96: +#line 726 "perly.y" { (yyval.ival) = (PL_min_intro_pending && PL_max_intro_pending >= PL_min_intro_pending); intro_my(); } break; - case 91: -#line 661 "perly.y" + case 99: +#line 738 "perly.y" { YYSTYPE tmplval; (void)scan_num("1", &tmplval); (yyval.opval) = tmplval.opval; } break; - case 93: -#line 669 "perly.y" + case 101: +#line 746 "perly.y" { (yyval.opval) = invert(scalar((ps[0].val.opval))); } break; - case 94: -#line 674 "perly.y" + case 102: +#line 751 "perly.y" { (yyval.opval) = (ps[0].val.opval); intro_my(); } break; - case 95: -#line 678 "perly.y" + case 103: +#line 755 "perly.y" { (yyval.opval) = (ps[0].val.opval); intro_my(); } break; - case 96: -#line 681 "perly.y" + case 104: +#line 758 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 98: -#line 686 "perly.y" + case 106: +#line 763 "perly.y" { (yyval.ival) = start_subparse(FALSE, 0); SAVEFREESV(PL_compcv); } break; - case 99: -#line 692 "perly.y" + case 107: +#line 769 "perly.y" { (yyval.ival) = start_subparse(FALSE, CVf_ANON); SAVEFREESV(PL_compcv); } break; - case 100: -#line 697 "perly.y" + case 108: +#line 774 "perly.y" { (yyval.ival) = start_subparse(TRUE, 0); SAVEFREESV(PL_compcv); } break; - case 106: -#line 716 "perly.y" + case 114: +#line 793 "perly.y" { OP *attrlist = (ps[0].val.opval); if(attrlist && !PL_parser->sig_seen) @@ -805,50 +905,50 @@ case 2: break; - case 107: -#line 723 "perly.y" + case 115: +#line 800 "perly.y" { (yyval.opval) = NULL; } break; - case 108: -#line 728 "perly.y" + case 116: +#line 805 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 109: -#line 730 "perly.y" + case 117: +#line 807 "perly.y" { (yyval.opval) = NULL; } break; - case 110: -#line 741 "perly.y" + case 118: +#line 818 "perly.y" { parser->in_my = 0; (yyval.opval) = NULL; } break; - case 111: -#line 743 "perly.y" + case 119: +#line 820 "perly.y" { parser->in_my = 0; (yyval.opval) = (ps[0].val.opval); } break; - case 112: -#line 748 "perly.y" + case 120: +#line 825 "perly.y" { (yyval.ival) = '@'; } break; - case 113: -#line 750 "perly.y" + case 121: +#line 827 "perly.y" { (yyval.ival) = '%'; } break; - case 114: -#line 754 "perly.y" + case 122: +#line 831 "perly.y" { I32 sigil = (ps[-2].val.ival); OP *var = (ps[-1].val.opval); @@ -867,14 +967,14 @@ case 2: break; - case 116: -#line 775 "perly.y" + case 124: +#line 852 "perly.y" { (yyval.opval) = newARGDEFELEMOP(0, newOP(OP_NULL, 0), parser->sig_elems); } break; - case 117: -#line 777 "perly.y" + case 125: +#line 854 "perly.y" { I32 flags = 0; if ((ps[-1].val.ival) == OP_DORASSIGN) @@ -886,8 +986,8 @@ case 2: break; - case 118: -#line 790 "perly.y" + case 126: +#line 867 "perly.y" { OP *var = (ps[-1].val.opval); OP *defop = (ps[0].val.opval); @@ -946,46 +1046,46 @@ case 2: break; - case 119: -#line 850 "perly.y" + case 127: +#line 927 "perly.y" { parser->in_my = KEY_sigvar; (yyval.opval) = (ps[0].val.opval); } break; - case 120: -#line 852 "perly.y" + case 128: +#line 929 "perly.y" { parser->in_my = KEY_sigvar; (yyval.opval) = (ps[0].val.opval); } break; - case 121: -#line 858 "perly.y" + case 129: +#line 935 "perly.y" { (yyval.opval) = (ps[-1].val.opval); } break; - case 122: -#line 860 "perly.y" + case 130: +#line 937 "perly.y" { (yyval.opval) = op_append_list(OP_LINESEQ, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 123: -#line 864 "perly.y" + case 131: +#line 941 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 128: -#line 881 "perly.y" + case 136: +#line 958 "perly.y" { (yyval.opval) = (ps[-1].val.opval); } break; - case 129: -#line 884 "perly.y" + case 137: +#line 961 "perly.y" { ENTER; SAVEIV(parser->sig_elems); @@ -999,14 +1099,14 @@ case 2: break; - case 130: -#line 895 "perly.y" + case 138: +#line 972 "perly.y" { OP *sigops = (ps[0].val.opval); struct op_argcheck_aux *aux; OP *check; - if (!FEATURE_SIGNATURES_IS_ENABLED) + if (!FEATURE_SIGNATURES_IS_ENABLED && !CvIsMETHOD(PL_compcv)) Perl_croak(aTHX_ "Experimental " "subroutine signatures not enabled"); @@ -1056,14 +1156,14 @@ case 2: break; - case 132: -#line 952 "perly.y" + case 140: +#line 1029 "perly.y" { (yyval.opval) = NULL; } break; - case 133: -#line 958 "perly.y" + case 141: +#line 1035 "perly.y" { if (parser->copline > (line_t)(ps[-2].val.ival)) parser->copline = (line_t)(ps[-2].val.ival); @@ -1072,14 +1172,14 @@ case 2: break; - case 135: -#line 970 "perly.y" + case 143: +#line 1047 "perly.y" { (yyval.opval) = NULL; } break; - case 136: -#line 975 "perly.y" + case 144: +#line 1052 "perly.y" { if (parser->copline > (line_t)(ps[-2].val.ival)) parser->copline = (line_t)(ps[-2].val.ival); @@ -1089,38 +1189,38 @@ case 2: break; - case 137: -#line 986 "perly.y" + case 145: +#line 1063 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 138: -#line 988 "perly.y" + case 146: +#line 1065 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 139: -#line 990 "perly.y" + case 147: +#line 1067 "perly.y" { (yyval.opval) = newLOGOP((ps[-1].val.ival), 0, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 140: -#line 992 "perly.y" + case 148: +#line 1069 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 142: -#line 998 "perly.y" + case 150: +#line 1075 "perly.y" { (yyval.opval) = (ps[-1].val.opval); } break; - case 143: -#line 1000 "perly.y" + case 151: +#line 1077 "perly.y" { OP* term = (ps[0].val.opval); (yyval.opval) = op_append_elem(OP_LIST, (ps[-2].val.opval), term); @@ -1128,24 +1228,24 @@ case 2: break; - case 145: -#line 1009 "perly.y" + case 153: +#line 1086 "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 146: -#line 1013 "perly.y" + case 154: +#line 1090 "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 147: -#line 1017 "perly.y" + case 155: +#line 1094 "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)), @@ -1154,8 +1254,8 @@ case 2: break; - case 148: -#line 1023 "perly.y" + case 156: +#line 1100 "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)))); @@ -1163,8 +1263,8 @@ case 2: break; - case 149: -#line 1028 "perly.y" + case 157: +#line 1105 "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)), @@ -1173,8 +1273,8 @@ case 2: break; - case 150: -#line 1034 "perly.y" + case 158: +#line 1111 "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)), @@ -1183,33 +1283,33 @@ case 2: break; - case 151: -#line 1040 "perly.y" + case 159: +#line 1117 "perly.y" { (yyval.opval) = op_convert_list((ps[-1].val.ival), 0, (ps[0].val.opval)); } break; - case 152: -#line 1042 "perly.y" + case 160: +#line 1119 "perly.y" { (yyval.opval) = op_convert_list((ps[-3].val.ival), 0, (ps[-1].val.opval)); } break; - case 153: -#line 1044 "perly.y" + case 161: +#line 1121 "perly.y" { (yyval.opval) = op_convert_list((ps[-3].val.ival), 0, (ps[-1].val.opval)); } break; - case 154: -#line 1046 "perly.y" + case 162: +#line 1123 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); (yyval.opval) = newANONATTRSUB((ps[-1].val.ival), 0, NULL, (ps[0].val.opval)); } break; - case 155: -#line 1049 "perly.y" + case 163: +#line 1126 "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))); @@ -1217,21 +1317,21 @@ case 2: break; - case 158: -#line 1064 "perly.y" + case 166: +#line 1141 "perly.y" { (yyval.opval) = newBINOP(OP_GELEM, 0, (ps[-4].val.opval), scalar((ps[-2].val.opval))); } break; - case 159: -#line 1066 "perly.y" + case 167: +#line 1143 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((ps[-3].val.opval)), scalar((ps[-1].val.opval))); } break; - case 160: -#line 1069 "perly.y" + case 168: +#line 1146 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, ref(newAVREF((ps[-4].val.opval)),OP_RV2AV), scalar((ps[-1].val.opval))); @@ -1239,8 +1339,8 @@ case 2: break; - case 161: -#line 1074 "perly.y" + case 169: +#line 1151 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, ref(newAVREF((ps[-3].val.opval)),OP_RV2AV), scalar((ps[-1].val.opval))); @@ -1248,31 +1348,31 @@ case 2: break; - case 162: -#line 1079 "perly.y" + case 170: +#line 1156 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((ps[-4].val.opval)), jmaybe((ps[-2].val.opval))); } break; - case 163: -#line 1082 "perly.y" + case 171: +#line 1159 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, ref(newHVREF((ps[-5].val.opval)),OP_RV2HV), jmaybe((ps[-2].val.opval))); } break; - case 164: -#line 1086 "perly.y" + case 172: +#line 1163 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, ref(newHVREF((ps[-4].val.opval)),OP_RV2HV), jmaybe((ps[-2].val.opval))); } break; - case 165: -#line 1090 "perly.y" + case 173: +#line 1167 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, newCVREF(0, scalar((ps[-3].val.opval)))); if (parser->expect == XBLOCK) @@ -1281,8 +1381,8 @@ case 2: break; - case 166: -#line 1096 "perly.y" + case 174: +#line 1173 "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))))); @@ -1292,8 +1392,8 @@ case 2: break; - case 167: -#line 1104 "perly.y" + case 175: +#line 1181 "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))))); @@ -1303,8 +1403,8 @@ case 2: break; - case 168: -#line 1111 "perly.y" + case 176: +#line 1188 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, newCVREF(0, scalar((ps[-2].val.opval)))); if (parser->expect == XBLOCK) @@ -1313,56 +1413,56 @@ case 2: break; - case 169: -#line 1117 "perly.y" + case 177: +#line 1194 "perly.y" { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), (ps[-4].val.opval)); } break; - case 170: -#line 1119 "perly.y" + case 178: +#line 1196 "perly.y" { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), (ps[-3].val.opval)); } break; - case 171: -#line 1121 "perly.y" + case 179: +#line 1198 "perly.y" { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), NULL); } break; - case 172: -#line 1126 "perly.y" + case 180: +#line 1203 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 173: -#line 1128 "perly.y" + case 181: +#line 1205 "perly.y" { (yyval.opval) = newASSIGNOP(OPf_STACKED, (ps[-2].val.opval), (ps[-1].val.ival), (ps[0].val.opval)); } break; - case 174: -#line 1130 "perly.y" + case 182: +#line 1207 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 175: -#line 1132 "perly.y" + case 183: +#line 1209 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 176: -#line 1134 "perly.y" + case 184: +#line 1211 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 177: -#line 1136 "perly.y" + case 185: +#line 1213 "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))); @@ -1370,220 +1470,220 @@ case 2: break; - case 178: -#line 1141 "perly.y" + case 186: +#line 1218 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 179: -#line 1143 "perly.y" + case 187: +#line 1220 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 180: -#line 1145 "perly.y" + case 188: +#line 1222 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 181: -#line 1147 "perly.y" + case 189: +#line 1224 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 182: -#line 1149 "perly.y" + case 190: +#line 1226 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 183: -#line 1151 "perly.y" + case 191: +#line 1228 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 184: -#line 1153 "perly.y" + case 192: +#line 1230 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 185: -#line 1155 "perly.y" + case 193: +#line 1232 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 186: -#line 1157 "perly.y" + case 194: +#line 1234 "perly.y" { (yyval.opval) = newRANGE((ps[-1].val.ival), scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 187: -#line 1159 "perly.y" + case 195: +#line 1236 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 188: -#line 1161 "perly.y" + case 196: +#line 1238 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 189: -#line 1163 "perly.y" + case 197: +#line 1240 "perly.y" { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 190: -#line 1165 "perly.y" + case 198: +#line 1242 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 191: -#line 1167 "perly.y" + case 199: +#line 1244 "perly.y" { (yyval.opval) = newLOGOP(OP_DOR, 0, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 192: -#line 1169 "perly.y" + case 200: +#line 1246 "perly.y" { (yyval.opval) = bind_match((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 193: -#line 1171 "perly.y" + case 201: +#line 1248 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 194: -#line 1175 "perly.y" + case 202: +#line 1252 "perly.y" { (yyval.opval) = cmpchain_finish((ps[0].val.opval)); } break; - case 195: -#line 1177 "perly.y" + case 203: +#line 1254 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 196: -#line 1179 "perly.y" + case 204: +#line 1256 "perly.y" { yyerror("syntax error"); YYERROR; } break; - case 197: -#line 1181 "perly.y" + case 205: +#line 1258 "perly.y" { yyerror("syntax error"); YYERROR; } break; - case 198: -#line 1183 "perly.y" + case 206: +#line 1260 "perly.y" { (yyval.opval) = build_infix_plugin((ps[-2].val.opval), (ps[0].val.opval), (ps[-1].val.pval)); } break; - case 199: -#line 1187 "perly.y" + case 207: +#line 1264 "perly.y" { (yyval.opval) = cmpchain_start((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 200: -#line 1189 "perly.y" + case 208: +#line 1266 "perly.y" { (yyval.opval) = cmpchain_extend((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 201: -#line 1193 "perly.y" + case 209: +#line 1270 "perly.y" { (yyval.opval) = cmpchain_finish((ps[0].val.opval)); } break; - case 202: -#line 1195 "perly.y" + case 210: +#line 1272 "perly.y" { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); } break; - case 203: -#line 1197 "perly.y" + case 211: +#line 1274 "perly.y" { yyerror("syntax error"); YYERROR; } break; - case 204: -#line 1199 "perly.y" + case 212: +#line 1276 "perly.y" { yyerror("syntax error"); YYERROR; } break; - case 205: -#line 1203 "perly.y" + case 213: +#line 1280 "perly.y" { (yyval.opval) = cmpchain_start((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 206: -#line 1205 "perly.y" + case 214: +#line 1282 "perly.y" { (yyval.opval) = cmpchain_extend((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 207: -#line 1210 "perly.y" + case 215: +#line 1287 "perly.y" { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((ps[0].val.opval))); } break; - case 208: -#line 1212 "perly.y" + case 216: +#line 1289 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 209: -#line 1215 "perly.y" + case 217: +#line 1292 "perly.y" { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[0].val.opval))); } break; - case 210: -#line 1217 "perly.y" + case 218: +#line 1294 "perly.y" { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, scalar((ps[0].val.opval))); } break; - case 211: -#line 1219 "perly.y" + case 219: +#line 1296 "perly.y" { (yyval.opval) = newUNOP(OP_POSTINC, 0, op_lvalue(scalar((ps[-1].val.opval)), OP_POSTINC)); } break; - case 212: -#line 1222 "perly.y" + case 220: +#line 1299 "perly.y" { (yyval.opval) = newUNOP(OP_POSTDEC, 0, op_lvalue(scalar((ps[-1].val.opval)), OP_POSTDEC));} break; - case 213: -#line 1225 "perly.y" + case 221: +#line 1302 "perly.y" { (yyval.opval) = op_convert_list(OP_JOIN, 0, op_append_elem( OP_LIST, @@ -1597,138 +1697,159 @@ case 2: break; - case 214: -#line 1236 "perly.y" + case 222: +#line 1313 "perly.y" { (yyval.opval) = newUNOP(OP_PREINC, 0, op_lvalue(scalar((ps[0].val.opval)), OP_PREINC)); } break; - case 215: -#line 1239 "perly.y" + case 223: +#line 1316 "perly.y" { (yyval.opval) = newUNOP(OP_PREDEC, 0, op_lvalue(scalar((ps[0].val.opval)), OP_PREDEC)); } break; - case 216: -#line 1247 "perly.y" + case 224: +#line 1324 "perly.y" { (yyval.opval) = newANONLIST((ps[-1].val.opval)); } break; - case 217: -#line 1249 "perly.y" + case 225: +#line 1326 "perly.y" { (yyval.opval) = newANONHASH((ps[-2].val.opval)); } break; - case 218: -#line 1251 "perly.y" + case 226: +#line 1328 "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 219: -#line 1254 "perly.y" + case 227: +#line 1331 "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 220: -#line 1260 "perly.y" + case 228: +#line 1334 "perly.y" + { + croak_kw_unless_class("method"); + class_prepare_method_parse(PL_compcv); + } + + break; + + case 229: +#line 1339 "perly.y" + { + OP *body = (ps[0].val.opval); + + SvREFCNT_inc_simple_void(PL_compcv); + body = class_wrap_method_body(body); + (yyval.opval) = newANONATTRSUB((ps[-3].val.ival), NULL, (ps[-1].val.opval), body); + } + + break; + + case 230: +#line 1350 "perly.y" { (yyval.opval) = dofile((ps[0].val.opval), (ps[-1].val.ival));} break; - case 221: -#line 1262 "perly.y" + case 231: +#line 1352 "perly.y" { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, op_scope((ps[0].val.opval)));} break; - case 226: -#line 1270 "perly.y" + case 236: +#line 1360 "perly.y" { (yyval.opval) = newCONDOP(0, (ps[-4].val.opval), (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 227: -#line 1272 "perly.y" + case 237: +#line 1362 "perly.y" { (yyval.opval) = newUNOP(OP_REFGEN, 0, (ps[0].val.opval)); } break; - case 228: -#line 1274 "perly.y" + case 238: +#line 1364 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 229: -#line 1276 "perly.y" + case 239: +#line 1366 "perly.y" { (yyval.opval) = localize((ps[0].val.opval),0); } break; - case 230: -#line 1278 "perly.y" + case 240: +#line 1368 "perly.y" { (yyval.opval) = sawparens((ps[-1].val.opval)); } break; - case 231: -#line 1280 "perly.y" + case 241: +#line 1370 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 232: -#line 1282 "perly.y" + case 242: +#line 1372 "perly.y" { (yyval.opval) = sawparens(newNULLLIST()); } break; - case 233: -#line 1284 "perly.y" + case 243: +#line 1374 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 234: -#line 1286 "perly.y" + case 244: +#line 1376 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 235: -#line 1288 "perly.y" + case 245: +#line 1378 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 236: -#line 1290 "perly.y" + case 246: +#line 1380 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 237: -#line 1292 "perly.y" + case 247: +#line 1382 "perly.y" { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((ps[0].val.opval), OP_AV2ARYLEN));} break; - case 238: -#line 1294 "perly.y" + case 248: +#line 1384 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 239: -#line 1296 "perly.y" + case 249: +#line 1386 "perly.y" { (yyval.opval) = op_prepend_elem(OP_ASLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_ASLICE, 0, @@ -1741,8 +1862,8 @@ case 2: break; - case 240: -#line 1306 "perly.y" + case 250: +#line 1396 "perly.y" { (yyval.opval) = op_prepend_elem(OP_KVASLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_KVASLICE, 0, @@ -1755,8 +1876,8 @@ case 2: break; - case 241: -#line 1316 "perly.y" + case 251: +#line 1406 "perly.y" { (yyval.opval) = op_prepend_elem(OP_HSLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_HSLICE, 0, @@ -1769,8 +1890,8 @@ case 2: break; - case 242: -#line 1326 "perly.y" + case 252: +#line 1416 "perly.y" { (yyval.opval) = op_prepend_elem(OP_KVHSLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_KVHSLICE, 0, @@ -1783,27 +1904,27 @@ case 2: break; - case 243: -#line 1336 "perly.y" + case 253: +#line 1426 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 244: -#line 1338 "perly.y" + case 254: +#line 1428 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((ps[0].val.opval))); } break; - case 245: -#line 1340 "perly.y" + case 255: +#line 1430 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[-2].val.opval))); } break; - case 246: -#line 1343 "perly.y" + case 256: +#line 1433 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, (ps[-1].val.opval), scalar((ps[-3].val.opval)))); @@ -1811,153 +1932,153 @@ case 2: break; - case 247: -#line 1348 "perly.y" + case 257: +#line 1438 "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 248: -#line 1352 "perly.y" + case 258: +#line 1442 "perly.y" { (yyval.opval) = newSVREF((ps[-3].val.opval)); } break; - case 249: -#line 1354 "perly.y" + case 259: +#line 1444 "perly.y" { (yyval.opval) = newAVREF((ps[-3].val.opval)); } break; - case 250: -#line 1356 "perly.y" + case 260: +#line 1446 "perly.y" { (yyval.opval) = newHVREF((ps[-3].val.opval)); } break; - case 251: -#line 1358 "perly.y" + case 261: +#line 1448 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar(newCVREF((ps[-1].val.ival),(ps[-3].val.opval)))); } break; - case 252: -#line 1361 "perly.y" + case 262: +#line 1451 "perly.y" { (yyval.opval) = newGVREF(0,(ps[-3].val.opval)); } break; - case 253: -#line 1363 "perly.y" + case 263: +#line 1453 "perly.y" { (yyval.opval) = newOP((ps[0].val.ival), OPf_SPECIAL); PL_hints |= HINT_BLOCK_SCOPE; } break; - case 254: -#line 1366 "perly.y" + case 264: +#line 1456 "perly.y" { (yyval.opval) = newLOOPEX((ps[-1].val.ival),(ps[0].val.opval)); } break; - case 255: -#line 1368 "perly.y" + case 265: +#line 1458 "perly.y" { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[0].val.opval))); } break; - case 256: -#line 1370 "perly.y" + case 266: +#line 1460 "perly.y" { (yyval.opval) = newOP((ps[0].val.ival), 0); } break; - case 257: -#line 1372 "perly.y" + case 267: +#line 1462 "perly.y" { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, (ps[0].val.opval)); } break; - case 258: -#line 1374 "perly.y" + case 268: +#line 1464 "perly.y" { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, (ps[0].val.opval)); } break; - case 259: -#line 1376 "perly.y" + case 269: +#line 1466 "perly.y" { (yyval.opval) = newOP(OP_REQUIRE, (ps[0].val.ival) ? OPf_SPECIAL : 0); } break; - case 260: -#line 1378 "perly.y" + case 270: +#line 1468 "perly.y" { (yyval.opval) = newUNOP(OP_REQUIRE, (ps[-1].val.ival) ? OPf_SPECIAL : 0, (ps[0].val.opval)); } break; - case 261: -#line 1380 "perly.y" + case 271: +#line 1470 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[0].val.opval))); } break; - case 262: -#line 1382 "perly.y" + case 272: +#line 1472 "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 263: -#line 1385 "perly.y" + case 273: +#line 1475 "perly.y" { (yyval.opval) = newOP((ps[0].val.ival), 0); } break; - case 264: -#line 1387 "perly.y" + case 274: +#line 1477 "perly.y" { (yyval.opval) = newOP((ps[-2].val.ival), 0);} break; - case 265: -#line 1389 "perly.y" + case 275: +#line 1479 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 266: -#line 1391 "perly.y" + case 276: +#line 1481 "perly.y" { (yyval.opval) = (ps[-2].val.opval); } break; - case 267: -#line 1393 "perly.y" + case 277: +#line 1483 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[0].val.opval))); } break; - case 268: -#line 1395 "perly.y" + case 278: +#line 1485 "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 269: -#line 1399 "perly.y" + case 279: +#line 1489 "perly.y" { (yyval.opval) = newUNOP((ps[-3].val.ival), 0, (ps[-1].val.opval)); } break; - case 270: -#line 1401 "perly.y" + case 280: +#line 1491 "perly.y" { if ( (ps[0].val.opval)->op_type != OP_TRANS && (ps[0].val.opval)->op_type != OP_TRANSR @@ -1971,182 +2092,209 @@ case 2: break; - case 271: -#line 1412 "perly.y" + case 281: +#line 1502 "perly.y" { (yyval.opval) = pmruntime((ps[-5].val.opval), (ps[-2].val.opval), (ps[-1].val.opval), 1, (ps[-4].val.ival)); } break; - case 275: -#line 1421 "perly.y" + case 285: +#line 1511 "perly.y" { (yyval.opval) = my_attrs((ps[-1].val.opval),(ps[0].val.opval)); } break; - case 276: -#line 1423 "perly.y" + case 286: +#line 1513 "perly.y" { (yyval.opval) = localize((ps[0].val.opval),1); } break; - case 277: -#line 1425 "perly.y" + case 287: +#line 1515 "perly.y" { (yyval.opval) = newUNOP(OP_REFGEN, 0, my_attrs((ps[-1].val.opval),(ps[0].val.opval))); } break; - case 278: -#line 1427 "perly.y" + case 288: +#line 1517 "perly.y" { (yyval.opval) = newUNOP(OP_REFGEN, 0, localize((ps[0].val.opval),1)); } break; - case 279: -#line 1432 "perly.y" + case 289: +#line 1522 "perly.y" { (yyval.opval) = sawparens((ps[-1].val.opval)); } break; - case 280: -#line 1434 "perly.y" + case 290: +#line 1524 "perly.y" { (yyval.opval) = sawparens(newNULLLIST()); } break; - case 281: -#line 1437 "perly.y" + case 291: +#line 1527 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 282: -#line 1439 "perly.y" + case 292: +#line 1529 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 283: -#line 1441 "perly.y" + case 293: +#line 1531 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 289: -#line 1457 "perly.y" + case 294: +#line 1536 "perly.y" + { (yyval.pval) = PadnamelistARRAY(PL_comppad_name)[(ps[0].val.opval)->op_targ]; } + + break; + + case 295: +#line 1538 "perly.y" + { (yyval.pval) = PadnamelistARRAY(PL_comppad_name)[(ps[0].val.opval)->op_targ]; } + + break; + + case 296: +#line 1540 "perly.y" + { (yyval.pval) = PadnamelistARRAY(PL_comppad_name)[(ps[0].val.opval)->op_targ]; } + + break; + + case 297: +#line 1545 "perly.y" + { + parser->in_my = 0; + (yyval.opval) = newOP(OP_NULL, 0); + } + + break; + + case 303: +#line 1564 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; - case 290: -#line 1463 "perly.y" + case 304: +#line 1570 "perly.y" { parser->in_my = 0; (yyval.opval) = my((ps[0].val.opval)); } break; - case 291: -#line 1468 "perly.y" + case 305: +#line 1575 "perly.y" { (yyval.opval) = (ps[-1].val.opval); } break; - case 292: -#line 1470 "perly.y" + case 306: +#line 1577 "perly.y" { (yyval.opval) = op_append_elem(OP_LIST, (ps[-2].val.opval), (ps[0].val.opval)); } break; - case 294: -#line 1477 "perly.y" + case 308: +#line 1584 "perly.y" { parser->in_my = 0; (yyval.opval) = (ps[0].val.opval); } break; - case 302: -#line 1494 "perly.y" + case 316: +#line 1601 "perly.y" { (yyval.opval) = newCVREF((ps[-1].val.ival),(ps[0].val.opval)); } break; - case 303: -#line 1498 "perly.y" + case 317: +#line 1605 "perly.y" { (yyval.opval) = newSVREF((ps[0].val.opval)); } break; - case 304: -#line 1502 "perly.y" + case 318: +#line 1609 "perly.y" { (yyval.opval) = newAVREF((ps[0].val.opval)); if ((yyval.opval)) (yyval.opval)->op_private |= (ps[-1].val.ival); } break; - case 305: -#line 1508 "perly.y" + case 319: +#line 1615 "perly.y" { (yyval.opval) = newHVREF((ps[0].val.opval)); if ((yyval.opval)) (yyval.opval)->op_private |= (ps[-1].val.ival); } break; - case 306: -#line 1514 "perly.y" + case 320: +#line 1621 "perly.y" { (yyval.opval) = newAVREF((ps[0].val.opval)); } break; - case 307: -#line 1516 "perly.y" + case 321: +#line 1623 "perly.y" { (yyval.opval) = newAVREF((ps[-3].val.opval)); } break; - case 308: -#line 1520 "perly.y" + case 322: +#line 1627 "perly.y" { (yyval.opval) = newGVREF(0,(ps[0].val.opval)); } break; - case 310: -#line 1525 "perly.y" + case 324: +#line 1632 "perly.y" { (yyval.opval) = newAVREF((ps[-2].val.opval)); } break; - case 312: -#line 1530 "perly.y" + case 326: +#line 1637 "perly.y" { (yyval.opval) = newHVREF((ps[-2].val.opval)); } break; - case 314: -#line 1535 "perly.y" + case 328: +#line 1642 "perly.y" { (yyval.opval) = newGVREF(0,(ps[-2].val.opval)); } break; - case 315: -#line 1540 "perly.y" + case 329: +#line 1647 "perly.y" { (yyval.opval) = scalar((ps[0].val.opval)); } break; - case 316: -#line 1542 "perly.y" + case 330: +#line 1649 "perly.y" { (yyval.opval) = scalar((ps[0].val.opval)); } break; - case 317: -#line 1544 "perly.y" + case 331: +#line 1651 "perly.y" { (yyval.opval) = op_scope((ps[0].val.opval)); } break; - case 318: -#line 1547 "perly.y" + case 332: +#line 1654 "perly.y" { (yyval.opval) = (ps[0].val.opval); } break; @@ -2157,6 +2305,6 @@ case 2: /* Generated from: - * 259112249f1ef26949a345f9826162cf9be44cb0b68fb5f98540739f649ed47a perly.y + * 1fa93298544fa35cffb39ddc485735448c42d62920c7c36aaf6e20b4eb53268f perly.y * acf1cbfd2545faeaaa58b1cf0cf9d7f98b5be0752eb7a54528ef904a9e2e1ca7 regen_perly.pl * ex: set ro: */ @@ -81,104 +81,109 @@ extern int yydebug; PERLY_STAR = 280, KW_FORMAT = 281, KW_PACKAGE = 282, - KW_LOCAL = 283, - KW_MY = 284, - KW_IF = 285, - KW_ELSE = 286, - KW_ELSIF = 287, - KW_UNLESS = 288, - KW_FOR = 289, - KW_UNTIL = 290, - KW_WHILE = 291, - KW_CONTINUE = 292, - KW_GIVEN = 293, - KW_WHEN = 294, - KW_DEFAULT = 295, - KW_TRY = 296, - KW_CATCH = 297, - KW_FINALLY = 298, - KW_DEFER = 299, - KW_REQUIRE = 300, - KW_DO = 301, - KW_USE_or_NO = 302, - KW_SUB_named = 303, - KW_SUB_named_sig = 304, - KW_SUB_anon = 305, - KW_SUB_anon_sig = 306, - BAREWORD = 307, - METHCALL0 = 308, - METHCALL = 309, - THING = 310, - PMFUNC = 311, - PRIVATEREF = 312, - QWLIST = 313, - FUNC0OP = 314, - FUNC0SUB = 315, - UNIOPSUB = 316, - LSTOPSUB = 317, - PLUGEXPR = 318, - PLUGSTMT = 319, - LABEL = 320, - LOOPEX = 321, - DOTDOT = 322, - YADAYADA = 323, - FUNC0 = 324, - FUNC1 = 325, - FUNC = 326, - UNIOP = 327, - LSTOP = 328, - POWOP = 329, - MULOP = 330, - ADDOP = 331, - DOLSHARP = 332, - HASHBRACK = 333, - NOAMP = 334, - COLONATTR = 335, - FORMLBRACK = 336, - FORMRBRACK = 337, - SUBLEXSTART = 338, - SUBLEXEND = 339, - PREC_LOW = 340, - PLUGIN_LOW_OP = 341, - OROP = 342, - PLUGIN_LOGICAL_OR_LOW_OP = 343, - ANDOP = 344, - PLUGIN_LOGICAL_AND_LOW_OP = 345, - NOTOP = 346, - ASSIGNOP = 347, - PLUGIN_ASSIGN_OP = 348, - PERLY_QUESTION_MARK = 349, - PERLY_COLON = 350, - OROR = 351, - DORDOR = 352, - PLUGIN_LOGICAL_OR_OP = 353, - ANDAND = 354, - PLUGIN_LOGICAL_AND_OP = 355, - BITOROP = 356, - BITANDOP = 357, - CHEQOP = 358, - NCEQOP = 359, - CHRELOP = 360, - NCRELOP = 361, - PLUGIN_REL_OP = 362, - SHIFTOP = 363, - PLUGIN_ADD_OP = 364, - PLUGIN_MUL_OP = 365, - MATCHOP = 366, - PERLY_EXCLAMATION_MARK = 367, - PERLY_TILDE = 368, - UMINUS = 369, - REFGEN = 370, - PLUGIN_POW_OP = 371, - PREINC = 372, - PREDEC = 373, - POSTINC = 374, - POSTDEC = 375, - POSTJOIN = 376, - PLUGIN_HIGH_OP = 377, - ARROW = 378, - PERLY_PAREN_CLOSE = 379, - PERLY_PAREN_OPEN = 380 + KW_CLASS = 283, + KW_LOCAL = 284, + KW_MY = 285, + KW_FIELD = 286, + KW_IF = 287, + KW_ELSE = 288, + KW_ELSIF = 289, + KW_UNLESS = 290, + KW_FOR = 291, + KW_UNTIL = 292, + KW_WHILE = 293, + KW_CONTINUE = 294, + KW_GIVEN = 295, + KW_WHEN = 296, + KW_DEFAULT = 297, + KW_TRY = 298, + KW_CATCH = 299, + KW_FINALLY = 300, + KW_DEFER = 301, + KW_REQUIRE = 302, + KW_DO = 303, + KW_USE_or_NO = 304, + KW_SUB_named = 305, + KW_SUB_named_sig = 306, + KW_SUB_anon = 307, + KW_SUB_anon_sig = 308, + KW_METHOD_named = 309, + KW_METHOD_anon = 310, + BAREWORD = 311, + METHCALL0 = 312, + METHCALL = 313, + THING = 314, + PMFUNC = 315, + PRIVATEREF = 316, + QWLIST = 317, + FUNC0OP = 318, + FUNC0SUB = 319, + UNIOPSUB = 320, + LSTOPSUB = 321, + PLUGEXPR = 322, + PLUGSTMT = 323, + LABEL = 324, + LOOPEX = 325, + DOTDOT = 326, + YADAYADA = 327, + FUNC0 = 328, + FUNC1 = 329, + FUNC = 330, + UNIOP = 331, + LSTOP = 332, + POWOP = 333, + MULOP = 334, + ADDOP = 335, + DOLSHARP = 336, + HASHBRACK = 337, + NOAMP = 338, + COLONATTR = 339, + FORMLBRACK = 340, + FORMRBRACK = 341, + SUBLEXSTART = 342, + SUBLEXEND = 343, + PHASER = 344, + PREC_LOW = 345, + PLUGIN_LOW_OP = 346, + OROP = 347, + PLUGIN_LOGICAL_OR_LOW_OP = 348, + ANDOP = 349, + PLUGIN_LOGICAL_AND_LOW_OP = 350, + NOTOP = 351, + ASSIGNOP = 352, + PLUGIN_ASSIGN_OP = 353, + PERLY_QUESTION_MARK = 354, + PERLY_COLON = 355, + OROR = 356, + DORDOR = 357, + PLUGIN_LOGICAL_OR_OP = 358, + ANDAND = 359, + PLUGIN_LOGICAL_AND_OP = 360, + BITOROP = 361, + BITANDOP = 362, + CHEQOP = 363, + NCEQOP = 364, + CHRELOP = 365, + NCRELOP = 366, + PLUGIN_REL_OP = 367, + SHIFTOP = 368, + PLUGIN_ADD_OP = 369, + PLUGIN_MUL_OP = 370, + MATCHOP = 371, + PERLY_EXCLAMATION_MARK = 372, + PERLY_TILDE = 373, + UMINUS = 374, + REFGEN = 375, + PLUGIN_POW_OP = 376, + PREINC = 377, + PREDEC = 378, + POSTINC = 379, + POSTDEC = 380, + POSTJOIN = 381, + PLUGIN_HIGH_OP = 382, + ARROW = 383, + PERLY_PAREN_CLOSE = 384, + PERLY_PAREN_OPEN = 385 }; #endif @@ -231,6 +236,6 @@ int yyparse (void); /* Generated from: - * 259112249f1ef26949a345f9826162cf9be44cb0b68fb5f98540739f649ed47a perly.y + * 1fa93298544fa35cffb39ddc485735448c42d62920c7c36aaf6e20b4eb53268f perly.y * acf1cbfd2545faeaaa58b1cf0cf9d7f98b5be0752eb7a54528ef904a9e2e1ca7 regen_perly.pl * ex: set ro: */ @@ -6,19 +6,19 @@ #define YYFINAL 16 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 3434 +#define YYLAST 3633 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 126 +#define YYNTOKENS 131 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 105 +#define YYNNTS 111 /* YYNRULES -- Number of rules. */ -#define YYNRULES 318 +#define YYNRULES 332 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 635 +#define YYNSTATES 662 #define YYUNDEFTOK 2 -#define YYMAXUTOK 380 +#define YYMAXUTOK 385 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ @@ -67,45 +67,47 @@ static const yytype_uint8 yytranslate[] = 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125 + 125, 126, 127, 128, 129, 130 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 156, 156, 155, 167, 166, 177, 176, 190, 189, - 203, 202, 216, 215, 226, 225, 238, 246, 250, 257, - 262, 269, 275, 279, 281, 278, 288, 289, 299, 300, - 309, 313, 317, 324, 334, 336, 349, 346, 370, 365, - 386, 398, 397, 408, 414, 420, 425, 427, 429, 436, - 444, 446, 443, 463, 468, 477, 484, 483, 498, 506, - 513, 512, 527, 534, 533, 548, 552, 556, 562, 570, - 588, 589, 593, 597, 599, 601, 603, 605, 607, 609, - 612, 618, 619, 624, 635, 636, 641, 643, 648, 655, - 656, 660, 664, 668, 673, 677, 681, 682, 685, 691, - 696, 702, 703, 708, 709, 714, 715, 722, 727, 729, - 740, 742, 747, 749, 753, 773, 774, 776, 789, 849, - 851, 857, 859, 863, 869, 870, 875, 876, 880, 884, - 884, 951, 952, 957, 969, 970, 974, 985, 987, 989, - 991, 993, 997, 999, 1004, 1008, 1012, 1016, 1022, 1027, - 1033, 1039, 1041, 1043, 1046, 1045, 1056, 1057, 1061, 1065, - 1068, 1073, 1078, 1081, 1085, 1089, 1095, 1103, 1110, 1116, - 1118, 1120, 1125, 1127, 1129, 1131, 1133, 1135, 1140, 1142, - 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, - 1164, 1166, 1168, 1170, 1174, 1176, 1178, 1180, 1182, 1186, - 1188, 1192, 1194, 1196, 1198, 1202, 1204, 1209, 1211, 1214, - 1216, 1218, 1221, 1224, 1235, 1238, 1246, 1248, 1250, 1253, - 1259, 1261, 1265, 1266, 1267, 1268, 1269, 1271, 1273, 1275, - 1277, 1279, 1281, 1283, 1285, 1287, 1289, 1291, 1293, 1295, - 1305, 1315, 1325, 1335, 1337, 1339, 1342, 1347, 1351, 1353, - 1355, 1357, 1360, 1362, 1365, 1367, 1369, 1371, 1373, 1375, - 1377, 1379, 1381, 1384, 1386, 1388, 1390, 1392, 1394, 1398, - 1401, 1400, 1413, 1414, 1415, 1420, 1422, 1424, 1426, 1431, - 1433, 1436, 1438, 1440, 1446, 1447, 1451, 1452, 1456, 1457, - 1462, 1467, 1469, 1473, 1476, 1480, 1481, 1482, 1485, 1486, - 1489, 1490, 1493, 1497, 1501, 1507, 1513, 1515, 1519, 1523, - 1524, 1528, 1529, 1533, 1534, 1539, 1541, 1543, 1546 + 0, 161, 161, 160, 172, 171, 182, 181, 195, 194, + 208, 207, 221, 220, 231, 230, 244, 246, 251, 259, + 263, 270, 275, 282, 288, 292, 294, 291, 301, 302, + 312, 313, 322, 326, 330, 337, 347, 349, 362, 359, + 383, 378, 409, 408, 435, 446, 455, 454, 465, 471, + 477, 482, 484, 486, 493, 501, 503, 500, 520, 525, + 534, 541, 540, 555, 563, 570, 569, 584, 591, 590, + 606, 605, 621, 625, 629, 633, 639, 647, 665, 666, + 670, 674, 676, 678, 680, 682, 684, 686, 689, 695, + 696, 701, 712, 713, 718, 720, 725, 732, 733, 737, + 741, 745, 750, 754, 758, 759, 762, 768, 773, 779, + 780, 785, 786, 791, 792, 799, 804, 806, 817, 819, + 824, 826, 830, 850, 851, 853, 866, 926, 928, 934, + 936, 940, 946, 947, 952, 953, 957, 961, 961, 1028, + 1029, 1034, 1046, 1047, 1051, 1062, 1064, 1066, 1068, 1070, + 1074, 1076, 1081, 1085, 1089, 1093, 1099, 1104, 1110, 1116, + 1118, 1120, 1123, 1122, 1133, 1134, 1138, 1142, 1145, 1150, + 1155, 1158, 1162, 1166, 1172, 1180, 1187, 1193, 1195, 1197, + 1202, 1204, 1206, 1208, 1210, 1212, 1217, 1219, 1221, 1223, + 1225, 1227, 1229, 1231, 1233, 1235, 1237, 1239, 1241, 1243, + 1245, 1247, 1251, 1253, 1255, 1257, 1259, 1263, 1265, 1269, + 1271, 1273, 1275, 1279, 1281, 1286, 1288, 1291, 1293, 1295, + 1298, 1301, 1312, 1315, 1323, 1325, 1327, 1330, 1334, 1333, + 1349, 1351, 1355, 1356, 1357, 1358, 1359, 1361, 1363, 1365, + 1367, 1369, 1371, 1373, 1375, 1377, 1379, 1381, 1383, 1385, + 1395, 1405, 1415, 1425, 1427, 1429, 1432, 1437, 1441, 1443, + 1445, 1447, 1450, 1452, 1455, 1457, 1459, 1461, 1463, 1465, + 1467, 1469, 1471, 1474, 1476, 1478, 1480, 1482, 1484, 1488, + 1491, 1490, 1503, 1504, 1505, 1510, 1512, 1514, 1516, 1521, + 1523, 1526, 1528, 1530, 1535, 1537, 1539, 1544, 1553, 1554, + 1558, 1559, 1563, 1564, 1569, 1574, 1576, 1580, 1583, 1587, + 1588, 1589, 1592, 1593, 1596, 1597, 1600, 1604, 1608, 1614, + 1620, 1622, 1626, 1630, 1631, 1635, 1636, 1640, 1641, 1646, + 1648, 1650, 1653 }; #endif @@ -120,19 +122,19 @@ static const char *const yytname[] = "PERLY_BRACKET_OPEN", "PERLY_BRACKET_CLOSE", "PERLY_COMMA", "PERLY_DOLLAR", "PERLY_DOT", "PERLY_EQUAL_SIGN", "PERLY_MINUS", "PERLY_PERCENT_SIGN", "PERLY_PLUS", "PERLY_SEMICOLON", "PERLY_SLASH", - "PERLY_SNAIL", "PERLY_STAR", "KW_FORMAT", "KW_PACKAGE", "KW_LOCAL", - "KW_MY", "KW_IF", "KW_ELSE", "KW_ELSIF", "KW_UNLESS", "KW_FOR", - "KW_UNTIL", "KW_WHILE", "KW_CONTINUE", "KW_GIVEN", "KW_WHEN", - "KW_DEFAULT", "KW_TRY", "KW_CATCH", "KW_FINALLY", "KW_DEFER", + "PERLY_SNAIL", "PERLY_STAR", "KW_FORMAT", "KW_PACKAGE", "KW_CLASS", + "KW_LOCAL", "KW_MY", "KW_FIELD", "KW_IF", "KW_ELSE", "KW_ELSIF", + "KW_UNLESS", "KW_FOR", "KW_UNTIL", "KW_WHILE", "KW_CONTINUE", "KW_GIVEN", + "KW_WHEN", "KW_DEFAULT", "KW_TRY", "KW_CATCH", "KW_FINALLY", "KW_DEFER", "KW_REQUIRE", "KW_DO", "KW_USE_or_NO", "KW_SUB_named", - "KW_SUB_named_sig", "KW_SUB_anon", "KW_SUB_anon_sig", "BAREWORD", - "METHCALL0", "METHCALL", "THING", "PMFUNC", "PRIVATEREF", "QWLIST", - "FUNC0OP", "FUNC0SUB", "UNIOPSUB", "LSTOPSUB", "PLUGEXPR", "PLUGSTMT", - "LABEL", "LOOPEX", "DOTDOT", "YADAYADA", "FUNC0", "FUNC1", "FUNC", - "UNIOP", "LSTOP", "POWOP", "MULOP", "ADDOP", "DOLSHARP", "HASHBRACK", - "NOAMP", "COLONATTR", "FORMLBRACK", "FORMRBRACK", "SUBLEXSTART", - "SUBLEXEND", "PREC_LOW", "PLUGIN_LOW_OP", "OROP", - "PLUGIN_LOGICAL_OR_LOW_OP", "ANDOP", "PLUGIN_LOGICAL_AND_LOW_OP", + "KW_SUB_named_sig", "KW_SUB_anon", "KW_SUB_anon_sig", "KW_METHOD_named", + "KW_METHOD_anon", "BAREWORD", "METHCALL0", "METHCALL", "THING", "PMFUNC", + "PRIVATEREF", "QWLIST", "FUNC0OP", "FUNC0SUB", "UNIOPSUB", "LSTOPSUB", + "PLUGEXPR", "PLUGSTMT", "LABEL", "LOOPEX", "DOTDOT", "YADAYADA", "FUNC0", + "FUNC1", "FUNC", "UNIOP", "LSTOP", "POWOP", "MULOP", "ADDOP", "DOLSHARP", + "HASHBRACK", "NOAMP", "COLONATTR", "FORMLBRACK", "FORMRBRACK", + "SUBLEXSTART", "SUBLEXEND", "PHASER", "PREC_LOW", "PLUGIN_LOW_OP", + "OROP", "PLUGIN_LOGICAL_OR_LOW_OP", "ANDOP", "PLUGIN_LOGICAL_AND_LOW_OP", "NOTOP", "ASSIGNOP", "PLUGIN_ASSIGN_OP", "PERLY_QUESTION_MARK", "PERLY_COLON", "OROR", "DORDOR", "PLUGIN_LOGICAL_OR_OP", "ANDAND", "PLUGIN_LOGICAL_AND_OP", "BITOROP", "BITANDOP", "CHEQOP", "NCEQOP", @@ -141,20 +143,21 @@ static const char *const yytname[] = "UMINUS", "REFGEN", "PLUGIN_POW_OP", "PREINC", "PREDEC", "POSTINC", "POSTDEC", "POSTJOIN", "PLUGIN_HIGH_OP", "ARROW", "PERLY_PAREN_CLOSE", "PERLY_PAREN_OPEN", "$accept", "grammar", "@1", "@2", "@3", "@4", "@5", - "@6", "@7", "block", "empty", "formblock", "remember", "mblock", - "mremember", "catch_paren", "$@8", "$@9", "stmtseq", "formstmtseq", - "fullstmt", "labfullstmt", "barestmt", "$@10", "$@11", "$@12", "$@13", - "$@14", "@15", "$@16", "$@17", "formline", "formarg", "condition", - "sideff", "else", "cont", "finally", "mintro", "nexpr", "texpr", "iexpr", - "mexpr", "mnexpr", "formname", "startsub", "startanonsub", - "startformsub", "subname", "proto", "subattrlist", "myattrlist", - "sigvarname", "sigslurpsigil", "sigslurpelem", "sigdefault", - "sigscalarelem", "sigelem", "siglist", "optsiglist", "optsubsignature", - "subsignature", "subsigguts", "$@18", "optsubbody", "subbody", - "optsigsubbody", "sigsubbody", "expr", "listexpr", "listop", "@19", - "methodname", "subscripted", "termbinop", "termrelop", "relopchain", - "termeqop", "eqopchain", "termunop", "anonymous", "termdo", "term", - "@20", "myattrterm", "myterm", "optlistexpr", "optexpr", "optrepl", + "@6", "@7", "sigsub_or_method_named", "block", "empty", "formblock", + "remember", "mblock", "mremember", "catch_paren", "$@8", "$@9", + "stmtseq", "formstmtseq", "fullstmt", "labfullstmt", "barestmt", "$@10", + "$@11", "$@12", "$@13", "$@14", "$@15", "@16", "$@17", "$@18", "$@19", + "formline", "formarg", "condition", "sideff", "else", "cont", "finally", + "mintro", "nexpr", "texpr", "iexpr", "mexpr", "mnexpr", "formname", + "startsub", "startanonsub", "startformsub", "subname", "proto", + "subattrlist", "myattrlist", "sigvarname", "sigslurpsigil", + "sigslurpelem", "sigdefault", "sigscalarelem", "sigelem", "siglist", + "optsiglist", "optsubsignature", "subsignature", "subsigguts", "$@20", + "optsubbody", "subbody", "optsigsubbody", "sigsubbody", "expr", + "listexpr", "listop", "@21", "methodname", "subscripted", "termbinop", + "termrelop", "relopchain", "termeqop", "eqopchain", "termunop", + "anonymous", "$@22", "termdo", "term", "@23", "myattrterm", "myterm", + "fieldvar", "fielddecl", "optlistexpr", "optexpr", "optrepl", "my_scalar", "list_of_scalars", "my_list_of_scalars", "my_var", "refgen_topic", "my_refgen", "amper", "scalar", "ary", "hsh", "arylen", "star", "sliceme", "kvslice", "gelem", "indirob", YY_NULLPTR @@ -178,88 +181,92 @@ static const yytype_uint16 yytoknum[] = 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380 + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385 }; # endif -#define YYPACT_NINF -527 +#define YYPACT_NINF -549 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-527))) + (!!((Yystate) == (-549))) -#define YYTABLE_NINF -317 +#define YYTABLE_NINF -331 #define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-317))) + (!!((Yytable_value) == (-331))) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { - 807, -527, -527, -527, -527, -527, -527, -527, 65, -527, - 2732, 72, 1732, 1622, -527, -527, -527, -527, 197, 2732, - 197, 2732, 197, 2732, 197, 197, 2732, 4, 2732, 2048, - -527, -527, -527, 197, 197, -527, -527, 86, -22, -527, - 2732, -527, -527, 2732, -9, -5, -51, 2048, 1972, 197, - 2732, 116, 2732, 2732, 2732, 2732, 2732, 2732, 2124, -527, - 219, 133, -527, 12, -527, -34, -18, -70, 75, -527, - -527, -527, 552, -527, -527, 76, 44, 159, 170, -527, - 158, 183, 193, 194, -527, -527, -527, -527, -527, 160, - 120, 123, 19, 135, 136, 139, 153, 72, 247, 247, - -527, 116, 116, -527, 257, 256, -527, 272, 326, 1622, - -527, -527, -527, -527, 730, -527, 73, 840, -527, -527, - -527, -527, -527, 282, -527, 334, -527, 334, -527, -527, - 3311, 2808, 2200, 221, -527, -527, -527, 3311, -527, 3311, - 263, 252, 2732, 208, 251, 2732, 216, 3311, 72, 552, - 217, 2276, 2732, 1972, -527, 3311, 2884, -527, 133, -527, - 2352, 2732, -527, 317, -527, -527, 2732, 133, 334, 334, - 334, 703, 703, 329, 295, 2732, 2732, 2732, 2732, 2732, - 2732, 2732, 2428, -527, -527, 2732, -527, -527, 2732, 2732, - 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, - 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, 2732, - 2732, 2732, 2732, 2732, -527, -527, -527, 2732, 102, 2504, - 2732, 2732, 2732, 2732, 2732, 2732, 2732, -527, 298, 302, - -527, -527, 243, 402, -527, -527, 238, -527, -527, -527, - -527, -527, -527, 324, -527, -527, -527, -527, -527, 72, - -527, -527, -527, 2732, 2732, 2732, 2732, 2732, 2732, -527, - -527, -527, 310, -527, -527, -527, 310, -527, -527, -527, - 356, -527, -527, 2580, 334, 221, 28, 87, 122, -527, - 300, 318, -527, -527, -527, 252, 319, -527, -527, -527, - 2732, 2732, 74, -527, -527, -527, -527, 309, 288, 254, - 2732, 133, 368, -527, 2732, 390, 68, 68, -527, -527, - 3018, 64, 97, -527, 419, 513, 3273, 3118, 334, 569, - 373, 2968, 3018, 3018, 2918, 3156, 3156, 3156, 3194, 3194, - 3216, 3254, 3273, 3273, 513, 513, 3292, 474, 373, 569, - 334, 334, 66, 379, 2732, 2732, 57, 381, 384, 386, - -527, 392, 2656, 296, -527, -527, 477, 215, 103, 233, - 110, 237, 132, 241, 962, -527, -527, 405, 59, 2732, - 2732, -527, 0, -527, -527, 303, -527, -527, -527, -527, - 1814, 261, -527, 2732, 2732, 2732, 2732, -527, -527, 375, - -527, -527, -527, -527, 219, -527, -527, -527, 219, -527, - -527, -527, 328, 328, 73, 16, 489, -527, -527, -527, - -527, -527, 305, -527, 308, 35, -527, 2732, -527, -527, - -527, 610, -527, 145, 2732, 425, -527, -527, 2732, -527, - 248, 151, -527, -527, -527, -527, -527, -527, 648, 2732, - -527, 429, -527, 430, -527, 432, -527, 434, -527, -527, - -527, -527, -527, 325, 219, 335, 442, 338, -527, -527, - -527, -527, -527, 341, 446, 141, -527, 2732, 345, 346, - 219, 348, 349, 1072, 353, 427, 263, 252, 2732, -527, - -527, -527, -527, 67, 476, -527, -527, -527, 479, -527, - -527, 2732, -527, 404, -527, -527, -527, 210, -527, 3068, - 486, -527, -527, 376, -527, -527, -527, -527, 480, -527, - 247, 247, 484, 388, -527, 2732, 2732, 247, -527, 385, - 394, -527, -527, 247, 247, -527, -527, -527, -527, 2732, - 252, 499, 552, -527, 403, -527, 219, -527, -527, -527, - -527, 444, -527, 179, 179, 442, 410, 412, 414, 256, - 2732, 2732, 247, 247, 247, -527, -527, 442, 247, 506, - 519, -527, -527, -527, 1182, -527, 1292, -527, 1402, 247, - 421, -527, -527, -527, -527, 2732, 247, 247, -527, 525, - 428, 256, 256, 256, -527, 510, -527, -527, -527, -527, - -527, -527, -527, 37, -527, -527, 2732, 431, 256, 256, - -527, 247, -527, -527, -527, 436, 72, -527, 537, 481, - -527, 451, 247, -527, -527, -527, 256, -527, -527, -527, - -527, -527, -527, 247, 256, 1896, -527, 1512, 179, -527, - 456, -527, -527, 247, -527 + 751, -549, -549, -549, -549, -549, -549, -549, 50, -549, + 2900, 42, 1868, 1753, -549, -549, -549, -549, 69, 2900, + 69, 2900, 69, 2900, 69, 69, 2900, 104, 2900, 2189, + -549, -549, -549, -549, 69, 69, -549, -549, 78, -36, + -549, 2900, -549, -549, 2900, -33, -16, -58, 2189, 2110, + 69, 2900, 85, 2900, 2900, 2900, 2900, 2900, 2900, 2268, + -549, 262, 48, -549, 29, -549, -23, 1, 65, 19, + -549, -549, -549, 3143, -549, -549, 4, 136, 152, 174, + -549, 131, 196, 212, 137, -549, -549, -549, -549, -549, + 98, 112, 146, 30, 52, 41, 64, 73, 121, 122, + 42, 203, 203, -549, 85, -549, -549, -549, 206, -549, + 85, 216, -549, 213, 428, 241, 1753, -549, -549, -549, + -549, 649, -549, 172, 821, -549, -549, -549, -549, -549, + 250, -549, 615, -549, 615, -549, -549, 3505, 2979, 2347, + 193, -549, -549, -549, 3505, -549, 3505, 219, 195, -549, + 2900, 151, 220, 2900, 163, 3505, 42, 3143, 164, 2426, + 2900, 2110, -549, 3505, 3058, -549, 48, -549, 2505, 2900, + -549, 284, -549, -549, 2900, 48, 615, 615, 615, 410, + 410, 303, 404, 2900, 2900, 2900, 2900, 2900, 2900, 2900, + 2584, -549, -549, 2900, -549, -549, 2900, 2900, 2900, 2900, + 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, + 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, + 2900, 2900, -549, -549, -549, 2900, 173, 2663, 2900, 2900, + 2900, 2900, 2900, 2900, 2900, -549, 271, 277, 291, -549, + -549, -549, -549, -549, -549, 228, 285, -549, -549, 229, + -549, -549, -549, -549, -549, -549, 305, -549, -549, -549, + -549, -549, -549, 42, -549, -549, -549, 2900, 2900, 2900, + 2900, 2900, 2900, -549, -549, -549, -549, 299, -549, -549, + -549, 299, -549, -549, -549, 351, -549, -549, 2742, 615, + 193, 25, 38, 51, -549, 420, 306, -549, -549, -549, + 195, 308, -549, -549, 195, -549, 2900, 2900, 86, -549, + -549, -549, -549, 433, 286, 244, 2900, 48, 366, -549, + 2900, 362, 96, 96, -549, -549, 3245, 123, 118, -549, + 503, 3426, 3466, 3347, 615, 352, 3211, 3194, 3245, 3245, + 3092, 3386, 3386, 3386, 461, 461, 3408, 3447, 3466, 3466, + 3426, 3426, 3486, 3314, 3211, 352, 615, 615, 105, 355, + 2900, 2900, 49, 356, 357, 361, -549, 364, 2821, 260, + -549, -549, 519, 231, 144, 236, 205, 269, 226, 350, + 936, -549, -549, 370, 84, 93, 2900, 2900, -549, 3, + -549, -549, 263, -549, -549, -549, -549, 1952, 146, -549, + 2900, 2900, 2900, 2900, -549, -549, 336, -549, 372, -549, + -549, -549, 262, -549, -549, -549, 262, -549, -549, -549, + 298, 298, 172, 14, 543, -549, -549, -549, -549, -549, + 267, -549, -549, 270, 32, -549, 2900, -549, -549, -549, + 654, -549, 247, 2900, 389, -549, -549, 2900, -549, 363, + 251, -549, -549, -549, -549, -549, -549, 658, 2900, -549, + 392, -549, 394, -549, 395, -549, 396, -549, -549, -549, + -549, -549, -549, -549, 280, 262, 283, 398, 295, -549, + -549, -549, -549, -549, 292, 393, 276, -549, 2900, 307, + 309, 262, 318, 325, 1063, 297, 381, 219, -549, 450, + -549, -549, 195, 2900, -549, -549, -549, -549, 15, -549, + -549, -549, 451, -549, -549, -549, 2900, -549, 382, -549, + -549, -549, 258, -549, 3296, 459, -549, -549, 343, -549, + -549, -549, -549, 464, -549, -549, 203, 203, 466, 360, + -549, 2900, 2900, 203, -549, 371, 365, -549, -549, 203, + 203, -549, -549, -549, -549, 2900, 195, -549, 468, 3143, + 373, -549, 262, -549, -549, -549, -549, 419, -549, -549, + 208, 208, 398, 376, 380, 387, 216, 2900, 2900, 203, + 203, 203, -549, -549, 398, 203, 488, 372, 1178, -549, + -549, -549, -549, 1293, -549, 1408, 1523, 203, 388, -549, + -549, -549, -549, 2900, 203, 203, -549, 497, 400, 216, + 216, 216, -549, 479, -549, -549, -549, -549, -549, 11, + -549, -549, -549, 2900, 401, 216, 216, -549, 203, -549, + -549, -549, 414, 42, -549, 530, 465, -549, 422, 203, + -549, -549, -549, 216, -549, -549, -549, -549, -549, -549, + 203, 216, 2031, -549, 1638, 208, -549, 423, -549, -549, + 203, -549 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -267,102 +274,107 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 2, 4, 6, 8, 10, 12, 14, 0, 19, - 17, 0, 0, 0, 17, 129, 1, 17, 0, 17, - 0, 0, 0, 0, 0, 0, 0, 0, 259, 0, - 99, 99, 272, 0, 0, 243, 270, 231, 265, 267, - 261, 99, 274, 253, 263, 0, 0, 256, 17, 0, - 17, 0, 0, 0, 0, 0, 0, 0, 0, 286, - 287, 141, 273, 238, 222, 182, 194, 183, 201, 223, - 224, 225, 144, 228, 5, 244, 233, 236, 235, 237, - 234, 0, 0, 0, 19, 7, 73, 68, 100, 0, + 0, 2, 4, 6, 8, 10, 12, 14, 0, 21, + 19, 0, 0, 0, 19, 137, 1, 19, 0, 19, + 0, 0, 0, 0, 0, 0, 0, 0, 269, 0, + 107, 107, 107, 282, 0, 0, 253, 280, 241, 275, + 277, 271, 107, 284, 263, 273, 0, 0, 266, 19, + 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, + 300, 301, 149, 283, 248, 232, 190, 202, 191, 209, + 233, 234, 235, 152, 238, 5, 254, 243, 246, 245, + 247, 244, 0, 0, 0, 21, 7, 81, 76, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 98, 0, 0, 34, 0, 17, 9, 0, 74, 0, - 11, 31, 30, 26, 0, 15, 17, 0, 315, 318, - 317, 316, 302, 0, 303, 207, 305, 208, 304, 308, - 229, 0, 0, 276, 281, 283, 282, 260, 221, 220, - 17, 17, 17, 0, 0, 0, 0, 262, 0, 254, - 0, 0, 17, 17, 257, 258, 272, 284, 285, 151, - 233, 0, 306, 0, 101, 102, 17, 255, 209, 210, - 227, 214, 215, 232, 0, 0, 0, 0, 0, 142, - 0, 0, 0, 197, 196, 0, 204, 203, 0, 0, + 0, 0, 0, 106, 0, 16, 17, 36, 0, 106, + 0, 19, 9, 0, 82, 0, 0, 11, 33, 32, + 28, 0, 15, 19, 0, 329, 332, 331, 330, 316, + 0, 317, 215, 319, 216, 318, 322, 239, 0, 0, + 286, 291, 293, 292, 270, 231, 230, 19, 19, 228, + 19, 0, 0, 0, 0, 272, 0, 264, 0, 0, + 19, 19, 267, 268, 282, 298, 299, 159, 243, 0, + 320, 0, 109, 110, 19, 265, 217, 218, 237, 222, + 223, 242, 0, 0, 0, 0, 0, 150, 0, 0, + 0, 205, 204, 0, 212, 211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 211, 212, 213, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, - 19, 19, 19, 0, 19, 19, 0, 19, 19, 19, - 19, 47, 21, 0, 66, 41, 98, 98, 67, 0, - 84, 62, 65, 0, 0, 0, 0, 0, 0, 33, - 32, 27, 110, 113, 112, 124, 110, 120, 119, 123, - 125, 130, 216, 0, 278, 0, 233, 236, 235, 280, - 0, 109, 275, 104, 103, 17, 107, 105, 19, 149, - 17, 0, 0, 266, 154, 264, 268, 0, 0, 0, - 0, 145, 0, 247, 0, 230, 139, 140, 137, 138, - 143, 0, 0, 168, 0, 200, 206, 186, 175, 177, - 179, 193, 173, 174, 0, 189, 191, 190, 187, 188, - 185, 184, 205, 202, 199, 195, 198, 181, 180, 178, - 192, 176, 172, 0, 0, 0, 0, 312, 310, 314, - 156, 0, 0, 148, 157, 245, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 96, 97, 0, 0, 0, - 0, 300, 0, 301, 298, 0, 299, 295, 296, 297, - 0, 0, 19, 0, 91, 0, 0, 17, 19, 0, - 36, 38, 85, 75, 72, 76, 79, 78, 93, 77, - 80, 111, 17, 17, 121, 232, 0, 277, 279, 108, - 19, 106, 17, 219, 0, 17, 170, 17, 269, 153, - 152, 0, 217, 0, 0, 0, 161, 167, 0, 251, - 0, 0, 248, 250, 249, 252, 307, 165, 0, 17, - 246, 0, 159, 0, 239, 0, 240, 0, 16, 19, - 35, 19, 40, 0, 94, 0, 0, 0, 290, 19, - 89, 90, 95, 0, 0, 74, 56, 0, 0, 0, - 92, 0, 0, 0, 17, 0, 17, 17, 116, 115, - 118, 114, 122, 230, 0, 218, 129, 126, 0, 127, - 150, 0, 288, 0, 155, 146, 171, 0, 164, 226, - 0, 160, 166, 0, 162, 241, 242, 158, 0, 63, - 0, 0, 294, 0, 293, 0, 0, 0, 50, 0, - 0, 88, 88, 0, 0, 20, 23, 22, 60, 17, - 17, 19, 117, 17, 0, 17, 289, 271, 169, 163, - 147, 0, 17, 17, 17, 291, 0, 0, 0, 17, - 91, 0, 0, 0, 0, 45, 46, 0, 0, 0, - 19, 135, 39, 134, 0, 128, 0, 17, 0, 0, - 0, 81, 43, 44, 292, 0, 0, 0, 59, 0, - 0, 17, 17, 17, 24, 86, 42, 132, 37, 131, - 133, 136, 28, 0, 64, 82, 0, 0, 17, 17, - 51, 0, 55, 49, 48, 0, 0, 61, 0, 17, - 29, 0, 0, 53, 58, 88, 17, 25, 87, 18, - 17, 70, 69, 0, 17, 0, 57, 0, 17, 54, - 0, 71, 83, 0, 52 + 0, 0, 219, 220, 221, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 19, 19, 0, 0, 297, + 294, 296, 295, 21, 21, 21, 0, 21, 21, 0, + 21, 21, 21, 21, 52, 23, 0, 74, 46, 106, + 75, 42, 106, 0, 92, 67, 73, 0, 0, 0, + 0, 0, 0, 72, 35, 34, 29, 118, 121, 120, + 132, 118, 128, 127, 131, 133, 138, 224, 0, 288, + 0, 243, 246, 245, 290, 0, 117, 285, 112, 111, + 19, 115, 113, 21, 19, 157, 19, 0, 0, 276, + 162, 274, 278, 0, 0, 0, 0, 153, 0, 257, + 0, 240, 147, 148, 145, 146, 151, 0, 0, 176, + 0, 208, 214, 194, 183, 185, 187, 201, 181, 182, + 0, 197, 199, 198, 195, 196, 193, 192, 213, 210, + 207, 203, 206, 189, 188, 186, 200, 184, 180, 0, + 0, 0, 0, 326, 324, 328, 164, 0, 0, 156, + 165, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 104, 105, 0, 0, 0, 0, 0, 314, 0, + 315, 312, 0, 313, 309, 310, 311, 0, 0, 21, + 0, 99, 0, 0, 19, 21, 0, 38, 21, 40, + 93, 83, 80, 84, 87, 86, 101, 85, 88, 119, + 19, 19, 129, 242, 0, 287, 289, 116, 21, 114, + 19, 227, 21, 0, 19, 178, 19, 279, 161, 160, + 0, 225, 0, 0, 0, 169, 175, 0, 261, 0, + 0, 258, 260, 259, 262, 321, 173, 0, 19, 256, + 0, 167, 0, 249, 0, 250, 0, 18, 21, 37, + 21, 44, 21, 45, 0, 102, 0, 0, 0, 304, + 21, 97, 98, 103, 0, 0, 82, 61, 0, 0, + 0, 100, 0, 0, 0, 19, 0, 19, 140, 0, + 43, 139, 19, 124, 123, 126, 122, 130, 240, 226, + 137, 134, 0, 135, 229, 158, 0, 302, 0, 163, + 154, 179, 0, 172, 236, 0, 168, 174, 0, 170, + 251, 252, 166, 0, 68, 70, 0, 0, 308, 0, + 307, 0, 0, 0, 55, 0, 0, 96, 96, 0, + 0, 22, 25, 24, 65, 19, 19, 19, 21, 125, + 0, 19, 303, 281, 177, 171, 155, 0, 19, 19, + 19, 19, 305, 0, 0, 0, 19, 99, 0, 0, + 0, 0, 50, 51, 0, 0, 0, 21, 0, 143, + 41, 142, 136, 0, 19, 0, 0, 0, 0, 89, + 48, 49, 306, 0, 0, 0, 64, 0, 0, 19, + 19, 19, 26, 94, 47, 39, 141, 144, 30, 0, + 69, 71, 90, 0, 0, 19, 19, 56, 0, 60, + 54, 53, 0, 0, 66, 0, 19, 31, 0, 0, + 58, 63, 96, 19, 27, 95, 20, 19, 78, 77, + 0, 19, 0, 62, 0, 19, 59, 0, 79, 91, + 0, 57 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -527, -527, -527, -527, -527, -527, -527, -527, -527, -3, - -10, -527, 52, -72, -527, -527, -527, -527, -11, -527, - 555, 472, 31, -527, -527, -527, -527, -527, -527, -527, - -527, -527, -527, 259, -368, -526, -230, -527, -520, -527, - 41, 209, -301, -27, -527, -21, 11, -527, 150, 124, - -274, 327, 339, -527, -527, 201, -527, 204, -527, -527, - -527, -527, 125, -527, -527, 54, -527, 85, 91, -38, - -527, -527, -527, -527, -527, -527, -527, -527, -527, -527, - -527, -527, 516, -527, -527, 494, -129, -14, -527, -527, - -527, -527, 236, -527, -527, 397, 29, -26, -24, -527, - -527, -527, -527, -527, 42 + -549, -549, -549, -549, -549, -549, -549, -549, -549, -549, + -4, -10, -549, 23, -97, -549, -549, -549, -549, -13, + -549, 541, 443, 5, -549, -549, -549, -549, -549, -549, + -549, -549, -549, -549, -549, -549, 66, -396, -548, -176, + -549, -526, -549, -12, 178, -321, -88, -549, -106, 47, + -549, -67, 82, -294, 290, 300, -549, -549, 162, -549, + 168, -549, -549, -549, -549, 81, -549, 17, 175, -549, + -419, 16, -38, -549, -549, -549, -549, -549, -549, -549, + -549, -549, -549, -549, -549, -549, 599, -549, -549, 454, + -549, -549, -126, -17, -549, -549, -549, -549, 204, -549, + -549, 359, 34, -19, -15, -549, -549, -549, -549, -549, + 68 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 8, 9, 10, 11, 12, 13, 14, 15, 105, - 250, 450, 412, 243, 387, 528, 557, 605, 114, 593, - 261, 111, 112, 476, 477, 389, 550, 615, 519, 558, - 542, 610, 622, 393, 107, 572, 251, 607, 553, 462, - 469, 397, 453, 464, 367, 245, 140, 228, 166, 285, - 288, 282, 402, 266, 267, 480, 268, 269, 270, 271, - 488, 489, 115, 116, 588, 485, 562, 413, 108, 61, - 62, 417, 353, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 144, 73, 133, 159, 74, 493, 457, - 512, 513, 374, 375, 235, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 124 + -1, 8, 9, 10, 11, 12, 13, 14, 15, 110, + 111, 120, 469, 430, 256, 404, 554, 584, 632, 121, + 619, 276, 118, 119, 497, 502, 408, 406, 577, 642, + 545, 585, 568, 569, 637, 649, 411, 113, 600, 265, + 634, 580, 483, 490, 415, 474, 485, 383, 258, 147, + 236, 174, 300, 303, 297, 420, 281, 282, 505, 283, + 284, 285, 286, 512, 513, 122, 123, 500, 501, 590, + 431, 114, 62, 63, 436, 369, 64, 65, 66, 67, + 68, 69, 70, 71, 304, 72, 73, 152, 74, 140, + 239, 115, 167, 75, 518, 478, 538, 539, 391, 392, + 248, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 131 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -370,846 +382,893 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 59, 135, 554, 136, 113, 123, 117, 113, 85, 59, - 158, 410, 461, 289, 167, 120, 20, 120, 573, 120, - 20, 120, 120, 180, 22, 181, 138, 244, 24, 304, - 120, 120, 152, 186, 187, 20, 163, 303, 157, 220, - 59, 221, 141, 106, 154, 120, 120, 121, 232, 121, - 179, 121, 148, 121, 121, 220, 134, 221, 491, 608, - 122, 17, 121, 121, 126, 16, 128, 129, 84, 455, - 451, 183, 184, 20, 153, 142, 143, 160, 121, 463, - 424, 452, 432, 84, 471, 472, 425, 185, 416, 262, - 161, 162, 609, 263, 241, 625, -280, 264, -309, 145, - -309, 60, 632, 146, 158, 277, 265, 278, -281, 118, - 60, 426, 343, 344, 119, 345, 150, 442, 346, 131, - 151, 236, 347, 301, 444, 456, 348, 349, 158, 132, - 284, 287, 157, -311, 233, -311, 227, 182, 298, 299, - 260, 60, 59, 59, 234, 294, 446, -279, 179, 174, - 120, 175, 176, 177, 178, 350, 157, 177, 178, 496, - 276, 175, 176, 177, 178, 501, 520, -283, 164, -313, - -309, 253, -309, 165, 254, 255, 256, 257, 188, 351, - 258, -311, 160, -311, 175, 176, 177, 178, -317, 218, - 175, 176, 177, 178, 222, 300, 223, 175, 176, 177, - 178, 219, -282, 531, 224, 226, 225, 378, 84, 379, - 569, 570, 229, 20, 547, 548, 364, 113, 366, 175, - 176, 177, 178, 280, 538, 390, 391, 352, 175, 176, - 177, 178, 175, 176, 177, 178, 292, 441, 175, 176, - 177, 178, 297, 60, 60, 230, 392, 354, 231, 118, - 580, 246, 247, 415, 119, 443, 560, 461, 242, 445, - 237, 238, 377, 447, 239, -94, 306, 307, 308, 309, - 500, 311, 312, 314, 597, 287, 414, 20, 240, 248, - 59, 22, 369, 370, 372, 24, 380, 381, 494, 383, - 384, 385, 386, 249, 252, 611, 272, 175, 176, 177, - 178, 281, 175, 176, 177, 178, 175, 176, 177, 178, - 356, 357, 358, 359, 360, 361, 362, 363, 283, 578, - 175, 176, 177, 178, 175, 176, 177, 178, 175, 176, - 177, 178, 286, 290, 291, 175, 176, 177, 178, 302, - 293, 295, 304, 120, 394, 394, 394, 398, 394, 394, - 365, 602, 603, 604, 368, 378, 253, 379, 371, 254, - 255, 256, 257, 382, 406, 258, 388, 401, 613, 614, - 460, 404, 419, 409, 411, 121, 473, 113, 420, 158, - 422, 60, 175, 176, 177, 178, 626, 175, 176, 177, - 178, 421, 479, 479, 629, 423, 175, 176, 177, 178, - 559, 458, 487, 424, 429, 492, 433, 157, 190, 434, - 377, 435, 18, 175, 176, 177, 178, 436, 20, 305, - 478, 439, 22, 449, 408, 503, 24, 475, 459, 59, - 486, 373, 490, 418, 467, 430, 431, 498, 543, 544, - 474, 504, 505, 438, 506, 549, 507, 190, 191, 510, - 213, 555, 556, 214, 215, 216, 217, 218, 20, 511, - 454, 454, 484, 515, 527, 517, 284, 287, 518, 521, - 522, 465, 523, 524, 398, 470, 454, 454, 526, 529, - 581, 582, 583, 211, 212, 514, 585, 533, 537, 213, - 535, 158, 214, 215, 216, 217, 218, 595, 539, 545, - 540, 508, 541, 509, 598, 599, 175, 176, 177, 178, - 551, 516, 546, 395, 396, 497, 399, 400, 552, 157, - 287, 561, 564, 113, 566, 113, 567, 565, 586, 616, - 60, 568, 113, 571, 571, 575, 576, 125, 577, 127, - 624, 587, 130, 427, 137, 139, 596, 600, 190, 191, - 192, 628, 601, 606, 619, 612, 147, 592, 454, 149, - 617, 634, 620, 155, 175, 176, 177, 178, 110, 168, - 169, 170, 171, 172, 574, 623, 175, 176, 177, 178, - 633, 259, 536, 210, 211, 212, 584, 190, 191, 192, - 213, 579, 468, 214, 215, 216, 217, 218, 630, 621, - 530, 440, 407, 618, 481, 403, 454, 454, 482, 627, - 113, 534, 484, 483, 589, 460, 563, 466, 571, 189, - 208, 209, 210, 211, 212, 275, 190, 191, 192, 213, - 376, 0, 214, 215, 216, 217, 218, 0, 193, 0, - 0, 470, 454, 190, 194, 195, 196, 274, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 0, 0, 454, 0, 213, 0, - 0, 214, 215, 216, 217, 218, 0, 0, 0, 0, - 212, 0, 0, 0, 0, 213, 0, 454, 214, 215, - 216, 217, 218, 0, 0, 310, 0, 175, 176, 177, - 178, 315, 0, 0, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, - -13, 86, 0, 342, 495, 175, 176, 177, 178, 0, - 18, 84, 0, 19, 0, 0, 20, 0, 0, 21, - 22, 23, 87, 0, 24, 25, 88, 89, 26, 27, - 90, 0, 0, 91, 92, 93, 94, 0, 95, 96, - 97, 98, 502, 0, 99, 28, 29, 100, 101, 102, - 30, 31, 32, 33, 34, 35, 36, 0, 37, 38, - 39, 40, 41, 42, 103, 109, 43, 0, 104, 44, - 45, 46, 47, 48, 0, 0, 0, 49, 50, 51, - 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, - 0, 52, -317, -317, -317, 217, 218, 0, 0, 0, + 60, 482, 130, 261, 124, 257, 428, 86, 142, 60, + 432, 166, 143, 514, 127, 175, 127, 112, 127, 20, + 127, 127, 581, 601, 305, 145, 61, 320, 443, 160, + 127, 127, 17, 635, 171, 61, 228, 259, 229, 165, + 188, 60, 189, 262, 162, 127, 127, 187, 319, -323, + 16, -323, 128, 85, 128, 516, 128, 20, 128, 128, + 85, 141, -325, 187, -325, 20, 476, 61, 128, 128, + 636, 245, 161, 241, 451, 182, 484, 242, 148, 149, + 85, 492, 493, 168, 128, 20, 129, 191, 192, 156, + 133, 153, 135, 136, 154, 470, 254, 158, -290, -289, + 435, 264, 150, 151, 472, 125, 471, 659, 235, -291, + 126, 193, 166, 280, 159, 473, 652, 169, 170, 292, + 20, 275, -293, 293, 22, 125, 240, 196, 24, 249, + 126, 317, 445, 477, 227, -292, 166, 299, 302, 591, + 165, 172, -327, 314, 315, 444, 173, 228, 234, 229, + 60, 60, 310, 407, 237, 295, 409, 127, 461, 190, + 243, 246, 20, -323, 165, -323, 22, 546, 238, 308, + 24, 247, 291, 194, 195, 313, 61, 61, 183, 184, + 185, 186, 244, 359, 360, -325, 361, -325, 277, 362, + 185, 186, 278, 363, 250, 168, 279, 364, 365, 322, + 323, 324, 325, 251, 327, 328, 330, 230, 558, 231, + 183, 184, 185, 186, 255, 183, 184, 185, 186, 463, + 574, 575, 380, 232, 138, 233, 382, 395, 260, 316, + 366, 396, -331, 226, 139, 266, 183, 184, 185, 186, + 465, 597, 598, 372, 373, 374, 375, 376, 377, 378, + 379, 252, 253, 460, 367, 263, 482, 608, 462, 410, + 370, 521, 587, 273, 287, 526, 386, 387, 389, 434, + 397, 398, 564, 400, 401, 402, 403, 296, 298, 301, + 394, 306, 624, 412, 412, 412, 416, 412, 412, 433, + 302, 464, 309, 311, 302, 18, 60, 183, 184, 185, + 186, 20, 638, 368, 424, 22, 318, 307, 267, 24, + 519, 268, 269, 270, 271, 390, 320, 272, 183, 184, + 185, 186, 61, 183, 184, 185, 186, 381, 183, 184, + 185, 186, 440, 384, 413, 414, 442, 417, 418, 183, + 184, 185, 186, 183, 184, 185, 186, 385, 388, 405, + 183, 184, 185, 186, 183, 184, 185, 186, 127, 399, + 419, 183, 184, 185, 186, 427, 422, 429, 183, 184, + 185, 186, 466, 439, 438, 443, 449, 450, 441, 395, + 448, 452, 453, 396, 457, 525, 454, 481, 468, 455, + 458, 494, 496, 480, 498, 503, 128, 510, 166, 515, + 606, 523, 475, 475, 529, -102, 530, 531, 532, 536, + 504, 504, 537, 486, 20, 544, 416, 491, 475, 475, + 511, 543, 488, 479, 517, 541, 165, 552, 495, 586, + 198, 499, 394, 629, 630, 631, 547, 555, 548, 570, + 571, 528, 183, 184, 185, 186, 576, 549, 60, 640, + 641, 499, 582, 583, 550, 183, 184, 185, 186, 522, + 267, 557, 561, 268, 269, 270, 271, 653, 220, 272, + 563, 565, 566, 221, 61, 656, 222, 223, 224, 225, + 226, 572, 609, 610, 611, 553, 567, 299, 613, 573, + 589, 533, 302, 534, 579, 535, 183, 184, 185, 186, + 622, 578, 592, 542, 475, 594, 603, 625, 626, 604, + 614, 540, 183, 184, 185, 186, 605, 166, 623, 627, + 183, 184, 185, 186, 633, 183, 184, 185, 186, 628, + 639, 643, 562, 321, -331, -331, -331, 225, 226, 198, + 199, 200, 651, 644, 588, 165, 302, 646, 593, 426, + 647, 650, 660, 655, 117, 595, 596, 475, 475, 274, + 599, 599, 437, 661, 657, 607, 264, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 489, 556, + 425, 421, 221, 506, 618, 222, 223, 224, 225, 226, + 507, 560, 290, 491, 475, 183, 184, 185, 186, 264, + 264, 264, 487, 509, 615, 393, 602, 0, 0, 0, + 499, 183, 184, 185, 186, 264, 264, 0, 612, 475, + 132, 0, 134, 0, 0, 137, 648, 144, 146, 645, + 0, 0, 446, 264, 654, 183, 184, 185, 186, 475, + 155, 264, 481, 157, 0, 599, 0, 163, 459, -13, + 87, 0, 0, 176, 177, 178, 179, 180, 0, 18, + 85, 0, 19, 0, 0, 20, 0, 0, 21, 22, + 23, 88, 508, 24, 25, 89, 90, 91, 26, 27, + 92, 93, 0, 0, 94, 95, 96, 97, 0, 98, + 99, 100, 101, 198, 0, 102, 28, 29, 103, 104, + 105, 30, 31, 106, 32, 33, 34, 35, 36, 37, + 0, 38, 39, 40, 41, 42, 43, 107, 116, 44, + 0, 108, 45, 46, 47, 48, 49, 0, 0, 0, + 50, 51, 52, 0, 0, 0, 221, 289, 109, 222, + 223, 224, 225, 226, 0, 53, 183, 184, 185, 186, + 183, 184, 185, 186, 1, 2, 3, 4, 5, 6, + 7, 0, 0, 0, 0, 0, 54, 55, 0, 56, + 0, 57, 58, 0, 0, 0, 0, 0, 0, 59, + 0, 0, 0, 520, 0, 0, 326, 527, 0, 0, + 0, 0, 331, 0, 0, 332, 333, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, -3, 87, 0, 358, 0, 0, 0, 0, 0, + 0, 18, 85, 0, 19, 0, 0, 20, 0, 0, + 21, 22, 23, 88, 0, 24, 25, 89, 90, 91, + 26, 27, 92, 93, 0, 0, 94, 95, 96, 97, + 0, 98, 99, 100, 101, 0, 0, 102, 28, 29, + 103, 104, 105, 30, 31, 106, 32, 33, 34, 35, + 36, 37, 0, 38, 39, 40, 41, 42, 43, 107, + 116, 44, 0, 108, 45, 46, 47, 48, 49, 0, + 0, 0, 50, 51, 52, 0, 0, 0, 0, 0, + 109, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -3, 86, 53, 54, 0, 55, 0, 56, 57, 0, - 18, 84, 0, 19, 0, 58, 20, 0, 0, 21, - 22, 23, 87, 0, 24, 25, 88, 89, 26, 27, - 90, 0, 0, 91, 92, 93, 94, 0, 95, 96, - 97, 98, 0, 0, 99, 28, 29, 100, 101, 102, - 30, 31, 32, 33, 34, 35, 36, 0, 37, 38, - 39, 40, 41, 42, 103, 109, 43, 0, 104, 44, - 45, 46, 47, 48, 0, 0, 0, 49, 50, 51, + 0, 0, 0, 0, 0, 0, 0, 87, 54, 55, + 0, 56, 0, 57, 58, 0, 18, 85, 467, 19, + 0, 59, 20, 0, 0, 21, 22, 23, 88, 0, + 24, 25, 89, 90, 91, 26, 27, 92, 93, 0, + 0, 94, 95, 96, 97, 0, 98, 99, 100, 101, + 0, 0, 102, 28, 29, 103, 104, 105, 30, 31, + 106, 32, 33, 34, 35, 36, 37, 0, 38, 39, + 40, 41, 42, 43, 107, 116, 44, 0, 108, 45, + 46, 47, 48, 49, 0, 0, 0, 50, 51, 52, + 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, + 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 524, 0, 0, 0, + 0, 0, 0, 54, 55, 0, 56, 0, 57, 58, + 0, 0, 0, 0, 87, 0, 59, 0, 0, 0, + 0, 0, 0, 18, 85, 551, 19, 0, 0, 20, + 0, 0, 21, 22, 23, 88, 0, 24, 25, 89, + 90, 91, 26, 27, 92, 93, 0, 0, 94, 95, + 96, 97, 559, 98, 99, 100, 101, 0, 0, 102, + 28, 29, 103, 104, 105, 30, 31, 106, 32, 33, + 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, + 43, 107, 116, 44, 0, 108, 45, 46, 47, 48, + 49, 0, 0, 0, 50, 51, 52, 0, 0, 0, + 0, 0, 109, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 499, 0, 0, 0, 0, 0, - 0, 0, 53, 54, 0, 55, 0, 56, 57, 0, - 0, 0, 0, 86, 0, 58, 0, 0, 0, 0, - 0, 0, 18, 84, 448, 19, 0, 0, 20, 0, - 0, 21, 22, 23, 87, 0, 24, 25, 88, 89, - 26, 27, 90, 0, 532, 91, 92, 93, 94, 0, - 95, 96, 97, 98, 0, 0, 99, 28, 29, 100, - 101, 102, 30, 31, 32, 33, 34, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 103, 109, 43, 0, - 104, 44, 45, 46, 47, 48, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, + 54, 55, 0, 56, 0, 57, 58, 0, 18, 85, + 616, 19, 0, 59, 20, 0, 0, 21, 22, 23, + 88, 0, 24, 25, 89, 90, 91, 26, 27, 92, + 93, 0, 0, 94, 95, 96, 97, 0, 98, 99, + 100, 101, 0, 0, 102, 28, 29, 103, 104, 105, + 30, 31, 106, 32, 33, 34, 35, 36, 37, 0, + 38, 39, 40, 41, 42, 43, 107, 116, 44, 0, + 108, 45, 46, 47, 48, 49, 0, 0, 0, 50, + 51, 52, 0, 0, 0, 0, 0, 109, 0, 0, + 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 86, 53, 54, 0, 55, 0, 56, - 57, 0, 18, 84, 525, 19, 0, 58, 20, 0, - 0, 21, 22, 23, 87, 0, 24, 25, 88, 89, - 26, 27, 90, 0, 0, 91, 92, 93, 94, 0, - 95, 96, 97, 98, 0, 0, 99, 28, 29, 100, - 101, 102, 30, 31, 32, 33, 34, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 103, 109, 43, 0, - 104, 44, 45, 46, 47, 48, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 87, 54, 55, 0, 56, 0, + 57, 58, 0, 18, 85, 617, 19, 0, 59, 20, + 0, 0, 21, 22, 23, 88, 0, 24, 25, 89, + 90, 91, 26, 27, 92, 93, 0, 0, 94, 95, + 96, 97, 0, 98, 99, 100, 101, 0, 0, 102, + 28, 29, 103, 104, 105, 30, 31, 106, 32, 33, + 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, + 43, 107, 116, 44, 0, 108, 45, 46, 47, 48, + 49, 0, 0, 0, 50, 51, 52, 0, 0, 0, + 0, 0, 109, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 86, 53, 54, 0, 55, 0, 56, - 57, 0, 18, 84, 590, 19, 0, 58, 20, 0, - 0, 21, 22, 23, 87, 0, 24, 25, 88, 89, - 26, 27, 90, 0, 0, 91, 92, 93, 94, 0, - 95, 96, 97, 98, 0, 0, 99, 28, 29, 100, - 101, 102, 30, 31, 32, 33, 34, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 103, 109, 43, 0, - 104, 44, 45, 46, 47, 48, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, + 54, 55, 0, 56, 0, 57, 58, 0, 18, 85, + 620, 19, 0, 59, 20, 0, 0, 21, 22, 23, + 88, 0, 24, 25, 89, 90, 91, 26, 27, 92, + 93, 0, 0, 94, 95, 96, 97, 0, 98, 99, + 100, 101, 0, 0, 102, 28, 29, 103, 104, 105, + 30, 31, 106, 32, 33, 34, 35, 36, 37, 0, + 38, 39, 40, 41, 42, 43, 107, 116, 44, 0, + 108, 45, 46, 47, 48, 49, 0, 0, 0, 50, + 51, 52, 0, 0, 0, 0, 0, 109, 0, 0, + 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 86, 53, 54, 0, 55, 0, 56, - 57, 0, 18, 84, 591, 19, 0, 58, 20, 0, - 0, 21, 22, 23, 87, 0, 24, 25, 88, 89, - 26, 27, 90, 0, 0, 91, 92, 93, 94, 0, - 95, 96, 97, 98, 0, 0, 99, 28, 29, 100, - 101, 102, 30, 31, 32, 33, 34, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 103, 109, 43, 0, - 104, 44, 45, 46, 47, 48, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 87, 54, 55, 0, 56, 0, + 57, 58, 0, 18, 85, 621, 19, 0, 59, 20, + 0, 0, 21, 22, 23, 88, 0, 24, 25, 89, + 90, 91, 26, 27, 92, 93, 0, 0, 94, 95, + 96, 97, 0, 98, 99, 100, 101, 0, 0, 102, + 28, 29, 103, 104, 105, 30, 31, 106, 32, 33, + 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, + 43, 107, 116, 44, 0, 108, 45, 46, 47, 48, + 49, 0, 0, 0, 50, 51, 52, 0, 0, 0, + 0, 0, 109, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 86, 53, 54, 0, 55, 0, 56, - 57, 0, 18, 84, 594, 19, 0, 58, 20, 0, - 0, 21, 22, 23, 87, 0, 24, 25, 88, 89, - 26, 27, 90, 0, 0, 91, 92, 93, 94, 0, - 95, 96, 97, 98, 0, 0, 99, 28, 29, 100, - 101, 102, 30, 31, 32, 33, 34, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 103, 109, 43, 0, - 104, 44, 45, 46, 47, 48, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, + 54, 55, 0, 56, 0, 57, 58, 0, 18, 85, + 0, 19, 0, 59, 20, 0, 0, 21, 22, 23, + 88, 0, 24, 25, 89, 90, 91, 26, 27, 92, + 93, 0, 0, 94, 95, 96, 97, 0, 98, 99, + 100, 101, 0, 0, 102, 28, 29, 103, 104, 105, + 30, 31, 106, 32, 33, 34, 35, 36, 37, 0, + 38, 39, 40, 41, 42, 43, 107, 116, 44, 0, + 108, 45, 46, 47, 48, 49, 0, 0, 0, 50, + 51, 52, 0, 0, 658, 0, 0, 109, 0, 0, + 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 86, 53, 54, 0, 55, 0, 56, - 57, 0, 18, 84, 0, 19, 0, 58, 20, 0, - 0, 21, 22, 23, 87, 0, 24, 25, 88, 89, - 26, 27, 90, 0, 0, 91, 92, 93, 94, 0, - 95, 96, 97, 98, 0, 0, 99, 28, 29, 100, - 101, 102, 30, 31, 32, 33, 34, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 103, 109, 43, 0, - 104, 44, 45, 46, 47, 48, 0, 0, 0, 49, - 50, 51, 0, 0, 631, 0, 0, 0, 0, 0, - 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 87, 54, 55, 0, 56, 0, + 57, 58, 0, 18, 85, 0, 19, 0, 59, 20, + 0, 0, 21, 22, 23, 88, 0, 24, 25, 89, + 90, 91, 26, 27, 92, 93, 0, 0, 94, 95, + 96, 97, 0, 98, 99, 100, 101, 0, 0, 102, + 28, 29, 103, 104, 105, 30, 31, 106, 32, 33, + 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, + 43, 107, 116, 44, 0, 108, 45, 46, 47, 48, + 49, 0, 0, 0, 50, 51, 52, 0, 0, 0, + 0, 0, 109, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 86, 53, 54, 0, 55, 0, 56, - 57, 0, 18, 84, 0, 19, 0, 58, 20, 0, - 0, 21, 22, 23, 87, 0, 24, 25, 88, 89, - 26, 27, 90, 0, 0, 91, 92, 93, 94, 0, - 95, 96, 97, 98, 0, 0, 99, 28, 29, 100, - 101, 102, 30, 31, 32, 33, 34, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 103, 109, 43, 0, - 104, 44, 45, 46, 47, 48, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 86, 53, 54, 0, 55, 0, 56, - 57, 0, 18, 84, 0, 19, 0, 58, 20, 0, - 0, 21, 22, 23, 87, 0, 24, 25, 88, 89, - 26, 27, 90, 0, 0, 91, 92, 93, 94, 0, - 95, 96, 97, 98, 0, 0, 99, 28, 29, 100, - 101, 102, 30, 31, 32, 33, 34, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 103, 0, 43, 0, - 104, 44, 45, 46, 47, 48, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 86, 0, 0, 0, 0, - 0, 0, 0, 52, 18, 0, 0, 19, 0, 0, - 20, 0, 0, 21, 22, 23, -17, 0, 24, 25, - 0, 0, 26, 27, 53, 54, 0, 55, 0, 56, - 57, 0, 0, 0, 0, 0, 0, 58, 0, 28, - 29, 0, 0, 0, 30, 31, 32, 33, 34, 35, - 36, 0, 37, 38, 39, 40, 41, 42, 0, 0, - 43, 0, 0, 44, 45, 46, 47, 48, 0, 0, - 0, 49, 50, 51, 0, 0, 0, 86, 0, 0, - 0, 0, 0, 0, 0, 52, 18, 0, 0, 19, - 0, 0, 20, 0, 0, 21, 22, 23, 0, 0, - 24, 25, 0, 0, 26, 27, 53, 54, 0, 55, - 0, 56, 57, 0, 0, 0, 0, 0, 0, 58, - 0, 28, 29, 0, 0, 0, 30, 31, 32, 33, - 34, 35, 36, 0, 37, 38, 39, 40, 41, 42, - 0, 0, 43, 0, 0, 44, 45, 46, 47, 48, - 0, 0, 0, 49, 50, 51, 0, 0, 0, 0, - 0, 0, 18, 84, 0, 19, 0, 52, 20, 0, - 0, 21, 22, 23, 0, 0, 24, 25, 0, 0, - 26, 27, 0, 0, 0, 0, 0, 0, 53, 54, - 0, 55, 0, 56, 57, 0, 0, 28, 29, 0, - -17, 58, 30, 31, 156, 33, 34, 35, 36, 119, - 37, 38, 39, 40, 41, 42, 0, 0, 43, 0, - 0, 44, 45, 46, 47, 48, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 0, 0, 0, 18, 84, - 0, 19, 0, 52, 20, 0, 0, 21, 22, 23, - 0, 0, 24, 25, 0, 0, 26, 27, 0, 0, - 0, 0, 0, 0, 53, 54, 0, 55, 0, 56, - 57, 0, 0, 28, 29, 0, 0, 58, 30, 31, - 32, 33, 34, 35, 36, 0, 37, 38, 39, 40, - 41, 42, 0, 0, 43, 0, 0, 44, 45, 46, - 47, 48, 0, 0, 0, 49, 50, 51, 0, 0, - 0, 0, 0, 0, 18, 0, 0, 19, 0, 52, - 20, 0, 0, 21, 22, 23, 0, 0, 24, 25, - 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, - 53, 54, 0, 55, 0, 56, 57, 0, 0, 28, - 29, 0, 0, 58, 30, 31, 32, 33, 34, 35, - 36, 0, 37, 38, 39, 40, 41, 42, 0, 0, - 43, 0, 0, 44, 45, 46, 47, 48, 0, 0, - 0, 49, 50, 51, 0, 0, 0, 0, 0, 0, - 18, 0, 0, 19, 0, 52, 20, 0, 0, 21, - 22, 23, 0, 0, 24, 25, 0, 0, 26, 27, - 0, 0, 0, 0, 0, 0, 53, 54, 0, 55, - 0, 56, 57, 0, 0, 28, 29, 0, 173, 58, - 30, 31, 32, 33, 34, 35, 36, 0, 37, 38, - 39, 40, 41, 42, 0, 0, 43, 0, 0, 44, - 45, 46, 47, 48, 0, 0, 0, 49, 50, 51, - 0, 0, 0, 0, 0, 0, 18, 0, 0, 19, - 0, 52, 20, 0, 0, 21, 22, 23, 0, 0, - 24, 25, 0, 0, 26, 27, 0, 0, 0, 0, - 0, 0, 53, 54, 0, 55, 0, 56, 57, 0, - 0, 28, 29, 0, 279, 58, 30, 31, 32, 33, - 34, 35, 36, 0, 37, 38, 39, 40, 41, 42, - 0, 0, 43, 0, 0, 44, 45, 46, 47, 48, - 0, 0, 0, 49, 50, 51, 0, 0, 0, 0, - 0, 0, -316, 220, 0, 221, 0, 52, -316, 0, - 0, -316, -316, -316, 0, 0, -316, -316, 0, 0, - -316, -316, 0, 0, 0, 0, 0, 0, 53, 54, - 0, 55, 0, 56, 57, 0, 0, -316, -316, 0, - 296, 58, -316, -316, -316, -316, -316, -316, -316, 0, - -316, -316, -316, -316, -316, -316, 0, 0, -316, 0, - 0, -316, -316, -316, -316, -316, 0, 0, 0, -316, - -316, -316, 0, 0, 0, 0, 0, 0, 18, 0, - 0, 19, 0, -316, 20, 0, 0, 21, 22, 23, - 0, 0, 24, 25, 0, 0, 26, 27, 0, 0, - 0, 0, 0, 0, -316, -316, 0, -316, 0, -316, - -316, 0, 0, 28, 29, 0, 0, -316, 30, 31, - 32, 33, 34, 35, 36, 0, 37, 38, 39, 40, - 41, 42, 0, 0, 43, 0, 0, 44, 45, 46, - 47, 48, 0, 0, 0, 49, 50, 51, 0, 0, - 0, 0, 0, 0, 18, 0, 0, 19, 0, 52, - 20, 0, 0, 21, 22, 23, 0, 0, 24, 25, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, + 54, 55, 0, 56, 0, 57, 58, 0, 18, 85, + 0, 19, 0, 59, 20, 0, 0, 21, 22, 23, + 88, 0, 24, 25, 89, 90, 91, 26, 27, 92, + 93, 0, 0, 94, 95, 96, 97, 0, 98, 99, + 100, 101, 0, 0, 102, 28, 29, 103, 104, 105, + 30, 31, 106, 32, 33, 34, 35, 36, 37, 0, + 38, 39, 40, 41, 42, 43, 107, 0, 44, 0, + 108, 45, 46, 47, 48, 49, 0, 0, 0, 50, + 51, 52, 0, 87, 0, 0, 0, 109, 0, 0, + 0, 0, 18, 0, 53, 19, 0, 0, 20, 0, + 0, 21, 22, 23, -19, 0, 24, 25, 0, 0, + 0, 26, 27, 0, 0, 54, 55, 0, 56, 0, + 57, 58, 0, 0, 0, 0, 0, 0, 59, 28, + 29, 0, 0, 0, 30, 31, 0, 32, 33, 34, + 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, + 0, 0, 44, 0, 0, 45, 46, 47, 48, 49, + 0, 0, 87, 50, 51, 52, 0, 0, 0, 0, + 0, 18, 0, 0, 19, 0, 0, 20, 53, 0, + 21, 22, 23, 0, 0, 24, 25, 0, 0, 0, + 26, 27, 0, 0, 0, 0, 0, 0, 0, 54, + 55, 0, 56, 0, 57, 58, 0, 0, 28, 29, + 0, 0, 59, 30, 31, 0, 32, 33, 34, 35, + 36, 37, 0, 38, 39, 40, 41, 42, 43, 0, + 0, 44, 0, 0, 45, 46, 47, 48, 49, 0, + 0, 0, 50, 51, 52, 0, 0, 0, 0, 0, + 18, 85, 0, 19, 0, 0, 20, 53, 0, 21, + 22, 23, 0, 0, 24, 25, 0, 0, 0, 26, + 27, 0, 0, 0, 0, 0, 0, 0, 54, 55, + 0, 56, 0, 57, 58, 0, 0, 28, 29, 0, + -19, 59, 30, 31, 0, 32, 164, 34, 35, 36, + 37, 126, 38, 39, 40, 41, 42, 43, 0, 0, + 44, 0, 0, 45, 46, 47, 48, 49, 0, 0, + 0, 50, 51, 52, 0, 0, 0, 0, 0, 18, + 85, 0, 19, 0, 0, 20, 53, 0, 21, 22, + 23, 0, 0, 24, 25, 0, 0, 0, 26, 27, + 0, 0, 0, 0, 0, 0, 0, 54, 55, 0, + 56, 0, 57, 58, 0, 0, 28, 29, 0, 0, + 59, 30, 31, 0, 32, 33, 34, 35, 36, 37, + 0, 38, 39, 40, 41, 42, 43, 0, 0, 44, + 0, 0, 45, 46, 47, 48, 49, 0, 0, 0, + 50, 51, 52, 0, 0, 0, 0, 0, 18, 0, + 0, 19, 0, 0, 20, 53, 0, 21, 22, 23, + 0, 0, 24, 25, 0, 0, 0, 26, 27, 0, + 0, 0, 0, 0, 0, 0, 54, 55, 0, 56, + 0, 57, 58, 0, 0, 28, 29, 0, 0, 59, + 30, 31, 0, 32, 33, 34, 35, 36, 37, 0, + 38, 39, 40, 41, 42, 43, 0, 0, 44, 0, + 0, 45, 46, 47, 48, 49, 0, 0, 0, 50, + 51, 52, 0, 0, 0, 0, 0, 18, 0, 0, + 19, 0, 0, 20, 53, 0, 21, 22, 23, 0, + 0, 24, 25, 0, 0, 0, 26, 27, 0, 0, + 0, 0, 0, 0, 0, 54, 55, 0, 56, 0, + 57, 58, 0, 0, 28, 29, 0, 181, 59, 30, + 31, 0, 32, 33, 34, 35, 36, 37, 0, 38, + 39, 40, 41, 42, 43, 0, 0, 44, 0, 0, + 45, 46, 47, 48, 49, 0, 0, 0, 50, 51, + 52, 0, 0, 0, 0, 0, 18, 0, 0, 19, + 0, 0, 20, 53, 0, 21, 22, 23, 0, 0, + 24, 25, 0, 0, 0, 26, 27, 0, 0, 0, + 0, 0, 0, 0, 54, 55, 0, 56, 0, 57, + 58, 0, 0, 28, 29, 0, 294, 59, 30, 31, + 0, 32, 33, 34, 35, 36, 37, 0, 38, 39, + 40, 41, 42, 43, 0, 0, 44, 0, 0, 45, + 46, 47, 48, 49, 0, 0, 0, 50, 51, 52, + 0, 0, 0, 0, 0, -330, 228, 0, 229, 0, + 0, -330, 53, 0, -330, -330, -330, 0, 0, -330, + -330, 0, 0, 0, -330, -330, 0, 0, 0, 0, + 0, 0, 0, 54, 55, 0, 56, 0, 57, 58, + 0, 0, -330, -330, 0, 312, 59, -330, -330, 0, + -330, -330, -330, -330, -330, -330, 0, -330, -330, -330, + -330, -330, -330, 0, 0, -330, 0, 0, -330, -330, + -330, -330, -330, 0, 0, 0, -330, -330, -330, 0, + 0, 0, 0, 0, 18, 0, 0, 19, 0, 0, + 20, -330, 0, 21, 22, 23, 0, 0, 24, 25, + 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, + 0, 0, -330, -330, 0, -330, 0, -330, -330, 0, + 0, 28, 29, 0, 0, -330, 30, 31, 0, 32, + 33, 34, 35, 36, 37, 0, 38, 39, 40, 41, + 42, 43, 0, 0, 44, 0, 0, 45, 46, 47, + 48, 49, 0, 0, 0, 50, 51, 52, 0, 0, + 0, 0, 0, 18, 0, 0, 19, 0, 0, 20, + 53, 0, 21, 22, 23, 0, 0, 24, 25, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, - 53, 54, 0, 55, 0, 56, 57, 0, 0, 28, - 29, 0, 313, 58, 30, 31, 32, 33, 34, 35, - 36, 0, 37, 38, 39, 40, 41, 42, 0, 0, - 43, 0, 0, 44, 45, 46, 47, 48, 0, 0, - 0, 49, 50, 51, 0, 0, 0, 0, 0, 0, - 18, 0, 0, 19, 0, 52, 20, 0, 0, 21, - 22, 23, 0, 0, 24, 25, 0, 0, 26, 27, - 0, 0, 0, 0, 0, 0, 53, 54, 0, 55, - 0, 56, 57, 0, 0, 28, 29, 0, 355, 58, - 30, 31, 32, 33, 34, 35, 36, 0, 37, 38, - 39, 40, 41, 42, 0, 0, 43, 0, 0, 44, - 45, 46, 47, 48, 0, 0, 0, 49, 50, 51, - 0, 0, 0, 0, 0, 0, 18, 0, 0, 19, - 0, 52, 20, 0, 0, 21, 22, 23, 0, 0, - 24, 25, 0, 0, 26, 27, 0, 0, 0, 0, - 0, 0, 53, 54, 0, 55, 0, 56, 57, 0, - 0, 28, 29, 0, 405, 58, 30, 31, 32, 33, - 34, 35, 36, 0, 37, 38, 39, 40, 41, 42, - 0, 0, 43, 0, 0, 44, 45, 46, 47, 48, - 0, 0, 0, 49, 50, 51, 0, 0, 0, 0, - 0, 0, 18, 0, 0, 19, 0, 52, 20, 0, + 0, 54, 55, 0, 56, 0, 57, 58, 0, 0, + 28, 29, 0, 329, 59, 30, 31, 0, 32, 33, + 34, 35, 36, 37, 0, 38, 39, 40, 41, 42, + 43, 0, 0, 44, 0, 0, 45, 46, 47, 48, + 49, 0, 0, 0, 50, 51, 52, 0, 0, 0, + 0, 0, 18, 0, 0, 19, 0, 0, 20, 53, 0, 21, 22, 23, 0, 0, 24, 25, 0, 0, - 26, 27, 0, 0, 0, 0, 0, 0, 53, 54, - 0, 55, 0, 56, 57, 0, 0, 28, 29, 0, - 437, 58, 30, 31, 32, 33, 34, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 0, 0, 43, 0, - 0, 44, 45, 46, 47, 48, 0, 0, 0, 49, - 50, 51, 0, 0, 0, 0, 0, 0, 18, 0, - 0, 19, 0, 52, 20, 0, 0, 21, 22, 23, - 0, 0, 24, 25, 0, 0, 26, 27, 0, 0, - 0, 0, 0, 0, 53, 54, 0, 55, 0, 56, - 57, 0, 0, 28, 29, 0, 0, 58, 30, 31, - 32, 33, 34, 35, 36, 0, 37, 38, 39, 40, - 41, 42, 0, 0, 43, 0, 0, 44, 45, 46, - 47, 48, 0, 0, 0, 49, 50, 51, 0, 0, - 0, 0, 0, 0, -315, 0, 0, -315, 0, 52, - -315, 0, 0, -315, -315, -315, 0, 0, -315, -315, - 0, 0, -315, -315, 0, 0, 0, 0, 0, 0, - 53, 54, 0, 55, 0, 56, 57, 0, 0, -315, - -315, 0, 0, 273, -315, -315, -315, -315, -315, -315, - -315, 0, -315, -315, -315, -315, -315, -315, 0, 0, - -315, 0, 0, -315, -315, -315, -315, -315, 0, 0, - 0, -315, -315, -315, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -315, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 189, 0, 0, 0, 0, - 0, 0, 190, 191, 192, 0, -315, -315, 0, -315, - 0, -315, -315, 0, 193, 0, 0, 0, 0, -315, - 194, 195, 196, 428, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 0, 0, 0, 0, 213, 189, 0, 214, 215, 216, - 217, 218, 190, 191, 192, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -317, 0, 0, 0, 0, 0, - 194, 195, 196, 0, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 0, 0, 0, 0, 213, 189, 0, 214, 215, 216, - 217, 218, 190, 191, 192, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 194, 195, 196, 0, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 0, 0, 0, 0, 213, 189, 0, 214, 215, 216, - 217, 218, 190, 191, 192, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 196, 0, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 0, 0, 0, 0, 213, -317, 0, 214, 215, 216, - 217, 218, 190, 191, 192, 0, 0, 0, 0, 0, + 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, + 54, 55, 0, 56, 0, 57, 58, 0, 0, 28, + 29, 0, 371, 59, 30, 31, 0, 32, 33, 34, + 35, 36, 37, 0, 38, 39, 40, 41, 42, 43, + 0, 0, 44, 0, 0, 45, 46, 47, 48, 49, + 0, 0, 0, 50, 51, 52, 0, 0, 0, 0, + 0, 18, 0, 0, 19, 0, 0, 20, 53, 0, + 21, 22, 23, 0, 0, 24, 25, 0, 0, 0, + 26, 27, 0, 0, 0, 0, 0, 0, 0, 54, + 55, 0, 56, 0, 57, 58, 0, 0, 28, 29, + 0, 423, 59, 30, 31, 0, 32, 33, 34, 35, + 36, 37, 0, 38, 39, 40, 41, 42, 43, 0, + 0, 44, 0, 0, 45, 46, 47, 48, 49, 0, + 0, 0, 50, 51, 52, 0, 0, 0, 0, 0, + 18, 0, 0, 19, 0, 0, 20, 53, 0, 21, + 22, 23, 0, 0, 24, 25, 0, 0, 0, 26, + 27, 0, 0, 0, 0, 0, 0, 0, 54, 55, + 0, 56, 0, 57, 58, 0, 0, 28, 29, 0, + 456, 59, 30, 31, 0, 32, 33, 34, 35, 36, + 37, 0, 38, 39, 40, 41, 42, 43, 0, 0, + 44, 0, 0, 45, 46, 47, 48, 49, 0, 0, + 0, 50, 51, 52, 0, 0, 0, 0, 0, 18, + 0, 0, 19, 0, 0, 20, 53, 0, 21, 22, + 23, 0, 0, 24, 25, 0, 0, 0, 26, 27, + 0, 0, 0, 0, 0, 0, 0, 54, 55, 0, + 56, 0, 57, 58, 0, 0, 28, 29, 0, 0, + 59, 30, 31, 0, 32, 33, 34, 35, 36, 37, + 0, 38, 39, 40, 41, 42, 43, 0, 0, 44, + 0, 0, 45, 46, 47, 48, 49, 0, 0, 0, + 50, 51, 52, 0, 0, 0, 0, 0, -329, 0, + 0, -329, 0, 0, -329, 53, 0, -329, -329, -329, + 0, 0, -329, -329, 0, 0, 0, -329, -329, 0, + 0, 0, 0, 0, 0, 0, 54, 55, 0, 56, + 0, 57, 58, 0, 0, -329, -329, 0, 0, 288, + -329, -329, 0, -329, -329, -329, -329, -329, -329, 0, + -329, -329, -329, -329, -329, -329, 0, 0, -329, 0, + 0, -329, -329, -329, -329, -329, 0, 0, 0, -329, + -329, -329, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -329, 0, 0, 0, 0, 0, + 0, 0, 0, 197, 0, 0, 0, 0, 0, 0, + 198, 199, 200, 0, 0, -329, -329, 0, -329, 0, + -329, -329, 0, 201, 0, 0, 0, 0, -329, 202, + 203, 204, 447, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 0, + 0, 0, 0, 221, 197, 0, 222, 223, 224, 225, + 226, 198, 199, 200, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 201, 0, 0, 0, 0, 0, + 202, 203, 204, 0, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 0, 0, 0, 0, 221, 197, 0, 222, 223, 224, + 225, 226, 198, 199, 200, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -331, 0, 0, 0, 198, + 199, 202, 203, 204, 0, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 0, 0, 0, 0, 221, 197, 0, 222, 223, + 224, 225, 226, 198, 199, 200, 219, 220, 0, 0, + 0, 0, 221, 0, 0, 222, 223, 224, 225, 226, + 0, 0, 202, 203, 204, 0, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 0, 0, 0, 0, 221, 197, 0, 222, + 223, 224, 225, 226, 198, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 190, 191, 192, 0, 213, 0, 0, 214, 215, 216, - 217, 218, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 190, 191, - 192, 0, 213, 0, 0, 214, 215, 216, 217, 218, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 190, 191, 192, 0, 0, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 0, 0, 0, 0, - 213, 0, 0, 214, 215, 216, 217, 218, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 190, 191, - 192, 0, 213, 0, 0, 214, 215, 216, 217, 218, - 0, 0, 0, 0, 0, 0, 0, 190, 191, 192, - 0, 0, 0, 0, 0, 0, 0, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 190, 191, 192, 0, - 213, 0, 0, 214, 215, 216, 217, 218, 206, 207, - 208, 209, 210, 211, 212, 190, 191, 192, 0, 213, - 0, 0, 214, 215, 216, 217, 218, 0, 0, -317, - 209, 210, 211, 212, 0, 0, 0, 0, 213, 0, - 0, 214, 215, 216, 217, 218, 0, 0, 0, 209, - 210, 211, 212, 0, 0, 0, 0, 213, 0, 0, - 214, 215, 216, 217, 218 + 0, 0, 198, 199, 200, 204, 0, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 0, 0, 0, 0, 221, -331, 0, + 222, 223, 224, 225, 226, 198, 199, 200, 218, 219, + 220, 0, 0, 0, 0, 221, 0, 0, 222, 223, + 224, 225, 226, 0, 0, 0, 0, 0, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 198, 199, 200, 0, 221, 0, + 0, 222, 223, 224, 225, 226, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 198, 199, 200, 0, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 0, 198, 199, 200, 221, 0, 0, + 222, 223, 224, 225, 226, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 198, 199, 200, 0, 221, + 0, 0, 222, 223, 224, 225, 226, 0, 216, 217, + 218, 219, 220, 0, 198, 199, 200, 221, 0, 0, + 222, 223, 224, 225, 226, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 198, 199, 200, 0, 221, 0, + 0, 222, 223, 224, 225, 226, 214, 215, 216, 217, + 218, 219, 220, 198, 199, 200, 0, 221, 0, 0, + 222, 223, 224, 225, 226, 0, 0, 0, -331, 217, + 218, 219, 220, 0, 0, 0, 0, 221, 0, 0, + 222, 223, 224, 225, 226, 0, 0, 0, 217, 218, + 219, 220, 0, 0, 0, 0, 221, 0, 0, 222, + 223, 224, 225, 226 }; static const yytype_int16 yycheck[] = { - 10, 27, 522, 27, 14, 19, 17, 17, 11, 19, - 48, 285, 380, 142, 52, 18, 16, 20, 544, 22, - 16, 24, 25, 11, 20, 13, 29, 99, 24, 13, - 33, 34, 83, 103, 104, 16, 50, 166, 48, 11, - 50, 13, 31, 12, 47, 48, 49, 18, 29, 20, - 15, 22, 41, 24, 25, 11, 27, 13, 23, 22, - 18, 9, 33, 34, 22, 0, 24, 25, 11, 370, - 11, 105, 106, 16, 125, 33, 34, 48, 49, 380, - 13, 22, 25, 11, 385, 386, 22, 105, 14, 16, - 48, 49, 55, 20, 97, 615, 80, 24, 11, 13, - 13, 10, 628, 125, 142, 131, 116, 131, 80, 52, - 19, 14, 10, 11, 57, 13, 125, 14, 16, 115, - 125, 92, 20, 161, 14, 125, 24, 25, 166, 125, - 140, 141, 142, 11, 115, 13, 84, 125, 152, 153, - 109, 50, 152, 153, 125, 148, 14, 80, 15, 58, - 153, 87, 88, 89, 90, 53, 166, 89, 90, 14, - 131, 87, 88, 89, 90, 14, 467, 80, 52, 11, - 11, 30, 13, 57, 33, 34, 35, 36, 103, 77, - 39, 11, 153, 13, 87, 88, 89, 90, 122, 123, - 87, 88, 89, 90, 11, 153, 13, 87, 88, 89, - 90, 125, 80, 477, 11, 11, 13, 233, 11, 233, - 31, 32, 52, 16, 515, 516, 227, 227, 228, 87, - 88, 89, 90, 132, 14, 246, 247, 125, 87, 88, - 89, 90, 87, 88, 89, 90, 145, 22, 87, 88, - 89, 90, 151, 152, 153, 125, 249, 218, 125, 52, - 551, 101, 102, 291, 57, 22, 530, 625, 11, 22, - 125, 125, 233, 22, 125, 124, 175, 176, 177, 178, - 22, 180, 181, 182, 575, 285, 290, 16, 125, 22, - 290, 20, 230, 231, 232, 24, 234, 235, 417, 237, - 238, 239, 240, 37, 22, 596, 14, 87, 88, 89, - 90, 80, 87, 88, 89, 90, 87, 88, 89, 90, - 219, 220, 221, 222, 223, 224, 225, 226, 55, 549, - 87, 88, 89, 90, 87, 88, 89, 90, 87, 88, - 89, 90, 80, 125, 83, 87, 88, 89, 90, 22, - 124, 124, 13, 346, 253, 254, 255, 256, 257, 258, - 52, 581, 582, 583, 52, 381, 30, 381, 115, 33, - 34, 35, 36, 125, 273, 39, 42, 57, 598, 599, - 380, 15, 84, 55, 55, 346, 387, 387, 124, 417, - 12, 290, 87, 88, 89, 90, 616, 87, 88, 89, - 90, 300, 402, 403, 624, 304, 87, 88, 89, 90, - 529, 372, 412, 13, 25, 415, 25, 417, 74, 25, - 381, 25, 10, 87, 88, 89, 90, 25, 16, 124, - 92, 125, 20, 18, 124, 439, 24, 52, 125, 439, - 125, 29, 124, 124, 382, 344, 345, 12, 510, 511, - 388, 12, 12, 352, 12, 517, 12, 74, 75, 124, - 116, 523, 524, 119, 120, 121, 122, 123, 16, 124, - 369, 370, 410, 125, 474, 124, 476, 477, 22, 124, - 124, 380, 124, 124, 383, 384, 385, 386, 125, 52, - 552, 553, 554, 110, 111, 456, 558, 11, 84, 116, - 11, 529, 119, 120, 121, 122, 123, 569, 12, 15, - 124, 449, 22, 451, 576, 577, 87, 88, 89, 90, - 125, 459, 124, 254, 255, 424, 257, 258, 124, 529, - 530, 22, 533, 533, 535, 535, 82, 124, 22, 601, - 439, 542, 542, 543, 544, 125, 124, 21, 124, 23, - 612, 22, 26, 124, 28, 29, 125, 22, 74, 75, - 76, 623, 124, 43, 17, 124, 40, 567, 467, 43, - 124, 633, 81, 47, 87, 88, 89, 90, 13, 53, - 54, 55, 56, 57, 545, 124, 87, 88, 89, 90, - 124, 109, 491, 109, 110, 111, 557, 74, 75, 76, - 116, 550, 383, 119, 120, 121, 122, 123, 625, 609, - 476, 124, 275, 606, 403, 266, 515, 516, 404, 620, - 620, 486, 560, 124, 560, 625, 531, 381, 628, 67, - 107, 108, 109, 110, 111, 131, 74, 75, 76, 116, - 233, -1, 119, 120, 121, 122, 123, -1, 86, -1, - -1, 550, 551, 74, 92, 93, 94, 131, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, -1, -1, 575, -1, 116, -1, - -1, 119, 120, 121, 122, 123, -1, -1, -1, -1, - 111, -1, -1, -1, -1, 116, -1, 596, 119, 120, - 121, 122, 123, -1, -1, 179, -1, 87, 88, 89, - 90, 185, -1, -1, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 0, 1, -1, 217, 124, 87, 88, 89, 90, -1, - 10, 11, -1, 13, -1, -1, 16, -1, -1, 19, - 20, 21, 22, -1, 24, 25, 26, 27, 28, 29, - 30, -1, -1, 33, 34, 35, 36, -1, 38, 39, - 40, 41, 124, -1, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, -1, 58, 59, - 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, - 70, 71, 72, 73, -1, -1, -1, 77, 78, 79, - 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, - -1, 91, 119, 120, 121, 122, 123, -1, -1, -1, + 10, 397, 19, 109, 17, 102, 300, 11, 27, 19, + 304, 49, 27, 432, 18, 53, 20, 12, 22, 16, + 24, 25, 548, 571, 150, 29, 10, 13, 13, 87, + 34, 35, 9, 22, 51, 19, 11, 104, 13, 49, + 11, 51, 13, 110, 48, 49, 50, 15, 174, 11, + 0, 13, 18, 11, 20, 23, 22, 16, 24, 25, + 11, 27, 11, 15, 13, 16, 387, 51, 34, 35, + 59, 30, 130, 92, 25, 59, 397, 92, 31, 32, + 11, 402, 403, 49, 50, 16, 18, 110, 111, 42, + 22, 13, 24, 25, 130, 11, 100, 130, 84, 84, + 14, 111, 34, 35, 11, 56, 22, 655, 85, 84, + 61, 110, 150, 123, 130, 22, 642, 49, 50, 138, + 16, 116, 84, 138, 20, 56, 92, 108, 24, 95, + 61, 169, 14, 130, 130, 84, 174, 147, 148, 558, + 150, 56, 11, 160, 161, 22, 61, 11, 11, 13, + 160, 161, 156, 259, 56, 139, 262, 161, 14, 130, + 130, 120, 16, 11, 174, 13, 20, 488, 56, 153, + 24, 130, 138, 108, 109, 159, 160, 161, 92, 93, + 94, 95, 130, 10, 11, 11, 13, 13, 16, 16, + 94, 95, 20, 20, 130, 161, 24, 24, 25, 183, + 184, 185, 186, 130, 188, 189, 190, 11, 502, 13, + 92, 93, 94, 95, 11, 92, 93, 94, 95, 14, + 541, 542, 235, 11, 120, 13, 236, 246, 22, 161, + 57, 246, 127, 128, 130, 22, 92, 93, 94, 95, + 14, 33, 34, 227, 228, 229, 230, 231, 232, 233, + 234, 130, 130, 22, 81, 39, 652, 578, 22, 263, + 226, 14, 556, 22, 14, 14, 243, 244, 245, 307, + 247, 248, 14, 250, 251, 252, 253, 84, 59, 84, + 246, 130, 603, 267, 268, 269, 270, 271, 272, 306, + 300, 22, 129, 129, 304, 10, 306, 92, 93, 94, + 95, 16, 623, 130, 288, 20, 22, 87, 32, 24, + 436, 35, 36, 37, 38, 30, 13, 41, 92, 93, + 94, 95, 306, 92, 93, 94, 95, 56, 92, 93, + 94, 95, 316, 56, 268, 269, 320, 271, 272, 92, + 93, 94, 95, 92, 93, 94, 95, 56, 120, 44, + 92, 93, 94, 95, 92, 93, 94, 95, 362, 130, + 61, 92, 93, 94, 95, 59, 15, 59, 92, 93, + 94, 95, 22, 129, 88, 13, 360, 361, 12, 398, + 25, 25, 25, 398, 368, 22, 25, 397, 18, 25, + 130, 404, 56, 130, 22, 97, 362, 130, 436, 129, + 576, 12, 386, 387, 12, 129, 12, 12, 12, 129, + 420, 421, 129, 397, 16, 22, 400, 401, 402, 403, + 430, 129, 399, 389, 434, 130, 436, 130, 405, 555, + 78, 408, 398, 609, 610, 611, 129, 56, 129, 536, + 537, 458, 92, 93, 94, 95, 543, 129, 458, 625, + 626, 428, 549, 550, 129, 92, 93, 94, 95, 443, + 32, 11, 11, 35, 36, 37, 38, 643, 116, 41, + 88, 12, 129, 121, 458, 651, 124, 125, 126, 127, + 128, 15, 579, 580, 581, 495, 22, 497, 585, 129, + 22, 468, 502, 470, 129, 472, 92, 93, 94, 95, + 597, 130, 129, 480, 488, 86, 130, 604, 605, 129, + 22, 477, 92, 93, 94, 95, 129, 555, 130, 22, + 92, 93, 94, 95, 45, 92, 93, 94, 95, 129, + 129, 628, 516, 129, 124, 125, 126, 127, 128, 78, + 79, 80, 639, 129, 557, 555, 556, 17, 561, 129, + 85, 129, 129, 650, 13, 568, 569, 541, 542, 116, + 570, 571, 129, 660, 652, 577, 576, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 400, 497, + 290, 281, 121, 421, 594, 124, 125, 126, 127, 128, + 422, 510, 138, 577, 578, 92, 93, 94, 95, 609, + 610, 611, 398, 428, 587, 246, 572, -1, -1, -1, + 587, 92, 93, 94, 95, 625, 626, -1, 584, 603, + 21, -1, 23, -1, -1, 26, 636, 28, 29, 633, + -1, -1, 129, 643, 647, 92, 93, 94, 95, 623, + 41, 651, 652, 44, -1, 655, -1, 48, 129, 0, + 1, -1, -1, 54, 55, 56, 57, 58, -1, 10, + 11, -1, 13, -1, -1, 16, -1, -1, 19, 20, + 21, 22, 129, 24, 25, 26, 27, 28, 29, 30, + 31, 32, -1, -1, 35, 36, 37, 38, -1, 40, + 41, 42, 43, 78, -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, 70, + -1, 72, 73, 74, 75, 76, 77, -1, -1, -1, + 81, 82, 83, -1, -1, -1, 121, 138, 89, 124, + 125, 126, 127, 128, -1, 96, 92, 93, 94, 95, + 92, 93, 94, 95, 3, 4, 5, 6, 7, 8, + 9, -1, -1, -1, -1, -1, 117, 118, -1, 120, + -1, 122, 123, -1, -1, -1, -1, -1, -1, 130, + -1, -1, -1, 129, -1, -1, 187, 129, -1, -1, + -1, -1, 193, -1, -1, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 0, 1, -1, 225, -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, 70, -1, 72, 73, 74, 75, 76, 77, -1, + -1, -1, 81, 82, 83, -1, -1, -1, -1, -1, + 89, -1, -1, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, 1, 112, 113, -1, 115, -1, 117, 118, -1, - 10, 11, -1, 13, -1, 125, 16, -1, -1, 19, - 20, 21, 22, -1, 24, 25, 26, 27, 28, 29, - 30, -1, -1, 33, 34, 35, 36, -1, 38, 39, - 40, 41, -1, -1, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, -1, 58, 59, - 60, 61, 62, 63, 64, 65, 66, -1, 68, 69, - 70, 71, 72, 73, -1, -1, -1, 77, 78, 79, + -1, -1, -1, -1, -1, -1, -1, 1, 117, 118, + -1, 120, -1, 122, 123, -1, 10, 11, 12, 13, + -1, 130, 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, 70, -1, 72, 73, + 74, 75, 76, 77, -1, -1, -1, 81, 82, 83, + -1, -1, -1, -1, -1, 89, -1, -1, -1, -1, + -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 447, -1, -1, -1, + -1, -1, -1, 117, 118, -1, 120, -1, 122, 123, + -1, -1, -1, -1, 1, -1, 130, -1, -1, -1, + -1, -1, -1, 10, 11, 12, 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, 503, 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, 70, -1, 72, 73, 74, 75, 76, + 77, -1, -1, -1, 81, 82, 83, -1, -1, -1, + -1, -1, 89, -1, -1, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, - -1, -1, 112, 113, -1, 115, -1, 117, 118, -1, - -1, -1, -1, 1, -1, 125, -1, -1, -1, -1, - -1, -1, 10, 11, 12, 13, -1, -1, 16, -1, - -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, -1, 478, 33, 34, 35, 36, -1, - 38, 39, 40, 41, -1, -1, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, - 68, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, + 117, 118, -1, 120, -1, 122, 123, -1, 10, 11, + 12, 13, -1, 130, 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, 70, -1, + 72, 73, 74, 75, 76, 77, -1, -1, -1, 81, + 82, 83, -1, -1, -1, -1, -1, 89, -1, -1, + -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 1, 112, 113, -1, 115, -1, 117, - 118, -1, 10, 11, 12, 13, -1, 125, 16, -1, - -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, -1, -1, 33, 34, 35, 36, -1, - 38, 39, 40, 41, -1, -1, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, - 68, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1, 117, 118, -1, 120, -1, + 122, 123, -1, 10, 11, 12, 13, -1, 130, 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, 70, -1, 72, 73, 74, 75, 76, + 77, -1, -1, -1, 81, 82, 83, -1, -1, -1, + -1, -1, 89, -1, -1, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 1, 112, 113, -1, 115, -1, 117, - 118, -1, 10, 11, 12, 13, -1, 125, 16, -1, - -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, -1, -1, 33, 34, 35, 36, -1, - 38, 39, 40, 41, -1, -1, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, - 68, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, + 117, 118, -1, 120, -1, 122, 123, -1, 10, 11, + 12, 13, -1, 130, 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, 70, -1, + 72, 73, 74, 75, 76, 77, -1, -1, -1, 81, + 82, 83, -1, -1, -1, -1, -1, 89, -1, -1, + -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 1, 112, 113, -1, 115, -1, 117, - 118, -1, 10, 11, 12, 13, -1, 125, 16, -1, - -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, -1, -1, 33, 34, 35, 36, -1, - 38, 39, 40, 41, -1, -1, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, - 68, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1, 117, 118, -1, 120, -1, + 122, 123, -1, 10, 11, 12, 13, -1, 130, 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, 70, -1, 72, 73, 74, 75, 76, + 77, -1, -1, -1, 81, 82, 83, -1, -1, -1, + -1, -1, 89, -1, -1, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 1, 112, 113, -1, 115, -1, 117, - 118, -1, 10, 11, 12, 13, -1, 125, 16, -1, - -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, -1, -1, 33, 34, 35, 36, -1, - 38, 39, 40, 41, -1, -1, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, - 68, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, + 117, 118, -1, 120, -1, 122, 123, -1, 10, 11, + -1, 13, -1, 130, 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, 70, -1, + 72, 73, 74, 75, 76, 77, -1, -1, -1, 81, + 82, 83, -1, -1, 86, -1, -1, 89, -1, -1, + -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 1, 112, 113, -1, 115, -1, 117, - 118, -1, 10, 11, -1, 13, -1, 125, 16, -1, - -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, -1, -1, 33, 34, 35, 36, -1, - 38, 39, 40, 41, -1, -1, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, - 68, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, 82, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1, 117, 118, -1, 120, -1, + 122, 123, -1, 10, 11, -1, 13, -1, 130, 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, 70, -1, 72, 73, 74, 75, 76, + 77, -1, -1, -1, 81, 82, 83, -1, -1, -1, + -1, -1, 89, -1, -1, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 1, 112, 113, -1, 115, -1, 117, - 118, -1, 10, 11, -1, 13, -1, 125, 16, -1, - -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, -1, -1, 33, 34, 35, 36, -1, - 38, 39, 40, 41, -1, -1, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, - 68, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 1, 112, 113, -1, 115, -1, 117, - 118, -1, 10, 11, -1, 13, -1, 125, 16, -1, - -1, 19, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, -1, -1, 33, 34, 35, 36, -1, - 38, 39, 40, 41, -1, -1, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, 60, 61, 62, 63, 64, -1, 66, -1, - 68, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, -1, 1, -1, -1, -1, -1, - -1, -1, -1, 91, 10, -1, -1, 13, -1, -1, - 16, -1, -1, 19, 20, 21, 22, -1, 24, 25, - -1, -1, 28, 29, 112, 113, -1, 115, -1, 117, - 118, -1, -1, -1, -1, -1, -1, 125, -1, 45, - 46, -1, -1, -1, 50, 51, 52, 53, 54, 55, - 56, -1, 58, 59, 60, 61, 62, 63, -1, -1, - 66, -1, -1, 69, 70, 71, 72, 73, -1, -1, - -1, 77, 78, 79, -1, -1, -1, 1, -1, -1, - -1, -1, -1, -1, -1, 91, 10, -1, -1, 13, - -1, -1, 16, -1, -1, 19, 20, 21, -1, -1, - 24, 25, -1, -1, 28, 29, 112, 113, -1, 115, - -1, 117, 118, -1, -1, -1, -1, -1, -1, 125, - -1, 45, 46, -1, -1, -1, 50, 51, 52, 53, - 54, 55, 56, -1, 58, 59, 60, 61, 62, 63, - -1, -1, 66, -1, -1, 69, 70, 71, 72, 73, - -1, -1, -1, 77, 78, 79, -1, -1, -1, -1, - -1, -1, 10, 11, -1, 13, -1, 91, 16, -1, - -1, 19, 20, 21, -1, -1, 24, 25, -1, -1, - 28, 29, -1, -1, -1, -1, -1, -1, 112, 113, - -1, 115, -1, 117, 118, -1, -1, 45, 46, -1, - 124, 125, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, -1, -1, 66, -1, - -1, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, 10, 11, - -1, 13, -1, 91, 16, -1, -1, 19, 20, 21, - -1, -1, 24, 25, -1, -1, 28, 29, -1, -1, - -1, -1, -1, -1, 112, 113, -1, 115, -1, 117, - 118, -1, -1, 45, 46, -1, -1, 125, 50, 51, - 52, 53, 54, 55, 56, -1, 58, 59, 60, 61, - 62, 63, -1, -1, 66, -1, -1, 69, 70, 71, - 72, 73, -1, -1, -1, 77, 78, 79, -1, -1, - -1, -1, -1, -1, 10, -1, -1, 13, -1, 91, - 16, -1, -1, 19, 20, 21, -1, -1, 24, 25, - -1, -1, 28, 29, -1, -1, -1, -1, -1, -1, - 112, 113, -1, 115, -1, 117, 118, -1, -1, 45, - 46, -1, -1, 125, 50, 51, 52, 53, 54, 55, - 56, -1, 58, 59, 60, 61, 62, 63, -1, -1, - 66, -1, -1, 69, 70, 71, 72, 73, -1, -1, - -1, 77, 78, 79, -1, -1, -1, -1, -1, -1, - 10, -1, -1, 13, -1, 91, 16, -1, -1, 19, - 20, 21, -1, -1, 24, 25, -1, -1, 28, 29, - -1, -1, -1, -1, -1, -1, 112, 113, -1, 115, - -1, 117, 118, -1, -1, 45, 46, -1, 124, 125, - 50, 51, 52, 53, 54, 55, 56, -1, 58, 59, - 60, 61, 62, 63, -1, -1, 66, -1, -1, 69, - 70, 71, 72, 73, -1, -1, -1, 77, 78, 79, - -1, -1, -1, -1, -1, -1, 10, -1, -1, 13, - -1, 91, 16, -1, -1, 19, 20, 21, -1, -1, - 24, 25, -1, -1, 28, 29, -1, -1, -1, -1, - -1, -1, 112, 113, -1, 115, -1, 117, 118, -1, - -1, 45, 46, -1, 124, 125, 50, 51, 52, 53, - 54, 55, 56, -1, 58, 59, 60, 61, 62, 63, - -1, -1, 66, -1, -1, 69, 70, 71, 72, 73, - -1, -1, -1, 77, 78, 79, -1, -1, -1, -1, - -1, -1, 10, 11, -1, 13, -1, 91, 16, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, + 117, 118, -1, 120, -1, 122, 123, -1, 10, 11, + -1, 13, -1, 130, 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, -1, 70, -1, + 72, 73, 74, 75, 76, 77, -1, -1, -1, 81, + 82, 83, -1, 1, -1, -1, -1, 89, -1, -1, + -1, -1, 10, -1, 96, 13, -1, -1, 16, -1, + -1, 19, 20, 21, 22, -1, 24, 25, -1, -1, + -1, 29, 30, -1, -1, 117, 118, -1, 120, -1, + 122, 123, -1, -1, -1, -1, -1, -1, 130, 47, + 48, -1, -1, -1, 52, 53, -1, 55, 56, 57, + 58, 59, 60, -1, 62, 63, 64, 65, 66, 67, + -1, -1, 70, -1, -1, 73, 74, 75, 76, 77, + -1, -1, 1, 81, 82, 83, -1, -1, -1, -1, + -1, 10, -1, -1, 13, -1, -1, 16, 96, -1, + 19, 20, 21, -1, -1, 24, 25, -1, -1, -1, + 29, 30, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, 120, -1, 122, 123, -1, -1, 47, 48, + -1, -1, 130, 52, 53, -1, 55, 56, 57, 58, + 59, 60, -1, 62, 63, 64, 65, 66, 67, -1, + -1, 70, -1, -1, 73, 74, 75, 76, 77, -1, + -1, -1, 81, 82, 83, -1, -1, -1, -1, -1, + 10, 11, -1, 13, -1, -1, 16, 96, -1, 19, + 20, 21, -1, -1, 24, 25, -1, -1, -1, 29, + 30, -1, -1, -1, -1, -1, -1, -1, 117, 118, + -1, 120, -1, 122, 123, -1, -1, 47, 48, -1, + 129, 130, 52, 53, -1, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, -1, -1, + 70, -1, -1, 73, 74, 75, 76, 77, -1, -1, + -1, 81, 82, 83, -1, -1, -1, -1, -1, 10, + 11, -1, 13, -1, -1, 16, 96, -1, 19, 20, + 21, -1, -1, 24, 25, -1, -1, -1, 29, 30, + -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + 120, -1, 122, 123, -1, -1, 47, 48, -1, -1, + 130, 52, 53, -1, 55, 56, 57, 58, 59, 60, + -1, 62, 63, 64, 65, 66, 67, -1, -1, 70, + -1, -1, 73, 74, 75, 76, 77, -1, -1, -1, + 81, 82, 83, -1, -1, -1, -1, -1, 10, -1, + -1, 13, -1, -1, 16, 96, -1, 19, 20, 21, + -1, -1, 24, 25, -1, -1, -1, 29, 30, -1, + -1, -1, -1, -1, -1, -1, 117, 118, -1, 120, + -1, 122, 123, -1, -1, 47, 48, -1, -1, 130, + 52, 53, -1, 55, 56, 57, 58, 59, 60, -1, + 62, 63, 64, 65, 66, 67, -1, -1, 70, -1, + -1, 73, 74, 75, 76, 77, -1, -1, -1, 81, + 82, 83, -1, -1, -1, -1, -1, 10, -1, -1, + 13, -1, -1, 16, 96, -1, 19, 20, 21, -1, + -1, 24, 25, -1, -1, -1, 29, 30, -1, -1, + -1, -1, -1, -1, -1, 117, 118, -1, 120, -1, + 122, 123, -1, -1, 47, 48, -1, 129, 130, 52, + 53, -1, 55, 56, 57, 58, 59, 60, -1, 62, + 63, 64, 65, 66, 67, -1, -1, 70, -1, -1, + 73, 74, 75, 76, 77, -1, -1, -1, 81, 82, + 83, -1, -1, -1, -1, -1, 10, -1, -1, 13, + -1, -1, 16, 96, -1, 19, 20, 21, -1, -1, + 24, 25, -1, -1, -1, 29, 30, -1, -1, -1, + -1, -1, -1, -1, 117, 118, -1, 120, -1, 122, + 123, -1, -1, 47, 48, -1, 129, 130, 52, 53, + -1, 55, 56, 57, 58, 59, 60, -1, 62, 63, + 64, 65, 66, 67, -1, -1, 70, -1, -1, 73, + 74, 75, 76, 77, -1, -1, -1, 81, 82, 83, + -1, -1, -1, -1, -1, 10, 11, -1, 13, -1, + -1, 16, 96, -1, 19, 20, 21, -1, -1, 24, + 25, -1, -1, -1, 29, 30, -1, -1, -1, -1, + -1, -1, -1, 117, 118, -1, 120, -1, 122, 123, + -1, -1, 47, 48, -1, 129, 130, 52, 53, -1, + 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, + 65, 66, 67, -1, -1, 70, -1, -1, 73, 74, + 75, 76, 77, -1, -1, -1, 81, 82, 83, -1, + -1, -1, -1, -1, 10, -1, -1, 13, -1, -1, + 16, 96, -1, 19, 20, 21, -1, -1, 24, 25, + -1, -1, -1, 29, 30, -1, -1, -1, -1, -1, + -1, -1, 117, 118, -1, 120, -1, 122, 123, -1, + -1, 47, 48, -1, -1, 130, 52, 53, -1, 55, + 56, 57, 58, 59, 60, -1, 62, 63, 64, 65, + 66, 67, -1, -1, 70, -1, -1, 73, 74, 75, + 76, 77, -1, -1, -1, 81, 82, 83, -1, -1, + -1, -1, -1, 10, -1, -1, 13, -1, -1, 16, + 96, -1, 19, 20, 21, -1, -1, 24, 25, -1, + -1, -1, 29, 30, -1, -1, -1, -1, -1, -1, + -1, 117, 118, -1, 120, -1, 122, 123, -1, -1, + 47, 48, -1, 129, 130, 52, 53, -1, 55, 56, + 57, 58, 59, 60, -1, 62, 63, 64, 65, 66, + 67, -1, -1, 70, -1, -1, 73, 74, 75, 76, + 77, -1, -1, -1, 81, 82, 83, -1, -1, -1, + -1, -1, 10, -1, -1, 13, -1, -1, 16, 96, -1, 19, 20, 21, -1, -1, 24, 25, -1, -1, - 28, 29, -1, -1, -1, -1, -1, -1, 112, 113, - -1, 115, -1, 117, 118, -1, -1, 45, 46, -1, - 124, 125, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, 60, 61, 62, 63, -1, -1, 66, -1, - -1, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, 10, -1, - -1, 13, -1, 91, 16, -1, -1, 19, 20, 21, - -1, -1, 24, 25, -1, -1, 28, 29, -1, -1, - -1, -1, -1, -1, 112, 113, -1, 115, -1, 117, - 118, -1, -1, 45, 46, -1, -1, 125, 50, 51, - 52, 53, 54, 55, 56, -1, 58, 59, 60, 61, - 62, 63, -1, -1, 66, -1, -1, 69, 70, 71, - 72, 73, -1, -1, -1, 77, 78, 79, -1, -1, - -1, -1, -1, -1, 10, -1, -1, 13, -1, 91, - 16, -1, -1, 19, 20, 21, -1, -1, 24, 25, - -1, -1, 28, 29, -1, -1, -1, -1, -1, -1, - 112, 113, -1, 115, -1, 117, 118, -1, -1, 45, - 46, -1, 124, 125, 50, 51, 52, 53, 54, 55, - 56, -1, 58, 59, 60, 61, 62, 63, -1, -1, - 66, -1, -1, 69, 70, 71, 72, 73, -1, -1, - -1, 77, 78, 79, -1, -1, -1, -1, -1, -1, - 10, -1, -1, 13, -1, 91, 16, -1, -1, 19, - 20, 21, -1, -1, 24, 25, -1, -1, 28, 29, - -1, -1, -1, -1, -1, -1, 112, 113, -1, 115, - -1, 117, 118, -1, -1, 45, 46, -1, 124, 125, - 50, 51, 52, 53, 54, 55, 56, -1, 58, 59, - 60, 61, 62, 63, -1, -1, 66, -1, -1, 69, - 70, 71, 72, 73, -1, -1, -1, 77, 78, 79, - -1, -1, -1, -1, -1, -1, 10, -1, -1, 13, - -1, 91, 16, -1, -1, 19, 20, 21, -1, -1, - 24, 25, -1, -1, 28, 29, -1, -1, -1, -1, - -1, -1, 112, 113, -1, 115, -1, 117, 118, -1, - -1, 45, 46, -1, 124, 125, 50, 51, 52, 53, - 54, 55, 56, -1, 58, 59, 60, 61, 62, 63, - -1, -1, 66, -1, -1, 69, 70, 71, 72, 73, - -1, -1, -1, 77, 78, 79, -1, -1, -1, -1, - -1, -1, 10, -1, -1, 13, -1, 91, 16, -1, - -1, 19, 20, 21, -1, -1, 24, 25, -1, -1, - 28, 29, -1, -1, -1, -1, -1, -1, 112, 113, - -1, 115, -1, 117, 118, -1, -1, 45, 46, -1, - 124, 125, 50, 51, 52, 53, 54, 55, 56, -1, - 58, 59, 60, 61, 62, 63, -1, -1, 66, -1, - -1, 69, 70, 71, 72, 73, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, -1, -1, 10, -1, - -1, 13, -1, 91, 16, -1, -1, 19, 20, 21, - -1, -1, 24, 25, -1, -1, 28, 29, -1, -1, - -1, -1, -1, -1, 112, 113, -1, 115, -1, 117, - 118, -1, -1, 45, 46, -1, -1, 125, 50, 51, - 52, 53, 54, 55, 56, -1, 58, 59, 60, 61, - 62, 63, -1, -1, 66, -1, -1, 69, 70, 71, - 72, 73, -1, -1, -1, 77, 78, 79, -1, -1, - -1, -1, -1, -1, 10, -1, -1, 13, -1, 91, - 16, -1, -1, 19, 20, 21, -1, -1, 24, 25, - -1, -1, 28, 29, -1, -1, -1, -1, -1, -1, - 112, 113, -1, 115, -1, 117, 118, -1, -1, 45, - 46, -1, -1, 125, 50, 51, 52, 53, 54, 55, - 56, -1, 58, 59, 60, 61, 62, 63, -1, -1, - 66, -1, -1, 69, 70, 71, 72, 73, -1, -1, - -1, 77, 78, 79, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 67, -1, -1, -1, -1, - -1, -1, 74, 75, 76, -1, 112, 113, -1, 115, - -1, 117, 118, -1, 86, -1, -1, -1, -1, 125, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - -1, -1, -1, -1, 116, 67, -1, 119, 120, 121, - 122, 123, 74, 75, 76, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 86, -1, -1, -1, -1, -1, - 92, 93, 94, -1, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - -1, -1, -1, -1, 116, 67, -1, 119, 120, 121, - 122, 123, 74, 75, 76, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 92, 93, 94, -1, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - -1, -1, -1, -1, 116, 67, -1, 119, 120, 121, - 122, 123, 74, 75, 76, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 94, -1, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - -1, -1, -1, -1, 116, 67, -1, 119, 120, 121, - 122, 123, 74, 75, 76, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 74, 75, 76, -1, 116, -1, -1, 119, 120, 121, - 122, 123, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 74, 75, - 76, -1, 116, -1, -1, 119, 120, 121, 122, 123, + -1, 29, 30, -1, -1, -1, -1, -1, -1, -1, + 117, 118, -1, 120, -1, 122, 123, -1, -1, 47, + 48, -1, 129, 130, 52, 53, -1, 55, 56, 57, + 58, 59, 60, -1, 62, 63, 64, 65, 66, 67, + -1, -1, 70, -1, -1, 73, 74, 75, 76, 77, + -1, -1, -1, 81, 82, 83, -1, -1, -1, -1, + -1, 10, -1, -1, 13, -1, -1, 16, 96, -1, + 19, 20, 21, -1, -1, 24, 25, -1, -1, -1, + 29, 30, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, 120, -1, 122, 123, -1, -1, 47, 48, + -1, 129, 130, 52, 53, -1, 55, 56, 57, 58, + 59, 60, -1, 62, 63, 64, 65, 66, 67, -1, + -1, 70, -1, -1, 73, 74, 75, 76, 77, -1, + -1, -1, 81, 82, 83, -1, -1, -1, -1, -1, + 10, -1, -1, 13, -1, -1, 16, 96, -1, 19, + 20, 21, -1, -1, 24, 25, -1, -1, -1, 29, + 30, -1, -1, -1, -1, -1, -1, -1, 117, 118, + -1, 120, -1, 122, 123, -1, -1, 47, 48, -1, + 129, 130, 52, 53, -1, 55, 56, 57, 58, 59, + 60, -1, 62, 63, 64, 65, 66, 67, -1, -1, + 70, -1, -1, 73, 74, 75, 76, 77, -1, -1, + -1, 81, 82, 83, -1, -1, -1, -1, -1, 10, + -1, -1, 13, -1, -1, 16, 96, -1, 19, 20, + 21, -1, -1, 24, 25, -1, -1, -1, 29, 30, + -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + 120, -1, 122, 123, -1, -1, 47, 48, -1, -1, + 130, 52, 53, -1, 55, 56, 57, 58, 59, 60, + -1, 62, 63, 64, 65, 66, 67, -1, -1, 70, + -1, -1, 73, 74, 75, 76, 77, -1, -1, -1, + 81, 82, 83, -1, -1, -1, -1, -1, 10, -1, + -1, 13, -1, -1, 16, 96, -1, 19, 20, 21, + -1, -1, 24, 25, -1, -1, -1, 29, 30, -1, + -1, -1, -1, -1, -1, -1, 117, 118, -1, 120, + -1, 122, 123, -1, -1, 47, 48, -1, -1, 130, + 52, 53, -1, 55, 56, 57, 58, 59, 60, -1, + 62, 63, 64, 65, 66, 67, -1, -1, 70, -1, + -1, 73, 74, 75, 76, 77, -1, -1, -1, 81, + 82, 83, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, + -1, -1, -1, 71, -1, -1, -1, -1, -1, -1, + 78, 79, 80, -1, -1, 117, 118, -1, 120, -1, + 122, 123, -1, 91, -1, -1, -1, -1, 130, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, -1, + -1, -1, -1, 121, 71, -1, 124, 125, 126, 127, + 128, 78, 79, 80, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, + 97, 98, 99, -1, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + -1, -1, -1, -1, 121, 71, -1, 124, 125, 126, + 127, 128, 78, 79, 80, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 91, -1, -1, -1, 78, + 79, 97, 98, 99, -1, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, -1, -1, -1, -1, 121, 71, -1, 124, 125, + 126, 127, 128, 78, 79, 80, 115, 116, -1, -1, + -1, -1, 121, -1, -1, 124, 125, 126, 127, 128, + -1, -1, 97, 98, 99, -1, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, -1, -1, -1, -1, 121, 71, -1, 124, + 125, 126, 127, 128, 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 74, 75, 76, -1, -1, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, -1, -1, -1, -1, - 116, -1, -1, 119, 120, 121, 122, 123, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 74, 75, - 76, -1, 116, -1, -1, 119, 120, 121, 122, 123, - -1, -1, -1, -1, -1, -1, -1, 74, 75, 76, - -1, -1, -1, -1, -1, -1, -1, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 74, 75, 76, -1, - 116, -1, -1, 119, 120, 121, 122, 123, 105, 106, - 107, 108, 109, 110, 111, 74, 75, 76, -1, 116, - -1, -1, 119, 120, 121, 122, 123, -1, -1, 107, - 108, 109, 110, 111, -1, -1, -1, -1, 116, -1, - -1, 119, 120, 121, 122, 123, -1, -1, -1, 108, - 109, 110, 111, -1, -1, -1, -1, 116, -1, -1, - 119, 120, 121, 122, 123 + -1, -1, 78, 79, 80, 99, -1, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, -1, -1, -1, -1, 121, 71, -1, + 124, 125, 126, 127, 128, 78, 79, 80, 114, 115, + 116, -1, -1, -1, -1, 121, -1, -1, 124, 125, + 126, 127, 128, -1, -1, -1, -1, -1, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 78, 79, 80, -1, 121, -1, + -1, 124, 125, 126, 127, 128, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 78, 79, 80, -1, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, -1, 78, 79, 80, 121, -1, -1, + 124, 125, 126, 127, 128, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 78, 79, 80, -1, 121, + -1, -1, 124, 125, 126, 127, 128, -1, 112, 113, + 114, 115, 116, -1, 78, 79, 80, 121, -1, -1, + 124, 125, 126, 127, 128, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 78, 79, 80, -1, 121, -1, + -1, 124, 125, 126, 127, 128, 110, 111, 112, 113, + 114, 115, 116, 78, 79, 80, -1, 121, -1, -1, + 124, 125, 126, 127, 128, -1, -1, -1, 112, 113, + 114, 115, 116, -1, -1, -1, -1, 121, -1, -1, + 124, 125, 126, 127, 128, -1, -1, -1, 113, 114, + 115, 116, -1, -1, -1, -1, 121, -1, -1, 124, + 125, 126, 127, 128 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 3, 4, 5, 6, 7, 8, 9, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 138, 10, 13, - 16, 19, 20, 21, 24, 25, 28, 29, 45, 46, - 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, - 61, 62, 63, 66, 69, 70, 71, 72, 73, 77, - 78, 79, 91, 112, 113, 115, 117, 118, 125, 136, - 194, 195, 196, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 210, 213, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 11, 135, 1, 22, 26, 27, - 30, 33, 34, 35, 36, 38, 39, 40, 41, 44, - 47, 48, 49, 64, 68, 135, 148, 160, 194, 65, - 146, 147, 148, 136, 144, 188, 189, 144, 52, 57, - 135, 222, 230, 213, 230, 208, 230, 208, 230, 230, - 208, 115, 125, 211, 222, 223, 224, 208, 135, 208, - 172, 172, 230, 230, 209, 13, 125, 208, 172, 208, - 125, 125, 83, 125, 135, 208, 52, 136, 195, 212, - 222, 230, 230, 213, 52, 57, 174, 195, 208, 208, - 208, 208, 208, 124, 194, 87, 88, 89, 90, 15, - 11, 13, 125, 105, 106, 105, 103, 104, 103, 67, - 74, 75, 76, 86, 92, 93, 94, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 116, 119, 120, 121, 122, 123, 125, - 11, 13, 11, 13, 11, 13, 11, 138, 173, 52, - 125, 125, 29, 115, 125, 220, 222, 125, 125, 125, - 125, 135, 11, 139, 139, 171, 174, 174, 22, 37, - 136, 162, 22, 30, 33, 34, 35, 36, 39, 147, - 148, 146, 16, 20, 24, 136, 179, 180, 182, 183, - 184, 185, 14, 125, 208, 211, 222, 223, 224, 124, - 194, 80, 177, 55, 136, 175, 80, 136, 176, 212, - 125, 83, 194, 124, 135, 124, 124, 194, 213, 213, - 230, 195, 22, 212, 13, 124, 194, 194, 194, 194, - 208, 194, 194, 124, 194, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 10, 11, 13, 16, 20, 24, 25, - 53, 77, 125, 198, 222, 124, 194, 194, 194, 194, - 194, 194, 194, 194, 144, 52, 136, 170, 52, 138, - 138, 115, 138, 29, 218, 219, 221, 222, 223, 224, - 138, 138, 125, 138, 138, 138, 138, 140, 42, 151, - 171, 171, 135, 159, 194, 159, 159, 167, 194, 159, - 159, 57, 178, 178, 15, 124, 194, 177, 124, 55, - 176, 55, 138, 193, 213, 195, 14, 197, 124, 84, - 124, 194, 12, 194, 13, 22, 14, 124, 95, 25, - 194, 194, 25, 25, 25, 25, 25, 124, 194, 125, - 124, 22, 14, 22, 14, 22, 14, 22, 12, 18, - 137, 11, 22, 168, 194, 168, 125, 215, 222, 125, - 136, 160, 165, 168, 169, 194, 218, 138, 167, 166, - 194, 168, 168, 144, 138, 52, 149, 150, 92, 136, - 181, 181, 183, 124, 138, 191, 125, 136, 186, 187, - 124, 23, 136, 214, 212, 124, 14, 194, 12, 208, - 22, 14, 124, 213, 12, 12, 12, 12, 138, 138, - 124, 124, 216, 217, 222, 125, 138, 124, 22, 154, - 168, 124, 124, 124, 124, 12, 125, 136, 141, 52, - 175, 176, 208, 11, 188, 11, 194, 84, 14, 12, - 124, 22, 156, 139, 139, 15, 124, 168, 168, 139, - 152, 125, 124, 164, 164, 139, 139, 142, 155, 212, - 176, 22, 192, 193, 144, 124, 144, 82, 144, 31, - 32, 136, 161, 161, 222, 125, 124, 124, 162, 166, - 168, 139, 139, 139, 222, 139, 22, 22, 190, 191, - 12, 12, 136, 145, 12, 139, 125, 168, 139, 139, - 22, 124, 162, 162, 162, 143, 43, 163, 22, 55, - 157, 168, 124, 162, 162, 153, 139, 124, 135, 17, - 81, 136, 158, 124, 139, 164, 162, 144, 139, 162, - 169, 82, 161, 124, 139 + 0, 3, 4, 5, 6, 7, 8, 9, 132, 133, + 134, 135, 136, 137, 138, 139, 0, 144, 10, 13, + 16, 19, 20, 21, 24, 25, 29, 30, 47, 48, + 52, 53, 55, 56, 57, 58, 59, 60, 62, 63, + 64, 65, 66, 67, 70, 73, 74, 75, 76, 77, + 81, 82, 83, 96, 117, 118, 120, 122, 123, 130, + 142, 202, 203, 204, 207, 208, 209, 210, 211, 212, + 213, 214, 216, 217, 219, 224, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 11, 141, 1, 22, 26, + 27, 28, 31, 32, 35, 36, 37, 38, 40, 41, + 42, 43, 46, 49, 50, 51, 54, 68, 72, 89, + 140, 141, 154, 168, 202, 222, 69, 152, 153, 154, + 142, 150, 196, 197, 150, 56, 61, 141, 233, 241, + 224, 241, 217, 241, 217, 241, 241, 217, 120, 130, + 220, 233, 234, 235, 217, 141, 217, 180, 180, 180, + 241, 241, 218, 13, 130, 217, 180, 217, 130, 130, + 87, 130, 141, 217, 56, 142, 203, 223, 233, 241, + 241, 224, 56, 61, 182, 203, 217, 217, 217, 217, + 217, 129, 202, 92, 93, 94, 95, 15, 11, 13, + 130, 110, 111, 110, 108, 109, 108, 71, 78, 79, + 80, 91, 97, 98, 99, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 121, 124, 125, 126, 127, 128, 130, 11, 13, + 11, 13, 11, 13, 11, 144, 181, 56, 56, 221, + 233, 234, 235, 130, 130, 30, 120, 130, 231, 233, + 130, 130, 130, 130, 141, 11, 145, 145, 179, 182, + 22, 179, 182, 39, 142, 170, 22, 32, 35, 36, + 37, 38, 41, 22, 153, 154, 152, 16, 20, 24, + 142, 187, 188, 190, 191, 192, 193, 14, 130, 217, + 220, 233, 234, 235, 129, 202, 84, 185, 59, 142, + 183, 84, 142, 184, 215, 223, 130, 87, 202, 129, + 141, 129, 129, 202, 224, 224, 241, 203, 22, 223, + 13, 129, 202, 202, 202, 202, 217, 202, 202, 129, + 202, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 10, + 11, 13, 16, 20, 24, 25, 57, 81, 130, 206, + 233, 129, 202, 202, 202, 202, 202, 202, 202, 202, + 150, 56, 142, 178, 56, 56, 144, 144, 120, 144, + 30, 229, 230, 232, 233, 234, 235, 144, 144, 130, + 144, 144, 144, 144, 146, 44, 158, 179, 157, 179, + 141, 167, 202, 167, 167, 175, 202, 167, 167, 61, + 186, 186, 15, 129, 202, 185, 129, 59, 184, 59, + 144, 201, 184, 224, 203, 14, 205, 129, 88, 129, + 202, 12, 202, 13, 22, 14, 129, 100, 25, 202, + 202, 25, 25, 25, 25, 25, 129, 202, 130, 129, + 22, 14, 22, 14, 22, 14, 22, 12, 18, 143, + 11, 22, 11, 22, 176, 202, 176, 130, 226, 233, + 130, 142, 168, 173, 176, 177, 202, 229, 144, 175, + 174, 202, 176, 176, 150, 144, 56, 155, 22, 144, + 198, 199, 156, 97, 142, 189, 189, 191, 129, 199, + 130, 142, 194, 195, 201, 129, 23, 142, 225, 223, + 129, 14, 202, 12, 217, 22, 14, 129, 224, 12, + 12, 12, 12, 144, 144, 144, 129, 129, 227, 228, + 233, 130, 144, 129, 22, 161, 176, 129, 129, 129, + 129, 12, 130, 142, 147, 56, 183, 11, 184, 217, + 196, 11, 202, 88, 14, 12, 129, 22, 163, 164, + 145, 145, 15, 129, 176, 176, 145, 159, 130, 129, + 172, 172, 145, 145, 148, 162, 223, 184, 150, 22, + 200, 201, 129, 150, 86, 150, 150, 33, 34, 142, + 169, 169, 233, 130, 129, 129, 170, 174, 176, 145, + 145, 145, 233, 145, 22, 198, 12, 12, 142, 151, + 12, 12, 145, 130, 176, 145, 145, 22, 129, 170, + 170, 170, 149, 45, 171, 22, 59, 165, 176, 129, + 170, 170, 160, 145, 129, 141, 17, 85, 142, 166, + 129, 145, 172, 170, 150, 145, 170, 177, 86, 169, + 129, 145 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 126, 128, 127, 129, 127, 130, 127, 131, 127, - 132, 127, 133, 127, 134, 127, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 141, 144, 144, 145, 145, - 146, 146, 147, 147, 148, 148, 149, 148, 150, 148, - 148, 151, 148, 148, 148, 148, 148, 148, 148, 148, - 152, 153, 148, 148, 148, 148, 154, 148, 148, 148, - 155, 148, 148, 156, 148, 148, 148, 148, 148, 157, - 158, 158, 159, 160, 160, 160, 160, 160, 160, 160, - 160, 161, 161, 161, 162, 162, 163, 163, 164, 165, - 165, 166, 166, 167, 168, 169, 170, 170, 171, 172, - 173, 174, 174, 175, 175, 176, 176, 176, 177, 177, - 178, 178, 179, 179, 180, 181, 181, 181, 182, 183, - 183, 184, 184, 184, 185, 185, 186, 186, 187, 189, - 188, 190, 190, 191, 192, 192, 193, 194, 194, 194, - 194, 194, 195, 195, 195, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 197, 196, 198, 198, 199, 199, - 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - 199, 199, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 201, 201, 201, 201, 201, 202, - 202, 203, 203, 203, 203, 204, 204, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 206, 206, 206, 206, - 207, 207, 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 0, 131, 133, 132, 134, 132, 135, 132, 136, 132, + 137, 132, 138, 132, 139, 132, 140, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 147, 150, 150, + 151, 151, 152, 152, 153, 153, 154, 154, 155, 154, + 156, 154, 157, 154, 154, 154, 158, 154, 154, 154, + 154, 154, 154, 154, 154, 159, 160, 154, 154, 154, + 154, 161, 154, 154, 154, 162, 154, 154, 163, 154, + 164, 154, 154, 154, 154, 154, 154, 165, 166, 166, + 167, 168, 168, 168, 168, 168, 168, 168, 168, 169, + 169, 169, 170, 170, 171, 171, 172, 173, 173, 174, + 174, 175, 176, 177, 178, 178, 179, 180, 181, 182, + 182, 183, 183, 184, 184, 184, 185, 185, 186, 186, + 187, 187, 188, 189, 189, 189, 190, 191, 191, 192, + 192, 192, 193, 193, 194, 194, 195, 197, 196, 198, + 198, 199, 200, 200, 201, 202, 202, 202, 202, 202, + 203, 203, 203, 204, 204, 204, 204, 204, 204, 204, + 204, 204, 205, 204, 206, 206, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, - 209, 208, 208, 208, 208, 210, 210, 210, 210, 211, - 211, 211, 211, 211, 212, 212, 213, 213, 214, 214, - 215, 216, 216, 216, 217, 218, 218, 218, 219, 219, - 220, 220, 221, 222, 223, 224, 225, 225, 226, 227, - 227, 228, 228, 229, 229, 230, 230, 230, 230 + 208, 208, 209, 209, 209, 209, 209, 210, 210, 211, + 211, 211, 211, 212, 212, 213, 213, 213, 213, 213, + 213, 213, 213, 213, 214, 214, 214, 214, 215, 214, + 216, 216, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, + 218, 217, 217, 217, 217, 219, 219, 219, 219, 220, + 220, 220, 220, 220, 221, 221, 221, 222, 223, 223, + 224, 224, 225, 225, 226, 227, 227, 227, 228, 229, + 229, 229, 230, 230, 231, 231, 232, 233, 234, 235, + 236, 236, 237, 238, 238, 239, 239, 240, 240, 241, + 241, 241, 241 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 4, 0, 3, 0, 3, 0, 3, - 0, 3, 0, 3, 0, 3, 4, 0, 7, 0, - 4, 0, 1, 0, 0, 5, 1, 2, 1, 2, - 1, 1, 2, 2, 1, 4, 0, 7, 0, 6, - 4, 0, 7, 7, 7, 6, 6, 2, 8, 8, - 0, 0, 13, 9, 11, 8, 0, 10, 9, 7, - 0, 8, 2, 0, 8, 2, 2, 2, 1, 2, - 1, 3, 1, 1, 1, 3, 3, 3, 3, 3, - 3, 1, 2, 6, 1, 2, 0, 2, 0, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, - 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, - 0, 1, 1, 1, 3, 1, 1, 2, 3, 1, - 1, 2, 3, 1, 1, 1, 1, 1, 3, 0, - 2, 1, 1, 4, 1, 1, 5, 3, 3, 3, - 3, 1, 2, 3, 1, 3, 5, 6, 3, 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, + 0, 3, 0, 3, 0, 3, 1, 1, 4, 0, + 7, 0, 4, 0, 1, 0, 0, 5, 1, 2, + 1, 2, 1, 1, 2, 2, 1, 4, 0, 7, + 0, 6, 0, 4, 4, 4, 0, 7, 7, 7, + 6, 6, 2, 8, 8, 0, 0, 13, 9, 11, + 8, 0, 10, 9, 7, 0, 8, 2, 0, 8, + 0, 8, 2, 2, 2, 2, 1, 2, 1, 3, + 1, 1, 1, 3, 3, 3, 3, 3, 3, 1, + 2, 6, 1, 2, 0, 2, 0, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, + 1, 1, 1, 1, 2, 1, 2, 1, 0, 1, + 1, 1, 3, 1, 1, 2, 3, 1, 1, 2, + 3, 1, 1, 1, 1, 1, 3, 0, 2, 1, + 1, 4, 1, 1, 5, 3, 3, 3, 3, 1, + 2, 3, 1, 3, 5, 6, 3, 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, 0, 5, 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, 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 + 2, 1, 1, 1, 1, 1, 1, 2, 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 { - toketype_ival, toketype_opval + toketype_ival, toketype_opval, toketype_pval } toketypes; /* type of each token/terminal */ @@ -1223,17 +1282,17 @@ static const toketypes yy_type_tab[] = toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, - toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, - toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, + toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, + toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, - toketype_ival, toketype_ival, toketype_ival, toketype_opval, - toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, + toketype_ival, toketype_ival, toketype_ival, toketype_ival, + toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, - toketype_opval, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, - toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, + toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_ival, toketype_ival, toketype_ival, + toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, + toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, - toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, @@ -1242,26 +1301,27 @@ static const toketypes yy_type_tab[] = toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, - toketype_ival, toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_opval, - toketype_ival, toketype_opval, toketype_ival, toketype_ival, toketype_opval, toketype_opval, - toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_ival, toketype_ival, toketype_ival, - toketype_ival, toketype_ival, toketype_ival, toketype_ival, 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_opval, toketype_opval, toketype_ival, 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_opval, toketype_ival, toketype_opval, toketype_opval, + toketype_ival, toketype_ival, toketype_ival, toketype_opval, toketype_opval, toketype_opval, + toketype_ival, toketype_opval, toketype_ival, toketype_opval, toketype_ival, toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_ival, + toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, + 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_opval, toketype_opval, + toketype_ival, 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_opval, toketype_opval, toketype_opval, - toketype_ival, toketype_opval, 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_opval, + toketype_opval, toketype_opval, toketype_ival, toketype_opval, toketype_opval, toketype_opval, + toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, + toketype_opval, toketype_ival, toketype_opval, toketype_opval, toketype_ival, toketype_opval, toketype_opval, + toketype_pval, toketype_opval, 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_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval }; /* Generated from: - * 259112249f1ef26949a345f9826162cf9be44cb0b68fb5f98540739f649ed47a perly.y + * 1fa93298544fa35cffb39ddc485735448c42d62920c7c36aaf6e20b4eb53268f perly.y * acf1cbfd2545faeaaa58b1cf0cf9d7f98b5be0752eb7a54528ef904a9e2e1ca7 regen_perly.pl * ex: set ro: */ @@ -64,8 +64,8 @@ %token <ival> PERLY_STAR /* Tokens emitted by toke.c on simple keywords */ -%token <ival> KW_FORMAT KW_PACKAGE -%token <ival> KW_LOCAL KW_MY +%token <ival> KW_FORMAT KW_PACKAGE KW_CLASS +%token <ival> KW_LOCAL KW_MY KW_FIELD %token <ival> KW_IF KW_ELSE KW_ELSIF KW_UNLESS %token <ival> KW_FOR KW_UNTIL KW_WHILE KW_CONTINUE %token <ival> KW_GIVEN KW_WHEN KW_DEFAULT @@ -78,6 +78,7 @@ /* The 'sub' keyword is a bit special; four different tokens depending on * named-vs-anon, and whether signatures are in effect */ %token <ival> KW_SUB_named KW_SUB_named_sig KW_SUB_anon KW_SUB_anon_sig +%token <ival> KW_METHOD_named KW_METHOD_anon /* Tokens emitted in other situations */ %token <opval> BAREWORD METHCALL0 METHCALL THING PMFUNC PRIVATEREF QWLIST @@ -90,12 +91,14 @@ %token <ival> DOLSHARP HASHBRACK NOAMP %token <ival> COLONATTR FORMLBRACK FORMRBRACK %token <ival> SUBLEXSTART SUBLEXEND +%token <ival> PHASER %type <ival> grammar remember mremember %type <ival> startsub startanonsub startformsub %type <ival> mintro +%type <ival> sigsub_or_method_named %type <opval> stmtseq fullstmt labfullstmt barestmt block mblock else finally %type <opval> expr term subscripted scalar ary hsh arylen star amper sideff %type <opval> condition @@ -107,6 +110,8 @@ %type <opval> formname subname proto cont my_scalar my_var %type <opval> list_of_scalars my_list_of_scalars refgen_topic formblock %type <opval> subattrlist myattrlist myattrterm myterm +%type <pval> fieldvar /* pval is PADNAME */ +%type <opval> fielddecl %type <opval> termbinop termunop anonymous termdo %type <opval> termrelop relopchain termeqop eqopchain %type <ival> sigslurpsigil @@ -234,6 +239,14 @@ grammar : GRAMPROG } ; +/* Either a signatured 'sub' or 'method' keyword */ +sigsub_or_method_named + : KW_SUB_named_sig + { $$ = KW_SUB_named_sig; } + | KW_METHOD_named + { $$ = KW_METHOD_named; } + ; + /* An ordinary block */ block : PERLY_BRACE_OPEN remember stmtseq PERLY_BRACE_CLOSE { if (parser->copline > (line_t)$PERLY_BRACE_OPEN) @@ -362,27 +375,63 @@ barestmt: PLUGSTMT intro_my(); parser->parsed_sub = 1; } - | KW_SUB_named_sig subname startsub + | sigsub_or_method_named subname startsub /* sub declaration or definition under 'use feature * "signatures"'. (Note that a signature isn't * allowed in a declaration) */ { init_named_cv(PL_compcv, $subname); + if($sigsub_or_method_named == KW_METHOD_named) { + croak_kw_unless_class("method"); + class_prepare_method_parse(PL_compcv); + } parser->in_my = 0; parser->in_my_stash = NULL; } subattrlist optsigsubbody { + OP *body = $optsigsubbody; + SvREFCNT_inc_simple_void(PL_compcv); + if($sigsub_or_method_named == KW_METHOD_named) { + body = class_wrap_method_body(body); + } $subname->op_type == OP_CONST - ? newATTRSUB($startsub, $subname, NULL, $subattrlist, $optsigsubbody) - : newMYSUB( $startsub, $subname, NULL, $subattrlist, $optsigsubbody) + ? newATTRSUB($startsub, $subname, NULL, $subattrlist, body) + : newMYSUB( $startsub, $subname, NULL, $subattrlist, body) ; $$ = NULL; intro_my(); parser->parsed_sub = 1; } + | PHASER startsub + { + switch($PHASER) { + case KEY_ADJUST: + croak_kw_unless_class("ADJUST"); + class_prepare_method_parse(PL_compcv); + break; + default: + NOT_REACHED; + } + } + optsubbody + { + OP *body = $optsubbody; + SvREFCNT_inc_simple_void(PL_compcv); + + CV *cv; + + switch($PHASER) { + case KEY_ADJUST: + body = class_wrap_method_body(body); + cv = newATTRSUB($startsub, NULL, NULL, NULL, body); + class_add_ADJUST(PL_curstash, cv); + break; + } + $$ = NULL; + } | KW_PACKAGE BAREWORD[version] BAREWORD[package] PERLY_SEMICOLON /* version and package appear in the reverse order to what may be * expected, because toke.c has already pushed both of them to a stack @@ -394,6 +443,14 @@ barestmt: PLUGSTMT package_version($version); $$ = NULL; } + | KW_CLASS BAREWORD[version] BAREWORD[package] PERLY_SEMICOLON + { + package($package); + if ($version) + package_version($version); + $$ = NULL; + class_setup_stash(PL_curstash); + } | KW_USE_or_NO startsub { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ } BAREWORD[version] BAREWORD[module] optlistexpr PERLY_SEMICOLON @@ -545,6 +602,26 @@ barestmt: PLUGSTMT if (parser->copline > (line_t)$PERLY_BRACE_OPEN) parser->copline = (line_t)$PERLY_BRACE_OPEN; } + | KW_CLASS BAREWORD[version] BAREWORD[package] PERLY_BRACE_OPEN remember + { + package($package); + if ($version) { + package_version($version); + } + class_setup_stash(PL_curstash); + } + stmtseq PERLY_BRACE_CLOSE + { + /* a block is a loop that happens once */ + $$ = newWHILEOP(0, 1, NULL, + NULL, block_end($remember, $stmtseq), NULL, 0); + if (parser->copline > (line_t)$PERLY_BRACE_OPEN) + parser->copline = (line_t)$PERLY_BRACE_OPEN; + } + | fielddecl PERLY_SEMICOLON + { + $$ = $fielddecl; + } | sideff PERLY_SEMICOLON { $$ = $sideff; @@ -897,7 +974,7 @@ subsigguts: struct op_argcheck_aux *aux; OP *check; - if (!FEATURE_SIGNATURES_IS_ENABLED) + if (!FEATURE_SIGNATURES_IS_ENABLED && !CvIsMETHOD(PL_compcv)) Perl_croak(aTHX_ "Experimental " "subroutine signatures not enabled"); @@ -1253,6 +1330,19 @@ anonymous | KW_SUB_anon_sig startanonsub subattrlist sigsubbody %prec PERLY_PAREN_OPEN { SvREFCNT_inc_simple_void(PL_compcv); $$ = newANONATTRSUB($startanonsub, NULL, $subattrlist, $sigsubbody); } + | KW_METHOD_anon startanonsub + { + croak_kw_unless_class("method"); + class_prepare_method_parse(PL_compcv); + } + subattrlist sigsubbody %prec PERLY_PAREN_OPEN + { + OP *body = $sigsubbody; + + SvREFCNT_inc_simple_void(PL_compcv); + body = class_wrap_method_body(body); + $$ = newANONATTRSUB($startanonsub, NULL, $subattrlist, body); + } ; /* Things called with "do" */ @@ -1441,6 +1531,23 @@ myterm : PERLY_PAREN_OPEN expr PERLY_PAREN_CLOSE { $$ = $ary; } ; +/* "field" declarations */ +fieldvar: scalar %prec PERLY_PAREN_OPEN + { $$ = PadnamelistARRAY(PL_comppad_name)[$scalar->op_targ]; } + | hsh %prec PERLY_PAREN_OPEN + { $$ = PadnamelistARRAY(PL_comppad_name)[$hsh->op_targ]; } + | ary %prec PERLY_PAREN_OPEN + { $$ = PadnamelistARRAY(PL_comppad_name)[$ary->op_targ]; } + ; + +fielddecl + : KW_FIELD fieldvar + { + parser->in_my = 0; + $$ = newOP(OP_NULL, 0); + } + ; + /* Basic list expressions */ optlistexpr : empty %prec PREC_LOW diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 5f857398b3..2e6f984a4f 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -50,6 +50,12 @@ letter. to check the return value of your socket() call? See L<perlfunc/accept>. +=item ADJUST is experimental + +(S experimental::class) This warning is emitted if you use the C<ADJUST> +keyword of C<use feature 'class'>. This keyword is currently +experimental and its behaviour may change in future releases of Perl. + =item Aliasing via reference is experimental (S experimental::refaliasing) This warning is emitted if you use @@ -705,6 +711,18 @@ be directly assigned to. (S io) You tried to apply an encoding that did not exist to a filehandle, either with open() or binmode(). +=item Cannot invoke a method of "%s" on an instance of "%s" + +(F) You tried to directly call a C<method> subroutine of one class by passing +in a value that is an instance of a different class. This is not permitted, +as the method would not have access to the correct instance fields. + +=item Cannot invoke method on a non-instance + +(F) You tried to directly call a C<method> subroutine of a class by passing +in a value that is not an instance of that class. This is not permitted, as +the method would not then have access to its instance fields. + =item Cannot open %s as a dirhandle: it is already open as a filehandle (F) You tried to use opendir() to associate a dirhandle to a symbol (glob @@ -719,6 +737,11 @@ or scalar) that already holds a dirhandle. Since this idiom might render your code confusing, it was deprecated in Perl 5.10. As of Perl 5.28, it is a fatal error. +=item Cannot '%s' outside of a 'class' + +(F) You attempted to use one of the keywords that only makes sense inside +a C<class> definition, at a location that is not inside such a class. + =item Cannot pack %f with '%c' (F) You tried converting an infinity or not-a-number to an integer, @@ -729,6 +752,11 @@ which makes no sense. (F) You tried printing an infinity or not-a-number as a character (%c), which makes no sense. Maybe you meant '%s', or just stringifying it? +=item Cannot reopen existing class "%s" + +(F) You tried to begin a C<class> definition for a class that already exists. +A class may only have one definition block. + =item Cannot set tied @DB::args (F) C<caller> tried to set C<@DB::args>, but found it tied. Tying C<@DB::args> @@ -1720,6 +1748,12 @@ is better written as simply itself, perhaps preceded by a backslash for non-word characters. Doing it the way you did is not portable between ASCII and EBCDIC platforms. +=item class is experimental + +(S experimental::class) This warning is emitted if you use the C<class> +keyword of C<use feature 'class'>. This keyword is currently +experimental and its behaviour may change in future releases of Perl. + =item Cloning substitution context is unimplemented (F) Creating a new thread inside the C<s///> operator is not supported. @@ -2405,6 +2439,25 @@ PDP-11 or something? (F) A tied array claimed to have a negative number of elements, which is not possible. +=item field is experimental + +(S experimental::class) This warning is emitted if you use the C<field> +keyword of C<use feature 'class'>. This keyword is currently +experimental and its behaviour may change in future releases of Perl. + +=item Field %s is not accessible outside a method + +(F) An attempt was made to access a field variable of a class from code +that does not appear inside the body of a C<method> subroutine. This is not +permitted, as only methods will have access to the fields of an instance. + +=item Field %s of "%s" is not accessible in a method of "%s" + +(F) An attempt was made to access a field variable of a class, from a +method of another class nested inside the one that actually defined it. +This is not permitted, as only methods defined by a given class are +permitted to access fields of that class. + =item Field too wide in 'u' format in pack (W pack) Each line in an uuencoded string starts with a length indicator @@ -3734,10 +3787,25 @@ See L<perlfunc/unpack>. (F) An attempt was made to specify an entry in an overloading table that doesn't resolve to a valid subroutine. See L<overload>. +=item method is experimental + +(S experimental::class) This warning is emitted if you use the C<method> +keyword of C<use feature 'class'>. This keyword is currently +experimental and its behaviour may change in future releases of Perl. + =item Method %s not permitted See L</500 Server error>. +=item Method %s redefined + +(W redefine) You redefined a method. To suppress this warning, say + + { + no warnings 'redefine'; + *name = method { ... }; + } + =item Might be a runaway multi-line %s string starting on line %d (S) An advisory indicating that the previous error may have been caused diff --git a/pp_proto.h b/pp_proto.h index 66f4a420c9..a4ec0da86f 100644 --- a/pp_proto.h +++ b/pp_proto.h @@ -175,6 +175,7 @@ PERL_CALLCONV OP *Perl_pp_method_named(pTHX) __attribute__visibility__("hidden") PERL_CALLCONV OP *Perl_pp_method_redir(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_method_redir_super(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_method_super(pTHX) __attribute__visibility__("hidden"); +PERL_CALLCONV OP *Perl_pp_methstart(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_mkdir(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_modulo(pTHX) __attribute__visibility__("hidden"); PERL_CALLCONV OP *Perl_pp_multiconcat(pTHX) __attribute__visibility__("hidden"); @@ -6231,6 +6231,44 @@ S_get_aux_mg(pTHX_ AV *av); assert(av) #endif /* defined(PERL_IN_AV_C) */ +#if defined(PERL_IN_CLASS_C) || defined(PERL_IN_PAD_C) || \ + defined(PERL_IN_PERLY_C) || defined(PERL_IN_TOKE_C) +PERL_CALLCONV void +Perl_class_add_ADJUST(pTHX_ HV *stash, CV *cv); +# define PERL_ARGS_ASSERT_CLASS_ADD_ADJUST \ + assert(stash); assert(cv) + +PERL_CALLCONV void +Perl_class_add_field(pTHX_ HV *stash, PADNAME *pn); +# define PERL_ARGS_ASSERT_CLASS_ADD_FIELD \ + assert(stash); assert(pn) + +PERL_CALLCONV void +Perl_class_prepare_method_parse(pTHX_ CV *cv); +# define PERL_ARGS_ASSERT_CLASS_PREPARE_METHOD_PARSE \ + assert(cv) + +PERL_CALLCONV void +Perl_class_seal_stash(pTHX_ HV *stash); +# define PERL_ARGS_ASSERT_CLASS_SEAL_STASH \ + assert(stash) + +PERL_CALLCONV void +Perl_class_setup_stash(pTHX_ HV *stash); +# define PERL_ARGS_ASSERT_CLASS_SETUP_STASH \ + assert(stash) + +PERL_CALLCONV OP * +Perl_class_wrap_method_body(pTHX_ OP *o); +# define PERL_ARGS_ASSERT_CLASS_WRAP_METHOD_BODY + +PERL_CALLCONV void +Perl_croak_kw_unless_class(pTHX_ const char *kw); +# define PERL_ARGS_ASSERT_CROAK_KW_UNLESS_CLASS \ + assert(kw) + +#endif /* defined(PERL_IN_CLASS_C) || defined(PERL_IN_PAD_C) || \ + defined(PERL_IN_PERLY_C) || defined(PERL_IN_TOKE_C) */ #if defined(PERL_IN_DEB_C) STATIC void S_deb_stack_n(pTHX_ SV **stack_base, I32 stack_min, I32 stack_max, I32 mark_min, I32 mark_max); diff --git a/regen/feature.pl b/regen/feature.pl index e06fe281d9..32ae36cc83 100755 --- a/regen/feature.pl +++ b/regen/feature.pl @@ -45,6 +45,7 @@ my %feature = ( defer => 'defer', extra_paired_delimiters => 'more_delims', module_true => 'module_true', + class => 'class', ); # NOTE: If a feature is ever enabled in a non-contiguous range of Perl @@ -500,7 +501,7 @@ read_only_bottom_close_and_rename($h); __END__ package feature; -our $VERSION = '1.79'; +our $VERSION = '1.80'; FEATURES @@ -1298,6 +1299,17 @@ failures, but reaching the end of the module when this feature is in effect will prevent C<perl> from throwing an exception that the module "did not return a true value". +=head2 The 'class' feature + +B<WARNING>: This feature is still experimental and the implementation may +change or be removed in future versions of Perl. For this reason, Perl will +warn when you use the feature, unless you have explicitly disabled the warning: + + no warnings "experimental::class"; + +This feature enables the C<class> block syntax and other associated keywords +which implement the "new" object system, previously codenamed "Corinna". + =head1 FEATURE BUNDLES It's possible to load multiple features together, using diff --git a/regen/keywords.pl b/regen/keywords.pl index 7164fe2336..2438436bf0 100755 --- a/regen/keywords.pl +++ b/regen/keywords.pl @@ -51,6 +51,10 @@ my %feature_kw = ( catch => 'try', finally => 'try', defer => 'defer', + class => 'class', + field => 'class', + method => 'class', + ADJUST => 'class', ); my %pos = map { ($_ => 1) } @{$by_strength{'+'}}; @@ -119,6 +123,7 @@ __END__ +__DATA__ +__END__ -__SUB__ ++ADJUST +AUTOLOAD +BEGIN +UNITCHECK @@ -144,6 +149,7 @@ __END__ -chown -chr -chroot +-class -close -closedir -cmp @@ -179,6 +185,7 @@ __END__ -exp -fc -fcntl +-field -fileno +finally -flock @@ -244,6 +251,7 @@ __END__ -lt +m +map +-method -mkdir -msgctl -msgget diff --git a/regen/opcodes b/regen/opcodes index 98669955f2..9063072d6d 100644 --- a/regen/opcodes +++ b/regen/opcodes @@ -600,3 +600,5 @@ is_tainted is_tainted ck_null fs1 # exists-or; not currently exposed as a Perl-callable op helemexistsor hash element exists or ck_helemexistsor | S S + +methstart method start ck_null + diff --git a/regen/warnings.pl b/regen/warnings.pl index 55b98bc6f6..98e6b6cab9 100644 --- a/regen/warnings.pl +++ b/regen/warnings.pl @@ -16,7 +16,7 @@ # # This script is normally invoked from regen.pl. -$VERSION = '1.61'; +$VERSION = '1.62'; BEGIN { require './regen/regen_lib.pl'; @@ -146,6 +146,8 @@ my $TREE = { [ 5.035, DEFAULT_ON], 'experimental::extra_paired_delimiters' => [ 5.035, DEFAULT_ON], + 'experimental::class' => + [ 5.037, DEFAULT_ON ], }], 'missing' => [ 5.021, DEFAULT_OFF], diff --git a/t/class/class.t b/t/class/class.t new file mode 100644 index 0000000000..4e24e49bf4 --- /dev/null +++ b/t/class/class.t @@ -0,0 +1,86 @@ +#!./perl + +BEGIN { + chdir 't' if -d 't'; + require './test.pl'; + set_up_inc('../lib'); + require Config; +} + +use v5.36; +use feature 'class'; +no warnings 'experimental::class'; + +{ + class Test1 { + method hello { return "hello, world"; } + } + + my $obj = Test1->new; + isa_ok($obj, "Test1", '$obj'); + + is($obj->hello, "hello, world", '$obj->hello'); +} + +# Classes are still regular packages +{ + class Test2 { + my $ok = "OK"; + sub NotAMethod { return $ok } + } + + is(Test2::NotAMethod(), "OK", 'Class can contain regular subs'); +} + +# Classes accept full package names +{ + class Test3::Foo { + method hello { return "This" } + } + is(Test3::Foo->new->hello, "This", 'Class supports fully-qualified package names'); +} + +# Unit class +{ + class Test4::A; + method m { return "unit-A" } + + class Test4::B; + method m { return "unit-B" } + + package main; + ok(eq_array([Test4::A->new->m, Test4::B->new->m], ["unit-A", "unit-B"]), + 'Unit class syntax works'); +} + +# Class {BLOCK} syntax parses like package +{ + my $result = ""; + eval q{ + $result .= "a(" . __PACKAGE__ . "/" . eval("__PACKAGE__") . ")\n"; + class Test5 1.23 { + $result .= "b(" . __PACKAGE__ . "/" . eval("__PACKAGE__") . ")\n"; + } + $result .= "c(" . __PACKAGE__ . "/" . eval("__PACKAGE__") . ")\n"; + } or die $@; + is($result, "a(main/main)\nb(Test5/Test5)\nc(main/main)\n", + 'class sets __PACKAGE__ correctly'); + is($Test5::VERSION, 1.23, 'class NAME VERSION { BLOCK } sets $VERSION'); +} + +# Unit class syntax parses like package +{ + my $result = ""; + eval q{ + $result .= "a(" . __PACKAGE__ . "/" . eval("__PACKAGE__") . ")\n"; + class Test6 4.56; + $result .= "b(" . __PACKAGE__ . "/" . eval("__PACKAGE__") . ")\n"; + package main; + $result .= "c(" . __PACKAGE__ . "/" . eval("__PACKAGE__") . ")\n"; + } or die $@; + is($result, "a(main/main)\nb(Test6/Test6)\nc(main/main)\n", + 'class sets __PACKAGE__ correctly'); + is($Test6::VERSION, 4.56, 'class NAME VERSION; sets $VERSION'); +} + +done_testing; diff --git a/t/class/construct.t b/t/class/construct.t new file mode 100644 index 0000000000..de5c7d3872 --- /dev/null +++ b/t/class/construct.t @@ -0,0 +1,55 @@ +#!./perl + +BEGIN { + chdir 't' if -d 't'; + require './test.pl'; + set_up_inc('../lib'); + require Config; +} + +use v5.36; +use feature 'class'; +no warnings qw( experimental::class experimental::builtin ); + +use builtin qw( blessed reftype ); + +{ + class Test1 { + field $x; + ADJUST { $x = 123; } + method x { return $x; } + } + + my $obj = Test1->new(); + is($obj->x, 123, 'Value of $x set by ADJUST'); + + # The following tests aren't really related to construction, just the + # general nature of object instance refs. If this test file gets too long + # they could be moved to their own file. + is(ref $obj, "Test1", 'ref of $obj'); + is(blessed $obj, "Test1", 'blessed of $obj'); + is(reftype $obj, "ARRAY", 'reftype of $obj'); + + # num/stringification of object without overload + is($obj+0, builtin::refaddr($obj), 'numified object'); + like("$obj", qr/^Test1=ARRAY\(0x[[:xdigit:]]+\)$/, 'stringified object' ); + + ok(!eval { Test1->new(y => 456); 1 }, 'Unrecognised parameter fails'); + like($@, qr/^Unrecognised parameters for "Test1" constructor: y at /, + 'Exception thrown by constructor for unrecogniser parameter'); +} + +{ + class Test2 { + use overload + '0+' => sub { return 12345 }, + '""' => sub { "<Test2 instance>" }, + fallback => 1; + } + + my $obj = Test2->new; + is($obj+0, 12345, 'numified object with overload'); + is("$obj", "<Test2 instance>", 'stringified object with overload' ); +} + +done_testing; diff --git a/t/class/destruct.t b/t/class/destruct.t new file mode 100644 index 0000000000..49580825bf --- /dev/null +++ b/t/class/destruct.t @@ -0,0 +1,60 @@ +#!./perl + +BEGIN { + chdir 't' if -d 't'; + require './test.pl'; + set_up_inc('../lib'); + require Config; +} + +use v5.36; +use feature 'class'; +no warnings 'experimental::class'; + +# A legacy-perl class to act as a test helper +package DestructionNotify { + sub new { my $pkg = shift; bless [ @_ ], $pkg } + sub DESTROY { my $self = shift; ${ $self->[0] } .= $self->[1] } +} + +{ + my $destroyed; + my $notifier = DestructionNotify->new( \$destroyed, 1 ); + undef $notifier; + $destroyed or + BAIL_OUT('DestructionNotify does not work'); +} + +{ + my $destroyed; + + class Test1 { + field $x; + method x { return $x; } + ADJUST { + $x = DestructionNotify->new( \$destroyed, "x" ); + } + + field $y; + field $z; + ADJUST { + # These in the "wrong" order just to prove to ourselves that it + # doesn't matter + $z = DestructionNotify->new( \$destroyed, "z" ); + $y = DestructionNotify->new( \$destroyed, "y" ); + } + } + + my $obj = Test1->new; + ok(!$destroyed, 'Destruction notify not yet triggered'); + + refcount_is $obj, 1, 'Object has one reference'; + + # one in $obj, one stack temporary here + refcount_is $obj->x, 2, 'DestructionNotify has two references'; + + undef $obj; + is($destroyed, "zyx", 'Destruction notify triggered by object destruction in the correct order'); +} + +done_testing; diff --git a/t/class/field.t b/t/class/field.t new file mode 100644 index 0000000000..b926c58616 --- /dev/null +++ b/t/class/field.t @@ -0,0 +1,132 @@ +#!./perl + +BEGIN { + chdir 't' if -d 't'; + require './test.pl'; + set_up_inc('../lib'); + require Config; +} + +use v5.36; +use feature 'class'; +no warnings 'experimental::class'; + +# We can't test fields in isolation without having at least one method to +# use them from. We'll try to keep most of the heavy testing of method +# abilities to t/class/method.t + +# field in method +{ + class Test1 { + field $f; + method incr { return ++$f; } + } + + my $obj = Test1->new; + $obj->incr; + is($obj->incr, 2, 'Field $f incremented twice'); + + my $obj2 = Test1->new; + is($obj2->incr, 1, 'Fields are distinct between instances'); +} + +# fields are distinct +{ + class Test2 { + field $x; + field $y; + + method setpos { $x = $_[0]; $y = $_[1] } + method x { return $x; } + method y { return $y; } + } + + my $obj = Test2->new; + $obj->setpos(10, 20); + is($obj->x, 10, '$pos->x'); + is($obj->y, 20, '$pos->y'); +} + +# fields of all variable types +{ + class Test3 { + field $s; + field @a; + field %h; + + method setup { + $s = "scalar"; + @a = ( "array" ); + %h = ( key => "hash" ); + return $self; # test chaining + } + method test { + ::is($s, "scalar", 'scalar storage'); + ::is($a[0], "array", 'array storage'); + ::is($h{key}, "hash", 'hash storage'); + } + } + + Test3->new->setup->test; +} + +# fields can be captured by anon subs +{ + class Test4 { + field $count; + + method make_incrsub { + return sub { $count++ }; + } + + method count { return $count } + } + + my $obj = Test4->new; + my $incr = $obj->make_incrsub; + + $incr->(); + $incr->(); + $incr->(); + + is($obj->count, 3, '$obj->count after invoking closure x 3'); +} + +# fields can be captured by anon methods +{ + class Test5 { + field $count; + + method make_incrmeth { + return method { $count++ }; + } + + method count { return $count } + } + + my $obj = Test5->new; + my $incr = $obj->make_incrmeth; + + $obj->$incr; + $obj->$incr; + $obj->$incr; + + is($obj->count, 3, '$obj->count after invoking method-closure x 3'); +} + +# fields of multiple unit classes are distinct +{ + class Test6::A; + field $x; ADJUST { $x = "A" } + method m { return "unit-$x" } + + class Test6::B; + field $x; ADJUST { $x = "B" } + method m { return "unit-$x" } + + package main; + ok(eq_array([Test6::A->new->m, Test6::B->new->m], ["unit-A", "unit-B"]), + 'Fields of multiple unit classes remain distinct'); +} + +done_testing; diff --git a/t/class/method.t b/t/class/method.t new file mode 100644 index 0000000000..60560030e9 --- /dev/null +++ b/t/class/method.t @@ -0,0 +1,92 @@ +#!./perl + +BEGIN { + chdir 't' if -d 't'; + require './test.pl'; + set_up_inc('../lib'); + require Config; +} + +use v5.36; +use feature 'class'; +no warnings 'experimental::class'; + +# $self in method +{ + class Test1 { + method retself { return $self } + } + + my $obj = Test1->new; + is($obj->retself, $obj, '$self inside method'); +} + +# methods have signatures; signatures do not capture $self +{ + # Turn off the 'signatures' feature to prove that 'method' is always + # signatured even without it + no feature 'signatures'; + + class Test2 { + method retfirst ( $x = 123 ) { return $x; } + } + + my $obj = Test2->new; + is($obj->retfirst, 123, 'method signature params work'); + is($obj->retfirst(456), 456, 'method signature params skip $self'); +} + +# methods can still capture regular package lexicals +{ + class Test3 { + my $count; + method inc { return $count++ } + } + + my $obj1 = Test3->new; + $obj1->inc; + + is($obj1->inc, 1, '$obj1->inc sees 1'); + + my $obj2 = Test3->new; + is($obj2->inc, 2, '$obj2->inc sees 2'); +} + +# $self is shifted from @_ +{ + class Test4 { + method args { return @_ } + } + + my $obj = Test4->new; + ok(eq_array([$obj->args("a", "b")], ["a", "b"]), '$self is shifted from @_'); +} + +# anon methods +{ + class Test5 { + method anonmeth { + return method { + return "Result"; + } + } + } + + my $obj = Test5->new; + my $mref = $obj->anonmeth; + + is($obj->$mref, "Result", 'anon method can be invoked'); +} + +# methods can be forward declared without a body +{ + class Test6 { + method forwarded; + + method forwarded { return "OK" } + } + + is(Test6->new->forwarded, "OK", 'forward-declared method works'); +} + +done_testing; diff --git a/t/class/phasers.t b/t/class/phasers.t new file mode 100644 index 0000000000..59ebbeee38 --- /dev/null +++ b/t/class/phasers.t @@ -0,0 +1,39 @@ +#!./perl + +BEGIN { + chdir 't' if -d 't'; + require './test.pl'; + set_up_inc('../lib'); + require Config; +} + +use v5.36; +use feature 'class'; +no warnings 'experimental::class'; + +# ADJUST +{ + my $adjusted; + + class Test1 { + ADJUST { $adjusted .= "a" } + ADJUST { $adjusted .= "b" } + } + + Test1->new; + is($adjusted, "ab", 'both ADJUST blocks run in order'); +} + +# $self in ADJUST +{ + my $self_in_ADJUST; + + class Test2 { + ADJUST { $self_in_ADJUST = $self; } + } + + my $obj = Test2->new; + is($self_in_ADJUST, $obj, '$self is set correctly inside ADJUST blocks'); +} + +done_testing; diff --git a/t/lib/croak/class b/t/lib/croak/class new file mode 100644 index 0000000000..2b564ee15e --- /dev/null +++ b/t/lib/croak/class @@ -0,0 +1,68 @@ +__END__ +# Method calls on no args +no warnings 'experimental::class'; +use feature 'class'; +class XXX { method m { } } +XXX::m() +EXPECT +Cannot invoke method "m" on a non-instance at - line 5. +######## +# Method calls on non-ref +no warnings 'experimental::class'; +use feature 'class'; +class XXX { method m { } } +XXX::m(123) +EXPECT +Cannot invoke method "m" on a non-instance at - line 5. +######## +# Method calls on non-object +no warnings 'experimental::class'; +use feature 'class'; +class XXX { method m { } } +XXX::m([]) +EXPECT +Cannot invoke method "m" on a non-instance at - line 5. +######## +# Method calls from a different class +no warnings 'experimental::class'; +use feature 'class'; +class XXX { method m { } } +class YYY {} +YYY->new->XXX::m(); +EXPECT +Cannot invoke a method of "XXX" on an instance of "YYY" at - line 6. +######## +no warnings 'experimental::class'; +use feature 'class'; +class XXX { method m { } } +(bless {}, "XXX")->m() +EXPECT +Cannot invoke method "m" on a non-instance at - line 4. +######## +no warnings 'experimental::class'; +use feature 'class'; +class XXX { field $zz; $zz = 123; } +EXPECT +Field $zz is not accessible outside a method at - line 3. +######## +no warnings 'experimental::class'; +use feature 'class'; +class XXX { field $x; sub f { print $x } } +EXPECT +Field $x is not accessible outside a method at - line 3. +######## +no warnings 'experimental::class'; +use feature 'class'; +class XXX { + field $x; + class YYY { method m { print $x } } +} +EXPECT +Field $x of "XXX" is not accessible in a method of "YYY" at - line 5. +######## +no warnings 'experimental::class'; +use feature 'class'; +class XXX {} +class XXX {} +EXPECT +Cannot reopen existing class "XXX" at - line 4. diff --git a/t/lib/warnings/class b/t/lib/warnings/class new file mode 100644 index 0000000000..36cf8a39dd --- /dev/null +++ b/t/lib/warnings/class @@ -0,0 +1,32 @@ +class.c warnings from 'class' feature +__END__ +# experimental warnings +use strict; +use feature 'class'; +class C { + method m {} +} +EXPECT +class is experimental at - line 4. +method is experimental at - line 5. +######## +# constructor warnings +use v5.36; +use feature 'class'; +no warnings 'experimental::class'; +class C { } +C->new(); +eval { C->new('foo') }; # suppress error +EXPECT +Odd number of arguments passed to "C" constructor at - line 7. +######## +# field shadowing warning +use v5.36; +use feature 'class'; +no warnings 'experimental::class'; +class C { + field $x; + field $x; +} +EXPECT +"field" variable $x masks earlier declaration in same scope at - line 7. diff --git a/t/op/coreamp.t b/t/op/coreamp.t index b283e8cebd..ca39c2c555 100644 --- a/t/op/coreamp.t +++ b/t/op/coreamp.t @@ -1158,12 +1158,12 @@ like $@, qr'^Undefined format "STDOUT" called', File::Spec::Functions::updir,'regen','keywords.pl' ); my %nottest_words = map { $_ => 1 } qw( - AUTOLOAD BEGIN CHECK CORE DESTROY END INIT UNITCHECK + ADJUST AUTOLOAD BEGIN CHECK CORE DESTROY END INIT UNITCHECK __DATA__ __END__ - and catch cmp default defer do dump else elsif eq eval finally for foreach - format ge given goto grep gt if isa last le local lt m map my ne next no - or our package print printf q qq qr qw qx redo require return s say sort - state sub tr try unless until use when while x xor y + and catch class cmp default defer do dump else elsif eq eval field finally + for foreach format ge given goto grep gt if isa last le local lt m map + method my ne next no or our package print printf q qq qr qw qx redo require + return s say sort state sub tr try unless until use when while x xor y ); open my $kh, $keywords_file or die "$0 cannot open $keywords_file: $!"; diff --git a/t/op/coresubs.t b/t/op/coresubs.t index 39f5864182..ee36650d23 100644 --- a/t/op/coresubs.t +++ b/t/op/coresubs.t @@ -15,11 +15,11 @@ BEGIN { use B; my %unsupported = map +($_=>1), qw ( - __DATA__ __END__ AUTOLOAD BEGIN UNITCHECK CORE DESTROY END INIT CHECK - and catch cmp default defer do dump else elsif eq eval finally for foreach - format ge given goto grep gt if isa last le local lt m map my ne next - no or our package print printf q qq qr qw qx redo require - return s say sort state sub tr try unless until use + __DATA__ __END__ ADJUST AUTOLOAD BEGIN UNITCHECK CORE DESTROY END INIT CHECK + and catch class cmp default defer do dump else elsif eq eval field + finally for foreach format ge given goto grep gt if isa last le local + lt m map method my ne next no or our package print printf q qq qr qw qx + redo require return s say sort state sub tr try unless until use when while x xor y ); my %args_for = ( diff --git a/t/porting/diag.t b/t/porting/diag.t index 22ccca3b3a..7d2e45fa46 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -38,6 +38,8 @@ foreach (@{(setup_embed())[0]}) { my $embed= $_->{embed} or next; next unless $embed->{name} =~ /warn|(?<!ov)err|(\b|_)die|croak/i; + # Skip some known exceptions + next if $embed->{name} =~ /croak_kw_unless_class/; # The flag p means that this function may have a 'Perl_' prefix # The flag S means that this function may have a 'S_' prefix push @functions, $embed->{name}; @@ -235,6 +235,7 @@ static const char* const lex_state_names[] = { #define PRETERMBLOCK(retval) return (PL_expect = XTERMBLOCK,PL_bufptr = s, REPORT(retval)) #define PREREF(retval) return (PL_expect = XREF,PL_bufptr = s, REPORT(retval)) #define TERM(retval) return (CLINE, PL_expect = XOPERATOR, PL_bufptr = s, REPORT(retval)) +#define PHASERBLOCK(f) return (pl_yylval.ival=f, PL_expect = XBLOCK, PL_bufptr = s, REPORT((int)PHASER)) #define POSTDEREF(f) return (PL_bufptr = s, S_postderef(aTHX_ REPORT(f),s[1])) #define LOOPX(f) return (PL_bufptr = force_word(s,BAREWORD,TRUE,FALSE), \ pl_yylval.ival=f, \ @@ -441,16 +442,20 @@ static struct debug_tokens { DEBUG_TOKEN (OPNUM, FUNC1), DEBUG_TOKEN (NONE, HASHBRACK), DEBUG_TOKEN (IVAL, KW_CATCH), + DEBUG_TOKEN (IVAL, KW_CLASS), DEBUG_TOKEN (IVAL, KW_CONTINUE), DEBUG_TOKEN (IVAL, KW_DEFAULT), DEBUG_TOKEN (IVAL, KW_DO), DEBUG_TOKEN (IVAL, KW_ELSE), DEBUG_TOKEN (IVAL, KW_ELSIF), + DEBUG_TOKEN (IVAL, KW_FIELD), DEBUG_TOKEN (IVAL, KW_GIVEN), DEBUG_TOKEN (IVAL, KW_FOR), DEBUG_TOKEN (IVAL, KW_FORMAT), DEBUG_TOKEN (IVAL, KW_IF), DEBUG_TOKEN (IVAL, KW_LOCAL), + DEBUG_TOKEN (IVAL, KW_METHOD_anon), + DEBUG_TOKEN (IVAL, KW_METHOD_named), DEBUG_TOKEN (IVAL, KW_MY), DEBUG_TOKEN (IVAL, KW_PACKAGE), DEBUG_TOKEN (IVAL, KW_REQUIRE), @@ -5382,7 +5387,10 @@ yyl_sub(pTHX_ char *s, const int key) bool have_name, have_proto; STRLEN len; SV *format_name = NULL; - bool is_sigsub = FEATURE_SIGNATURES_IS_ENABLED; + bool is_method = (key == KEY_method); + + /* method always implies signatures */ + bool is_sigsub = is_method || FEATURE_SIGNATURES_IS_ENABLED; SSize_t off = s-SvPVX(PL_linestr); char *d; @@ -5461,9 +5469,9 @@ yyl_sub(pTHX_ char *s, const int key) if ( !(*s == ':' && s[1] != ':') && (*s != '{' && *s != '(') && key != KEY_format) { - assert(key == KEY_sub || key == KEY_AUTOLOAD || - key == KEY_DESTROY || key == KEY_BEGIN || - key == KEY_UNITCHECK || key == KEY_CHECK || + assert(key == KEY_sub || key == KEY_method || + key == KEY_AUTOLOAD || key == KEY_DESTROY || + key == KEY_BEGIN || key == KEY_UNITCHECK || key == KEY_CHECK || key == KEY_INIT || key == KEY_END || key == KEY_my || key == KEY_state || key == KEY_our); @@ -5479,18 +5487,23 @@ yyl_sub(pTHX_ char *s, const int key) PL_lex_stuff = NULL; force_next(THING); } + if (!have_name) { if (PL_curstash) sv_setpvs(PL_subname, "__ANON__"); else sv_setpvs(PL_subname, "__ANON__::__ANON__"); - if (is_sigsub) + if (is_method) + TOKEN(KW_METHOD_anon); + else if (is_sigsub) TOKEN(KW_SUB_anon_sig); else TOKEN(KW_SUB_anon); } force_ident_maybe_lex('&'); - if (is_sigsub) + if (is_method) + TOKEN(KW_METHOD_named); + else if (is_sigsub) TOKEN(KW_SUB_named_sig); else TOKEN(KW_SUB_named); @@ -7815,6 +7828,16 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct return yyl_sub(aTHX_ PL_bufptr, key); return yyl_just_a_word(aTHX_ s, len, orig_keyword, c); + case KEY_ADJUST: + Perl_ck_warner_d(aTHX_ + packWARN(WARN_EXPERIMENTAL__CLASS), "ADJUST is experimental"); + + /* The way that KEY_CHECK et.al. are handled currently are nothing + * short of crazy. We won't copy that model for new phasers, but use + * this as an experiment to test if this will work + */ + PHASERBLOCK(KEY_ADJUST); + case KEY_abs: UNI(OP_ABS); @@ -7852,6 +7875,15 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct case KEY_chop: UNI(OP_CHOP); + case KEY_class: + Perl_ck_warner_d(aTHX_ + packWARN(WARN_EXPERIMENTAL__CLASS), "class is experimental"); + + s = force_word(s,BAREWORD,FALSE,TRUE); + s = skipspace(s); + s = force_strict_version(s); + PREBLOCK(KW_CLASS); + case KEY_continue: /* We have to disambiguate the two senses of "continue". If the next token is a '{' then @@ -8005,6 +8037,18 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct case KEY_endgrent: FUN0(OP_EGRENT); + case KEY_field: + /* TODO: maybe this should use the same parser/grammar structures as + * `my`, but it's also rather messy because of the `our` conflation + */ + Perl_ck_warner_d(aTHX_ + packWARN(WARN_EXPERIMENTAL__CLASS), "field is experimental"); + + croak_kw_unless_class("field"); + + PL_parser->in_my = KEY_field; + OPERATOR(KW_FIELD); + case KEY_finally: Perl_ck_warner_d(aTHX_ packWARN(WARN_EXPERIMENTAL__TRY), "try/catch/finally is experimental"); @@ -8537,6 +8581,12 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct case KEY_substr: LOP(OP_SUBSTR,XTERM); + case KEY_method: + /* For now we just treat 'method' identical to 'sub' plus a warning */ + Perl_ck_warner_d(aTHX_ + packWARN(WARN_EXPERIMENTAL__CLASS), "method is experimental"); + return yyl_sub(aTHX_ s, KEY_method); + case KEY_format: case KEY_sub: return yyl_sub(aTHX_ s, key); @@ -9816,7 +9866,8 @@ S_pending_ident(pTHX) /* PL_no_myglob is constant */ GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); yyerror_pv(Perl_form(aTHX_ PL_no_myglob, - PL_in_my == KEY_my ? "my" : "state", + PL_in_my == KEY_my ? "my" : + PL_in_my == KEY_field ? "field" : "state", *PL_tokenbuf == '&' ? "subroutine" : "variable", PL_tokenbuf), UTF ? SVf_UTF8 : 0); diff --git a/warnings.h b/warnings.h index f06f65911f..e4e4e86053 100644 --- a/warnings.h +++ b/warnings.h @@ -131,6 +131,10 @@ #define WARN_EXPERIMENTAL__EXTRA_PAIRED_DELIMITERS 70 #define WARN_EXPERIMENTAL__FOR_LIST 71 #define WARN_SCALAR 72 + +/* Warnings Categories added in Perl 5.037 */ + +#define WARN_EXPERIMENTAL__CLASS 73 #define WARNsize 19 #define WARN_ALLstring "\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" @@ -318,6 +322,7 @@ category parameters passed. =for apidoc Amnh||WARN_EXPERIMENTAL__EXTRA_PAIRED_DELIMITERS =for apidoc Amnh||WARN_EXPERIMENTAL__FOR_LIST =for apidoc Amnh||WARN_SCALAR +=for apidoc Amnh||WARN_EXPERIMENTAL__CLASS =cut */ diff --git a/win32/GNUmakefile b/win32/GNUmakefile index dad6db1a74..e0ee1a0470 100644 --- a/win32/GNUmakefile +++ b/win32/GNUmakefile @@ -961,6 +961,7 @@ MICROCORE_SRC = \ ..\av.c \ ..\builtin.c \ ..\caretx.c \ + ..\class.c \ ..\deb.c \ ..\doio.c \ ..\doop.c \ diff --git a/win32/Makefile b/win32/Makefile index fe5019a4a8..a50ee09a77 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -671,6 +671,7 @@ DEL = del MICROCORE_SRC = \ ..\av.c \ ..\caretx.c \ + ..\class.c \ ..\builtin.c \ ..\deb.c \ ..\doio.c \ |