/[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 397 by ph10, Fri Mar 20 19:40:08 2009 UTC revision 398 by ph10, Fri Mar 20 20:41:29 2009 UTC
# Line 61  applications. */ Line 61  applications. */
61  #define SP "                   "  #define SP "                   "
62    
63    
   
64  /*************************************************  /*************************************************
65  *      Code parameters and static tables         *  *      Code parameters and static tables         *
66  *************************************************/  *************************************************/
# Line 2205  for (;;) Line 2204  for (;;)
2204          int condcode;          int condcode;
2205    
2206          /* Because of the way auto-callout works during compile, a callout item          /* Because of the way auto-callout works during compile, a callout item
2207          is inserted between OP_COND and an assertion condition. */          is inserted between OP_COND and an assertion condition. This does not
2208            happen for the other conditions. */
2209    
2210          if (code[LINK_SIZE+1] == OP_CALLOUT)          if (code[LINK_SIZE+1] == OP_CALLOUT)
2211            {            {
2212              rrc = 0;
2213            if (pcre_callout != NULL)            if (pcre_callout != NULL)
2214              {              {
             int rrc;  
2215              pcre_callout_block cb;              pcre_callout_block cb;
2216              cb.version          = 1;   /* Version 1 of the callout block */              cb.version          = 1;   /* Version 1 of the callout block */
2217              cb.callout_number   = code[LINK_SIZE+2];              cb.callout_number   = code[LINK_SIZE+2];
# Line 2226  for (;;) Line 2226  for (;;)
2226              cb.capture_last     = -1;              cb.capture_last     = -1;
2227              cb.callout_data     = md->callout_data;              cb.callout_data     = md->callout_data;
2228              if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc;   /* Abandon */              if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc;   /* Abandon */
             if (rrc == 0) { ADD_ACTIVE(state_offset + _pcre_OP_lengths[OP_CALLOUT], 0); }  
2229              }              }
2230            code += _pcre_OP_lengths[OP_CALLOUT];            if (rrc > 0) break;                      /* Fail this thread */
2231              code += _pcre_OP_lengths[OP_CALLOUT];    /* Skip callout data */
2232            }            }
2233    
2234          condcode = code[LINK_SIZE+1];          condcode = code[LINK_SIZE+1];
2235    
2236          /* Back reference conditions are not supported */          /* Back reference conditions are not supported */
# Line 2240  for (;;) Line 2240  for (;;)
2240          /* The DEFINE condition is always false */          /* The DEFINE condition is always false */
2241    
2242          if (condcode == OP_DEF)          if (condcode == OP_DEF)
2243            {            { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
           ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0);  
           }  
2244    
2245          /* The only supported version of OP_RREF is for the value RREF_ANY,          /* The only supported version of OP_RREF is for the value RREF_ANY,
2246          which means "test if in any recursion". We can't test for specifically          which means "test if in any recursion". We can't test for specifically
# Line 2252  for (;;) Line 2250  for (;;)
2250            {            {
2251            int value = GET2(code, LINK_SIZE+2);            int value = GET2(code, LINK_SIZE+2);
2252            if (value != RREF_ANY) return PCRE_ERROR_DFA_UCOND;            if (value != RREF_ANY) return PCRE_ERROR_DFA_UCOND;
2253            if (recursing > 0) { ADD_ACTIVE(state_offset + LINK_SIZE + 4, 0); }            if (recursing > 0)
2254              else { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }              { ADD_ACTIVE(state_offset + LINK_SIZE + 4, 0); }
2255              else { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
2256            }            }
2257    
2258          /* Otherwise, the condition is an assertion */          /* Otherwise, the condition is an assertion */
# Line 2281  for (;;) Line 2280  for (;;)
2280    
2281            if ((rc >= 0) ==            if ((rc >= 0) ==
2282                  (condcode == OP_ASSERT || condcode == OP_ASSERTBACK))                  (condcode == OP_ASSERT || condcode == OP_ASSERTBACK))
2283              {              { ADD_ACTIVE(endasscode + LINK_SIZE + 1 - start_code, 0); }
             ADD_ACTIVE(endasscode + LINK_SIZE + 1 - start_code, 0);  
             }  
2284            else            else
2285              { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }              { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
2286            }            }
# Line 2456  for (;;) Line 2453  for (;;)
2453          if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc;   /* Abandon */          if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc;   /* Abandon */
2454          }          }
2455        if (rrc == 0)        if (rrc == 0)
2456          { ADD_ACTIVE(state_offset + _pcre_OP_lengths[OP_CALLOUT], 0); }          { ADD_ACTIVE(state_offset + _pcre_OP_lengths[OP_CALLOUT], 0); }
2457        break;        break;
2458    
2459    

Legend:
Removed from v.397  
changed lines
  Added in v.398

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12