/[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 975 by ph10, Sat Jun 2 11:03:06 2012 UTC revision 976 by ph10, Sat Jun 16 17:53:17 2012 UTC
# Line 37  POSSIBILITY OF SUCH DAMAGE. Line 37  POSSIBILITY OF SUCH DAMAGE.
37  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
38  */  */
39    
   
40  /* This module contains pcre_exec(), the externally visible function that does  /* This module contains pcre_exec(), the externally visible function that does
41  pattern matching using an NFA algorithm, trying to mimic Perl as closely as  pattern matching using an NFA algorithm, trying to mimic Perl as closely as
42  possible. There are also some static supporting functions. */  possible. There are also some static supporting functions. */
# Line 907  for (;;) Line 906  for (;;)
906        }        }
907      else  /* OP_KETRMAX */      else  /* OP_KETRMAX */
908        {        {
       md->match_function_type = MATCH_CBEGROUP;  
909        RMATCH(eptr, prev, offset_top, md, eptrb, RM66);        RMATCH(eptr, prev, offset_top, md, eptrb, RM66);
910        if (rrc != MATCH_NOMATCH) RRETURN(rrc);        if (rrc != MATCH_NOMATCH) RRETURN(rrc);
911        ecode += 1 + LINK_SIZE;        ecode += 1 + LINK_SIZE;
# Line 1036  for (;;) Line 1034  for (;;)
1034    
1035      for (;;)      for (;;)
1036        {        {
1037        if (op >= OP_SBRA || op == OP_ONCE) md->match_function_type = MATCH_CBEGROUP;        if (op >= OP_SBRA || op == OP_ONCE)
1038            md->match_function_type = MATCH_CBEGROUP;
1039    
1040        /* If this is not a possibly empty group, and there are no (*THEN)s in        /* If this is not a possibly empty group, and there are no (*THEN)s in
1041        the pattern, and this is the final alternative, optimize as described        the pattern, and this is the final alternative, optimize as described
# Line 2009  for (;;) Line 2008  for (;;)
2008          }          }
2009        if (*prev >= OP_SBRA)    /* Could match an empty string */        if (*prev >= OP_SBRA)    /* Could match an empty string */
2010          {          {
         md->match_function_type = MATCH_CBEGROUP;  
2011          RMATCH(eptr, prev, offset_top, md, eptrb, RM50);          RMATCH(eptr, prev, offset_top, md, eptrb, RM50);
2012          RRETURN(rrc);          RRETURN(rrc);
2013          }          }
# Line 2018  for (;;) Line 2016  for (;;)
2016        }        }
2017      else  /* OP_KETRMAX */      else  /* OP_KETRMAX */
2018        {        {
       if (*prev >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP;  
2019        RMATCH(eptr, prev, offset_top, md, eptrb, RM13);        RMATCH(eptr, prev, offset_top, md, eptrb, RM13);
2020        if (rrc == MATCH_ONCE && md->once_target == prev) rrc = MATCH_NOMATCH;        if (rrc == MATCH_ONCE && md->once_target == prev) rrc = MATCH_NOMATCH;
2021        if (rrc != MATCH_NOMATCH) RRETURN(rrc);        if (rrc != MATCH_NOMATCH) RRETURN(rrc);
# Line 3431  for (;;) Line 3428  for (;;)
3428      maximizing, find the maximum number of characters and work backwards. */      maximizing, find the maximum number of characters and work backwards. */
3429    
3430      DPRINTF(("matching %c{%d,%d} against subject %.*s\n", fc, min, max,      DPRINTF(("matching %c{%d,%d} against subject %.*s\n", fc, min, max,
3431        max, eptr));        max, (char *)eptr));
3432    
3433      if (op >= OP_STARI)  /* Caseless */      if (op >= OP_STARI)  /* Caseless */
3434        {        {
# Line 3700  for (;;) Line 3697  for (;;)
3697      characters and work backwards. */      characters and work backwards. */
3698    
3699      DPRINTF(("negative matching %c{%d,%d} against subject %.*s\n", fc, min, max,      DPRINTF(("negative matching %c{%d,%d} against subject %.*s\n", fc, min, max,
3700        max, eptr));        max, (char *)eptr));
3701    
3702      if (op >= OP_NOTSTARI)     /* Caseless */      if (op >= OP_NOTSTARI)     /* Caseless */
3703        {        {

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

  ViewVC Help
Powered by ViewVC 1.1.5