summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorYves Orton <yves.orton@booking.com>2014-02-02 23:37:37 +0800
committerYves Orton <yves.orton@booking.com>2014-02-03 22:44:29 +0800
commitee273784a82417ff7a4ec06716556fb7fb705427 (patch)
tree8f471a22d18b3b440cc87d95c8910ec01fe07b28 /regexp.h
parentf25474b0531878b277e2bd50a823ced1a3df6000 (diff)
downloadperl-ee273784a82417ff7a4ec06716556fb7fb705427.tar.gz
Add RXf_UNBOUNDED_QUANTIFIER and regexp->maxlen
The flag tells us that a pattern may match an infinitely long string. The new member in the regexp struct tells us how long the string might be. With these two items we can implement regexp based $/
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/regexp.h b/regexp.h
index a26c4f24f5..45ba87a1be 100644
--- a/regexp.h
+++ b/regexp.h
@@ -128,6 +128,7 @@ struct reg_code_block {
SSize_t suboffset; /* byte offset of subbeg from logical start of str */ \
SSize_t subcoffset; /* suboffset equiv, but in chars (for @-/@+) */ \
/* Information about the match that isn't often used */ \
+ SSize_t maxlen; /* mininum possible number of chars in string to match */\
/* offset from wrapped to the start of precomp */ \
PERL_BITFIELD32 pre_prefix:4; \
/* original flags used to compile the pattern, may differ */ \
@@ -398,7 +399,7 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp)
#define RXf_UNUSED8 (1<<(RXf_BASE_SHIFT+8))
/* Special */
-#define RXf_UNUSED9 (1<<(RXf_BASE_SHIFT+9))
+#define RXf_UNBOUNDED_QUANTIFIER_SEEN (1<<(RXf_BASE_SHIFT+9))
#define RXf_CHECK_ALL (1<<(RXf_BASE_SHIFT+10))
/* UTF8 related */