Es |STRLEN |reguni |NN const struct RExC_state_t *pRExC_state \
|UV uv|NN char *s
Es |regnode*|regclass |NN struct RExC_state_t *pRExC_state \
- |NN I32 *flagp|U32 depth|const bool stop_at_1
+ |NN I32 *flagp|U32 depth|const bool stop_at_1 \
+ |bool allow_multi_fold
Es |regnode*|reg_node |NN struct RExC_state_t *pRExC_state|U8 op
Es |UV |reg_recode |const char value|NN SV **encp
Es |regnode*|regpiece |NN struct RExC_state_t *pRExC_state \
#define reganode(a,b,c) S_reganode(aTHX_ a,b,c)
#define regatom(a,b,c) S_regatom(aTHX_ a,b,c)
#define regbranch(a,b,c,d) S_regbranch(aTHX_ a,b,c,d)
-#define regclass(a,b,c,d) S_regclass(aTHX_ a,b,c,d)
+#define regclass(a,b,c,d,e) S_regclass(aTHX_ a,b,c,d,e)
#define reginsert(a,b,c,d) S_reginsert(aTHX_ a,b,c,d)
#define regpiece(a,b,c) S_regpiece(aTHX_ a,b,c)
#define regpposixcc(a,b,c) S_regpposixcc(aTHX_ a,b,c)
#define PERL_ARGS_ASSERT_REGBRANCH \
assert(pRExC_state); assert(flagp)
-STATIC regnode* S_regclass(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool stop_at_1)
+STATIC regnode* S_regclass(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool stop_at_1, bool allow_multi_fold)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_REGCLASS \
{
char * const oregcomp_parse = ++RExC_parse;
ret = regclass(pRExC_state, flagp,depth+1,
- FALSE /* means parse the whole char class */ );
+ FALSE, /* means parse the whole char class */
+ TRUE); /* allow multi-char folds */
if (*RExC_parse != ']') {
RExC_parse = oregcomp_parse;
vFAIL("Unmatched [");
RExC_parse--;
ret = regclass(pRExC_state, flagp,depth+1,
- TRUE /* means just parse this element */ );
+ TRUE, /* means just parse this element */
+ FALSE); /* don't allow multi-char folds */
RExC_parse--;
#define HAS_NONLOCALE_RUNTIME_PROPERTY_DEFINITION (SvCUR(listsv) != initial_listsv_len)
STATIC regnode *
-S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool stop_at_1)
+S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
+ const bool stop_at_1, bool allow_multi_folds)
{
/* parse a bracketed class specification. Most of these will produce an ANYOF node;
* but something like [a] will produce an EXACT node; [aA], an EXACTFish
if (UCHARAT(RExC_parse) == '^') { /* Complement of range. */
RExC_parse++;
invert = TRUE;
+ allow_multi_folds = FALSE;
RExC_naughty++;
}
* "ss" =~ /^[^\xDF]+$/i => N
*
* See [perl #89750] */
- if (FOLD && ! invert && value == prevvalue) {
+ if (FOLD && allow_multi_folds && value == prevvalue) {
if (value == LATIN_SMALL_LETTER_SHARP_S
|| (value > 255 && _invlist_contains_cp(PL_HasMultiCharFold,
value)))