summaryrefslogtreecommitdiff
path: root/regcomp.sym
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2014-01-29 20:42:33 -0700
committerKarl Williamson <public@khwilliamson.com>2014-02-15 21:55:32 -0700
commit34fdef848b1687b91892ba55e9e0c3430e0770f6 (patch)
tree0c42f2e84076a6040b8b29fe47ad88c92228640b /regcomp.sym
parent56feebade29d8842a38364ccb13c5ff09284d0d7 (diff)
downloadperl-34fdef848b1687b91892ba55e9e0c3430e0770f6.tar.gz
Free up bit for regex ANYOF nodes
This commit frees up a bit by using an extra regnode to pass the information to the regex engine instead of the flag. I originally thought that if this was needed, it should be the ANYOF_ABOVE_LATIN1_ALL bit, as that might speed some things up. But if we need to do this again by adding another node to get another bit, we want one that is mutually exclusive of the first one we did, For otherwise we start having to make 3 nodes instead of two to get the combinations: 1 0 0 1 1 1 This combinatorial problem is avoided by using bits that are mutually exclusive, which the ABOVE_LATIN1_ALL isn't, but the one freed by this commit ANYOF_NON_UTF8_NON_ASCII_ALL is only set under /d matching, and there are other bits that are set only under /l, so if we need to do this again, we should use one of those. I wrote this code when I thought I really needed a bit. But since, I have figured out a better way to get the bit needed now. But I don't want to lose this code to posterity, so this commit is being made long enough to get the commit number, then it will be reverted, adding comments referring to the commit number, so that it can easily be reconstructed when necessary.
Diffstat (limited to 'regcomp.sym')
-rw-r--r--regcomp.sym1
1 files changed, 1 insertions, 0 deletions
diff --git a/regcomp.sym b/regcomp.sym
index a1981862cc..4764d0e138 100644
--- a/regcomp.sym
+++ b/regcomp.sym
@@ -55,6 +55,7 @@ REG_ANY REG_ANY, no 0 S ; Match any one character (except newline).
SANY REG_ANY, no 0 S ; Match any one character.
CANY REG_ANY, no 0 S ; Match any one byte.
ANYOF ANYOF, sv 0 S ; Match character in (or not in) this class, single char match only
+ANYOF_NON_UTF8_NON_ASCII_ALL ANYOF, sv 0 S ; like ANYOF, also matches any U+80 - U+FF when not in UTF-8
# Order of the below is important. See ordering comment above.
POSIXD POSIXD, none 0 S ; Some [[:class:]] under /d; the FLAGS field gives which one