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

Diff of /code/trunk/pcre_compile.c

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

revision 369 by ph10, Sun Aug 24 16:53:47 2008 UTC revision 380 by ph10, Tue Mar 3 12:32:47 2009 UTC
# Line 4926  we set the flag only if there is a liter Line 4926  we set the flag only if there is a liter
4926          both phases.          both phases.
4927    
4928          If we are not at the pattern start, compile code to change the ims          If we are not at the pattern start, compile code to change the ims
4929          options if this setting actually changes any of them, and reset the          options if this setting actually changes any of them, and reset the
4930          greedy defaults and the case value for firstbyte and reqbyte. */          greedy defaults and the case value for firstbyte and reqbyte. */
4931    
4932          if (*ptr == ')')          if (*ptr == ')')
# Line 4950  we set the flag only if there is a liter Line 4950  we set the flag only if there is a liter
4950    
4951            /* Change options at this level, and pass them back for use            /* Change options at this level, and pass them back for use
4952            in subsequent branches. When not at the start of the pattern, this            in subsequent branches. When not at the start of the pattern, this
4953            information is also necessary so that a resetting item can be            information is also necessary so that a resetting item can be
4954            compiled at the end of a group (if we are in a group). */            compiled at the end of a group (if we are in a group). */
4955    
4956            *optionsptr = options = newoptions;            *optionsptr = options = newoptions;
# Line 5810  do { Line 5810  do {
5810     const uschar *scode = first_significant_code(code + _pcre_OP_lengths[*code],     const uschar *scode = first_significant_code(code + _pcre_OP_lengths[*code],
5811       NULL, 0, FALSE);       NULL, 0, FALSE);
5812     register int op = *scode;     register int op = *scode;
5813    
5814       /* If we are at the start of a conditional group, skip over the condition.
5815       before inspecting the first opcode after the condition. */
5816    
5817       if (op == OP_COND)
5818         {
5819         scode += 1 + LINK_SIZE;
5820         switch (*scode)
5821           {
5822           case OP_CREF:
5823           case OP_RREF:
5824           scode += 3;
5825           break;
5826    
5827           case OP_DEF:
5828           scode += 1;
5829           break;
5830    
5831           default:     /* Assertion */
5832           do scode += GET(scode, 1); while (*scode == OP_ALT);
5833           break;
5834           }
5835    
5836         scode = first_significant_code(scode, NULL, 0, FALSE);
5837         op = *scode;
5838         }
5839    
5840     /* Non-capturing brackets */     /* Non-capturing brackets */
5841    
# Line 5829  do { Line 5855  do {
5855    
5856     /* Other brackets */     /* Other brackets */
5857    
5858     else if (op == OP_ASSERT || op == OP_ONCE || op == OP_COND)     else if (op == OP_ASSERT || op == OP_ONCE)
5859       { if (!is_startline(scode, bracket_map, backref_map)) return FALSE; }       {
5860         if (!is_startline(scode, bracket_map, backref_map)) return FALSE;
5861         }
5862    
5863     /* .* means "start at start or after \n" if it isn't in brackets that     /* .* means "start at start or after \n" if it isn't in brackets that
5864     may be referenced. */     may be referenced. */

Legend:
Removed from v.369  
changed lines
  Added in v.380

  ViewVC Help
Powered by ViewVC 1.1.5