diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-12-27 13:49:30 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-12-28 10:38:56 -0700 |
commit | 9aa1e39f96ac28f6ce5d814d9a1eccf1464aba4a (patch) | |
tree | 559ccdb8f8d11e9371f922df76b4b826fefc6105 /regcomp.h | |
parent | acf6704793b7522fa171752fe2c38ef25ab7c2c1 (diff) | |
download | perl-9aa1e39f96ac28f6ce5d814d9a1eccf1464aba4a.tar.gz |
Add new regnode for synthetic start class
This creates a regnode specifically for the synthetic start class, which
is a type of ANYOF node. The flag bit previously used to denote this is
removed. This paves the way for this bit to be freed up, but first the
other use of this bit must also be removed, which will be done in the
next commit.
There are now three ANYOF-type regnodes. This one should be called only
in one place in regexec.c. The other special one is ANYOF_WARN_SUPER.
A synthetic start class node should not do any warning, so there is no
issue of having something need to be both types.
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -319,8 +319,7 @@ struct regnode_charclass_class { * to match everything above. If flags need to be added that are applicable to * the synthetic start class only, with some work, they could be put in the * next-node field, or in an unused bit of the classflags field. This could be - * done with the current EOS flag, and a new node type created that is just for - * the ssc, freeing up that bit */ + * done with the current EOS flag, freeing up that bit */ #define ANYOF_LOCALE 0x01 /* /l modifier */ @@ -344,15 +343,6 @@ struct regnode_charclass_class { * synthetic start class only. */ #define ANYOF_EOS 0x10 -/* ? Is this node the synthetic start class (ssc). This bit is shared with - * ANYOF_EOS, as the latter is used only for the ssc, and then not used by - * regexec.c. And, the code is structured so that if it is set, the ssc is - * not used, so it is guaranteed to be 0 for the ssc by the time regexec.c - * gets executed, and 0 for a non-ssc ANYOF node, as it only ever gets set for - * a potential ssc candidate. Thus setting it to 1 after it has been - * determined that the ssc will be used is not ambiguous */ -#define ANYOF_IS_SYNTHETIC ANYOF_EOS - /* Can match something outside the bitmap that isn't in utf8 */ #define ANYOF_NONBITMAP_NON_UTF8 0x20 |