/[pcre]/code/trunk/pcre_internal.h
ViewVC logotype

Diff of /code/trunk/pcre_internal.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1359 by ph10, Tue Sep 3 10:10:59 2013 UTC revision 1365 by ph10, Sun Oct 6 18:33:56 2013 UTC
# Line 1174  time, run time, or study time, respectiv Line 1174  time, run time, or study time, respectiv
1174  #define PUBLIC_COMPILE_OPTIONS \  #define PUBLIC_COMPILE_OPTIONS \
1175    (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \    (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \
1176     PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \     PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \
1177     PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \     PCRE_NO_AUTO_CAPTURE|PCRE_NO_AUTO_POSSESSIFY| \
1178       PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \
1179     PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \     PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \
1180     PCRE_JAVASCRIPT_COMPAT|PCRE_UCP|PCRE_NO_START_OPTIMIZE|PCRE_NEVER_UTF)     PCRE_JAVASCRIPT_COMPAT|PCRE_UCP|PCRE_NO_START_OPTIMIZE|PCRE_NEVER_UTF)
1181    
# Line 1852  only. */ Line 1853  only. */
1853  #define PT_WORD       8    /* Word - L plus N plus underscore */  #define PT_WORD       8    /* Word - L plus N plus underscore */
1854  #define PT_CLIST      9    /* Pseudo-property: match character list */  #define PT_CLIST      9    /* Pseudo-property: match character list */
1855  #define PT_UCNC      10    /* Universal Character nameable character */  #define PT_UCNC      10    /* Universal Character nameable character */
1856    #define PT_TABSIZE   11    /* Size of square table for autopossessify tests */
1857    
1858  /* Flag bits and data types for the extended class (OP_XCLASS) for classes that  /* Flag bits and data types for the extended class (OP_XCLASS) for classes that
1859  contain characters with values greater than 255. */  contain characters with values greater than 255. */
# Line 1891  enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, E Line 1893  enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, E
1893         ESC_E, ESC_Q, ESC_g, ESC_k,         ESC_E, ESC_Q, ESC_g, ESC_k,
1894         ESC_DU, ESC_du, ESC_SU, ESC_su, ESC_WU, ESC_wu };         ESC_DU, ESC_du, ESC_SU, ESC_su, ESC_WU, ESC_wu };
1895    
1896  /* Opcode table: Starting from 1 (i.e. after OP_END), the values up to  /* Opcode table */
 OP_EOD must correspond in order to the list of escapes immediately above.  
1897    
1898  *** NOTE NOTE NOTE *** Whenever this list is updated, the two macro definitions  
1899  that follow must also be updated to match. There are also tables called  /****** NOTE NOTE NOTE ******
1900  "coptable" and "poptable" in pcre_dfa_exec.c that must be updated. */  
1901    Starting from 1 (i.e. after OP_END), the values up to OP_EOD must correspond in
1902    order to the list of escapes immediately above. Furthermore, values up to
1903    OP_DOLLM must not be changed without adjusting the table called autoposstab in
1904    pcre_compile.c
1905    
1906    Whenever this list is updated, the two macro definitions that follow must also
1907    be updated to match. There are also tables called "coptable" and "poptable" in
1908    pcre_dfa_exec.c that must be updated.
1909    
1910    ****** NOTE NOTE NOTE ******/
1911    
1912    
1913    /* The values between FIRST_AUTOTAB_OP and LAST_AUTOTAB_RIGHT_OP, inclusive,
1914    are used in a table for deciding whether a repeated character type can be
1915    auto-possessified. */
1916    
1917    #define FIRST_AUTOTAB_OP       OP_NOT_DIGIT
1918    #define LAST_AUTOTAB_LEFT_OP   OP_EXTUNI
1919    #define LAST_AUTOTAB_RIGHT_OP  OP_DOLLM
1920    
1921  enum {  enum {
1922    OP_END,            /* 0 End of pattern */    OP_END,            /* 0 End of pattern */
# Line 1928  enum { Line 1948  enum {
1948    OP_EXTUNI,         /* 22 \X (extended Unicode sequence */    OP_EXTUNI,         /* 22 \X (extended Unicode sequence */
1949    OP_EODN,           /* 23 End of data or \n at end of data (\Z) */    OP_EODN,           /* 23 End of data or \n at end of data (\Z) */
1950    OP_EOD,            /* 24 End of data (\z) */    OP_EOD,            /* 24 End of data (\z) */
1951    
1952      /* Line end assertions */
1953    
1954    OP_CIRC,           /* 25 Start of line - not multiline */    OP_DOLL,           /* 25 End of line - not multiline */
1955    OP_CIRCM,          /* 26 Start of line - multiline */    OP_DOLLM,          /* 26 End of line - multiline */
1956    OP_DOLL,           /* 27 End of line - not multiline */    OP_CIRC,           /* 27 Start of line - not multiline */
1957    OP_DOLLM,          /* 28 End of line - multiline */    OP_CIRCM,          /* 28 Start of line - multiline */
1958    
1959      /* Single characters; caseful must precede the caseless ones */
1960    
1961    OP_CHAR,           /* 29 Match one character, casefully */    OP_CHAR,           /* 29 Match one character, casefully */
1962    OP_CHARI,          /* 30 Match one character, caselessly */    OP_CHARI,          /* 30 Match one character, caselessly */
1963    OP_NOT,            /* 31 Match one character, not the given one, casefully */    OP_NOT,            /* 31 Match one character, not the given one, casefully */
# Line 1941  enum { Line 1966  enum {
1966    /* The following sets of 13 opcodes must always be kept in step because    /* The following sets of 13 opcodes must always be kept in step because
1967    the offset from the first one is used to generate the others. */    the offset from the first one is used to generate the others. */
1968    
1969    /**** Single characters, caseful, must precede the caseless ones ****/    /* Repeated characters; caseful must precede the caseless ones */
1970    
1971    OP_STAR,           /* 33 The maximizing and minimizing versions of */    OP_STAR,           /* 33 The maximizing and minimizing versions of */
1972    OP_MINSTAR,        /* 34 these six opcodes must come in pairs, with */    OP_MINSTAR,        /* 34 these six opcodes must come in pairs, with */
# Line 1959  enum { Line 1984  enum {
1984    OP_POSQUERY,       /* 44 Posesssified query, caseful */    OP_POSQUERY,       /* 44 Posesssified query, caseful */
1985    OP_POSUPTO,        /* 45 Possessified upto, caseful */    OP_POSUPTO,        /* 45 Possessified upto, caseful */
1986    
1987    /**** Single characters, caseless, must follow the caseful ones */    /* Repeated characters; caseless must follow the caseful ones */
1988    
1989    OP_STARI,          /* 46 */    OP_STARI,          /* 46 */
1990    OP_MINSTARI,       /* 47 */    OP_MINSTARI,       /* 47 */
# Line 1977  enum { Line 2002  enum {
2002    OP_POSQUERYI,      /* 57 Posesssified query, caseless */    OP_POSQUERYI,      /* 57 Posesssified query, caseless */
2003    OP_POSUPTOI,       /* 58 Possessified upto, caseless */    OP_POSUPTOI,       /* 58 Possessified upto, caseless */
2004    
2005    /**** The negated ones must follow the non-negated ones, and match them ****/    /* The negated ones must follow the non-negated ones, and match them */
2006    /**** Negated single character, caseful; must precede the caseless ones ****/    /* Negated repeated character, caseful; must precede the caseless ones */
2007    
2008    OP_NOTSTAR,        /* 59 The maximizing and minimizing versions of */    OP_NOTSTAR,        /* 59 The maximizing and minimizing versions of */
2009    OP_NOTMINSTAR,     /* 60 these six opcodes must come in pairs, with */    OP_NOTMINSTAR,     /* 60 these six opcodes must come in pairs, with */
# Line 1996  enum { Line 2021  enum {
2021    OP_NOTPOSQUERY,    /* 70 */    OP_NOTPOSQUERY,    /* 70 */
2022    OP_NOTPOSUPTO,     /* 71 */    OP_NOTPOSUPTO,     /* 71 */
2023    
2024    /**** Negated single character, caseless; must follow the caseful ones ****/    /* Negated repeated character, caseless; must follow the caseful ones */
2025    
2026    OP_NOTSTARI,       /* 72 */    OP_NOTSTARI,       /* 72 */
2027    OP_NOTMINSTARI,    /* 73 */    OP_NOTMINSTARI,    /* 73 */
# Line 2014  enum { Line 2039  enum {
2039    OP_NOTPOSQUERYI,   /* 83 */    OP_NOTPOSQUERYI,   /* 83 */
2040    OP_NOTPOSUPTOI,    /* 84 */    OP_NOTPOSUPTOI,    /* 84 */
2041    
2042    /**** Character types ****/    /* Character types */
2043    
2044    OP_TYPESTAR,       /* 85 The maximizing and minimizing versions of */    OP_TYPESTAR,       /* 85 The maximizing and minimizing versions of */
2045    OP_TYPEMINSTAR,    /* 86 these six opcodes must come in pairs, with */    OP_TYPEMINSTAR,    /* 86 these six opcodes must come in pairs, with */
# Line 2055  enum { Line 2080  enum {
2080                                class. This does both positive and negative. */                                class. This does both positive and negative. */
2081    OP_REF,            /* 109 Match a back reference, casefully */    OP_REF,            /* 109 Match a back reference, casefully */
2082    OP_REFI,           /* 110 Match a back reference, caselessly */    OP_REFI,           /* 110 Match a back reference, caselessly */
2083    OP_RECURSE,        /* 111 Match a numbered subpattern (possibly recursive) */    OP_DNREF,          /* 111 Match a duplicate name backref, casefully */
2084    OP_CALLOUT,        /* 112 Call out to external function if provided */    OP_DNREFI,         /* 112 Match a duplicate name backref, caselessly */
2085      OP_RECURSE,        /* 113 Match a numbered subpattern (possibly recursive) */
2086    OP_ALT,            /* 113 Start of alternation */    OP_CALLOUT,        /* 114 Call out to external function if provided */
2087    OP_KET,            /* 114 End of group that doesn't have an unbounded repeat */  
2088    OP_KETRMAX,        /* 115 These two must remain together and in this */    OP_ALT,            /* 115 Start of alternation */
2089    OP_KETRMIN,        /* 116 order. They are for groups the repeat for ever. */    OP_KET,            /* 116 End of group that doesn't have an unbounded repeat */
2090    OP_KETRPOS,        /* 117 Possessive unlimited repeat. */    OP_KETRMAX,        /* 117 These two must remain together and in this */
2091      OP_KETRMIN,        /* 118 order. They are for groups the repeat for ever. */
2092      OP_KETRPOS,        /* 119 Possessive unlimited repeat. */
2093    
2094    /* The assertions must come before BRA, CBRA, ONCE, and COND, and the four    /* The assertions must come before BRA, CBRA, ONCE, and COND, and the four
2095    asserts must remain in order. */    asserts must remain in order. */
2096    
2097    OP_REVERSE,        /* 118 Move pointer back - used in lookbehind assertions */    OP_REVERSE,        /* 129 Move pointer back - used in lookbehind assertions */
2098    OP_ASSERT,         /* 119 Positive lookahead */    OP_ASSERT,         /* 121 Positive lookahead */
2099    OP_ASSERT_NOT,     /* 120 Negative lookahead */    OP_ASSERT_NOT,     /* 122 Negative lookahead */
2100    OP_ASSERTBACK,     /* 121 Positive lookbehind */    OP_ASSERTBACK,     /* 123 Positive lookbehind */
2101    OP_ASSERTBACK_NOT, /* 122 Negative lookbehind */    OP_ASSERTBACK_NOT, /* 124 Negative lookbehind */
2102    
2103    /* ONCE, ONCE_NC, BRA, BRAPOS, CBRA, CBRAPOS, and COND must come immediately    /* ONCE, ONCE_NC, BRA, BRAPOS, CBRA, CBRAPOS, and COND must come immediately
2104    after the assertions, with ONCE first, as there's a test for >= ONCE for a    after the assertions, with ONCE first, as there's a test for >= ONCE for a
2105    subpattern that isn't an assertion. The POS versions must immediately follow    subpattern that isn't an assertion. The POS versions must immediately follow
2106    the non-POS versions in each case. */    the non-POS versions in each case. */
2107    
2108    OP_ONCE,           /* 123 Atomic group, contains captures */    OP_ONCE,           /* 125 Atomic group, contains captures */
2109    OP_ONCE_NC,        /* 124 Atomic group containing no captures */    OP_ONCE_NC,        /* 126 Atomic group containing no captures */
2110    OP_BRA,            /* 125 Start of non-capturing bracket */    OP_BRA,            /* 127 Start of non-capturing bracket */
2111    OP_BRAPOS,         /* 126 Ditto, with unlimited, possessive repeat */    OP_BRAPOS,         /* 128 Ditto, with unlimited, possessive repeat */
2112    OP_CBRA,           /* 127 Start of capturing bracket */    OP_CBRA,           /* 129 Start of capturing bracket */
2113    OP_CBRAPOS,        /* 128 Ditto, with unlimited, possessive repeat */    OP_CBRAPOS,        /* 130 Ditto, with unlimited, possessive repeat */
2114    OP_COND,           /* 129 Conditional group */    OP_COND,           /* 131 Conditional group */
2115    
2116    /* These five must follow the previous five, in the same order. There's a    /* These five must follow the previous five, in the same order. There's a
2117    check for >= SBRA to distinguish the two sets. */    check for >= SBRA to distinguish the two sets. */
2118    
2119    OP_SBRA,           /* 130 Start of non-capturing bracket, check empty  */    OP_SBRA,           /* 132 Start of non-capturing bracket, check empty  */
2120    OP_SBRAPOS,        /* 131 Ditto, with unlimited, possessive repeat */    OP_SBRAPOS,        /* 133 Ditto, with unlimited, possessive repeat */
2121    OP_SCBRA,          /* 132 Start of capturing bracket, check empty */    OP_SCBRA,          /* 134 Start of capturing bracket, check empty */
2122    OP_SCBRAPOS,       /* 133 Ditto, with unlimited, possessive repeat */    OP_SCBRAPOS,       /* 135 Ditto, with unlimited, possessive repeat */
2123    OP_SCOND,          /* 134 Conditional group, check empty */    OP_SCOND,          /* 136 Conditional group, check empty */
2124    
2125    /* The next two pairs must (respectively) be kept together. */    /* The next two pairs must (respectively) be kept together. */
2126    
2127    OP_CREF,           /* 135 Used to hold a capture number as condition */    OP_CREF,           /* 137 Used to hold a capture number as condition */
2128    OP_NCREF,          /* 136 Same, but generated by a name reference*/    OP_DNCREF,         /* 138 Used to point to duplicate names as a condition */
2129    OP_RREF,           /* 137 Used to hold a recursion number as condition */    OP_RREF,           /* 139 Used to hold a recursion number as condition */
2130    OP_NRREF,          /* 138 Same, but generated by a name reference*/    OP_DNRREF,         /* 140 Used to point to duplicate names as a condition */
2131    OP_DEF,            /* 139 The DEFINE condition */    OP_DEF,            /* 141 The DEFINE condition */
2132    
2133    OP_BRAZERO,        /* 140 These two must remain together and in this */    OP_BRAZERO,        /* 142 These two must remain together and in this */
2134    OP_BRAMINZERO,     /* 141 order. */    OP_BRAMINZERO,     /* 143 order. */
2135    OP_BRAPOSZERO,     /* 142 */    OP_BRAPOSZERO,     /* 144 */
2136    
2137    /* These are backtracking control verbs */    /* These are backtracking control verbs */
2138    
2139    OP_MARK,           /* 143 always has an argument */    OP_MARK,           /* 145 always has an argument */
2140    OP_PRUNE,          /* 144 */    OP_PRUNE,          /* 146 */
2141    OP_PRUNE_ARG,      /* 145 same, but with argument */    OP_PRUNE_ARG,      /* 147 same, but with argument */
2142    OP_SKIP,           /* 146 */    OP_SKIP,           /* 148 */
2143    OP_SKIP_ARG,       /* 147 same, but with argument */    OP_SKIP_ARG,       /* 149 same, but with argument */
2144    OP_THEN,           /* 148 */    OP_THEN,           /* 150 */
2145    OP_THEN_ARG,       /* 149 same, but with argument */    OP_THEN_ARG,       /* 151 same, but with argument */
2146    OP_COMMIT,         /* 150 */    OP_COMMIT,         /* 152 */
2147    
2148    /* These are forced failure and success verbs */    /* These are forced failure and success verbs */
2149    
2150    OP_FAIL,           /* 151 */    OP_FAIL,           /* 153 */
2151    OP_ACCEPT,         /* 152 */    OP_ACCEPT,         /* 154 */
2152    OP_ASSERT_ACCEPT,  /* 153 Used inside assertions */    OP_ASSERT_ACCEPT,  /* 155 Used inside assertions */
2153    OP_CLOSE,          /* 154 Used before OP_ACCEPT to close open captures */    OP_CLOSE,          /* 156 Used before OP_ACCEPT to close open captures */
2154    
2155    /* This is used to skip a subpattern with a {0} quantifier */    /* This is used to skip a subpattern with a {0} quantifier */
2156    
2157    OP_SKIPZERO,       /* 155 */    OP_SKIPZERO,       /* 157 */
2158    
2159    /* This is not an opcode, but is used to check that tables indexed by opcode    /* This is not an opcode, but is used to check that tables indexed by opcode
2160    are the correct length, in order to catch updating errors - there have been    are the correct length, in order to catch updating errors - there have been
# Line 2151  some cases doesn't actually use these na Line 2178  some cases doesn't actually use these na
2178    "\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte",         \    "\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte",         \
2179    "notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v",           \    "notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v",           \
2180    "extuni",  "\\Z", "\\z",                                        \    "extuni",  "\\Z", "\\z",                                        \
2181    "^", "^", "$", "$", "char", "chari", "not", "noti",             \    "$", "$", "^", "^", "char", "chari", "not", "noti",             \
2182    "*", "*?", "+", "+?", "?", "??",                                \    "*", "*?", "+", "+?", "?", "??",                                \
2183    "{", "{", "{",                                                  \    "{", "{", "{",                                                  \
2184    "*+","++", "?+", "{",                                           \    "*+","++", "?+", "{",                                           \
# Line 2167  some cases doesn't actually use these na Line 2194  some cases doesn't actually use these na
2194    "*", "*?", "+", "+?", "?", "??", "{", "{", "{",                 \    "*", "*?", "+", "+?", "?", "??", "{", "{", "{",                 \
2195    "*+","++", "?+", "{",                                           \    "*+","++", "?+", "{",                                           \
2196    "*", "*?", "+", "+?", "?", "??", "{", "{",                      \    "*", "*?", "+", "+?", "?", "??", "{", "{",                      \
2197    "class", "nclass", "xclass", "Ref", "Refi",                     \    "class", "nclass", "xclass", "Ref", "Refi", "DnRef", "DnRefi",  \
2198    "Recurse", "Callout",                                           \    "Recurse", "Callout",                                           \
2199    "Alt", "Ket", "KetRmax", "KetRmin", "KetRpos",                  \    "Alt", "Ket", "KetRmax", "KetRmin", "KetRpos",                  \
2200    "Reverse", "Assert", "Assert not", "AssertB", "AssertB not",    \    "Reverse", "Assert", "Assert not", "AssertB", "AssertB not",    \
# Line 2176  some cases doesn't actually use these na Line 2203  some cases doesn't actually use these na
2203    "Cond",                                                         \    "Cond",                                                         \
2204    "SBra", "SBraPos", "SCBra", "SCBraPos",                         \    "SBra", "SBraPos", "SCBra", "SCBraPos",                         \
2205    "SCond",                                                        \    "SCond",                                                        \
2206    "Cond ref", "Cond nref", "Cond rec", "Cond nrec", "Cond def",   \    "Cond ref", "Cond dnref", "Cond rec", "Cond dnrec", "Cond def", \
2207    "Brazero", "Braminzero", "Braposzero",                          \    "Brazero", "Braminzero", "Braposzero",                          \
2208    "*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP",                  \    "*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP",                  \
2209    "*THEN", "*THEN", "*COMMIT", "*FAIL",                           \    "*THEN", "*THEN", "*COMMIT", "*FAIL",                           \
# Line 2201  in UTF-8 mode. The code that uses this t Line 2228  in UTF-8 mode. The code that uses this t
2228    3, 3,                          /* \P, \p                                 */ \    3, 3,                          /* \P, \p                                 */ \
2229    1, 1, 1, 1, 1,                 /* \R, \H, \h, \V, \v                     */ \    1, 1, 1, 1, 1,                 /* \R, \H, \h, \V, \v                     */ \
2230    1,                             /* \X                                     */ \    1,                             /* \X                                     */ \
2231    1, 1, 1, 1, 1, 1,              /* \Z, \z, ^, ^M, $, $M                   */ \    1, 1, 1, 1, 1, 1,              /* \Z, \z, $, $M ^, ^M                    */ \
2232    2,                             /* Char  - the minimum length             */ \    2,                             /* Char  - the minimum length             */ \
2233    2,                             /* Chari  - the minimum length            */ \    2,                             /* Chari  - the minimum length            */ \
2234    2,                             /* not                                    */ \    2,                             /* not                                    */ \
# Line 2237  in UTF-8 mode. The code that uses this t Line 2264  in UTF-8 mode. The code that uses this t
2264    0,                             /* XCLASS - variable length               */ \    0,                             /* XCLASS - variable length               */ \
2265    1+IMM2_SIZE,                   /* REF                                    */ \    1+IMM2_SIZE,                   /* REF                                    */ \
2266    1+IMM2_SIZE,                   /* REFI                                   */ \    1+IMM2_SIZE,                   /* REFI                                   */ \
2267      1+2*IMM2_SIZE,                 /* DNREF                                  */ \
2268      1+2*IMM2_SIZE,                 /* DNREFI                                 */ \
2269    1+LINK_SIZE,                   /* RECURSE                                */ \    1+LINK_SIZE,                   /* RECURSE                                */ \
2270    2+2*LINK_SIZE,                 /* CALLOUT                                */ \    2+2*LINK_SIZE,                 /* CALLOUT                                */ \
2271    1+LINK_SIZE,                   /* Alt                                    */ \    1+LINK_SIZE,                   /* Alt                                    */ \
# Line 2261  in UTF-8 mode. The code that uses this t Line 2290  in UTF-8 mode. The code that uses this t
2290    1+LINK_SIZE+IMM2_SIZE,         /* SCBRA                                  */ \    1+LINK_SIZE+IMM2_SIZE,         /* SCBRA                                  */ \
2291    1+LINK_SIZE+IMM2_SIZE,         /* SCBRAPOS                               */ \    1+LINK_SIZE+IMM2_SIZE,         /* SCBRAPOS                               */ \
2292    1+LINK_SIZE,                   /* SCOND                                  */ \    1+LINK_SIZE,                   /* SCOND                                  */ \
2293    1+IMM2_SIZE, 1+IMM2_SIZE,      /* CREF, NCREF                            */ \    1+IMM2_SIZE, 1+2*IMM2_SIZE,    /* CREF, DNCREF                           */ \
2294    1+IMM2_SIZE, 1+IMM2_SIZE,      /* RREF, NRREF                            */ \    1+IMM2_SIZE, 1+2*IMM2_SIZE,    /* RREF, DNRREF                           */ \
2295    1,                             /* DEF                                    */ \    1,                             /* DEF                                    */ \
2296    1, 1, 1,                       /* BRAZERO, BRAMINZERO, BRAPOSZERO        */ \    1, 1, 1,                       /* BRAZERO, BRAMINZERO, BRAPOSZERO        */ \
2297    3, 1, 3,                       /* MARK, PRUNE, PRUNE_ARG                 */ \    3, 1, 3,                       /* MARK, PRUNE, PRUNE_ARG                 */ \
# Line 2271  in UTF-8 mode. The code that uses this t Line 2300  in UTF-8 mode. The code that uses this t
2300    1, 1, 1, 1,                    /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT    */ \    1, 1, 1, 1,                    /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT    */ \
2301    1+IMM2_SIZE, 1                 /* CLOSE, SKIPZERO                        */    1+IMM2_SIZE, 1                 /* CLOSE, SKIPZERO                        */
2302    
2303  /* A magic value for OP_RREF and OP_NRREF to indicate the "any recursion"  /* A magic value for OP_RREF to indicate the "any recursion" condition. */
 condition. */  
2304    
2305  #define RREF_ANY  0xffff  #define RREF_ANY  0xffff
2306    
# Line 2407  typedef struct open_capitem { Line 2435  typedef struct open_capitem {
2435    pcre_uint16 flag;             /* Set TRUE if recursive back ref */    pcre_uint16 flag;             /* Set TRUE if recursive back ref */
2436  } open_capitem;  } open_capitem;
2437    
2438  /* Structure for building a list of named groups during the first pass of  /* Structure for building a list of named groups during the first pass of
2439  compiling. */  compiling. */
2440    
2441  typedef struct named_group {  typedef struct named_group {
2442    const pcre_uchar  *name;          /* Points to the name in the pattern */    const pcre_uchar  *name;          /* Points to the name in the pattern */
2443    int                length;        /* Length of the name */    int                length;        /* Length of the name */
2444    pcre_uint32        number;        /* Group number */    pcre_uint32        number;        /* Group number */
2445  } named_group;  } named_group;
2446    
2447  /* Structure for passing "static" information around between the functions  /* Structure for passing "static" information around between the functions
2448  doing the compiling, so that they are thread-safe. */  doing the compiling, so that they are thread-safe. */
# Line 2434  typedef struct compile_data { Line 2462  typedef struct compile_data {
2462    pcre_uchar *name_table;           /* The name/number table */    pcre_uchar *name_table;           /* The name/number table */
2463    int  names_found;                 /* Number of entries so far */    int  names_found;                 /* Number of entries so far */
2464    int  name_entry_size;             /* Size of each entry */    int  name_entry_size;             /* Size of each entry */
2465    int  named_group_list_size;       /* Number of entries in the list */    int  named_group_list_size;       /* Number of entries in the list */
2466    int  workspace_size;              /* Size of workspace */    int  workspace_size;              /* Size of workspace */
2467    unsigned int bracount;            /* Count of capturing parens as we compile */    unsigned int bracount;            /* Count of capturing parens as we compile */
2468    int  final_bracount;              /* Saved value after first pass */    int  final_bracount;              /* Saved value after first pass */
2469    int  max_lookbehind;              /* Maximum lookbehind (characters) */    int  max_lookbehind;              /* Maximum lookbehind (characters) */
2470    int  top_backref;                 /* Maximum back reference */    int  top_backref;                 /* Maximum back reference */
2471    unsigned int backref_map;         /* Bitmap of low back refs */    unsigned int backref_map;         /* Bitmap of low back refs */
2472      unsigned int namedrefcount;       /* Number of backreferences by name */
2473    int  assert_depth;                /* Depth of nested assertions */    int  assert_depth;                /* Depth of nested assertions */
2474    pcre_uint32 external_options;     /* External (initial) options */    pcre_uint32 external_options;     /* External (initial) options */
2475    pcre_uint32 external_flags;       /* External flag bits to be set */    pcre_uint32 external_flags;       /* External flag bits to be set */
# Line 2448  typedef struct compile_data { Line 2477  typedef struct compile_data {
2477    BOOL had_accept;                  /* (*ACCEPT) encountered */    BOOL had_accept;                  /* (*ACCEPT) encountered */
2478    BOOL had_pruneorskip;             /* (*PRUNE) or (*SKIP) encountered */    BOOL had_pruneorskip;             /* (*PRUNE) or (*SKIP) encountered */
2479    BOOL check_lookbehind;            /* Lookbehinds need later checking */    BOOL check_lookbehind;            /* Lookbehinds need later checking */
2480      BOOL dupnames;                    /* Duplicate names exist */
2481    int  nltype;                      /* Newline type */    int  nltype;                      /* Newline type */
2482    int  nllen;                       /* Newline string length */    int  nllen;                       /* Newline string length */
2483    pcre_uchar nl[4];                 /* Newline string when fixed length */    pcre_uchar nl[4];                 /* Newline string when fixed length */

Legend:
Removed from v.1359  
changed lines
  Added in v.1365

  ViewVC Help
Powered by ViewVC 1.1.5