Ruby
2.0.0p451(2014-02-24revision45167)
|
Go to the source code of this file.
Data Structures | |
struct | st_str_end_key |
struct | NameEntry |
struct | INamesArg |
struct | _FreeNode |
struct | OnigToken |
struct | type_cclass_key |
struct | IApplyCaseFoldArg |
Typedefs | |
typedef st_table | NameTable |
typedef st_data_t | HashDataType |
typedef struct _FreeNode | FreeNode |
Enumerations | |
enum | ReduceType { RQ_ASIS = 0, RQ_DEL = 1, RQ_A, RQ_AQ, RQ_QQ, RQ_P_QQ, RQ_PQ_Q } |
enum | TokenSyms { TK_EOT = 0, TK_RAW_BYTE = 1, TK_CHAR, TK_STRING, TK_CODE_POINT, TK_ANYCHAR, TK_CHAR_TYPE, TK_BACKREF, TK_CALL, TK_ANCHOR, TK_OP_REPEAT, TK_INTERVAL, TK_ANYCHAR_ANYTIME, TK_ALT, TK_SUBEXP_OPEN, TK_SUBEXP_CLOSE, TK_CC_OPEN, TK_QUOTE_OPEN, TK_CHAR_PROPERTY, TK_LINEBREAK, TK_EXTENDED_GRAPHEME_CLUSTER, TK_KEEP, TK_CC_CLOSE, TK_CC_RANGE, TK_POSIX_BRACKET_OPEN, TK_CC_AND, TK_CC_CC_OPEN } |
enum | CCSTATE { CCS_VALUE, CCS_RANGE, CCS_COMPLETE, CCS_START } |
enum | CCVALTYPE { CCV_SB, CCV_CODE_POINT, CCV_CLASS } |
Variables | |
const OnigSyntaxType | OnigSyntaxRuby |
const OnigSyntaxType * | OnigDefaultSyntax = ONIG_SYNTAX_RUBY |
static OnigWarnFunc | onig_warn = onig_null_warn |
static OnigWarnFunc | onig_verb_warn = onig_null_warn |
static FreeNode * | FreeNodeList = (FreeNode* )NULL |
static enum ReduceType const | ReduceTypeTable [6][6] |
static const char *const | PopularQStr [] |
static const char *const | ReduceQStr [] |
static const struct st_hash_type | type_type_cclass_hash |
static st_table * | OnigTypeCClassTable |
#define ADD_ALL_MULTI_BYTE_RANGE | ( | enc, | |
mbuf | |||
) |
Definition at line 143 of file regparse.c.
Referenced by add_ctype_to_cc().
Definition at line 132 of file regparse.c.
Referenced by fetch_named_backref_token(), parse_enclose(), and parse_exp().
#define BBUF_WRITE_CODE_POINT | ( | bbuf, | |
pos, | |||
code | |||
) | BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT) |
Definition at line 1708 of file regparse.c.
Referenced by add_code_range_to_buf0(), and new_code_range().
#define BITSET_IS_EMPTY | ( | bs, | |
empty | |||
) |
Definition at line 156 of file regparse.c.
Referenced by parse_char_class().
#define BITSET_SET_BIT_CHKDUP | ( | bs, | |
pos | |||
) |
Definition at line 151 of file regparse.c.
Referenced by add_ctype_to_cc(), add_ctype_to_cc_by_range(), bitset_set_range(), next_state_class(), next_state_val(), and parse_char_class().
#define CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS |
Definition at line 35 of file regparse.c.
Referenced by i_apply_case_fold().
#define INIT_MULTI_BYTE_RANGE_SIZE (SIZE_CODE_POINT * 5) |
Referenced by new_code_range().
#define INIT_NAME_BACKREFS_ALLOC_NUM 8 |
Definition at line 412 of file regparse.c.
Referenced by name_add().
#define INIT_SCANENV_MEMNODES_ALLOC_SIZE 16 |
Definition at line 941 of file regparse.c.
Referenced by scan_env_add_mem_entry().
#define is_invalid_quantifier_target | ( | node | ) | 0 |
Definition at line 2186 of file regparse.c.
Referenced by parse_exp().
#define MBCODE_START_POS | ( | enc | ) | (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80) |
Definition at line 137 of file regparse.c.
Referenced by not_code_range_buf().
#define NEWLINE_CODE 0x0a |
Referenced by parse_char_class().
Definition at line 135 of file regparse.c.
Referenced by node_extended_grapheme_cluster(), and parse_enclose().
#define PEND (p < end ? 0 : 1) |
Definition at line 272 of file regparse.c.
Referenced by code_exist_check(), fetch_char_property_to_ctype(), fetch_escaped_value(), fetch_name(), fetch_name_with_level(), fetch_range_quantifier(), fetch_token(), fetch_token_in_cc(), onig_scan_unsigned_number(), parse_enclose(), parse_posix_bracket(), scan_unsigned_hexadecimal_number(), and scan_unsigned_octal_number().
#define PEND_VALUE 0 |
Definition at line 264 of file regparse.c.
#define PFETCH | ( | c | ) |
Definition at line 278 of file regparse.c.
Referenced by code_exist_check(), fetch_char_property_to_ctype(), fetch_escaped_value(), fetch_name(), fetch_name_with_level(), fetch_range_quantifier(), fetch_token(), fetch_token_in_cc(), onig_scan_unsigned_number(), parse_enclose(), parse_posix_bracket(), scan_unsigned_hexadecimal_number(), and scan_unsigned_octal_number().
#define PFETCH_READY UChar* pfetch_prev |
Definition at line 270 of file regparse.c.
Referenced by code_exist_check(), fetch_char_property_to_ctype(), fetch_escaped_value(), fetch_name(), fetch_name_with_level(), fetch_range_quantifier(), fetch_token(), fetch_token_in_cc(), onig_scan_unsigned_number(), parse_enclose(), parse_posix_bracket(), scan_unsigned_hexadecimal_number(), and scan_unsigned_octal_number().
#define PINC |
Definition at line 274 of file regparse.c.
Referenced by fetch_token(), fetch_token_in_cc(), parse_enclose(), and parse_posix_bracket().
#define POSIX_BRACKET_CHECK_LIMIT_LENGTH 20 |
Referenced by parse_posix_bracket().
#define POSIX_BRACKET_NAME_MIN_LEN 4 |
Referenced by parse_posix_bracket().
#define PPEEK (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE) |
Definition at line 284 of file regparse.c.
Referenced by fetch_range_quantifier(), fetch_token(), fetch_token_in_cc(), and parse_posix_bracket().
#define PPEEK_IS | ( | c | ) | (PPEEK == (OnigCodePoint )c) |
Definition at line 285 of file regparse.c.
Referenced by fetch_token(), fetch_token_in_cc(), parse_enclose(), and parse_posix_bracket().
#define PUNFETCH p = pfetch_prev |
Definition at line 273 of file regparse.c.
Referenced by fetch_name_with_level(), fetch_range_quantifier(), fetch_token(), fetch_token_in_cc(), onig_scan_unsigned_number(), parse_enclose(), scan_unsigned_hexadecimal_number(), and scan_unsigned_octal_number().
#define SET_ALL_MULTI_BYTE_RANGE | ( | enc, | |
pbuf | |||
) | add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT) |
Definition at line 140 of file regparse.c.
Referenced by not_code_range_buf(), and or_code_range_buf().
#define SWAP_BBUF_NOT | ( | bbuf1, | |
not1, | |||
bbuf2, | |||
not2 | |||
) |
Definition at line 1879 of file regparse.c.
Referenced by and_code_range_buf(), and or_code_range_buf().
#define THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS 8 |
Definition at line 5353 of file regparse.c.
Referenced by parse_exp().
#define WARN_BUFSIZE 256 |
Definition at line 33 of file regparse.c.
Referenced by onig_syntax_warn(), and set_quantifier().
typedef st_data_t HashDataType |
Definition at line 426 of file regparse.c.
Definition at line 425 of file regparse.c.
enum CCSTATE |
Enumerator | |
---|---|
CCS_VALUE | |
CCS_RANGE | |
CCS_COMPLETE | |
CCS_START |
Definition at line 4367 of file regparse.c.
enum CCVALTYPE |
Enumerator | |
---|---|
CCV_SB | |
CCV_CODE_POINT | |
CCV_CLASS |
Definition at line 4374 of file regparse.c.
enum ReduceType |
Enumerator | |
---|---|
RQ_ASIS | |
RQ_DEL | |
RQ_A | |
RQ_AQ | |
RQ_QQ | |
RQ_P_QQ | |
RQ_PQ_Q |
Definition at line 2247 of file regparse.c.
enum TokenSyms |
Definition at line 2317 of file regparse.c.
|
static |
Definition at line 1839 of file regparse.c.
References add_code_range0().
Referenced by add_ctype_to_cc(), next_state_class(), next_state_val(), node_linebreak(), and parse_char_class().
|
static |
Definition at line 1826 of file regparse.c.
References add_code_range_to_buf0(), IS_SYNTAX_BV, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC, ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS, and ScanEnv::syntax.
Referenced by add_code_range(), and i_apply_case_fold().
|
static |
Definition at line 1820 of file regparse.c.
References add_code_range_to_buf0().
Referenced by add_ctype_to_cc_by_range(), and_code_range1(), and_code_range_buf(), not_code_range_buf(), and or_code_range_buf().
|
static |
Definition at line 1734 of file regparse.c.
References BBUF_ENSURE_SIZE, BBUF_MOVE_LEFT_REDUCE, BBUF_MOVE_RIGHT, BBUF_WRITE_CODE_POINT, CC_DUP_WARN(), GET_CODE_POINT, IS_NULL, new_code_range(), ONIG_LAST_CODE_POINT, ONIG_MAX_MULTI_BYTE_RANGES_NUM, ONIGERR_TOO_MANY_MULTI_BYTE_RANGES, _BBuf::p, size, and SIZE_CODE_POINT.
Referenced by add_code_range0(), add_code_range_to_buf(), and add_ctype_to_cc().
|
static |
Definition at line 4111 of file regparse.c.
References ADD_ALL_MULTI_BYTE_RANGE, add_code_range(), add_code_range_to_buf0(), add_ctype_to_cc_by_range(), and_cclass(), bbuf_free(), BITSET_SET_BIT_CHKDUP, bitset_set_range(), CClassNode::bs, c, ScanEnv::enc, FALSE, initialize_cclass(), IS_ASCII_RANGE, IS_NOT_NULL, CClassNode::mbuf, ONIG_LAST_CODE_POINT, ONIG_NO_SUPPORT_CONFIG, ONIGENC_CODE_TO_MBCLEN, ONIGENC_CTYPE_ALNUM, ONIGENC_CTYPE_ALPHA, ONIGENC_CTYPE_ASCII, ONIGENC_CTYPE_BLANK, ONIGENC_CTYPE_CNTRL, ONIGENC_CTYPE_DIGIT, ONIGENC_CTYPE_GRAPH, ONIGENC_CTYPE_LOWER, ONIGENC_CTYPE_PRINT, ONIGENC_CTYPE_PUNCT, ONIGENC_CTYPE_SPACE, ONIGENC_CTYPE_UPPER, ONIGENC_CTYPE_WORD, ONIGENC_CTYPE_XDIGIT, ONIGENC_GET_CTYPE_CODE_RANGE, ONIGENC_IS_CODE_CTYPE, ONIGENC_IS_CODE_WORD, ONIGENC_MBC_MINLEN, ONIGERR_PARSER_BUG, ScanEnv::option, or_cclass(), and SINGLE_BYTE_SIZE.
Referenced by node_extended_grapheme_cluster(), parse_char_class(), parse_char_property(), parse_exp(), and parse_posix_bracket().
|
static |
Definition at line 4038 of file regparse.c.
References add_code_range_to_buf(), BITSET_SET_BIT_CHKDUP, CClassNode::bs, i, CClassNode::mbuf, ONIGENC_CODE_RANGE_FROM, ONIGENC_CODE_RANGE_NUM, and ONIGENC_CODE_RANGE_TO.
Referenced by add_ctype_to_cc().
|
static |
Definition at line 2041 of file regparse.c.
References and_code_range_buf(), bbuf_free(), bitset_and(), bitset_copy(), bitset_invert(), bitset_invert_to(), CClassNode::bs, ScanEnv::enc, IS_NCCLASS_NOT, CClassNode::mbuf, not_code_range_buf(), ONIGENC_IS_SINGLEBYTE, and or_code_range_buf().
Referenced by add_ctype_to_cc(), and parse_char_class().
|
static |
Definition at line 1944 of file regparse.c.
References add_code_range_to_buf(), and i.
Referenced by and_code_range_buf().
|
static |
Definition at line 1984 of file regparse.c.
References add_code_range_to_buf(), and_code_range1(), bbuf_clone(), GET_CODE_POINT, i, IS_NOT_NULL, IS_NULL, MAX, MIN, NULL, _BBuf::p, and SWAP_BBUF_NOT.
Referenced by and_cclass(), and or_cclass().
Definition at line 118 of file regparse.c.
References _BBuf::alloc, BBUF_INIT, CHECK_NULL_RETURN_MEMERR, _BBuf::p, _BBuf::used, xmalloc, and xmemcpy.
Referenced by and_code_range_buf(), and or_code_range_buf().
|
static |
Definition at line 109 of file regparse.c.
References IS_NOT_NULL, _BBuf::p, and xfree.
Referenced by add_ctype_to_cc(), and_cclass(), onig_node_free(), or_cclass(), and parse_char_class().
Definition at line 199 of file regparse.c.
References BITSET_SIZE, and i.
Referenced by and_cclass().
Definition at line 213 of file regparse.c.
References BITSET_SIZE, and i.
Referenced by and_cclass(), and or_cclass().
|
static |
Definition at line 185 of file regparse.c.
References BITSET_SIZE, and i.
Referenced by and_cclass(), and or_cclass().
Definition at line 192 of file regparse.c.
References BITSET_SIZE, and i.
Referenced by and_cclass(), and or_cclass().
Definition at line 206 of file regparse.c.
References BITSET_SIZE, and i.
Referenced by or_cclass().
Definition at line 167 of file regparse.c.
References BITSET_SET_BIT_CHKDUP, i, and SINGLE_BYTE_SIZE.
Referenced by add_ctype_to_cc(), next_state_val(), and node_linebreak().
|
static |
Definition at line 2931 of file regparse.c.
References IS_SYNTAX_BV, onig_null_warn(), ONIG_SYN_WARN_CC_DUP, onig_syntax_warn(), onig_warn, return, RTEST, ruby_verbose, ScanEnv::syntax, and ScanEnv::warnings_flag.
Referenced by add_code_range_to_buf0().
Definition at line 2910 of file regparse.c.
References IS_SYNTAX_BV, onig_null_warn(), ONIG_SYN_BACKSLASH_ESCAPE_IN_CC, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED, onig_syntax_warn(), onig_warn, return, and ScanEnv::syntax.
Referenced by fetch_token_in_cc(), and parse_char_class().
Definition at line 2921 of file regparse.c.
References IS_SYNTAX_BV, onig_null_warn(), ONIG_SYN_WARN_CC_OP_NOT_ESCAPED, onig_syntax_warn(), onig_warn, return, and ScanEnv::syntax.
Referenced by fetch_token().
|
static |
Definition at line 4479 of file regparse.c.
References ScanEnv::enc, MC_ESC, PEND, PFETCH, PFETCH_READY, ScanEnv::syntax, and UChar.
Referenced by parse_char_class().
|
static |
Definition at line 2160 of file regparse.c.
References c, IS_SYNTAX_OP, IS_SYNTAX_OP2, ONIG_SYN_OP2_ESC_V_VTAB, ONIG_SYN_OP_ESC_CONTROL_CHARS, ScanEnv::syntax, and UNKNOWN_ESC_WARN().
Referenced by fetch_escaped_value().
|
static |
Definition at line 5684 of file regparse.c.
Referenced by is_onechar_cclass().
Definition at line 4315 of file regparse.c.
References c, ScanEnv::enc, onig_scan_env_set_error_string(), ONIGENC_PROPERTY_NAME_TO_CTYPE, ONIGERR_INVALID_CHAR_PROPERTY_NAME, p, PEND, PFETCH, PFETCH_READY, and UChar.
Referenced by parse_char_class(), and parse_char_property().
Definition at line 2483 of file regparse.c.
References c, conv_backslash_value(), ScanEnv::enc, IS_SYNTAX_OP, IS_SYNTAX_OP2, MC_ESC, ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL, ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META, ONIG_SYN_OP_ESC_C_CONTROL, ONIGERR_CONTROL_CODE_SYNTAX, ONIGERR_END_PATTERN_AT_CONTROL, ONIGERR_END_PATTERN_AT_ESCAPE, ONIGERR_END_PATTERN_AT_META, ONIGERR_META_CODE_SYNTAX, p, PEND, PFETCH, PFETCH_READY, ScanEnv::syntax, UChar, and v.
Referenced by fetch_token(), and fetch_token_in_cc().
|
static |
Definition at line 2694 of file regparse.c.
References c, ScanEnv::enc, err, get_name_end_code_point(), onig_scan_env_set_error_string(), onig_scan_unsigned_number(), ONIGENC_IS_CODE_DIGIT, ONIGENC_IS_CODE_WORD, ONIGERR_EMPTY_GROUP_NAME, ONIGERR_INVALID_CHAR_IN_GROUP_NAME, ONIGERR_INVALID_GROUP_NAME, ONIGERR_TOO_BIG_NUMBER, p, PEND, PFETCH, PFETCH_READY, and UChar.
Referenced by fetch_named_backref_token(), fetch_token(), and parse_enclose().
|
static |
Definition at line 2580 of file regparse.c.
References c, ScanEnv::enc, err, get_name_end_code_point(), level, onig_scan_env_set_error_string(), onig_scan_unsigned_number(), ONIGENC_IS_CODE_DIGIT, ONIGENC_IS_CODE_WORD, ONIGERR_EMPTY_GROUP_NAME, ONIGERR_INVALID_CHAR_IN_GROUP_NAME, ONIGERR_INVALID_GROUP_NAME, ONIGERR_TOO_BIG_NUMBER, p, PEND, PFETCH, PFETCH_READY, PUNFETCH, and UChar.
Referenced by fetch_named_backref_token().
|
static |
Definition at line 3240 of file regparse.c.
References OnigToken::backref, BACKREF_REL_TO_ABS, fetch_name(), fetch_name_with_level(), i, IS_NULL, IS_SYNTAX_BV, NULL_UCHARP, ScanEnv::num_mem, onig_name_to_group_numbers(), onig_scan_env_set_error_string(), ONIG_SYN_STRICT_CHECK_BACKREF, ONIGERR_INVALID_BACKREF, ONIGERR_UNDEFINED_NAME_REFERENCE, p, ScanEnv::reg, SCANENV_MEM_NODES, ScanEnv::syntax, TK_BACKREF, OnigToken::type, OnigToken::u, and UChar.
Referenced by fetch_token().
|
static |
Definition at line 2392 of file regparse.c.
References c, ScanEnv::enc, IS_REPEAT_INFINITE, IS_SYNTAX_BV, IS_SYNTAX_OP, MC_ESC, ONIG_MAX_REPEAT_NUM, onig_scan_unsigned_number(), ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV, ONIG_SYN_ALLOW_INVALID_INTERVAL, ONIG_SYN_OP_ESC_BRACE_INTERVAL, ONIGERR_END_PATTERN_AT_LEFT_BRACE, ONIGERR_INVALID_REPEAT_RANGE_PATTERN, ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE, ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE, p, PEND, PFETCH, PFETCH_READY, PPEEK, PUNFETCH, OnigToken::repeat, REPEAT_INFINITE, ScanEnv::syntax, TK_INTERVAL, OnigToken::type, OnigToken::u, and UChar.
Referenced by fetch_token().
Definition at line 3314 of file regparse.c.
References OnigToken::anchor, ANCHOR_BEGIN_BUF, ANCHOR_BEGIN_LINE, ANCHOR_BEGIN_POSITION, ANCHOR_END_BUF, ANCHOR_END_LINE, ANCHOR_NOT_WORD_BOUND, ANCHOR_SEMI_END_BUF, ANCHOR_WORD_BEGIN, ANCHOR_WORD_BOUND, ANCHOR_WORD_END, OnigToken::backp, OnigToken::backref, OnigToken::base, OnigToken::c, c, OnigToken::call, CLOSE_BRACKET_WITHOUT_ESC_WARN(), OnigToken::code, ScanEnv::enc, enclen, OnigToken::escaped, fetch_escaped_value(), fetch_name(), fetch_named_backref_token(), fetch_range_quantifier(), get_name_end_code_point(), IS_ASCII_RANGE, IS_EXTEND, IS_MC_ESC_CODE, IS_NULL, IS_SINGLELINE, IS_SYNTAX_BV, IS_SYNTAX_OP, IS_SYNTAX_OP2, IS_WORD_BOUND_ALL_RANGE, MC_ANYCHAR, MC_ANYCHAR_ANYTIME, MC_ANYTIME, MC_ESC, MC_ONE_OR_MORE_TIME, MC_ZERO_OR_ONE_TIME, name, ScanEnv::num_mem, ONIG_INEFFECTIVE_META_CHAR, ONIG_MAX_BACKREF_NUM, onig_scan_unsigned_number(), ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY, ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP, ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE, ONIG_SYN_OP2_ESC_CAPITAL_R_LINEBREAK, ONIG_SYN_OP2_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER, ONIG_SYN_OP2_ESC_G_BRACE_BACKREF, ONIG_SYN_OP2_ESC_G_SUBEXP_CALL, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR, ONIG_SYN_OP2_ESC_H_XDIGIT, ONIG_SYN_OP2_ESC_K_NAMED_BACKREF, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT, ONIG_SYN_OP2_ESC_U_HEX4, ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL, ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT, ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP, ONIG_SYN_OP2_QMARK_GROUP_EFFECT, ONIG_SYN_OP2_QMARK_SUBEXP_CALL, ONIG_SYN_OP_ASTERISK_ZERO_INF, ONIG_SYN_OP_BRACE_INTERVAL, ONIG_SYN_OP_BRACKET_CC, ONIG_SYN_OP_DECIMAL_BACKREF, ONIG_SYN_OP_DOT_ANYCHAR, ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR, ONIG_SYN_OP_ESC_B_WORD_BOUND, ONIG_SYN_OP_ESC_BRACE_INTERVAL, ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR, ONIG_SYN_OP_ESC_D_DIGIT, ONIG_SYN_OP_ESC_LPAREN_SUBEXP, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END, ONIG_SYN_OP_ESC_OCTAL3, ONIG_SYN_OP_ESC_PLUS_ONE_INF, ONIG_SYN_OP_ESC_QMARK_ZERO_ONE, ONIG_SYN_OP_ESC_S_WHITE_SPACE, ONIG_SYN_OP_ESC_VBAR_ALT, ONIG_SYN_OP_ESC_W_WORD, ONIG_SYN_OP_ESC_X_BRACE_HEX8, ONIG_SYN_OP_ESC_X_HEX2, ONIG_SYN_OP_LINE_ANCHOR, ONIG_SYN_OP_LPAREN_SUBEXP, ONIG_SYN_OP_PLUS_ONE_INF, ONIG_SYN_OP_QMARK_NON_GREEDY, ONIG_SYN_OP_QMARK_ZERO_ONE, ONIG_SYN_OP_VARIABLE_META_CHARACTERS, ONIG_SYN_OP_VBAR_ALT, ONIG_SYN_STRICT_CHECK_BACKREF, onig_syntax_warn(), ONIGENC_CTYPE_DIGIT, ONIGENC_CTYPE_SPACE, ONIGENC_CTYPE_WORD, ONIGENC_CTYPE_XDIGIT, ONIGENC_IS_CODE_DIGIT, ONIGENC_IS_CODE_NEWLINE, ONIGENC_IS_CODE_XDIGIT, ONIGERR_END_PATTERN_AT_ESCAPE, ONIGERR_END_PATTERN_IN_GROUP, ONIGERR_INVALID_BACKREF, ONIGERR_INVALID_GROUP_NAME, ONIGERR_TOO_BIG_NUMBER, ONIGERR_TOO_BIG_WIDE_CHAR_VALUE, ONIGERR_TOO_LONG_WIDE_CHAR_VALUE, ONIGERR_TOO_SHORT_DIGITS, ScanEnv::option, p, ScanEnv::pattern, PEND, PFETCH, PFETCH_READY, PINC, PPEEK, PPEEK_IS, OnigToken::prop, PUNFETCH, OnigToken::repeat, REPEAT_INFINITE, scan_unsigned_hexadecimal_number(), scan_unsigned_octal_number(), SCANENV_MEM_NODES, ScanEnv::syntax, TK_ALT, TK_ANCHOR, TK_ANYCHAR, TK_ANYCHAR_ANYTIME, TK_BACKREF, TK_CALL, TK_CC_OPEN, TK_CHAR_PROPERTY, TK_CHAR_TYPE, TK_CODE_POINT, TK_EOT, TK_EXTENDED_GRAPHEME_CLUSTER, TK_INTERVAL, TK_KEEP, TK_LINEBREAK, TK_OP_REPEAT, TK_QUOTE_OPEN, TK_RAW_BYTE, TK_STRING, TK_SUBEXP_CLOSE, TK_SUBEXP_OPEN, OnigToken::type, OnigToken::u, and UChar.
Referenced by parse_enclose(), parse_exp(), parse_regexp(), and parse_subexp().
Definition at line 3017 of file regparse.c.
References OnigToken::backp, OnigToken::base, OnigToken::c, c, CC_ESC_WARN(), OnigToken::code, ScanEnv::enc, enclen, OnigToken::escaped, fetch_escaped_value(), IS_SYNTAX_BV, IS_SYNTAX_OP, IS_SYNTAX_OP2, MC_ESC, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC, ONIG_SYN_OP2_CCLASS_SET_OP, ONIG_SYN_OP2_ESC_H_XDIGIT, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT, ONIG_SYN_OP2_ESC_U_HEX4, ONIG_SYN_OP_ESC_OCTAL3, ONIG_SYN_OP_ESC_X_BRACE_HEX8, ONIG_SYN_OP_ESC_X_HEX2, ONIG_SYN_OP_POSIX_BRACKET, onig_syntax_warn(), ONIGENC_CTYPE_DIGIT, ONIGENC_CTYPE_SPACE, ONIGENC_CTYPE_WORD, ONIGENC_CTYPE_XDIGIT, ONIGENC_IS_CODE_XDIGIT, ONIGERR_END_PATTERN_AT_ESCAPE, ONIGERR_TOO_BIG_NUMBER, ONIGERR_TOO_BIG_WIDE_CHAR_VALUE, ONIGERR_TOO_LONG_WIDE_CHAR_VALUE, ONIGERR_TOO_SHORT_DIGITS, p, PEND, PFETCH, PFETCH_READY, PINC, PPEEK, PPEEK_IS, OnigToken::prop, PUNFETCH, scan_unsigned_hexadecimal_number(), scan_unsigned_octal_number(), str_exist_check_with_esc(), ScanEnv::syntax, TK_CC_AND, TK_CC_CC_OPEN, TK_CC_CLOSE, TK_CC_RANGE, TK_CHAR, TK_CHAR_PROPERTY, TK_CHAR_TYPE, TK_CODE_POINT, TK_EOT, TK_POSIX_BRACKET_OPEN, TK_RAW_BYTE, OnigToken::type, OnigToken::u, and UChar.
Referenced by parse_char_class().
|
static |
Definition at line 2950 of file regparse.c.
References enclen, i, IS_NOT_NULL, NULL_UCHARP, ONIGENC_MBC_TO_CODE, p, and UChar.
Referenced by parse_exp().
|
static |
Definition at line 2558 of file regparse.c.
Referenced by fetch_name(), fetch_name_with_level(), and fetch_token().
|
static |
Definition at line 5463 of file regparse.c.
References add_code_range0(), BITSET_CLEAR_BIT, BITSET_SET_BIT, CClassNode::bs, CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS, IApplyCaseFoldArg::cc, CHECK_NULL_RETURN_MEMERR, ScanEnv::enc, env, IApplyCaseFoldArg::env, i, IS_NCCLASS_NOT, CClassNode::mbuf, NCDR, NSTRING_SET_AMBIG, NULL_NODE, onig_is_code_in_cc(), onig_node_free(), onig_node_new_alt(), onig_node_new_str(), onig_node_str_cat(), ONIGENC_CODE_TO_MBC, ONIGENC_CODE_TO_MBC_MAXLEN, ONIGENC_MBC_MINLEN, IApplyCaseFoldArg::ptail, SINGLE_BYTE_SIZE, and UChar.
Referenced by parse_exp().
Definition at line 465 of file regparse.c.
References NameEntry::back_refs, IS_NOT_NULL, NameEntry::name, ST_DELETE, and xfree.
Referenced by names_clear().
|
static |
Definition at line 5401 of file regparse.c.
References IS_NOT_NULL, CClassNode::mbuf, NCCLASS, ST_DELETE, and xfree.
Referenced by onig_free_shared_cclass_table().
Definition at line 522 of file regparse.c.
References INamesArg::arg, NameEntry::back_num, NameEntry::back_ref1, NameEntry::back_refs, INamesArg::func, NameEntry::name, NameEntry::name_len, INamesArg::reg, INamesArg::ret, ST_CONTINUE, and ST_STOP.
Referenced by onig_foreach_name().
|
static |
Definition at line 555 of file regparse.c.
References NameEntry::back_num, NameEntry::back_ref1, NameEntry::back_refs, i, GroupNumRemap::new_val, and ST_CONTINUE.
Referenced by onig_renumber_name_table().
|
static |
Definition at line 1148 of file regparse.c.
References BITSET_CLEAR, CClassNode::bs, CClassNode::flags, CClassNode::mbuf, and NULL.
Referenced by add_ctype_to_cc(), node_new_cclass(), and parse_char_class().
|
static |
Definition at line 5694 of file regparse.c.
References BITS_IN_ROOM, BITSET_AT, BITSET_SIZE, CClassNode::bs, c, countbits(), GET_CODE_POINT, i, IS_NCCLASS_NOT, IS_NOT_NULL, CClassNode::mbuf, ONIG_LAST_CODE_POINT, _BBuf::p, and SINGLE_BYTE_SIZE.
Referenced by parse_exp().
|
static |
Definition at line 733 of file regparse.c.
References NameEntry::back_alloc, NameEntry::back_num, NameEntry::back_ref1, NameEntry::back_refs, CHECK_NULL_RETURN_MEMERR, re_pattern_buffer::enc, i, if(), INIT_NAME_BACKREFS_ALLOC_NUM, IS_NULL, IS_SYNTAX_BV, name, NameEntry::name, name_find(), re_pattern_buffer::name_table, NULL, onig_scan_env_set_error_string(), onig_st_init_strend_table_with_size(), onig_st_insert_strend(), ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME, ONIGERR_EMPTY_GROUP_NAME, ONIGERR_MEMORY, ONIGERR_MULTIPLEX_DEFINED_NAME, p, strdup_with_null(), ScanEnv::syntax, xfree, xmalloc, and xrealloc.
Referenced by parse_enclose().
Definition at line 501 of file regparse.c.
References IS_NOT_NULL, re_pattern_buffer::name_table, NULL, and onig_st_lookup_strend().
Referenced by name_add(), and onig_name_to_group_numbers().
|
static |
Definition at line 475 of file regparse.c.
References i_free_name_entry(), if(), IS_NOT_NULL, re_pattern_buffer::name_table, and onig_st_foreach.
Referenced by onig_names_free(), and onig_parse_make_tree().
|
static |
Definition at line 1716 of file regparse.c.
References BBUF_INIT, BBUF_WRITE_CODE_POINT, CHECK_NULL_RETURN_MEMERR, INIT_MULTI_BYTE_RANGE_SIZE, and xmalloc.
Referenced by add_code_range_to_buf0().
|
static |
Definition at line 4381 of file regparse.c.
References add_code_range(), BITSET_SET_BIT_CHKDUP, CClassNode::bs, CCS_RANGE, CCS_VALUE, CCV_CLASS, CCV_CODE_POINT, CCV_SB, CClassNode::mbuf, and ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE.
Referenced by parse_char_class().
|
static |
Definition at line 4404 of file regparse.c.
References add_code_range(), BITSET_SET_BIT_CHKDUP, bitset_set_range(), CClassNode::bs, CCS_COMPLETE, CCS_RANGE, CCS_START, CCS_VALUE, CCV_CODE_POINT, CCV_SB, IS_SYNTAX_BV, CClassNode::mbuf, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC, ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS, ONIGERR_INVALID_CODE_POINT_VALUE, ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE, ScanEnv::syntax, and v.
Referenced by parse_char_class().
Definition at line 5604 of file regparse.c.
References add_ctype_to_cc(), ScanEnv::enc, ENCLOSE_STOP_BACKTRACK, err, IS_NULL, NCCLASS, NCCLASS_SET_NOT, NENCLOSE, node_new_anychar(), node_new_cclass(), node_new_enclose(), node_new_list(), node_new_option(), node_new_quantifier(), NQTFR, NULL, NULL_NODE, ONIG_ENCODING_ASCII, onig_node_free(), ONIG_NORMAL, ONIG_OPTION_MULTILINE, ONIGENC_IS_UNICODE, ONIGERR_MEMORY, ONOFF, ScanEnv::option, OnigEncodingTypeST::property_name_to_ctype, REPEAT_INFINITE, and UChar.
Referenced by parse_exp().
Definition at line 5543 of file regparse.c.
References add_code_range(), bitset_set_range(), CClassNode::bs, ScanEnv::enc, ENCLOSE_STOP_BACKTRACK, err, IS_NULL, CClassNode::mbuf, NCCLASS, NENCLOSE, node_new_cclass(), node_new_enclose(), node_new_str_raw(), NULL, NULL_NODE, onig_node_free(), onig_node_new_alt(), ONIG_NORMAL, ONIGENC_CODE_TO_MBC, ONIGENC_CODE_TO_MBC_MAXLEN, ONIGENC_IS_UNICODE, ONIGENC_MBC_MINLEN, ONIGERR_MEMORY, and UChar.
Referenced by parse_exp().
|
static |
Definition at line 1126 of file regparse.c.
References IS_NOT_NULL, _FreeNode::next, THREAD_ATOMIC_END, THREAD_ATOMIC_START, and xmalloc.
Referenced by node_new_anychar(), node_new_backref(), node_new_call(), node_new_cclass(), node_new_ctype(), node_new_enclose(), node_new_list(), node_new_quantifier(), node_new_str(), onig_node_new_alt(), and onig_node_new_anchor().
|
static |
Definition at line 1231 of file regparse.c.
References CHECK_NULL_RETURN, node_new(), NT_CANY, and SET_NTYPE.
Referenced by node_extended_grapheme_cluster(), and parse_exp().
|
static |
Definition at line 1303 of file regparse.c.
References CHECK_NULL_RETURN, i, IS_NULL, NBREF, NODE_BACKREFS_SIZE, node_new(), NST_NAME_REF, NST_NEST_LEVEL, NST_RECURSION, NT_BREF, NULL, onig_node_free(), p, SCANENV_MEM_NODES, SET_NTYPE, and xmalloc.
Referenced by parse_exp().
Definition at line 1355 of file regparse.c.
References CHECK_NULL_RETURN, name, NCALL, node_new(), NT_CALL, NULL_NODE, and SET_NTYPE.
Referenced by parse_exp().
|
static |
Definition at line 1157 of file regparse.c.
References CHECK_NULL_RETURN, initialize_cclass(), NCCLASS, node_new(), NT_CCLASS, and SET_NTYPE.
Referenced by node_extended_grapheme_cluster(), node_linebreak(), node_new_cclass_by_codepoint_range(), parse_char_class(), parse_char_property(), and parse_exp().
|
static |
Definition at line 1168 of file regparse.c.
References _BBuf::alloc, BITSET_CLEAR, BITSET_SET_BIT, CClassNode::bs, CHECK_NULL_RETURN, i, IS_NOT_NULL, IS_NULL, CClassNode::mbuf, NCCLASS, NCCLASS_SET_NOT, node_new_cclass(), NULL, ONIGENC_CODE_RANGE_FROM, ONIGENC_CODE_RANGE_NUM, ONIGENC_CODE_RANGE_TO, _BBuf::p, UChar, _BBuf::used, and xmalloc.
Referenced by parse_exp().
|
static |
Definition at line 1218 of file regparse.c.
References CHECK_NULL_RETURN, NCTYPE, node_new(), NT_CTYPE, SET_NTYPE, and type.
Referenced by parse_exp().
|
static |
Definition at line 1561 of file regparse.c.
References node_new_str(), and NULL.
Referenced by parse_enclose(), and parse_exp().
|
static |
Definition at line 1397 of file regparse.c.
References CHECK_NULL_RETURN, NENCLOSE, node_new(), NT_ENCLOSE, NULL, SET_NTYPE, and type.
Referenced by node_extended_grapheme_cluster(), node_linebreak(), node_new_enclose_memory(), node_new_option(), onig_node_new_enclose(), parse_enclose(), and parse_exp().
|
static |
Definition at line 1420 of file regparse.c.
References CHECK_NULL_RETURN, ENCLOSE_MEMORY, NENCLOSE, node_new_enclose(), NST_NAMED_GROUP, and SET_ENCLOSE_STATUS.
Referenced by parse_enclose(), and parse_regexp().
Definition at line 1241 of file regparse.c.
References CHECK_NULL_RETURN, NCAR, NCDR, node_new(), NT_LIST, and SET_NTYPE.
Referenced by node_extended_grapheme_cluster(), onig_node_new_list(), parse_branch(), and parse_exp().
|
static |
Definition at line 1434 of file regparse.c.
References CHECK_NULL_RETURN, ENCLOSE_OPTION, NENCLOSE, and node_new_enclose().
Referenced by node_extended_grapheme_cluster(), and parse_enclose().
|
static |
Definition at line 1371 of file regparse.c.
References CHECK_NULL_RETURN, node_new(), NQ_TARGET_ISNOT_EMPTY, NQTFR, NST_BY_NUMBER, NT_QTFR, NULL, NULL_NODE, and SET_NTYPE.
Referenced by node_extended_grapheme_cluster(), and parse_exp().
Definition at line 1528 of file regparse.c.
References CHECK_NULL_RETURN, node_new(), NSTR, NT_STR, NULL, onig_node_free(), onig_node_str_cat(), and SET_NTYPE.
Referenced by node_new_empty(), node_new_str_raw(), onig_node_new_str(), parse_exp(), and str_node_split_last_char().
Definition at line 1552 of file regparse.c.
References IS_NOT_NULL, node_new_str(), and NSTRING_SET_RAW.
Referenced by node_linebreak(), and node_new_str_raw_char().
Definition at line 1567 of file regparse.c.
References c, node_new_str_raw(), p, and UChar.
Referenced by parse_exp().
Definition at line 1486 of file regparse.c.
References c, onig_node_str_cat(), and UChar.
Referenced by parse_exp().
|
static |
Definition at line 1495 of file regparse.c.
References buf, onig_node_str_cat(), ONIGENC_CODE_TO_MBC, ONIGENC_CODE_TO_MBC_MAXLEN, and UChar.
Referenced by parse_exp().
|
static |
Definition at line 1845 of file regparse.c.
References add_code_range_to_buf(), GET_CODE_POINT, i, IS_NULL, MBCODE_START_POS, NULL, ONIG_LAST_CODE_POINT, _BBuf::p, and SET_ALL_MULTI_BYTE_RANGE.
Referenced by and_cclass(), or_cclass(), and or_code_range_buf().
int onig_foreach_name | ( | regex_t * | reg, |
int(*)(const UChar *, const UChar *, int, int *, regex_t *, void *) | func, | ||
void * | arg | ||
) |
Definition at line 537 of file regparse.c.
References INamesArg::arg, arg, INamesArg::enc, re_pattern_buffer::enc, func, INamesArg::func, i_names(), if(), IS_NOT_NULL, re_pattern_buffer::name_table, onig_st_foreach, INamesArg::reg, and INamesArg::ret.
Referenced by match_inspect(), rb_reg_named_captures(), rb_reg_names(), and reg_named_capture_assign_gen().
int onig_free_node_list | ( | void | ) |
Definition at line 1110 of file regparse.c.
References FreeNodeList, IS_NOT_NULL, _FreeNode::next, and xfree.
Referenced by onig_end().
int onig_free_shared_cclass_table | ( | void | ) |
Definition at line 5414 of file regparse.c.
References i_free_shared_class(), IS_NOT_NULL, NULL, onig_st_foreach, onig_st_free_table, THREAD_ATOMIC_END, and THREAD_ATOMIC_START.
Referenced by onig_end().
int onig_name_to_backref_number | ( | regex_t * | reg, |
const UChar * | name, | ||
const UChar * | name_end, | ||
OnigRegion * | region | ||
) |
Definition at line 870 of file regparse.c.
References re_registers::beg, i, IS_NOT_NULL, onig_name_to_group_numbers(), ONIG_REGION_NOTPOS, and ONIGERR_PARSER_BUG.
Referenced by match_backref_number(), and name_to_backref_number().
int onig_name_to_group_numbers | ( | regex_t * | reg, |
const UChar * | name, | ||
const UChar * | name_end, | ||
int ** | nums | ||
) |
Definition at line 848 of file regparse.c.
References NameEntry::back_num, NameEntry::back_ref1, NameEntry::back_refs, IS_NULL, name_find(), and ONIGERR_UNDEFINED_NAME_REFERENCE.
Referenced by fetch_named_backref_token(), onig_name_to_backref_number(), parse_enclose(), and setup_subexp_call().
int onig_names_free | ( | regex_t * | reg | ) |
Definition at line 486 of file regparse.c.
References if(), IS_NOT_NULL, re_pattern_buffer::name_table, names_clear(), NULL, and onig_st_free_table.
Referenced by onig_free_body().
void onig_node_conv_to_str_node | ( | Node * | node, |
int | flag | ||
) |
Definition at line 1504 of file regparse.c.
void onig_node_free | ( | Node * | node | ) |
Definition at line 1027 of file regparse.c.
References bbuf_free(), buf, FreeNodeList, IS_NCCLASS_SHARE, IS_NOT_NULL, IS_NULL, CClassNode::mbuf, NANCHOR, NBREF, NCAR, NCCLASS, NCDR, NENCLOSE, _FreeNode::next, NQTFR, NSTR, NT_ALT, NT_ANCHOR, NT_BREF, NT_CCLASS, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, return, THREAD_ATOMIC_END, THREAD_ATOMIC_START, and xfree.
Referenced by expand_case_fold_make_rem_string(), expand_case_fold_string(), expand_case_fold_string_alt(), i_apply_case_fold(), next_setup(), node_extended_grapheme_cluster(), node_linebreak(), node_new_backref(), node_new_str(), noname_disable_map(), onig_compile(), onig_reduce_nested_quantifier(), parse_branch(), parse_char_class(), parse_enclose(), parse_exp(), parse_subexp(), and setup_tree().
Definition at line 1259 of file regparse.c.
References IS_NOT_NULL, IS_NULL, NCDR, NULL, NULL_NODE, and onig_node_new_list().
Referenced by expand_case_fold_string(), expand_case_fold_string_alt(), and setup_tree().
Definition at line 1277 of file regparse.c.
References CHECK_NULL_RETURN, NCAR, NCDR, node_new(), NT_ALT, and SET_NTYPE.
Referenced by expand_case_fold_string_alt(), i_apply_case_fold(), node_linebreak(), parse_enclose(), parse_exp(), and parse_subexp().
Node* onig_node_new_anchor | ( | int | type | ) |
Definition at line 1289 of file regparse.c.
References CHECK_NULL_RETURN, NANCHOR, node_new(), NT_ANCHOR, NULL, SET_NTYPE, and type.
Referenced by divide_look_behind_alternatives(), next_setup(), parse_enclose(), and parse_exp().
Node* onig_node_new_enclose | ( | int | type | ) |
Definition at line 1414 of file regparse.c.
References node_new_enclose().
Referenced by next_setup().
Definition at line 1253 of file regparse.c.
References node_new_list().
Referenced by expand_case_fold_string_alt(), next_setup(), onig_node_list_add(), and setup_tree().
Definition at line 1546 of file regparse.c.
References node_new_str().
Referenced by expand_case_fold_make_rem_string(), expand_case_fold_string(), expand_case_fold_string_alt(), i_apply_case_fold(), and setup_tree().
Definition at line 1443 of file regparse.c.
References buf, CHECK_NULL_RETURN_MEMERR, NODE_STR_BUF_SIZE, NODE_STR_MARGIN, NSTR, onig_strcpy(), p, strcat_capa(), strcat_capa_from_static(), and UChar.
Referenced by expand_case_fold_string(), expand_case_fold_string_alt(), i_apply_case_fold(), node_new_str(), node_str_cat_char(), node_str_cat_codepoint(), onig_node_str_set(), parse_exp(), and setup_tree().
void onig_node_str_clear | ( | Node * | node | ) |
Definition at line 1514 of file regparse.c.
References buf, IS_NOT_NULL, NSTR, and xfree.
Referenced by onig_node_str_set().
Definition at line 1479 of file regparse.c.
References onig_node_str_cat(), and onig_node_str_clear().
Referenced by update_string_node_case_fold().
int onig_noname_group_capture_is_active | ( | regex_t * | reg | ) |
Definition at line 924 of file regparse.c.
References IS_SYNTAX_BV, ONIG_IS_OPTION_ON, onig_number_of_names(), ONIG_OPTION_CAPTURE_GROUP, ONIG_OPTION_DONT_CAPTURE_GROUP, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP, re_pattern_buffer::options, and re_pattern_buffer::syntax.
Referenced by rb_reg_regsub().
void onig_null_warn | ( | const char *s | ARG_UNUSED | ) |
Definition at line 82 of file regparse.c.
Referenced by CC_DUP_WARN(), CC_ESC_WARN(), CLOSE_BRACKET_WITHOUT_ESC_WARN(), set_quantifier(), and UNKNOWN_ESC_WARN().
int onig_number_of_names | ( | regex_t * | reg | ) |
Definition at line 584 of file regparse.c.
References if(), IS_NOT_NULL, re_pattern_buffer::name_table, and st_table::num_entries.
Referenced by onig_noname_group_capture_is_active().
int onig_parse_make_tree | ( | Node ** | root, |
const UChar * | pattern, | ||
const UChar * | end, | ||
regex_t * | reg, | ||
ScanEnv * | env | ||
) |
Definition at line 6296 of file regparse.c.
References ScanEnv::case_fold_flag, re_pattern_buffer::case_fold_flag, ScanEnv::enc, re_pattern_buffer::enc, names_clear(), NULL, ScanEnv::num_mem, re_pattern_buffer::num_mem, ScanEnv::option, re_pattern_buffer::options, p, parse_regexp(), ScanEnv::pattern, ScanEnv::pattern_end, ScanEnv::reg, scan_env_clear(), ScanEnv::syntax, re_pattern_buffer::syntax, and UChar.
Referenced by onig_compile().
Definition at line 2267 of file regparse.c.
References c, QtfrNode::greedy, QtfrNode::lower, NQTFR, NULL_NODE, onig_node_free(), p, popular_quantifier_num(), REPEAT_INFINITE, return, RQ_A, RQ_AQ, RQ_ASIS, RQ_DEL, RQ_P_QQ, RQ_PQ_Q, RQ_QQ, QtfrNode::target, and QtfrNode::upper.
Referenced by noname_disable_map(), and set_quantifier().
int onig_renumber_name_table | ( | regex_t * | reg, |
GroupNumRemap * | map | ||
) |
Definition at line 572 of file regparse.c.
References i_renumber_name(), if(), IS_NOT_NULL, re_pattern_buffer::name_table, and onig_st_foreach.
Referenced by disable_noname_group_capture().
void onig_scan_env_set_error_string | ( | ScanEnv * | env, |
int ecode | ARG_UNUSED, | ||
UChar * | arg, | ||
UChar * | arg_end | ||
) |
Definition at line 6323 of file regparse.c.
References arg, ScanEnv::error, and ScanEnv::error_end.
Referenced by fetch_char_property_to_ctype(), fetch_name(), fetch_name_with_level(), fetch_named_backref_token(), name_add(), parse_enclose(), and setup_subexp_call().
int onig_scan_unsigned_number | ( | UChar ** | src, |
const UChar * | end, | ||
OnigEncoding | enc | ||
) |
Definition at line 1621 of file regparse.c.
References c, DIGITVAL, INT_MAX_LIMIT, ONIGENC_IS_CODE_DIGIT, p, PEND, PFETCH, PFETCH_READY, PUNFETCH, UChar, and val.
Referenced by fetch_name(), fetch_name_with_level(), fetch_range_quantifier(), and fetch_token().
void onig_set_verb_warn_func | ( | OnigWarnFunc | f | ) |
Definition at line 101 of file regparse.c.
References f, and onig_verb_warn.
Referenced by Init_Regexp().
void onig_set_warn_func | ( | OnigWarnFunc | f | ) |
hash_table_type* onig_st_init_strend_table_with_size | ( | st_index_t | size | ) |
Definition at line 367 of file regparse.c.
References onig_st_init_table_with_size, str_end_cmp(), and str_end_hash().
Referenced by name_add(), and onigenc_property_list_add_property().
int onig_st_insert_strend | ( | hash_table_type * | table, |
const UChar * | str_key, | ||
const UChar * | end_key, | ||
hash_data_type | value | ||
) |
Definition at line 391 of file regparse.c.
References st_str_end_key::end, key, onig_st_insert, result, st_str_end_key::s, UChar, xfree, and xmalloc.
Referenced by name_add(), and onigenc_property_list_add_property().
int onig_st_lookup_strend | ( | hash_table_type * | table, |
const UChar * | str_key, | ||
const UChar * | end_key, | ||
hash_data_type * | value | ||
) |
Definition at line 379 of file regparse.c.
References st_str_end_key::end, key, onig_st_lookup, st_str_end_key::s, and UChar.
Referenced by name_find().
Definition at line 232 of file regparse.c.
References UChar, and xmemcpy.
Referenced by onig_node_str_cat(), strcat_capa(), and strcat_capa_from_static().
Definition at line 220 of file regparse.c.
Definition at line 2894 of file regparse.c.
References args, ScanEnv::enc, NULL, onig_vsnprintf_with_pattern(), ScanEnv::pattern, ScanEnv::pattern_end, rb_compile_warn(), rb_warn(), ScanEnv::sourcefile, ScanEnv::sourceline, UChar, and WARN_BUFSIZE.
Referenced by CC_DUP_WARN(), CC_ESC_WARN(), CLOSE_BRACKET_WITHOUT_ESC_WARN(), fetch_token(), fetch_token_in_cc(), and UNKNOWN_ESC_WARN().
void onig_vsnprintf_with_pattern | ( | UChar | buf[], |
int | bufsize, | ||
OnigEncoding | enc, | ||
UChar * | pat, | ||
UChar * | pat_end, | ||
const UChar * | fmt, | ||
va_list | args | ||
) |
Definition at line 321 of file regerror.c.
References bp, enclen, ONIG_ENCODING_ASCII, ONIGENC_IS_CODE_PRINT, ONIGENC_IS_CODE_SPACE, ONIGENC_IS_MBC_HEAD, ONIGENC_MBC_MINLEN, onigenc_str_bytelen_null(), p, sprint_byte_with_x(), UChar, and xvsnprintf.
Referenced by onig_snprintf_with_pattern(), and onig_syntax_warn().
|
static |
Definition at line 2099 of file regparse.c.
References and_code_range_buf(), bbuf_free(), bitset_copy(), bitset_invert(), bitset_invert_to(), bitset_or(), CClassNode::bs, ScanEnv::enc, IS_NCCLASS_NOT, CClassNode::mbuf, not_code_range_buf(), ONIGENC_IS_SINGLEBYTE, and or_code_range_buf().
Referenced by add_ctype_to_cc(), and parse_char_class().
|
static |
Definition at line 1887 of file regparse.c.
References add_code_range_to_buf(), bbuf_clone(), GET_CODE_POINT, i, IS_NULL, not_code_range_buf(), NULL, _BBuf::p, SET_ALL_MULTI_BYTE_RANGE, and SWAP_BBUF_NOT.
Referenced by and_cclass(), and or_cclass().
|
static |
Definition at line 6177 of file regparse.c.
References IS_NOT_NULL, NCDR, node_new_list(), NT_LIST, NTYPE, NULL, onig_node_free(), parse_exp(), TK_ALT, and TK_EOT.
Referenced by parse_subexp().
|
static |
Definition at line 4503 of file regparse.c.
References add_code_range(), add_ctype_to_cc(), and_cclass(), OnigToken::backp, OnigToken::base, bbuf_free(), BITSET_IS_EMPTY, BITSET_SET_BIT_CHKDUP, CClassNode::bs, OnigToken::c, CC_ESC_WARN(), CCS_RANGE, CCS_START, CCS_VALUE, CCV_CODE_POINT, CCV_SB, CHECK_NULL_RETURN_MEMERR, OnigToken::code, code_exist_check(), ScanEnv::enc, enclen, err, OnigToken::escaped, fetch_char_property_to_ctype(), fetch_token_in_cc(), for(), i, if(), initialize_cclass(), IS_NCCLASS_NOT, IS_NOT_NULL, IS_NULL, IS_SYNTAX_BV, CClassNode::mbuf, NCCLASS, NCCLASS_CLEAR_NOT, NCCLASS_SET_NOT, neg, NEWLINE_CODE, next_state_class(), next_state_val(), node_new_cclass(), NULL, NULL_NODE, onig_node_free(), ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC, ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC, ONIGENC_CODE_TO_MBC_MAXLEN, ONIGENC_CODE_TO_MBCLEN, ONIGENC_IS_CODE_NEWLINE, ONIGENC_IS_SINGLEBYTE, ONIGENC_MBC_MAXLEN, ONIGENC_MBC_MINLEN, ONIGENC_MBC_TO_CODE, ONIGERR_EMPTY_CHAR_CLASS, ONIGERR_PARSER_BUG, ONIGERR_PREMATURE_END_OF_CHAR_CLASS, ONIGERR_TOO_SHORT_MULTI_BYTE_STRING, ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS, or_cclass(), p, parse_posix_bracket(), ScanEnv::pattern_end, OnigToken::prop, SINGLE_BYTE_SIZE, ScanEnv::syntax, TK_CC_AND, TK_CC_CC_OPEN, TK_CC_CLOSE, TK_CC_RANGE, TK_CHAR, TK_CHAR_PROPERTY, TK_CHAR_TYPE, TK_CODE_POINT, TK_EOT, TK_POSIX_BRACKET_OPEN, TK_RAW_BYTE, OnigToken::type, OnigToken::u, UChar, and v.
Referenced by parse_exp().
|
static |
Definition at line 4347 of file regparse.c.
References add_ctype_to_cc(), CHECK_NULL_RETURN_MEMERR, fetch_char_property_to_ctype(), NCCLASS, NCCLASS_SET_NOT, node_new_cclass(), OnigToken::prop, and OnigToken::u.
Referenced by parse_exp().
|
static |
Definition at line 4833 of file regparse.c.
References ANCHOR_LOOK_BEHIND, ANCHOR_LOOK_BEHIND_NOT, ANCHOR_PREC_READ, ANCHOR_PREC_READ_NOT, BACKREF_REL_TO_ABS, BIT_STATUS_BITS_NUM, BIT_STATUS_ON_AT_SIMPLE, c, ScanEnv::capture_history, CHECK_NULL_RETURN_MEMERR, ScanEnv::enc, ENCLOSE_CONDITION, ENCLOSE_MEMORY, ENCLOSE_STOP_BACKTRACK, err, fetch_name(), fetch_token(), i, if(), IS_NOT_NULL, IS_NULL, IS_SYNTAX_BV, IS_SYNTAX_OP2, name, name_add(), NANCHOR, neg, NENCLOSE, node_new_empty(), node_new_enclose(), node_new_enclose_memory(), node_new_option(), NST_NAME_REF, NT_ALT, NT_ANCHOR, NTYPE, NULL, NULL_NODE, ScanEnv::num_mem, ScanEnv::num_named, ONIG_IS_OPTION_ON, onig_name_to_group_numbers(), onig_node_free(), onig_node_new_alt(), onig_node_new_anchor(), ONIG_OPTION_ASCII_RANGE, ONIG_OPTION_DONT_CAPTURE_GROUP, ONIG_OPTION_EXTEND, ONIG_OPTION_IGNORECASE, ONIG_OPTION_MULTILINE, ONIG_OPTION_POSIX_BRACKET_ALL_RANGE, ONIG_OPTION_SINGLELINE, ONIG_OPTION_WORD_BOUND_ALL_RANGE, onig_scan_env_set_error_string(), ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY, ONIG_SYN_OP2_OPTION_PERL, ONIG_SYN_OP2_OPTION_RUBY, ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP, ONIG_SYN_OP2_QMARK_GROUP_EFFECT, ONIG_SYN_OP2_QMARK_LPAREN_CONDITION, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP, ONIG_SYN_OP2_QMARK_VBAR_BRANCH_RESET, ONIG_SYN_STRICT_CHECK_BACKREF, ONIGENC_IS_CODE_DIGIT, ONIGERR_END_PATTERN_IN_GROUP, ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS, ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY, ONIGERR_INVALID_BACKREF, ONIGERR_INVALID_CONDITION_PATTERN, ONIGERR_UNDEFINED_GROUP_OPTION, ONIGERR_UNDEFINED_NAME_REFERENCE, ONOFF, ScanEnv::option, p, parse_subexp(), PEND, PFETCH, PFETCH_READY, PINC, PPEEK_IS, PUNFETCH, ScanEnv::reg, scan_env_add_mem_entry(), scan_env_set_mem_node(), SCANENV_MEM_NODES, ScanEnv::syntax, and UChar.
Referenced by parse_exp().
|
static |
Definition at line 5744 of file regparse.c.
References add_ctype_to_cc(), IApplyCaseFoldArg::alt_root, OnigToken::anchor, ANCHOR_KEEP, OnigToken::backp, OnigToken::backref, BACKREF_REL_TO_ABS, OnigToken::c, OnigToken::call, ScanEnv::case_fold_flag, IApplyCaseFoldArg::cc, CHECK_NULL_RETURN_MEMERR, OnigToken::code, ScanEnv::enc, type_cclass_key::enc, enclen, ENCLOSE_STOP_BACKTRACK, env, IApplyCaseFoldArg::env, OnigToken::escaped, fetch_token(), find_str_position(), i_apply_case_fold(), if(), IS_ASCII_RANGE, IS_IGNORECASE, is_invalid_quantifier_target, IS_NOT_NULL, IS_NULL, is_onechar_cclass(), IS_SYNTAX_BV, key, MC_ESC, NANCHOR, NCAR, NCCLASS, NCCLASS_SET_NOT, NCCLASS_SET_SHARE, NCDR, NENCLOSE, node_extended_grapheme_cluster(), node_linebreak(), node_new_anychar(), node_new_backref(), node_new_call(), node_new_cclass(), node_new_cclass_by_codepoint_range(), node_new_ctype(), node_new_empty(), node_new_enclose(), node_new_list(), node_new_quantifier(), node_new_str(), node_new_str_raw_char(), node_str_cat_char(), node_str_cat_codepoint(), type_cclass_key::not, NQTFR, NSTR, NSTRING_CLEAR_RAW, NSTRING_SET_RAW, NULL, NULL_NODE, onig_node_free(), onig_node_new_alt(), onig_node_new_anchor(), onig_node_str_cat(), onig_st_add_direct, onig_st_init_table_with_size, onig_st_lookup, ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP, ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS, ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS, ONIGENC_APPLY_ALL_CASE_FOLD, ONIGENC_CODE_RANGE_NUM, ONIGENC_CTYPE_DIGIT, ONIGENC_CTYPE_SPACE, ONIGENC_CTYPE_WORD, ONIGENC_CTYPE_XDIGIT, ONIGENC_GET_CTYPE_CODE_RANGE, ONIGENC_MBC_MINLEN, ONIGERR_INVALID_BACKREF, ONIGERR_MEMORY, ONIGERR_PARSER_BUG, ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID, ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED, ONIGERR_TOO_SHORT_MULTI_BYTE_STRING, ONIGERR_UNMATCHED_CLOSE_PARENTHESIS, ScanEnv::option, parse_char_class(), parse_char_property(), parse_enclose(), parse_subexp(), OnigToken::prop, IApplyCaseFoldArg::ptail, OnigToken::repeat, REPEAT_INFINITE, set_quantifier(), ScanEnv::syntax, THREAD_ATOMIC_END, THREAD_ATOMIC_START, THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS, TK_ALT, TK_ANCHOR, TK_ANYCHAR, TK_ANYCHAR_ANYTIME, TK_BACKREF, TK_CALL, TK_CC_OPEN, TK_CHAR_PROPERTY, TK_CHAR_TYPE, TK_CODE_POINT, TK_EOT, TK_EXTENDED_GRAPHEME_CLUSTER, TK_INTERVAL, TK_KEEP, TK_LINEBREAK, TK_OP_REPEAT, TK_QUOTE_OPEN, TK_RAW_BYTE, TK_STRING, TK_SUBEXP_CLOSE, TK_SUBEXP_OPEN, OnigToken::type, type_cclass_key::type, OnigToken::u, UChar, USE_BACKREF_WITH_LEVEL, xmalloc, and xmemcpy.
Referenced by parse_branch().
|
static |
Definition at line 4238 of file regparse.c.
References add_ctype_to_cc(), c, PosixBracketEntryType::ctype, ScanEnv::enc, i, IS_NOT_NULL, IS_POSIX_BRACKET_ALL_RANGE, PosixBracketEntryType::len, PosixBracketEntryType::name, NULL, ONIGENC_CTYPE_ALNUM, ONIGENC_CTYPE_ALPHA, ONIGENC_CTYPE_ASCII, ONIGENC_CTYPE_BLANK, ONIGENC_CTYPE_CNTRL, ONIGENC_CTYPE_DIGIT, ONIGENC_CTYPE_GRAPH, ONIGENC_CTYPE_LOWER, ONIGENC_CTYPE_PRINT, ONIGENC_CTYPE_PUNCT, ONIGENC_CTYPE_SPACE, ONIGENC_CTYPE_UPPER, ONIGENC_CTYPE_WORD, ONIGENC_CTYPE_XDIGIT, onigenc_step(), onigenc_strlen(), onigenc_with_ascii_strncmp(), ONIGERR_INVALID_POSIX_BRACKET_TYPE, ScanEnv::option, p, PEND, PFETCH, PFETCH_READY, PINC, POSIX_BRACKET_CHECK_LIMIT_LENGTH, POSIX_BRACKET_NAME_MIN_LEN, PPEEK, PPEEK_IS, and UChar.
Referenced by parse_char_class().
Definition at line 6268 of file regparse.c.
References CHECK_NULL_RETURN_MEMERR, fetch_token(), NENCLOSE, node_new_enclose_memory(), ScanEnv::num_call, ScanEnv::option, parse_subexp(), scan_env_set_mem_node(), TK_EOT, tok, and top.
Referenced by onig_parse_make_tree().
|
static |
Definition at line 6220 of file regparse.c.
References err, fetch_token(), NCDR, NULL, onig_node_free(), onig_node_new_alt(), ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS, ONIGERR_PARSER_BUG, parse_branch(), TK_ALT, TK_SUBEXP_CLOSE, and OnigToken::type.
Referenced by parse_enclose(), parse_exp(), and parse_regexp().
|
static |
Definition at line 2223 of file regparse.c.
References QtfrNode::greedy, IS_REPEAT_INFINITE, QtfrNode::lower, and QtfrNode::upper.
Referenced by onig_reduce_nested_quantifier(), and set_quantifier().
|
static |
Definition at line 975 of file regparse.c.
References CHECK_NULL_RETURN_MEMERR, i, INIT_SCANENV_MEMNODES_ALLOC_SIZE, IS_NULL, ScanEnv::mem_alloc, ScanEnv::mem_nodes_dynamic, ScanEnv::mem_nodes_static, NULL_NODE, ScanEnv::num_mem, p, SCANENV_MEMNODES_SIZE, xmalloc, xmemcpy, and xrealloc.
Referenced by parse_enclose().
|
static |
Definition at line 944 of file regparse.c.
References ScanEnv::backrefed_mem, BIT_STATUS_CLEAR, ScanEnv::bt_mem_end, ScanEnv::bt_mem_start, ScanEnv::capture_history, ScanEnv::error, ScanEnv::error_end, i, ScanEnv::mem_alloc, ScanEnv::mem_nodes_dynamic, ScanEnv::mem_nodes_static, NULL, NULL_NODE, ScanEnv::num_call, ScanEnv::num_mem, ScanEnv::num_named, SCANENV_MEMNODES_SIZE, UChar, and ScanEnv::warnings_flag.
Referenced by onig_parse_make_tree().
Definition at line 1008 of file regparse.c.
References ScanEnv::num_mem, ONIGERR_PARSER_BUG, and SCANENV_MEM_NODES.
Referenced by parse_enclose(), and parse_regexp().
|
static |
Definition at line 1648 of file regparse.c.
References c, INT_MAX_LIMIT, ONIGENC_IS_CODE_XDIGIT, p, PEND, PFETCH, PFETCH_READY, PUNFETCH, UChar, val, and XDIGITVAL.
Referenced by fetch_token(), and fetch_token_in_cc().
|
static |
Definition at line 1680 of file regparse.c.
References c, INT_MAX_LIMIT, ODIGITVAL, ONIGENC_IS_CODE_DIGIT, p, PEND, PFETCH, PFETCH_READY, PUNFETCH, UChar, and val.
Referenced by fetch_token(), and fetch_token_in_cc().
Definition at line 5261 of file regparse.c.
References ScanEnv::enc, QtfrNode::greedy, IS_NOT_NULL, IS_QUANTIFIER_BY_NUMBER, IS_REPEAT_INFINITE, IS_SYNTAX_BV, QtfrNode::lower, NQTFR, NSTR, NT_QTFR, NT_STR, NTYPE, onig_null_warn(), onig_reduce_nested_quantifier(), onig_snprintf_with_pattern(), ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT, onig_verb_warn, ScanEnv::pattern, ScanEnv::pattern_end, popular_quantifier_num(), RQ_ASIS, RQ_DEL, str_node_can_be_split(), str_node_split_last_char(), ScanEnv::syntax, QtfrNode::target, UChar, QtfrNode::upper, and WARN_BUFSIZE.
Referenced by parse_exp().
Definition at line 328 of file regparse.c.
References c, st_str_end_key::end, p, st_str_end_key::s, and UChar.
Referenced by onig_st_init_strend_table_with_size().
|
static |
Definition at line 352 of file regparse.c.
References p, st_str_end_key::s, UChar, and val.
Referenced by onig_st_init_strend_table_with_size().
|
static |
Definition at line 2979 of file regparse.c.
References enclen, i, MC_ESC, ONIGENC_MBC_TO_CODE, and UChar.
Referenced by fetch_token_in_cc().
|
static |
Definition at line 1594 of file regparse.c.
References enclen, StrNode::end, and StrNode::s.
Referenced by set_quantifier().
|
static |
Definition at line 1576 of file regparse.c.
References StrNode::end, StrNode::flag, IS_NOT_NULL, node_new_str(), NSTR_RAW, NSTRING_SET_RAW, NULL_NODE, onigenc_get_prev_char_head(), p, StrNode::s, and UChar.
Referenced by set_quantifier().
|
static |
Definition at line 288 of file regparse.c.
References CHECK_NULL_RETURN, onig_strcpy(), UChar, xmalloc, and xrealloc.
Referenced by onig_node_str_cat().
|
static |
Definition at line 305 of file regparse.c.
References CHECK_NULL_RETURN, onig_strcpy(), UChar, and xmalloc.
Referenced by onig_node_str_cat().
|
static |
Definition at line 243 of file regparse.c.
References CHECK_NULL_RETURN, i, ONIGENC_MBC_MINLEN, UChar, xmalloc, and xmemcpy.
Referenced by name_add().
|
static |
Definition at line 5363 of file regparse.c.
References type_cclass_key::enc, type_cclass_key::not, and type_cclass_key::type.
|
static |
Definition at line 5371 of file regparse.c.
References type_cclass_key::enc, i, type_cclass_key::not, p, type_cclass_key::type, UChar, and val.
|
static |
Definition at line 2943 of file regparse.c.
References onig_null_warn(), onig_syntax_warn(), onig_warn, return, RTEST, and ruby_verbose.
Referenced by conv_backslash_value().
Definition at line 1023 of file regparse.c.
Referenced by onig_free_node_list(), and onig_node_free().
|
static |
Definition at line 93 of file regparse.c.
Referenced by onig_set_verb_warn_func(), and set_quantifier().
|
static |
Definition at line 87 of file regparse.c.
Referenced by CC_DUP_WARN(), CC_ESC_WARN(), CLOSE_BRACKET_WITHOUT_ESC_WARN(), onig_set_warn_func(), and UNKNOWN_ESC_WARN().
const OnigSyntaxType* OnigDefaultSyntax = ONIG_SYNTAX_RUBY |
Definition at line 80 of file regparse.c.
const OnigSyntaxType OnigSyntaxRuby |
Definition at line 38 of file regparse.c.
|
static |
Definition at line 5397 of file regparse.c.
Definition at line 5252 of file regparse.c.
Definition at line 5256 of file regparse.c.
|
static |
Definition at line 2257 of file regparse.c.
|
static |
Definition at line 5392 of file regparse.c.