/[pcre]/code/trunk/pcre_dfa_exec.c
ViewVC logotype

Diff of /code/trunk/pcre_dfa_exec.c

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

revision 340 by ph10, Sat Apr 12 14:36:14 2008 UTC revision 341 by ph10, Sat Apr 19 16:41:04 2008 UTC
# Line 88  static const uschar coptable[] = { Line 88  static const uschar coptable[] = {
88    0,                             /* End                                    */    0,                             /* End                                    */
89    0, 0, 0, 0, 0,                 /* \A, \G, \K, \B, \b                     */    0, 0, 0, 0, 0,                 /* \A, \G, \K, \B, \b                     */
90    0, 0, 0, 0, 0, 0,              /* \D, \d, \S, \s, \W, \w                 */    0, 0, 0, 0, 0, 0,              /* \D, \d, \S, \s, \W, \w                 */
91    0, 0,                          /* Any, Anybyte                           */    0, 0, 0,                       /* Any, AllAny, Anybyte                   */
92    0, 0, 0,                       /* NOTPROP, PROP, EXTUNI                  */    0, 0, 0,                       /* NOTPROP, PROP, EXTUNI                  */
93    0, 0, 0, 0, 0,                 /* \R, \H, \h, \V, \v                     */    0, 0, 0, 0, 0,                 /* \R, \H, \h, \V, \v                     */
94    0, 0, 0, 0, 0,                 /* \Z, \z, Opt, ^, $                      */    0, 0, 0, 0, 0,                 /* \Z, \z, Opt, ^, $                      */
# Line 132  static const uschar coptable[] = { Line 132  static const uschar coptable[] = {
132    0,                             /* DEF                                    */    0,                             /* DEF                                    */
133    0, 0,                          /* BRAZERO, BRAMINZERO                    */    0, 0,                          /* BRAZERO, BRAMINZERO                    */
134    0, 0, 0, 0,                    /* PRUNE, SKIP, THEN, COMMIT              */    0, 0, 0, 0,                    /* PRUNE, SKIP, THEN, COMMIT              */
135    0, 0                           /* FAIL, ACCEPT                           */    0, 0, 0                        /* FAIL, ACCEPT, SKIPZERO                 */
136  };  };
137    
138  /* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W,  /* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W,
# Line 143  static const uschar toptable1[] = { Line 143  static const uschar toptable1[] = {
143    ctype_digit, ctype_digit,    ctype_digit, ctype_digit,
144    ctype_space, ctype_space,    ctype_space, ctype_space,
145    ctype_word,  ctype_word,    ctype_word,  ctype_word,
146    0                               /* OP_ANY */    0, 0                            /* OP_ANY, OP_ALLANY */
147  };  };
148    
149  static const uschar toptable2[] = {  static const uschar toptable2[] = {
# Line 151  static const uschar toptable2[] = { Line 151  static const uschar toptable2[] = {
151    ctype_digit, 0,    ctype_digit, 0,
152    ctype_space, 0,    ctype_space, 0,
153    ctype_word,  0,    ctype_word,  0,
154    1                               /* OP_ANY */    1, 1                            /* OP_ANY, OP_ALLANY */
155  };  };
156    
157    
# Line 223  Arguments: Line 223  Arguments:
223    rlevel            function call recursion level    rlevel            function call recursion level
224    recursing         regex recursive call level    recursing         regex recursive call level
225    
226  Returns:            > 0 =>  Returns:            > 0 => number of match offset pairs placed in offsets
227                      = 0 =>                      = 0 => offsets overflowed; longest matches are present
228                       -1 => failed to match                       -1 => failed to match
229                     < -1 => some kind of unexpected problem                     < -1 => some kind of unexpected problem
230    
# Line 744  for (;;) Line 744  for (;;)
744        break;        break;
745    
746        /*-----------------------------------------------------------------*/        /*-----------------------------------------------------------------*/
747          case OP_ALLANY:
748          if (clen > 0)
749            { ADD_NEW(state_offset + 1, 0); }
750          break;
751    
752          /*-----------------------------------------------------------------*/
753        case OP_EODN:        case OP_EODN:
754        if (clen == 0 || (IS_NEWLINE(ptr) && ptr == end_subject - md->nllen))        if (clen == 0 || (IS_NEWLINE(ptr) && ptr == end_subject - md->nllen))
755          { ADD_ACTIVE(state_offset + 1, 0); }          { ADD_ACTIVE(state_offset + 1, 0); }
# Line 859  for (;;) Line 865  for (;;)
865  /* ========================================================================== */  /* ========================================================================== */
866        /* These opcodes likewise inspect the subject character, but have an        /* These opcodes likewise inspect the subject character, but have an
867        argument that is not a data character. It is one of these opcodes:        argument that is not a data character. It is one of these opcodes:
868        OP_ANY, OP_DIGIT, OP_NOT_DIGIT, OP_WHITESPACE, OP_NOT_SPACE, OP_WORDCHAR,        OP_ANY, OP_ALLANY, OP_DIGIT, OP_NOT_DIGIT, OP_WHITESPACE, OP_NOT_SPACE,
869        OP_NOT_WORDCHAR. The value is loaded into d. */        OP_WORDCHAR, OP_NOT_WORDCHAR. The value is loaded into d. */
870    
871        case OP_TYPEPLUS:        case OP_TYPEPLUS:
872        case OP_TYPEMINPLUS:        case OP_TYPEMINPLUS:
# Line 2169  for (;;) Line 2175  for (;;)
2175    
2176  /* ========================================================================== */  /* ========================================================================== */
2177        /* These are the opcodes for fancy brackets of various kinds. We have        /* These are the opcodes for fancy brackets of various kinds. We have
2178        to use recursion in order to handle them. */        to use recursion in order to handle them. The "always failing" assersion
2179          (?!) is optimised when compiling to OP_FAIL, so we have to support that,
2180          though the other "backtracking verbs" are not supported. */
2181    
2182          case OP_FAIL:
2183          break;
2184    
2185        case OP_ASSERT:        case OP_ASSERT:
2186        case OP_ASSERT_NOT:        case OP_ASSERT_NOT:

Legend:
Removed from v.340  
changed lines
  Added in v.341

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12