Project

General

Profile

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

k_takata (Ken Takata), 12/31/2011 11:48 PM

View differences:

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

  
534 534
/* syntax (behavior) in char class [...] */
535
#define ONIG_SYN_POSIX_BRACKET_ALWAYS_ALL_RANGE  (1U<<19) /* (?a) doesn't affect POSIX brackets */
535 536
#define ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC      (1U<<20) /* [^...] */
536 537
#define ONIG_SYN_BACKSLASH_ESCAPE_IN_CC          (1U<<21) /* [..\w..] etc.. */
537 538
#define ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC         (1U<<22)
regparse.c
63 63
      ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME |
64 64
      ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY |
65 65
      ONIG_SYN_WARN_CC_OP_NOT_ESCAPED |
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
  {
......
4181 4182
      if (onigenc_with_ascii_strncmp(enc, p, end, (UChar* )":]", 2) != 0)
4182 4183
	return ONIGERR_INVALID_POSIX_BRACKET_TYPE;
4183 4184

  
4184
      r = add_ctype_to_cc(cc, pb->ctype, not, 0, env);
4185
      r = add_ctype_to_cc(cc, pb->ctype, not,
4186
	    IS_SYNTAX_BV(env->syntax, ONIG_SYN_POSIX_BRACKET_ALWAYS_ALL_RANGE),
4187
	    env);
4185 4188
      if (r != 0) return r;
4186 4189

  
4187 4190
      PINC; PINC;
4188
-