This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Don't try to recreate the LC_ALL C locale
[perl5.git] / regexp.h
index 44409f0..45f64e8 100644 (file)
--- a/regexp.h
+++ b/regexp.h
@@ -20,6 +20,8 @@
 
 #include "utf8.h"
 
+typedef SSize_t regnode_offset;
+
 struct regnode {
     U8 flags;
     U8  type;
@@ -134,8 +136,8 @@ typedef struct regexp {
      * Data about the last/current match. These are modified during matching
      */
 
-    U32 lastparen;           /* last open paren matched */
-    U32 lastcloseparen;      /* last close paren matched */
+    U32 lastparen;           /* highest close paren matched ($+) */
+    U32 lastcloseparen;      /* last close paren matched ($^N) */
     regexp_paren_pair *offs; /* Array of offsets for (@-) and (@+) */
     char **recurse_locinput; /* used to detect infinite recursion, XXX: move to internal */
 
@@ -712,6 +714,7 @@ typedef I32 CHECKPOINT;
 typedef struct regmatch_state {
     int resume_state;          /* where to jump to on return */
     char *locinput;            /* where to backtrack in string on failure */
+    char *loceol;
 
     union {
 
@@ -804,6 +807,9 @@ typedef struct regmatch_state {
            struct regmatch_state *prev_yes_state;
            I32 wanted;
            I32 logical;        /* saved copy of 'logical' var */
+            U8  count;          /* number of beginning positions */
+            char *start;
+            char *end;
            regnode  *me; /* the IFMATCH/SUSPEND/UNLESSM node  */
        } ifmatch; /* and SUSPEND/UNLESSM */