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

Diff of /code/trunk/pcre_exec.c

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

revision 933 by ph10, Sat Feb 25 12:18:23 2012 UTC revision 975 by ph10, Sat Jun 2 11:03:06 2012 UTC
# Line 1575  for (;;) Line 1575  for (;;)
1575          mstart = md->start_match_ptr;   /* In case \K reset it */          mstart = md->start_match_ptr;   /* In case \K reset it */
1576          break;          break;
1577          }          }
1578          md->mark = save_mark;
1579    
1580        /* PCRE does not allow THEN to escape beyond an assertion; it is treated        /* A COMMIT failure must fail the entire assertion, without trying any
1581        as NOMATCH. */        subsequent branches. */
1582    
1583          if (rrc == MATCH_COMMIT) RRETURN(MATCH_NOMATCH);
1584    
1585          /* PCRE does not allow THEN to escape beyond an assertion; it
1586          is treated as NOMATCH. */
1587    
1588        if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);        if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc);
1589        ecode += GET(ecode, 1);        ecode += GET(ecode, 1);
       md->mark = save_mark;  
1590        }        }
1591      while (*ecode == OP_ALT);      while (*ecode == OP_ALT);
1592    
# Line 1789  for (;;) Line 1794  for (;;)
1794            goto RECURSION_MATCHED;        /* Exit loop; end processing */            goto RECURSION_MATCHED;        /* Exit loop; end processing */
1795            }            }
1796    
1797          /* PCRE does not allow THEN to escape beyond a recursion; it is treated          /* PCRE does not allow THEN or COMMIT to escape beyond a recursion; it
1798          as NOMATCH. */          is treated as NOMATCH. */
1799    
1800          else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN)          else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN &&
1801                     rrc != MATCH_COMMIT)
1802            {            {
1803            DPRINTF(("Recursion gave error %d\n", rrc));            DPRINTF(("Recursion gave error %d\n", rrc));
1804            if (new_recursive.offset_save != stacksave)            if (new_recursive.offset_save != stacksave)
# Line 6463  if (extra_data != NULL Line 6469  if (extra_data != NULL
6469                      PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART |                      PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART |
6470                      PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD)) == 0)                      PCRE_PARTIAL_SOFT | PCRE_PARTIAL_HARD)) == 0)
6471    {    {
6472    rc = PRIV(jit_exec)(re, extra_data->executable_jit,    rc = PRIV(jit_exec)(re, extra_data, (const pcre_uchar *)subject, length,
6473      (const pcre_uchar *)subject, length, start_offset, options,         start_offset, options, offsets, offsetcount);
     ((extra_data->flags & PCRE_EXTRA_MATCH_LIMIT) == 0)  
     ? MATCH_LIMIT : extra_data->match_limit, offsets, offsetcount,  
     ((extra_data->flags & PCRE_EXTRA_MARK) != 0) ? extra_data->mark : NULL);  
6474    
6475    /* PCRE_ERROR_NULL means that the selected normal or partial matching    /* PCRE_ERROR_NULL means that the selected normal or partial matching
6476    mode is not compiled. In this case we simply fallback to interpreter. */    mode is not compiled. In this case we simply fallback to interpreter. */
# Line 7067  if (rc == MATCH_MATCH || rc == MATCH_ACC Line 7070  if (rc == MATCH_MATCH || rc == MATCH_ACC
7070      {      {
7071      register int *iptr, *iend;      register int *iptr, *iend;
7072      int resetcount = 2 + re->top_bracket * 2;      int resetcount = 2 + re->top_bracket * 2;
7073      if (resetcount > offsetcount) resetcount = ocount;      if (resetcount > offsetcount) resetcount = offsetcount;
7074      iptr = offsets + md->end_offset_top;      iptr = offsets + md->end_offset_top;
7075      iend = offsets + resetcount;      iend = offsets + resetcount;
7076      while (iptr < iend) *iptr++ = -1;      while (iptr < iend) *iptr++ = -1;

Legend:
Removed from v.933  
changed lines
  Added in v.975

  ViewVC Help
Powered by ViewVC 1.1.5