regsyntax.c File Reference
`#include "regint.h"`

Go to the source code of this file.

## Functions

int | onig_set_default_syntax (const OnigSyntaxType *syntax)
void | onig_copy_syntax (OnigSyntaxType *to, const OnigSyntaxType *from)
void | onig_set_syntax_op (OnigSyntaxType *syntax, unsigned int op)
void | onig_set_syntax_op2 (OnigSyntaxType *syntax, unsigned int op2)
void | onig_set_syntax_behavior (OnigSyntaxType *syntax, unsigned int behavior)
void | onig_set_syntax_options (OnigSyntaxType *syntax, OnigOptionType options)
unsigned int | onig_get_syntax_op (OnigSyntaxType *syntax)
unsigned int | onig_get_syntax_op2 (OnigSyntaxType *syntax)
unsigned int | onig_get_syntax_behavior (OnigSyntaxType *syntax)
OnigOptionType | onig_get_syntax_options (OnigSyntaxType *syntax)
int | onig_set_meta_char (OnigSyntaxType *enc, unsigned int what, OnigCodePoint code)

## Variables

const OnigSyntaxType | OnigSyntaxASIS
const OnigSyntaxType | OnigSyntaxPosixBasic
const OnigSyntaxType | OnigSyntaxPosixExtended
const OnigSyntaxType | OnigSyntaxEmacs
const OnigSyntaxType | OnigSyntaxGrep
const OnigSyntaxType | OnigSyntaxGnuRegex
const OnigSyntaxType | OnigSyntaxJava
const OnigSyntaxType | OnigSyntaxPerl
const OnigSyntaxType | OnigSyntaxPerl_NG

## Function Documentation

void onig_copy_syntax | ( | OnigSyntaxType * | to,
|  | const OnigSyntaxType * | from
| ) |  |

Definition at line 233 of file regsyntax.c.

unsigned int onig_get_syntax_behavior | ( | OnigSyntaxType * | syntax | ) |

Definition at line 275 of file regsyntax.c.

References OnigSyntaxType::behavior.

unsigned int onig_get_syntax_op | ( | OnigSyntaxType * | syntax | ) |

Definition at line 263 of file regsyntax.c.

References OnigSyntaxType::op.

unsigned int onig_get_syntax_op2 | ( | OnigSyntaxType * | syntax | ) |

Definition at line 269 of file regsyntax.c.

References OnigSyntaxType::op2.

OnigOptionType onig_get_syntax_options | ( | OnigSyntaxType * | syntax | ) |

Definition at line 281 of file regsyntax.c.

References OnigSyntaxType::options.

int onig_set_default_syntax | ( | const OnigSyntaxType * | syntax | ) |

Definition at line 223 of file regsyntax.c.

References IS_NULL, ONIG_SYNTAX_RUBY, and OnigDefaultSyntax.

int onig_set_meta_char | ( | OnigSyntaxType * | enc,
|  | unsigned int | what,
|  | OnigCodePoint | code
| ) |  |

Definition at line 287 of file regsyntax.c.

References OnigMetaCharTableType::anychar, OnigMetaCharTableType::anychar_anytime, OnigMetaCharTableType::anytime, OnigMetaCharTableType::esc, OnigSyntaxType::meta_char_table, OnigMetaCharTableType::one_or_more_time, ONIG_META_CHAR_ANYCHAR, ONIG_META_CHAR_ANYCHAR_ANYTIME, ONIG_META_CHAR_ANYTIME, ONIG_META_CHAR_ESCAPE, ONIG_META_CHAR_ONE_OR_MORE_TIME, ONIG_META_CHAR_ZERO_OR_ONE_TIME, ONIGERR_INVALID_ARGUMENT, and OnigMetaCharTableType::zero_or_one_time.

void onig_set_syntax_behavior | ( | OnigSyntaxType * | syntax,
|  | unsigned int | behavior
| ) |  |

Definition at line 251 of file regsyntax.c.

References OnigSyntaxType::behavior.

void onig_set_syntax_op | ( | OnigSyntaxType * | syntax,
|  | unsigned int | op
| ) |  |

Definition at line 239 of file regsyntax.c.

References OnigSyntaxType::op.

void onig_set_syntax_op2 | ( | OnigSyntaxType * | syntax,
|  | unsigned int | op2
| ) |  |

Definition at line 245 of file regsyntax.c.

References OnigSyntaxType::op2.

void onig_set_syntax_options | ( | OnigSyntaxType * | syntax,
|  | OnigOptionType | options
| ) |  |

Definition at line 257 of file regsyntax.c.

References OnigSyntaxType::options, and options().

## Variable Documentation

const OnigSyntaxType OnigSyntaxASIS

Initial value:
= {
0
, ONIG_SYN_OP2_INEFFECTIVE_ESCAPE
, 0
, ONIG_OPTION_NONE
,
{
(OnigCodePoint )'\\'
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
}
}

Definition at line 32 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxEmacs

Initial value:
= {
( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC |
ONIG_SYN_OP_ESC_BRACE_INTERVAL |
ONIG_SYN_OP_ESC_LPAREN_SUBEXP | ONIG_SYN_OP_ESC_VBAR_ALT |
ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_PLUS_ONE_INF |
ONIG_SYN_OP_QMARK_ZERO_ONE | ONIG_SYN_OP_DECIMAL_BACKREF |
ONIG_SYN_OP_LINE_ANCHOR | ONIG_SYN_OP_ESC_CONTROL_CHARS )
, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR
, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC
, ONIG_OPTION_NONE
,
{
(OnigCodePoint )'\\'
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
}
}

Definition at line 86 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxGnuRegex

Initial value:
= {
SYN_GNU_REGEX_OP
, 0
, SYN_GNU_REGEX_BV
, ONIG_OPTION_NONE
,
{
(OnigCodePoint )'\\'
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
}
}

Definition at line 129 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxGrep

Initial value:
= {
( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | ONIG_SYN_OP_POSIX_BRACKET |
ONIG_SYN_OP_ESC_BRACE_INTERVAL | ONIG_SYN_OP_ESC_LPAREN_SUBEXP |
ONIG_SYN_OP_ESC_VBAR_ALT |
ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_ESC_PLUS_ONE_INF |
ONIG_SYN_OP_ESC_QMARK_ZERO_ONE | ONIG_SYN_OP_LINE_ANCHOR |
ONIG_SYN_OP_ESC_W_WORD | ONIG_SYN_OP_ESC_B_WORD_BOUND |
ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | ONIG_SYN_OP_DECIMAL_BACKREF )
, 0
, ( ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC | ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC )
, ONIG_OPTION_NONE
,
{
(OnigCodePoint )'\\'
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
}
}

Definition at line 107 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxJava

Initial value:
= {
(( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
ONIG_SYN_OP_ESC_CONTROL_CHARS | ONIG_SYN_OP_ESC_C_CONTROL |
ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 )
& ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
, ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE | ONIG_SYN_OP2_QMARK_GROUP_EFFECT |
ONIG_SYN_OP2_OPTION_PERL | ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT |
ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL | ONIG_SYN_OP2_CCLASS_SET_OP |
ONIG_SYN_OP2_ESC_V_VTAB | ONIG_SYN_OP2_ESC_U_HEX4 |
ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY )
, ( SYN_GNU_REGEX_BV | ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND )
, ONIG_OPTION_SINGLELINE
,
{
(OnigCodePoint )'\\'
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
}
}

Definition at line 145 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxPerl

Initial value:
= {
(( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 |
ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS |
ONIG_SYN_OP_ESC_C_CONTROL )
& ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
, ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE |
ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL |
ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY |
ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT )
, SYN_GNU_REGEX_BV
, ONIG_OPTION_SINGLELINE
,
{
(OnigCodePoint )'\\'
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
}
}

Definition at line 168 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxPerl_NG

Initial value:
= {
(( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 |
ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS |
ONIG_SYN_OP_ESC_C_CONTROL )
& ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
, ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE |
ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL |
ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY |
ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT |
ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP |
ONIG_SYN_OP2_ESC_K_NAMED_BACKREF |
ONIG_SYN_OP2_ESC_G_SUBEXP_CALL )
, ( SYN_GNU_REGEX_BV |
ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP |
ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME )
, ONIG_OPTION_SINGLELINE
,
{
(OnigCodePoint )'\\'
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
}
}

Definition at line 192 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxPosixBasic

Initial value:
= {
( SYN_POSIX_COMMON_OP | ONIG_SYN_OP_ESC_LPAREN_SUBEXP |
ONIG_SYN_OP_ESC_BRACE_INTERVAL )
, 0
, 0
, ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE )
,
{
(OnigCodePoint )'\\'
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
}
}

Definition at line 48 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxPosixExtended

Initial value:
= {
( SYN_POSIX_COMMON_OP | ONIG_SYN_OP_LPAREN_SUBEXP |
ONIG_SYN_OP_BRACE_INTERVAL |
ONIG_SYN_OP_PLUS_ONE_INF | ONIG_SYN_OP_QMARK_ZERO_ONE | ONIG_SYN_OP_VBAR_ALT )
, 0
, ( ONIG_SYN_CONTEXT_INDEP_ANCHORS |
ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS |
ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP |
ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC )
, ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE )
,
{
(OnigCodePoint )'\\'
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
, (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
}
}

Definition at line 65 of file regsyntax.c.