* The flags 'and_with' should not come from another SSC (otherwise the
* EMPTY_STRING flag won't work) */
- const U8 ssc_only_flags = ANYOF_FLAGS(ssc) & ~ANYOF_LOCALE_FLAGS;
+ const U8 ssc_only_flags = ANYOF_FLAGS(ssc) & ~ANYOF_COMMON_FLAGS;
PERL_ARGS_ASSERT_SSC_FLAGS_AND;
/* Use just the SSC-related flags from 'and_with' */
- ANYOF_FLAGS(ssc) &= (and_with & ANYOF_LOCALE_FLAGS);
+ ANYOF_FLAGS(ssc) &= (and_with & ANYOF_COMMON_FLAGS);
ANYOF_FLAGS(ssc) |= ssc_only_flags;
}
else {
anded_cp_list = get_ANYOF_cp_list_for_ssc(pRExC_state,
(regnode_charclass_posixl*) and_with);
- anded_flags = ANYOF_FLAGS(and_with) & ANYOF_LOCALE_FLAGS;
+ anded_flags = ANYOF_FLAGS(and_with) & ANYOF_COMMON_FLAGS;
}
ANYOF_FLAGS(ssc) &= anded_flags;
else {
ored_cp_list = get_ANYOF_cp_list_for_ssc(pRExC_state,
(regnode_charclass_posixl*) or_with);
- ored_flags = ANYOF_FLAGS(or_with) & ANYOF_LOCALE_FLAGS;
+ ored_flags = ANYOF_FLAGS(or_with) & ANYOF_COMMON_FLAGS;
}
ANYOF_FLAGS(ssc) |= ored_flags;
/* The code in this file assumes that all but these flags aren't relevant
* to the SSC, except ANYOF_EMPTY_STRING, which should be cleared by the
* time we reach here */
- assert(! (ANYOF_FLAGS(ssc) & ~ANYOF_LOCALE_FLAGS));
+ assert(! (ANYOF_FLAGS(ssc) & ~ANYOF_COMMON_FLAGS));
populate_ANYOF_from_invlist( (regnode *) ssc, &invlist);
|ANYOF_LOC_FOLD \
|ANYOF_POSIXL)
+/* These are the flags that apply to both regular ANYOF nodes and synthetic
+ * start class nodes during construction of the SSC. During finalization of
+ * the SSC, other of the flags could be added to it */
+#define ANYOF_COMMON_FLAGS (ANYOF_LOCALE_FLAGS)
+
/* Character classes for node->classflags of ANYOF */
/* Should be synchronized with a table in regprop() */
/* 2n should be the normal one, paired with its complement at 2n+1 */