summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pod/perldebguts.pod2
-rw-r--r--regcomp.c39
-rw-r--r--regcomp.sym4
-rw-r--r--regexec.c68
-rw-r--r--regnodes.h341
-rw-r--r--t/re/anyof.t70
6 files changed, 309 insertions, 215 deletions
diff --git a/pod/perldebguts.pod b/pod/perldebguts.pod
index b7b3e54013..2a077e036d 100644
--- a/pod/perldebguts.pod
+++ b/pod/perldebguts.pod
@@ -626,6 +626,8 @@ will be lost.
delta from the base lower 20; the flags
field contains the lowest matchable UTF-8
start byte
+ ANYOFRb packed 1 Like ANYOFR, but all matches share the same
+ UTF-8 start byte, given in the flags field
ANYOFM byte 1 Like ANYOF, but matches an invariant byte
as determined by the mask and arg
diff --git a/regcomp.c b/regcomp.c
index 9531c90407..89fb3bf91b 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1588,7 +1588,7 @@ S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state,
unsigned int i;
const U32 n = ARG(node);
bool new_node_has_latin1 = FALSE;
- const U8 flags = (inRANGE(OP(node), ANYOFH, ANYOFHr))
+ const U8 flags = (inRANGE(OP(node), ANYOFH, ANYOFRb))
? 0
: ANYOF_FLAGS(node);
@@ -1643,7 +1643,7 @@ S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state,
}
/* Add in the points from the bit map */
- if (! inRANGE(OP(node), ANYOFH, ANYOFHr)) {
+ if (! inRANGE(OP(node), ANYOFH, ANYOFRb)) {
for (i = 0; i < NUM_ANYOF_CODE_POINTS; i++) {
if (ANYOF_BITMAP_TEST(node, i)) {
unsigned int start = i++;
@@ -1730,7 +1730,7 @@ S_ssc_and(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc,
* another SSC or a regular ANYOF class. Can create false positives. */
SV* anded_cp_list;
- U8 and_with_flags = inRANGE(OP(and_with), ANYOFH, ANYOFHr)
+ U8 and_with_flags = inRANGE(OP(and_with), ANYOFH, ANYOFRb)
? 0
: ANYOF_FLAGS(and_with);
U8 anded_flags;
@@ -1916,7 +1916,7 @@ S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc,
SV* ored_cp_list;
U8 ored_flags;
- U8 or_with_flags = inRANGE(OP(or_with), ANYOFH, ANYOFHr)
+ U8 or_with_flags = inRANGE(OP(or_with), ANYOFH, ANYOFRb)
? 0
: ANYOF_FLAGS(or_with);
@@ -5890,6 +5890,7 @@ Perl_re_printf( aTHX_ "LHS=%" UVuf " RHS=%" UVuf "\n",
}
case ANYOFR:
+ case ANYOFRb:
{
SV* cp_list = NULL;
@@ -14980,7 +14981,7 @@ S_populate_ANYOF_from_invlist(pTHX_ regnode *node, SV** invlist_ptr)
assert(PL_regkind[OP(node)] == ANYOF);
/* There is no bitmap for this node type */
- if (inRANGE(OP(node), ANYOFH, ANYOFHr)) {
+ if (inRANGE(OP(node), ANYOFH, ANYOFRb)) {
return;
}
@@ -19253,6 +19254,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
{
U8 low_utf8[UTF8_MAXBYTES+1];
+ U8 high_utf8[UTF8_MAXBYTES+1];
ret = reganode(pRExC_state, ANYOFR,
(start[0] | (end[0] - start[0]) << ANYOFR_BASE_BITS));
@@ -19261,7 +19263,22 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
* allow efficient ruling out at run time of many possible inputs.
* */
(void) uvchr_to_utf8(low_utf8, start[0]);
- ANYOF_FLAGS(REGNODE_p(ret)) = NATIVE_UTF8_TO_I8(low_utf8[0]);
+ (void) uvchr_to_utf8(high_utf8, end[0]);
+
+ /* If all code points share the same first byte, this can be an
+ * ANYOFRb. Otherwise store the lowest UTF-8 start byte which can
+ * quickly rule out many inputs at run-time without having to
+ * compute the code point from UTF-8. For EBCDIC, we use I8, as
+ * not doing that transformation would not rule out nearly so many
+ * things */
+ if (low_utf8[0] == high_utf8[0]) {
+ OP(REGNODE_p(ret)) = ANYOFRb;
+ ANYOF_FLAGS(REGNODE_p(ret)) = low_utf8[0];
+ }
+ else {
+ ANYOF_FLAGS(REGNODE_p(ret))
+ = NATIVE_UTF8_TO_I8(low_utf8[0]);
+ }
goto not_anyof;
}
@@ -20670,7 +20687,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
bool inverted;
- if (inRANGE(OP(o), ANYOFH, ANYOFR)) {
+ if (inRANGE(OP(o), ANYOFH, ANYOFRb)) {
flags = 0;
bitmap = NULL;
arg = 0;
@@ -20694,7 +20711,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
/* If there is stuff outside the bitmap, get it */
if (arg != ANYOF_ONLY_HAS_BITMAP) {
- if (inRANGE(OP(o), ANYOFR, ANYOFR)) {
+ if (inRANGE(OP(o), ANYOFR, ANYOFRb)) {
nonbitmap_invlist = _add_range_to_invlist(nonbitmap_invlist,
ANYOFRbase(o),
ANYOFRbase(o) + ANYOFRdelta(o));
@@ -20733,7 +20750,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
/* ANYOFH by definition doesn't have anything that will fit inside the
* bitmap; ANYOFR may or may not. */
if ( ! inRANGE(OP(o), ANYOFH, ANYOFHr)
- && ( ! inRANGE(OP(o), ANYOFR, ANYOFR)
+ && ( ! inRANGE(OP(o), ANYOFR, ANYOFRb)
|| ANYOFRbase(o) < NUM_ANYOF_CODE_POINTS))
{
/* Then all the things that could fit in the bitmap */
@@ -20749,7 +20766,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
* are things that haven't
* been resolved */
unresolved != NULL
- || inRANGE(OP(o), ANYOFR, ANYOFR));
+ || inRANGE(OP(o), ANYOFR, ANYOFRb));
SvREFCNT_dec(bitmap_range_not_in_bitmap);
/* If there are user-defined properties which haven't been defined
@@ -20835,7 +20852,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
/* And finally the matching, closing ']' */
Perl_sv_catpvf(aTHX_ sv, "%s]", PL_colors[1]);
- if (inRANGE(OP(o), ANYOFH, ANYOFR)) {
+ if (inRANGE(OP(o), ANYOFH, ANYOFRb)) {
U8 lowest = (OP(o) != ANYOFHr)
? FLAGS(o)
: LOWEST_ANYOF_HRx_BYTE(FLAGS(o));
diff --git a/regcomp.sym b/regcomp.sym
index b664fc8f07..6ca83aeef1 100644
--- a/regcomp.sym
+++ b/regcomp.sym
@@ -82,7 +82,9 @@ ANYOFPOSIXL ANYOF, sv charclass_posixl S ; Like ANYOFL, but matches [[:p
ANYOFH ANYOF, sv 1 S ; Like ANYOF, but only has "High" matches, none in the bitmap; the flags field contains the lowest matchable UTF-8 start byte
ANYOFHb ANYOF, sv 1 S ; Like ANYOFH, but all matches share the same UTF-8 start byte, given in the flags field
ANYOFHr ANYOF, sv 1 S ; Like ANYOFH, but the flags field contains packed bounds for all matchable UTF-8 start bytes.
-ANYOFR ANYOFR, packed 1 S ; Matches any character in the range given by its packed args: upper 12 bits is the max delta from the base lower 20; the flags field contains the lowest matchable UTF-8 start byte
+ANYOFR ANYOFR, packed 1 S ; Matches any character in the range given by its packed args: upper 12 bits is the max delta from the base lower 20; the flags field contains the lowest matchable UTF-8 start byte
+ANYOFRb ANYOFR, packed 1 S ; Like ANYOFR, but all matches share the same UTF-8 start byte, given in the flags field
+# There is no ANYOFRr because khw doesn't think there are likely to be real-world cases where such a large range is used.
ANYOFM ANYOFM byte 1 S ; Like ANYOF, but matches an invariant byte as determined by the mask and arg
NANYOFM ANYOFM byte 1 S ; complement of ANYOFM
diff --git a/regexec.c b/regexec.c
index 8265af4dd4..25d4062d7e 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2220,6 +2220,24 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
}
break;
+ case ANYOFRb:
+ if (utf8_target) {
+
+ /* We know what the first byte of any matched string should be */
+ U8 first_byte = FLAGS(c);
+
+ REXEC_FBC_FIND_NEXT_UTF8_BYTE_SCAN(first_byte,
+ withinCOUNT(utf8_to_uvchr_buf((U8 *) s,
+ (U8 *) strend,
+ NULL),
+ ANYOFRbase(c), ANYOFRdelta(c)));
+ }
+ else {
+ REXEC_FBC_CLASS_SCAN(0, withinCOUNT((U8) *s,
+ ANYOFRbase(c), ANYOFRdelta(c)));
+ }
+ break;
+
case EXACTFAA_NO_TRIE: /* This node only generated for non-utf8 patterns */
assert(! is_utf8_pat);
/* FALLTHROUGH */
@@ -6914,6 +6932,31 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
goto increment_locinput;
break;
+ case ANYOFRb:
+ if (NEXTCHR_IS_EOS) {
+ sayNO;
+ }
+
+ if (utf8_target) {
+ if ( ANYOF_FLAGS(scan) != (U8) *locinput
+ || ! withinCOUNT(utf8_to_uvchr_buf((U8 *) locinput,
+ (U8 *) reginfo->strend,
+ NULL),
+ ANYOFRbase(scan), ANYOFRdelta(scan)))
+ {
+ sayNO;
+ }
+ }
+ else {
+ if (! withinCOUNT((U8) *locinput,
+ ANYOFRbase(scan), ANYOFRdelta(scan)))
+ {
+ sayNO;
+ }
+ }
+ goto increment_locinput;
+ break;
+
/* The argument (FLAGS) to all the POSIX node types is the class number
* */
@@ -9768,6 +9811,31 @@ S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p,
}
break;
+ case ANYOFRb:
+ if (utf8_target) {
+ while ( hardcount < max
+ && scan < this_eol
+ && (U8) *scan == ANYOF_FLAGS(p)
+ && withinCOUNT(utf8_to_uvchr_buf((U8 *) scan,
+ (U8 *) this_eol,
+ NULL),
+ ANYOFRbase(p), ANYOFRdelta(p)))
+ {
+ scan += UTF8SKIP(scan);
+ hardcount++;
+ }
+ }
+ else {
+ while ( hardcount < max
+ && scan < this_eol
+ && withinCOUNT((U8) *scan, ANYOFRbase(p), ANYOFRdelta(p)))
+ {
+ scan++;
+ hardcount++;
+ }
+ }
+ break;
+
/* The argument (FLAGS) to all the POSIX node types is the class number */
case NPOSIXL:
diff --git a/regnodes.h b/regnodes.h
index b7bf210f27..e902e99847 100644
--- a/regnodes.h
+++ b/regnodes.h
@@ -6,8 +6,8 @@
/* Regops and State definitions */
-#define REGNODE_MAX 106
-#define REGMATCH_STATE_MAX 146
+#define REGNODE_MAX 107
+#define REGMATCH_STATE_MAX 147
#define END 0 /* 0000 End of program. */
#define SUCCEED 1 /* 0x01 Return from a subroutine, basically. */
@@ -37,87 +37,88 @@
#define ANYOFHb 23 /* 0x17 Like ANYOFH, but all matches share the same UTF-8 start byte, given in the flags field */
#define ANYOFHr 24 /* 0x18 Like ANYOFH, but the flags field contains packed bounds for all matchable UTF-8 start bytes. */
#define ANYOFR 25 /* 0x19 Matches any character in the range given by its packed args: upper 12 bits is the max delta from the base lower 20; the flags field contains the lowest matchable UTF-8 start byte */
-#define ANYOFM 26 /* 0x1a Like ANYOF, but matches an invariant byte as determined by the mask and arg */
-#define NANYOFM 27 /* 0x1b complement of ANYOFM */
-#define POSIXD 28 /* 0x1c Some [[:class:]] under /d; the FLAGS field gives which one */
-#define POSIXL 29 /* 0x1d Some [[:class:]] under /l; the FLAGS field gives which one */
-#define POSIXU 30 /* 0x1e Some [[:class:]] under /u; the FLAGS field gives which one */
-#define POSIXA 31 /* 0x1f Some [[:class:]] under /a; the FLAGS field gives which one */
-#define NPOSIXD 32 /* 0x20 complement of POSIXD, [[:^class:]] */
-#define NPOSIXL 33 /* 0x21 complement of POSIXL, [[:^class:]] */
-#define NPOSIXU 34 /* 0x22 complement of POSIXU, [[:^class:]] */
-#define NPOSIXA 35 /* 0x23 complement of POSIXA, [[:^class:]] */
-#define CLUMP 36 /* 0x24 Match any extended grapheme cluster sequence */
-#define BRANCH 37 /* 0x25 Match this alternative, or the next... */
-#define EXACT 38 /* 0x26 Match this string (flags field is the length). */
-#define LEXACT 39 /* 0x27 Match this long string (preceded by length; flags unused). */
-#define EXACTL 40 /* 0x28 Like EXACT, but /l is in effect (used so locale-related warnings can be checked for) */
-#define EXACTF 41 /* 0x29 Like EXACT, but match using /id rules; (string not UTF-8, ASCII folded; non-ASCII not) */
-#define EXACTFL 42 /* 0x2a Like EXACT, but match using /il rules; (string not likely to be folded) */
-#define EXACTFU 43 /* 0x2b Like EXACT, but match using /iu rules; (string folded) */
-#define EXACTFAA 44 /* 0x2c Like EXACT, but match using /iaa rules; (string folded except in non-UTF8 patterns: MICRO, SHARP S; folded length <= unfolded) */
-#define EXACTFUP 45 /* 0x2d Like EXACT, but match using /iu rules; (string not UTF-8, folded except MICRO, SHARP S: hence Problematic) */
-#define EXACTFLU8 46 /* 0x2e Like EXACTFU, but use /il, UTF-8, (string is folded, and everything in it is above 255 */
-#define EXACTFAA_NO_TRIE 47 /* 0x2f Like EXACT, but match using /iaa rules (string not UTF-8, not guaranteed to be folded, not currently trie-able) */
-#define EXACT_REQ8 48 /* 0x30 Like EXACT, but only UTF-8 encoded targets can match */
-#define LEXACT_REQ8 49 /* 0x31 Like LEXACT, but only UTF-8 encoded targets can match */
-#define EXACTFU_REQ8 50 /* 0x32 Like EXACTFU, but only UTF-8 encoded targets can match */
-#define EXACTFU_S_EDGE 51 /* 0x33 /di rules, but nothing in it precludes /ui, except begins and/or ends with [Ss]; (string not UTF-8; compile-time only) */
-#define NOTHING 52 /* 0x34 Match empty string. */
-#define TAIL 53 /* 0x35 Match empty string. Can jump here from outside. */
-#define STAR 54 /* 0x36 Match this (simple) thing 0 or more times. */
-#define PLUS 55 /* 0x37 Match this (simple) thing 1 or more times. */
-#define CURLY 56 /* 0x38 Match this simple thing {n,m} times. */
-#define CURLYN 57 /* 0x39 Capture next-after-this simple thing */
-#define CURLYM 58 /* 0x3a Capture this medium-complex thing {n,m} times. */
-#define CURLYX 59 /* 0x3b Match this complex thing {n,m} times. */
-#define WHILEM 60 /* 0x3c Do curly processing and see if rest matches. */
-#define OPEN 61 /* 0x3d Mark this point in input as start of #n. */
-#define CLOSE 62 /* 0x3e Close corresponding OPEN of #n. */
-#define SROPEN 63 /* 0x3f Same as OPEN, but for script run */
-#define SRCLOSE 64 /* 0x40 Close preceding SROPEN */
-#define REF 65 /* 0x41 Match some already matched string */
-#define REFF 66 /* 0x42 Match already matched string, using /di rules. */
-#define REFFL 67 /* 0x43 Match already matched string, using /li rules. */
-#define REFFU 68 /* 0x44 Match already matched string, usng /ui. */
-#define REFFA 69 /* 0x45 Match already matched string, using /aai rules. */
-#define REFN 70 /* 0x46 Match some already matched string */
-#define REFFN 71 /* 0x47 Match already matched string, using /di rules. */
-#define REFFLN 72 /* 0x48 Match already matched string, using /li rules. */
-#define REFFUN 73 /* 0x49 Match already matched string, using /ui rules. */
-#define REFFAN 74 /* 0x4a Match already matched string, using /aai rules. */
-#define LONGJMP 75 /* 0x4b Jump far away. */
-#define BRANCHJ 76 /* 0x4c BRANCH with long offset. */
-#define IFMATCH 77 /* 0x4d Succeeds if the following matches; non-zero flags "f", next_off "o" means lookbehind assertion starting "f..(f-o)" characters before current */
-#define UNLESSM 78 /* 0x4e Fails if the following matches; non-zero flags "f", next_off "o" means lookbehind assertion starting "f..(f-o)" characters before current */
-#define SUSPEND 79 /* 0x4f "Independent" sub-RE. */
-#define IFTHEN 80 /* 0x50 Switch, should be preceded by switcher. */
-#define GROUPP 81 /* 0x51 Whether the group matched. */
-#define EVAL 82 /* 0x52 Execute some Perl code. */
-#define MINMOD 83 /* 0x53 Next operator is not greedy. */
-#define LOGICAL 84 /* 0x54 Next opcode should set the flag only. */
-#define RENUM 85 /* 0x55 Group with independently numbered parens. */
-#define TRIE 86 /* 0x56 Match many EXACT(F[ALU]?)? at once. flags==type */
-#define TRIEC 87 /* 0x57 Same as TRIE, but with embedded charclass data */
-#define AHOCORASICK 88 /* 0x58 Aho Corasick stclass. flags==type */
-#define AHOCORASICKC 89 /* 0x59 Same as AHOCORASICK, but with embedded charclass data */
-#define GOSUB 90 /* 0x5a recurse to paren arg1 at (signed) ofs arg2 */
-#define GROUPPN 91 /* 0x5b Whether the group matched. */
-#define INSUBP 92 /* 0x5c Whether we are in a specific recurse. */
-#define DEFINEP 93 /* 0x5d Never execute directly. */
-#define ENDLIKE 94 /* 0x5e Used only for the type field of verbs */
-#define OPFAIL 95 /* 0x5f Same as (?!), but with verb arg */
-#define ACCEPT 96 /* 0x60 Accepts the current matched string, with verbar */
-#define VERB 97 /* 0x61 Used only for the type field of verbs */
-#define PRUNE 98 /* 0x62 Pattern fails at this startpoint if no-backtracking through this */
-#define MARKPOINT 99 /* 0x63 Push the current location for rollback by cut. */
-#define SKIP 100 /* 0x64 On failure skip forward (to the mark) before retrying */
-#define COMMIT 101 /* 0x65 Pattern fails outright if backtracking through this */
-#define CUTGROUP 102 /* 0x66 On failure go to the next alternation in the group */
-#define KEEPS 103 /* 0x67 $& begins here. */
-#define LNBREAK 104 /* 0x68 generic newline pattern */
-#define OPTIMIZED 105 /* 0x69 Placeholder for dump. */
-#define PSEUDO 106 /* 0x6a Pseudo opcode for internal use. */
+#define ANYOFRb 26 /* 0x1a Like ANYOFR, but all matches share the same UTF-8 start byte, given in the flags field */
+#define ANYOFM 27 /* 0x1b Like ANYOF, but matches an invariant byte as determined by the mask and arg */
+#define NANYOFM 28 /* 0x1c complement of ANYOFM */
+#define POSIXD 29 /* 0x1d Some [[:class:]] under /d; the FLAGS field gives which one */
+#define POSIXL 30 /* 0x1e Some [[:class:]] under /l; the FLAGS field gives which one */
+#define POSIXU 31 /* 0x1f Some [[:class:]] under /u; the FLAGS field gives which one */
+#define POSIXA 32 /* 0x20 Some [[:class:]] under /a; the FLAGS field gives which one */
+#define NPOSIXD 33 /* 0x21 complement of POSIXD, [[:^class:]] */
+#define NPOSIXL 34 /* 0x22 complement of POSIXL, [[:^class:]] */
+#define NPOSIXU 35 /* 0x23 complement of POSIXU, [[:^class:]] */
+#define NPOSIXA 36 /* 0x24 complement of POSIXA, [[:^class:]] */
+#define CLUMP 37 /* 0x25 Match any extended grapheme cluster sequence */
+#define BRANCH 38 /* 0x26 Match this alternative, or the next... */
+#define EXACT 39 /* 0x27 Match this string (flags field is the length). */
+#define LEXACT 40 /* 0x28 Match this long string (preceded by length; flags unused). */
+#define EXACTL 41 /* 0x29 Like EXACT, but /l is in effect (used so locale-related warnings can be checked for) */
+#define EXACTF 42 /* 0x2a Like EXACT, but match using /id rules; (string not UTF-8, ASCII folded; non-ASCII not) */
+#define EXACTFL 43 /* 0x2b Like EXACT, but match using /il rules; (string not likely to be folded) */
+#define EXACTFU 44 /* 0x2c Like EXACT, but match using /iu rules; (string folded) */
+#define EXACTFAA 45 /* 0x2d Like EXACT, but match using /iaa rules; (string folded except in non-UTF8 patterns: MICRO, SHARP S; folded length <= unfolded) */
+#define EXACTFUP 46 /* 0x2e Like EXACT, but match using /iu rules; (string not UTF-8, folded except MICRO, SHARP S: hence Problematic) */
+#define EXACTFLU8 47 /* 0x2f Like EXACTFU, but use /il, UTF-8, (string is folded, and everything in it is above 255 */
+#define EXACTFAA_NO_TRIE 48 /* 0x30 Like EXACT, but match using /iaa rules (string not UTF-8, not guaranteed to be folded, not currently trie-able) */
+#define EXACT_REQ8 49 /* 0x31 Like EXACT, but only UTF-8 encoded targets can match */
+#define LEXACT_REQ8 50 /* 0x32 Like LEXACT, but only UTF-8 encoded targets can match */
+#define EXACTFU_REQ8 51 /* 0x33 Like EXACTFU, but only UTF-8 encoded targets can match */
+#define EXACTFU_S_EDGE 52 /* 0x34 /di rules, but nothing in it precludes /ui, except begins and/or ends with [Ss]; (string not UTF-8; compile-time only) */
+#define NOTHING 53 /* 0x35 Match empty string. */
+#define TAIL 54 /* 0x36 Match empty string. Can jump here from outside. */
+#define STAR 55 /* 0x37 Match this (simple) thing 0 or more times. */
+#define PLUS 56 /* 0x38 Match this (simple) thing 1 or more times. */
+#define CURLY 57 /* 0x39 Match this simple thing {n,m} times. */
+#define CURLYN 58 /* 0x3a Capture next-after-this simple thing */
+#define CURLYM 59 /* 0x3b Capture this medium-complex thing {n,m} times. */
+#define CURLYX 60 /* 0x3c Match this complex thing {n,m} times. */
+#define WHILEM 61 /* 0x3d Do curly processing and see if rest matches. */
+#define OPEN 62 /* 0x3e Mark this point in input as start of #n. */
+#define CLOSE 63 /* 0x3f Close corresponding OPEN of #n. */
+#define SROPEN 64 /* 0x40 Same as OPEN, but for script run */
+#define SRCLOSE 65 /* 0x41 Close preceding SROPEN */
+#define REF 66 /* 0x42 Match some already matched string */
+#define REFF 67 /* 0x43 Match already matched string, using /di rules. */
+#define REFFL 68 /* 0x44 Match already matched string, using /li rules. */
+#define REFFU 69 /* 0x45 Match already matched string, usng /ui. */
+#define REFFA 70 /* 0x46 Match already matched string, using /aai rules. */
+#define REFN 71 /* 0x47 Match some already matched string */
+#define REFFN 72 /* 0x48 Match already matched string, using /di rules. */
+#define REFFLN 73 /* 0x49 Match already matched string, using /li rules. */
+#define REFFUN 74 /* 0x4a Match already matched string, using /ui rules. */
+#define REFFAN 75 /* 0x4b Match already matched string, using /aai rules. */
+#define LONGJMP 76 /* 0x4c Jump far away. */
+#define BRANCHJ 77 /* 0x4d BRANCH with long offset. */
+#define IFMATCH 78 /* 0x4e Succeeds if the following matches; non-zero flags "f", next_off "o" means lookbehind assertion starting "f..(f-o)" characters before current */
+#define UNLESSM 79 /* 0x4f Fails if the following matches; non-zero flags "f", next_off "o" means lookbehind assertion starting "f..(f-o)" characters before current */
+#define SUSPEND 80 /* 0x50 "Independent" sub-RE. */
+#define IFTHEN 81 /* 0x51 Switch, should be preceded by switcher. */
+#define GROUPP 82 /* 0x52 Whether the group matched. */
+#define EVAL 83 /* 0x53 Execute some Perl code. */
+#define MINMOD 84 /* 0x54 Next operator is not greedy. */
+#define LOGICAL 85 /* 0x55 Next opcode should set the flag only. */
+#define RENUM 86 /* 0x56 Group with independently numbered parens. */
+#define TRIE 87 /* 0x57 Match many EXACT(F[ALU]?)? at once. flags==type */
+#define TRIEC 88 /* 0x58 Same as TRIE, but with embedded charclass data */
+#define AHOCORASICK 89 /* 0x59 Aho Corasick stclass. flags==type */
+#define AHOCORASICKC 90 /* 0x5a Same as AHOCORASICK, but with embedded charclass data */
+#define GOSUB 91 /* 0x5b recurse to paren arg1 at (signed) ofs arg2 */
+#define GROUPPN 92 /* 0x5c Whether the group matched. */
+#define INSUBP 93 /* 0x5d Whether we are in a specific recurse. */
+#define DEFINEP 94 /* 0x5e Never execute directly. */
+#define ENDLIKE 95 /* 0x5f Used only for the type field of verbs */
+#define OPFAIL 96 /* 0x60 Same as (?!), but with verb arg */
+#define ACCEPT 97 /* 0x61 Accepts the current matched string, with verbar */
+#define VERB 98 /* 0x62 Used only for the type field of verbs */
+#define PRUNE 99 /* 0x63 Pattern fails at this startpoint if no-backtracking through this */
+#define MARKPOINT 100 /* 0x64 Push the current location for rollback by cut. */
+#define SKIP 101 /* 0x65 On failure skip forward (to the mark) before retrying */
+#define COMMIT 102 /* 0x66 Pattern fails outright if backtracking through this */
+#define CUTGROUP 103 /* 0x67 On failure go to the next alternation in the group */
+#define KEEPS 104 /* 0x68 $& begins here. */
+#define LNBREAK 105 /* 0x69 generic newline pattern */
+#define OPTIMIZED 106 /* 0x6a Placeholder for dump. */
+#define PSEUDO 107 /* 0x6b Pseudo opcode for internal use. */
/* ------------ States ------------- */
#define TRIE_next (REGNODE_MAX + 1) /* state for TRIE */
#define TRIE_next_fail (REGNODE_MAX + 2) /* state for TRIE */
@@ -192,6 +193,7 @@ EXTCONST U8 PL_regkind[] = {
ANYOF, /* ANYOFHb */
ANYOF, /* ANYOFHr */
ANYOFR, /* ANYOFR */
+ ANYOFR, /* ANYOFRb */
ANYOFM, /* ANYOFM */
ANYOFM, /* NANYOFM */
POSIXD, /* POSIXD */
@@ -348,6 +350,7 @@ static const U8 regarglen[] = {
EXTRA_SIZE(struct regnode_1), /* ANYOFHb */
EXTRA_SIZE(struct regnode_1), /* ANYOFHr */
EXTRA_SIZE(struct regnode_1), /* ANYOFR */
+ EXTRA_SIZE(struct regnode_1), /* ANYOFRb */
EXTRA_SIZE(struct regnode_1), /* ANYOFM */
EXTRA_SIZE(struct regnode_1), /* NANYOFM */
0, /* POSIXD */
@@ -460,6 +463,7 @@ static const char reg_off_by_arg[] = {
0, /* ANYOFHb */
0, /* ANYOFHr */
0, /* ANYOFR */
+ 0, /* ANYOFRb */
0, /* ANYOFM */
0, /* NANYOFM */
0, /* POSIXD */
@@ -578,87 +582,88 @@ EXTCONST char * const PL_reg_name[] = {
"ANYOFHb", /* 0x17 */
"ANYOFHr", /* 0x18 */
"ANYOFR", /* 0x19 */
- "ANYOFM", /* 0x1a */
- "NANYOFM", /* 0x1b */
- "POSIXD", /* 0x1c */
- "POSIXL", /* 0x1d */
- "POSIXU", /* 0x1e */
- "POSIXA", /* 0x1f */
- "NPOSIXD", /* 0x20 */
- "NPOSIXL", /* 0x21 */
- "NPOSIXU", /* 0x22 */
- "NPOSIXA", /* 0x23 */
- "CLUMP", /* 0x24 */
- "BRANCH", /* 0x25 */
- "EXACT", /* 0x26 */
- "LEXACT", /* 0x27 */
- "EXACTL", /* 0x28 */
- "EXACTF", /* 0x29 */
- "EXACTFL", /* 0x2a */
- "EXACTFU", /* 0x2b */
- "EXACTFAA", /* 0x2c */
- "EXACTFUP", /* 0x2d */
- "EXACTFLU8", /* 0x2e */
- "EXACTFAA_NO_TRIE", /* 0x2f */
- "EXACT_REQ8", /* 0x30 */
- "LEXACT_REQ8", /* 0x31 */
- "EXACTFU_REQ8", /* 0x32 */
- "EXACTFU_S_EDGE", /* 0x33 */
- "NOTHING", /* 0x34 */
- "TAIL", /* 0x35 */
- "STAR", /* 0x36 */
- "PLUS", /* 0x37 */
- "CURLY", /* 0x38 */
- "CURLYN", /* 0x39 */
- "CURLYM", /* 0x3a */
- "CURLYX", /* 0x3b */
- "WHILEM", /* 0x3c */
- "OPEN", /* 0x3d */
- "CLOSE", /* 0x3e */
- "SROPEN", /* 0x3f */
- "SRCLOSE", /* 0x40 */
- "REF", /* 0x41 */
- "REFF", /* 0x42 */
- "REFFL", /* 0x43 */
- "REFFU", /* 0x44 */
- "REFFA", /* 0x45 */
- "REFN", /* 0x46 */
- "REFFN", /* 0x47 */
- "REFFLN", /* 0x48 */
- "REFFUN", /* 0x49 */
- "REFFAN", /* 0x4a */
- "LONGJMP", /* 0x4b */
- "BRANCHJ", /* 0x4c */
- "IFMATCH", /* 0x4d */
- "UNLESSM", /* 0x4e */
- "SUSPEND", /* 0x4f */
- "IFTHEN", /* 0x50 */
- "GROUPP", /* 0x51 */
- "EVAL", /* 0x52 */
- "MINMOD", /* 0x53 */
- "LOGICAL", /* 0x54 */
- "RENUM", /* 0x55 */
- "TRIE", /* 0x56 */
- "TRIEC", /* 0x57 */
- "AHOCORASICK", /* 0x58 */
- "AHOCORASICKC", /* 0x59 */
- "GOSUB", /* 0x5a */
- "GROUPPN", /* 0x5b */
- "INSUBP", /* 0x5c */
- "DEFINEP", /* 0x5d */
- "ENDLIKE", /* 0x5e */
- "OPFAIL", /* 0x5f */
- "ACCEPT", /* 0x60 */
- "VERB", /* 0x61 */
- "PRUNE", /* 0x62 */
- "MARKPOINT", /* 0x63 */
- "SKIP", /* 0x64 */
- "COMMIT", /* 0x65 */
- "CUTGROUP", /* 0x66 */
- "KEEPS", /* 0x67 */
- "LNBREAK", /* 0x68 */
- "OPTIMIZED", /* 0x69 */
- "PSEUDO", /* 0x6a */
+ "ANYOFRb", /* 0x1a */
+ "ANYOFM", /* 0x1b */
+ "NANYOFM", /* 0x1c */
+ "POSIXD", /* 0x1d */
+ "POSIXL", /* 0x1e */
+ "POSIXU", /* 0x1f */
+ "POSIXA", /* 0x20 */
+ "NPOSIXD", /* 0x21 */
+ "NPOSIXL", /* 0x22 */
+ "NPOSIXU", /* 0x23 */
+ "NPOSIXA", /* 0x24 */
+ "CLUMP", /* 0x25 */
+ "BRANCH", /* 0x26 */
+ "EXACT", /* 0x27 */
+ "LEXACT", /* 0x28 */
+ "EXACTL", /* 0x29 */
+ "EXACTF", /* 0x2a */
+ "EXACTFL", /* 0x2b */
+ "EXACTFU", /* 0x2c */
+ "EXACTFAA", /* 0x2d */
+ "EXACTFUP", /* 0x2e */
+ "EXACTFLU8", /* 0x2f */
+ "EXACTFAA_NO_TRIE", /* 0x30 */
+ "EXACT_REQ8", /* 0x31 */
+ "LEXACT_REQ8", /* 0x32 */
+ "EXACTFU_REQ8", /* 0x33 */
+ "EXACTFU_S_EDGE", /* 0x34 */
+ "NOTHING", /* 0x35 */
+ "TAIL", /* 0x36 */
+ "STAR", /* 0x37 */
+ "PLUS", /* 0x38 */
+ "CURLY", /* 0x39 */
+ "CURLYN", /* 0x3a */
+ "CURLYM", /* 0x3b */
+ "CURLYX", /* 0x3c */
+ "WHILEM", /* 0x3d */
+ "OPEN", /* 0x3e */
+ "CLOSE", /* 0x3f */
+ "SROPEN", /* 0x40 */
+ "SRCLOSE", /* 0x41 */
+ "REF", /* 0x42 */
+ "REFF", /* 0x43 */
+ "REFFL", /* 0x44 */
+ "REFFU", /* 0x45 */
+ "REFFA", /* 0x46 */
+ "REFN", /* 0x47 */
+ "REFFN", /* 0x48 */
+ "REFFLN", /* 0x49 */
+ "REFFUN", /* 0x4a */
+ "REFFAN", /* 0x4b */
+ "LONGJMP", /* 0x4c */
+ "BRANCHJ", /* 0x4d */
+ "IFMATCH", /* 0x4e */
+ "UNLESSM", /* 0x4f */
+ "SUSPEND", /* 0x50 */
+ "IFTHEN", /* 0x51 */
+ "GROUPP", /* 0x52 */
+ "EVAL", /* 0x53 */
+ "MINMOD", /* 0x54 */
+ "LOGICAL", /* 0x55 */
+ "RENUM", /* 0x56 */
+ "TRIE", /* 0x57 */
+ "TRIEC", /* 0x58 */
+ "AHOCORASICK", /* 0x59 */
+ "AHOCORASICKC", /* 0x5a */
+ "GOSUB", /* 0x5b */
+ "GROUPPN", /* 0x5c */
+ "INSUBP", /* 0x5d */
+ "DEFINEP", /* 0x5e */
+ "ENDLIKE", /* 0x5f */
+ "OPFAIL", /* 0x60 */
+ "ACCEPT", /* 0x61 */
+ "VERB", /* 0x62 */
+ "PRUNE", /* 0x63 */
+ "MARKPOINT", /* 0x64 */
+ "SKIP", /* 0x65 */
+ "COMMIT", /* 0x66 */
+ "CUTGROUP", /* 0x67 */
+ "KEEPS", /* 0x68 */
+ "LNBREAK", /* 0x69 */
+ "OPTIMIZED", /* 0x6a */
+ "PSEUDO", /* 0x6b */
/* ------------ States ------------- */
"TRIE_next", /* REGNODE_MAX +0x01 */
"TRIE_next_fail", /* REGNODE_MAX +0x02 */
@@ -793,7 +798,7 @@ EXTCONST U8 PL_varies[] __attribute__deprecated__ = {
EXTCONST U8 PL_varies_bitmask[];
#else
EXTCONST U8 PL_varies_bitmask[] = {
- 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x1F, 0xFE, 0x97, 0x01, 0x00, 0x00, 0x00
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x80, 0x3F, 0xFC, 0x2F, 0x03, 0x00, 0x00, 0x00
};
#endif /* DOINIT */
@@ -806,8 +811,8 @@ EXTCONST U8 PL_simple[] __attribute__deprecated__;
#else
EXTCONST U8 PL_simple[] __attribute__deprecated__ = {
REG_ANY, SANY, ANYOF, ANYOFD, ANYOFL, ANYOFPOSIXL, ANYOFH, ANYOFHb,
- ANYOFHr, ANYOFR, ANYOFM, NANYOFM, POSIXD, POSIXL, POSIXU, POSIXA,
- NPOSIXD, NPOSIXL, NPOSIXU, NPOSIXA,
+ ANYOFHr, ANYOFR, ANYOFRb, ANYOFM, NANYOFM, POSIXD, POSIXL, POSIXU,
+ POSIXA, NPOSIXD, NPOSIXL, NPOSIXU, NPOSIXA,
0
};
#endif /* DOINIT */
@@ -816,7 +821,7 @@ EXTCONST U8 PL_simple[] __attribute__deprecated__ = {
EXTCONST U8 PL_simple_bitmask[];
#else
EXTCONST U8 PL_simple_bitmask[] = {
- 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
#endif /* DOINIT */
diff --git a/t/re/anyof.t b/t/re/anyof.t
index 2fa92cc0d9..9b9c030a18 100644
--- a/t/re/anyof.t
+++ b/t/re/anyof.t
@@ -487,19 +487,19 @@ my @tests = (
'[\x{102}\x{104}]' => 'ANYOFHb[0102 0104]',
'[\x{102}-\x{104}{INFTY}]' => 'ANYOFH[0102-0104 INFTY-INFTY]',
'[\x{102}-\x{104}{HIGHEST_CP}]' => 'ANYOFH[0102-0104 HIGHEST_CP]',
- '[\x{102}-\x{104}\x{101}]' => 'ANYOFR[0101-0104]',
+ '[\x{102}-\x{104}\x{101}]' => 'ANYOFRb[0101-0104]',
'[\x{102}-\x{104}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
'[\x{102}-\x{104}\x{101}-{HIGHEST_CP}]' => 'ANYOFH[0101-HIGHEST_CP]',
- '[\x{102}-\x{104}\x{102}]' => 'ANYOFR[0102-0104]',
+ '[\x{102}-\x{104}\x{102}]' => 'ANYOFRb[0102-0104]',
'[\x{102}-\x{104}\x{102}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
'[\x{102}-\x{104}\x{102}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
- '[\x{102}-\x{104}\x{103}]' => 'ANYOFR[0102-0104]',
+ '[\x{102}-\x{104}\x{103}]' => 'ANYOFRb[0102-0104]',
'[\x{102}-\x{104}\x{103}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
'[\x{102}-\x{104}\x{103}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
- '[\x{102}-\x{104}\x{104}]' => 'ANYOFR[0102-0104]',
+ '[\x{102}-\x{104}\x{104}]' => 'ANYOFRb[0102-0104]',
'[\x{102}-\x{104}\x{104}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
'[\x{102}-\x{104}\x{104}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
- '[\x{102}-\x{104}\x{105}]' => 'ANYOFR[0102-0105]',
+ '[\x{102}-\x{104}\x{105}]' => 'ANYOFRb[0102-0105]',
'[\x{102}-\x{104}\x{105}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
'[\x{102}-\x{104}\x{105}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
'[\x{102}-\x{104}\x{106}]' => 'ANYOFHb[0102-0104 0106]',
@@ -515,11 +515,11 @@ my @tests = (
'[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{104}]' => 'ANYOFHb[0101-0104 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{105}]' => 'ANYOFHb[0101-0105 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{106}]' => 'ANYOFHb[0101-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOFR[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOFR[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOFR[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOFR[0101-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOFR[0101-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOFRb[0101-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOFRb[0101-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOFRb[0101-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOFRb[0101-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOFRb[0101-010B]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{102}]' => 'ANYOFHb[0102-0104 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
@@ -528,45 +528,45 @@ my @tests = (
'[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{104}]' => 'ANYOFHb[0102-0104 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{105}]' => 'ANYOFHb[0102-0105 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{106}]' => 'ANYOFHb[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOFR[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOFR[0102-010C]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOFRb[0102-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOFRb[0102-010C]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOFHb[0102-0104 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{104}]' => 'ANYOFHb[0102-0104 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{105}]' => 'ANYOFHb[0102-0105 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{106}]' => 'ANYOFHb[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOFR[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOFR[0102-010C]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOFRb[0102-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOFRb[0102-010C]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOFHb[0102-0104 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{105}]' => 'ANYOFHb[0102-0105 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{106}]' => 'ANYOFHb[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOFR[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOFR[0102-010C]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOFRb[0102-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOFRb[0102-010C]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOFHb[0102-0105 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{HIGHEST_CP}]' => 'ANYOFH[0102-HIGHEST_CP]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{106}]' => 'ANYOFHb[0102-0106 0108-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOFR[0102-010A]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOFR[0102-010B]',
- '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOFR[0102-010C]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOFRb[0102-010A]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOFRb[0102-010B]',
+ '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOFRb[0102-010C]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOFHb[0102-0104 0106 0108-010A]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY}]' => 'ANYOFH[0102-0104 0106-INFTY]',
'[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{HIGHEST_CP}]' => 'ANYOFH[0102-0104 0106-HIGHEST_CP]',
@@ -583,7 +583,7 @@ my @tests = (
'[\x{102}-\x{104}\x{108}-\x{10A}\x{10B}]' => 'ANYOFHb[0102-0104 0108-010B]',
'[\x{103}\x{102}]' => 'EXACTFU_REQ8 <\x{103}>',
'[\x{104}\x{102}]' => 'ANYOFHb[0102 0104]',
- '[\x{104}\x{102}\x{103}]' => 'ANYOFR[0102-0104]',
+ '[\x{104}\x{102}\x{103}]' => 'ANYOFRb[0102-0104]',
'[\x{106}-{INFTY}\x{104}]' => 'ANYOFH[0104 0106-INFTY]',
'[\x{106}-{INFTY}\x{104}-{INFTY}]' => 'ANYOFH[0104-INFTY]',
'[\x{106}-{INFTY}\x{104}-{HIGHEST_CP}]' => 'ANYOFH[0104-INFTY]',