diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-08-01 14:49:29 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-09-24 11:36:12 -0600 |
commit | b8f7bb16f63b8e72236f34002e68da18767fe62c (patch) | |
tree | 84cc35a7420bede3975683d8daa32b64e631e686 /regcomp.h | |
parent | de92f5e66ec16fd0d9068f362c5ffccd9a5b6135 (diff) | |
download | perl-b8f7bb16f63b8e72236f34002e68da18767fe62c.tar.gz |
Add regnode struct for synthetic start class
As part of extending the regular expression optimizer to properly handle
above Latin1 code points, I need an inversion list to contain which code
points the synthetic start class (ssc) matches.
The ssc currently is the same as a locale-aware ANYOF node, which uses
the struct of a regular ANYOF node, plus some extra fields at the end.
This commit creates a new typedef for ssc use, which is the locale-aware
ANYOF node, plus an extra SV* at the end to hold the inversion list.
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -191,6 +191,17 @@ struct regnode_charclass_class { U32 classflags; /* and run-time */ }; +/* Synthetic start class, is a regnode_charclass_class plus an SV* */ +struct regnode_ssc { + U8 flags; /* ANYOF_CLASS bit must go here */ + U8 type; + U16 next_off; + U32 arg1; /* used as ptr in S_regclass */ + char bitmap[ANYOF_BITMAP_SIZE]; /* both compile-time */ + U32 classflags; /* and run-time */ + SV* invlist; /* list of code points matched */ +}; + /* XXX fix this description. Impose a limit of REG_INFTY on various pattern matching operations to limit stack growth and to avoid "infinite" recursions. |