diff options
author | Yves Orton <demerphq@gmail.com> | 2006-11-15 13:29:39 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-15 12:41:24 +0000 |
commit | c74340f9cdee6010339b6bfd0e8b0dc8bc875344 (patch) | |
tree | 461d7dee65931c649dec8616b2a6547652ba3777 /pod/perlreguts.pod | |
parent | f81333e0586497e8dadbe01b840e0be9ee8313ee (diff) | |
download | perl-c74340f9cdee6010339b6bfd0e8b0dc8bc875344.tar.gz |
Re: [PATCH] Fix RT#19049 and add relative backreferences
Message-ID: <9b18b3110611150329l206e4552w887ae5f0a3f7ca80@mail.gmail.com>
p4raw-id: //depot/perl@29279
Diffstat (limited to 'pod/perlreguts.pod')
-rw-r--r-- | pod/perlreguts.pod | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pod/perlreguts.pod b/pod/perlreguts.pod index 937565745c..aa54bfcb8f 100644 --- a/pod/perlreguts.pod +++ b/pod/perlreguts.pod @@ -747,6 +747,7 @@ F<regexp.h> contains the base structure definition: typedef struct regexp { I32 *startp; I32 *endp; + regexp_paren_ofs *swap; regnode *regstclass; struct reg_substr_data *substrs; char *precomp; /* pre-compilation regular expression */ @@ -802,11 +803,19 @@ These fields are used to keep track of how many paren groups could be matched in the pattern, which was the last open paren to be entered, and which was the last close paren to be entered. -=item C<startp>, C<endp> +=item C<startp>, C<endp>, C<swap> These fields store arrays that are used to hold the offsets of the begining and end of each capture group that has matched. -1 is used to indicate no match. +C<swap> is an extra set of startp/endp stored in a C<regexp_paren_ofs> +struct. This is used when the last successful match was from same pattern +as the current pattern, so that a partial match doesn't overwrite the +previous match's results. When this field is data filled the matching +engine will swap buffers before every match attempt. If the match fails, +then it swaps them back. If it's successful it leaves them. This field +is populated on demand and is by default null. + These are the source for @- and @+. =item C<subbeg> C<sublen> C<saved_copy> |