/[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 1609 by ph10, Mon Nov 23 12:39:23 2015 UTC revision 1611 by ph10, Thu Nov 26 20:29:13 2015 UTC
# Line 4699  for (;; ptr++) Line 4699  for (;; ptr++)
4699        }        }
4700      }      }
4701    
4702      /* Skip over (?# comments. We need to do this here because we want to know if
4703      the next thing is a quantifier, and these comments may come between an item
4704      and its quantifier. */
4705    
4706      if (c == CHAR_LEFT_PARENTHESIS && ptr[1] == CHAR_QUESTION_MARK &&
4707          ptr[2] == CHAR_NUMBER_SIGN)
4708        {
4709        ptr += 3;
4710        while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
4711        if (*ptr == CHAR_NULL)
4712          {
4713          *errorcodeptr = ERR18;
4714          goto FAILED;
4715          }
4716        continue;
4717        }
4718    
4719    /* See if the next thing is a quantifier. */    /* See if the next thing is a quantifier. */
4720    
4721    is_quantifier =    is_quantifier =
# Line 6529  for (;; ptr++) Line 6546  for (;; ptr++)
6546      case CHAR_LEFT_PARENTHESIS:      case CHAR_LEFT_PARENTHESIS:
6547      ptr++;      ptr++;
6548    
     /* First deal with comments. Putting this code right at the start ensures  
     that comments have no bad side effects. */  
   
     if (ptr[0] == CHAR_QUESTION_MARK && ptr[1] == CHAR_NUMBER_SIGN)  
       {  
       ptr += 2;  
       while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;  
       if (*ptr == CHAR_NULL)  
         {  
         *errorcodeptr = ERR18;  
         goto FAILED;  
         }  
       continue;  
       }  
   
6549      /* Now deal with various "verbs" that can be introduced by '*'. */      /* Now deal with various "verbs" that can be introduced by '*'. */
6550    
6551      if (ptr[0] == CHAR_ASTERISK && (ptr[1] == ':'      if (ptr[0] == CHAR_ASTERISK && (ptr[1] == ':'

Legend:
Removed from v.1609  
changed lines
  Added in v.1611

  ViewVC Help
Powered by ViewVC 1.1.5