Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "regint.h"
Go to the source code of this file.
Macros | |
#define | USE_TOKEN_THREADED_VM 0 |
#define | ENC_DUMMY_FLAG (1<<24) |
#define | ONIGENC_IS_MBC_ASCII_WORD(enc, s, end) |
#define | ONIGENC_IS_MBC_CRNL(enc, p, end) |
#define | ONIGENC_IS_MBC_NEWLINE_EX(enc, p, start, end, option, check_prev) is_mbc_newline_ex((enc),(p),(start),(end),(option),(check_prev)) |
#define | RREGC_SIZE (sizeof(int) * from->num_regs) |
#define | INVALID_STACK_INDEX -1 |
stack More... | |
#define | STK_ALT 0x0001 |
#define | STK_LOOK_BEHIND_NOT 0x0002 |
#define | STK_POS_NOT 0x0003 |
#define | STK_MEM_START 0x0100 |
#define | STK_MEM_END 0x8200 |
#define | STK_REPEAT_INC 0x0300 |
#define | STK_STATE_CHECK_MARK 0x1000 |
#define | STK_NULL_CHECK_START 0x3000 |
#define | STK_NULL_CHECK_END 0x5000 /* for recursive call */ |
#define | STK_MEM_END_MARK 0x8400 |
#define | STK_POS 0x0500 /* used when POP-POS */ |
#define | STK_STOP_BT 0x0600 /* mark for "(?>...)" */ |
#define | STK_REPEAT 0x0700 |
#define | STK_CALL_FRAME 0x0800 |
#define | STK_RETURN 0x0900 |
#define | STK_VOID 0x0a00 /* for fill a blank */ |
#define | STK_ABSENT_POS 0x0b00 /* for absent */ |
#define | STK_ABSENT 0x0c00 /* absent inner loop marker */ |
#define | STK_MASK_POP_USED 0x00ff |
#define | STK_MASK_TO_VOID_TARGET 0x10ff |
#define | STK_MASK_MEM_END_OR_MARK 0x8000 /* MEM_END or MEM_END_MARK */ |
#define | MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start, arg_gpos) |
#define | MATCH_ARG_FREE(msa) if ((msa).stack_p) xfree((msa).stack_p) |
#define | MAX_PTR_NUM 100 |
#define | STACK_INIT(alloc_addr, heap_addr, ptr_num, stack_num) |
#define | STACK_SAVE |
#define | STACK_ENSURE(n) |
#define | STACK_AT(index) (stk_base + (index)) |
#define | GET_STACK_INDEX(stk) ((stk) - stk_base) |
#define | STACK_PUSH_TYPE(stack_type) |
#define | IS_TO_VOID_TARGET(stk) (((stk)->type & STK_MASK_TO_VOID_TARGET) != 0) |
#define | ELSE_IF_STATE_CHECK_MARK(stk) |
#define | STACK_PUSH(stack_type, pat, s, sprev, keep) |
#define | STACK_PUSH_ENSURED(stack_type, pat) |
#define | STACK_PUSH_ALT(pat, s, sprev, keep) STACK_PUSH(STK_ALT,pat,s,sprev,keep) |
#define | STACK_PUSH_POS(s, sprev, keep) STACK_PUSH(STK_POS,NULL_UCHARP,s,sprev,keep) |
#define | STACK_PUSH_POS_NOT(pat, s, sprev, keep) STACK_PUSH(STK_POS_NOT,pat,s,sprev,keep) |
#define | STACK_PUSH_ABSENT STACK_PUSH_TYPE(STK_ABSENT) |
#define | STACK_PUSH_STOP_BT STACK_PUSH_TYPE(STK_STOP_BT) |
#define | STACK_PUSH_LOOK_BEHIND_NOT(pat, s, sprev, keep) STACK_PUSH(STK_LOOK_BEHIND_NOT,pat,s,sprev,keep) |
#define | STACK_PUSH_REPEAT(id, pat) |
#define | STACK_PUSH_REPEAT_INC(sindex) |
#define | STACK_PUSH_MEM_START(mnum, s) |
#define | STACK_PUSH_MEM_END(mnum, s) |
#define | STACK_PUSH_MEM_END_MARK(mnum) |
#define | STACK_GET_MEM_START(mnum, k) |
#define | STACK_GET_MEM_RANGE(k, mnum, start, end) |
#define | STACK_PUSH_NULL_CHECK_START(cnum, s) |
#define | STACK_PUSH_NULL_CHECK_END(cnum) |
#define | STACK_PUSH_CALL_FRAME(pat) |
#define | STACK_PUSH_RETURN |
#define | STACK_PUSH_ABSENT_POS(start, end) |
#define | STACK_BASE_CHECK(p, at) |
#define | STACK_POP_ONE |
#define | STACK_POP |
#define | STACK_POP_TIL_POS_NOT |
#define | STACK_POP_TIL_LOOK_BEHIND_NOT |
#define | STACK_POP_TIL_ABSENT |
#define | STACK_POP_ABSENT_POS(start, end) |
#define | STACK_POS_END(k) |
#define | STACK_STOP_BT_END |
#define | STACK_NULL_CHECK(isnull, id, s) |
#define | STACK_NULL_CHECK_REC(isnull, id, s) |
#define | STACK_NULL_CHECK_MEMST(isnull, id, s, reg) |
#define | STACK_NULL_CHECK_MEMST_REC(isnull, id, s, reg) |
#define | STACK_GET_REPEAT(id, k) |
#define | STACK_RETURN(addr) |
#define | STRING_CMP(s1, s2, len) |
#define | STRING_CMP_IC(case_fold_flag, s1, ps2, len, text_end) |
#define | STRING_CMP_VALUE(s1, s2, len, is_fail) |
#define | STRING_CMP_VALUE_IC(case_fold_flag, s1, ps2, len, text_end, is_fail) |
#define | IS_EMPTY_STR (str == end) |
#define | ON_STR_BEGIN(s) ((s) == str) |
#define | ON_STR_END(s) ((s) == end) |
#define | DATA_ENSURE_CHECK1 (s < end) |
#define | DATA_ENSURE_CHECK(n) (s + (n) <= end) |
#define | DATA_ENSURE(n) if (s + (n) > end) goto fail |
#define | ABSENT_END_POS end |
#define | STACK_INC stk++ |
#define | MOP_IN(opcode) |
#define | MOP_OUT |
#define | OP_OFFSET 0 |
#define | VM_LOOP |
#define | VM_LOOP_END } sprev = sbegin; } |
#define | CASE(x) case x: |
#define | DEFAULT default: |
#define | NEXT break |
#define | JUMP continue; break |
#define | ADD_NUMMEM 1 |
#define | OPCODE_EXEC_HOOK ((void) 0) |
#define | BM_BACKWARD_SEARCH_LENGTH_THRESHOLD 100 |
#define | MATCH_AND_RETURN_CHECK(none) |
Variables | |
static unsigned int | MatchStackLimitSize = DEFAULT_MATCH_STACK_LIMIT_SIZE |
#define ABSENT_END_POS end |
Definition at line 1182 of file regexec.c.
Referenced by match_at().
#define ADD_NUMMEM 1 |
Referenced by match_at().
#define BM_BACKWARD_SEARCH_LENGTH_THRESHOLD 100 |
Definition at line 4032 of file regexec.c.
Referenced by backward_search_range().
#define CASE | ( | x | ) | case x: |
Referenced by match_at().
Definition at line 1181 of file regexec.c.
Referenced by match_at().
#define DATA_ENSURE_CHECK | ( | n | ) | (s + (n) <= end) |
Definition at line 1180 of file regexec.c.
Referenced by match_at().
#define DATA_ENSURE_CHECK1 (s < end) |
Definition at line 1179 of file regexec.c.
Referenced by match_at().
#define DEFAULT default: |
Referenced by match_at().
#define ENC_DUMMY_FLAG (1<<24) |
Definition at line 48 of file regexec.c.
Referenced by rb_enc_asciicompat().
#define GET_STACK_INDEX | ( | stk | ) | ((stk) - stk_base) |
Definition at line 587 of file regexec.c.
Referenced by match_at().
#define INVALID_STACK_INDEX -1 |
#define IS_EMPTY_STR (str == end) |
Definition at line 1170 of file regexec.c.
Referenced by match_at().
#define IS_TO_VOID_TARGET | ( | stk | ) | (((stk)->type & STK_MASK_TO_VOID_TARGET) != 0) |
#define JUMP continue; break |
Referenced by match_at().
#define MATCH_AND_RETURN_CHECK | ( | none | ) |
Referenced by onig_search_gpos().
Definition at line 470 of file regexec.c.
Referenced by onig_match(), and onig_search_gpos().
#define MATCH_ARG_INIT | ( | msa, | |
arg_option, | |||
arg_region, | |||
arg_start, | |||
arg_gpos | |||
) |
Definition at line 415 of file regexec.c.
Referenced by onig_match(), and onig_search_gpos().
#define MOP_IN | ( | opcode | ) |
Definition at line 1389 of file regexec.c.
Referenced by match_at().
#define MOP_OUT |
Definition at line 1390 of file regexec.c.
Referenced by match_at().
#define NEXT break |
Referenced by match_at().
#define ON_STR_BEGIN | ( | s | ) | ((s) == str) |
Definition at line 1171 of file regexec.c.
Referenced by backward_search_range(), forward_search_range(), and match_at().
#define ON_STR_END | ( | s | ) | ((s) == end) |
Definition at line 1172 of file regexec.c.
Referenced by backward_search_range(), forward_search_range(), and match_at().
#define ONIGENC_IS_MBC_ASCII_WORD | ( | enc, | |
s, | |||
end | |||
) |
Definition at line 55 of file regexec.c.
Referenced by match_at().
#define ONIGENC_IS_MBC_CRNL | ( | enc, | |
p, | |||
end | |||
) |
Definition at line 62 of file regexec.c.
Referenced by match_at(), and onig_search_gpos().
#define ONIGENC_IS_MBC_NEWLINE_EX | ( | enc, | |
p, | |||
start, | |||
end, | |||
option, | |||
check_prev | |||
) | is_mbc_newline_ex((enc),(p),(start),(end),(option),(check_prev)) |
Definition at line 65 of file regexec.c.
Referenced by backward_search_range(), forward_search_range(), match_at(), and onig_search_gpos().
#define OP_OFFSET 0 |
#define OPCODE_EXEC_HOOK ((void) 0) |
#define RREGC_SIZE (sizeof(int) * from->num_regs) |
#define STACK_AT | ( | index | ) | (stk_base + (index)) |
Definition at line 586 of file regexec.c.
Referenced by match_at().
#define STACK_ENSURE | ( | n | ) |
Definition at line 575 of file regexec.c.
Referenced by match_at().
#define STACK_GET_MEM_RANGE | ( | k, | |
mnum, | |||
start, | |||
end | |||
) |
#define STACK_GET_MEM_START | ( | mnum, | |
k | |||
) |
Definition at line 729 of file regexec.c.
Referenced by match_at().
#define STACK_GET_REPEAT | ( | id, | |
k | |||
) |
Definition at line 1078 of file regexec.c.
Referenced by match_at().
#define STACK_INIT | ( | alloc_addr, | |
heap_addr, | |||
ptr_num, | |||
stack_num | |||
) |
Definition at line 477 of file regexec.c.
Referenced by match_at().
#define STACK_NULL_CHECK | ( | isnull, | |
id, | |||
s | |||
) |
Definition at line 956 of file regexec.c.
Referenced by match_at().
#define STACK_NULL_CHECK_MEMST | ( | isnull, | |
id, | |||
s, | |||
reg | |||
) |
Definition at line 991 of file regexec.c.
Referenced by match_at().
#define STACK_NULL_CHECK_MEMST_REC | ( | isnull, | |
id, | |||
s, | |||
reg | |||
) |
Definition at line 1030 of file regexec.c.
Referenced by match_at().
#define STACK_NULL_CHECK_REC | ( | isnull, | |
id, | |||
s | |||
) |
Definition at line 970 of file regexec.c.
Referenced by match_at().
#define STACK_POP |
Definition at line 815 of file regexec.c.
Referenced by match_at().
#define STACK_POP_ABSENT_POS | ( | start, | |
end | |||
) |
Definition at line 919 of file regexec.c.
Referenced by match_at().
#define STACK_POP_ONE |
Definition at line 810 of file regexec.c.
Referenced by match_at().
#define STACK_POP_TIL_ABSENT |
Definition at line 899 of file regexec.c.
Referenced by match_at().
#define STACK_POP_TIL_LOOK_BEHIND_NOT |
Definition at line 879 of file regexec.c.
Referenced by match_at().
#define STACK_POP_TIL_POS_NOT |
Definition at line 859 of file regexec.c.
Referenced by match_at().
#define STACK_POS_END | ( | k | ) |
Definition at line 926 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH | ( | stack_type, | |
pat, | |||
s, | |||
sprev, | |||
keep | |||
) |
#define STACK_PUSH_ABSENT STACK_PUSH_TYPE(STK_ABSENT) |
Definition at line 678 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_ABSENT_POS | ( | start, | |
end | |||
) |
Definition at line 791 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_ALT | ( | pat, | |
s, | |||
sprev, | |||
keep | |||
) | STACK_PUSH(STK_ALT,pat,s,sprev,keep) |
Definition at line 675 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_CALL_FRAME | ( | pat | ) |
Definition at line 778 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_ENSURED | ( | stack_type, | |
pat | |||
) |
Definition at line 668 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_LOOK_BEHIND_NOT | ( | pat, | |
s, | |||
sprev, | |||
keep | |||
) | STACK_PUSH(STK_LOOK_BEHIND_NOT,pat,s,sprev,keep) |
Definition at line 680 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_MEM_END | ( | mnum, | |
s | |||
) |
Definition at line 711 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_MEM_END_MARK | ( | mnum | ) |
Definition at line 722 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_MEM_START | ( | mnum, | |
s | |||
) |
Definition at line 699 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_NULL_CHECK_END | ( | cnum | ) |
Definition at line 771 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_NULL_CHECK_START | ( | cnum, | |
s | |||
) |
Definition at line 763 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_POS | ( | s, | |
sprev, | |||
keep | |||
) | STACK_PUSH(STK_POS,NULL_UCHARP,s,sprev,keep) |
Definition at line 676 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_POS_NOT | ( | pat, | |
s, | |||
sprev, | |||
keep | |||
) | STACK_PUSH(STK_POS_NOT,pat,s,sprev,keep) |
Definition at line 677 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_REPEAT | ( | id, | |
pat | |||
) |
Definition at line 683 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_REPEAT_INC | ( | sindex | ) |
Definition at line 692 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_RETURN |
Definition at line 785 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_STOP_BT STACK_PUSH_TYPE(STK_STOP_BT) |
Definition at line 679 of file regexec.c.
Referenced by match_at().
#define STACK_PUSH_TYPE | ( | stack_type | ) |
#define STACK_RETURN | ( | addr | ) |
Definition at line 1096 of file regexec.c.
Referenced by match_at().
#define STACK_SAVE |
Definition at line 511 of file regexec.c.
Referenced by match_at(), and stack_double().
#define STACK_STOP_BT_END |
Definition at line 941 of file regexec.c.
Referenced by match_at().
#define STK_ALT 0x0001 |
Definition at line 388 of file regexec.c.
Referenced by match_at().
#define STK_CALL_FRAME 0x0800 |
Definition at line 403 of file regexec.c.
Referenced by backref_match_at_nested_level().
#define STK_MASK_MEM_END_OR_MARK 0x8000 /* MEM_END or MEM_END_MARK */ |
#define STK_MEM_END 0x8200 |
Definition at line 393 of file regexec.c.
Referenced by backref_match_at_nested_level().
#define STK_MEM_START 0x0100 |
Definition at line 392 of file regexec.c.
Referenced by backref_match_at_nested_level().
#define STK_NULL_CHECK_END 0x5000 /* for recursive call */ |
#define STK_RETURN 0x0900 |
Definition at line 404 of file regexec.c.
Referenced by backref_match_at_nested_level().
#define STK_STATE_CHECK_MARK 0x1000 |
Definition at line 395 of file regexec.c.
Referenced by match_at().
#define STRING_CMP | ( | s1, | |
s2, | |||
len | |||
) |
Definition at line 1115 of file regexec.c.
Referenced by match_at().
#define STRING_CMP_IC | ( | case_fold_flag, | |
s1, | |||
ps2, | |||
len, | |||
text_end | |||
) |
Definition at line 1121 of file regexec.c.
Referenced by match_at().
#define STRING_CMP_VALUE | ( | s1, | |
s2, | |||
len, | |||
is_fail | |||
) |
Definition at line 1153 of file regexec.c.
Referenced by match_at().
#define STRING_CMP_VALUE_IC | ( | case_fold_flag, | |
s1, | |||
ps2, | |||
len, | |||
text_end, | |||
is_fail | |||
) |
Definition at line 1162 of file regexec.c.
Referenced by match_at().
#define VM_LOOP |
Referenced by match_at().
#define VM_LOOP_END } sprev = sbegin; } |
Referenced by match_at().
|
static |
Definition at line 1244 of file regexec.c.
References re_pattern_buffer::enc, f, level, _OnigStackType::mem, mem_is_in_memp(), name, NULL_UCHARP, OP_FAIL, OP_FINISH, STK_CALL_FRAME, STK_MEM_END, STK_MEM_START, STK_RETURN, string_cmp_ic(), top, _OnigStackType::type, _OnigStackType::u, and UChar.
Referenced by match_at().
|
static |
Definition at line 4035 of file regexec.c.
References ANCHOR_BEGIN_LINE, ANCHOR_END_LINE, BM_BACKWARD_SEARCH_LENGTH_THRESHOLD, re_pattern_buffer::case_fold_flag, re_pattern_buffer::dmax, re_pattern_buffer::dmin, re_pattern_buffer::enc, re_pattern_buffer::exact, re_pattern_buffer::exact_end, fail, re_pattern_buffer::int_map_backward, IS_NULL, re_pattern_buffer::map, map_search_backward(), ON_STR_BEGIN, ON_STR_END, ONIG_INFINITE_DISTANCE, ONIG_OPTIMIZE_EXACT, ONIG_OPTIMIZE_EXACT_BM, ONIG_OPTIMIZE_EXACT_BM_IC, ONIG_OPTIMIZE_EXACT_BM_NOT_REV, ONIG_OPTIMIZE_EXACT_BM_NOT_REV_IC, ONIG_OPTIMIZE_EXACT_IC, ONIG_OPTIMIZE_MAP, onigenc_get_prev_char_head(), onigenc_get_right_adjust_char_head(), ONIGENC_IS_MBC_NEWLINE_EX, re_pattern_buffer::optimize, re_pattern_buffer::options, slow_search_backward(), slow_search_backward_ic(), re_pattern_buffer::sub_anchor, and UChar.
Referenced by onig_search_gpos().
|
static |
Definition at line 3630 of file regexec.c.
References re_pattern_buffer::int_map, IS_NULL, re_pattern_buffer::map, NULL, PRIuPTR, and UChar.
Referenced by forward_search_range(), and slow_search_backward_ic().
|
static |
Definition at line 3739 of file regexec.c.
References ARG_UNUSED, re_pattern_buffer::case_fold_flag, re_pattern_buffer::enc, re_pattern_buffer::int_map, re_pattern_buffer::int_map_backward, IS_NULL, len, re_pattern_buffer::map, NULL, ONIG_CHAR_TABLE_SIZE, ONIGENC_LEFT_ADJUST_CHAR_HEAD, ONIGERR_MEMORY, PRIuPTR, str_lower_case_match(), UChar, and xmalloc.
Referenced by forward_search_range(), and slow_search_backward_ic().
|
static |
Definition at line 3568 of file regexec.c.
References re_pattern_buffer::enc, enclen, re_pattern_buffer::int_map, IS_NULL, re_pattern_buffer::map, NULL, PRIuPTR, and UChar.
Referenced by forward_search_range(), and slow_search_backward_ic().
|
static |
Definition at line 3680 of file regexec.c.
References re_pattern_buffer::case_fold_flag, re_pattern_buffer::enc, enclen, re_pattern_buffer::int_map, IS_NULL, re_pattern_buffer::map, NULL, PRIuPTR, str_lower_case_match(), and UChar.
Referenced by forward_search_range(), and slow_search_backward_ic().
|
static |
Definition at line 3903 of file regexec.c.
References ANCHOR_BEGIN_LINE, ANCHOR_END_LINE, bm_search(), bm_search_ic(), bm_search_notrev(), bm_search_notrev_ic(), re_pattern_buffer::case_fold_flag, re_pattern_buffer::dmax, re_pattern_buffer::dmin, re_pattern_buffer::enc, enclen, re_pattern_buffer::exact, re_pattern_buffer::exact_end, IS_NULL, re_pattern_buffer::map, map_search(), NULL, ON_STR_BEGIN, ON_STR_END, ONIG_INFINITE_DISTANCE, ONIG_OPTIMIZE_EXACT, ONIG_OPTIMIZE_EXACT_BM, ONIG_OPTIMIZE_EXACT_BM_IC, ONIG_OPTIMIZE_EXACT_BM_NOT_REV, ONIG_OPTIMIZE_EXACT_BM_NOT_REV_IC, ONIG_OPTIMIZE_EXACT_IC, ONIG_OPTIMIZE_MAP, onigenc_get_prev_char_head(), onigenc_get_right_adjust_char_head_with_prev(), ONIGENC_IS_MBC_NEWLINE_EX, ONIGENC_IS_SINGLEBYTE, re_pattern_buffer::optimize, re_pattern_buffer::options, PRIdPTR, PRIuPTR, slow_search(), slow_search_ic(), re_pattern_buffer::sub_anchor, and UChar.
Referenced by onig_search_gpos().
|
static |
Definition at line 68 of file regexec.c.
References OnigCaptureTreeNodeStruct::allocated, OnigCaptureTreeNodeStruct::beg, CHECK_NULL_RETURN, CHECK_NULL_RETURN_MEMERR, OnigCaptureTreeNodeStruct::childs, enclen, OnigCaptureTreeNodeStruct::end, OnigCaptureTreeNodeStruct::group, re_registers::history_root, IS_NEWLINE_CRLF, IS_NOT_NULL, IS_NULL, NULL, OnigCaptureTreeNodeStruct::num_childs, onig_get_capture_tree(), ONIG_REGION_NOTPOS, onigenc_get_prev_char_head(), ONIGENC_IS_MBC_NEWLINE, ONIGENC_MBC_TO_CODE, ONIGERR_MEMORY, UChar, xfree(), xmalloc, and xrealloc.
|
static |
Definition at line 3853 of file regexec.c.
References NULL, onigenc_get_prev_char_head(), and UChar.
Referenced by backward_search_range().
|
static |
Definition at line 1425 of file regexec.c.
References ABSENT_END_POS, ADD_NUMMEM, ALIGNMENT_RIGHT, backref_match_at_nested_level(), OnigCaptureTreeNodeStruct::beg, re_registers::beg, OnigMatchArg::best_len, OnigMatchArg::best_s, BIT_STATUS_AT, BITSET_AT, re_pattern_buffer::bt_mem_end, re_pattern_buffer::bt_mem_start, re_pattern_buffer::capture_history, CASE, re_pattern_buffer::case_fold_flag, CHECK_INTERRUPT_IN_MATCH_AT, CHECK_NULL_RETURN_MEMERR, DATA_ENSURE, DATA_ENSURE_CHECK, DATA_ENSURE_CHECK1, DEFAULT, re_pattern_buffer::enc, enclen, OnigCaptureTreeNodeStruct::end, re_registers::end, fail, GET_ABSADDR_INC, GET_LENGTH_INC, GET_MEMNUM_INC, GET_OPTION_INC, GET_RELADDR_INC, GET_STACK_INDEX, GET_STATE_CHECK_NUM_INC, OnigMatchArg::gpos, OnigCaptureTreeNodeStruct::group, re_registers::history_root, INIT_MATCH_STACK_SIZE, INVALID_STACK_INDEX, IS_EMPTY_STR, IS_FIND_CONDITION, IS_FIND_LONGEST, IS_FIND_NOT_EMPTY, IS_NEWLINE_CRLF, IS_NOTBOL, IS_NOTBOS, IS_NOTEOL, IS_NOTEOS, IS_NULL, JUMP, len, level, OnigRepeatRange::lower, _OnigStackType::mem, MOP_IN, MOP_OUT, NEXT, NULL, re_pattern_buffer::num_comb_exp_check, re_pattern_buffer::num_mem, re_pattern_buffer::num_repeat, ON_STR_BEGIN, ON_STR_END, onig_is_in_code_range(), ONIG_MISMATCH, ONIG_REGION_NOTPOS, onigenc_get_prev_char_head(), ONIGENC_IS_MBC_ASCII_WORD, ONIGENC_IS_MBC_CRNL, ONIGENC_IS_MBC_HEAD, ONIGENC_IS_MBC_NEWLINE, ONIGENC_IS_MBC_NEWLINE_EX, ONIGENC_IS_MBC_WORD, ONIGENC_MBC_CASE_FOLD, ONIGENC_MBC_CASE_FOLD_MAXLEN, ONIGENC_MBC_TO_CODE, ONIGENC_STEP_BACK, ONIGERR_STACK_BUG, ONIGERR_UNDEFINED_BYTECODE, ONIGERR_UNEXPECTED_BYTECODE, OP_ABSENT, OP_ABSENT_END, OP_ANYCHAR, OP_ANYCHAR_ML, OP_ANYCHAR_ML_STAR, OP_ANYCHAR_ML_STAR_PEEK_NEXT, OP_ANYCHAR_STAR, OP_ANYCHAR_STAR_PEEK_NEXT, OP_ASCII_WORD, OP_ASCII_WORD_BEGIN, OP_ASCII_WORD_BOUND, OP_ASCII_WORD_END, OP_BACKREF1, OP_BACKREF2, OP_BACKREF_MULTI, OP_BACKREF_MULTI_IC, OP_BACKREF_WITH_LEVEL, OP_BACKREFN, OP_BACKREFN_IC, OP_BEGIN_BUF, OP_BEGIN_LINE, OP_BEGIN_POSITION, OP_CALL, OP_CCLASS, OP_CCLASS_MB, OP_CCLASS_MB_NOT, OP_CCLASS_MIX, OP_CCLASS_MIX_NOT, OP_CCLASS_NOT, OP_CONDITION, OP_END, OP_END_BUF, OP_END_LINE, 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, OP_EXACTN_IC, OP_FAIL, OP_FAIL_LOOK_BEHIND_NOT, OP_FAIL_POS, OP_FINISH, OP_JUMP, OP_KEEP, OP_LOOK_BEHIND, OP_MEMORY_END, OP_MEMORY_END_PUSH, OP_MEMORY_END_PUSH_REC, OP_MEMORY_END_REC, OP_MEMORY_START, OP_MEMORY_START_PUSH, OP_NOT_ASCII_WORD, OP_NOT_ASCII_WORD_BOUND, OP_NOT_WORD, OP_NOT_WORD_BOUND, OP_NULL_CHECK_END, OP_NULL_CHECK_END_MEMST, OP_NULL_CHECK_END_MEMST_PUSH, OP_NULL_CHECK_START, OP_POP, OP_POP_POS, OP_POP_STOP_BT, OP_PUSH, OP_PUSH_ABSENT_POS, OP_PUSH_IF_PEEK_NEXT, OP_PUSH_LOOK_BEHIND_NOT, OP_PUSH_OR_JUMP_EXACT1, OP_PUSH_POS, OP_PUSH_POS_NOT, OP_PUSH_STOP_BT, OP_REPEAT, OP_REPEAT_INC, OP_REPEAT_INC_NG, OP_REPEAT_INC_NG_SG, OP_REPEAT_INC_SG, OP_REPEAT_NG, OP_RETURN, OP_SEMI_END_BUF, OP_SET_OPTION, OP_SET_OPTION_PUSH, OP_STATE_CHECK, OP_STATE_CHECK_ANYCHAR_ML_STAR, OP_STATE_CHECK_ANYCHAR_STAR, OP_STATE_CHECK_PUSH, OP_STATE_CHECK_PUSH_OR_JUMP, OP_WORD, OP_WORD_BEGIN, OP_WORD_BOUND, OP_WORD_END, re_pattern_buffer::options, OnigMatchArg::options, re_pattern_buffer::p, PRIuPTR, OnigMatchArg::region, _OnigStackType::repeat, re_pattern_buffer::repeat_range, SIZE_BITSET, SIZE_MEMNUM, SIZE_OP_FAIL, SIZE_OP_SET_OPTION, SIZE_RELADDR, STACK_AT, STACK_ENSURE, STACK_GET_MEM_START, STACK_GET_REPEAT, STACK_INIT, STACK_NULL_CHECK, STACK_NULL_CHECK_MEMST, STACK_NULL_CHECK_MEMST_REC, STACK_NULL_CHECK_REC, STACK_POP, STACK_POP_ABSENT_POS, re_pattern_buffer::stack_pop_level, STACK_POP_ONE, STACK_POP_TIL_ABSENT, STACK_POP_TIL_LOOK_BEHIND_NOT, STACK_POP_TIL_POS_NOT, STACK_POS_END, STACK_PUSH_ABSENT, STACK_PUSH_ABSENT_POS, STACK_PUSH_ALT, STACK_PUSH_CALL_FRAME, STACK_PUSH_ENSURED, STACK_PUSH_LOOK_BEHIND_NOT, STACK_PUSH_MEM_END, STACK_PUSH_MEM_END_MARK, STACK_PUSH_MEM_START, STACK_PUSH_NULL_CHECK_END, STACK_PUSH_NULL_CHECK_START, STACK_PUSH_POS, STACK_PUSH_POS_NOT, STACK_PUSH_REPEAT, STACK_PUSH_REPEAT_INC, STACK_PUSH_RETURN, STACK_PUSH_STOP_BT, STACK_RETURN, STACK_SAVE, STACK_STOP_BT_END, _OnigStackType::state, STK_ALT, STK_STATE_CHECK_MARK, STRING_CMP, STRING_CMP_IC, STRING_CMP_VALUE, STRING_CMP_VALUE_IC, _OnigStackType::type, _OnigStackType::u, UChar, OnigRepeatRange::upper, USE_CRNL_AS_LINE_TERMINATOR, VM_LOOP, VM_LOOP_END, and xfree().
Referenced by onig_match().
|
static |
Definition at line 1232 of file regexec.c.
References GET_MEMNUM_INC.
Referenced by backref_match_at_nested_level().
void onig_copy_encoding | ( | OnigEncodingType * | to, |
OnigEncoding | from | ||
) |
OnigCaseFoldType onig_get_case_fold_flag | ( | const regex_t * | reg | ) |
Definition at line 4574 of file regexec.c.
References re_pattern_buffer::case_fold_flag.
OnigEncoding onig_get_encoding | ( | const regex_t * | reg | ) |
Definition at line 4562 of file regexec.c.
References re_pattern_buffer::enc.
unsigned int onig_get_match_stack_limit_size | ( | void | ) |
Definition at line 521 of file regexec.c.
References MatchStackLimitSize.
OnigOptionType onig_get_options | ( | const regex_t * | reg | ) |
Definition at line 4568 of file regexec.c.
References re_pattern_buffer::options.
const OnigSyntaxType* onig_get_syntax | ( | const regex_t * | reg | ) |
Definition at line 4580 of file regexec.c.
References re_pattern_buffer::syntax.
OnigPosition onig_match | ( | regex_t * | reg, |
const UChar * | str, | ||
const UChar * | end, | ||
const UChar * | at, | ||
OnigRegion * | region, | ||
OnigOptionType | option | ||
) |
Definition at line 3868 of file regexec.c.
References re_pattern_buffer::enc, MATCH_ARG_FREE, MATCH_ARG_INIT, match_at(), re_pattern_buffer::num_comb_exp_check, re_pattern_buffer::num_mem, onig_region_resize_clear(), onigenc_get_prev_char_head(), and UChar.
Definition at line 4592 of file regexec.c.
References BIT_STATUS_AT, re_pattern_buffer::capture_history, and ONIG_MAX_CAPTURE_HISTORY_GROUP.
Definition at line 4586 of file regexec.c.
References re_pattern_buffer::num_mem.
void onig_region_clear | ( | OnigRegion * | region | ) |
Definition at line 235 of file regexec.c.
References re_registers::beg, re_registers::end, re_registers::num_regs, and ONIG_REGION_NOTPOS.
Referenced by adjust_registers_to_matched(), onig_region_resize_clear(), and onig_search_gpos().
void onig_region_copy | ( | OnigRegion * | to, |
const OnigRegion * | from | ||
) |
Definition at line 357 of file regexec.c.
References re_registers::beg, re_registers::end, re_registers::history_root, IS_NOT_NULL, re_registers::num_regs, and onig_region_resize().
Referenced by rb_reg_region_copy().
void onig_region_free | ( | OnigRegion * | r, |
int | free_self | ||
) |
Definition at line 341 of file regexec.c.
References re_registers::allocated, re_registers::beg, re_registers::end, and xfree().
Referenced by obj_free(), rb_reg_search0(), and strscan_free().
void onig_region_init | ( | OnigRegion * | region | ) |
Definition at line 320 of file regexec.c.
References re_registers::allocated, re_registers::beg, re_registers::end, re_registers::history_root, and re_registers::num_regs.
Referenced by onig_region_new(), and strscan_s_allocate().
OnigRegion* onig_region_new | ( | void | ) |
Definition at line 330 of file regexec.c.
References onig_region_init(), and xmalloc.
int onig_region_resize | ( | OnigRegion * | region, |
int | n | ||
) |
Definition at line 248 of file regexec.c.
References re_registers::allocated, re_registers::beg, re_registers::end, re_registers::num_regs, ONIG_NREGION, ONIGERR_MEMORY, xfree(), xmalloc, and xrealloc.
Referenced by match_set_string(), onig_region_copy(), onig_region_resize_clear(), and onig_region_set().
|
static |
Definition at line 294 of file regexec.c.
References onig_region_clear(), and onig_region_resize().
Referenced by onig_match(), and onig_search_gpos().
int onig_region_set | ( | OnigRegion * | region, |
int | at, | ||
int | beg, | ||
int | end | ||
) |
Definition at line 305 of file regexec.c.
References re_registers::allocated, re_registers::beg, re_registers::end, onig_region_resize(), and ONIGERR_INVALID_ARGUMENT.
Referenced by adjust_registers_to_matched().
OnigPosition onig_scan | ( | regex_t * | reg, |
const UChar * | str, | ||
const UChar * | end, | ||
OnigRegion * | region, | ||
OnigOptionType | option, | ||
int(*)(OnigPosition, OnigPosition, OnigRegion *, void *) | scan_callback, | ||
void * | callback_arg | ||
) |
Definition at line 4522 of file regexec.c.
References re_registers::end, ONIG_MISMATCH, onig_search(), and UChar.
OnigPosition onig_search | ( | regex_t * | reg, |
const UChar * | str, | ||
const UChar * | end, | ||
const UChar * | start, | ||
const UChar * | range, | ||
OnigRegion * | region, | ||
OnigOptionType | option | ||
) |
Definition at line 4142 of file regexec.c.
References onig_search_gpos().
Referenced by onig_scan().
OnigPosition onig_search_gpos | ( | regex_t * | reg, |
const UChar * | str, | ||
const UChar * | end, | ||
const UChar * | global_pos, | ||
const UChar * | start, | ||
const UChar * | range, | ||
OnigRegion * | region, | ||
OnigOptionType | option | ||
) |
Definition at line 4149 of file regexec.c.
References re_pattern_buffer::anchor, ANCHOR_ANYCHAR_STAR, ANCHOR_ANYCHAR_STAR_ML, ANCHOR_BEGIN_BUF, ANCHOR_BEGIN_POSITION, re_pattern_buffer::anchor_dmax, re_pattern_buffer::anchor_dmin, ANCHOR_END_BUF, ANCHOR_LOOK_BEHIND, ANCHOR_PREC_READ_NOT, ANCHOR_SEMI_END_BUF, backward_search_range(), OnigMatchArg::best_len, OnigMatchArg::best_s, re_pattern_buffer::dmax, re_pattern_buffer::enc, enclen, forward_search_range(), IS_FIND_LONGEST, IS_FIND_NOT_EMPTY, IS_NEWLINE_CRLF, IS_NOT_NULL, match(), MATCH_AND_RETURN_CHECK, MATCH_ARG_FREE, MATCH_ARG_INIT, MIN, NULL, re_pattern_buffer::num_comb_exp_check, re_pattern_buffer::num_mem, ONIG_INFINITE_DISTANCE, ONIG_MISMATCH, ONIG_OPTIMIZE_NONE, onig_region_clear(), onig_region_resize_clear(), onigenc_get_prev_char_head(), onigenc_get_right_adjust_char_head(), ONIGENC_IS_MBC_CRNL, ONIGENC_IS_MBC_NEWLINE, ONIGENC_IS_MBC_NEWLINE_EX, ONIGENC_LEFT_ADJUST_CHAR_HEAD, ONIGENC_STEP_BACK, re_pattern_buffer::optimize, re_pattern_buffer::options, PRIdPTRDIFF, PRIuPTR, range, re_pattern_buffer::threshold_len, and UChar.
Referenced by onig_search().
int onig_set_match_stack_limit_size | ( | unsigned int | size | ) |
Definition at line 527 of file regexec.c.
References MatchStackLimitSize, and size.
|
inlinestatic |
Definition at line 50 of file regexec.c.
References ENC_DUMMY_FLAG, and ONIGENC_MBC_MINLEN.
|
static |
Definition at line 3211 of file regexec.c.
References enclen, OnigEncodingTypeST::max_enc_len, memcmp(), OnigEncodingTypeST::min_enc_len, NULL, and UChar.
Referenced by forward_search_range().
|
static |
Definition at line 3296 of file regexec.c.
References NULL, onigenc_get_prev_char_head(), ONIGENC_LEFT_ADJUST_CHAR_HEAD, and UChar.
Referenced by backward_search_range().
|
static |
Definition at line 3328 of file regexec.c.
References bm_search(), bm_search_ic(), bm_search_notrev(), bm_search_notrev_ic(), re_pattern_buffer::case_fold_flag, re_pattern_buffer::enc, enclen, re_pattern_buffer::int_map, IS_NULL, re_pattern_buffer::map, NULL, onigenc_get_prev_char_head(), ONIGENC_LEFT_ADJUST_CHAR_HEAD, PRIdPTR, PRIuPTR, str_lower_case_match(), and UChar.
Referenced by backward_search_range().
|
static |
Definition at line 3271 of file regexec.c.
References enclen, NULL, str_lower_case_match(), and UChar.
Referenced by forward_search_range().
|
static |
Definition at line 534 of file regexec.c.
References IS_NULL, MatchStackLimitSize, ONIGERR_MATCH_STACK_LIMIT_OVER, ONIGERR_MEMORY, OnigMatchArg::stack_p, STACK_SAVE, xmalloc, xmemcpy, and xrealloc.
|
static |
Definition at line 3251 of file regexec.c.
References ONIGENC_MBC_CASE_FOLD, ONIGENC_MBC_CASE_FOLD_MAXLEN, and UChar.
Referenced by bm_search_ic(), bm_search_notrev_ic(), slow_search_backward_ic(), and slow_search_ic().
|
static |
Definition at line 1126 of file regexec.c.
References ONIGENC_MBC_CASE_FOLD, ONIGENC_MBC_CASE_FOLD_MAXLEN, and UChar.
Referenced by backref_match_at_nested_level().
|
static |
Definition at line 518 of file regexec.c.
Referenced by onig_get_match_stack_limit_size(), onig_set_match_stack_limit_size(), and stack_double().