This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regex: Add comments
authorKarl Williamson <public@khwilliamson.com>
Wed, 9 Feb 2011 17:37:17 +0000 (10:37 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 14 Feb 2011 15:41:37 +0000 (08:41 -0700)
regcomp.c
regexec.c

index b98f72f..5fdd6e0 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -8611,7 +8611,8 @@ tryagain:
                    else
                        ender = *p++;
                    break;
-               }
+               } /* End of switch on the literal */
+
                if ( RExC_flags & RXf_PMf_EXTENDED)
                    p = regwhite( pRExC_state, p );
                if (UTF && FOLD) {
@@ -8691,7 +8692,8 @@ tryagain:
                else
                    REGC((char)ender, s++);
            }
-       loopdone:
+       loopdone:   /* Jumped to when encounters something that shouldn't be in
+                      the node */
            RExC_parse = p - 1;
             Set_Node_Cur_Length(ret); /* MJD */
            nextchar(pRExC_state);
index 58fc358..0864a45 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -94,9 +94,9 @@
 #define        STATIC  static
 #endif
 
-/* Valid for non-utf8 strings only: avoids the reginclass call if there are no
- * complications: i.e., if everything matchable is straight forward in the
- * bitmap */
+/* Valid for non-utf8 strings, non-ANYOFV nodes only: avoids the reginclass
+ * call if there are no complications: i.e., if everything matchable is
+ * straight forward in the bitmap */
 #define REGINCLASS(prog,p,c)  (ANYOF_FLAGS(p) ? reginclass(prog,p,c,0,0)   \
                                              : ANYOF_BITMAP_TEST(p,*(c)))