#define PL_lex_defer (PERL_GET_INTERP->Ilex_defer)
#define PL_lex_dojoin (PERL_GET_INTERP->Ilex_dojoin)
#define PL_lex_expect (PERL_GET_INTERP->Ilex_expect)
-#define PL_lex_fakebrack (PERL_GET_INTERP->Ilex_fakebrack)
#define PL_lex_formbrack (PERL_GET_INTERP->Ilex_formbrack)
#define PL_lex_inpat (PERL_GET_INTERP->Ilex_inpat)
#define PL_lex_inwhat (PERL_GET_INTERP->Ilex_inwhat)
#define PL_lex_defer (vTHX->Ilex_defer)
#define PL_lex_dojoin (vTHX->Ilex_dojoin)
#define PL_lex_expect (vTHX->Ilex_expect)
-#define PL_lex_fakebrack (vTHX->Ilex_fakebrack)
#define PL_lex_formbrack (vTHX->Ilex_formbrack)
#define PL_lex_inpat (vTHX->Ilex_inpat)
#define PL_lex_inwhat (vTHX->Ilex_inwhat)
#define PL_lex_defer (aTHXo->interp.Ilex_defer)
#define PL_lex_dojoin (aTHXo->interp.Ilex_dojoin)
#define PL_lex_expect (aTHXo->interp.Ilex_expect)
-#define PL_lex_fakebrack (aTHXo->interp.Ilex_fakebrack)
#define PL_lex_formbrack (aTHXo->interp.Ilex_formbrack)
#define PL_lex_inpat (aTHXo->interp.Ilex_inpat)
#define PL_lex_inwhat (aTHXo->interp.Ilex_inwhat)
#define PL_Ilex_defer PL_lex_defer
#define PL_Ilex_dojoin PL_lex_dojoin
#define PL_Ilex_expect PL_lex_expect
-#define PL_Ilex_fakebrack PL_lex_fakebrack
#define PL_Ilex_formbrack PL_lex_formbrack
#define PL_Ilex_inpat PL_lex_inpat
#define PL_Ilex_inwhat PL_lex_inwhat
PERLVAR(Ilex_expect, expectation) /* expect after determined token */
PERLVAR(Ilex_brackets, I32) /* bracket count */
PERLVAR(Ilex_formbrack, I32) /* bracket count at outer format level */
-PERLVAR(Ilex_fakebrack, I32) /* outer bracket is mere delimiter */
PERLVAR(Ilex_casemods, I32) /* casemod count */
PERLVAR(Ilex_dojoin, I32) /* doing an array interpolation */
PERLVAR(Ilex_starts, I32) /* how many interps done on level */
#define PL_lex_dojoin (*Perl_Ilex_dojoin_ptr(aTHXo))
#undef PL_lex_expect
#define PL_lex_expect (*Perl_Ilex_expect_ptr(aTHXo))
-#undef PL_lex_fakebrack
-#define PL_lex_fakebrack (*Perl_Ilex_fakebrack_ptr(aTHXo))
#undef PL_lex_formbrack
#define PL_lex_formbrack (*Perl_Ilex_formbrack_ptr(aTHXo))
#undef PL_lex_inpat
PL_lex_defer = proto_perl->Ilex_defer;
PL_lex_expect = proto_perl->Ilex_expect;
PL_lex_formbrack = proto_perl->Ilex_formbrack;
- PL_lex_fakebrack = proto_perl->Ilex_fakebrack;
PL_lex_dojoin = proto_perl->Ilex_dojoin;
PL_lex_starts = proto_perl->Ilex_starts;
PL_lex_stuff = sv_dup_inc(proto_perl->Ilex_stuff);
static void restore_rsfp(pTHXo_ void *f);
+#define XFAKEBRACK 128
+#define XENUMMASK 127
+
#define UTF (PL_hints & HINT_UTF8)
/*
* Note: we try to be careful never to call the isXXX_utf8() functions
SAVEI32(PL_lex_dojoin);
SAVEI32(PL_lex_brackets);
- SAVEI32(PL_lex_fakebrack);
SAVEI32(PL_lex_casemods);
SAVEI32(PL_lex_starts);
SAVEI32(PL_lex_state);
PL_lex_defer = 0;
PL_expect = XSTATE;
PL_lex_brackets = 0;
- PL_lex_fakebrack = 0;
New(899, PL_lex_brackstack, 120, char);
New(899, PL_lex_casestack, 12, char);
SAVEFREEPV(PL_lex_brackstack);
PL_lex_state = PL_sublex_info.super_state;
SAVEI32(PL_lex_dojoin);
SAVEI32(PL_lex_brackets);
- SAVEI32(PL_lex_fakebrack);
SAVEI32(PL_lex_casemods);
SAVEI32(PL_lex_starts);
SAVEI32(PL_lex_state);
PL_lex_dojoin = FALSE;
PL_lex_brackets = 0;
- PL_lex_fakebrack = 0;
New(899, PL_lex_brackstack, 120, char);
New(899, PL_lex_casestack, 12, char);
SAVEFREEPV(PL_lex_brackstack);
SAVEFREESV(PL_linestr);
PL_lex_dojoin = FALSE;
PL_lex_brackets = 0;
- PL_lex_fakebrack = 0;
PL_lex_casemods = 0;
*PL_lex_casestack = '\0';
PL_lex_starts = 0;
PL_lex_formbrack = 0;
if (PL_lex_state == LEX_INTERPNORMAL) {
if (PL_lex_brackets == 0) {
- if (PL_lex_fakebrack) {
+ if (PL_expect & XFAKEBRACK) {
+ PL_expect &= XENUMMASK;
PL_lex_state = LEX_INTERPEND;
PL_bufptr = s;
return yylex(); /* ignore fake brackets */
PL_lex_state = LEX_INTERPEND;
}
}
- if (PL_lex_brackets < PL_lex_fakebrack) {
+ if (PL_expect & XFAKEBRACK) {
+ PL_expect &= XENUMMASK;
PL_bufptr = s;
- PL_lex_fakebrack = 0;
return yylex(); /* ignore fake brackets */
}
force_next('}');
char *bracket = 0;
char funny = *s++;
- if (PL_lex_brackets == 0)
- PL_lex_fakebrack = 0;
if (isSPACE(*s))
s = skipspace(s);
d = dest;
"Ambiguous use of %c{%s%s} resolved to %c%s%s",
funny, dest, brack, funny, dest, brack);
}
- PL_lex_fakebrack = PL_lex_brackets+1;
bracket++;
- PL_lex_brackstack[PL_lex_brackets++] = XOPERATOR;
+ PL_lex_brackstack[PL_lex_brackets++] = XOPERATOR | XFAKEBRACK;
return s;
}
}