Ruby
1.9.3p484(2013-11-22revision43786)
|
#include "regparse.h"
Go to the source code of this file.
Data Structures | |
struct | MinMaxLen |
struct | OptEnv |
struct | OptAncInfo |
struct | OptExactInfo |
struct | OptMapInfo |
struct | NodeOptInfo |
Macros | |
#define | IS_NEED_STR_LEN_OP_EXACT(op) |
#define | REPEAT_RANGE_ALLOC 4 |
#define | QUANTIFIER_EXPAND_LIMIT_SIZE 50 |
#define | CKN_ON (ckn > 0) |
#define | GET_CHAR_LEN_VARLEN -1 |
#define | GET_CHAR_LEN_TOP_ALT_VARLEN -2 |
#define | THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION 8 |
#define | IN_ALT (1<<0) |
#define | IN_NOT (1<<1) |
#define | IN_REPEAT (1<<2) |
#define | IN_VAR_REPEAT (1<<3) |
#define | EXPAND_STRING_MAX_LENGTH 100 |
#define | ALLOWED_TYPE_IN_LB |
#define | ALLOWED_ENCLOSE_IN_LB ( ENCLOSE_MEMORY ) |
#define | ALLOWED_ENCLOSE_IN_LB_NOT 0 |
#define | ALLOWED_ANCHOR_IN_LB ( ANCHOR_LOOK_BEHIND | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION ) |
#define | ALLOWED_ANCHOR_IN_LB_NOT ( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION ) |
#define | OPT_EXACT_MAXLEN 24 |
#define | COMP_EM_BASE 20 |
#define | MAX_NODE_OPT_INFO_REF_COUNT 5 |
#define | REGEX_TRANSFER(to, from) |
#define | REGEX_CHAIN_HEAD(reg) |
#define | COMPILE_INIT_SIZE 20 |
Variables | |
OnigCaseFoldType | OnigDefaultCaseFoldFlag = ONIGENC_CASE_FOLD_MIN |
static unsigned char | PadBuf [WORD_ALIGNMENT_SIZE] |
static int | onig_inited = 0 |
#define ALLOWED_ANCHOR_IN_LB ( ANCHOR_LOOK_BEHIND | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION ) |
Referenced by setup_tree().
#define ALLOWED_ANCHOR_IN_LB_NOT ( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION ) |
Referenced by setup_tree().
#define ALLOWED_ENCLOSE_IN_LB ( ENCLOSE_MEMORY ) |
Referenced by setup_tree().
#define ALLOWED_ENCLOSE_IN_LB_NOT 0 |
Referenced by setup_tree().
#define ALLOWED_TYPE_IN_LB |
Referenced by setup_tree().
#define COMP_EM_BASE 20 |
Referenced by comp_opt_exact_or_map_info().
#define COMPILE_INIT_SIZE 20 |
Referenced by onig_compile().
#define EXPAND_STRING_MAX_LENGTH 100 |
Referenced by setup_tree().
#define GET_CHAR_LEN_TOP_ALT_VARLEN -2 |
Definition at line 2297 of file regcomp.c.
Referenced by get_char_length_tree1(), and setup_look_behind().
#define GET_CHAR_LEN_VARLEN -1 |
Definition at line 2296 of file regcomp.c.
Referenced by get_char_length_tree1(), and setup_look_behind().
#define IN_ALT (1<<0) |
Definition at line 3677 of file regcomp.c.
Referenced by setup_tree().
#define IN_NOT (1<<1) |
Definition at line 3678 of file regcomp.c.
Referenced by setup_tree().
#define IN_REPEAT (1<<2) |
Definition at line 3679 of file regcomp.c.
Referenced by setup_tree().
#define IN_VAR_REPEAT (1<<3) |
Definition at line 3680 of file regcomp.c.
Referenced by setup_tree().
#define IS_NEED_STR_LEN_OP_EXACT | ( | op | ) |
Definition at line 315 of file regcomp.c.
Referenced by add_compile_string(), and add_compile_string_length().
#define MAX_NODE_OPT_INFO_REF_COUNT 5 |
Definition at line 4574 of file regcomp.c.
Referenced by optimize_node_left().
#define OPT_EXACT_MAXLEN 24 |
Definition at line 3966 of file regcomp.c.
Referenced by concat_opt_exact_info(), concat_opt_exact_info_str(), and is_full_opt_exact_info().
#define QUANTIFIER_EXPAND_LIMIT_SIZE 50 |
Definition at line 731 of file regcomp.c.
Referenced by compile_length_quantifier_node(), and compile_quantifier_node().
#define REGEX_CHAIN_HEAD | ( | reg | ) |
Definition at line 5275 of file regcomp.c.
Referenced by onig_chain_link_add().
#define REGEX_TRANSFER | ( | to, | |
from | |||
) |
Definition at line 5260 of file regcomp.c.
Referenced by onig_chain_reduce(), and onig_transfer().
#define REPEAT_RANGE_ALLOC 4 |
Referenced by entry_repeat_range().
#define THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION 8 |
Referenced by expand_case_fold_string().
|
static |
Definition at line 233 of file regcomp.c.
References BBUF_ADD, and SIZE_ABSADDR.
Referenced by compile_enclose_node().
Definition at line 294 of file regcomp.c.
References BBUF_ADD, and SIZE_BITSET.
Referenced by compile_cclass_node().
|
static |
Definition at line 287 of file regcomp.c.
References BBUF_ADD.
Referenced by add_compile_string(), add_multi_byte_cclass(), and compile_quantifier_node().
|
static |
Definition at line 4397 of file regcomp.c.
References add_char_opt_map_info(), buf, DISABLE_CASE_FOLD_MULTI_CHAR, i, ONIGENC_CODE_TO_MBC, ONIGENC_CODE_TO_MBC_MAXLEN, ONIGENC_GET_CASE_FOLD_CODES_BY_STR, ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM, and UChar.
Referenced by optimize_node_left().
|
static |
Definition at line 4388 of file regcomp.c.
References OptMapInfo::map, map_position_value(), and OptMapInfo::value.
Referenced by add_char_amb_opt_map_info(), and optimize_node_left().
|
static |
Definition at line 441 of file regcomp.c.
References add_bytes(), add_length(), add_opcode(), IS_NEED_STR_LEN_OP_EXACT, OP_EXACTMBN, OP_EXACTN_IC, and select_str_opcode().
Referenced by compile_string_node(), and compile_string_raw_node().
|
static |
Definition at line 424 of file regcomp.c.
References IS_NEED_STR_LEN_OP_EXACT, len, OP_EXACTMBN, select_str_opcode(), SIZE_LENGTH, and SIZE_OPCODE.
Referenced by compile_length_string_node(), and compile_length_string_raw_node().
|
static |
Definition at line 242 of file regcomp.c.
References BBUF_ADD, and SIZE_LENGTH.
Referenced by add_compile_string(), add_multi_byte_cclass(), compile_anchor_node(), and compile_tree().
|
static |
Definition at line 251 of file regcomp.c.
References BBUF_ADD, and SIZE_MEMNUM.
Referenced by compile_enclose_node(), compile_range_repeat_node(), compile_tree(), and compile_tree_empty_check().
Definition at line 4114 of file regcomp.c.
References distance_add(), MinMaxLen::max, and MinMaxLen::min.
Referenced by concat_left_node_opt_info(), and optimize_node_left().
Definition at line 559 of file regcomp.c.
References add_bytes(), add_length(), BBUF_GET_ADD_ADDRESS, GET_ALIGNMENT_PAD_SIZE, _BBuf::p, PadBuf, SIZE_LENGTH, UChar, _BBuf::used, and WORD_ALIGNMENT_SIZE.
Referenced by compile_cclass_node().
|
static |
Definition at line 206 of file regcomp.c.
References BBUF_ADD1.
Referenced by add_compile_string(), add_opcode_option(), add_opcode_rel_addr(), compile_anchor_node(), compile_cclass_node(), compile_enclose_node(), compile_option_node(), compile_quantifier_node(), compile_range_repeat_node(), compile_tree(), compile_tree_empty_check(), and onig_compile().
|
static |
Definition at line 301 of file regcomp.c.
References add_opcode(), and add_option().
Referenced by compile_option_node().
|
static |
Definition at line 276 of file regcomp.c.
References add_opcode(), and add_rel_addr().
Referenced by compile_anchor_node(), compile_enclose_node(), compile_quantifier_node(), and compile_tree().
|
static |
Definition at line 4192 of file regcomp.c.
References is_left_anchor(), OptAncInfo::left_anchor, and OptAncInfo::right_anchor.
Referenced by optimize_node_left().
|
static |
Definition at line 269 of file regcomp.c.
References BBUF_ADD, and SIZE_OPTION.
Referenced by add_opcode_option(), and compile_tree().
|
static |
Definition at line 260 of file regcomp.c.
References BBUF_ADD, and SIZE_POINTER.
Referenced by compile_cclass_node().
|
static |
Definition at line 224 of file regcomp.c.
References BBUF_ADD, and SIZE_RELADDR.
Referenced by add_opcode_rel_addr(), and compile_range_repeat_node().
Definition at line 4130 of file regcomp.c.
References MinMaxLen::max, and MinMaxLen::min.
Referenced by alt_merge_node_opt_info(), and alt_merge_opt_map_info().
|
static |
Definition at line 4562 of file regcomp.c.
References alt_merge_mml(), alt_merge_opt_anc_info(), alt_merge_opt_exact_info(), alt_merge_opt_map_info(), NodeOptInfo::anc, OptEnv::enc, NodeOptInfo::exb, NodeOptInfo::exm, NodeOptInfo::expr, NodeOptInfo::len, and NodeOptInfo::map.
Referenced by optimize_node_left().
|
static |
Definition at line 4210 of file regcomp.c.
References OptAncInfo::left_anchor, and OptAncInfo::right_anchor.
Referenced by alt_merge_node_opt_info(), alt_merge_opt_exact_info(), and alt_merge_opt_map_info().
|
static |
Definition at line 4287 of file regcomp.c.
References alt_merge_opt_anc_info(), OptExactInfo::anc, clear_opt_exact_info(), OptEnv::enc, enclen, i, OptExactInfo::ignore_case, is_equal_mml(), OptExactInfo::len, len, OptExactInfo::mmd, OptExactInfo::reach_end, return, OptAncInfo::right_anchor, and OptExactInfo::s.
Referenced by alt_merge_node_opt_info().
|
static |
Definition at line 4451 of file regcomp.c.
References alt_merge_mml(), alt_merge_opt_anc_info(), OptMapInfo::anc, clear_opt_map_info(), i, OptMapInfo::map, map_position_value(), MinMaxLen::max, MinMaxLen::min, OptMapInfo::mmd, ONIG_CHAR_TABLE_SIZE, return, and OptMapInfo::value.
Referenced by alt_merge_node_opt_info().
|
static |
Definition at line 114 of file regcomp.c.
References BITSET_SIZE, and i.
Referenced by compile_cclass_node(), and compile_length_cclass_node().
|
static |
Definition at line 2694 of file regcomp.c.
References IS_NOT_NULL, NANCHOR, NCAR, NCDR, NENCLOSE, NQTFR, NT_ALT, NT_ANCHOR, NT_ENCLOSE, NT_LIST, NT_QTFR, NTYPE, NTYPE2BIT, EncloseNode::target, type, and EncloseNode::type.
Referenced by setup_tree().
|
static |
Definition at line 4101 of file regcomp.c.
References MinMaxLen::max, and MinMaxLen::min.
Referenced by clear_node_opt_info(), clear_opt_exact_info(), and set_optimize_info_from_tree().
|
static |
Definition at line 4486 of file regcomp.c.
References NodeOptInfo::anc, clear_mml(), clear_opt_anc_info(), clear_opt_exact_info(), clear_opt_map_info(), NodeOptInfo::exb, NodeOptInfo::exm, NodeOptInfo::expr, NodeOptInfo::len, and NodeOptInfo::map.
Referenced by optimize_node_left().
|
static |
Definition at line 4143 of file regcomp.c.
References OptAncInfo::left_anchor, and OptAncInfo::right_anchor.
Referenced by clear_node_opt_info(), clear_opt_exact_info(), and concat_opt_anc_info().
|
static |
Definition at line 4223 of file regcomp.c.
References OptExactInfo::anc, clear_mml(), clear_opt_anc_info(), OptExactInfo::ignore_case, OptExactInfo::len, OptExactInfo::mmd, OptExactInfo::reach_end, and OptExactInfo::s.
Referenced by alt_merge_opt_exact_info(), clear_node_opt_info(), and concat_left_node_opt_info().
|
static |
Definition at line 4354 of file regcomp.c.
References xmemcpy.
Referenced by alt_merge_opt_map_info(), and clear_node_opt_info().
|
static |
Definition at line 5052 of file regcomp.c.
References re_pattern_buffer::anchor, re_pattern_buffer::anchor_dmax, re_pattern_buffer::anchor_dmin, re_pattern_buffer::exact, re_pattern_buffer::exact_end, IS_NOT_NULL, NULL, ONIG_OPTIMIZE_NONE, re_pattern_buffer::optimize, re_pattern_buffer::sub_anchor, re_pattern_buffer::threshold_len, UChar, and xfree().
Referenced by onig_compile().
Definition at line 4070 of file regcomp.c.
References distance_value(), and MinMaxLen::min.
Referenced by comp_opt_exact_or_map_info(), select_opt_exact_info(), and select_opt_map_info().
|
static |
Definition at line 4438 of file regcomp.c.
References comp_distance_value(), COMP_EM_BASE, OptExactInfo::ignore_case, OptExactInfo::len, OptExactInfo::mmd, OptMapInfo::mmd, and OptMapInfo::value.
Referenced by set_optimize_info_from_tree().
|
static |
Definition at line 1410 of file regcomp.c.
References add_length(), add_opcode(), add_opcode_rel_addr(), ANCHOR_BEGIN_BUF, ANCHOR_BEGIN_LINE, ANCHOR_BEGIN_POSITION, ANCHOR_END_BUF, ANCHOR_END_LINE, ANCHOR_LOOK_BEHIND, ANCHOR_LOOK_BEHIND_NOT, ANCHOR_NOT_WORD_BOUND, ANCHOR_PREC_READ, ANCHOR_PREC_READ_NOT, ANCHOR_SEMI_END_BUF, ANCHOR_WORD_BEGIN, ANCHOR_WORD_BOUND, ANCHOR_WORD_END, AnchorNode::char_len, compile_length_tree(), compile_tree(), get_char_length_tree(), len, ONIGERR_INVALID_LOOK_BEHIND_PATTERN, ONIGERR_TYPE_BUG, OP_BEGIN_BUF, OP_BEGIN_LINE, OP_BEGIN_POSITION, OP_END_BUF, OP_END_LINE, OP_FAIL_LOOK_BEHIND_NOT, OP_FAIL_POS, OP_LOOK_BEHIND, OP_NOT_WORD_BOUND, OP_POP_POS, OP_PUSH_LOOK_BEHIND_NOT, OP_PUSH_POS, OP_PUSH_POS_NOT, OP_SEMI_END_BUF, OP_WORD_BEGIN, OP_WORD_BOUND, OP_WORD_END, SIZE_OP_FAIL_LOOK_BEHIND_NOT, SIZE_OP_FAIL_POS, AnchorNode::target, and AnchorNode::type.
Referenced by compile_tree().
|
static |
Definition at line 612 of file regcomp.c.
References add_bitset(), add_multi_byte_cclass(), add_opcode(), add_pointer(), bitset_is_empty(), CClassNode::bs, re_pattern_buffer::enc, IS_NCCLASS_NOT, IS_NCCLASS_SHARE, IS_NULL, CClassNode::mbuf, ONIGENC_MBC_MINLEN, OP_CCLASS, OP_CCLASS_MB, OP_CCLASS_MB_NOT, OP_CCLASS_MIX, OP_CCLASS_MIX_NOT, OP_CCLASS_NODE, and OP_CCLASS_NOT.
Referenced by compile_tree().
|
static |
Definition at line 1276 of file regcomp.c.
References add_abs_addr(), add_mem_num(), add_opcode(), add_opcode_rel_addr(), BBUF_GET_OFFSET_POS, BIT_STATUS_AT, re_pattern_buffer::bt_mem_end, re_pattern_buffer::bt_mem_start, EncloseNode::call_addr, compile_length_tree(), compile_option_node(), compile_tree(), compile_tree_n_times(), ENCLOSE_MEMORY, ENCLOSE_OPTION, ENCLOSE_STOP_BACKTRACK, IS_ENCLOSE_CALLED, IS_ENCLOSE_RECURSION, IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT, len, QtfrNode::lower, NQTFR, NST_ADDR_FIXED, ONIGERR_TYPE_BUG, OP_CALL, OP_JUMP, OP_MEMORY_END, OP_MEMORY_END_PUSH, OP_MEMORY_END_PUSH_REC, OP_MEMORY_END_REC, OP_MEMORY_START, OP_MEMORY_START_PUSH, OP_POP, OP_POP_STOP_BT, OP_PUSH, OP_PUSH_STOP_BT, OP_RETURN, EncloseNode::regnum, SIZE_ABSADDR, SIZE_OP_JUMP, SIZE_OP_MEMORY_END, SIZE_OP_MEMORY_END_PUSH, SIZE_OP_MEMORY_END_PUSH_REC, SIZE_OP_MEMORY_END_REC, SIZE_OP_MEMORY_START_PUSH, SIZE_OP_POP, SIZE_OP_PUSH, SIZE_OP_RETURN, EncloseNode::state, QtfrNode::target, EncloseNode::target, and EncloseNode::type.
Referenced by compile_tree().
|
static |
Definition at line 1377 of file regcomp.c.
References ANCHOR_LOOK_BEHIND, ANCHOR_LOOK_BEHIND_NOT, ANCHOR_PREC_READ, ANCHOR_PREC_READ_NOT, compile_length_tree(), len, SIZE_OP_FAIL_LOOK_BEHIND_NOT, SIZE_OP_FAIL_POS, SIZE_OP_LOOK_BEHIND, SIZE_OP_POP_POS, SIZE_OP_PUSH_LOOK_BEHIND_NOT, SIZE_OP_PUSH_POS, SIZE_OP_PUSH_POS_NOT, SIZE_OPCODE, AnchorNode::target, and AnchorNode::type.
Referenced by compile_length_tree().
|
static |
Definition at line 582 of file regcomp.c.
References bitset_is_empty(), CClassNode::bs, re_pattern_buffer::enc, IS_NCCLASS_SHARE, IS_NULL, len, CClassNode::mbuf, ONIGENC_MBC_MINLEN, SIZE_BITSET, SIZE_LENGTH, SIZE_OPCODE, SIZE_POINTER, _BBuf::used, and WORD_ALIGNMENT_SIZE.
Referenced by compile_length_tree().
|
static |
Definition at line 1210 of file regcomp.c.
References BIT_STATUS_AT, re_pattern_buffer::bt_mem_end, re_pattern_buffer::bt_mem_start, compile_length_option_node(), compile_length_tree(), ENCLOSE_MEMORY, ENCLOSE_OPTION, ENCLOSE_STOP_BACKTRACK, IS_ENCLOSE_CALLED, IS_ENCLOSE_RECURSION, IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT, len, QtfrNode::lower, NQTFR, ONIGERR_TYPE_BUG, EncloseNode::regnum, SIZE_OP_CALL, SIZE_OP_JUMP, SIZE_OP_MEMORY_END, SIZE_OP_MEMORY_END_PUSH, SIZE_OP_MEMORY_END_PUSH_REC, SIZE_OP_MEMORY_END_REC, SIZE_OP_MEMORY_START, SIZE_OP_MEMORY_START_PUSH, SIZE_OP_POP, SIZE_OP_POP_STOP_BT, SIZE_OP_PUSH, SIZE_OP_PUSH_STOP_BT, SIZE_OP_RETURN, QtfrNode::target, EncloseNode::target, and EncloseNode::type.
Referenced by compile_length_tree().
|
static |
Definition at line 1164 of file regcomp.c.
References compile_length_tree(), IS_DYNAMIC_OPTION, EncloseNode::option, re_pattern_buffer::options, SIZE_OP_FAIL, SIZE_OP_SET_OPTION, SIZE_OP_SET_OPTION_PUSH, and EncloseNode::target.
Referenced by compile_length_enclose_node().
Definition at line 971 of file regcomp.c.
References compile_length_tree(), QtfrNode::greedy, QtfrNode::head_exact, IS_NOT_NULL, QtfrNode::is_refered, IS_REPEAT_INFINITE, len, QtfrNode::lower, QtfrNode::next_head_exact, NT_CANY, NTYPE, QUANTIFIER_EXPAND_LIMIT_SIZE, SIZE_MEMNUM, SIZE_OP_ANYCHAR_STAR, SIZE_OP_ANYCHAR_STAR_PEEK_NEXT, SIZE_OP_JUMP, SIZE_OP_NULL_CHECK_END, SIZE_OP_NULL_CHECK_START, SIZE_OP_PUSH, SIZE_OP_PUSH_IF_PEEK_NEXT, SIZE_OP_PUSH_OR_JUMP_EXACT1, SIZE_OP_REPEAT_INC, SIZE_OPCODE, SIZE_RELADDR, QtfrNode::target, QtfrNode::target_empty_info, and QtfrNode::upper.
Referenced by compile_length_tree().
Definition at line 463 of file regcomp.c.
References add_compile_string_length(), re_pattern_buffer::enc, enclen, StrNode::end, len, NSTR, NSTRING_IS_AMBIG, p, StrNode::s, and UChar.
Referenced by compile_length_tree().
Definition at line 502 of file regcomp.c.
References add_compile_string_length(), StrNode::end, and StrNode::s.
Referenced by compile_length_tree().
Definition at line 1494 of file regcomp.c.
References BRefNode::back_num, BRefNode::back_static, compile_length_anchor_node(), compile_length_cclass_node(), compile_length_enclose_node(), compile_length_quantifier_node(), compile_length_string_node(), compile_length_string_raw_node(), IS_BACKREF_NEST_LEVEL, IS_IGNORECASE, IS_NOT_NULL, len, NANCHOR, NBREF, NCAR, NCCLASS, NCDR, NENCLOSE, NQTFR, NSTR, NSTRING_IS_RAW, NT_ALT, NT_ANCHOR, NT_BREF, NT_CALL, NT_CANY, NT_CCLASS, NT_CTYPE, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, ONIGERR_TYPE_BUG, re_pattern_buffer::options, SIZE_LENGTH, SIZE_MEMNUM, SIZE_OP_CALL, SIZE_OP_JUMP, SIZE_OP_PUSH, SIZE_OPCODE, SIZE_OPTION, and type.
Referenced by compile_anchor_node(), compile_enclose_node(), compile_length_anchor_node(), compile_length_enclose_node(), compile_length_option_node(), compile_length_quantifier_node(), compile_quantifier_node(), and compile_tree().
|
static |
Definition at line 1184 of file regcomp.c.
References add_opcode(), add_opcode_option(), compile_tree(), IS_DYNAMIC_OPTION, OP_FAIL, OP_SET_OPTION, OP_SET_OPTION_PUSH, EncloseNode::option, re_pattern_buffer::options, and EncloseNode::target.
Referenced by compile_enclose_node().
Definition at line 1036 of file regcomp.c.
References add_bytes(), add_opcode(), add_opcode_rel_addr(), compile_length_tree(), compile_range_repeat_node(), compile_tree(), compile_tree_empty_check(), compile_tree_n_times(), QtfrNode::greedy, QtfrNode::head_exact, i, is_anychar_star_quantifier(), IS_MULTILINE, IS_NOT_NULL, QtfrNode::is_refered, IS_REPEAT_INFINITE, QtfrNode::lower, QtfrNode::next_head_exact, NSTR, OP_ANYCHAR_ML_STAR, OP_ANYCHAR_ML_STAR_PEEK_NEXT, OP_ANYCHAR_STAR, OP_ANYCHAR_STAR_PEEK_NEXT, OP_JUMP, OP_PUSH, OP_PUSH_IF_PEEK_NEXT, OP_PUSH_OR_JUMP_EXACT1, re_pattern_buffer::options, QUANTIFIER_EXPAND_LIMIT_SIZE, SIZE_OP_JUMP, SIZE_OP_NULL_CHECK_END, SIZE_OP_NULL_CHECK_START, SIZE_OP_PUSH, SIZE_OP_PUSH_IF_PEEK_NEXT, SIZE_OP_PUSH_OR_JUMP_EXACT1, QtfrNode::target, QtfrNode::target_empty_info, and QtfrNode::upper.
Referenced by compile_tree().
|
static |
Definition at line 686 of file regcomp.c.
References add_mem_num(), add_opcode(), add_rel_addr(), compile_tree_empty_check(), entry_repeat_range(), QtfrNode::greedy, IS_QUANTIFIER_IN_REPEAT, QtfrNode::lower, re_pattern_buffer::num_call, re_pattern_buffer::num_repeat, OP_REPEAT, OP_REPEAT_INC, OP_REPEAT_INC_NG, OP_REPEAT_INC_NG_SG, OP_REPEAT_INC_SG, OP_REPEAT_NG, SIZE_OP_REPEAT_INC, QtfrNode::target, QtfrNode::upper, and USE_SUBEXP_CALL.
Referenced by compile_quantifier_node().
Definition at line 511 of file regcomp.c.
References add_compile_string(), re_pattern_buffer::enc, enclen, StrNode::end, re_registers::end, len, NSTR, NSTRING_IS_AMBIG, p, StrNode::s, and UChar.
Referenced by compile_tree().
Definition at line 550 of file regcomp.c.
References add_compile_string(), StrNode::end, and StrNode::s.
Referenced by compile_tree().
Definition at line 1587 of file regcomp.c.
References add_length(), add_mem_num(), add_opcode(), add_opcode_rel_addr(), add_option(), BRefNode::back_num, BRefNode::back_static, BACKREFS_P, compile_anchor_node(), compile_cclass_node(), compile_enclose_node(), compile_length_tree(), compile_quantifier_node(), compile_string_node(), compile_string_raw_node(), i, IS_BACKREF_NEST_LEVEL, IS_IGNORECASE, IS_MULTILINE, IS_NOT_NULL, len, NANCHOR, NBREF, NCALL, NCAR, NCCLASS, NCDR, NCTYPE, NENCLOSE, BRefNode::nest_level, NQTFR, NSTR, NSTRING_IS_RAW, NT_ALT, NT_ANCHOR, NT_BREF, NT_CALL, NT_CANY, NT_CCLASS, NT_CTYPE, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, NULL, ONIG_OPTION_IGNORECASE, ONIGENC_CTYPE_WORD, ONIGERR_TYPE_BUG, OP_ANYCHAR, OP_ANYCHAR_ML, OP_BACKREF1, OP_BACKREF2, OP_BACKREF_MULTI, OP_BACKREF_MULTI_IC, OP_BACKREF_WITH_LEVEL, OP_BACKREFN, OP_BACKREFN_IC, OP_JUMP, OP_NOT_WORD, OP_PUSH, OP_WORD, re_pattern_buffer::options, p, SIZE_OP_JUMP, SIZE_OP_PUSH, type, and re_pattern_buffer::used.
Referenced by compile_anchor_node(), compile_enclose_node(), compile_option_node(), compile_quantifier_node(), compile_tree_empty_check(), compile_tree_n_times(), and onig_compile().
Definition at line 365 of file regcomp.c.
References add_mem_num(), add_opcode(), compile_tree(), NQ_TARGET_IS_EMPTY, NQ_TARGET_IS_EMPTY_MEM, NQ_TARGET_IS_EMPTY_REC, re_pattern_buffer::num_null_check, OP_NULL_CHECK_END, OP_NULL_CHECK_END_MEMST, OP_NULL_CHECK_END_MEMST_PUSH, and OP_NULL_CHECK_START.
Referenced by compile_quantifier_node(), and compile_range_repeat_node().
Definition at line 412 of file regcomp.c.
References compile_tree(), and i.
Referenced by compile_enclose_node(), and compile_quantifier_node().
|
static |
Definition at line 4503 of file regcomp.c.
References add_mml(), OptExactInfo::anc, OptMapInfo::anc, NodeOptInfo::anc, clear_opt_exact_info(), concat_opt_anc_info(), concat_opt_exact_info(), copy_opt_anc_info(), copy_opt_exact_info(), NodeOptInfo::exb, NodeOptInfo::exm, NodeOptInfo::expr, if(), OptAncInfo::left_anchor, OptExactInfo::len, NodeOptInfo::len, NodeOptInfo::map, MinMaxLen::max, OptExactInfo::mmd, OptMapInfo::mmd, OptExactInfo::reach_end, select_opt_exact_info(), select_opt_map_info(), and OptMapInfo::value.
Referenced by optimize_node_left().
|
static |
Definition at line 4156 of file regcomp.c.
References clear_opt_anc_info(), OptAncInfo::left_anchor, and OptAncInfo::right_anchor.
Referenced by concat_left_node_opt_info(), and concat_opt_exact_info().
|
static |
Definition at line 4240 of file regcomp.c.
References OptExactInfo::anc, concat_opt_anc_info(), copy_opt_anc_info(), enclen, i, OptExactInfo::ignore_case, OptExactInfo::len, len, OPT_EXACT_MAXLEN, p, OptExactInfo::reach_end, return, OptAncInfo::right_anchor, OptExactInfo::s, and UChar.
Referenced by concat_left_node_opt_info(), and optimize_node_left().
|
static |
Definition at line 4270 of file regcomp.c.
References enclen, i, OptExactInfo::len, len, OPT_EXACT_MAXLEN, p, OptExactInfo::s, and UChar.
Referenced by optimize_node_left().
Definition at line 4107 of file regcomp.c.
References MinMaxLen::max, and MinMaxLen::min.
Referenced by set_bound_node_opt_info().
|
static |
Definition at line 4497 of file regcomp.c.
Referenced by optimize_node_left().
|
static |
Definition at line 4150 of file regcomp.c.
Referenced by concat_left_node_opt_info(), and concat_opt_exact_info().
Definition at line 4137 of file regcomp.c.
Referenced by optimize_node_left().
|
static |
Definition at line 4234 of file regcomp.c.
Referenced by concat_left_node_opt_info(), optimize_node_left(), and select_opt_exact_info().
|
static |
Definition at line 4382 of file regcomp.c.
Referenced by optimize_node_left(), and select_opt_map_info().
|
static |
Definition at line 92 of file regcomp.c.
References ONIG_INFINITE_DISTANCE.
Referenced by add_mml(), get_char_length_tree1(), and get_max_match_length().
|
static |
Definition at line 103 of file regcomp.c.
References ONIG_INFINITE_DISTANCE.
Referenced by get_char_length_tree1(), get_max_match_length(), get_min_match_length(), and optimize_node_left().
|
static |
Definition at line 4041 of file regcomp.c.
References MinMaxLen::max, MinMaxLen::min, and ONIG_INFINITE_DISTANCE.
Referenced by comp_distance_value().
|
static |
Definition at line 3125 of file regcomp.c.
References ANCHOR_LOOK_BEHIND_NOT, CHECK_NULL_RETURN_MEMERR, NANCHOR, NCAR, NCDR, NT_LIST, NULL_NODE, onig_node_new_anchor(), SET_NTYPE, swap_node(), AnchorNode::target, and AnchorNode::type.
Referenced by setup_look_behind().
|
static |
Definition at line 655 of file regcomp.c.
References CHECK_NULL_RETURN_MEMERR, id, IS_REPEAT_INFINITE, OnigRepeatRange::lower, p, re_pattern_buffer::repeat_range, re_pattern_buffer::repeat_range_alloc, REPEAT_RANGE_ALLOC, OnigRepeatRange::upper, xmalloc, and xrealloc.
Referenced by compile_range_repeat_node().
|
static |
Definition at line 3267 of file regcomp.c.
References IS_NULL, NSTRING_SET_AMBIG, NSTRING_SET_DONT_GET_OPT_INFO, onig_node_free(), onig_node_new_str(), ONIGERR_MEMORY, and update_string_node_case_fold().
Referenced by expand_case_fold_string(), and expand_case_fold_string_alt().
Definition at line 3401 of file regcomp.c.
References re_pattern_buffer::case_fold_flag, re_pattern_buffer::enc, enclen, StrNode::end, re_registers::end, err, expand_case_fold_make_rem_string(), expand_case_fold_string_alt(), IS_NOT_NULL, IS_NULL, len, NCAR, NSTR, NSTRING_IS_AMBIG, NULL, NULL_NODE, onig_node_free(), onig_node_list_add(), onig_node_new_str(), onig_node_str_cat(), ONIGENC_GET_CASE_FOLD_CODES_BY_STR, ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM, ONIGERR_MEMORY, p, StrNode::s, swap_node(), THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION, and UChar.
Referenced by setup_tree().
|
static |
Definition at line 3289 of file regcomp.c.
References buf, OnigCaseFoldCodeItem::byte_len, OnigCaseFoldCodeItem::code, OnigCaseFoldCodeItem::code_len, re_pattern_buffer::enc, expand_case_fold_make_rem_string(), i, IS_NULL, len, NCAR, NCDR, NULL, NULL_NODE, onig_node_free(), onig_node_list_add(), onig_node_new_alt(), onig_node_new_list(), onig_node_new_str(), onig_node_str_cat(), ONIGENC_CODE_TO_MBC, ONIGENC_CODE_TO_MBC_MAXLEN, ONIGERR_MEMORY, and UChar.
Referenced by expand_case_fold_string().
Definition at line 2424 of file regcomp.c.
References get_char_length_tree1().
Referenced by compile_anchor_node(), and setup_look_behind().
Definition at line 2301 of file regcomp.c.
References EncloseNode::char_len, distance_add(), distance_multiply(), re_pattern_buffer::enc, enclen, ENCLOSE_MEMORY, ENCLOSE_OPTION, ENCLOSE_STOP_BACKTRACK, StrNode::end, re_registers::end, GET_CHAR_LEN_TOP_ALT_VARLEN, GET_CHAR_LEN_VARLEN, IS_CALL_RECURSION, IS_ENCLOSE_CLEN_FIXED, IS_NOT_NULL, len, QtfrNode::lower, NCALL, NCAR, NCDR, NENCLOSE, NQTFR, NST_CLEN_FIXED, NSTR, NT_ALT, NT_ANCHOR, NT_CALL, NT_CANY, NT_CCLASS, NT_CTYPE, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, StrNode::s, SET_ENCLOSE_STATUS, QtfrNode::target, EncloseNode::target, EncloseNode::type, UChar, and QtfrNode::upper.
Referenced by get_char_length_tree().
Definition at line 2607 of file regcomp.c.
References ANCHOR_PREC_READ, ENCLOSE_MEMORY, ENCLOSE_OPTION, ENCLOSE_STOP_BACKTRACK, StrNode::end, QtfrNode::head_exact, IS_IGNORECASE, IS_NOT_NULL, QtfrNode::lower, NANCHOR, NCAR, NENCLOSE, NQTFR, NSTR, NSTRING_IS_RAW, NT_ALT, NT_ANCHOR, NT_BREF, NT_CALL, NT_CANY, NT_CCLASS, NT_CTYPE, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, NULL_NODE, re_pattern_buffer::options, options(), StrNode::s, QtfrNode::target, EncloseNode::target, type, and EncloseNode::type.
Referenced by next_setup(), and setup_tree().
|
static |
Definition at line 2180 of file regcomp.c.
References BRefNode::back_num, BACKREFS_P, distance_add(), distance_multiply(), ScanEnv::enc, ENCLOSE_MEMORY, ENCLOSE_OPTION, ENCLOSE_STOP_BACKTRACK, StrNode::end, i, IS_CALL_RECURSION, IS_ENCLOSE_MAX_FIXED, IS_NOT_NULL, IS_REPEAT_INFINITE, max(), EncloseNode::max_len, NBREF, NCALL, NCAR, NCDR, NENCLOSE, NQTFR, NST_MAX_FIXED, NST_RECURSION, NSTR, NT_ALT, NT_ANCHOR, NT_BREF, NT_CALL, NT_CANY, NT_CCLASS, NT_CTYPE, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, ScanEnv::num_mem, ONIG_INFINITE_DISTANCE, ONIGENC_MBC_MAXLEN_DIST, ONIGERR_INVALID_BACKREF, StrNode::s, SCANENV_MEM_NODES, SET_ENCLOSE_STATUS, BRefNode::state, QtfrNode::target, EncloseNode::target, EncloseNode::type, and QtfrNode::upper.
Referenced by optimize_node_left(), and setup_tree().
|
static |
Definition at line 2057 of file regcomp.c.
References BRefNode::back_num, BACKREFS_P, distance_multiply(), ENCLOSE_MEMORY, ENCLOSE_OPTION, ENCLOSE_STOP_BACKTRACK, StrNode::end, i, IS_CALL_RECURSION, IS_ENCLOSE_MIN_FIXED, IS_NOT_NULL, QtfrNode::lower, min(), EncloseNode::min_len, NBREF, NCALL, NCAR, NCDR, NENCLOSE, NQTFR, NST_MIN_FIXED, NST_RECURSION, NSTR, NT_ALT, NT_ANCHOR, NT_BREF, NT_CALL, NT_CANY, NT_CCLASS, NT_CTYPE, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, ScanEnv::num_mem, ONIGERR_INVALID_BACKREF, StrNode::s, SCANENV_MEM_NODES, SET_ENCLOSE_STATUS, BRefNode::state, QtfrNode::target, EncloseNode::target, and EncloseNode::type.
Referenced by optimize_node_left(), and setup_tree().
|
static |
Definition at line 722 of file regcomp.c.
References QtfrNode::greedy, IS_REPEAT_INFINITE, NT_CANY, NTYPE, QtfrNode::target, and QtfrNode::upper.
Referenced by compile_quantifier_node().
Definition at line 4087 of file regcomp.c.
References MinMaxLen::max, and MinMaxLen::min.
Referenced by alt_merge_opt_exact_info().
|
static |
Definition at line 4217 of file regcomp.c.
References OptExactInfo::len, and OPT_EXACT_MAXLEN.
Referenced by optimize_node_left().
|
static |
Definition at line 4173 of file regcomp.c.
References ANCHOR_END_BUF, ANCHOR_END_LINE, ANCHOR_PREC_READ, ANCHOR_PREC_READ_NOT, and ANCHOR_SEMI_END_BUF.
Referenced by add_opt_anc_info(), and remove_opt_anc_info().
Definition at line 2431 of file regcomp.c.
References BITSET_AT, CClassNode::bs, re_pattern_buffer::enc, StrNode::end, i, IS_CODE_SB_WORD, IS_NCCLASS_NOT, IS_NULL, len, CClassNode::mbuf, NCCLASS, NCTYPE, NSTR, NSTRING_IS_AMBIG, NSTRING_LEN, NT_CCLASS, NT_CTYPE, NT_STR, NTYPE, onig_is_code_in_cc(), ONIGENC_CTYPE_WORD, ONIGENC_IS_MBC_WORD, ONIGENC_MBC_MAXLEN, ONIGENC_MBC_TO_CODE, p, StrNode::s, SINGLE_BYTE_SIZE, UChar, and v.
Referenced by next_setup().
|
static |
Definition at line 4184 of file regcomp.c.
References OptAncInfo::left_anchor, and OptAncInfo::right_anchor.
Referenced by optimize_node_left().
|
static |
Definition at line 4017 of file regcomp.c.
References i, and ONIGENC_MBC_MINLEN.
Referenced by add_char_opt_map_info(), alt_merge_opt_map_info(), and select_opt_exact_info().
Definition at line 3176 of file regcomp.c.
References CHECK_NULL_RETURN_MEMERR, ENCLOSE_MEMORY, ENCLOSE_STOP_BACKTRACK, get_head_value_node(), QtfrNode::greedy, IS_NODE_TYPE_SIMPLE, is_not_included(), IS_NOT_NULL, IS_REPEAT_INFINITE, QtfrNode::lower, NENCLOSE, QtfrNode::next_head_exact, NQTFR, NST_STOP_BT_SIMPLE_REPEAT, NSTR, NT_ENCLOSE, NT_QTFR, NTYPE, onig_node_new_enclose(), SET_ENCLOSE_STATUS, swap_node(), QtfrNode::target, EncloseNode::target, type, EncloseNode::type, and QtfrNode::upper.
Referenced by setup_tree().
int onig_bbuf_init | ( | BBuf * | buf, |
OnigDistance | size | ||
) |
Definition at line 144 of file regcomp.c.
References _BBuf::alloc, IS_NULL, NULL, ONIGERR_MEMORY, _BBuf::p, UChar, _BBuf::used, and xmalloc.
Definition at line 5282 of file regcomp.c.
References add, re_pattern_buffer::chain, REGEX_CHAIN_HEAD, THREAD_ATOMIC_END, and THREAD_ATOMIC_START.
void onig_chain_reduce | ( | regex_t * | reg | ) |
Definition at line 5291 of file regcomp.c.
References re_pattern_buffer::chain, IS_NOT_NULL, NULL, ONIG_STATE_MODIFY, REGEX_TRANSFER, and re_pattern_buffer::state.
Referenced by onig_match(), and onig_search().
int onig_compile | ( | regex_t * | reg, |
const UChar * | pattern, | ||
const UChar * | pattern_end, | ||
OnigErrorInfo * | einfo, | ||
const char * | sourcefile, | ||
int | sourceline | ||
) |
Definition at line 5316 of file regcomp.c.
References add_opcode(), re_pattern_buffer::alloc, ScanEnv::backrefed_mem, BBUF_INIT, BIT_STATUS_AT, BIT_STATUS_ON_ALL, ScanEnv::bt_mem_end, re_pattern_buffer::bt_mem_end, ScanEnv::bt_mem_start, re_pattern_buffer::bt_mem_start, ScanEnv::capture_history, re_pattern_buffer::capture_history, clear_optimize_info(), COMPILE_INIT_SIZE, compile_tree(), ScanEnv::enc, OnigErrorInfo::enc, re_pattern_buffer::enc, err, ScanEnv::error, ScanEnv::error_end, i, IS_FIND_CONDITION, IS_NOT_NULL, IS_SYNTAX_BV, ScanEnv::mem_nodes_dynamic, NULL, ScanEnv::num_call, re_pattern_buffer::num_call, re_pattern_buffer::num_comb_exp_check, ScanEnv::num_mem, re_pattern_buffer::num_mem, ScanEnv::num_named, re_pattern_buffer::num_null_check, re_pattern_buffer::num_repeat, ONIG_IS_OPTION_ON, onig_node_free(), ONIG_OPTION_CAPTURE_GROUP, onig_parse_make_tree(), ONIG_STATE_COMPILING, ONIG_STATE_NORMAL, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP, OP_END, re_pattern_buffer::options, OnigErrorInfo::par, OnigErrorInfo::par_end, re_pattern_buffer::repeat_range, re_pattern_buffer::repeat_range_alloc, set_optimize_info_from_tree(), setup_tree(), ScanEnv::sourcefile, ScanEnv::sourceline, re_pattern_buffer::stack_pop_level, STACK_POP_LEVEL_ALL, STACK_POP_LEVEL_FREE, STACK_POP_LEVEL_MEM_START, re_pattern_buffer::state, ScanEnv::syntax, UChar, ScanEnv::unset_addr_list, USE_SUBEXP_CALL, re_pattern_buffer::used, and xfree().
Referenced by onig_new(), onig_new_with_source(), and onig_new_without_alloc().
int onig_end | ( | void | ) |
Definition at line 5645 of file regcomp.c.
References onig_free_node_list(), onig_free_shared_cclass_table(), THREAD_ATOMIC_END, THREAD_ATOMIC_START, and THREAD_SYSTEM_END.
void onig_free | ( | regex_t * | reg | ) |
Definition at line 5238 of file regcomp.c.
References IS_NOT_NULL, onig_free_body(), and xfree().
Referenced by obj_free(), onig_free_body(), onig_new(), onig_new_with_source(), rb_reg_search(), rb_reg_to_s(), and strscan_do_scan().
void onig_free_body | ( | regex_t * | reg | ) |
Definition at line 5221 of file regcomp.c.
References re_pattern_buffer::chain, re_pattern_buffer::exact, re_pattern_buffer::int_map, re_pattern_buffer::int_map_backward, IS_NOT_NULL, onig_free(), onig_names_free(), re_pattern_buffer::p, re_pattern_buffer::repeat_range, and xfree().
Referenced by onig_free().
OnigCaseFoldType onig_get_default_case_fold_flag | ( | void | ) |
Definition at line 35 of file regcomp.c.
References OnigDefaultCaseFoldFlag.
int onig_init | ( | void | ) |
Definition at line 5622 of file regcomp.c.
References onigenc_init(), THREAD_ATOMIC_END, THREAD_ATOMIC_START, and THREAD_SYSTEM_INIT.
Referenced by onig_reg_init().
int onig_is_code_in_cc | ( | OnigEncoding | enc, |
OnigCodePoint | code, | ||
CClassNode * | cc | ||
) |
Definition at line 5713 of file regcomp.c.
References len, onig_is_code_in_cc_len(), ONIGENC_CODE_TO_MBCLEN, and ONIGENC_MBC_MINLEN.
Referenced by i_apply_case_fold(), and is_not_included().
int onig_is_code_in_cc_len | ( | int | elen, |
OnigCodePoint | code, | ||
CClassNode * | cc | ||
) |
Definition at line 5690 of file regcomp.c.
References BITSET_AT, CClassNode::bs, IS_NCCLASS_NOT, IS_NULL, CClassNode::mbuf, onig_is_in_code_range(), and _BBuf::p.
Referenced by match_at(), and onig_is_code_in_cc().
int onig_is_in_code_range | ( | const UChar * | p, |
OnigCodePoint | code | ||
) |
Definition at line 5669 of file regcomp.c.
References GET_CODE_POINT.
Referenced by is_code_ctype(), match_at(), onig_is_code_in_cc_len(), and onigenc_unicode_is_code_ctype().
Definition at line 5247 of file regcomp.c.
References re_pattern_buffer::alloc, re_pattern_buffer::chain, re_pattern_buffer::exact, re_pattern_buffer::exact_end, if(), re_pattern_buffer::int_map, re_pattern_buffer::int_map_backward, IS_NOT_NULL, ONIG_CHAR_TABLE_SIZE, re_pattern_buffer::p, re_pattern_buffer::repeat_range, re_pattern_buffer::repeat_range_alloc, and size.
Referenced by memsize_of().
int onig_new | ( | regex_t ** | reg, |
const UChar * | pattern, | ||
const UChar * | pattern_end, | ||
OnigOptionType | option, | ||
OnigEncoding | enc, | ||
const OnigSyntaxType * | syntax, | ||
OnigErrorInfo * | einfo | ||
) |
Definition at line 5599 of file regcomp.c.
References err, IS_NULL, NULL, onig_compile(), onig_free(), onig_reg_init(), ONIGENC_CASE_FOLD_DEFAULT, ONIGERR_MEMORY, and xmalloc.
Referenced by rb_reg_prepare_re(), and rb_reg_to_s().
int onig_new_without_alloc | ( | regex_t * | reg, |
const UChar * | pattern, | ||
const UChar * | pattern_end, | ||
OnigOptionType | option, | ||
OnigEncoding | enc, | ||
OnigSyntaxType * | syntax, | ||
OnigErrorInfo * | einfo | ||
) |
Definition at line 5585 of file regcomp.c.
References NULL, onig_compile(), onig_reg_init(), and ONIGENC_CASE_FOLD_DEFAULT.
int onig_reg_init | ( | regex_t * | reg, |
OnigOptionType | option, | ||
OnigCaseFoldType | case_fold_flag, | ||
OnigEncoding | enc, | ||
const OnigSyntaxType * | syntax | ||
) |
Definition at line 5539 of file regcomp.c.
References alloc, IS_NULL, NULL, onig_init(), ONIG_OPTION_CAPTURE_GROUP, ONIG_OPTION_DONT_CAPTURE_GROUP, ONIG_OPTION_NEGATE_SINGLELINE, ONIG_OPTION_SINGLELINE, ONIG_STATE_MODIFY, ONIGENC_IS_UNDEF, ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED, ONIGERR_INVALID_ARGUMENT, ONIGERR_INVALID_COMBINATION_OF_OPTIONS, OnigSyntaxType::options, options(), and UChar.
Referenced by onig_new(), onig_new_with_source(), and onig_new_without_alloc().
int onig_set_default_case_fold_flag | ( | OnigCaseFoldType | case_fold_flag | ) |
Definition at line 41 of file regcomp.c.
References OnigDefaultCaseFoldFlag.
Definition at line 5268 of file regcomp.c.
References REGEX_TRANSFER, THREAD_ATOMIC_END, and THREAD_ATOMIC_START.
|
static |
Definition at line 4577 of file regcomp.c.
References add_char_amb_opt_map_info(), add_char_opt_map_info(), add_mml(), add_opt_anc_info(), alt_merge_node_opt_info(), NodeOptInfo::anc, ANCHOR_ANYCHAR_STAR, ANCHOR_ANYCHAR_STAR_MASK, ANCHOR_ANYCHAR_STAR_ML, ANCHOR_BEGIN_BUF, ANCHOR_BEGIN_LINE, ANCHOR_BEGIN_POSITION, ANCHOR_END_BUF, ANCHOR_END_LINE, ANCHOR_LOOK_BEHIND, ANCHOR_LOOK_BEHIND_NOT, ANCHOR_PREC_READ, ANCHOR_PREC_READ_NOT, ANCHOR_SEMI_END_BUF, BRefNode::back_num, ScanEnv::backrefed_mem, BACKREFS_P, BIT_STATUS_AT, BITSET_AT, CClassNode::bs, OptEnv::case_fold_flag, clear_node_opt_info(), concat_left_node_opt_info(), concat_opt_exact_info(), concat_opt_exact_info_str(), copy_node_opt_info(), copy_opt_env(), copy_opt_exact_info(), copy_opt_map_info(), distance_multiply(), OptEnv::enc, ENCLOSE_MEMORY, ENCLOSE_OPTION, ENCLOSE_STOP_BACKTRACK, StrNode::end, NodeOptInfo::exb, NodeOptInfo::exm, NodeOptInfo::expr, get_max_match_length(), get_min_match_length(), QtfrNode::greedy, i, OptExactInfo::ignore_case, IS_CALL_RECURSION, IS_ENCLOSE_MAX_FIXED, IS_ENCLOSE_MIN_FIXED, is_full_opt_exact_info(), IS_MULTILINE, IS_NCCLASS_NOT, IS_NOT_NULL, IS_REPEAT_INFINITE, is_set_opt_anc_info(), OptExactInfo::len, NodeOptInfo::len, QtfrNode::lower, NodeOptInfo::map, max(), MinMaxLen::max, EncloseNode::max_len, MAX_NODE_OPT_INFO_REF_COUNT, CClassNode::mbuf, min(), MinMaxLen::min, EncloseNode::min_len, OptEnv::mmd, NANCHOR, NBREF, NCALL, NCAR, NCCLASS, NCDR, NCTYPE, NENCLOSE, NQTFR, NST_RECURSION, NSTR, NSTRING_IS_AMBIG, NSTRING_IS_DONT_GET_OPT_INFO, NSTRING_IS_RAW, NT_ALT, NT_ANCHOR, NT_BREF, NT_CALL, NT_CANY, NT_CCLASS, NT_CTYPE, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, ONIG_INFINITE_DISTANCE, ONIGENC_CTYPE_WORD, ONIGENC_IS_CODE_WORD, ONIGENC_MBC_MAXLEN_DIST, ONIGENC_MBC_MINLEN, onigenc_strlen(), ONIGERR_TYPE_BUG, EncloseNode::opt_count, EncloseNode::option, OptEnv::options, OptExactInfo::reach_end, EncloseNode::regnum, remove_opt_anc_info(), StrNode::s, OptEnv::scan_env, SCANENV_MEM_NODES, set_bound_node_opt_info(), set_mml(), SINGLE_BYTE_SIZE, BRefNode::state, QtfrNode::target, EncloseNode::target, type, EncloseNode::type, UChar, QtfrNode::upper, and OptMapInfo::value.
Referenced by set_optimize_info_from_tree().
|
static |
Definition at line 4201 of file regcomp.c.
References is_left_anchor(), OptAncInfo::left_anchor, and OptAncInfo::right_anchor.
Referenced by optimize_node_left().
|
static |
Definition at line 4323 of file regcomp.c.
References comp_distance_value(), copy_opt_exact_info(), OptExactInfo::ignore_case, OptExactInfo::len, map_position_value(), OptExactInfo::mmd, return, and OptExactInfo::s.
Referenced by concat_left_node_opt_info(), and set_optimize_info_from_tree().
|
static |
Definition at line 4419 of file regcomp.c.
References comp_distance_value(), copy_opt_map_info(), OptMapInfo::mmd, return, and OptMapInfo::value.
Referenced by concat_left_node_opt_info().
|
static |
Definition at line 320 of file regcomp.c.
References OP_EXACT1, OP_EXACT1_IC, OP_EXACT2, OP_EXACT3, OP_EXACT4, OP_EXACT5, OP_EXACTMB2N, OP_EXACTMB2N1, OP_EXACTMB2N2, OP_EXACTMB2N3, OP_EXACTMB3N, OP_EXACTMBN, OP_EXACTN, and OP_EXACTN_IC.
Referenced by add_compile_string(), and add_compile_string_length().
|
static |
Definition at line 3941 of file regcomp.c.
References i, IS_NULL, len, ONIG_CHAR_TABLE_SIZE, ONIGERR_MEMORY, and xmalloc.
Referenced by set_optimize_exact_info().
|
static |
Definition at line 4478 of file regcomp.c.
References copy_mml(), NodeOptInfo::exb, NodeOptInfo::expr, NodeOptInfo::map, OptExactInfo::mmd, and OptMapInfo::mmd.
Referenced by optimize_node_left().
|
static |
Definition at line 4094 of file regcomp.c.
References max(), MinMaxLen::max, min(), and MinMaxLen::min.
Referenced by optimize_node_left().
|
static |
Definition at line 4921 of file regcomp.c.
References CHECK_NULL_RETURN_MEMERR, re_pattern_buffer::dmax, re_pattern_buffer::dmin, re_pattern_buffer::enc, re_pattern_buffer::exact, re_pattern_buffer::exact_end, OptExactInfo::ignore_case, re_pattern_buffer::int_map, OptExactInfo::len, re_pattern_buffer::map, MinMaxLen::max, MinMaxLen::min, OptExactInfo::mmd, ONIG_INFINITE_DISTANCE, ONIG_OPTIMIZE_EXACT, ONIG_OPTIMIZE_EXACT_BM, ONIG_OPTIMIZE_EXACT_BM_NOT_REV, ONIG_OPTIMIZE_EXACT_IC, ONIGENC_IS_ALLOWED_REVERSE_MATCH, re_pattern_buffer::optimize, OptExactInfo::s, set_bm_skip(), str_dup(), re_pattern_buffer::threshold_len, UChar, xmalloc, and xmemcpy.
Referenced by set_optimize_info_from_tree().
Definition at line 4996 of file regcomp.c.
References OptExactInfo::anc, OptMapInfo::anc, NodeOptInfo::anc, re_pattern_buffer::anchor, ANCHOR_ANYCHAR_STAR, ANCHOR_ANYCHAR_STAR_ML, ANCHOR_BEGIN_BUF, ANCHOR_BEGIN_LINE, ANCHOR_BEGIN_POSITION, re_pattern_buffer::anchor_dmax, re_pattern_buffer::anchor_dmin, ANCHOR_END_BUF, ANCHOR_END_LINE, ANCHOR_LOOK_BEHIND, ANCHOR_SEMI_END_BUF, re_pattern_buffer::case_fold_flag, OptEnv::case_fold_flag, clear_mml(), comp_opt_exact_or_map_info(), re_pattern_buffer::enc, OptEnv::enc, NodeOptInfo::exb, NodeOptInfo::exm, OptAncInfo::left_anchor, OptExactInfo::len, NodeOptInfo::len, NodeOptInfo::map, MinMaxLen::max, MinMaxLen::min, OptEnv::mmd, optimize_node_left(), re_pattern_buffer::options, OptEnv::options, OptAncInfo::right_anchor, OptEnv::scan_env, select_opt_exact_info(), set_optimize_exact_info(), set_optimize_map_info(), set_sub_anchor(), re_pattern_buffer::sub_anchor, and OptMapInfo::value.
Referenced by onig_compile().
|
static |
Definition at line 4968 of file regcomp.c.
References re_pattern_buffer::dmax, re_pattern_buffer::dmin, i, if(), re_pattern_buffer::map, OptMapInfo::map, MinMaxLen::max, MinMaxLen::min, OptMapInfo::mmd, ONIG_CHAR_TABLE_SIZE, ONIG_INFINITE_DISTANCE, ONIG_OPTIMIZE_MAP, re_pattern_buffer::optimize, and re_pattern_buffer::threshold_len.
Referenced by set_optimize_info_from_tree().
|
static |
Definition at line 4985 of file regcomp.c.
References ANCHOR_BEGIN_LINE, ANCHOR_END_LINE, OptAncInfo::left_anchor, OptAncInfo::right_anchor, and re_pattern_buffer::sub_anchor.
Referenced by set_optimize_info_from_tree().
Definition at line 3155 of file regcomp.c.
References AnchorNode::char_len, divide_look_behind_alternatives(), GET_CHAR_LEN_TOP_ALT_VARLEN, GET_CHAR_LEN_VARLEN, get_char_length_tree(), IS_SYNTAX_BV, len, NANCHOR, ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND, ONIGERR_INVALID_LOOK_BEHIND_PATTERN, ScanEnv::syntax, and AnchorNode::target.
Referenced by setup_tree().
Definition at line 3691 of file regcomp.c.
References ALLOWED_ANCHOR_IN_LB, ALLOWED_ANCHOR_IN_LB_NOT, ALLOWED_ENCLOSE_IN_LB, ALLOWED_ENCLOSE_IN_LB_NOT, ALLOWED_TYPE_IN_LB, ANCHOR_LOOK_BEHIND, ANCHOR_LOOK_BEHIND_NOT, ANCHOR_PREC_READ, ANCHOR_PREC_READ_NOT, BRefNode::back_num, ScanEnv::backrefed_mem, BACKREFS_P, BIT_STATUS_ON_AT, ScanEnv::bt_mem_end, ScanEnv::bt_mem_start, check_type_tree(), ENCLOSE_MEMORY, ENCLOSE_OPTION, ENCLOSE_STOP_BACKTRACK, StrNode::end, expand_case_fold_string(), EXPAND_STRING_MAX_LENGTH, get_head_value_node(), get_max_match_length(), get_min_match_length(), QtfrNode::greedy, QtfrNode::head_exact, i, IN_ALT, IN_NOT, IN_REPEAT, IN_VAR_REPEAT, IS_BACKREF_NEST_LEVEL, IS_IGNORECASE, IS_NODE_TYPE_SIMPLE, IS_NOT_NULL, IS_REPEAT_INFINITE, len, QtfrNode::lower, NANCHOR, NBREF, NCAR, NCDR, NENCLOSE, next_setup(), NQ_TARGET_IS_EMPTY, NQTFR, NST_IN_REPEAT, NST_MEM_BACKREFED, NST_STOP_BT_SIMPLE_REPEAT, NSTR, NSTRING_IS_RAW, NSTRING_LEN, NT_ALT, NT_ANCHOR, NT_BREF, NT_CALL, NT_CANY, NT_CCLASS, NT_CTYPE, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, NULL, NULL_NODE, ScanEnv::num_mem, onig_node_conv_to_str_node(), onig_node_free(), onig_node_str_cat(), ONIGERR_INVALID_BACKREF, ONIGERR_INVALID_LOOK_BEHIND_PATTERN, re_pattern_buffer::options, options(), p, EncloseNode::regnum, StrNode::s, SCANENV_MEM_NODES, SET_ENCLOSE_STATUS, setup_look_behind(), QtfrNode::state, QtfrNode::target, EncloseNode::target, AnchorNode::target, QtfrNode::target_empty_info, type, EncloseNode::type, AnchorNode::type, and QtfrNode::upper.
Referenced by onig_compile().
Definition at line 52 of file regcomp.c.
References CHECK_NULL_RETURN, len, NULL, UChar, xmalloc, and xmemcpy.
Referenced by set_optimize_exact_info().
Definition at line 67 of file regcomp.c.
References StrNode::buf, StrNode::capa, StrNode::end, len, NSTR, NT_STR, NTYPE, and StrNode::s.
Referenced by divide_look_behind_alternatives(), expand_case_fold_string(), and next_setup().
Definition at line 3224 of file regcomp.c.
References buf, re_pattern_buffer::case_fold_flag, CHECK_NULL_RETURN_MEMERR, re_pattern_buffer::enc, StrNode::end, re_registers::end, i, len, NSTR, onig_node_str_set(), ONIGENC_MBC_CASE_FOLD, ONIGENC_MBC_CASE_FOLD_MAXLEN, p, StrNode::s, UChar, xfree(), xmalloc, and xrealloc.
Referenced by expand_case_fold_make_rem_string().
OnigCaseFoldType OnigDefaultCaseFoldFlag = ONIGENC_CASE_FOLD_MIN |
|
static |
Definition at line 48 of file regcomp.c.
Referenced by add_multi_byte_cclass().