/[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 1252 by ph10, Sat Dec 8 12:43:37 2012 UTC revision 1253 by ph10, Fri Feb 22 11:38:35 2013 UTC
# Line 797  Otherwise further processing may be requ Line 797  Otherwise further processing may be requ
797  #ifndef EBCDIC  /* ASCII/UTF-8 coding */  #ifndef EBCDIC  /* ASCII/UTF-8 coding */
798  /* Not alphanumeric */  /* Not alphanumeric */
799  else if (c < CHAR_0 || c > CHAR_z) {}  else if (c < CHAR_0 || c > CHAR_z) {}
800  else if ((i = escapes[c - CHAR_0]) != 0) { if (i > 0) c = (pcre_uint32)i; else escape = -i; }  else if ((i = escapes[c - CHAR_0]) != 0)
801      { if (i > 0) c = (pcre_uint32)i; else escape = -i; }
802    
803  #else           /* EBCDIC coding */  #else           /* EBCDIC coding */
804  /* Not alphanumeric */  /* Not alphanumeric */
# Line 3094  value is a character, a negative value i Line 3095  value is a character, a negative value i
3095  if (*ptr == CHAR_BACKSLASH)  if (*ptr == CHAR_BACKSLASH)
3096    {    {
3097    int temperrorcode = 0;    int temperrorcode = 0;
3098    escape = check_escape(&ptr, &next, &temperrorcode, cd->bracount, options, FALSE);    escape = check_escape(&ptr, &next, &temperrorcode, cd->bracount, options,
3099        FALSE);
3100    if (temperrorcode != 0) return FALSE;    if (temperrorcode != 0) return FALSE;
3101    ptr++;    /* Point after the escape sequence */    ptr++;    /* Point after the escape sequence */
3102    }    }
# Line 4277  for (;; ptr++) Line 4279  for (;; ptr++)
4279    
4280        if (c == CHAR_BACKSLASH)        if (c == CHAR_BACKSLASH)
4281          {          {
4282          escape = check_escape(&ptr, &ec, errorcodeptr, cd->bracount, options, TRUE);          escape = check_escape(&ptr, &ec, errorcodeptr, cd->bracount, options,
4283              TRUE);
4284          if (*errorcodeptr != 0) goto FAILED;          if (*errorcodeptr != 0) goto FAILED;
4285            if (escape == 0) c = ec;
         if (escape == 0)  
           c = ec;  
4286          else if (escape == ESC_b) c = CHAR_BS; /* \b is backspace in a class */          else if (escape == ESC_b) c = CHAR_BS; /* \b is backspace in a class */
4287          else if (escape == ESC_N)            /* \N is not supported in a class */          else if (escape == ESC_N)          /* \N is not supported in a class */
4288            {            {
4289            *errorcodeptr = ERR71;            *errorcodeptr = ERR71;
4290            goto FAILED;            goto FAILED;
# Line 6718  for (;; ptr++) Line 6718  for (;; ptr++)
6718      case CHAR_BACKSLASH:      case CHAR_BACKSLASH:
6719      tempptr = ptr;      tempptr = ptr;
6720      escape = check_escape(&ptr, &ec, errorcodeptr, cd->bracount, options, FALSE);      escape = check_escape(&ptr, &ec, errorcodeptr, cd->bracount, options, FALSE);
   
6721      if (*errorcodeptr != 0) goto FAILED;      if (*errorcodeptr != 0) goto FAILED;
6722    
6723      if (escape == 0)      if (escape == 0)                  /* The escape coded a single character */
6724        c = ec;        c = ec;
6725      else      else
6726        {        {
# Line 6887  for (;; ptr++) Line 6886  for (;; ptr++)
6886        can obtain the OP value by negating the escape value in the default        can obtain the OP value by negating the escape value in the default
6887        situation when PCRE_UCP is not set. When it *is* set, we substitute        situation when PCRE_UCP is not set. When it *is* set, we substitute
6888        Unicode property tests. Note that \b and \B do a one-character        Unicode property tests. Note that \b and \B do a one-character
6889        lookbehind. */        lookbehind, and \A also behaves as if it does. */
6890    
6891        else        else
6892          {          {
6893          if ((escape == ESC_b || escape == ESC_B) && cd->max_lookbehind == 0)          if ((escape == ESC_b || escape == ESC_B || escape == ESC_A) &&
6894                 cd->max_lookbehind == 0)
6895            cd->max_lookbehind = 1;            cd->max_lookbehind = 1;
6896  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
6897          if (escape >= ESC_DU && escape <= ESC_wu)          if (escape >= ESC_DU && escape <= ESC_wu)

Legend:
Removed from v.1252  
changed lines
  Added in v.1253

  ViewVC Help
Powered by ViewVC 1.1.5