diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-11-25 19:40:12 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-12-31 08:27:20 -0700 |
commit | ae98608918f0b92985b47a5ac2987ebd9797be4c (patch) | |
tree | 040697220e48491e0e5999b96116a2c0b69a0e40 /regcomp.sym | |
parent | eff8b7dc9a14f3aa38ddb85d01d614da4c6d8957 (diff) | |
download | perl-ae98608918f0b92985b47a5ac2987ebd9797be4c.tar.gz |
Convert regnode to a flag for [...]
Prior to this commit, there were 3 types of ANYOF nodes; now there are
two: regular, and one for the synthetic start class (ssc). This commit
converted the third type dealing with warning about matching \p{}
against non-Unicode code points, into using the spare flag bit for ANYOF
nodes.
This allows this bit to apply to ssc ANYOF nodes, whereas previously it
couldn't. There is a bug in which the warning isn't raised if the match
is rejected by the optimizer, because of this inability. This bug will
be fixed in a later commit.
Another option would have been to create a new node-type which was an
ANYOF_SSC_WARN_SUPER node. But this adds extra complications to things;
and we have a spare bit that we might as well use. The comments give
better possibilities for freeing up 2 bits should they be needed.
Diffstat (limited to 'regcomp.sym')
-rw-r--r-- | regcomp.sym | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/regcomp.sym b/regcomp.sym index 7d3cdc0a02..09962ddc71 100644 --- a/regcomp.sym +++ b/regcomp.sym @@ -55,7 +55,6 @@ 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_WARN_SUPER ANYOF, sv 0 S ; Match character in (or not in) this class, warn (if enabled) upon matching a char above Unicode max; ANYOF_SYNTHETIC ANYOF, sv 0 S ; Synthetic start class # Order of the below is important. See ordering comment above. |