Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Functions
regparse.h File Reference
`#include "regint.h"`
Include dependency graph for regparse.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | StrNode
struct | QtfrNode
struct | EncloseNode
struct | UnsetAddr
struct | UnsetAddrList
struct | CallNode
struct | BRefNode
struct | AnchorNode
struct | ConsAltNode
struct | CtypeNode
struct | _Node
struct | ScanEnv
struct | GroupNumRemap

## Macros
#define | NT_STR 0
#define | NT_CCLASS 1
#define | NT_CTYPE 2
#define | NT_CANY 3
#define | NT_BREF 4
#define | NT_QTFR 5
#define | NT_ENCLOSE 6
#define | NT_ANCHOR 7
#define | NT_LIST 8
#define | NT_ALT 9
#define | NT_CALL 10
#define | NTYPE2BIT(type) (1<<(type))
#define | BIT_NT_STR NTYPE2BIT(NT_STR)
#define | BIT_NT_CCLASS NTYPE2BIT(NT_CCLASS)
#define | BIT_NT_CTYPE NTYPE2BIT(NT_CTYPE)
#define | BIT_NT_CANY NTYPE2BIT(NT_CANY)
#define | BIT_NT_BREF NTYPE2BIT(NT_BREF)
#define | BIT_NT_QTFR NTYPE2BIT(NT_QTFR)
#define | BIT_NT_ENCLOSE NTYPE2BIT(NT_ENCLOSE)
#define | BIT_NT_ANCHOR NTYPE2BIT(NT_ANCHOR)
#define | BIT_NT_LIST NTYPE2BIT(NT_LIST)
#define | BIT_NT_ALT NTYPE2BIT(NT_ALT)
#define | BIT_NT_CALL NTYPE2BIT(NT_CALL)
#define | IS_NODE_TYPE_SIMPLE(type)
#define | NTYPE(node) ((node)->u.base.type)
#define | SET_NTYPE(node, ntype) (node)->u.base.type = (ntype)
#define | NSTR(node) (&((node)->u.str))
#define | NCCLASS(node) (&((node)->u.cclass))
#define | NCTYPE(node) (&((node)->u.ctype))
#define | NBREF(node) (&((node)->u.bref))
#define | NQTFR(node) (&((node)->u.qtfr))
#define | NENCLOSE(node) (&((node)->u.enclose))
#define | NANCHOR(node) (&((node)->u.anchor))
#define | NCONS(node) (&((node)->u.cons))
#define | NCALL(node) (&((node)->u.call))
#define | NCAR(node) (NCONS(node)->car)
#define | NCDR(node) (NCONS(node)->cdr)
#define | ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML)
#define | ANCHOR_END_BUF_MASK (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)
#define | ENCLOSE_MEMORY (1<<0)
#define | ENCLOSE_OPTION (1<<1)
#define | ENCLOSE_STOP_BACKTRACK (1<<2)
#define | ENCLOSE_CONDITION (1<<3)
#define | NODE_STR_MARGIN 16
#define | NODE_STR_BUF_SIZE 24 /* sizeof(CClassNode) - sizeof(int)*4 */
#define | NODE_BACKREFS_SIZE 6
#define | NSTR_RAW (1<<0) /* by backslashed number */
#define | NSTR_AMBIG (1<<1)
#define | NSTR_DONT_GET_OPT_INFO (1<<2)
#define | NSTRING_LEN(node) (OnigDistance )((node)->u.str.end - (node)->u.str.s)
#define | NSTRING_SET_RAW(node) (node)->u.str.flag |= NSTR_RAW
#define | NSTRING_CLEAR_RAW(node) (node)->u.str.flag &= ~NSTR_RAW
#define | NSTRING_SET_AMBIG(node) (node)->u.str.flag |= NSTR_AMBIG
#define | NSTRING_SET_DONT_GET_OPT_INFO(node) (node)->u.str.flag |= NSTR_DONT_GET_OPT_INFO
#define | NSTRING_IS_RAW(node) (((node)->u.str.flag & NSTR_RAW) != 0)
#define | NSTRING_IS_AMBIG(node) (((node)->u.str.flag & NSTR_AMBIG) != 0)
#define | NSTRING_IS_DONT_GET_OPT_INFO(node) (((node)->u.str.flag & NSTR_DONT_GET_OPT_INFO) != 0)
#define | BACKREFS_P(br) (IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static);
#define | NQ_TARGET_ISNOT_EMPTY 0
#define | NQ_TARGET_IS_EMPTY 1
#define | NQ_TARGET_IS_EMPTY_MEM 2
#define | NQ_TARGET_IS_EMPTY_REC 3
#define | NST_MIN_FIXED (1<<0)
#define | NST_MAX_FIXED (1<<1)
#define | NST_CLEN_FIXED (1<<2)
#define | NST_MARK1 (1<<3)
#define | NST_MARK2 (1<<4)
#define | NST_MEM_BACKREFED (1<<5)
#define | NST_STOP_BT_SIMPLE_REPEAT (1<<6)
#define | NST_RECURSION (1<<7)
#define | NST_CALLED (1<<8)
#define | NST_ADDR_FIXED (1<<9)
#define | NST_NAMED_GROUP (1<<10)
#define | NST_NAME_REF (1<<11)
#define | NST_IN_REPEAT (1<<12) /* STK_REPEAT is nested in stack. */
#define | NST_NEST_LEVEL (1<<13)
#define | NST_BY_NUMBER (1<<14) /* {n,m} */
#define | SET_ENCLOSE_STATUS(node, f) (node)->u.enclose.state |= (f)
#define | CLEAR_ENCLOSE_STATUS(node, f) (node)->u.enclose.state &= ~(f)
#define | IS_ENCLOSE_CALLED(en) (((en)->state & NST_CALLED) != 0)
#define | IS_ENCLOSE_ADDR_FIXED(en) (((en)->state & NST_ADDR_FIXED) != 0)
#define | IS_ENCLOSE_RECURSION(en) (((en)->state & NST_RECURSION) != 0)
#define | IS_ENCLOSE_MARK1(en) (((en)->state & NST_MARK1) != 0)
#define | IS_ENCLOSE_MARK2(en) (((en)->state & NST_MARK2) != 0)
#define | IS_ENCLOSE_MIN_FIXED(en) (((en)->state & NST_MIN_FIXED) != 0)
#define | IS_ENCLOSE_MAX_FIXED(en) (((en)->state & NST_MAX_FIXED) != 0)
#define | IS_ENCLOSE_CLEN_FIXED(en) (((en)->state & NST_CLEN_FIXED) != 0)
#define | IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT(en) (((en)->state & NST_STOP_BT_SIMPLE_REPEAT) != 0)
#define | IS_ENCLOSE_NAMED_GROUP(en) (((en)->state & NST_NAMED_GROUP) != 0)
#define | IS_ENCLOSE_NAME_REF(en) (((en)->state & NST_NAME_REF) != 0)
#define | SET_CALL_RECURSION(node) (node)->u.call.state |= NST_RECURSION
#define | IS_CALL_RECURSION(cn) (((cn)->state & NST_RECURSION) != 0)
#define | IS_CALL_NAME_REF(cn) (((cn)->state & NST_NAME_REF) != 0)
#define | IS_BACKREF_NAME_REF(bn) (((bn)->state & NST_NAME_REF) != 0)
#define | IS_BACKREF_NEST_LEVEL(bn) (((bn)->state & NST_NEST_LEVEL) != 0)
#define | IS_QUANTIFIER_IN_REPEAT(qn) (((qn)->state & NST_IN_REPEAT) != 0)
#define | IS_QUANTIFIER_BY_NUMBER(qn) (((qn)->state & NST_BY_NUMBER) != 0)
#define | CALLNODE_REFNUM_UNDEF -1
#define | NULL_NODE ((Node* )0)
#define | SCANENV_MEMNODES_SIZE 8
#define | SCANENV_MEM_NODES(senv)
#define | IS_SYNTAX_OP(syn, opm) (((syn)->op & (opm)) != 0)
#define | IS_SYNTAX_OP2(syn, opm) (((syn)->op2 & (opm)) != 0)
#define | IS_SYNTAX_BV(syn, bvm) (((syn)->behavior & (bvm)) != 0)

## Typedefs
typedef struct _Node | Node

## Functions
int onig_renumber_name_table | P_ ((regex_t *reg, GroupNumRemap *map))
int onig_strncmp | P_ ((const UChar *s1, const UChar *s2, int n))
void onig_strcpy | P_ ((UChar *dest, const UChar *src, const UChar *end))
void onig_scan_env_set_error_string | P_ ((ScanEnv *env, int ecode, UChar *arg, UChar *arg_end))
int onig_scan_unsigned_number | P_ ((UChar **src, const UChar *end, OnigEncoding enc))
void onig_reduce_nested_quantifier | P_ ((Node *pnode, Node *cnode))
void onig_node_conv_to_str_node | P_ ((Node *node, int raw))
int onig_node_str_cat | P_ ((Node *node, const UChar *s, const UChar *end))
void onig_node_free | P_ ((Node *node))
Node *onig_node_new_enclose | P_ ((int type))
Node *onig_node_new_str | P_ ((const UChar *s, const UChar *end))
Node *onig_node_new_list | P_ ((Node *left, Node *right))
Node *onig_node_list_add | P_ ((Node *list, Node *x))
int onig_free_node_list | P_ ((void))
int onig_names_free | P_ ((regex_t *reg))
int onig_parse_make_tree | P_ ((Node **root, const UChar *pattern, const UChar *end, regex_t *reg, ScanEnv *env))

## Macro Definition Documentation

#define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML)

Definition at line 89 of file regparse.h.

Referenced by optimize_node_left().

#define ANCHOR_END_BUF_MASK (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)

Definition at line 90 of file regparse.h.

#define BACKREFS_P | ( |  | br | ) | (IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static);

Definition at line 116 of file regparse.h.

Referenced by compile_tree(), get_max_match_length(), get_min_match_length(), optimize_node_left(), and setup_tree().

#define BIT_NT_ALT NTYPE2BIT(NT_ALT)

Definition at line 64 of file regparse.h.

#define BIT_NT_ANCHOR NTYPE2BIT(NT_ANCHOR)

Definition at line 62 of file regparse.h.

#define BIT_NT_BREF NTYPE2BIT(NT_BREF)

Definition at line 59 of file regparse.h.

#define BIT_NT_CALL NTYPE2BIT(NT_CALL)

Definition at line 65 of file regparse.h.

#define BIT_NT_CANY NTYPE2BIT(NT_CANY)

Definition at line 58 of file regparse.h.

#define BIT_NT_CCLASS NTYPE2BIT(NT_CCLASS)

Definition at line 56 of file regparse.h.

#define BIT_NT_CTYPE NTYPE2BIT(NT_CTYPE)

Definition at line 57 of file regparse.h.

#define BIT_NT_ENCLOSE NTYPE2BIT(NT_ENCLOSE)

Definition at line 61 of file regparse.h.

#define BIT_NT_LIST NTYPE2BIT(NT_LIST)

Definition at line 63 of file regparse.h.

#define BIT_NT_QTFR NTYPE2BIT(NT_QTFR)

Definition at line 60 of file regparse.h.

#define BIT_NT_STR NTYPE2BIT(NT_STR)

Definition at line 55 of file regparse.h.

#define CALLNODE_REFNUM_UNDEF -1

Definition at line 165 of file regparse.h.

#define CLEAR_ENCLOSE_STATUS | ( |  | node,
|  |  | f
| ) |  | (node)->u.enclose.state &= ~(f)

Definition at line 142 of file regparse.h.

Referenced by subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define ENCLOSE_CONDITION (1<<3)

Definition at line 95 of file regparse.h.

Referenced by compile_enclose_node(), compile_length_enclose_node(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), optimize_node_left(), parse_enclose(), quantifiers_memory_node_info(), renumber_by_map(), and setup_tree().

#define ENCLOSE_MEMORY (1<<0)

Definition at line 92 of file regparse.h.

Referenced by compile_enclose_node(), compile_length_enclose_node(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), next_setup(), node_new_enclose_memory(), noname_disable_map(), optimize_node_left(), parse_enclose(), quantifiers_memory_node_info(), and setup_tree().

#define ENCLOSE_OPTION (1<<1)

Definition at line 93 of file regparse.h.

Referenced by compile_enclose_node(), compile_length_enclose_node(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), node_new_option(), optimize_node_left(), quantifiers_memory_node_info(), and setup_tree().

#define ENCLOSE_STOP_BACKTRACK (1<<2)

Definition at line 94 of file regparse.h.

Referenced by compile_enclose_node(), compile_length_enclose_node(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), next_setup(), node_extended_grapheme_cluster(), node_linebreak(), optimize_node_left(), parse_enclose(), parse_exp(), quantifiers_memory_node_info(), and setup_tree().

#define IS_BACKREF_NAME_REF | ( |  | bn | ) | (((bn)->state & NST_NAME_REF) != 0)

Definition at line 160 of file regparse.h.

Referenced by numbered_ref_check(), and renumber_node_backref().

#define IS_BACKREF_NEST_LEVEL | ( |  | bn | ) | (((bn)->state & NST_NEST_LEVEL) != 0)

Definition at line 161 of file regparse.h.

Referenced by compile_length_tree(), compile_tree(), and setup_tree().

#define IS_CALL_NAME_REF | ( |  | cn | ) | (((cn)->state & NST_NAME_REF) != 0)

Definition at line 159 of file regparse.h.

#define IS_CALL_RECURSION | ( |  | cn | ) | (((cn)->state & NST_RECURSION) != 0)

Definition at line 158 of file regparse.h.

Referenced by get_char_length_tree1(), get_max_match_length(), get_min_match_length(), optimize_node_left(), and quantifiers_memory_node_info().

#define IS_ENCLOSE_ADDR_FIXED | ( |  | en | ) | (((en)->state & NST_ADDR_FIXED) != 0)

Definition at line 145 of file regparse.h.

Referenced by unset_addr_list_fix().

#define IS_ENCLOSE_CALLED | ( |  | en | ) | (((en)->state & NST_CALLED) != 0)

Definition at line 144 of file regparse.h.

Referenced by compile_enclose_node(), compile_length_enclose_node(), and subexp_recursive_check_trav().

#define IS_ENCLOSE_CLEN_FIXED | ( |  | en | ) | (((en)->state & NST_CLEN_FIXED) != 0)

Definition at line 151 of file regparse.h.

Referenced by get_char_length_tree1().

#define IS_ENCLOSE_MARK1 | ( |  | en | ) | (((en)->state & NST_MARK1) != 0)

Definition at line 147 of file regparse.h.

Referenced by subexp_inf_recursive_check(), and subexp_recursive_check().

#define IS_ENCLOSE_MARK2 | ( |  | en | ) | (((en)->state & NST_MARK2) != 0)

Definition at line 148 of file regparse.h.

Referenced by subexp_inf_recursive_check(), and subexp_recursive_check().

#define IS_ENCLOSE_MAX_FIXED | ( |  | en | ) | (((en)->state & NST_MAX_FIXED) != 0)

Definition at line 150 of file regparse.h.

Referenced by get_max_match_length(), and optimize_node_left().

#define IS_ENCLOSE_MIN_FIXED | ( |  | en | ) | (((en)->state & NST_MIN_FIXED) != 0)

Definition at line 149 of file regparse.h.

Referenced by get_min_match_length(), and optimize_node_left().

#define IS_ENCLOSE_NAME_REF | ( |  | en | ) | (((en)->state & NST_NAME_REF) != 0)

Definition at line 155 of file regparse.h.

Referenced by setup_tree().

#define IS_ENCLOSE_NAMED_GROUP | ( |  | en | ) | (((en)->state & NST_NAMED_GROUP) != 0)

Definition at line 154 of file regparse.h.

Referenced by noname_disable_map().

#define IS_ENCLOSE_RECURSION | ( |  | en | ) | (((en)->state & NST_RECURSION) != 0)

Definition at line 146 of file regparse.h.

Referenced by compile_enclose_node(), compile_length_enclose_node(), subexp_inf_recursive_check_trav(), and subexp_recursive_check_trav().

#define IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT | ( |  | en | ) | (((en)->state & NST_STOP_BT_SIMPLE_REPEAT) != 0)

Definition at line 152 of file regparse.h.

Referenced by compile_enclose_node(), and compile_length_enclose_node().

#define IS_NODE_TYPE_SIMPLE | ( |  | type | ) |

Value:
((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\
BIT_NT_CANY | BIT_NT_BREF)) != 0)
BIT_NT_STR
#define BIT_NT_STR
Definition: regparse.h:55
BIT_NT_CCLASS
#define BIT_NT_CCLASS
Definition: regparse.h:56
BIT_NT_CTYPE
#define BIT_NT_CTYPE
Definition: regparse.h:57
BIT_NT_CANY
#define BIT_NT_CANY
Definition: regparse.h:58
BIT_NT_BREF
#define BIT_NT_BREF
Definition: regparse.h:59
type
int type
Definition: tcltklib.c:111
NTYPE2BIT
#define NTYPE2BIT(type)
Definition: regparse.h:53

Definition at line 67 of file regparse.h.

Referenced by next_setup(), and setup_tree().

#define IS_QUANTIFIER_BY_NUMBER | ( |  | qn | ) | (((qn)->state & NST_BY_NUMBER) != 0)

Definition at line 163 of file regparse.h.

Referenced by set_quantifier().

#define IS_QUANTIFIER_IN_REPEAT | ( |  | qn | ) | (((qn)->state & NST_IN_REPEAT) != 0)

Definition at line 162 of file regparse.h.

Referenced by compile_range_repeat_node().

#define IS_SYNTAX_BV | ( |  | syn,
|  |  | bvm
| ) |  | (((syn)->behavior & (bvm)) != 0)

Definition at line 326 of file regparse.h.

Referenced by add_code_range0(), CC_DUP_WARN(), CC_ESC_WARN(), CLOSE_BRACKET_WITHOUT_ESC_WARN(), fetch_named_backref_token(), fetch_range_quantifier(), fetch_token(), fetch_token_in_cc(), name_add(), next_state_val(), onig_compile(), onig_noname_group_capture_is_active(), parse_char_class(), parse_enclose(), parse_exp(), set_quantifier(), setup_look_behind(), setup_subexp_call(), and setup_tree().

#define IS_SYNTAX_OP | ( |  | syn,
|  |  | opm
| ) |  | (((syn)->op & (opm)) != 0)

Definition at line 324 of file regparse.h.

Referenced by conv_backslash_value(), fetch_escaped_value(), fetch_range_quantifier(), fetch_token(), and fetch_token_in_cc().

#define IS_SYNTAX_OP2 | ( |  | syn,
|  |  | opm
| ) |  | (((syn)->op2 & (opm)) != 0)

Definition at line 325 of file regparse.h.

Referenced by conv_backslash_value(), fetch_escaped_value(), fetch_token(), fetch_token_in_cc(), and parse_enclose().

#define NANCHOR | ( |  | node | ) | (&((node)->u.anchor))

Definition at line 80 of file regparse.h.

Referenced by check_type_tree(), compile_length_tree(), compile_tree(), divide_look_behind_alternatives(), get_head_value_node(), noname_disable_map(), onig_node_free(), onig_node_new_anchor(), optimize_node_left(), parse_enclose(), parse_exp(), renumber_by_map(), setup_look_behind(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define NBREF | ( |  | node | ) | (&((node)->u.bref))

Definition at line 77 of file regparse.h.

Referenced by compile_length_tree(), compile_tree(), get_max_match_length(), get_min_match_length(), node_new_backref(), numbered_ref_check(), onig_node_free(), optimize_node_left(), renumber_node_backref(), and setup_tree().

#define NCALL | ( |  | node | ) | (&((node)->u.call))

Definition at line 82 of file regparse.h.

Referenced by compile_tree(), get_char_length_tree1(), get_max_match_length(), get_min_match_length(), node_new_call(), optimize_node_left(), quantifiers_memory_node_info(), setup_subexp_call(), subexp_inf_recursive_check(), and subexp_recursive_check().

#define NCAR | ( |  | node | ) | (NCONS(node)->car)

Definition at line 84 of file regparse.h.

Referenced by check_type_tree(), compile_enclose_node(), compile_length_enclose_node(), compile_length_tree(), compile_tree(), divide_look_behind_alternatives(), expand_case_fold_string(), expand_case_fold_string_alt(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), next_setup(), node_new_list(), noname_disable_map(), numbered_ref_check(), onig_node_free(), onig_node_new_alt(), optimize_node_left(), parse_exp(), quantifiers_memory_node_info(), renumber_by_map(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define NCCLASS | ( |  | node | ) | (&((node)->u.cclass))

Definition at line 75 of file regparse.h.

Referenced by compile_length_tree(), compile_tree(), i_free_shared_class(), is_not_included(), node_extended_grapheme_cluster(), node_linebreak(), node_new_cclass(), node_new_cclass_by_codepoint_range(), onig_node_free(), optimize_node_left(), parse_char_class(), parse_char_property(), and parse_exp().

#define NCDR | ( |  | node | ) | (NCONS(node)->cdr)

Definition at line 85 of file regparse.h.

Referenced by check_type_tree(), compile_enclose_node(), compile_length_enclose_node(), compile_length_tree(), compile_tree(), divide_look_behind_alternatives(), expand_case_fold_string_alt(), get_char_length_tree1(), get_max_match_length(), get_min_match_length(), i_apply_case_fold(), next_setup(), node_new_list(), noname_disable_map(), numbered_ref_check(), onig_node_free(), onig_node_list_add(), onig_node_new_alt(), optimize_node_left(), parse_branch(), parse_exp(), parse_subexp(), quantifiers_memory_node_info(), renumber_by_map(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define NCONS | ( |  | node | ) | (&((node)->u.cons))

Definition at line 81 of file regparse.h.

#define NCTYPE | ( |  | node | ) | (&((node)->u.ctype))

Definition at line 76 of file regparse.h.

Referenced by compile_tree(), is_not_included(), node_new_ctype(), and optimize_node_left().

#define NENCLOSE | ( |  | node | ) | (&((node)->u.enclose))

Definition at line 79 of file regparse.h.

Referenced by check_type_tree(), compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), next_setup(), node_extended_grapheme_cluster(), node_linebreak(), node_new_enclose(), node_new_enclose_memory(), node_new_option(), noname_disable_map(), numbered_ref_check(), onig_node_free(), optimize_node_left(), parse_enclose(), parse_exp(), parse_regexp(), quantifiers_memory_node_info(), renumber_by_map(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), subexp_recursive_check_trav(), and unset_addr_list_fix().

#define NODE_BACKREFS_SIZE 6

Definition at line 99 of file regparse.h.

Referenced by node_new_backref().

#define NODE_STR_BUF_SIZE 24 /* sizeof(CClassNode) - sizeof(int)*4 */

Definition at line 98 of file regparse.h.

Referenced by onig_node_str_cat().

#define NODE_STR_MARGIN 16

Definition at line 97 of file regparse.h.

Referenced by onig_node_str_cat().

#define NQ_TARGET_IS_EMPTY 1

Definition at line 120 of file regparse.h.

Referenced by compile_tree_empty_check(), and setup_tree().

#define NQ_TARGET_IS_EMPTY_MEM 2

Definition at line 121 of file regparse.h.

Referenced by compile_tree_empty_check(), and quantifiers_memory_node_info().

#define NQ_TARGET_IS_EMPTY_REC 3

Definition at line 122 of file regparse.h.

Referenced by compile_tree_empty_check(), and quantifiers_memory_node_info().

#define NQ_TARGET_ISNOT_EMPTY 0

Definition at line 119 of file regparse.h.

Referenced by node_new_quantifier().

#define NQTFR | ( |  | node | ) | (&((node)->u.qtfr))

Definition at line 78 of file regparse.h.

Referenced by check_type_tree(), compile_enclose_node(), compile_length_enclose_node(), compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), next_setup(), node_extended_grapheme_cluster(), node_new_quantifier(), noname_disable_map(), numbered_ref_check(), onig_node_free(), onig_reduce_nested_quantifier(), optimize_node_left(), parse_exp(), quantifiers_memory_node_info(), renumber_by_map(), set_quantifier(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define NST_ADDR_FIXED (1<<9)

Definition at line 134 of file regparse.h.

Referenced by compile_enclose_node().

#define NST_BY_NUMBER (1<<14) /* {n,m} */

Definition at line 139 of file regparse.h.

Referenced by node_new_quantifier().

#define NST_CALLED (1<<8)

Definition at line 133 of file regparse.h.

Referenced by setup_subexp_call().

#define NST_CLEN_FIXED (1<<2)

Definition at line 127 of file regparse.h.

Referenced by get_char_length_tree1().

#define NST_IN_REPEAT (1<<12) /* STK_REPEAT is nested in stack. */

Definition at line 137 of file regparse.h.

Referenced by setup_tree().

#define NST_MARK1 (1<<3)

Definition at line 128 of file regparse.h.

Referenced by subexp_inf_recursive_check_trav(), and subexp_recursive_check_trav().

#define NST_MARK2 (1<<4)

Definition at line 129 of file regparse.h.

Referenced by subexp_inf_recursive_check(), and subexp_recursive_check().

#define NST_MAX_FIXED (1<<1)

Definition at line 126 of file regparse.h.

Referenced by get_max_match_length().

#define NST_MEM_BACKREFED (1<<5)

Definition at line 130 of file regparse.h.

Referenced by setup_tree().

#define NST_MIN_FIXED (1<<0)

Definition at line 125 of file regparse.h.

Referenced by get_min_match_length().

#define NST_NAME_REF (1<<11)

Definition at line 136 of file regparse.h.

Referenced by node_new_backref(), and parse_enclose().

#define NST_NAMED_GROUP (1<<10)

Definition at line 135 of file regparse.h.

Referenced by node_new_enclose_memory().

#define NST_NEST_LEVEL (1<<13)

Definition at line 138 of file regparse.h.

Referenced by node_new_backref().

#define NST_RECURSION (1<<7)

Definition at line 132 of file regparse.h.

Referenced by get_max_match_length(), get_min_match_length(), node_new_backref(), optimize_node_left(), and subexp_recursive_check_trav().

#define NST_STOP_BT_SIMPLE_REPEAT (1<<6)

Definition at line 131 of file regparse.h.

Referenced by next_setup(), and setup_tree().

#define NSTR | ( |  | node | ) | (&((node)->u.str))

Definition at line 74 of file regparse.h.

Referenced by compile_length_string_node(), compile_length_tree(), compile_quantifier_node(), compile_string_node(), compile_tree(), expand_case_fold_string(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), is_not_included(), next_setup(), node_new_str(), onig_node_conv_to_str_node(), onig_node_free(), onig_node_str_cat(), onig_node_str_clear(), optimize_node_left(), parse_exp(), set_quantifier(), setup_tree(), swap_node(), and update_string_node_case_fold().

#define NSTR_AMBIG (1<<1)

Definition at line 102 of file regparse.h.

#define NSTR_DONT_GET_OPT_INFO (1<<2)

Definition at line 103 of file regparse.h.

#define NSTR_RAW (1<<0) /* by backslashed number */

Definition at line 101 of file regparse.h.

Referenced by str_node_split_last_char().

#define NSTRING_CLEAR_RAW | ( |  | node | ) | (node)->u.str.flag &= ~NSTR_RAW

Definition at line 107 of file regparse.h.

Referenced by parse_exp().

#define NSTRING_IS_AMBIG | ( |  | node | ) | (((node)->u.str.flag & NSTR_AMBIG) != 0)

Definition at line 112 of file regparse.h.

Referenced by compile_length_string_node(), compile_string_node(), expand_case_fold_string(), is_not_included(), and optimize_node_left().

#define NSTRING_IS_DONT_GET_OPT_INFO | ( |  | node | ) | (((node)->u.str.flag & NSTR_DONT_GET_OPT_INFO) != 0)

Definition at line 113 of file regparse.h.

Referenced by optimize_node_left().

#define NSTRING_IS_RAW | ( |  | node | ) | (((node)->u.str.flag & NSTR_RAW) != 0)

Definition at line 111 of file regparse.h.

Referenced by compile_length_tree(), compile_tree(), get_head_value_node(), optimize_node_left(), and setup_tree().

#define NSTRING_LEN | ( |  | node | ) | (OnigDistance )((node)->u.str.end - (node)->u.str.s)

Definition at line 105 of file regparse.h.

Referenced by is_not_included(), and setup_tree().

#define NSTRING_SET_AMBIG | ( |  | node | ) | (node)->u.str.flag |= NSTR_AMBIG

Definition at line 108 of file regparse.h.

Referenced by expand_case_fold_make_rem_string(), expand_case_fold_string(), and i_apply_case_fold().

#define NSTRING_SET_DONT_GET_OPT_INFO | ( |  | node | ) | (node)->u.str.flag |= NSTR_DONT_GET_OPT_INFO

Definition at line 109 of file regparse.h.

Referenced by expand_case_fold_make_rem_string().

#define NSTRING_SET_RAW | ( |  | node | ) | (node)->u.str.flag |= NSTR_RAW

Definition at line 106 of file regparse.h.

Referenced by node_new_str_raw(), parse_exp(), and str_node_split_last_char().

#define NT_ALT 9

Definition at line 49 of file regparse.h.

Referenced by check_type_tree(), compile_enclose_node(), compile_length_enclose_node(), compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), noname_disable_map(), numbered_ref_check(), onig_node_free(), onig_node_new_alt(), optimize_node_left(), parse_enclose(), quantifiers_memory_node_info(), renumber_by_map(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define NT_ANCHOR 7

Definition at line 47 of file regparse.h.

Referenced by check_type_tree(), compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), noname_disable_map(), onig_node_free(), onig_node_new_anchor(), optimize_node_left(), parse_enclose(), quantifiers_memory_node_info(), renumber_by_map(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define NT_BREF 4

Definition at line 44 of file regparse.h.

Referenced by compile_length_tree(), compile_tree(), get_head_value_node(), get_max_match_length(), get_min_match_length(), node_new_backref(), numbered_ref_check(), onig_node_free(), optimize_node_left(), quantifiers_memory_node_info(), renumber_by_map(), and setup_tree().

#define NT_CALL 10

Definition at line 50 of file regparse.h.

Referenced by compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), node_new_call(), optimize_node_left(), quantifiers_memory_node_info(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), and subexp_recursive_check().

#define NT_CANY 3

Definition at line 43 of file regparse.h.

Referenced by compile_length_quantifier_node(), compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), is_anychar_star_quantifier(), next_setup(), node_new_anychar(), optimize_node_left(), quantifiers_memory_node_info(), and setup_tree().

#define NT_CCLASS 1

Definition at line 41 of file regparse.h.

Referenced by compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), is_not_included(), node_new_cclass(), onig_node_free(), optimize_node_left(), quantifiers_memory_node_info(), and setup_tree().

#define NT_CTYPE 2

Definition at line 42 of file regparse.h.

Referenced by compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), is_not_included(), node_new_ctype(), optimize_node_left(), quantifiers_memory_node_info(), and setup_tree().

#define NT_ENCLOSE 6

Definition at line 46 of file regparse.h.

Referenced by check_type_tree(), compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), next_setup(), node_new_enclose(), noname_disable_map(), numbered_ref_check(), onig_node_free(), optimize_node_left(), quantifiers_memory_node_info(), renumber_by_map(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define NT_LIST 8

Definition at line 48 of file regparse.h.

Referenced by check_type_tree(), compile_length_tree(), compile_tree(), divide_look_behind_alternatives(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), node_new_list(), noname_disable_map(), numbered_ref_check(), onig_node_free(), optimize_node_left(), parse_branch(), quantifiers_memory_node_info(), renumber_by_map(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define NT_QTFR 5

Definition at line 45 of file regparse.h.

Referenced by check_type_tree(), compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), next_setup(), node_new_quantifier(), noname_disable_map(), numbered_ref_check(), onig_node_free(), optimize_node_left(), quantifiers_memory_node_info(), renumber_by_map(), set_quantifier(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define NT_STR 0

Definition at line 40 of file regparse.h.

Referenced by compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), is_not_included(), node_new_str(), onig_node_conv_to_str_node(), onig_node_free(), optimize_node_left(), quantifiers_memory_node_info(), set_quantifier(), setup_tree(), and swap_node().

#define NTYPE | ( |  | node | ) | ((node)->u.base.type)

Definition at line 71 of file regparse.h.

Referenced by check_type_tree(), compile_enclose_node(), compile_length_enclose_node(), compile_length_quantifier_node(), compile_length_tree(), compile_tree(), get_char_length_tree1(), get_head_value_node(), get_max_match_length(), get_min_match_length(), is_anychar_star_quantifier(), is_not_included(), next_setup(), noname_disable_map(), numbered_ref_check(), onig_node_free(), optimize_node_left(), parse_branch(), parse_enclose(), quantifiers_memory_node_info(), renumber_by_map(), set_quantifier(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), subexp_recursive_check_trav(), and swap_node().

#define NTYPE2BIT | ( |  | type | ) | (1<<(type))

Definition at line 53 of file regparse.h.

Referenced by check_type_tree().

#define NULL_NODE ((Node* )0)

Definition at line 280 of file regparse.h.

Referenced by divide_look_behind_alternatives(), expand_case_fold_string(), expand_case_fold_string_alt(), get_head_value_node(), i_apply_case_fold(), next_setup(), node_extended_grapheme_cluster(), node_linebreak(), node_new_call(), node_new_quantifier(), noname_disable_map(), onig_node_list_add(), onig_reduce_nested_quantifier(), parse_char_class(), parse_enclose(), parse_exp(), scan_env_add_mem_entry(), scan_env_clear(), setup_tree(), and str_node_split_last_char().

#define SCANENV_MEM_NODES | ( |  | senv | ) |

Value:
(IS_NOT_NULL((senv)->mem_nodes_dynamic) ? \
(senv)->mem_nodes_dynamic : (senv)->mem_nodes_static)
IS_NOT_NULL
#define IS_NOT_NULL(p)
Definition: regint.h:279

Definition at line 283 of file regparse.h.

Referenced by disable_noname_group_capture(), fetch_named_backref_token(), fetch_token(), get_max_match_length(), get_min_match_length(), node_new_backref(), optimize_node_left(), parse_enclose(), scan_env_set_mem_node(), setup_subexp_call(), and setup_tree().

#define SCANENV_MEMNODES_SIZE 8

Definition at line 282 of file regparse.h.

Referenced by scan_env_add_mem_entry(), and scan_env_clear().

#define SET_CALL_RECURSION | ( |  | node | ) | (node)->u.call.state |= NST_RECURSION

Definition at line 157 of file regparse.h.

Referenced by subexp_recursive_check().

#define SET_ENCLOSE_STATUS | ( |  | node,
|  |  | f
| ) |  | (node)->u.enclose.state |= (f)

Definition at line 141 of file regparse.h.

Referenced by get_char_length_tree1(), get_max_match_length(), get_min_match_length(), next_setup(), node_new_enclose_memory(), setup_subexp_call(), setup_tree(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check(), and subexp_recursive_check_trav().

#define SET_NTYPE | ( |  | node,
|  |  | ntype
| ) |  | (node)->u.base.type = (ntype)

Definition at line 72 of file regparse.h.

Referenced by divide_look_behind_alternatives(), node_new_anychar(), node_new_backref(), node_new_call(), node_new_cclass(), node_new_ctype(), node_new_enclose(), node_new_list(), node_new_quantifier(), node_new_str(), onig_node_conv_to_str_node(), onig_node_new_alt(), and onig_node_new_anchor().

## Typedef Documentation

typedef struct _Node Node

## Function Documentation

int onig_renumber_name_table P_ | ( | (regex_t *reg, GroupNumRemap *map) |  | ) |

int onig_strncmp P_ | ( | (const UChar *s1, const UChar *s2, int n) |  | ) |

void onig_strcpy P_ | ( | (UChar *dest, const UChar *src, const UChar *end) |  | ) |

void onig_scan_env_set_error_string P_ | ( | (ScanEnv *env, int ecode, UChar *arg, UChar *arg_end) |  | ) |

int onig_scan_unsigned_number P_ | ( | (UChar **src, const UChar *end, OnigEncoding enc) |  | ) |

void onig_reduce_nested_quantifier P_ | ( | (Node *pnode, Node *cnode) |  | ) |

void onig_node_conv_to_str_node P_ | ( | (Node *node, int raw) |  | ) |

int onig_node_str_cat P_ | ( | (Node *node, const UChar *s, const UChar *end) |  | ) |

void onig_node_free P_ | ( | (Node *node) |  | ) |

Node* onig_node_new_enclose P_ | ( | (int type) |  | ) |

Node* onig_node_new_str P_ | ( | (const UChar *s, const UChar *end) |  | ) |

Node* onig_node_new_list P_ | ( | (Node *left, Node *right) |  | ) |

Node* onig_node_list_add P_ | ( | (Node *list, Node *x) |  | ) |

int onig_free_node_list P_ | ( | (void) |  | ) |

int onig_names_free P_ | ( | (regex_t *reg) |  | ) |

int onig_parse_make_tree P_ | ( | (Node **root, const UChar *pattern, const UChar *end, regex_t *reg, ScanEnv *env) |  | ) |