t/op/grep.t using test.pl
[p5sagit/p5-mst-13.2.git] / regexp.h
index 0491d34..0493267 100644 (file)
--- a/regexp.h
+++ b/regexp.h
@@ -184,7 +184,6 @@ typedef enum {
     resume_CURLYM1,
     resume_CURLYM2,
     resume_CURLYM3,
-    resume_CURLYM4,
     resume_IFMATCH,
     resume_PLUS1,
     resume_PLUS2,
@@ -214,20 +213,26 @@ typedef struct regmatch_state {
     I32 ln;                    /* len or last */
 
     union {
+
+       /* this is a fake union member that matches the first element
+        * of each member that needs to store positive backtrack
+        * information */
+       struct {
+           struct regmatch_state *prev_yes_state;
+       } yes;
+
        struct {
            reg_trie_accepted *accept_buff;
            U32 accepted;       /* how many accepting states we have seen */
        } trie;
 
        struct {
+           /* this first element must match u.yes */
+           struct regmatch_state *prev_yes_state;
            regexp      *prev_rex;
            int         toggleutf;
            CHECKPOINT  cp;     /* remember current savestack indexes */
            CHECKPOINT  lastcp;
-           struct regmatch_state  *prev_eval; /* save cur_eval */
-           struct regmatch_slab   *prev_slab;
-           int depth;
-
        } eval;
 
        struct {
@@ -254,12 +259,15 @@ typedef struct regmatch_state {
        } whilem;
 
        struct {
+           /* this first element must match u.yes */
+           struct regmatch_state *prev_yes_state;
            I32 paren;
            I32 c1, c2;         /* case fold search */
            CHECKPOINT lastcp;
            I32 l;
            I32 matches;
            I32 maxwanted;
+           bool minmod;
        } curlym;
 
        struct {
@@ -270,6 +278,12 @@ typedef struct regmatch_state {
            char *old;
            int count;
        } plus; /* and CURLYN/CURLY/STAR */
+
+       struct {
+           /* this first element must match u.yes */
+           struct regmatch_state *prev_yes_state;
+           I32 wanted;
+       } ifmatch; /* and SUSPEND/UNLESSM */
     } u;
 } regmatch_state;