Ruby
2.5.0dev(2017-10-22revision60238)
|
#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 | RECURSION_EXIST 1 |
#define | RECURSION_INFINITE 2 |
#define | FOUND_CALLED_NODE 1 |
#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 | IN_CALL (1<<4) |
#define | IN_RECCALL (1<<5) |
#define | EXPAND_STRING_MAX_LENGTH 100 |
#define | ALLOWED_TYPE_IN_LB |
#define | ALLOWED_ENCLOSE_IN_LB ( ENCLOSE_MEMORY | ENCLOSE_OPTION ) |
#define | ALLOWED_ENCLOSE_IN_LB_NOT ENCLOSE_OPTION |
#define | ALLOWED_ANCHOR_IN_LB |
#define | ALLOWED_ANCHOR_IN_LB_NOT |
#define | COMP_EM_BASE 20 |
#define | MAX_NODE_OPT_INFO_REF_COUNT 5 |
#define | REGEX_TRANSFER(to, from) |
#define | COMPILE_INIT_SIZE 20 |
Variables | |
OnigCaseFoldType | OnigDefaultCaseFoldFlag = ONIGENC_CASE_FOLD_MIN |
#define ALLOWED_ANCHOR_IN_LB |
#define ALLOWED_ANCHOR_IN_LB_NOT |
#define ALLOWED_ENCLOSE_IN_LB ( ENCLOSE_MEMORY | ENCLOSE_OPTION ) |
#define ALLOWED_ENCLOSE_IN_LB_NOT ENCLOSE_OPTION |
#define ALLOWED_TYPE_IN_LB |
#define COMP_EM_BASE 20 |
#define COMPILE_INIT_SIZE 20 |
Referenced by onig_compile_ruby().
#define EXPAND_STRING_MAX_LENGTH 100 |
#define FOUND_CALLED_NODE 1 |
#define IS_NEED_STR_LEN_OP_EXACT | ( | op | ) |
#define REGEX_TRANSFER | ( | to, | |
from | |||
) |
#define REPEAT_RANGE_ALLOC 4 |
#define THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION 8 |
void onig_add_end_call | ( | void(*)(void) | func | ) |
Definition at line 6022 of file regcomp.c.
References OnigEndCallListItem::next, return, and xmalloc.
int onig_bbuf_init | ( | BBuf * | buf, |
OnigDistance | size | ||
) |
Definition at line 142 of file regcomp.c.
References _BBuf::alloc, IS_NULL, NULL, ONIGERR_MEMORY, _BBuf::p, UChar, _BBuf::used, and xmalloc.
int onig_compile | ( | regex_t * | reg, |
const UChar * | pattern, | ||
const UChar * | pattern_end, | ||
OnigErrorInfo * | einfo | ||
) |
Definition at line 5698 of file regcomp.c.
References NULL, and onig_compile_ruby().
Referenced by onig_new(), and onig_new_without_alloc().
int onig_compile_ruby | ( | regex_t * | reg, |
const UChar * | pattern, | ||
const UChar * | pattern_end, | ||
OnigErrorInfo * | einfo, | ||
const char * | sourcefile, | ||
int | sourceline | ||
) |
Definition at line 5707 of file regcomp.c.
References re_pattern_buffer::alloc, BBUF_INIT, COMPILE_INIT_SIZE, re_pattern_buffer::enc, re_registers::end, err, IS_NOT_NULL, IS_SYNTAX_BV, NULL, 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_OPTION_CAPTURE_GROUP, onig_parse_make_tree(), ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP, re_pattern_buffer::options, OnigErrorInfo::par, re_pattern_buffer::repeat_range, re_pattern_buffer::repeat_range_alloc, ScanEnv::sourcefile, ScanEnv::sourceline, ScanEnv::syntax, UChar, and re_pattern_buffer::used.
Referenced by onig_compile().
void onig_free | ( | regex_t * | reg | ) |
Definition at line 5641 of file regcomp.c.
References IS_NOT_NULL, onig_free_body(), and xfree().
Referenced by onig_free_body(), and onig_new().
void onig_free_body | ( | regex_t * | reg | ) |
Definition at line 5624 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 36 of file regcomp.c.
References OnigDefaultCaseFoldFlag.
int onig_init | ( | void | ) |
Definition at line 5998 of file regcomp.c.
References onigenc_init().
Referenced by onig_initialize(), and onig_reg_init().
int onig_initialize | ( | OnigEncoding encodings [] | ARG_UNUSED, |
int n | ARG_UNUSED | ||
) |
Definition at line 5992 of file regcomp.c.
References onig_init().
int onig_is_code_in_cc | ( | OnigEncoding | enc, |
OnigCodePoint | code, | ||
CClassNode * | cc | ||
) |
Definition at line 6114 of file regcomp.c.
References ALIGNMENT_RIGHT, ANCHOR_BEGIN_BUF, ANCHOR_BEGIN_LINE, ANCHOR_BEGIN_POSITION, ANCHOR_END_BUF, ANCHOR_END_LINE, ANCHOR_KEEP, 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, BRefNode::back_num, BACKREFS_P, bp, re_pattern_buffer::enc, enclen, ENCLOSE_ABSENT, ENCLOSE_CONDITION, ENCLOSE_MEMORY, ENCLOSE_OPTION, ENCLOSE_STOP_BACKTRACK, re_registers::end, GET_ABSADDR_INC, GET_CODE_POINT, GET_LENGTH_INC, GET_MEMNUM_INC, GET_OPTION_INC, GET_RELADDR_INC, IS_NCCLASS_NOT, IS_NOT_NULL, IS_NULL, len, level, CallNode::name, CallNode::name_end, NANCHOR, NBREF, NCALL, NCAR, NCCLASS, NCDR, NCTYPE, 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, onig_is_code_in_cc_len(), ONIGENC_CODE_TO_MBCLEN, ONIGENC_CTYPE_WORD, ONIGENC_MBC_MINLEN, 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, _BBuf::p, re_pattern_buffer::p, PRIxPTR, SIZE_BITSET, SIZE_MEMNUM, SIZE_OPTION, SIZE_RELADDR, SIZE_STATE_CHECK_NUM, TRUE, UChar, _BBuf::used, and re_pattern_buffer::used.
int onig_is_code_in_cc_len | ( | int | elen, |
OnigCodePoint | code, | ||
CClassNode * | cc | ||
) |
Definition at line 6091 of file regcomp.c.
References BITSET_AT, CClassNode::bs, IS_NCCLASS_NOT, IS_NULL, CClassNode::mbuf, onig_is_in_code_range(), _BBuf::p, and SINGLE_BYTE_SIZE.
Referenced by onig_is_code_in_cc().
int onig_is_in_code_range | ( | const UChar * | p, |
OnigCodePoint | code | ||
) |
Definition at line 6070 of file regcomp.c.
References GET_CODE_POINT.
Referenced by onig_is_code_in_cc_len().
Definition at line 5651 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, IS_NULL, ONIG_CHAR_TABLE_SIZE, re_pattern_buffer::p, re_pattern_buffer::repeat_range, re_pattern_buffer::repeat_range_alloc, and size.
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 5970 of file regcomp.c.
References err, IS_NULL, NULL, onig_compile(), onig_free(), onig_reg_init(), ONIGENC_CASE_FOLD_DEFAULT, ONIGERR_MEMORY, and xmalloc.
int onig_new_without_alloc | ( | regex_t * | reg, |
const UChar * | pattern, | ||
const UChar * | pattern_end, | ||
OnigOptionType | option, | ||
OnigEncoding | enc, | ||
const OnigSyntaxType * | syntax, | ||
OnigErrorInfo * | einfo | ||
) |
Definition at line 5956 of file regcomp.c.
References 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 5912 of file regcomp.c.
References IS_NULL, onig_init(), ONIG_OPTION_CAPTURE_GROUP, ONIG_OPTION_DONT_CAPTURE_GROUP, ONIG_OPTION_NEGATE_SINGLELINE, ONIG_OPTION_SINGLELINE, ONIGENC_IS_UNDEF, ONIGERR_DEFAULT_ENCODING_IS_NOT_SET, ONIGERR_INVALID_ARGUMENT, ONIGERR_INVALID_COMBINATION_OF_OPTIONS, and OnigSyntaxType::options.
Referenced by onig_new(), and onig_new_without_alloc().
size_t onig_region_memsize | ( | const OnigRegion * | regs | ) |
Definition at line 5666 of file regcomp.c.
References re_registers::allocated, re_registers::beg, re_registers::end, IS_NULL, and size.
int onig_set_default_case_fold_flag | ( | OnigCaseFoldType | case_fold_flag | ) |
Definition at line 42 of file regcomp.c.
References OnigDefaultCaseFoldFlag.
OnigCaseFoldType OnigDefaultCaseFoldFlag = ONIGENC_CASE_FOLD_MIN |
Definition at line 33 of file regcomp.c.
Referenced by onig_get_default_case_fold_flag(), and onig_set_default_case_fold_flag().