summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-02-09 10:37:17 -0700
committerKarl Williamson <public@khwilliamson.com>2011-02-14 08:41:37 -0700
commit7e2509c1602d8aa746e63f571f9b46e8b2dca105 (patch)
treef07233dd567b8fccbe234afaf42b4fc00208ad0a
parentb1e3e569b09fd7f24fa3e311cdf8e3d3d8ca931a (diff)
downloadperl-7e2509c1602d8aa746e63f571f9b46e8b2dca105.tar.gz
regex: Add comments
-rw-r--r--regcomp.c6
-rw-r--r--regexec.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/regcomp.c b/regcomp.c
index b98f72f300..5fdd6e0abb 100644
--- 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);
diff --git a/regexec.c b/regexec.c
index 58fc358ab8..0864a45cf4 100644
--- 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)))