case 25:
#line 278 "perly.y"
{
- (yyval.opval) = newSTATEOP(SvUTF8(((SVOP*)(ps[(1) - (2)].val.p_tkval))->op_sv),
- savepv(SvPVX(((SVOP*)(ps[(1) - (2)].val.p_tkval))->op_sv)), (ps[(2) - (2)].val.opval));
+ (yyval.opval) = newSTATEOP(SVf_UTF8
+ * PVAL((ps[(1) - (2)].val.p_tkval))[strlen(PVAL((ps[(1) - (2)].val.p_tkval)))+1],
+ PVAL((ps[(1) - (2)].val.p_tkval)), (ps[(2) - (2)].val.opval));
TOKEN_GETMAD((ps[(1) - (2)].val.p_tkval),
(ps[(2) - (2)].val.opval) ? cLISTOPx((yyval.opval))->op_first : (yyval.opval), 'L');
- op_free((OP*)(ps[(1) - (2)].val.p_tkval));
;}
break;
case 26:
#line 286 "perly.y"
{
- (yyval.opval) = newSTATEOP(SvUTF8(((SVOP*)(ps[(1) - (2)].val.p_tkval))->op_sv),
- savepv(SvPVX(((SVOP*)(ps[(1) - (2)].val.p_tkval))->op_sv)), (ps[(2) - (2)].val.opval));
+ (yyval.opval) = newSTATEOP(SVf_UTF8
+ * PVAL((ps[(1) - (2)].val.p_tkval))[strlen(PVAL((ps[(1) - (2)].val.p_tkval)))+1],
+ PVAL((ps[(1) - (2)].val.p_tkval)), (ps[(2) - (2)].val.opval));
TOKEN_GETMAD((ps[(1) - (2)].val.p_tkval), cLISTOPx((yyval.opval))->op_first, 'L');
- op_free((OP*)(ps[(1) - (2)].val.p_tkval));
;}
break;
/* Generated from:
- * f140f4bf4565d188246d4b85b0baf052281eeed1824a5697fcb811727a34da08 perly.y
+ * 28c2c7738eefc00762e227af0363c729186c992e9127e0c935684cccbf3a3b4f perly.y
* 73288b53f1f6dc0183252a5a8e4f39cfe36e357e77233704fad3021fee88eb5b regen_perly.pl
* ex: set ro: */
/* Generated from:
- * f140f4bf4565d188246d4b85b0baf052281eeed1824a5697fcb811727a34da08 perly.y
+ * 28c2c7738eefc00762e227af0363c729186c992e9127e0c935684cccbf3a3b4f perly.y
* 73288b53f1f6dc0183252a5a8e4f39cfe36e357e77233704fad3021fee88eb5b regen_perly.pl
* ex: set ro: */
};
/* Generated from:
- * f140f4bf4565d188246d4b85b0baf052281eeed1824a5697fcb811727a34da08 perly.y
+ * 28c2c7738eefc00762e227af0363c729186c992e9127e0c935684cccbf3a3b4f perly.y
* 73288b53f1f6dc0183252a5a8e4f39cfe36e357e77233704fad3021fee88eb5b regen_perly.pl
* ex: set ro: */
labfullstmt: LABEL barestmt
{
- $$ = newSTATEOP(SvUTF8(((SVOP*)$1)->op_sv),
- savepv(SvPVX(((SVOP*)$1)->op_sv)), $2);
+ $$ = newSTATEOP(SVf_UTF8
+ * PVAL($1)[strlen(PVAL($1))+1],
+ PVAL($1), $2);
TOKEN_GETMAD($1,
$2 ? cLISTOPx($$)->op_first : $$, 'L');
- op_free((OP*)$1);
}
| LABEL labfullstmt
{
- $$ = newSTATEOP(SvUTF8(((SVOP*)$1)->op_sv),
- savepv(SvPVX(((SVOP*)$1)->op_sv)), $2);
+ $$ = newSTATEOP(SVf_UTF8
+ * PVAL($1)[strlen(PVAL($1))+1],
+ PVAL($1), $2);
TOKEN_GETMAD($1, cLISTOPx($$)->op_first, 'L');
- op_free((OP*)$1);
}
;
{ GIVEN, TOKENTYPE_IVAL, "GIVEN" },
{ HASHBRACK, TOKENTYPE_NONE, "HASHBRACK" },
{ IF, TOKENTYPE_IVAL, "IF" },
- { LABEL, TOKENTYPE_OPVAL, "LABEL" },
+ { LABEL, TOKENTYPE_PVAL, "LABEL" },
{ LOCAL, TOKENTYPE_IVAL, "LOCAL" },
{ LOOPEX, TOKENTYPE_OPNUM, "LOOPEX" },
{ LSTOP, TOKENTYPE_OPNUM, "LSTOP" },
case FUNC0SUB:
case UNIOPSUB:
case LSTOPSUB:
- case LABEL:
if (pl_yylval.opval)
append_madprops(PL_thismad, pl_yylval.opval, 0);
PL_thismad = 0;
}
break;
+ /* pval */
+ case LABEL:
+ break;
+
case ']':
case '}':
if (PL_faketokens)
if (!anydelim && PL_expect == XSTATE
&& d < PL_bufend && *d == ':' && *(d + 1) != ':') {
s = d + 1;
- pl_yylval.opval = (OP*)newSVOP(OP_CONST, 0,
- newSVpvn_flags(PL_tokenbuf,
- len, UTF ? SVf_UTF8 : 0));
+ pl_yylval.pval = savepvn(PL_tokenbuf, len+1);
+ pl_yylval.pval[len] = '\0';
+ pl_yylval.pval[len+1] = UTF ? 1 : 0;
CLINE;
TOKEN(LABEL);
}
if (PL_lex_state == LEX_KNOWNEXT) {
PL_parser->yychar = yylex();
if (PL_parser->yychar == LABEL) {
- SV *lsv;
+ char * const lpv = pl_yylval.pval;
+ STRLEN llen = strlen(lpv);
PL_parser->yychar = YYEMPTY;
- lsv = newSV_type(SVt_PV);
- sv_copypv(lsv, cSVOPx(pl_yylval.opval)->op_sv);
- return lsv;
+ return newSVpvn_flags(lpv, llen, lpv[llen+1] ? SVf_UTF8 : 0);
} else {
yyunlex();
goto no_label;