Project

General

Profile

Feature #5820 ยป 0001-add-ONIG_SYN_POSIX_BRACKET_ALWAYS_ALL_RANGE-option.patch

k_takata (Ken Takata), 01/06/2012 09:31 PM

View differences:

oniguruma.h
497 497
#define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME_CALL (1U<<10)  /* (?<x>)(?<x>)(?&x) */
498 498

  
499 499
/* syntax (behavior) in char class [...] */
500
#define ONIG_SYN_POSIX_BRACKET_ALWAYS_ALL_RANGE  (1U<<19) /* (?a) doesn't affect POSIX brackets */
500 501
#define ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC      (1U<<20) /* [^...] */
501 502
#define ONIG_SYN_BACKSLASH_ESCAPE_IN_CC          (1U<<21) /* [..\w..] etc.. */
502 503
#define ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC         (1U<<22)
regparse.c
63 63
      ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY |
64 64
      ONIG_SYN_WARN_CC_OP_NOT_ESCAPED |
65 65
      ONIG_SYN_WARN_CC_DUP |
66
      ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT )
66
      ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT |
67
      ONIG_SYN_POSIX_BRACKET_ALWAYS_ALL_RANGE )
67 68
  , ONIG_OPTION_ASCII_RANGE
68 69
  ,
69 70
  {
......
4261 4262
      if (onigenc_with_ascii_strncmp(enc, p, end, (UChar* )":]", 2) != 0)
4262 4263
	return ONIGERR_INVALID_POSIX_BRACKET_TYPE;
4263 4264

  
4264
      r = add_ctype_to_cc(cc, pb->ctype, not, 0, env);
4265
      r = add_ctype_to_cc(cc, pb->ctype, not,
4266
	    IS_SYNTAX_BV(env->syntax, ONIG_SYN_POSIX_BRACKET_ALWAYS_ALL_RANGE),
4267
	    env);
4265 4268
      if (r != 0) return r;
4266 4269

  
4267 4270
      PINC; PINC;
4268
-