summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ObjXSub.h10
-rw-r--r--embedvar.h15
-rw-r--r--interp.sym5
-rw-r--r--intrpvar.h5
-rw-r--r--regcomp.c246
-rw-r--r--win32/GenCAPI.pl5
-rw-r--r--win32/makedef.pl4
7 files changed, 141 insertions, 149 deletions
diff --git a/ObjXSub.h b/ObjXSub.h
index 7936050f76..4acd8274cf 100644
--- a/ObjXSub.h
+++ b/ObjXSub.h
@@ -315,8 +315,6 @@
#define maxsysfd pPerl->Perl_maxsysfd
#undef mess_sv
#define mess_sv pPerl->Perl_mess_sv
-#undef mh
-#define mh pPerl->Perl_mh
#undef min_intro_pending
#define min_intro_pending pPerl->Perl_min_intro_pending
#undef minus_F
@@ -473,8 +471,8 @@
#define regnaughty pPerl->Perl_regnaughty
#undef regnpar
#define regnpar pPerl->Perl_regnpar
-#undef regparse
-#define regparse pPerl->Perl_regparse
+#undef regcomp_parse
+#define regcomp_parse pPerl->Perl_regcomp_parse
#undef regprecomp
#define regprecomp pPerl->Perl_regprecomp
#undef regprev
@@ -511,8 +509,8 @@
#define rsfp_filters pPerl->Perl_rsfp_filters
#undef runops
#define runops pPerl->Perl_runops
-#undef rx
-#define rx pPerl->Perl_rx
+#undef regcomp_rx
+#define regcomp_rx pPerl->Perl_regcomp_rx
#undef savestack
#define savestack pPerl->Perl_savestack
#undef savestack_ix
diff --git a/embedvar.h b/embedvar.h
index cd4701d1e9..a74b4e41de 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -153,7 +153,6 @@
#define maxscream (curinterp->Imaxscream)
#define maxsysfd (curinterp->Imaxsysfd)
#define mess_sv (curinterp->Imess_sv)
-#define mh (curinterp->Imh)
#define minus_F (curinterp->Iminus_F)
#define minus_a (curinterp->Iminus_a)
#define minus_c (curinterp->Iminus_c)
@@ -187,6 +186,8 @@
#define regbol (curinterp->Iregbol)
#define regcc (curinterp->Iregcc)
#define regcode (curinterp->Iregcode)
+#define regcomp_parse (curinterp->Iregcomp_parse)
+#define regcomp_rx (curinterp->Iregcomp_rx)
#define regdata (curinterp->Iregdata)
#define regdummy (curinterp->Iregdummy)
#define regendp (curinterp->Iregendp)
@@ -198,7 +199,6 @@
#define regnarrate (curinterp->Iregnarrate)
#define regnaughty (curinterp->Iregnaughty)
#define regnpar (curinterp->Iregnpar)
-#define regparse (curinterp->Iregparse)
#define regprecomp (curinterp->Iregprecomp)
#define regprev (curinterp->Iregprev)
#define regprogram (curinterp->Iregprogram)
@@ -209,7 +209,6 @@
#define regtill (curinterp->Iregtill)
#define regxend (curinterp->Iregxend)
#define rightgv (curinterp->Irightgv)
-#define rx (curinterp->Irx)
#define sawampersand (curinterp->Isawampersand)
#define sawstudy (curinterp->Isawstudy)
#define sawvec (curinterp->Isawvec)
@@ -317,7 +316,6 @@
#define Imaxscream maxscream
#define Imaxsysfd maxsysfd
#define Imess_sv mess_sv
-#define Imh mh
#define Iminus_F minus_F
#define Iminus_a minus_a
#define Iminus_c minus_c
@@ -351,6 +349,8 @@
#define Iregbol regbol
#define Iregcc regcc
#define Iregcode regcode
+#define Iregcomp_parse regcomp_parse
+#define Iregcomp_rx regcomp_rx
#define Iregdata regdata
#define Iregdummy regdummy
#define Iregendp regendp
@@ -362,7 +362,6 @@
#define Iregnarrate regnarrate
#define Iregnaughty regnaughty
#define Iregnpar regnpar
-#define Iregparse regparse
#define Iregprecomp regprecomp
#define Iregprev regprev
#define Iregprogram regprogram
@@ -373,7 +372,6 @@
#define Iregtill regtill
#define Iregxend regxend
#define Irightgv rightgv
-#define Irx rx
#define Isawampersand sawampersand
#define Isawstudy sawstudy
#define Isawvec sawvec
@@ -543,7 +541,6 @@
#define maxscream Perl_maxscream
#define maxsysfd Perl_maxsysfd
#define mess_sv Perl_mess_sv
-#define mh Perl_mh
#define minus_F Perl_minus_F
#define minus_a Perl_minus_a
#define minus_c Perl_minus_c
@@ -577,6 +574,8 @@
#define regbol Perl_regbol
#define regcc Perl_regcc
#define regcode Perl_regcode
+#define regcomp_parse Perl_regcomp_parse
+#define regcomp_rx Perl_regcomp_rx
#define regdata Perl_regdata
#define regdummy Perl_regdummy
#define regendp Perl_regendp
@@ -588,7 +587,6 @@
#define regnarrate Perl_regnarrate
#define regnaughty Perl_regnaughty
#define regnpar Perl_regnpar
-#define regparse Perl_regparse
#define regprecomp Perl_regprecomp
#define regprev Perl_regprev
#define regprogram Perl_regprogram
@@ -599,7 +597,6 @@
#define regtill Perl_regtill
#define regxend Perl_regxend
#define rightgv Perl_rightgv
-#define rx Perl_rx
#define sawampersand Perl_sawampersand
#define sawstudy Perl_sawstudy
#define sawvec Perl_sawvec
diff --git a/interp.sym b/interp.sym
index 7a53ab35cf..1a13e67011 100644
--- a/interp.sym
+++ b/interp.sym
@@ -87,7 +87,6 @@ mainstack
maxscream
maxsysfd
mess_sv
-mh
minus_F
minus_a
minus_c
@@ -136,7 +135,7 @@ reglastparen
regnarrate
regnaughty
regnpar
-regparse
+regcomp_parse
regprecomp
regprev
regprogram
@@ -149,7 +148,7 @@ regxend
restartop
rightgv
rs
-rx
+regcomp_rx
sawampersand
sawstudy
sawvec
diff --git a/intrpvar.h b/intrpvar.h
index de2578ab6b..7f5b1a5430 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -161,14 +161,13 @@ PERLVAR(Isys_intern, struct interp_intern) /* platform internals */
#endif
/* more statics moved here */
-PERLVAR(Imh, HE) /* from hv.c */
PERLVARI(Igeneration, int, 100) /* from op.c */
PERLVAR(IDBcv, CV *) /* from perl.c */
PERLVAR(Iarchpat_auto, char*) /* from perl.c */
PERLVAR(Isortcxix, I32) /* from pp_ctl.c */
PERLVAR(Ilastgotoprobe, OP*) /* from pp_ctl.c */
PERLVAR(Iregdummy, regnode) /* from regcomp.c */
-PERLVAR(Iregparse, char*) /* Input-scan pointer. */
+PERLVAR(Iregcomp_parse, char*) /* Input-scan pointer. */
PERLVAR(Iregxend, char*) /* End of input for compile */
PERLVAR(Iregcode, regnode*) /* Code-emit pointer; &regdummy = don't. */
PERLVAR(Iregnaughty, I32) /* How bad is this pattern? */
@@ -182,7 +181,7 @@ PERLVAR(Iregflags, U16) /* are we folding, multilining? */
PERLVAR(Iregseen, U32) /* from regcomp.c */
PERLVAR(Iseen_zerolen, I32) /* from regcomp.c */
-PERLVAR(Irx, regexp *) /* from regcomp.c */
+PERLVAR(Iregcomp_rx, regexp *) /* from regcomp.c */
PERLVAR(Iextralen, I32) /* from regcomp.c */
#ifdef DEBUGGING
PERLVAR(Icolorset, int) /* from regcomp.c */
diff --git a/regcomp.c b/regcomp.c
index b6d8b01c3f..05c3a80172 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -658,20 +658,20 @@ study_chunk(regnode **scanp, I32 *deltap, regnode *last, scan_data_t *data, U32
STATIC I32
add_data(I32 n, char *s)
{
- if (rx->data) {
- Renewc(rx->data,
- sizeof(*rx->data) + sizeof(void*) * (rx->data->count + n - 1),
+ if (regcomp_rx->data) {
+ Renewc(regcomp_rx->data,
+ sizeof(*regcomp_rx->data) + sizeof(void*) * (regcomp_rx->data->count + n - 1),
char, struct reg_data);
- Renew(rx->data->what, rx->data->count + n, U8);
- rx->data->count += n;
+ Renew(regcomp_rx->data->what, regcomp_rx->data->count + n, U8);
+ regcomp_rx->data->count += n;
} else {
- Newc(1207, rx->data, sizeof(*rx->data) + sizeof(void*) * (n - 1),
+ Newc(1207, regcomp_rx->data, sizeof(*regcomp_rx->data) + sizeof(void*) * (n - 1),
char, struct reg_data);
- New(1208, rx->data->what, n, U8);
- rx->data->count = n;
+ New(1208, regcomp_rx->data->what, n, U8);
+ regcomp_rx->data->count = n;
}
- Copy(s, rx->data->what + rx->data->count - n, n, U8);
- return rx->data->count - n;
+ Copy(s, regcomp_rx->data->what + regcomp_rx->data->count - n, n, U8);
+ return regcomp_rx->data->count - n;
}
/*
@@ -717,7 +717,7 @@ pregcomp(char *exp, char *xend, PMOP *pm)
extralen = 0;
/* First pass: determine size, legality. */
- regparse = exp;
+ regcomp_parse = exp;
regxend = xend;
regnaughty = 0;
regnpar = 1;
@@ -777,10 +777,10 @@ pregcomp(char *exp, char *xend, PMOP *pm)
r->prelen = xend - exp;
r->precomp = regprecomp;
r->subbeg = r->subbase = NULL;
- rx = r;
+ regcomp_rx = r;
/* Second pass: emit code. */
- regparse = exp;
+ regcomp_parse = exp;
regxend = xend;
regnaughty = 0;
regnpar = 1;
@@ -985,9 +985,9 @@ reg(I32 paren, I32 *flagp)
/* Make an OPEN node, if parenthesized. */
if (paren) {
- if (*regparse == '?') {
- regparse++;
- paren = *regparse++;
+ if (*regcomp_parse == '?') {
+ regcomp_parse++;
+ paren = *regcomp_parse++;
ret = NULL; /* For look-ahead/behind. */
switch (paren) {
case '<':
@@ -995,11 +995,11 @@ reg(I32 paren, I32 *flagp)
FAIL("lookbehind non-implemented without REGALIGN_STRUCT");
#endif
regseen |= REG_SEEN_LOOKBEHIND;
- if (*regparse == '!')
+ if (*regcomp_parse == '!')
paren = ',';
- if (*regparse != '=' && *regparse != '!')
+ if (*regcomp_parse != '=' && *regcomp_parse != '!')
goto unknown;
- regparse++;
+ regcomp_parse++;
case '=':
case '!':
seen_zerolen++;
@@ -1011,9 +1011,9 @@ reg(I32 paren, I32 *flagp)
FAIL2("Sequence (?%c...) not implemented", (int)paren);
break;
case '#':
- while (*regparse && *regparse != ')')
- regparse++;
- if (*regparse != ')')
+ while (*regcomp_parse && *regcomp_parse != ')')
+ regcomp_parse++;
+ if (*regcomp_parse != ')')
FAIL("Sequence (?#... not terminated");
nextchar();
*flagp = TRYAGAIN;
@@ -1023,36 +1023,36 @@ reg(I32 paren, I32 *flagp)
dTHR;
I32 count = 1, n = 0;
char c;
- char *s = regparse;
+ char *s = regcomp_parse;
SV *sv;
OP_4tree *sop, *rop;
seen_zerolen++;
- while (count && (c = *regparse)) {
- if (c == '\\' && regparse[1])
- regparse++;
+ while (count && (c = *regcomp_parse)) {
+ if (c == '\\' && regcomp_parse[1])
+ regcomp_parse++;
else if (c == '{')
count++;
else if (c == '}')
count--;
- regparse++;
+ regcomp_parse++;
}
- if (*regparse != ')')
+ if (*regcomp_parse != ')')
FAIL("Sequence (?{...}) not terminated or not {}-balanced");
if (!SIZE_ONLY) {
AV *av;
- if (regparse - 1 - s)
- sv = newSVpv(s, regparse - 1 - s);
+ if (regcomp_parse - 1 - s)
+ sv = newSVpv(s, regcomp_parse - 1 - s);
else
sv = newSVpv("", 0);
rop = sv_compile_2op(sv, &sop, "re", &av);
n = add_data(3, "nso");
- rx->data->data[n] = (void*)rop;
- rx->data->data[n+1] = (void*)av;
- rx->data->data[n+2] = (void*)sop;
+ regcomp_rx->data->data[n] = (void*)rop;
+ regcomp_rx->data->data[n+1] = (void*)av;
+ regcomp_rx->data->data[n+2] = (void*)sop;
SvREFCNT_dec(sv);
} else { /* First pass */
if (tainted)
@@ -1064,21 +1064,21 @@ reg(I32 paren, I32 *flagp)
}
case '(':
{
- if (regparse[0] == '?') {
- if (regparse[1] == '=' || regparse[1] == '!'
- || regparse[1] == '<'
- || regparse[1] == '{') { /* Lookahead or eval. */
+ if (regcomp_parse[0] == '?') {
+ if (regcomp_parse[1] == '=' || regcomp_parse[1] == '!'
+ || regcomp_parse[1] == '<'
+ || regcomp_parse[1] == '{') { /* Lookahead or eval. */
I32 flag;
ret = reg_node(LOGICAL);
regtail(ret, reg(1, &flag));
goto insert_if;
}
- } else if (regparse[0] >= '1' && regparse[0] <= '9' ) {
- parno = atoi(regparse++);
+ } else if (regcomp_parse[0] >= '1' && regcomp_parse[0] <= '9' ) {
+ parno = atoi(regcomp_parse++);
- while (isDIGIT(*regparse))
- regparse++;
+ while (isDIGIT(*regcomp_parse))
+ regcomp_parse++;
ret = reganode(GROUPP, parno);
if ((c = *nextchar()) != ')')
FAIL2("Switch (?(number%c not recognized", c);
@@ -1108,22 +1108,22 @@ reg(I32 paren, I32 *flagp)
regtail(ret, ender);
return ret;
} else {
- FAIL2("Unknown condition for (?(%.2s", regparse);
+ FAIL2("Unknown condition for (?(%.2s", regcomp_parse);
}
}
case 0:
FAIL("Sequence (? incomplete");
break;
default:
- --regparse;
- while (*regparse && strchr("iogcmsx", *regparse)) {
- if (*regparse != 'o')
- pmflag(&regflags, *regparse);
- ++regparse;
+ --regcomp_parse;
+ while (*regcomp_parse && strchr("iogcmsx", *regcomp_parse)) {
+ if (*regcomp_parse != 'o')
+ pmflag(&regflags, *regcomp_parse);
+ ++regcomp_parse;
}
unknown:
- if (*regparse != ')')
- FAIL2("Sequence (?%c...) not recognized", *regparse);
+ if (*regcomp_parse != ')')
+ FAIL2("Sequence (?%c...) not recognized", *regcomp_parse);
nextchar();
*flagp = TRYAGAIN;
return NULL;
@@ -1142,7 +1142,7 @@ reg(I32 paren, I32 *flagp)
br = regbranch(&flags, 1);
if (br == NULL)
return(NULL);
- if (*regparse == '|') {
+ if (*regcomp_parse == '|') {
if (!SIZE_ONLY && extralen) {
reginsert(BRANCHJ, br);
} else
@@ -1161,7 +1161,7 @@ reg(I32 paren, I32 *flagp)
*flagp &= ~HASWIDTH;
*flagp |= flags&SPSTART;
lastbr = br;
- while (*regparse == '|') {
+ while (*regcomp_parse == '|') {
if (!SIZE_ONLY && extralen) {
ender = reganode(LONGJMP,0);
regtail(NEXTOPER(NEXTOPER(lastbr)), ender); /* Append to the previous. */
@@ -1229,10 +1229,10 @@ reg(I32 paren, I32 *flagp)
}
/* Check for proper termination. */
- if (paren && (regparse >= regxend || *nextchar() != ')')) {
+ if (paren && (regcomp_parse >= regxend || *nextchar() != ')')) {
FAIL("unmatched () in regexp");
- } else if (!paren && regparse < regxend) {
- if (*regparse == ')') {
+ } else if (!paren && regcomp_parse < regxend) {
+ if (*regcomp_parse == ')') {
FAIL("unmatched () in regexp");
} else
FAIL("junk on end of regexp"); /* "Can't happen". */
@@ -1272,9 +1272,9 @@ regbranch(I32 *flagp, I32 first)
*flagp = WORST; /* Tentatively. */
- regparse--;
+ regcomp_parse--;
nextchar();
- while (regparse < regxend && *regparse != '|' && *regparse != ')') {
+ while (regcomp_parse < regxend && *regcomp_parse != '|' && *regcomp_parse != ')') {
flags &= ~TRYAGAIN;
latest = regpiece(&flags);
if (latest == NULL) {
@@ -1321,7 +1321,7 @@ regpiece(I32 *flagp)
register char op;
register char *next;
I32 flags;
- char *origparse = regparse;
+ char *origparse = regcomp_parse;
char *maxpos;
I32 min;
I32 max = REG_INFTY;
@@ -1333,10 +1333,10 @@ regpiece(I32 *flagp)
return(NULL);
}
- op = *regparse;
+ op = *regcomp_parse;
- if (op == '{' && regcurly(regparse)) {
- next = regparse + 1;
+ if (op == '{' && regcurly(regcomp_parse)) {
+ next = regcomp_parse + 1;
maxpos = Nullch;
while (isDIGIT(*next) || *next == ',') {
if (*next == ',') {
@@ -1350,18 +1350,18 @@ regpiece(I32 *flagp)
if (*next == '}') { /* got one */
if (!maxpos)
maxpos = next;
- regparse++;
- min = atoi(regparse);
+ regcomp_parse++;
+ min = atoi(regcomp_parse);
if (*maxpos == ',')
maxpos++;
else
- maxpos = regparse;
+ maxpos = regcomp_parse;
max = atoi(maxpos);
if (!max && *maxpos != '0')
max = REG_INFTY; /* meaning "infinity" */
else if (max >= REG_INFTY)
FAIL2("Quantifier in {,} bigger than %d", REG_INFTY - 1);
- regparse = next;
+ regcomp_parse = next;
nextchar();
do_curly:
@@ -1442,10 +1442,10 @@ regpiece(I32 *flagp)
nest_check:
if (dowarn && !SIZE_ONLY && !(flags&HASWIDTH) && max > 10000) {
warn("%.*s matches null string many times",
- regparse - origparse, origparse);
+ regcomp_parse - origparse, origparse);
}
- if (*regparse == '?') {
+ if (*regcomp_parse == '?') {
nextchar();
reginsert(MINMOD, ret);
#ifdef REGALIGN
@@ -1454,7 +1454,7 @@ regpiece(I32 *flagp)
regtail(ret, ret + 3);
#endif
}
- if (ISMULT2(regparse))
+ if (ISMULT2(regcomp_parse))
FAIL("nested *?+ in regexp");
return(ret);
@@ -1479,7 +1479,7 @@ regatom(I32 *flagp)
*flagp = WORST; /* Tentatively. */
tryagain:
- switch (*regparse) {
+ switch (*regcomp_parse) {
case '^':
seen_zerolen++;
nextchar();
@@ -1491,7 +1491,7 @@ tryagain:
ret = reg_node(BOL);
break;
case '$':
- if (regparse[1])
+ if (regcomp_parse[1])
seen_zerolen++;
nextchar();
if (regflags & PMf_MULTILINE)
@@ -1511,7 +1511,7 @@ tryagain:
*flagp |= HASWIDTH|SIMPLE;
break;
case '[':
- regparse++;
+ regcomp_parse++;
ret = regclass();
*flagp |= HASWIDTH|SIMPLE;
break;
@@ -1531,12 +1531,12 @@ tryagain:
*flagp |= TRYAGAIN;
return NULL;
}
- FAIL2("internal urp in regexp at /%s/", regparse);
+ FAIL2("internal urp in regexp at /%s/", regcomp_parse);
/* Supposed to be caught earlier. */
break;
case '{':
- if (!regcurly(regparse)) {
- regparse++;
+ if (!regcurly(regcomp_parse)) {
+ regcomp_parse++;
goto defchar;
}
/* FALL THROUGH */
@@ -1546,7 +1546,7 @@ tryagain:
FAIL("?+*{} follows nothing in regexp");
break;
case '\\':
- switch (*++regparse) {
+ switch (*++regcomp_parse) {
case 'A':
seen_zerolen++;
ret = reg_node(SBOL);
@@ -1619,7 +1619,7 @@ tryagain:
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
- I32 num = atoi(regparse);
+ I32 num = atoi(regcomp_parse);
if (num > 9 && num >= regnpar)
goto defchar;
@@ -1629,15 +1629,15 @@ tryagain:
? ((regflags & PMf_LOCALE) ? REFFL : REFF)
: REF, num);
*flagp |= HASWIDTH;
- while (isDIGIT(*regparse))
- regparse++;
- regparse--;
+ while (isDIGIT(*regcomp_parse))
+ regcomp_parse++;
+ regcomp_parse--;
nextchar();
}
}
break;
case '\0':
- if (regparse >= regxend)
+ if (regcomp_parse >= regxend)
FAIL("trailing \\ in regexp");
/* FALL THROUGH */
default:
@@ -1647,8 +1647,8 @@ tryagain:
case '#':
if (regflags & PMf_EXTENDED) {
- while (regparse < regxend && *regparse != '\n') regparse++;
- if (regparse < regxend)
+ while (regcomp_parse < regxend && *regcomp_parse != '\n') regcomp_parse++;
+ if (regcomp_parse < regxend)
goto tryagain;
}
/* FALL THROUGH */
@@ -1660,7 +1660,7 @@ tryagain:
char *oldp, *s;
I32 numlen;
- regparse++;
+ regcomp_parse++;
defchar:
ret = reg_node((regflags & PMf_FOLD)
@@ -1668,7 +1668,7 @@ tryagain:
: EXACT);
s = (char *) OPERAND(ret);
regc(0, s++); /* save spot for len */
- for (len = 0, p = regparse - 1;
+ for (len = 0, p = regcomp_parse - 1;
len < 127 && p < regxend;
len++)
{
@@ -1772,7 +1772,7 @@ tryagain:
regc(ender, s++);
}
loopdone:
- regparse = p - 1;
+ regcomp_parse = p - 1;
nextchar();
if (len < 0)
FAIL("internal disaster in regexp");
@@ -1829,9 +1829,9 @@ regclass(void)
ret = reg_node(ANYOF);
for (Class = 0; Class < 33; Class++)
regc(0, s++);
- if (*regparse == '^') { /* Complement of range. */
+ if (*regcomp_parse == '^') { /* Complement of range. */
regnaughty++;
- regparse++;
+ regcomp_parse++;
if (!SIZE_ONLY)
*opnd |= ANYOF_INVERT;
}
@@ -1844,37 +1844,37 @@ regclass(void)
} else {
regsize += ANY_SKIP;
}
- if (*regparse == ']' || *regparse == '-')
+ if (*regcomp_parse == ']' || *regcomp_parse == '-')
goto skipcond; /* allow 1st char to be ] or - */
- while (regparse < regxend && *regparse != ']') {
+ while (regcomp_parse < regxend && *regcomp_parse != ']') {
skipcond:
- Class = UCHARAT(regparse++);
- if (Class == '[' && regparse + 1 < regxend &&
+ Class = UCHARAT(regcomp_parse++);
+ if (Class == '[' && regcomp_parse + 1 < regxend &&
/* I smell either [: or [= or [. -- POSIX has been here, right? */
- (*regparse == ':' || *regparse == '=' || *regparse == '.')) {
- char posixccc = *regparse;
- char* posixccs = regparse++;
+ (*regcomp_parse == ':' || *regcomp_parse == '=' || *regcomp_parse == '.')) {
+ char posixccc = *regcomp_parse;
+ char* posixccs = regcomp_parse++;
- while (regparse < regxend && *regparse != posixccc)
- regparse++;
- if (regparse == regxend)
+ while (regcomp_parse < regxend && *regcomp_parse != posixccc)
+ regcomp_parse++;
+ if (regcomp_parse == regxend)
/* Grandfather lone [:, [=, [. */
- regparse = posixccs;
+ regcomp_parse = posixccs;
else {
- regparse++; /* skip over the posixccc */
- if (*regparse == ']') {
+ regcomp_parse++; /* skip over the posixccc */
+ if (*regcomp_parse == ']') {
/* Not Implemented Yet.
* (POSIX Extended Character Classes, that is)
* The text between e.g. [: and :] would start
- * at posixccs + 1 and stop at regparse - 2. */
+ * at posixccs + 1 and stop at regcomp_parse - 2. */
if (dowarn && !SIZE_ONLY)
warn("Character class syntax [%c %c] is reserved for future extensions", posixccc, posixccc);
- regparse++; /* skip over the ending ] */
+ regcomp_parse++; /* skip over the ending ] */
}
}
}
if (Class == '\\') {
- Class = UCHARAT(regparse++);
+ Class = UCHARAT(regcomp_parse++);
switch (Class) {
case 'w':
if (!SIZE_ONLY) {
@@ -1962,17 +1962,17 @@ regclass(void)
Class = '\007';
break;
case 'x':
- Class = scan_hex(regparse, 2, &numlen);
- regparse += numlen;
+ Class = scan_hex(regcomp_parse, 2, &numlen);
+ regcomp_parse += numlen;
break;
case 'c':
- Class = UCHARAT(regparse++);
+ Class = UCHARAT(regcomp_parse++);
Class = toCTRL(Class);
break;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- Class = scan_oct(--regparse, 3, &numlen);
- regparse += numlen;
+ Class = scan_oct(--regcomp_parse, 3, &numlen);
+ regcomp_parse += numlen;
break;
}
}
@@ -1983,9 +1983,9 @@ regclass(void)
}
else {
lastclass = Class;
- if (*regparse == '-' && regparse+1 < regxend &&
- regparse[1] != ']') {
- regparse++;
+ if (*regcomp_parse == '-' && regcomp_parse+1 < regxend &&
+ regcomp_parse[1] != ']') {
+ regcomp_parse++;
range = 1;
continue; /* do it next time */
}
@@ -1996,7 +1996,7 @@ regclass(void)
}
lastclass = Class;
}
- if (*regparse != ']')
+ if (*regcomp_parse != ']')
FAIL("unmatched [] in regexp");
nextchar();
/* optimize case-insensitive simple patterns (e.g. /[a-z]/i) */
@@ -2021,25 +2021,25 @@ regclass(void)
STATIC char*
nextchar(void)
{
- char* retval = regparse++;
+ char* retval = regcomp_parse++;
for (;;) {
- if (*regparse == '(' && regparse[1] == '?' &&
- regparse[2] == '#') {
- while (*regparse && *regparse != ')')
- regparse++;
- regparse++;
+ if (*regcomp_parse == '(' && regcomp_parse[1] == '?' &&
+ regcomp_parse[2] == '#') {
+ while (*regcomp_parse && *regcomp_parse != ')')
+ regcomp_parse++;
+ regcomp_parse++;
continue;
}
if (regflags & PMf_EXTENDED) {
- if (isSPACE(*regparse)) {
- regparse++;
+ if (isSPACE(*regcomp_parse)) {
+ regcomp_parse++;
continue;
}
- else if (*regparse == '#') {
- while (*regparse && *regparse != '\n')
- regparse++;
- regparse++;
+ else if (*regcomp_parse == '#') {
+ while (*regcomp_parse && *regcomp_parse != '\n')
+ regcomp_parse++;
+ regcomp_parse++;
continue;
}
}
diff --git a/win32/GenCAPI.pl b/win32/GenCAPI.pl
index 67b3de4fa9..2e136ed5c6 100644
--- a/win32/GenCAPI.pl
+++ b/win32/GenCAPI.pl
@@ -377,7 +377,6 @@ opsave
eval_mutex
orslen
ofmt
-mh
modcount
generation
DBcv
@@ -385,7 +384,7 @@ archpat_auto
sortcxix
lastgotoprobe
regdummy
-regparse
+regcomp_parse
regxend
regcode
regnaughty
@@ -396,7 +395,7 @@ regsize
regflags
regseen
seen_zerolen
-rx
+regcomp_rx
extralen
colorset
colors
diff --git a/win32/makedef.pl b/win32/makedef.pl
index acaa64b232..1b45f7387c 100644
--- a/win32/makedef.pl
+++ b/win32/makedef.pl
@@ -174,7 +174,7 @@ Perl_regmystartp
Perl_regnarrate
Perl_regnaughty
Perl_regnpar
-Perl_regparse
+Perl_regcomp_parse
Perl_regprecomp
Perl_regprev
Perl_regprogram
@@ -185,7 +185,7 @@ Perl_regsize
Perl_regstartp
Perl_regtill
Perl_regxend
-Perl_rx
+Perl_regcomp_rx
Perl_same_dirent
Perl_saw_return
Perl_scan_const