summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2014-09-17 00:23:01 +0200
committerYves Orton <demerphq@gmail.com>2014-09-17 04:47:34 +0200
commitd3d47aac53402ea3d4836c60e3659dc927a9887c (patch)
tree90ce6aa3a324b6c2cf4c6b17b2b69f91c4239a7c /dump.c
parente1919fe5716d96be44afc32406d9504bc70403de (diff)
downloadperl-d3d47aac53402ea3d4836c60e3659dc927a9887c.tar.gz
Eliminate the duplicative regops BOL and EOL
See also perl5porters thread titled: "Perl MBOLism in regex engine" In the perl 5.000 release (a0d0e21ea6ea90a22318550944fe6cb09ae10cda) the BOL regop was split into two behaviours MBOL and SBOL, with SBOL and BOL behaving identically. Similarly the EOL regop was split into two behaviors SEOL and MEOL, with EOL and SEOL behaving identically. This then resulted in various duplicative code related to flags and case statements in various parts of the regex engine. It appears that perhaps BOL and EOL were kept because they are the type ("regkind") for SBOL/MBOL and SEOL/MEOL/EOS. Reworking regcomp.pl to handle aliases for the type data so that SBOL/MBOL are of type BOL, even though BOL == SBOL seems to cover that case without adding to the confusion. This means two regops, a regstate, and an internal regex flag can be removed (and used for other things), and various logic relating to them can be removed. For the uninitiated, SBOL is /^/ and /\A/ (with or without /m) and MBOL is /^/m. (I consider it a fail we have no way to say MBOL without the /m modifier). Similarly SEOL is /$/ and MEOL is /$/m (there is also a /\z/ which is EOS "end of string" with or without the /m).
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/dump.c b/dump.c
index bc455f43f3..924fed0206 100644
--- a/dump.c
+++ b/dump.c
@@ -1397,7 +1397,6 @@ const struct flag_to_name regexp_core_intflags_names[] = {
{PREGf_CANY_SEEN, "CANY_SEEN,"},
{PREGf_GPOS_SEEN, "GPOS_SEEN,"},
{PREGf_GPOS_FLOAT, "GPOS_FLOAT,"},
- {PREGf_ANCH_BOL, "ANCH_BOL,"},
{PREGf_ANCH_MBOL, "ANCH_MBOL,"},
{PREGf_ANCH_SBOL, "ANCH_SBOL,"},
{PREGf_ANCH_GPOS, "ANCH_GPOS,"},