The new '^' in (?^...) should really be a macro.
SvFLAGS(rx) |= SvUTF8(pattern);
*p++='('; *p++='?';
if (has_minus) { /* If a default, cover it using the caret */
- *p++='^';
+ *p++= DEFAULT_PAT_MOD;
}
if (has_p)
*p++ = KEEPCOPY_PAT_MOD; /*'p'*/
RExC_parse--; /* for vFAIL to print correctly */
vFAIL("Sequence (? incomplete");
break;
- case '^': /* Use default flags with the exceptions that follow */
+ case DEFAULT_PAT_MOD: /* Use default flags with the exceptions
+ that follow */
has_use_defaults = TRUE;
STD_PMMOD_FLAGS_CLEAR(&RExC_flags);
goto parse_flags;
* for compatibility reasons with Regexp::Common which highjacked (?k:...)
* for its own uses. So 'k' is out as well.
*/
+#define DEFAULT_PAT_MOD '^' /* Short for all the default modifiers */
#define EXEC_PAT_MOD 'e'
#define KEEPCOPY_PAT_MOD 'p'
#define ONCE_PAT_MOD 'o'