This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change the names of some regnodes
authorKarl Williamson <khw@cpan.org>
Mon, 30 Sep 2019 02:55:45 +0000 (20:55 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 30 Oct 2019 03:21:36 +0000 (21:21 -0600)
The new name is shorter and I believe, clearer.

pod/perldebguts.pod
regcomp.c
regcomp.h
regcomp.sym
regexec.c
regnodes.h
t/re/anyof.t
t/re/pat.t

index 4142cf7..6f47573 100644 (file)
@@ -690,11 +690,11 @@ will be lost.
                              (string not UTF-8, not guaranteed to be
                              folded, not currently trie-able).
 
- EXACT_ONLY8      str        Like EXACT, but only UTF-8 encoded targets
+ EXACT_REQ8       str        Like EXACT, but only UTF-8 encoded targets
                              can match
- LEXACT_ONLY8     len:str 1  Like LEXACT, but only UTF-8 encoded targets
+ LEXACT_REQ8      len:str 1  Like LEXACT, but only UTF-8 encoded targets
                              can match
- EXACTFU_ONLY8    str        Like EXACTFU, but only UTF-8 encoded
+ EXACTFU_REQ8     str        Like EXACTFU, but only UTF-8 encoded
                              targets can match
 
  EXACTFU_S_EDGE   str        /di rules, but nothing in it precludes /ui,
index 54cab09..2196d10 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -2702,7 +2702,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
 #endif
 
     switch (flags) {
-        case EXACT: case EXACT_ONLY8: case EXACTL: break;
+        case EXACT: case EXACT_REQ8: case EXACTL: break;
        case EXACTFAA:
         case EXACTFUP:
        case EXACTFU:
@@ -2717,7 +2717,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
     trie->wordcount = word_count;
     RExC_rxi->data->data[ data_slot ] = (void*)trie;
     trie->charmap = (U16 *) PerlMemShared_calloc( 256, sizeof(U16) );
-    if (flags == EXACT || flags == EXACT_ONLY8 || flags == EXACTL)
+    if (flags == EXACT || flags == EXACT_REQ8 || flags == EXACTL)
        trie->bitmap = (char *) PerlMemShared_calloc( ANYOF_BITMAP_SIZE, 1 );
     trie->wordinfo = (reg_trie_wordinfo *) PerlMemShared_calloc(
                        trie->wordcount+1, sizeof(reg_trie_wordinfo));
@@ -2793,8 +2793,8 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
 
         if (    noper < tail
             && (    OP(noper) == flags
-                || (flags == EXACT && OP(noper) == EXACT_ONLY8)
-                || (flags == EXACTFU && (   OP(noper) == EXACTFU_ONLY8
+                || (flags == EXACT && OP(noper) == EXACT_REQ8)
+                || (flags == EXACTFU && (   OP(noper) == EXACTFU_REQ8
                                          || OP(noper) == EXACTFUP))))
         {
             uc= (U8*)STRING(noper);
@@ -3011,8 +3011,8 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
 
             if (    noper < tail
                 && (    OP(noper) == flags
-                    || (flags == EXACT && OP(noper) == EXACT_ONLY8)
-                    || (flags == EXACTFU && (   OP(noper) == EXACTFU_ONLY8
+                    || (flags == EXACT && OP(noper) == EXACT_REQ8)
+                    || (flags == EXACTFU && (   OP(noper) == EXACTFU_REQ8
                                              || OP(noper) == EXACTFUP))))
             {
                 const U8 *uc= (U8*)STRING(noper);
@@ -3236,8 +3236,8 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
 
             if (    noper < tail
                 && (    OP(noper) == flags
-                    || (flags == EXACT && OP(noper) == EXACT_ONLY8)
-                    || (flags == EXACTFU && (   OP(noper) == EXACTFU_ONLY8
+                    || (flags == EXACT && OP(noper) == EXACT_REQ8)
+                    || (flags == EXACTFU && (   OP(noper) == EXACTFU_REQ8
                                              || OP(noper) == EXACTFUP))))
             {
                 const U8 *uc= (U8*)STRING(noper);
@@ -3996,7 +3996,7 @@ S_construct_ahocorasick_from_trie(pTHX_ RExC_state_t *pRExC_state, regnode *sour
 
 #define JOIN_EXACT(scan,min_subtract,unfolded_multi_char, flags)    \
     if (PL_regkind[OP(scan)] == EXACT && OP(scan) != LEXACT         \
-                                      && OP(scan) != LEXACT_ONLY8)  \
+                                      && OP(scan) != LEXACT_REQ8)  \
         join_exact(pRExC_state,(scan),(min_subtract),unfolded_multi_char, (flags), NULL, depth+1)
 
 STATIC U32
@@ -4061,16 +4061,16 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan,
 
             /* Joining something that requires UTF-8 with something that
              * doesn't, means the result requires UTF-8. */
-            if (OP(scan) == EXACT && (OP(n) == EXACT_ONLY8)) {
-                OP(scan) = EXACT_ONLY8;
+            if (OP(scan) == EXACT && (OP(n) == EXACT_REQ8)) {
+                OP(scan) = EXACT_REQ8;
             }
-            else if (OP(scan) == EXACT_ONLY8 && (OP(n) == EXACT)) {
+            else if (OP(scan) == EXACT_REQ8 && (OP(n) == EXACT)) {
                 ;   /* join is compatible, no need to change OP */
             }
-            else if ((OP(scan) == EXACTFU) && (OP(n) == EXACTFU_ONLY8)) {
-                OP(scan) = EXACTFU_ONLY8;
+            else if ((OP(scan) == EXACTFU) && (OP(n) == EXACTFU_REQ8)) {
+                OP(scan) = EXACTFU_REQ8;
             }
-            else if ((OP(scan) == EXACTFU_ONLY8) && (OP(n) == EXACTFU)) {
+            else if ((OP(scan) == EXACTFU_REQ8) && (OP(n) == EXACTFU)) {
                 ;   /* join is compatible, no need to change OP */
             }
             else if (OP(scan) == EXACTFU && OP(n) == EXACTFU) {
@@ -4093,7 +4093,7 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan,
                   * node.  And if the only adjacent node is EXACTF, they get
                   * absorbed into that, under the theory that a longer node is
                   * better than two shorter ones, even if one is EXACTFU.  Note
-                  * that EXACTFU_ONLY8 is generated only for UTF-8 patterns,
+                  * that EXACTFU_REQ8 is generated only for UTF-8 patterns,
                   * and the EXACTFU_S_EDGE ones only for non-UTF-8.  */
 
                 if (STRING(n)[STR_LEN(n)-1] == 's') {
@@ -4201,7 +4201,7 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan,
      * this final joining, sequences could have been split over boundaries, and
      * hence missed).  The sequences only happen in folding, hence for any
      * non-EXACT EXACTish node */
-    if (OP(scan) != EXACT && OP(scan) != EXACT_ONLY8 && OP(scan) != EXACTL) {
+    if (OP(scan) != EXACT && OP(scan) != EXACT_REQ8 && OP(scan) != EXACTL) {
         U8* s0 = (U8*) STRING(scan);
         U8* s = s0;
         U8* s_end = s0 + STR_LEN(scan);
@@ -4860,9 +4860,9 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                                 ----------------+-----------
                                 NOTHING         | NOTHING
                                 EXACT           | EXACT
-                                EXACT_ONLY8     | EXACT
+                                EXACT_REQ8     | EXACT
                                 EXACTFU         | EXACTFU
-                                EXACTFU_ONLY8   | EXACTFU
+                                EXACTFU_REQ8   | EXACTFU
                                 EXACTFUP        | EXACTFU
                                 EXACTFAA        | EXACTFAA
                                 EXACTL          | EXACTL
@@ -4872,10 +4872,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                         */
 #define TRIE_TYPE(X) ( ( NOTHING == (X) )                                   \
                        ? NOTHING                                            \
-                       : ( EXACT == (X) || EXACT_ONLY8 == (X) )             \
+                       : ( EXACT == (X) || EXACT_REQ8 == (X) )             \
                          ? EXACT                                            \
                          : (     EXACTFU == (X)                             \
-                              || EXACTFU_ONLY8 == (X)                       \
+                              || EXACTFU_REQ8 == (X)                       \
                               || EXACTFUP == (X) )                          \
                            ? EXACTFU                                        \
                            : ( EXACTFAA == (X) )                            \
@@ -5200,8 +5200,8 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
        }
        else if (   OP(scan) == EXACT
                  || OP(scan) == LEXACT
-                 || OP(scan) == EXACT_ONLY8
-                 || OP(scan) == LEXACT_ONLY8
+                 || OP(scan) == EXACT_REQ8
+                 || OP(scan) == LEXACT_REQ8
                  || OP(scan) == EXACTL)
         {
            SSize_t l = STR_LEN(scan);
@@ -5324,8 +5324,8 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                    next = NEXTOPER(scan);
                    if (   OP(next) == EXACT
                         || OP(next) == LEXACT
-                        || OP(next) == EXACT_ONLY8
-                        || OP(next) == LEXACT_ONLY8
+                        || OP(next) == EXACT_REQ8
+                        || OP(next) == LEXACT_REQ8
                         || OP(next) == EXACTL
                         || (flags & SCF_DO_STCLASS))
                     {
@@ -7985,8 +7985,8 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
        if (PL_regkind[OP(first)] == EXACT) {
            if (   OP(first) == EXACT
                || OP(first) == LEXACT
-                || OP(first) == EXACT_ONLY8
-                || OP(first) == LEXACT_ONLY8
+                || OP(first) == EXACT_REQ8
+                || OP(first) == LEXACT_REQ8
                 || OP(first) == EXACTL)
             {
                NOOP;   /* Empty, get anchored substr later. */
@@ -8333,7 +8333,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
             RExC_rx->extflags |= RXf_WHITE;
         else if ( RExC_rx->extflags & RXf_SPLIT
                   && (   fop == EXACT || fop == LEXACT
-                      || fop == EXACT_ONLY8 || fop == LEXACT_ONLY8
+                      || fop == EXACT_REQ8 || fop == LEXACT_REQ8
                       || fop == EXACTL)
                   && STR_LEN(first) == 1
                   && *(STRING(first)) == ' '
@@ -14878,18 +14878,18 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
             else {
 
                 /* If the node type is EXACT here, check to see if it
-                 * should be EXACTL, or EXACT_ONLY8. */
+                 * should be EXACTL, or EXACT_REQ8. */
                 if (node_type == EXACT) {
                     if (LOC) {
                         node_type = EXACTL;
                     }
                     else if (requires_utf8_target) {
-                        node_type = EXACT_ONLY8;
+                        node_type = EXACT_REQ8;
                     }
                 }
                 else if (node_type == LEXACT) {
                     if (requires_utf8_target) {
-                        node_type = LEXACT_ONLY8;
+                        node_type = LEXACT_REQ8;
                     }
                 }
                 else if (FOLD) {
@@ -14960,7 +14960,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
                     }
 
                     if (requires_utf8_target && node_type == EXACTFU) {
-                        node_type = EXACTFU_ONLY8;
+                        node_type = EXACTFU_REQ8;
                     }
                 }
 
@@ -18737,7 +18737,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
                     op = (FOLD) ? EXACTFL : EXACTL;
                 }
                 else if (! FOLD) { /* Not /l and not /i */
-                    op = (start[0] < 256) ? EXACT : EXACT_ONLY8;
+                    op = (start[0] < 256) ? EXACT : EXACT_REQ8;
                 }
                 else if (start[0] < 256) { /* /i, not /l, and the code point is
                                               small */
@@ -18767,8 +18767,8 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
                            applies to it */
                     op = _invlist_contains_cp(PL_InMultiCharFold,
                                               start[0])
-                         ? EXACTFU_ONLY8
-                         : EXACT_ONLY8;
+                         ? EXACTFU_REQ8
+                         : EXACT_REQ8;
                 }
 
                 value = start[0];
@@ -18932,7 +18932,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
                                      ? EXACTFLU8
                                      : (ASCII_FOLD_RESTRICTED)
                                        ? EXACTFAA
-                                       : EXACTFU_ONLY8;
+                                       : EXACTFU_REQ8;
                                 value = folded;
                             }
                         }   /* Below, the lowest code point < 256 */
@@ -20172,15 +20172,15 @@ S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode_offset p,
             switch (OP(REGNODE_p(scan))) {
                 case LEXACT:
                 case EXACT:
-                case LEXACT_ONLY8:
-                case EXACT_ONLY8:
+                case LEXACT_REQ8:
+                case EXACT_REQ8:
                 case EXACTL:
                 case EXACTF:
                 case EXACTFU_S_EDGE:
                 case EXACTFAA_NO_TRIE:
                 case EXACTFAA:
                 case EXACTFU:
-                case EXACTFU_ONLY8:
+                case EXACTFU_REQ8:
                 case EXACTFLU8:
                 case EXACTFUP:
                 case EXACTFL:
index 520e60e..823945c 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -338,9 +338,9 @@ struct regnode_ssc {
 #define FLAGS(p)       ((p)->flags)    /* Caution: Doesn't apply to all      \
                                           regnode types.  For some, it's the \
                                           character set of the regnode */
-#define        STR_LENs(p)     (__ASSERT_(OP(p) != LEXACT && OP(p) != LEXACT_ONLY8)  \
+#define        STR_LENs(p)     (__ASSERT_(OP(p) != LEXACT && OP(p) != LEXACT_REQ8)  \
                                     ((struct regnode_string *)p)->str_len)
-#define        STRINGs(p)      (__ASSERT_(OP(p) != LEXACT && OP(p) != LEXACT_ONLY8)  \
+#define        STRINGs(p)      (__ASSERT_(OP(p) != LEXACT && OP(p) != LEXACT_REQ8)  \
                                     ((struct regnode_string *)p)->string)
 #define        OPERANDs(p)     STRINGs(p)
 
@@ -356,15 +356,15 @@ struct regnode_ssc {
  * node to be an ARG2L, using the second 32 bit field for the length, and not
  * using the flags nor next_off fields at all.  One could have an llstring node
  * and even an lllstring type. */
-#define        STR_LENl(p)     (__ASSERT_(OP(p) == LEXACT || OP(p) == LEXACT_ONLY8)  \
+#define        STR_LENl(p)     (__ASSERT_(OP(p) == LEXACT || OP(p) == LEXACT_REQ8)  \
                                     (((struct regnode_lstring *)p)->str_len))
-#define        STRINGl(p)      (__ASSERT_(OP(p) == LEXACT || OP(p) == LEXACT_ONLY8)  \
+#define        STRINGl(p)      (__ASSERT_(OP(p) == LEXACT || OP(p) == LEXACT_REQ8)  \
                                     (((struct regnode_lstring *)p)->string))
 #define        OPERANDl(p)     STRINGl(p)
 
-#define        STR_LEN(p)      ((OP(p) == LEXACT || OP(p) == LEXACT_ONLY8)           \
+#define        STR_LEN(p)      ((OP(p) == LEXACT || OP(p) == LEXACT_REQ8)           \
                                                ? STR_LENl(p) : STR_LENs(p))
-#define        STRING(p)       ((OP(p) == LEXACT || OP(p) == LEXACT_ONLY8)           \
+#define        STRING(p)       ((OP(p) == LEXACT || OP(p) == LEXACT_REQ8)           \
                                                ? STRINGl(p)  : STRINGs(p))
 #define        OPERAND(p)      STRING(p)
 
@@ -378,7 +378,7 @@ struct regnode_ssc {
 
 #define setSTR_LEN(p,v)                                                     \
     STMT_START{                                                             \
-        if (OP(p) == LEXACT || OP(p) == LEXACT_ONLY8)                       \
+        if (OP(p) == LEXACT || OP(p) == LEXACT_REQ8)                        \
             ((struct regnode_lstring *)(p))->str_len = (v);                 \
         else                                                                \
             ((struct regnode_string *)(p))->str_len = (v);                  \
index fd594df..306cbf0 100644 (file)
@@ -140,9 +140,9 @@ EXACTFLU8   EXACT,      str   ; Like EXACTFU, but use /il, UTF-8, (string is fol
 EXACTFAA_NO_TRIE  EXACT, str     ; Like EXACT, but match using /iaa rules (string not UTF-8, not guaranteed to be folded, not currently trie-able).
 
 
-EXACT_ONLY8 EXACT,      str       ; Like EXACT, but only UTF-8 encoded targets can match
-LEXACT_ONLY8 EXACT,  len:str 1    ; Like LEXACT, but only UTF-8 encoded targets can match
-EXACTFU_ONLY8 EXACT,    str       ; Like EXACTFU, but only UTF-8 encoded targets can match
+EXACT_REQ8   EXACT,      str      ; Like EXACT, but only UTF-8 encoded targets can match
+LEXACT_REQ8  EXACT,  len:str 1    ; Like LEXACT, but only UTF-8 encoded targets can match
+EXACTFU_REQ8 EXACT,    str        ; Like EXACTFU, but only UTF-8 encoded targets can match
 # One could add EXACTFAA8 and something that has the same effect for /l,
 # but these would be extremely uncommon
 
index c80a3fa..78781bd 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -2266,7 +2266,7 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
                                              | FOLDEQ_S2_FOLDS_SANE;
             goto do_exactf_utf8;
 
-    case EXACTFU_ONLY8:
+    case EXACTFU_REQ8:
         if (! utf8_target) {
             break;
         }
@@ -4238,8 +4238,8 @@ S_setup_EXACTISH_ST_c1_c2(pTHX_ const regnode * const text_node, int *c1p,
 
     if (   OP(text_node) == EXACT
         || OP(text_node) == LEXACT
-        || OP(text_node) == EXACT_ONLY8
-        || OP(text_node) == LEXACT_ONLY8
+        || OP(text_node) == EXACT_REQ8
+        || OP(text_node) == LEXACT_REQ8
         || OP(text_node) == EXACTL)
     {
 
@@ -4248,8 +4248,8 @@ S_setup_EXACTISH_ST_c1_c2(pTHX_ const regnode * const text_node, int *c1p,
          * copy the input to the output, avoiding finding the code point of
          * that character */
         if (!is_utf8_pat) {
-            assert(   OP(text_node) != EXACT_ONLY8
-                   && OP(text_node) != LEXACT_ONLY8);
+            assert(   OP(text_node) != EXACT_REQ8
+                   && OP(text_node) != LEXACT_REQ8);
             c2 = c1 = *pat;
         }
         else if (utf8_target) {
@@ -4257,8 +4257,8 @@ S_setup_EXACTISH_ST_c1_c2(pTHX_ const regnode * const text_node, int *c1p,
             Copy(pat, c2_utf8, UTF8SKIP(pat), U8);
             utf8_has_been_setup = TRUE;
         }
-        else if (   OP(text_node) == EXACT_ONLY8
-                 || OP(text_node) == LEXACT_ONLY8)
+        else if (   OP(text_node) == EXACT_REQ8
+                 || OP(text_node) == LEXACT_REQ8)
         {
             return FALSE;   /* Can only match UTF-8 target */
         }
@@ -4432,7 +4432,7 @@ S_setup_EXACTISH_ST_c1_c2(pTHX_ const regnode * const text_node, int *c1p,
                     case EXACTFU:
                         c2 = PL_fold_latin1[c1];
                         break;
-                    case EXACTFU_ONLY8:
+                    case EXACTFU_REQ8:
                         return FALSE;
                         NOT_REACHED; /* NOTREACHED */
 
@@ -6279,7 +6279,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
         }
 #undef  ST
 
-       case LEXACT_ONLY8:
+       case LEXACT_REQ8:
             if (! utf8_target) {
                 sayNO;
             }
@@ -6306,7 +6306,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
                 _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(locinput, reginfo->strend);
             }
             goto do_exact;
-       case EXACT_ONLY8:
+       case EXACT_REQ8:
             if (! utf8_target) {
                 sayNO;
             }
@@ -6420,7 +6420,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
            fold_array = PL_fold_latin1;
            goto do_exactf;
 
-        case EXACTFU_ONLY8:      /* /abc/iu with something in /abc/ > 255 */
+        case EXACTFU_REQ8:      /* /abc/iu with something in /abc/ > 255 */
             if (! utf8_target) {
                 sayNO;
             }
@@ -9387,7 +9387,7 @@ S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p,
            scan = this_eol;
        break;
 
-    case LEXACT_ONLY8:
+    case LEXACT_REQ8:
         if (! utf8_target) {
             break;
         }
@@ -9409,7 +9409,7 @@ S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p,
         }
         goto do_exact;
 
-    case EXACT_ONLY8:
+    case EXACT_REQ8:
         if (! utf8_target) {
             break;
         }
@@ -9512,7 +9512,7 @@ S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p,
                                     | FOLDEQ_S2_FOLDS_SANE;
         goto do_exactf;
 
-    case EXACTFU_ONLY8:
+    case EXACTFU_REQ8:
         if (! utf8_target) {
             break;
         }
index 4174ad2..cab219b 100644 (file)
@@ -58,9 +58,9 @@
 #define        EXACTFUP                44      /* 0x2c Like EXACT, but match using /iu rules; (string not UTF-8, not guaranteed to be folded; and it is Problematic). */
 #define        EXACTFLU8               45      /* 0x2d Like EXACTFU, but use /il, UTF-8, (string is folded, and everything in it is above 255. */
 #define        EXACTFAA_NO_TRIE        46      /* 0x2e Like EXACT, but match using /iaa rules (string not UTF-8, not guaranteed to be folded, not currently trie-able). */
-#define        EXACT_ONLY8             47      /* 0x2f Like EXACT, but only UTF-8 encoded targets can match */
-#define        LEXACT_ONLY8            48      /* 0x30 Like LEXACT, but only UTF-8 encoded targets can match */
-#define        EXACTFU_ONLY8           49      /* 0x31 Like EXACTFU, but only UTF-8 encoded targets can match */
+#define        EXACT_REQ8              47      /* 0x2f Like EXACT, but only UTF-8 encoded targets can match */
+#define        LEXACT_REQ8             48      /* 0x30 Like LEXACT, but only UTF-8 encoded targets can match */
+#define        EXACTFU_REQ8            49      /* 0x31 Like EXACTFU, but only UTF-8 encoded targets can match */
 #define        EXACTFU_S_EDGE          50      /* 0x32 /di rules, but nothing in it precludes /ui, except begins and/or ends with [Ss]; (string not UTF-8; compile-time only). */
 #define        NOTHING                 51      /* 0x33 Match empty string. */
 #define        TAIL                    52      /* 0x34 Match empty string. Can jump here from outside. */
@@ -212,9 +212,9 @@ EXTCONST U8 PL_regkind[] = {
        EXACT,          /* EXACTFUP               */
        EXACT,          /* EXACTFLU8              */
        EXACT,          /* EXACTFAA_NO_TRIE       */
-       EXACT,          /* EXACT_ONLY8            */
-       EXACT,          /* LEXACT_ONLY8           */
-       EXACT,          /* EXACTFU_ONLY8          */
+       EXACT,          /* EXACT_REQ8             */
+       EXACT,          /* LEXACT_REQ8            */
+       EXACT,          /* EXACTFU_REQ8           */
        EXACT,          /* EXACTFU_S_EDGE         */
        NOTHING,        /* NOTHING                */
        NOTHING,        /* TAIL                   */
@@ -367,9 +367,9 @@ static const U8 regarglen[] = {
        0,                                      /* EXACTFUP     */
        0,                                      /* EXACTFLU8    */
        0,                                      /* EXACTFAA_NO_TRIE */
-       0,                                      /* EXACT_ONLY8  */
-       EXTRA_SIZE(struct regnode_1),           /* LEXACT_ONLY8 */
-       0,                                      /* EXACTFU_ONLY8 */
+       0,                                      /* EXACT_REQ8   */
+       EXTRA_SIZE(struct regnode_1),           /* LEXACT_REQ8  */
+       0,                                      /* EXACTFU_REQ8 */
        0,                                      /* EXACTFU_S_EDGE */
        0,                                      /* NOTHING      */
        0,                                      /* TAIL         */
@@ -478,9 +478,9 @@ static const char reg_off_by_arg[] = {
        0,      /* EXACTFUP     */
        0,      /* EXACTFLU8    */
        0,      /* EXACTFAA_NO_TRIE */
-       0,      /* EXACT_ONLY8  */
-       0,      /* LEXACT_ONLY8 */
-       0,      /* EXACTFU_ONLY8 */
+       0,      /* EXACT_REQ8   */
+       0,      /* LEXACT_REQ8  */
+       0,      /* EXACTFU_REQ8 */
        0,      /* EXACTFU_S_EDGE */
        0,      /* NOTHING      */
        0,      /* TAIL         */
@@ -595,9 +595,9 @@ EXTCONST char * const PL_reg_name[] = {
        "EXACTFUP",                     /* 0x2c */
        "EXACTFLU8",                    /* 0x2d */
        "EXACTFAA_NO_TRIE",             /* 0x2e */
-       "EXACT_ONLY8",                  /* 0x2f */
-       "LEXACT_ONLY8",                 /* 0x30 */
-       "EXACTFU_ONLY8",                /* 0x31 */
+       "EXACT_REQ8",                   /* 0x2f */
+       "LEXACT_REQ8",                  /* 0x30 */
+       "EXACTFU_REQ8",                 /* 0x31 */
        "EXACTFU_S_EDGE",               /* 0x32 */
        "NOTHING",                      /* 0x33 */
        "TAIL",                         /* 0x34 */
index eee7467..a43cbae 100644 (file)
@@ -710,13 +710,13 @@ my @tests = (
     '[{INFTY_minus_1}]' => 'ANYOFH[INFTY_minus_1]',
     '[{INFTY}]' => 'ANYOFH[INFTY-INFTY]',
 
-    '(?8)(?i)[\x{100}]' => 'EXACTFU_ONLY8 <\x{101}>',
-    '(?8)(?i)[\x{399}]' => 'EXACTFU_ONLY8 <\x{3b9}>',
-    '(?8)(?i)[\x{345}\x{399}\x{3B9}\x{1FBE}]' => 'EXACTFU_ONLY8 <\x{3b9}>',
+    '(?8)(?i)[\x{100}]' => 'EXACTFU_REQ8 <\x{101}>',
+    '(?8)(?i)[\x{399}]' => 'EXACTFU_REQ8 <\x{3b9}>',
+    '(?8)(?i)[\x{345}\x{399}\x{3B9}\x{1FBE}]' => 'EXACTFU_REQ8 <\x{3b9}>',
     '(?i)[\x{2b9}]' => 'ANYOFHb[02B9]',           # Doesn't participate in a fold
-    '(?8)(?i)[\x{2b9}]' => 'EXACT_ONLY8 <\x{2b9}>',
-    '(?i)[\x{2bc}]' => 'EXACTFU_ONLY8 <\x{2bc}>', # Part of a multi-char fold, ASCII component
-    '(?i)[\x{390}]' => 'EXACTFU_ONLY8 <\x{3b9}\x{308}\x{301}>', # Part of a multi-char fold, no ASCII component
+    '(?8)(?i)[\x{2b9}]' => 'EXACT_REQ8 <\x{2b9}>',
+    '(?i)[\x{2bc}]' => 'EXACTFU_REQ8 <\x{2bc}>', # Part of a multi-char fold, ASCII component
+    '(?i)[\x{390}]' => 'EXACTFU_REQ8 <\x{3b9}\x{308}\x{301}>', # Part of a multi-char fold, no ASCII component
 
     '(?i)[\x{1E9E}]' => 'EXACTFU <ss>',
     '(?iaa)[\x{1E9E}]' => 'EXACTFAA <\x{17f}\x{17f}>',
@@ -731,11 +731,11 @@ my @tests = (
     '(?i)[\x{FB06}]' => 'EXACTFU <st>',
 
     '[a][b]' => 'EXACT <ab>',
-    '[a]\x{100}' => 'EXACT_ONLY8 <a\x{100}>',
-    '(?8)[\x{100}]a' => 'EXACT_ONLY8 <\x{100}a>',
+    '[a]\x{100}' => 'EXACT_REQ8 <a\x{100}>',
+    '(?8)[\x{100}]a' => 'EXACT_REQ8 <\x{100}a>',
     '(?i)[b][c]' => 'EXACTFU <bc>',
-    '(?i)[b]\x{100}' => 'EXACTFU_ONLY8 <b\x{101}>',
-    '(?8)(?i)[\x{100}]b' => 'EXACTFU_ONLY8 <\x{101}b>',
+    '(?i)[b]\x{100}' => 'EXACTFU_REQ8 <b\x{101}>',
+    '(?8)(?i)[\x{100}]b' => 'EXACTFU_REQ8 <\x{101}b>',
     '(?i)b[s]' => 'EXACTFU <bs>',
     '(?i)b[s]c' => 'EXACTFU <bsc>',
     '(?i)bs[s]c' => 'EXACTF <bss>',  # The c goes into a 2nd node
index 1ea1136..d31e5c0 100644 (file)
@@ -1500,9 +1500,9 @@ EOP
             fail($pattern);
             fresh_perl($pattern, { stderr => 0, verbose => 1 });
         }
-        like($result, qr/Final program[^X]*\bLEXACT_ONLY8\b[^X]*\bLEXACT\b[^X]*\bEXACT\b[^X]*\bEND\b/s,
+        like($result, qr/Final program[^X]*\bLEXACT_REQ8\b[^X]*\bLEXACT\b[^X]*\bEXACT\b[^X]*\bEND\b/s,
              "Check that an LEXACT_ONLY node is generated with a \\x{100}");
-        like($s, qr/$s/, "Check that LEXACT_ONLY8 nodes match");
+        like($s, qr/$s/, "Check that LEXACT_REQ8 nodes match");
     }
 
     {