summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-01-10 17:06:04 -0700
committerKarl Williamson <public@khwilliamson.com>2013-01-11 11:50:38 -0700
commit9d1a5160ac870eccea399973eaa9f9e3020b0833 (patch)
tree9d08b87e7c229f41ee345da68b7de257a585a21b /embed.fnc
parentab6629666cee2471e467421195a7a99662521188 (diff)
downloadperl-9d1a5160ac870eccea399973eaa9f9e3020b0833.tar.gz
New regex experimental feature: (?[ ])
This is a fancier [bracketed] character class which allows set operations, such as intersection and subtraction. The entry in perlre for this commit details its operation. Besides extending regular expressions to handle this functionality, recommended by Unicode, the intent here is to do three things: 1) Intersection has been simulated by regexes using zero-width look-around assertions, which are non-obvious. This allows replacing those with a more powerful and clearer syntax; the compiled regexes are smaller and faster. Everything is known at compile time. 2) Set operations have also been simulated by using user-defined Unicode properties. These are globals, have security implications, restricted names, and d don't allow as complex expressions as this new feature. 3) I hope that this feature will come to be viewed as a "better" bracketed character class. I took advantage of the fact that there is no embedded base to have to be compatibile with to forbid certain iffy practices with the existing ones, while remaining mostly backwards compatible. The main difference is that /x is always enabled, so white space can be pretty much freely used with these, but to specify a match on white space, it must be escaped. Things that should have been illegal are, such as \x{}, and \x{abcdefghi}. Things that look like a posix specifier but don't quite meet the rules now give an error instead of silently compiling. e.g., [:digit] is an error instead of the union of the characters that compose it. I may have omitted things; perhaps it should be an error to have the same letter occur twice, adjacent. Since this is experimental, we can make such changes based on field feed back. The intent is to keep this feature, since it is strongly recommended by Unicode. The exact syntax is subject to change, so is experimental.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc4
1 files changed, 4 insertions, 0 deletions
diff --git a/embed.fnc b/embed.fnc
index 2972b6d359..5cff051878 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1964,6 +1964,10 @@ Es |regnode*|regclass |NN struct RExC_state_t *pRExC_state \
|bool allow_multi_fold \
|const bool silence_non_portable \
|NULLOK SV** ret_invlist
+Es |bool|could_it_be_POSIX |NN struct RExC_state_t *pRExC_state
+Es |regnode*|handle_sets |NN struct RExC_state_t *pRExC_state \
+ |NN I32 *flagp|U32 depth \
+ |NN char * const oregcomp_parse
Es |regnode*|reg_node |NN struct RExC_state_t *pRExC_state|U8 op
Es |UV |reg_recode |const char value|NN SV **encp
Es |regnode*|regpiece |NN struct RExC_state_t *pRExC_state \