Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Functions | Variables
regsyntax.c File Reference
`#include "regint.h"`
Include dependency graph for regsyntax.c:

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 | OnigSyntaxPerl58
const OnigSyntaxType | OnigSyntaxPerl58_NG
const OnigSyntaxType | OnigSyntaxPerl
const OnigSyntaxType | OnigSyntaxPython

## Function Documentation

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

Definition at line 305 of file regsyntax.c.

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

Definition at line 347 of file regsyntax.c.

References OnigSyntaxType::behavior.

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

Definition at line 335 of file regsyntax.c.

References OnigSyntaxType::op.

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

Definition at line 341 of file regsyntax.c.

References OnigSyntaxType::op2.

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

Definition at line 353 of file regsyntax.c.

References OnigSyntaxType::options.

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

Definition at line 295 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 359 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 323 of file regsyntax.c.

References OnigSyntaxType::behavior.

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

Definition at line 311 of file regsyntax.c.

References OnigSyntaxType::op.

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

Definition at line 317 of file regsyntax.c.

References OnigSyntaxType::op2.

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

Definition at line 329 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 33 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 87 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 130 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 108 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 | ONIG_OPTION_ASCII_RANGE |
ONIG_OPTION_WORD_BOUND_ALL_RANGE )
,
{
(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 146 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxPerl

Definition at line 228 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxPerl58

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_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER |
ONIG_SYN_OP2_QMARK_LPAREN_CONDITION)
, 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 171 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxPerl58_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_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER |
ONIG_SYN_OP2_QMARK_LPAREN_CONDITION |
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 197 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 49 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 66 of file regsyntax.c.

const OnigSyntaxType OnigSyntaxPython

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_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_PLUS_POSSESSIVE_REPEAT |
ONIG_SYN_OP2_ESC_V_VTAB |
ONIG_SYN_OP2_ESC_U_HEX4 |
ONIG_SYN_OP2_QMARK_LPAREN_CONDITION |
ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP )
, ( SYN_GNU_REGEX_BV |
ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV )
, ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_ASCII_RANGE )
,
{
(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 264 of file regsyntax.c.