/[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 624 by ph10, Tue Jul 19 10:43:28 2011 UTC revision 629 by ph10, Fri Jul 22 09:18:11 2011 UTC
# Line 409  static const char error_texts[] = Line 409  static const char error_texts[] =
409    "(*MARK) must have an argument\0"    "(*MARK) must have an argument\0"
410    "this version of PCRE is not compiled with PCRE_UCP support\0"    "this version of PCRE is not compiled with PCRE_UCP support\0"
411    "\\c must be followed by an ASCII character\0"    "\\c must be followed by an ASCII character\0"
412      "\\k is not followed by a braced, angle-bracketed, or quoted name\0"
413    ;    ;
414    
415  /* Table to identify digits and hex digits. This is used when compiling  /* Table to identify digits and hex digits. This is used when compiling
# Line 6125  for (;; ptr++) Line 6126  for (;; ptr++)
6126          }          }
6127    
6128        /* \k<name> or \k'name' is a back reference by name (Perl syntax).        /* \k<name> or \k'name' is a back reference by name (Perl syntax).
6129        We also support \k{name} (.NET syntax) */        We also support \k{name} (.NET syntax).  */
6130    
6131        if (-c == ESC_k && (ptr[1] == CHAR_LESS_THAN_SIGN ||        if (-c == ESC_k)
           ptr[1] == CHAR_APOSTROPHE || ptr[1] == CHAR_LEFT_CURLY_BRACKET))  
6132          {          {
6133            if ((ptr[1] != CHAR_LESS_THAN_SIGN &&
6134              ptr[1] != CHAR_APOSTROPHE && ptr[1] != CHAR_LEFT_CURLY_BRACKET))
6135              {
6136              *errorcodeptr = ERR69;
6137              break;
6138              }
6139          is_recurse = FALSE;          is_recurse = FALSE;
6140          terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?          terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
6141            CHAR_GREATER_THAN_SIGN : (*ptr == CHAR_APOSTROPHE)?            CHAR_GREATER_THAN_SIGN : (*ptr == CHAR_APOSTROPHE)?
6142            CHAR_APOSTROPHE : CHAR_RIGHT_CURLY_BRACKET;            CHAR_APOSTROPHE : CHAR_RIGHT_CURLY_BRACKET;
6143          goto NAMED_REF_OR_RECURSE;          goto NAMED_REF_OR_RECURSE;
6144          }          }
6145    
6146        /* Back references are handled specially; must disable firstbyte if        /* Back references are handled specially; must disable firstbyte if
6147        not set to cope with cases like (?=(\w+))\1: which would otherwise set        not set to cope with cases like (?=(\w+))\1: which would otherwise set

Legend:
Removed from v.624  
changed lines
  Added in v.629

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12