Ruby 2.1.5p273(2014-11-13revision48405)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

regerror.c
Go to the documentation of this file.
1 /**********************************************************************
2 regerror.c - Onigmo (Oniguruma-mod) (regular expression library)
3 **********************************************************************/
4 /*-
5 * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
6 * Copyright (c) 2011 K.Takata <kentkt AT csc DOT jp>
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30
31 #include "regint.h"
32 #include <stdio.h> /* for vsnprintf() */
33
34 #ifdef HAVE_STDARG_PROTOTYPES
35 #include <stdarg.h>
36 #define va_init_list(a,b) va_start(a,b)
37 #else
38 #include <varargs.h>
39 #define va_init_list(a,b) va_start(a)
40 #endif
41
42 extern UChar*
43 onig_error_code_to_format(OnigPosition code)
44 {
45 const char *p;
46
47 if (code >= 0) return (UChar* )0;
48
49 switch (code) {
50 case ONIG_MISMATCH:
51 p = "mismatch"; break;
52 case ONIG_NO_SUPPORT_CONFIG:
53 p = "no support in this configuration"; break;
54 case ONIGERR_MEMORY:
55 p = "failed to allocate memory"; break;
56 case ONIGERR_MATCH_STACK_LIMIT_OVER:
57 p = "match-stack limit over"; break;
58 case ONIGERR_TYPE_BUG:
59 p = "undefined type (bug)"; break;
60 case ONIGERR_PARSER_BUG:
61 p = "internal parser error (bug)"; break;
62 case ONIGERR_STACK_BUG:
63 p = "stack error (bug)"; break;
64 case ONIGERR_UNDEFINED_BYTECODE:
65 p = "undefined bytecode (bug)"; break;
66 case ONIGERR_UNEXPECTED_BYTECODE:
67 p = "unexpected bytecode (bug)"; break;
68 case ONIGERR_DEFAULT_ENCODING_IS_NOT_SET:
69 p = "default multibyte-encoding is not set"; break;
70 case ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR:
71 p = "can't convert to wide-char on specified multibyte-encoding"; break;
72 case ONIGERR_INVALID_ARGUMENT:
73 p = "invalid argument"; break;
74 case ONIGERR_END_PATTERN_AT_LEFT_BRACE:
75 p = "end pattern at left brace"; break;
76 case ONIGERR_END_PATTERN_AT_LEFT_BRACKET:
77 p = "end pattern at left bracket"; break;
78 case ONIGERR_EMPTY_CHAR_CLASS:
79 p = "empty char-class"; break;
80 case ONIGERR_PREMATURE_END_OF_CHAR_CLASS:
81 p = "premature end of char-class"; break;
82 case ONIGERR_END_PATTERN_AT_ESCAPE:
83 p = "end pattern at escape"; break;
84 case ONIGERR_END_PATTERN_AT_META:
85 p = "end pattern at meta"; break;
86 case ONIGERR_END_PATTERN_AT_CONTROL:
87 p = "end pattern at control"; break;
88 case ONIGERR_META_CODE_SYNTAX:
89 p = "invalid meta-code syntax"; break;
90 case ONIGERR_CONTROL_CODE_SYNTAX:
91 p = "invalid control-code syntax"; break;
92 case ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE:
93 p = "char-class value at end of range"; break;
94 case ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE:
95 p = "char-class value at start of range"; break;
96 case ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS:
97 p = "unmatched range specifier in char-class"; break;
98 case ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED:
99 p = "target of repeat operator is not specified"; break;
100 case ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID:
101 p = "target of repeat operator is invalid"; break;
102 case ONIGERR_NESTED_REPEAT_OPERATOR:
103 p = "nested repeat operator"; break;
104 case ONIGERR_UNMATCHED_CLOSE_PARENTHESIS:
105 p = "unmatched close parenthesis"; break;
106 case ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS:
107 p = "end pattern with unmatched parenthesis"; break;
108 case ONIGERR_END_PATTERN_IN_GROUP:
109 p = "end pattern in group"; break;
110 case ONIGERR_UNDEFINED_GROUP_OPTION:
111 p = "undefined group option"; break;
112 case ONIGERR_INVALID_POSIX_BRACKET_TYPE:
113 p = "invalid POSIX bracket type"; break;
114 case ONIGERR_INVALID_LOOK_BEHIND_PATTERN:
115 p = "invalid pattern in look-behind"; break;
116 case ONIGERR_INVALID_REPEAT_RANGE_PATTERN:
117 p = "invalid repeat range {lower,upper}"; break;
118 case ONIGERR_INVALID_CONDITION_PATTERN:
119 p = "invalid conditional pattern"; break;
120 case ONIGERR_TOO_BIG_NUMBER:
121 p = "too big number"; break;
122 case ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE:
123 p = "too big number for repeat range"; break;
124 case ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE:
125 p = "upper is smaller than lower in repeat range"; break;
126 case ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS:
127 p = "empty range in char class"; break;
128 case ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE:
129 p = "mismatch multibyte code length in char-class range"; break;
130 case ONIGERR_TOO_MANY_MULTI_BYTE_RANGES:
131 p = "too many multibyte code ranges are specified"; break;
132 case ONIGERR_TOO_SHORT_MULTI_BYTE_STRING:
133 p = "too short multibyte code string"; break;
134 case ONIGERR_TOO_BIG_BACKREF_NUMBER:
135 p = "too big backref number"; break;
136 case ONIGERR_TOO_MANY_CAPTURE_GROUPS:
137 p = "too many capture groups are specified"; break;
138 case ONIGERR_INVALID_BACKREF:
139 #ifdef USE_NAMED_GROUP
140 p = "invalid backref number/name"; break;
141 #else
142 p = "invalid backref number"; break;
143 #endif
144 case ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED:
145 p = "numbered backref/call is not allowed. (use name)"; break;
146 case ONIGERR_TOO_BIG_WIDE_CHAR_VALUE:
147 p = "too big wide-char value"; break;
148 case ONIGERR_TOO_SHORT_DIGITS:
149 p = "too short digits"; break;
150 case ONIGERR_TOO_LONG_WIDE_CHAR_VALUE:
151 p = "too long wide-char value"; break;
152 case ONIGERR_INVALID_CODE_POINT_VALUE:
153 p = "invalid code point value"; break;
154 case ONIGERR_EMPTY_GROUP_NAME:
155 p = "group name is empty"; break;
156 case ONIGERR_INVALID_GROUP_NAME:
157 p = "invalid group name <%n>"; break;
158 case ONIGERR_INVALID_CHAR_IN_GROUP_NAME:
159 #ifdef USE_NAMED_GROUP
160 p = "invalid char in group name <%n>"; break;
161 #else
162 p = "invalid char in group number <%n>"; break;
163 #endif
164 case ONIGERR_UNDEFINED_NAME_REFERENCE:
165 p = "undefined name <%n> reference"; break;
166 case ONIGERR_UNDEFINED_GROUP_REFERENCE:
167 p = "undefined group <%n> reference"; break;
168 case ONIGERR_MULTIPLEX_DEFINED_NAME:
169 p = "multiplex defined name <%n>"; break;
170 case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL:
171 p = "multiplex definition name <%n> call"; break;
172 case ONIGERR_NEVER_ENDING_RECURSION:
173 p = "never ending recursion"; break;
174 case ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY:
175 p = "group number is too big for capture history"; break;
176 case ONIGERR_INVALID_CHAR_PROPERTY_NAME:
177 p = "invalid character property name {%n}"; break;
178 case ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION:
179 p = "not supported encoding combination"; break;
180 case ONIGERR_INVALID_COMBINATION_OF_OPTIONS:
181 p = "invalid combination of options"; break;
182 case ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT:
183 p = "over thread pass limit count"; break;
184
185 default:
186 p = "undefined error code"; break;
187 }
188
189 return (UChar* )p;
190 }
191
192 static void sprint_byte(char* s, unsigned int v)
193 {
194 sprintf(s, "%02x", (v & 0377));
195 }
196
197 static void sprint_byte_with_x(char* s, unsigned int v)
198 {
199 sprintf(s, "\\x%02x", (v & 0377));
200 }
201
202 static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
203 UChar buf[], int buf_size, int *is_over)
204 {
205 int len;
206 UChar *p;
207 OnigCodePoint code;
208
209 if (ONIGENC_MBC_MINLEN(enc) > 1) {
210 p = s;
211 len = 0;
212 while (p < end) {
213 code = ONIGENC_MBC_TO_CODE(enc, p, end);
214 if (code >= 0x80) {
215 if (code > 0xffff && len + 10 <= buf_size) {
216 sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 24));
217 sprint_byte((char*)(&(buf[len+4])), (unsigned int)(code >> 16));
218 sprint_byte((char*)(&(buf[len+6])), (unsigned int)(code >> 8));
219 sprint_byte((char*)(&(buf[len+8])), (unsigned int)code);
220 len += 10;
221 }
222 else if (len + 6 <= buf_size) {
223 sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 8));
224 sprint_byte((char*)(&(buf[len+4])), (unsigned int)code);
225 len += 6;
226 }
227 else {
228 break;
229 }
230 }
231 else {
232 buf[len++] = (UChar )code;
233 }
234
235 p += enclen(enc, p, end);
236 if (len >= buf_size) break;
237 }
238
239 *is_over = ((p < end) ? 1 : 0);
240 }
241 else {
242 len = (int )MIN((end - s), buf_size);
243 xmemcpy(buf, s, (size_t )len);
244 *is_over = ((buf_size < (end - s)) ? 1 : 0);
245 }
246
247 return len;
248 }
249
250
251 /* for ONIG_MAX_ERROR_MESSAGE_LEN */
252 #define MAX_ERROR_PAR_LEN 30
253
254 extern int
255 #ifdef HAVE_STDARG_PROTOTYPES
256 onig_error_code_to_str(UChar* s, OnigPosition code, ...)
257 #else
258 onig_error_code_to_str(s, code, va_alist)
259 UChar* s;
260 OnigPosition code;
261 va_dcl
262 #endif
263 {
264 UChar *p, *q;
265 OnigErrorInfo* einfo;
266 size_t len;
267 int is_over;
268 UChar parbuf[MAX_ERROR_PAR_LEN];
269 va_list vargs;
270
271 va_init_list(vargs, code);
272
273 switch (code) {
274 case ONIGERR_UNDEFINED_NAME_REFERENCE:
275 case ONIGERR_UNDEFINED_GROUP_REFERENCE:
276 case ONIGERR_MULTIPLEX_DEFINED_NAME:
277 case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL:
278 case ONIGERR_INVALID_GROUP_NAME:
279 case ONIGERR_INVALID_CHAR_IN_GROUP_NAME:
280 case ONIGERR_INVALID_CHAR_PROPERTY_NAME:
281 einfo = va_arg(vargs, OnigErrorInfo*);
282 len = to_ascii(einfo->enc, einfo->par, einfo->par_end,
283 parbuf, MAX_ERROR_PAR_LEN - 3, &is_over);
284 q = onig_error_code_to_format(code);
285 p = s;
286 while (*q != '\0') {
287 if (*q == '%') {
288 q++;
289 if (*q == 'n') { /* '%n': name */
290 xmemcpy(p, parbuf, len);
291 p += len;
292 if (is_over != 0) {
293 xmemcpy(p, "...", 3);
294 p += 3;
295 }
296 q++;
297 }
298 else
299 goto normal_char;
300 }
301 else {
302 normal_char:
303 *p++ = *q++;
304 }
305 }
306 *p = '\0';
307 len = p - s;
308 break;
309
310 default:
311 q = onig_error_code_to_format(code);
312 len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, q);
313 xmemcpy(s, q, len);
314 s[len] = '\0';
315 break;
316 }
317
318 va_end(vargs);
319 return (int )len;
320 }
321
322 void
323 onig_vsnprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
324 UChar* pat, UChar* pat_end, const UChar *fmt, va_list args)
325 {
326 size_t need;
327 int n, len;
328 UChar *p, *s, *bp;
329 UChar bs[6];
330
331 n = xvsnprintf((char* )buf, bufsize, (const char* )fmt, args);
332
333 need = (pat_end - pat) * 4 + 4;
334
335 if (n + need < (size_t )bufsize) {
336 strcat((char* )buf, ": /");
337 s = buf + onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, buf);
338
339 p = pat;
340 while (p < pat_end) {
341 if (*p == '\\') {
342 *s++ = *p++;
343 len = enclen(enc, p, pat_end);
344 while (len-- > 0) *s++ = *p++;
345 }
346 else if (*p == '/') {
347 *s++ = (unsigned char )'\\';
348 *s++ = *p++;
349 }
350 else if (ONIGENC_IS_MBC_HEAD(enc, p, pat_end)) {
351 len = enclen(enc, p, pat_end);
352 if (ONIGENC_MBC_MINLEN(enc) == 1) {
353 while (len-- > 0) *s++ = *p++;
354 }
355 else { /* for UTF16 */
356 int blen;
357
358 while (len-- > 0) {
359 sprint_byte_with_x((char* )bs, (unsigned int )(*p++));
360 blen = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);
361 bp = bs;
362 while (blen-- > 0) *s++ = *bp++;
363 }
364 }
365 }
366 else if (!ONIGENC_IS_CODE_PRINT(enc, *p) &&
367 !ONIGENC_IS_CODE_SPACE(enc, *p)) {
368 sprint_byte_with_x((char* )bs, (unsigned int )(*p++));
369 len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);
370 bp = bs;
371 while (len-- > 0) *s++ = *bp++;
372 }
373 else {
374 *s++ = *p++;
375 }
376 }
377
378 *s++ = '/';
379 *s = '\0';
380 }
381 }
382
383 void
384 #ifdef HAVE_STDARG_PROTOTYPES
385 onig_snprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
386 UChar* pat, UChar* pat_end, const UChar *fmt, ...)
387 #else
388 onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
389 UChar buf[];
390 int bufsize;
391 OnigEncoding enc;
392 UChar* pat;
393 UChar* pat_end;
394 const UChar *fmt;
395 va_dcl
396 #endif
397 {
398 va_list args;
399 va_init_list(args, fmt);
400 onig_vsnprintf_with_pattern(buf, bufsize, enc,
401 pat, pat_end, fmt, args);
402 va_end(args);
403 }
404
ONIGERR_UNDEFINED_GROUP_OPTION
#define ONIGERR_UNDEFINED_GROUP_OPTION
Definition: oniguruma.h:558
ONIGERR_INVALID_CONDITION_PATTERN
#define ONIGERR_INVALID_CONDITION_PATTERN
Definition: oniguruma.h:562
OnigCodePoint
unsigned int OnigCodePoint
Definition: oniguruma.h:112
onig_error_code_to_format
UChar * onig_error_code_to_format(OnigPosition code)
Definition: regerror.c:43
ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL
#define ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL
Definition: oniguruma.h:582
ONIGERR_TOO_BIG_WIDE_CHAR_VALUE
#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE
Definition: oniguruma.h:589
ONIGERR_STACK_BUG
#define ONIGERR_STACK_BUG
Definition: oniguruma.h:531
ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE
#define ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE
Definition: oniguruma.h:568
OnigErrorInfo::par_end
OnigUChar * par_end
Definition: oniguruma.h:635
ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR
#define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR
Definition: oniguruma.h:536
ONIGENC_IS_CODE_PRINT
#define ONIGENC_IS_CODE_PRINT(enc, code)
Definition: oniguruma.h:278
va_init_list
#define va_init_list(a, b)
Definition: regerror.c:39
ONIGERR_END_PATTERN_AT_META
#define ONIGERR_END_PATTERN_AT_META
Definition: oniguruma.h:545
onig_error_code_to_str
int onig_error_code_to_str(UChar *s, OnigPosition code, va_alist)
Definition: regerror.c:258
ONIGERR_INVALID_COMBINATION_OF_OPTIONS
#define ONIGERR_INVALID_COMBINATION_OF_OPTIONS
Definition: oniguruma.h:591
ONIGERR_NEVER_ENDING_RECURSION
#define ONIGERR_NEVER_ENDING_RECURSION
Definition: oniguruma.h:583
ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE
#define ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE
Definition: oniguruma.h:565
ONIG_ENCODING_ASCII
#define ONIG_ENCODING_ASCII
Definition: oniguruma.h:183
ONIGERR_TYPE_BUG
#define ONIGERR_TYPE_BUG
Definition: oniguruma.h:529
ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS
#define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS
Definition: oniguruma.h:556
ONIGERR_INVALID_LOOK_BEHIND_PATTERN
#define ONIGERR_INVALID_LOOK_BEHIND_PATTERN
Definition: oniguruma.h:560
ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION
#define ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION
Definition: oniguruma.h:590
sprint_byte
static void sprint_byte(char *s, unsigned int v)
Definition: regerror.c:192
ONIGERR_INVALID_CHAR_PROPERTY_NAME
#define ONIGERR_INVALID_CHAR_PROPERTY_NAME
Definition: oniguruma.h:585
ONIGERR_TOO_MANY_MULTI_BYTE_RANGES
#define ONIGERR_TOO_MANY_MULTI_BYTE_RANGES
Definition: oniguruma.h:569
ONIGERR_NESTED_REPEAT_OPERATOR
#define ONIGERR_NESTED_REPEAT_OPERATOR
Definition: oniguruma.h:554
ONIGERR_END_PATTERN_AT_LEFT_BRACE
#define ONIGERR_END_PATTERN_AT_LEFT_BRACE
Definition: oniguruma.h:540
ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID
#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID
Definition: oniguruma.h:553
ONIGERR_MULTIPLEX_DEFINED_NAME
#define ONIGERR_MULTIPLEX_DEFINED_NAME
Definition: oniguruma.h:581
xvsnprintf
#define xvsnprintf
Definition: regint.h:190
ONIGERR_TOO_LONG_WIDE_CHAR_VALUE
#define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE
Definition: oniguruma.h:575
ONIGERR_INVALID_BACKREF
#define ONIGERR_INVALID_BACKREF
Definition: oniguruma.h:572
ONIGERR_UNEXPECTED_BYTECODE
#define ONIGERR_UNEXPECTED_BYTECODE
Definition: oniguruma.h:533
ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE
#define ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE
Definition: oniguruma.h:566
onig_snprintf_with_pattern
void onig_snprintf_with_pattern(buf, int bufsize, OnigEncoding enc, UChar *pat, UChar *pat_end, const UChar *fmt, va_alist)
Definition: regerror.c:388
ONIGERR_TOO_SHORT_MULTI_BYTE_STRING
#define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING
Definition: oniguruma.h:570
xmemcpy
#define xmemcpy
Definition: regint.h:182
ONIGENC_IS_MBC_HEAD
#define ONIGENC_IS_MBC_HEAD(enc, p, e)
Definition: oniguruma.h:219
ONIGERR_TOO_MANY_CAPTURE_GROUPS
#define ONIGERR_TOO_MANY_CAPTURE_GROUPS
Definition: oniguruma.h:586
ONIGENC_IS_CODE_SPACE
#define ONIGENC_IS_CODE_SPACE(enc, code)
Definition: oniguruma.h:292
ONIGERR_UNDEFINED_NAME_REFERENCE
#define ONIGERR_UNDEFINED_NAME_REFERENCE
Definition: oniguruma.h:579
to_ascii
static int to_ascii(OnigEncoding enc, UChar *s, UChar *end, UChar buf[], int buf_size, int *is_over)
Definition: regerror.c:202
OnigErrorInfo
Definition: oniguruma.h:632
const
#define const
Definition: strftime.c:102
ONIGERR_END_PATTERN_IN_GROUP
#define ONIGERR_END_PATTERN_IN_GROUP
Definition: oniguruma.h:557
MAX_ERROR_PAR_LEN
#define MAX_ERROR_PAR_LEN
Definition: regerror.c:252
onig_vsnprintf_with_pattern
void onig_vsnprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc, UChar *pat, UChar *pat_end, const UChar *fmt, va_list args)
Definition: regerror.c:323
buf
unsigned char buf[MIME_BUF_SIZE]
Definition: nkf.c:4308
ONIG_NO_SUPPORT_CONFIG
#define ONIG_NO_SUPPORT_CONFIG
Definition: oniguruma.h:525
OnigErrorInfo::enc
OnigEncoding enc
Definition: oniguruma.h:633
ONIGERR_PARSER_BUG
#define ONIGERR_PARSER_BUG
Definition: oniguruma.h:530
onigenc_str_bytelen_null
int onigenc_str_bytelen_null(OnigEncoding enc, const UChar *s)
Definition: regenc.c:163
ONIGENC_MBC_TO_CODE
#define ONIGENC_MBC_TO_CODE(enc, p, end)
Definition: oniguruma.h:266
ONIGENC_MBC_MINLEN
#define ONIGENC_MBC_MINLEN(enc)
Definition: oniguruma.h:264
MIN
#define MIN(a, b)
Definition: regint.h:273
UChar
#define UChar
Definition: oniguruma.h:108
ONIGERR_EMPTY_CHAR_CLASS
#define ONIGERR_EMPTY_CHAR_CLASS
Definition: oniguruma.h:542
ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED
#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED
Definition: oniguruma.h:552
ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED
#define ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED
Definition: oniguruma.h:573
ONIGERR_END_PATTERN_AT_LEFT_BRACKET
#define ONIGERR_END_PATTERN_AT_LEFT_BRACKET
Definition: oniguruma.h:541
ONIGERR_TOO_BIG_BACKREF_NUMBER
#define ONIGERR_TOO_BIG_BACKREF_NUMBER
Definition: oniguruma.h:571
OnigPosition
ptrdiff_t OnigPosition
Definition: oniguruma.h:115
ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS
#define ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS
Definition: oniguruma.h:551
ONIGERR_END_PATTERN_AT_ESCAPE
#define ONIGERR_END_PATTERN_AT_ESCAPE
Definition: oniguruma.h:544
ONIGERR_MEMORY
#define ONIGERR_MEMORY
Definition: oniguruma.h:528
ONIGERR_CONTROL_CODE_SYNTAX
#define ONIGERR_CONTROL_CODE_SYNTAX
Definition: oniguruma.h:548
ONIG_MISMATCH
#define ONIG_MISMATCH
Definition: oniguruma.h:524
ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS
#define ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS
Definition: oniguruma.h:567
ONIGERR_INVALID_POSIX_BRACKET_TYPE
#define ONIGERR_INVALID_POSIX_BRACKET_TYPE
Definition: oniguruma.h:559
ONIGERR_EMPTY_GROUP_NAME
#define ONIGERR_EMPTY_GROUP_NAME
Definition: oniguruma.h:576
ONIGERR_TOO_BIG_NUMBER
#define ONIGERR_TOO_BIG_NUMBER
Definition: oniguruma.h:564
ONIGERR_TOO_SHORT_DIGITS
#define ONIGERR_TOO_SHORT_DIGITS
Definition: oniguruma.h:574
ONIGERR_INVALID_ARGUMENT
#define ONIGERR_INVALID_ARGUMENT
Definition: oniguruma.h:538
ONIGERR_DEFAULT_ENCODING_IS_NOT_SET
#define ONIGERR_DEFAULT_ENCODING_IS_NOT_SET
Definition: oniguruma.h:535
ONIGERR_UNDEFINED_BYTECODE
#define ONIGERR_UNDEFINED_BYTECODE
Definition: oniguruma.h:532
ONIGERR_MATCH_STACK_LIMIT_OVER
#define ONIGERR_MATCH_STACK_LIMIT_OVER
Definition: oniguruma.h:534
ONIGERR_END_PATTERN_AT_CONTROL
#define ONIGERR_END_PATTERN_AT_CONTROL
Definition: oniguruma.h:546
ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE
#define ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE
Definition: oniguruma.h:550
regint.h
ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE
#define ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE
Definition: oniguruma.h:549
ONIGERR_UNMATCHED_CLOSE_PARENTHESIS
#define ONIGERR_UNMATCHED_CLOSE_PARENTHESIS
Definition: oniguruma.h:555
ONIGERR_PREMATURE_END_OF_CHAR_CLASS
#define ONIGERR_PREMATURE_END_OF_CHAR_CLASS
Definition: oniguruma.h:543
ONIGERR_INVALID_CODE_POINT_VALUE
#define ONIGERR_INVALID_CODE_POINT_VALUE
Definition: oniguruma.h:587
ONIGERR_INVALID_REPEAT_RANGE_PATTERN
#define ONIGERR_INVALID_REPEAT_RANGE_PATTERN
Definition: oniguruma.h:561
sprint_byte_with_x
static void sprint_byte_with_x(char *s, unsigned int v)
Definition: regerror.c:197
bp
#define bp()
Definition: vm_debug.h:25
ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY
#define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY
Definition: oniguruma.h:584
ONIGERR_INVALID_GROUP_NAME
#define ONIGERR_INVALID_GROUP_NAME
Definition: oniguruma.h:577
ONIGERR_UNDEFINED_GROUP_REFERENCE
#define ONIGERR_UNDEFINED_GROUP_REFERENCE
Definition: oniguruma.h:580
OnigErrorInfo::par
OnigUChar * par
Definition: oniguruma.h:634
enclen
#define enclen(enc, p, e)
Definition: regenc.h:76
ONIGERR_META_CODE_SYNTAX
#define ONIGERR_META_CODE_SYNTAX
Definition: oniguruma.h:547
ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT
#define ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT
Definition: oniguruma.h:594
OnigEncodingTypeST
Definition: oniguruma.h:158
ONIGERR_INVALID_CHAR_IN_GROUP_NAME
#define ONIGERR_INVALID_CHAR_IN_GROUP_NAME
Definition: oniguruma.h:578