summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-03-19 18:05:24 +0000
committerDavid Mitchell <davem@iabyn.com>2014-03-19 18:25:55 +0000
commit9fc7410eed533bed6f3760ecea84b34a7ae4c33b (patch)
tree4ea26d16b78583cf514a47997eb34ed2da779ca7 /regexec.c
parent6e88169dce11675b992a0c387588bd5a90a69a72 (diff)
downloadperl-9fc7410eed533bed6f3760ecea84b34a7ae4c33b.tar.gz
re_intuit_start(): move comments abut IMPLICIT
After the previous reworking of the PREGf_IMPLICIT tests, move commentary about PREGf_IMPLICIT closer to where its now relevant.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/regexec.c b/regexec.c
index ab7782357e..f291be0ad9 100644
--- a/regexec.c
+++ b/regexec.c
@@ -752,7 +752,15 @@ Perl_re_intuit_start(pTHX_
});
if (prog->intflags & PREGf_ANCH) { /* Match at \G, beg-of-str or after \n */
- /* Check after \n? */
+
+ /* ml_anch: check after \n?
+ *
+ * A note about IMPLICIT: on an un-anchored pattern beginning
+ * with /.*.../, these flags will have been added by the
+ * compiler:
+ * /.*abc/, /.*abc/m: PREGf_IMPLICIT | PREGf_ANCH_MBOL
+ * /.*abc/s: PREGf_IMPLICIT | PREGf_ANCH_SBOL
+ */
ml_anch = (prog->intflags & PREGf_ANCH_MBOL)
&& !(prog->intflags & PREGf_IMPLICIT);
@@ -766,14 +774,6 @@ Perl_re_intuit_start(pTHX_
* based on pos() and gofs, so the string is already correctly
* anchored by definition; and handling the exceptions would
* be too fiddly (e.g. REXEC_IGNOREPOS).
- *
- * A note about IMPLICIT: on an un-anchored pattern beginning
- * with /.*.../, these flags will have been added by the
- * compiler:
- * /.*abc/, /.*abc/m: PREGf_IMPLICIT | PREGf_ANCH_MBOL
- * /.*abc/s: PREGf_IMPLICIT | PREGf_ANCH_SBOL
- * so just the presence of SBOL isn't enough to guarantee
- * that we're anchored.
*/
if ( strpos != strbeg
&& (prog->intflags & (PREGf_ANCH_BOL|PREGf_ANCH_SBOL)))