summaryrefslogtreecommitdiff
path: root/uni_keywords.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-02-15 17:39:00 -0700
committerKarl Williamson <khw@cpan.org>2020-02-19 22:09:48 -0700
commit4829f32decd128e6a122bd8ce35fe944bd87f104 (patch)
treeb75fb15b5cc5c3321468801f5a12d212ab6f36de /uni_keywords.h
parent809471154ccc09f339d9a2841b7c32c4aa9c40a2 (diff)
downloadperl-4829f32decd128e6a122bd8ce35fe944bd87f104.tar.gz
Restrict features in wildcards
The algorithm for dealing with Unicode property wildcards is to wrap the user-supplied pattern with /miaa. We don't want the user to be able to override the /m and /aa parts. Modifiers that are only specifiable as a modifier in a qr or similar op (like /gc) can't be included in things like (?gc). These normally incur a warning that they are ignored, but the texts of those warnings are misleading when using wildcards, so I chose to just make them illegal. Of course that could be changed to having custom useful warning texts, but I didn't think it was worth it. I also chose to forbid recursion of using nested \p{}, just from fear that it might lead to issues down the road, and it really isn't useful for this limited universe of strings to match against. Because wildcards currently can't handle '}' inside them, only the single letter \p,\P are valid anyway. Similarly, I forbid the '*' quantifier to make it harder for the constructed subpattern to take forever to make any progress and decide to halt. Again, using it would be overkill on the universe of possible match strings.
Diffstat (limited to 'uni_keywords.h')
-rw-r--r--uni_keywords.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/uni_keywords.h b/uni_keywords.h
index 9359e101e0..8dbf316c6b 100644
--- a/uni_keywords.h
+++ b/uni_keywords.h
@@ -7540,7 +7540,7 @@ MPH_VALt match_uniprop( const unsigned char * const key, const U16 key_len ) {
* baba9dfc133e3cb770a89aaf0973b1341fa61c2da6c176baf6428898b3b568d8 lib/unicore/extracted/DLineBreak.txt
* 6d4a8c945dd7db83ed617cbb7d937de7f4ecf016ff22970d846e996a7c9a2a5d lib/unicore/extracted/DNumType.txt
* 5b7c14380d5cceeaffcfbc18db1ed936391d2af2d51f5a41f1a17b692c77e59b lib/unicore/extracted/DNumValues.txt
- * 93f508a690aa8949f213d50b573710f0b4a4e843c17283938035ecf19e0220e2 lib/unicore/mktables
+ * a3f3caba903e4d39b6c7aaa7ea4d3a739e745b010ad51cf0e05f34ffa0ac2c04 lib/unicore/mktables
* 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
* 2680b9254eb236c5c090f11b149605043e8c8433661b96efc4a42fb4709342a5 regen/charset_translations.pl
* 6bbad21de0848e0236b02f34f5fa0edd3cdae9ba8173cc9469a5513936b9e728 regen/mk_PL_charclass.pl