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
#define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME_CALL (1U<<10) /* (?<x>)(?<x>)(?&x) */
/* syntax (behavior) in char class [...] */
#define ONIG_SYN_POSIX_BRACKET_ALWAYS_ALL_RANGE (1U<<19) /* (?a) doesn't affect POSIX brackets */
#define ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC (1U<<20) /* [^...] */
#define ONIG_SYN_BACKSLASH_ESCAPE_IN_CC (1U<<21) /* [..\w..] etc.. */
#define ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC (1U<<22)
regparse.c
ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME |
ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY |
ONIG_SYN_WARN_CC_OP_NOT_ESCAPED |
ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT )
ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT |
ONIG_SYN_POSIX_BRACKET_ALWAYS_ALL_RANGE )
, ONIG_OPTION_ASCII_RANGE
,
{
......
if (onigenc_with_ascii_strncmp(enc, p, end, (UChar* )":]", 2) != 0)
return ONIGERR_INVALID_POSIX_BRACKET_TYPE;
r = add_ctype_to_cc(cc, pb->ctype, not, 0, env);
r = add_ctype_to_cc(cc, pb->ctype, not,
IS_SYNTAX_BV(env->syntax, ONIG_SYN_POSIX_BRACKET_ALWAYS_ALL_RANGE),
env);
if (r != 0) return r;
PINC; PINC;
(1-1/5)