diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-04 17:50:51 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-04 17:50:51 +0000 |
commit | 6d5c990f28c2a18264defef032a496e2e3dfb7cd (patch) | |
tree | 23cbcbd365bbc2e293a764976cdc9f1d9ec506af /regcomp.h | |
parent | 3c6f95d1b67124c82147911f846eb1993443a39a (diff) | |
download | perl-6d5c990f28c2a18264defef032a496e2e3dfb7cd.tar.gz |
Better version of last patch, by Yves Orton.
Actually the regexp engine structure only needs
one compilation function hook.
p4raw-id: //depot/perl@29459
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -92,6 +92,23 @@ typedef OP OP_4tree; /* Will be redefined later. */ * special test to reverse the sign of BACK pointers since the offset is * stored negative.] */ +typedef struct regexp_internal { + regexp_paren_ofs *swap; /* Swap copy of *startp / *endp */ + U32 *offsets; /* offset annotations 20001228 MJD + data about mapping the program to the + string*/ + regnode *regstclass; /* Optional startclass as identified or constructed + by the optimiser */ + struct reg_data *data; /* Additional miscellaneous data used by the program. + Used to make it easier to clone and free arbitrary + data that the regops need. Often the ARG field of + a regop is an index into this structure */ + regnode program[1]; /* Unwarranted chumminess with compiler. */ +} regexp_internal; + +#define RXi_SET(x,y) (x)->pprivate = (void*)(y) +#define RXi_GET(x) ((regexp_internal *)((x)->pprivate)) +#define RXi_GET_DECL(r,ri) regexp_internal *ri = RXi_GET(r) struct regnode_string { U8 str_len; @@ -404,7 +421,6 @@ EXTCONST U8 PL_simple[] = { EXTCONST regexp_engine PL_core_reg_engine; #else /* DOINIT */ EXTCONST regexp_engine PL_core_reg_engine = { - Perl_pregcomp, Perl_re_compile, Perl_regexec_flags, Perl_re_intuit_start, |