35 , ONIG_SYN_OP2_INEFFECTIVE_ESCAPE
41 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
42 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
43 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
44 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
45 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
50 ( SYN_POSIX_COMMON_OP | ONIG_SYN_OP_ESC_LPAREN_SUBEXP |
51 ONIG_SYN_OP_ESC_BRACE_INTERVAL )
54 , ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE )
58 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
59 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
60 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
61 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
62 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
67 ( SYN_POSIX_COMMON_OP | ONIG_SYN_OP_LPAREN_SUBEXP |
68 ONIG_SYN_OP_BRACE_INTERVAL |
69 ONIG_SYN_OP_PLUS_ONE_INF | ONIG_SYN_OP_QMARK_ZERO_ONE | ONIG_SYN_OP_VBAR_ALT )
71 , ( ONIG_SYN_CONTEXT_INDEP_ANCHORS |
72 ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS |
73 ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP |
74 ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC )
75 , ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE )
79 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
80 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
81 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
82 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
83 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
88 ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC |
89 ONIG_SYN_OP_ESC_BRACE_INTERVAL |
90 ONIG_SYN_OP_ESC_LPAREN_SUBEXP | ONIG_SYN_OP_ESC_VBAR_ALT |
91 ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_PLUS_ONE_INF |
92 ONIG_SYN_OP_QMARK_ZERO_ONE | ONIG_SYN_OP_DECIMAL_BACKREF |
93 ONIG_SYN_OP_LINE_ANCHOR | ONIG_SYN_OP_ESC_CONTROL_CHARS )
94 , ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR
95 , ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC
100 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
101 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
102 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
103 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
104 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
109 ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | ONIG_SYN_OP_POSIX_BRACKET |
110 ONIG_SYN_OP_ESC_BRACE_INTERVAL | ONIG_SYN_OP_ESC_LPAREN_SUBEXP |
111 ONIG_SYN_OP_ESC_VBAR_ALT |
112 ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_ESC_PLUS_ONE_INF |
113 ONIG_SYN_OP_ESC_QMARK_ZERO_ONE | ONIG_SYN_OP_LINE_ANCHOR |
114 ONIG_SYN_OP_ESC_W_WORD | ONIG_SYN_OP_ESC_B_WORD_BOUND |
115 ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | ONIG_SYN_OP_DECIMAL_BACKREF )
117 , ( ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC | ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC )
122 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
123 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
124 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
125 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
126 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
138 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
139 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
140 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
141 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
142 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
147 (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
148 ONIG_SYN_OP_ESC_CONTROL_CHARS | ONIG_SYN_OP_ESC_C_CONTROL |
149 ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 )
150 & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
151 , ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE | ONIG_SYN_OP2_QMARK_GROUP_EFFECT |
152 ONIG_SYN_OP2_OPTION_PERL | ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT |
153 ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL | ONIG_SYN_OP2_CCLASS_SET_OP |
154 ONIG_SYN_OP2_ESC_V_VTAB | ONIG_SYN_OP2_ESC_U_HEX4 |
155 ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY )
156 , ( SYN_GNU_REGEX_BV | ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND )
157 , ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_ASCII_RANGE |
158 ONIG_OPTION_WORD_BOUND_ALL_RANGE )
162 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
163 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
164 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
165 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
166 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
172 (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
173 ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 |
174 ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS |
175 ONIG_SYN_OP_ESC_C_CONTROL )
176 & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
177 , ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE |
178 ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL |
179 ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY |
180 ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT |
181 ONIG_SYN_OP2_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER |
182 ONIG_SYN_OP2_QMARK_LPAREN_CONDITION)
184 , ONIG_OPTION_SINGLELINE
188 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
189 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
190 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
191 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
192 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
198 (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
199 ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 |
200 ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS |
201 ONIG_SYN_OP_ESC_C_CONTROL )
202 & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
203 , ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE |
204 ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL |
205 ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY |
206 ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT |
207 ONIG_SYN_OP2_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER |
208 ONIG_SYN_OP2_QMARK_LPAREN_CONDITION |
209 ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP |
210 ONIG_SYN_OP2_ESC_K_NAMED_BACKREF |
211 ONIG_SYN_OP2_ESC_G_SUBEXP_CALL )
212 , ( SYN_GNU_REGEX_BV |
213 ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP |
214 ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME )
215 , ONIG_OPTION_SINGLELINE
219 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
220 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
221 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
222 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
223 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
229 (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
230 ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 |
231 ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS |
232 ONIG_SYN_OP_ESC_O_BRACE_OCTAL | ONIG_SYN_OP_ESC_C_CONTROL )
233 & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
234 , ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE |
235 ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL |
236 ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY |
237 ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT |
238 ONIG_SYN_OP2_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER |
239 ONIG_SYN_OP2_QMARK_LPAREN_CONDITION |
240 ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT |
241 ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL |
242 ONIG_SYN_OP2_ESC_CAPITAL_R_LINEBREAK |
243 ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP |
244 ONIG_SYN_OP2_QMARK_SUBEXP_CALL |
245 ONIG_SYN_OP2_ESC_G_BRACE_BACKREF |
246 ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP |
247 ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP |
248 ONIG_SYN_OP2_ESC_K_NAMED_BACKREF )
249 , ( SYN_GNU_REGEX_BV |
250 ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME |
251 ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME_CALL |
252 ONIG_SYN_USE_LEFT_MOST_NAMED_GROUP )
253 , ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_CAPTURE_GROUP )
257 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
258 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
259 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
260 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
261 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
266 (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
267 ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 |
268 ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS |
269 ONIG_SYN_OP_ESC_C_CONTROL )
270 & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
271 , ( ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL |
272 ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY |
273 ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT |
274 ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT |
275 ONIG_SYN_OP2_ESC_V_VTAB |
276 ONIG_SYN_OP2_ESC_U_HEX4 |
277 ONIG_SYN_OP2_QMARK_LPAREN_CONDITION |
278 ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP )
279 , ( SYN_GNU_REGEX_BV |
280 ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV )
281 , ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_ASCII_RANGE )
285 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
286 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
287 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
288 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
289 , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR
299 syntax = ONIG_SYNTAX_RUBY;
301 OnigDefaultSyntax = syntax;
324onig_set_syntax_behavior(
OnigSyntaxType* syntax,
unsigned int behavior)
326 syntax->behavior = behavior;
330onig_set_syntax_options(
OnigSyntaxType* syntax, OnigOptionType options)
332 syntax->options = options;
350 return syntax->behavior;
356 return syntax->options;
359#ifdef USE_VARIABLE_META_CHARS
361 unsigned int what, OnigCodePoint code)
364 case ONIG_META_CHAR_ESCAPE:
365 enc->meta_char_table.esc = code;
367 case ONIG_META_CHAR_ANYCHAR:
368 enc->meta_char_table.anychar = code;
370 case ONIG_META_CHAR_ANYTIME:
371 enc->meta_char_table.anytime = code;
373 case ONIG_META_CHAR_ZERO_OR_ONE_TIME:
374 enc->meta_char_table.zero_or_one_time = code;
376 case ONIG_META_CHAR_ONE_OR_MORE_TIME:
377 enc->meta_char_table.one_or_more_time = code;
379 case ONIG_META_CHAR_ANYCHAR_ANYTIME:
380 enc->meta_char_table.anychar_anytime = code;
383 return ONIGERR_INVALID_ARGUMENT;