|
Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Go to the source code of this file.
Data Structures | |
| struct | st_str_end_key |
| struct | NameEntry |
| struct | INamesArg |
| struct | OnigToken |
| struct | IApplyCaseFoldArg |
Macros | |
| #define | WARN_BUFSIZE 256 |
| #define | CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS |
| #define | BACKREF_REL_TO_ABS(rel_no, env) ((env)->num_mem + 1 + (rel_no)) |
| #define | ONOFF(v, f, negative) (negative) ? ((v) &= ~(f)) : ((v) |= (f)) |
| #define | MBCODE_START_POS(enc) (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80) |
| #define | SET_ALL_MULTI_BYTE_RANGE(enc, pbuf) add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ONIG_LAST_CODE_POINT) |
| #define | ADD_ALL_MULTI_BYTE_RANGE(enc, mbuf) |
| #define | BITSET_SET_BIT_CHKDUP(bs, pos) |
| #define | BITSET_IS_EMPTY(bs, empty) |
| #define | PEND_VALUE 0 |
| #define | PFETCH_READY UChar* pfetch_prev = NULL; (void)pfetch_prev |
| #define | PEND (p < end ? 0 : 1) |
| #define | PUNFETCH p = pfetch_prev |
| #define | PINC |
| #define | PFETCH(c) |
| #define | PINC_S |
| #define | PFETCH_S(c) |
| #define | PPEEK (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE) |
| #define | PPEEK_IS(c) (PPEEK == (OnigCodePoint )c) |
| #define | INIT_NAME_BACKREFS_ALLOC_NUM 8 |
| #define | INIT_SCANENV_MEMNODES_ALLOC_SIZE 16 |
| #define | BBUF_WRITE_CODE_POINT(bbuf, pos, code) BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT) |
| #define | INIT_MULTI_BYTE_RANGE_SIZE (SIZE_CODE_POINT * 5) |
| #define | SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2) |
| #define | is_invalid_quantifier_target(node) 0 |
| #define | ONIGENC_IS_CODE_NAME(enc, c) TRUE |
| #define | POSIX_BRACKET_CHECK_LIMIT_LENGTH 20 |
| #define | POSIX_BRACKET_NAME_MIN_LEN 4 |
| #define | NEWLINE_CODE 0x0a |
| #define | LIST 0 |
| #define | ALT 1 |
| #define | R_ERR(call) r=(call);if(r!=0)goto err |
| #define | NODE_COMMON_SIZE 16 |
Typedefs | |
| typedef st_table | NameTable |
| typedef st_data_t | HashDataType |
Enumerations | |
| enum | ReduceType { RQ_ASIS = 0 , RQ_DEL = 1 , RQ_A , RQ_AQ , RQ_QQ , RQ_P_QQ } |
| 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 |
| #define ADD_ALL_MULTI_BYTE_RANGE | ( | enc, | |
| mbuf | |||
| ) |
Definition at line 168 of file regparse.c.
| #define ALT 1 |
Definition at line 5761 of file regparse.c.
Definition at line 157 of file regparse.c.
| #define BBUF_WRITE_CODE_POINT | ( | bbuf, | |
| pos, | |||
| code | |||
| ) | BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT) |
Definition at line 1644 of file regparse.c.
| #define BITSET_IS_EMPTY | ( | bs, | |
| empty | |||
| ) |
Definition at line 181 of file regparse.c.
| #define BITSET_SET_BIT_CHKDUP | ( | bs, | |
| pos | |||
| ) |
Definition at line 176 of file regparse.c.
| #define CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS |
Definition at line 36 of file regparse.c.
| #define INIT_MULTI_BYTE_RANGE_SIZE (SIZE_CODE_POINT * 5) |
| #define INIT_NAME_BACKREFS_ALLOC_NUM 8 |
Definition at line 451 of file regparse.c.
| #define INIT_SCANENV_MEMNODES_ALLOC_SIZE 16 |
Definition at line 980 of file regparse.c.
| #define is_invalid_quantifier_target | ( | node | ) | 0 |
Definition at line 2122 of file regparse.c.
| #define LIST 0 |
Definition at line 5760 of file regparse.c.
| #define MBCODE_START_POS | ( | enc | ) | (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80) |
Definition at line 162 of file regparse.c.
| #define NEWLINE_CODE 0x0a |
| #define NODE_COMMON_SIZE 16 |
Definition at line 5812 of file regparse.c.
| #define ONIGENC_IS_CODE_NAME | ( | enc, | |
| c | |||
| ) | TRUE |
Definition at line 2503 of file regparse.c.
Definition at line 160 of file regparse.c.
| #define PEND (p < end ? 0 : 1) |
Definition at line 299 of file regparse.c.
| #define PEND_VALUE 0 |
Definition at line 291 of file regparse.c.
| #define PFETCH | ( | c | ) |
Definition at line 305 of file regparse.c.
Definition at line 295 of file regparse.c.
| #define PFETCH_S | ( | c | ) |
Definition at line 314 of file regparse.c.
| #define PINC |
Definition at line 301 of file regparse.c.
| #define PINC_S |
Definition at line 311 of file regparse.c.
| #define POSIX_BRACKET_CHECK_LIMIT_LENGTH 20 |
| #define POSIX_BRACKET_NAME_MIN_LEN 4 |
| #define PPEEK (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE) |
Definition at line 319 of file regparse.c.
| #define PPEEK_IS | ( | c | ) | (PPEEK == (OnigCodePoint )c) |
Definition at line 320 of file regparse.c.
| #define PUNFETCH p = pfetch_prev |
Definition at line 300 of file regparse.c.
Definition at line 5789 of file regparse.c.
| #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 165 of file regparse.c.
| #define SWAP_BBUF_NOT | ( | bbuf1, | |
| not1, | |||
| bbuf2, | |||
| not2 | |||
| ) |
Definition at line 1815 of file regparse.c.
| #define WARN_BUFSIZE 256 |
Definition at line 34 of file regparse.c.
| typedef st_data_t HashDataType |
Definition at line 465 of file regparse.c.
Definition at line 464 of file regparse.c.
| enum CCSTATE |
| Enumerator | |
|---|---|
| CCS_VALUE | |
| CCS_RANGE | |
| CCS_COMPLETE | |
| CCS_START | |
Definition at line 4393 of file regparse.c.
| enum CCVALTYPE |
| Enumerator | |
|---|---|
| CCV_SB | |
| CCV_CODE_POINT | |
| CCV_CLASS | |
Definition at line 4400 of file regparse.c.
| enum ReduceType |
| Enumerator | |
|---|---|
| RQ_ASIS | |
| RQ_DEL | |
| RQ_A | |
| RQ_AQ | |
| RQ_QQ | |
| RQ_P_QQ | |
Definition at line 2183 of file regparse.c.
| enum TokenSyms |
Definition at line 2247 of file regparse.c.
| int onig_foreach_name | ( | regex_t * | reg, |
| int(*)(const UChar *, const UChar *, int, int *, regex_t *, void *) | func, | ||
| void * | arg | ||
| ) |
Definition at line 576 of file regparse.c.
References INamesArg::arg, re_pattern_buffer::enc, INamesArg::enc, INamesArg::func, if(), IS_NOT_NULL, re_pattern_buffer::name_table, INamesArg::reg, INamesArg::ret, and t.
| unsigned int onig_get_parse_depth_limit | ( | void | ) |
Definition at line 117 of file regparse.c.
| int onig_name_to_backref_number | ( | regex_t * | reg, |
| const UChar * | name, | ||
| const UChar * | name_end, | ||
| const OnigRegion * | region | ||
| ) |
Definition at line 909 of file regparse.c.
References re_registers::beg, IS_NOT_NULL, name, onig_name_to_group_numbers(), ONIG_REGION_NOTPOS, and ONIGERR_PARSER_BUG.
| int onig_name_to_group_numbers | ( | regex_t * | reg, |
| const UChar * | name, | ||
| const UChar * | name_end, | ||
| int ** | nums | ||
| ) |
Definition at line 887 of file regparse.c.
References NameEntry::back_num, NameEntry::back_ref1, NameEntry::back_refs, IS_NULL, name, and ONIGERR_UNDEFINED_NAME_REFERENCE.
Referenced by onig_name_to_backref_number().
Definition at line 525 of file regparse.c.
References if(), IS_NOT_NULL, re_pattern_buffer::name_table, NULL, and t.
Referenced by onig_free_body().
| void onig_node_free | ( | Node * | node | ) |
Definition at line 1062 of file regparse.c.
References IS_NOT_NULL, IS_NULL, CClassNode::mbuf, NANCHOR, NBREF, NCAR, NCCLASS, NCDR, NENCLOSE, NQTFR, NSTR, NT_ALT, NT_ANCHOR, NT_BREF, NT_CCLASS, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, onig_node_free(), and xfree.
Referenced by onig_compile_ruby(), onig_node_free(), and onig_reduce_nested_quantifier().
Definition at line 1192 of file regparse.c.
References IS_NOT_NULL, IS_NULL, NCDR, NULL, NULL_NODE, and onig_node_new_list().
Definition at line 1210 of file regparse.c.
References CHECK_NULL_RETURN, NCAR, NCDR, NT_ALT, and SET_NTYPE.
Definition at line 1222 of file regparse.c.
References CHECK_NULL_RETURN, NANCHOR, NT_ANCHOR, NULL, and SET_NTYPE.
Definition at line 1347 of file regparse.c.
Definition at line 1186 of file regparse.c.
Referenced by onig_node_list_add().
Definition at line 1481 of file regparse.c.
Definition at line 1376 of file regparse.c.
References CHECK_NULL_RETURN_MEMERR, int(), len, NODE_STR_BUF_SIZE, NODE_STR_MARGIN, NSTR, onig_strcpy(), and UChar.
Referenced by onig_node_str_set().
| void onig_node_str_clear | ( | Node * | node | ) |
Definition at line 1449 of file regparse.c.
References IS_NOT_NULL, NSTR, and xfree.
Referenced by onig_node_str_set().
Definition at line 1412 of file regparse.c.
References onig_node_str_cat(), and onig_node_str_clear().
Definition at line 963 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 87 of file regparse.c.
Definition at line 623 of file regparse.c.
References if(), IS_NOT_NULL, re_pattern_buffer::name_table, and t.
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 6603 of file regparse.c.
References re_pattern_buffer::case_fold_flag, re_pattern_buffer::enc, env, NULL, re_pattern_buffer::num_mem, re_pattern_buffer::options, root, re_pattern_buffer::syntax, and UChar.
Referenced by onig_compile_ruby().
Definition at line 2203 of file regparse.c.
References QtfrNode::greedy, QtfrNode::lower, NQTFR, NULL_NODE, onig_node_free(), REPEAT_INFINITE, RQ_A, RQ_AQ, RQ_ASIS, RQ_DEL, RQ_P_QQ, RQ_QQ, QtfrNode::target, and QtfrNode::upper.
| int onig_renumber_name_table | ( | regex_t * | reg, |
| GroupNumRemap * | map | ||
| ) |
Definition at line 611 of file regparse.c.
References if(), IS_NOT_NULL, map(), re_pattern_buffer::name_table, and t.
| void onig_scan_env_set_error_string | ( | ScanEnv * | env, |
| int ecode | ARG_UNUSED, | ||
| UChar * | arg, | ||
| UChar * | arg_end | ||
| ) |
Definition at line 6630 of file regparse.c.
References env.
| int onig_scan_unsigned_number | ( | UChar ** | src, |
| const UChar * | end, | ||
| OnigEncoding | enc | ||
| ) |
Definition at line 1556 of file regparse.c.
References DIGITVAL, int(), INT_MAX_LIMIT, num, ONIGENC_IS_CODE_DIGIT, PEND, PFETCH, PFETCH_READY, PUNFETCH, and UChar.
Definition at line 123 of file regparse.c.
References DEFAULT_PARSE_DEPTH_LIMIT.
| void onig_set_verb_warn_func | ( | OnigWarnFunc | f | ) |
| void onig_set_warn_func | ( | OnigWarnFunc | f | ) |
| hash_table_type * onig_st_init_strend_table_with_size | ( | st_index_t | size | ) |
Definition at line 406 of file regparse.c.
| int onig_st_insert_strend | ( | hash_table_type * | table, |
| const UChar * | str_key, | ||
| const UChar * | end_key, | ||
| hash_data_type | value | ||
| ) |
| int onig_st_lookup_strend | ( | hash_table_type * | table, |
| const UChar * | str_key, | ||
| const UChar * | end_key, | ||
| hash_data_type * | value | ||
| ) |
Definition at line 418 of file regparse.c.
Definition at line 259 of file regparse.c.
References len, UChar, and xmemcpy.
Referenced by onig_node_str_cat().
| const OnigSyntaxType* OnigDefaultSyntax = ONIG_SYNTAX_RUBY |
Definition at line 85 of file regparse.c.
| const OnigSyntaxType OnigSyntaxRuby |
Definition at line 39 of file regparse.c.