/[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 510 by ph10, Sat Mar 27 17:45:29 2010 UTC revision 511 by ph10, Mon Mar 29 09:25:38 2010 UTC
# Line 71  defined PCRE_ERROR_xxx codes, which are Line 71  defined PCRE_ERROR_xxx codes, which are
71  /* Special internal returns from the match() function. Make them sufficiently  /* Special internal returns from the match() function. Make them sufficiently
72  negative to avoid the external error codes. */  negative to avoid the external error codes. */
73    
74  #define MATCH_COMMIT       (-999)  #define MATCH_ACCEPT       (-999)
75  #define MATCH_PRUNE        (-998)  #define MATCH_COMMIT       (-998)
76  #define MATCH_SKIP         (-997)  #define MATCH_PRUNE        (-997)
77  #define MATCH_SKIP_ARG     (-996)  #define MATCH_SKIP         (-996)
78  #define MATCH_THEN         (-995)  #define MATCH_SKIP_ARG     (-995)
79    #define MATCH_THEN         (-994)
80    
81  /* This is a convenience macro for code that occurs many times. */  /* This is a convenience macro for code that occurs many times. */
82    
# Line 1157  for (;;) Line 1158  for (;;)
1158      md->end_match_ptr = eptr;           /* Record where we ended */      md->end_match_ptr = eptr;           /* Record where we ended */
1159      md->end_offset_top = offset_top;    /* and how many extracts were taken */      md->end_offset_top = offset_top;    /* and how many extracts were taken */
1160      md->start_match_ptr = mstart;       /* and the start (\K can modify) */      md->start_match_ptr = mstart;       /* and the start (\K can modify) */
1161      MRRETURN(MATCH_MATCH);      MRRETURN(((op == OP_END)? MATCH_MATCH : MATCH_ACCEPT));
1162    
1163      /* Change option settings */      /* Change option settings */
1164    
# Line 1179  for (;;) Line 1180  for (;;)
1180        {        {
1181        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0,        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0,
1182          RM4);          RM4);
1183        if (rrc == MATCH_MATCH)        if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
1184          {          {
1185          mstart = md->start_match_ptr;   /* In case \K reset it */          mstart = md->start_match_ptr;   /* In case \K reset it */
1186          break;          break;
# Line 1212  for (;;) Line 1213  for (;;)
1213        {        {
1214        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0,        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0,
1215          RM5);          RM5);
1216        if (rrc == MATCH_MATCH) MRRETURN(MATCH_NOMATCH);        if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) MRRETURN(MATCH_NOMATCH);
1217        if (rrc == MATCH_SKIP || rrc == MATCH_PRUNE || rrc == MATCH_COMMIT)        if (rrc == MATCH_SKIP || rrc == MATCH_PRUNE || rrc == MATCH_COMMIT)
1218          {          {
1219          do ecode += GET(ecode,1); while (*ecode == OP_ALT);          do ecode += GET(ecode,1); while (*ecode == OP_ALT);
# Line 1347  for (;;) Line 1348  for (;;)
1348          {          {
1349          RMATCH(eptr, callpat + _pcre_OP_lengths[*callpat], offset_top,          RMATCH(eptr, callpat + _pcre_OP_lengths[*callpat], offset_top,
1350            md, ims, eptrb, flags, RM6);            md, ims, eptrb, flags, RM6);
1351          if (rrc == MATCH_MATCH)          if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
1352            {            {
1353            DPRINTF(("Recursion matched\n"));            DPRINTF(("Recursion matched\n"));
1354            md->recursive = new_recursive.prevrec;            md->recursive = new_recursive.prevrec;
# Line 1393  for (;;) Line 1394  for (;;)
1394      do      do
1395        {        {
1396        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0, RM7);        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0, RM7);
1397        if (rrc == MATCH_MATCH)        if (rrc == MATCH_MATCH)  /* Note: _not_ MATCH_ACCEPT */
1398          {          {
1399          mstart = md->start_match_ptr;          mstart = md->start_match_ptr;
1400          break;          break;
# Line 5823  capturing parentheses than vector slots. Line 5824  capturing parentheses than vector slots.
5824    
5825  ENDLOOP:  ENDLOOP:
5826    
5827  if (rc == MATCH_MATCH)  if (rc == MATCH_MATCH || rc == MATCH_ACCEPT)
5828    {    {
5829    if (using_temporary_offsets)    if (using_temporary_offsets)
5830      {      {

Legend:
Removed from v.510  
changed lines
  Added in v.511

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12