Ruby: regparse.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Structures | Macros | Typedefs | Functions
regparse.h File Reference
`#include "regint.h"`

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)
#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 | ENCLOSE_ABSENT (1<<4)
#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 (regex_t *reg, GroupNumRemap *map)
int | onig_strncmp (const UChar *s1, const UChar *s2, int n)
void | onig_strcpy (UChar *dest, const UChar *src, const UChar *end)
void | onig_scan_env_set_error_string (ScanEnv *env, int ecode, UChar *arg, UChar *arg_end)
int | onig_scan_unsigned_number (UChar **src, const UChar *end, OnigEncoding enc)
void | onig_reduce_nested_quantifier (Node *pnode, Node *cnode)
void | onig_node_conv_to_str_node (Node *node, int raw)
int | onig_node_str_cat (Node *node, const UChar *s, const UChar *end)
int | onig_node_str_set (Node *node, const UChar *s, const UChar *end)
void | onig_node_free (Node *node)
Node * | onig_node_new_enclose (int type)
Node * | onig_node_new_anchor (int type)
Node * | onig_node_new_str (const UChar *s, const UChar *end)
Node * | onig_node_new_list (Node *left, Node *right)
Node * | onig_node_list_add (Node *list, Node *x)
Node * | onig_node_new_alt (Node *left, Node *right)
void | onig_node_str_clear (Node *node)
int | onig_names_free (regex_t *reg)
int | onig_parse_make_tree (Node **root, const UChar *pattern, const UChar *end, regex_t *reg, ScanEnv *env)
int | onig_free_shared_cclass_table (void)

## Macro Definition Documentation

## ◆ ANCHOR_ANYCHAR_STAR_MASK

#define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML)

Definition at line 91 of file regparse.h.

## ◆ ANCHOR_END_BUF_MASK

#define ANCHOR_END_BUF_MASK (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)

Definition at line 92 of file regparse.h.

## ◆ BACKREFS_P

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

Definition at line 119 of file regparse.h.

## ◆ BIT_NT_ALT

#define BIT_NT_ALT NTYPE2BIT(NT_ALT)

Definition at line 62 of file regparse.h.

## ◆ BIT_NT_ANCHOR

#define BIT_NT_ANCHOR NTYPE2BIT(NT_ANCHOR)

Definition at line 60 of file regparse.h.

## ◆ BIT_NT_BREF

#define BIT_NT_BREF NTYPE2BIT(NT_BREF)

Definition at line 57 of file regparse.h.

## ◆ BIT_NT_CALL

#define BIT_NT_CALL NTYPE2BIT(NT_CALL)

Definition at line 63 of file regparse.h.

## ◆ BIT_NT_CANY

#define BIT_NT_CANY NTYPE2BIT(NT_CANY)

Definition at line 56 of file regparse.h.

## ◆ BIT_NT_CCLASS

#define BIT_NT_CCLASS NTYPE2BIT(NT_CCLASS)

Definition at line 54 of file regparse.h.

## ◆ BIT_NT_CTYPE

#define BIT_NT_CTYPE NTYPE2BIT(NT_CTYPE)

Definition at line 55 of file regparse.h.

## ◆ BIT_NT_ENCLOSE

#define BIT_NT_ENCLOSE NTYPE2BIT(NT_ENCLOSE)

Definition at line 59 of file regparse.h.

## ◆ BIT_NT_LIST

#define BIT_NT_LIST NTYPE2BIT(NT_LIST)

Definition at line 61 of file regparse.h.

## ◆ BIT_NT_QTFR

#define BIT_NT_QTFR NTYPE2BIT(NT_QTFR)

Definition at line 58 of file regparse.h.

## ◆ BIT_NT_STR

#define BIT_NT_STR NTYPE2BIT(NT_STR)

Definition at line 53 of file regparse.h.

## ◆ CALLNODE_REFNUM_UNDEF

#define CALLNODE_REFNUM_UNDEF -1

Definition at line 168 of file regparse.h.

## ◆ CLEAR_ENCLOSE_STATUS

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

Definition at line 145 of file regparse.h.

## ◆ ENCLOSE_ABSENT

#define ENCLOSE_ABSENT (1<<4)

Definition at line 98 of file regparse.h.

## ◆ ENCLOSE_CONDITION

#define ENCLOSE_CONDITION (1<<3)

Definition at line 97 of file regparse.h.

## ◆ ENCLOSE_MEMORY

#define ENCLOSE_MEMORY (1<<0)

Definition at line 94 of file regparse.h.

## ◆ ENCLOSE_OPTION

#define ENCLOSE_OPTION (1<<1)

Definition at line 95 of file regparse.h.

## ◆ ENCLOSE_STOP_BACKTRACK

#define ENCLOSE_STOP_BACKTRACK (1<<2)

Definition at line 96 of file regparse.h.

## ◆ IS_BACKREF_NAME_REF

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

Definition at line 163 of file regparse.h.

## ◆ IS_BACKREF_NEST_LEVEL

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

Definition at line 164 of file regparse.h.

## ◆ IS_CALL_NAME_REF

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

Definition at line 162 of file regparse.h.

## ◆ IS_CALL_RECURSION

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

Definition at line 161 of file regparse.h.

## ◆ IS_ENCLOSE_ADDR_FIXED

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

Definition at line 148 of file regparse.h.

## ◆ IS_ENCLOSE_CALLED

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

Definition at line 147 of file regparse.h.

## ◆ IS_ENCLOSE_CLEN_FIXED

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

Definition at line 154 of file regparse.h.

## ◆ IS_ENCLOSE_MARK1

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

Definition at line 150 of file regparse.h.

## ◆ IS_ENCLOSE_MARK2

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

Definition at line 151 of file regparse.h.

## ◆ IS_ENCLOSE_MAX_FIXED

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

Definition at line 153 of file regparse.h.

## ◆ IS_ENCLOSE_MIN_FIXED

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

Definition at line 152 of file regparse.h.

## ◆ IS_ENCLOSE_NAME_REF

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

Definition at line 158 of file regparse.h.

## ◆ IS_ENCLOSE_NAMED_GROUP

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

Definition at line 157 of file regparse.h.

## ◆ IS_ENCLOSE_RECURSION

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

Definition at line 149 of file regparse.h.

## ◆ IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT

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

Definition at line 155 of file regparse.h.

## ◆ IS_NODE_TYPE_SIMPLE

#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_CCLASS
#define BIT_NT_CCLASS
Definition: regparse.h:54
BIT_NT_BREF
#define BIT_NT_BREF
Definition: regparse.h:57
BIT_NT_STR
#define BIT_NT_STR
Definition: regparse.h:53
BIT_NT_CTYPE
#define BIT_NT_CTYPE
Definition: regparse.h:55
BIT_NT_CANY
#define BIT_NT_CANY
Definition: regparse.h:56
NTYPE2BIT
#define NTYPE2BIT(type)
Definition: regparse.h:51

Definition at line 65 of file regparse.h.

## ◆ IS_QUANTIFIER_BY_NUMBER

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

Definition at line 166 of file regparse.h.

## ◆ IS_QUANTIFIER_IN_REPEAT

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

Definition at line 165 of file regparse.h.

## ◆ IS_SYNTAX_BV

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

Definition at line 332 of file regparse.h.

## ◆ IS_SYNTAX_OP

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

Definition at line 330 of file regparse.h.

## ◆ IS_SYNTAX_OP2

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

Definition at line 331 of file regparse.h.

## ◆ NANCHOR

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

Definition at line 82 of file regparse.h.

## ◆ NBREF

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

Definition at line 79 of file regparse.h.

## ◆ NCALL

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

Definition at line 84 of file regparse.h.

## ◆ NCAR

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

Definition at line 86 of file regparse.h.

## ◆ NCCLASS

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

Definition at line 77 of file regparse.h.

## ◆ NCDR

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

Definition at line 87 of file regparse.h.

## ◆ NCONS

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

Definition at line 83 of file regparse.h.

## ◆ NCTYPE

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

Definition at line 78 of file regparse.h.

## ◆ NENCLOSE

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

Definition at line 81 of file regparse.h.

## ◆ NODE_BACKREFS_SIZE

#define NODE_BACKREFS_SIZE 6

Definition at line 102 of file regparse.h.

## ◆ NODE_STR_BUF_SIZE

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

Definition at line 101 of file regparse.h.

## ◆ NODE_STR_MARGIN

#define NODE_STR_MARGIN 16

Definition at line 100 of file regparse.h.

## ◆ NQ_TARGET_IS_EMPTY

#define NQ_TARGET_IS_EMPTY 1

Definition at line 123 of file regparse.h.

## ◆ NQ_TARGET_IS_EMPTY_MEM

#define NQ_TARGET_IS_EMPTY_MEM 2

Definition at line 124 of file regparse.h.

## ◆ NQ_TARGET_IS_EMPTY_REC

#define NQ_TARGET_IS_EMPTY_REC 3

Definition at line 125 of file regparse.h.

## ◆ NQ_TARGET_ISNOT_EMPTY

#define NQ_TARGET_ISNOT_EMPTY 0

Definition at line 122 of file regparse.h.

## ◆ NQTFR

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

Definition at line 80 of file regparse.h.

## ◆ NST_ADDR_FIXED

#define NST_ADDR_FIXED (1<<9)

Definition at line 137 of file regparse.h.

## ◆ NST_BY_NUMBER

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

Definition at line 142 of file regparse.h.

## ◆ NST_CALLED

#define NST_CALLED (1<<8)

Definition at line 136 of file regparse.h.

## ◆ NST_CLEN_FIXED

#define NST_CLEN_FIXED (1<<2)

Definition at line 130 of file regparse.h.

## ◆ NST_IN_REPEAT

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

Definition at line 140 of file regparse.h.

## ◆ NST_MARK1

#define NST_MARK1 (1<<3)

Definition at line 131 of file regparse.h.

## ◆ NST_MARK2

#define NST_MARK2 (1<<4)

Definition at line 132 of file regparse.h.

## ◆ NST_MAX_FIXED

#define NST_MAX_FIXED (1<<1)

Definition at line 129 of file regparse.h.

## ◆ NST_MEM_BACKREFED

#define NST_MEM_BACKREFED (1<<5)

Definition at line 133 of file regparse.h.

## ◆ NST_MIN_FIXED

#define NST_MIN_FIXED (1<<0)

Definition at line 128 of file regparse.h.

## ◆ NST_NAME_REF

#define NST_NAME_REF (1<<11)

Definition at line 139 of file regparse.h.

## ◆ NST_NAMED_GROUP

#define NST_NAMED_GROUP (1<<10)

Definition at line 138 of file regparse.h.

## ◆ NST_NEST_LEVEL

#define NST_NEST_LEVEL (1<<13)

Definition at line 141 of file regparse.h.

## ◆ NST_RECURSION

#define NST_RECURSION (1<<7)

Definition at line 135 of file regparse.h.

## ◆ NST_STOP_BT_SIMPLE_REPEAT

#define NST_STOP_BT_SIMPLE_REPEAT (1<<6)

Definition at line 134 of file regparse.h.

## ◆ NSTR

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

Definition at line 76 of file regparse.h.

## ◆ NSTR_AMBIG

#define NSTR_AMBIG (1<<1)

Definition at line 105 of file regparse.h.

## ◆ NSTR_DONT_GET_OPT_INFO

#define NSTR_DONT_GET_OPT_INFO (1<<2)

Definition at line 106 of file regparse.h.

## ◆ NSTR_RAW

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

Definition at line 104 of file regparse.h.

## ◆ NSTRING_CLEAR_RAW

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

Definition at line 110 of file regparse.h.

## ◆ NSTRING_IS_AMBIG

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

Definition at line 115 of file regparse.h.

## ◆ NSTRING_IS_DONT_GET_OPT_INFO

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

Definition at line 116 of file regparse.h.

## ◆ NSTRING_IS_RAW

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

Definition at line 114 of file regparse.h.

## ◆ NSTRING_LEN

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

Definition at line 108 of file regparse.h.

## ◆ NSTRING_SET_AMBIG

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

Definition at line 111 of file regparse.h.

## ◆ NSTRING_SET_DONT_GET_OPT_INFO

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

Definition at line 112 of file regparse.h.

## ◆ NSTRING_SET_RAW

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

Definition at line 109 of file regparse.h.

## ◆ NT_ALT

#define NT_ALT 9

Definition at line 47 of file regparse.h.

## ◆ NT_ANCHOR

#define NT_ANCHOR 7

Definition at line 45 of file regparse.h.

## ◆ NT_BREF

#define NT_BREF 4

Definition at line 42 of file regparse.h.

## ◆ NT_CALL

#define NT_CALL 10

Definition at line 48 of file regparse.h.

## ◆ NT_CANY

#define NT_CANY 3

Definition at line 41 of file regparse.h.

## ◆ NT_CCLASS

#define NT_CCLASS 1

Definition at line 39 of file regparse.h.

## ◆ NT_CTYPE

#define NT_CTYPE 2

Definition at line 40 of file regparse.h.

## ◆ NT_ENCLOSE

#define NT_ENCLOSE 6

Definition at line 44 of file regparse.h.

## ◆ NT_LIST

#define NT_LIST 8

Definition at line 46 of file regparse.h.

## ◆ NT_QTFR

#define NT_QTFR 5

Definition at line 43 of file regparse.h.

## ◆ NT_STR

#define NT_STR 0

Definition at line 38 of file regparse.h.

## ◆ NTYPE

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

Definition at line 69 of file regparse.h.

## ◆ NTYPE2BIT

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

Definition at line 51 of file regparse.h.

## ◆ NULL_NODE

#define NULL_NODE ((Node* )0)

Definition at line 283 of file regparse.h.

## ◆ SCANENV_MEM_NODES

#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:299

Definition at line 286 of file regparse.h.

## ◆ SCANENV_MEMNODES_SIZE

#define SCANENV_MEMNODES_SIZE 8

Definition at line 285 of file regparse.h.

## ◆ SET_CALL_RECURSION

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

Definition at line 160 of file regparse.h.

## ◆ SET_ENCLOSE_STATUS

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

Definition at line 144 of file regparse.h.

## ◆ SET_NTYPE

#define SET_NTYPE | ( |  | node,
|  |  | ntype
| ) |  |

Value:
do { \
int value = ntype; \
memcpy(&((node)->u.base.type), &value, sizeof(int)); \
} while (0)

Definition at line 70 of file regparse.h.

## Typedef Documentation

## ◆ Node

typedef struct _Node Node

## Function Documentation

## ◆ onig_free_shared_cclass_table()

int onig_free_shared_cclass_table | ( | void |  | ) |

## ◆ onig_names_free()

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

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().

## ◆ onig_node_conv_to_str_node()

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

## ◆ onig_node_free()

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().

## ◆ onig_node_list_add()

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

Definition at line 1192 of file regparse.c.

References IS_NOT_NULL, IS_NULL, NCDR, NULL, NULL_NODE, and onig_node_new_list().

## ◆ onig_node_new_alt()

Node * onig_node_new_alt | ( | Node * | left,
|  | Node * | right
| ) |  |

Definition at line 1210 of file regparse.c.

References CHECK_NULL_RETURN, NCAR, NCDR, NT_ALT, and SET_NTYPE.

## ◆ onig_node_new_anchor()

Node * onig_node_new_anchor | ( | int | type | ) |

Definition at line 1222 of file regparse.c.

References CHECK_NULL_RETURN, NANCHOR, NT_ANCHOR, NULL, and SET_NTYPE.

## ◆ onig_node_new_enclose()

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

Definition at line 1347 of file regparse.c.

## ◆ onig_node_new_list()

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

Definition at line 1186 of file regparse.c.

Referenced by onig_node_list_add().

## ◆ onig_node_new_str()

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

Definition at line 1481 of file regparse.c.

## ◆ onig_node_str_cat()

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

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().

## ◆ onig_node_str_clear()

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().

## ◆ onig_node_str_set()

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

Definition at line 1412 of file regparse.c.

References onig_node_str_cat(), and onig_node_str_clear().

## ◆ onig_parse_make_tree()

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().

## ◆ onig_reduce_nested_quantifier()

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

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.

## ◆ onig_renumber_name_table()

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.

## ◆ onig_scan_env_set_error_string()

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

Definition at line 6630 of file regparse.c.

References env.

## ◆ onig_scan_unsigned_number()

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.

## ◆ onig_strcpy()

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

Definition at line 259 of file regparse.c.

References len, UChar, and xmemcpy.

Referenced by onig_node_str_cat().

## ◆ onig_strncmp()

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