perl
view release on metacpan or search on metacpan
sayNO;
}
break;
case CC_ENUM_CNTRL_: /* These can't match above Latin1 */
case CC_ENUM_ASCII_:
if (! to_complement) {
sayNO;
}
break;
}
locinput += UTF8_SAFE_SKIP(locinput, reginfo->strend);
}
break;
case CLUMP: /* Match \X: logical Unicode character. This is defined as
a Unicode extended Grapheme Cluster */
if (NEXTCHR_IS_EOS || locinput >= loceol)
sayNO;
if (! utf8_target) {
/* Match either CR LF or '.', as all the other possibilities
* require utf8 */
locinput++; /* Match the . or CR */
if (nextbyte == '\r' /* And if it was CR, and the next is LF,
match the LF */
&& locinput < loceol
&& UCHARAT(locinput) == '\n')
{
locinput++;
}
}
else {
/* Get the gcb type for the current character */
GCB_enum prev_gcb = getGCB_VAL_UTF8((U8*) locinput,
(U8*) reginfo->strend);
/* Then scan through the input until we get to the first
* character whose type is supposed to be a gcb with the
* current character. (There is always a break at the
* end-of-input) */
locinput += UTF8SKIP(locinput);
while (locinput < loceol) {
GCB_enum cur_gcb = getGCB_VAL_UTF8((U8*) locinput,
(U8*) reginfo->strend);
if (isGCB(prev_gcb, cur_gcb,
(U8*) reginfo->strbeg, (U8*) locinput,
utf8_target))
{
break;
}
prev_gcb = cur_gcb;
locinput += UTF8SKIP(locinput);
}
}
break;
case REFFLN: /* /\g{name}/il */
{ /* The capture buffer cases. The ones beginning with N for the
named buffers just convert to the equivalent numbered and
pretend they were called as the corresponding numbered buffer
op. */
/* don't initialize these in the declaration, it makes C++
unhappy */
const char *s;
char type;
re_fold_t folder;
const U8 *fold_array;
UV utf8_fold_flags;
CHECK_AND_WARN_PROBLEMATIC_LOCALE_;
folder = Perl_foldEQ_locale;
fold_array = PL_fold_locale;
type = REFFL;
utf8_fold_flags = FOLDEQ_LOCALE;
goto do_nref;
case REFFAN: /* /\g{name}/iaa */
folder = Perl_foldEQ_latin1;
fold_array = PL_fold_latin1;
type = REFFA;
utf8_fold_flags = FOLDEQ_UTF8_NOMIX_ASCII;
goto do_nref;
case REFFUN: /* /\g{name}/iu */
folder = Perl_foldEQ_latin1;
fold_array = PL_fold_latin1;
type = REFFU;
utf8_fold_flags = 0;
goto do_nref;
case REFFN: /* /\g{name}/i */
folder = Perl_foldEQ;
fold_array = PL_fold;
type = REFF;
utf8_fold_flags = 0;
goto do_nref;
case REFN: /* /\g{name}/ */
type = REF;
folder = NULL;
fold_array = NULL;
utf8_fold_flags = 0;
do_nref:
/* For the named back references, find the corresponding buffer
* number */
n = reg_check_named_buff_matched(rex,scan);
if ( ! n ) {
sayNO;
}
goto do_nref_ref_common;
case REFFL: /* /\1/il */
CHECK_AND_WARN_PROBLEMATIC_LOCALE_;
folder = Perl_foldEQ_locale;
fold_array = PL_fold_locale;
utf8_fold_flags = FOLDEQ_LOCALE;
goto do_ref;
case REFFA: /* /\1/iaa */
folder = Perl_foldEQ_latin1;
fold_array = PL_fold_latin1;
utf8_fold_flags = FOLDEQ_UTF8_NOMIX_ASCII;
goto do_ref;
case REFFU: /* /\1/iu */
folder = Perl_foldEQ_latin1;
fold_array = PL_fold_latin1;
utf8_fold_flags = 0;
goto do_ref;
case REFF: /* /\1/i */
folder = Perl_foldEQ;
fold_array = PL_fold;
utf8_fold_flags = 0;
goto do_ref;
#undef ST
#define ST st->u.backref
case REF: /* /\1/ */
folder = NULL;
fold_array = NULL;
utf8_fold_flags = 0;
do_ref:
type = OP(scan);
n = ARG1u(scan); /* which paren pair */
if (rex->logical_to_parno) {
n = rex->logical_to_parno[n];
do {
if ( RXp_LASTPAREN(rex) < n ||
RXp_OFFS_START(rex,n) == -1 ||
RXp_OFFS_END(rex,n) == -1
) {
n = rex->parno_to_logical_next[n];
}
else {
( run in 0.356 second using v1.01-cache-2.11-cpan-5a3173703d6 )