diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-07-31 22:16:34 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-08-11 10:23:35 +0200 |
commit | 5b126c844328624724495878ae8a120ab1a2e906 (patch) | |
tree | cf924ad9e42ec779e8445914b914391c79e581f8 /regexp.h | |
parent | c18d5d15604b0d942b838c422e15b2518f56c77b (diff) | |
download | perl-5b126c844328624724495878ae8a120ab1a2e906.tar.gz |
op_reg_common.h: Continue refactoring
The new op_reg_common.h did not have in it all the things that made
sense for it to have, including some comment changes that I should have
made when I created it.
I also realized the the new mechanism of using shifts allowed
RXf_PMf_STD_PMMOD_SHIFT to actually control things, rather than be a
#define that one had to remember to change if those things changed
independently.
Finally, I created a check so that adding bits without adding them to
RXf_PMf_COMPILETIME will force a compilation error. (This came from the
school of hard knocks)
Diffstat (limited to 'regexp.h')
-rw-r--r-- | regexp.h | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -8,8 +8,6 @@ * */ -#include "op_reg_common.h" - /* * Definitions etc. for regexp(3) routines. * @@ -220,25 +218,17 @@ and check for NULL. /* Flags stored in regexp->extflags * These are used by code external to the regexp engine * - * Note that flags starting with RXf_PMf_ have exact equivalents - * stored in op_pmflags and which are defined in op.h, they are defined - * numerically here only for clarity. + * Note that the flags whose names start with RXf_PMf_ are defined in + * op_reg_common.h, being copied from the parallel flags of op_pmflags * * NOTE: if you modify any RXf flags you should run regen.pl or regcomp.pl * so that regnodes.h is updated with the changes. * */ -/* 0x3F of extflags is used by (RXf_)PMf_COMPILETIME - * If you change these you need to change the equivalent flags in op.h, and - * vice versa. These need to be ordered so that the msix are contiguous - * starting at bit 0, followed by the p; bit 0 is because of the shift below - * being 0; see STD_PAT_MODS and INT_PAT_MODS below for the contiguity cause */ -/* the flags above are transfered from the PMOP->op_pmflags member during - * compilation */ -#define RXf_PMf_STD_PMMOD_SHIFT 0 +#include "op_reg_common.h" + #define RXf_PMf_STD_PMMOD (RXf_PMf_MULTILINE|RXf_PMf_SINGLELINE|RXf_PMf_FOLD|RXf_PMf_EXTENDED) -#define RXf_PMf_COMPILETIME (RXf_PMf_MULTILINE|RXf_PMf_SINGLELINE|RXf_PMf_LOCALE|RXf_PMf_FOLD|RXf_PMf_EXTENDED|RXf_PMf_KEEPCOPY) #define CASE_STD_PMMOD_FLAGS_PARSE_SET(pmfl) \ case IGNORE_PAT_MOD: *(pmfl) |= RXf_PMf_FOLD; break; \ |