• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *
3  * Copyright (c) 2004
4  * John Maddock
5  *
6  * Use, modification and distribution are subject to the
7  * Boost Software License, Version 1.0. (See accompanying file
8  * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9  *
10  */
11 
12  /*
13   *   LOCATION:    see http://www.boost.org for most recent version.
14   *   FILE         regex_traits_defaults.cpp
15   *   VERSION      see <boost/version.hpp>
16   *   DESCRIPTION: Declares API's for access to regex_traits default properties.
17   */
18 
19 #define BOOST_REGEX_SOURCE
20 #include <boost/regex/regex_traits.hpp>
21 
22 #include <cctype>
23 #ifndef BOOST_NO_WREGEX
24 #include <cwctype>
25 #endif
26 
27 #if defined(BOOST_NO_STDC_NAMESPACE)
28 namespace std{
29    using ::tolower;
30    using ::toupper;
31 #ifndef BOOST_NO_WREGEX
32    using ::towlower;
33    using ::towupper;
34 #endif
35 }
36 #endif
37 
38 
39 namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
40 
get_default_syntax(regex_constants::syntax_type n)41 BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_syntax(regex_constants::syntax_type n)
42 {
43    // if the user hasn't supplied a message catalog, then this supplies
44    // default "messages" for us to load in the range 1-100.
45    const char* messages[] = {
46          "",
47          "(",
48          ")",
49          "$",
50          "^",
51          ".",
52          "*",
53          "+",
54          "?",
55          "[",
56          "]",
57          "|",
58          "\\",
59          "#",
60          "-",
61          "{",
62          "}",
63          "0123456789",
64          "b",
65          "B",
66          "<",
67          ">",
68          "",
69          "",
70          "A`",
71          "z'",
72          "\n",
73          ",",
74          "a",
75          "f",
76          "n",
77          "r",
78          "t",
79          "v",
80          "x",
81          "c",
82          ":",
83          "=",
84          "e",
85          "",
86          "",
87          "",
88          "",
89          "",
90          "",
91          "",
92          "",
93          "E",
94          "Q",
95          "X",
96          "C",
97          "Z",
98          "G",
99          "!",
100          "p",
101          "P",
102          "N",
103          "gk",
104          "K",
105          "R",
106    };
107 
108    return ((n >= (sizeof(messages) / sizeof(messages[1]))) ? "" : messages[n]);
109 }
110 
get_default_error_string(regex_constants::error_type n)111 BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::error_type n)
112 {
113    static const char* const s_default_error_messages[] = {
114       "Success",                                                            /* REG_NOERROR 0 error_ok */
115       "No match",                                                           /* REG_NOMATCH 1 error_no_match */
116       "Invalid regular expression.",                                        /* REG_BADPAT 2 error_bad_pattern */
117       "Invalid collation character.",                                       /* REG_ECOLLATE 3 error_collate */
118       "Invalid character class name, collating name, or character range.",  /* REG_ECTYPE 4 error_ctype */
119       "Invalid or unterminated escape sequence.",                           /* REG_EESCAPE 5 error_escape */
120       "Invalid back reference: specified capturing group does not exist.",  /* REG_ESUBREG 6 error_backref */
121       "Unmatched [ or [^ in character class declaration.",                  /* REG_EBRACK 7 error_brack */
122       "Unmatched marking parenthesis ( or \\(.",                            /* REG_EPAREN 8 error_paren */
123       "Unmatched quantified repeat operator { or \\{.",                     /* REG_EBRACE 9 error_brace */
124       "Invalid content of repeat range.",                                   /* REG_BADBR 10 error_badbrace */
125       "Invalid range end in character class",                               /* REG_ERANGE 11 error_range */
126       "Out of memory.",                                                     /* REG_ESPACE 12 error_space NOT USED */
127       "Invalid preceding regular expression prior to repetition operator.", /* REG_BADRPT 13 error_badrepeat */
128       "Premature end of regular expression",                                /* REG_EEND 14 error_end NOT USED */
129       "Regular expression is too large.",                                   /* REG_ESIZE 15 error_size NOT USED */
130       "Unmatched ) or \\)",                                                 /* REG_ERPAREN 16 error_right_paren NOT USED */
131       "Empty regular expression.",                                          /* REG_EMPTY 17 error_empty */
132       "The complexity of matching the regular expression exceeded predefined bounds.  "
133       "Try refactoring the regular expression to make each choice made by the state machine unambiguous.  "
134       "This exception is thrown to prevent \"eternal\" matches that take an "
135       "indefinite period time to locate.",                                  /* REG_ECOMPLEXITY 18 error_complexity */
136       "Ran out of stack space trying to match the regular expression.",     /* REG_ESTACK 19 error_stack */
137       "Invalid or unterminated Perl (?...) sequence.",                      /* REG_E_PERL 20 error_perl */
138       "Unknown error.",                                                     /* REG_E_UNKNOWN 21 error_unknown */
139    };
140 
141    return (n > ::boost::regex_constants::error_unknown) ? s_default_error_messages[ ::boost::regex_constants::error_unknown] : s_default_error_messages[n];
142 }
143 
is_combining_implementation(boost::uint_least16_t c)144 BOOST_REGEX_DECL bool BOOST_REGEX_CALL is_combining_implementation(boost::uint_least16_t c)
145 {
146    const boost::uint_least16_t combining_ranges[] = { 0x0300, 0x0361,
147                            0x0483, 0x0486,
148                            0x0903, 0x0903,
149                            0x093E, 0x0940,
150                            0x0949, 0x094C,
151                            0x0982, 0x0983,
152                            0x09BE, 0x09C0,
153                            0x09C7, 0x09CC,
154                            0x09D7, 0x09D7,
155                            0x0A3E, 0x0A40,
156                            0x0A83, 0x0A83,
157                            0x0ABE, 0x0AC0,
158                            0x0AC9, 0x0ACC,
159                            0x0B02, 0x0B03,
160                            0x0B3E, 0x0B3E,
161                            0x0B40, 0x0B40,
162                            0x0B47, 0x0B4C,
163                            0x0B57, 0x0B57,
164                            0x0B83, 0x0B83,
165                            0x0BBE, 0x0BBF,
166                            0x0BC1, 0x0BCC,
167                            0x0BD7, 0x0BD7,
168                            0x0C01, 0x0C03,
169                            0x0C41, 0x0C44,
170                            0x0C82, 0x0C83,
171                            0x0CBE, 0x0CBE,
172                            0x0CC0, 0x0CC4,
173                            0x0CC7, 0x0CCB,
174                            0x0CD5, 0x0CD6,
175                            0x0D02, 0x0D03,
176                            0x0D3E, 0x0D40,
177                            0x0D46, 0x0D4C,
178                            0x0D57, 0x0D57,
179                            0x0F7F, 0x0F7F,
180                            0x20D0, 0x20E1,
181                            0x3099, 0x309A,
182                            0xFE20, 0xFE23,
183                            0xffff, 0xffff, };
184 
185       const boost::uint_least16_t* p = combining_ranges + 1;
186    while(*p < c) p += 2;
187    --p;
188    if((c >= *p) && (c <= *(p+1)))
189          return true;
190    return false;
191 }
192 
193 //
194 // these are the POSIX collating names:
195 //
196 static const char* def_coll_names[] = {
197 "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "alert", "backspace", "tab", "newline",
198 "vertical-tab", "form-feed", "carriage-return", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK",
199 "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "IS4", "IS3", "IS2", "IS1", "space", "exclamation-mark",
200 "quotation-mark", "number-sign", "dollar-sign", "percent-sign", "ampersand", "apostrophe",
201 "left-parenthesis", "right-parenthesis", "asterisk", "plus-sign", "comma", "hyphen",
202 "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
203 "colon", "semicolon", "less-than-sign", "equals-sign", "greater-than-sign",
204 "question-mark", "commercial-at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P",
205 "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "left-square-bracket", "backslash",
206 "right-square-bracket", "circumflex", "underscore", "grave-accent", "a", "b", "c", "d", "e", "f",
207 "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "left-curly-bracket",
208 "vertical-line", "right-curly-bracket", "tilde", "DEL", "",
209 };
210 
211 // these multi-character collating elements
212 // should keep most Western-European locales
213 // happy - we should really localise these a
214 // little more - but this will have to do for
215 // now:
216 
217 static const char* def_multi_coll[] = {
218    "ae",
219    "Ae",
220    "AE",
221    "ch",
222    "Ch",
223    "CH",
224    "ll",
225    "Ll",
226    "LL",
227    "ss",
228    "Ss",
229    "SS",
230    "nj",
231    "Nj",
232    "NJ",
233    "dz",
234    "Dz",
235    "DZ",
236    "lj",
237    "Lj",
238    "LJ",
239    "",
240 };
241 
242 
243 
lookup_default_collate_name(const std::string & name)244 BOOST_REGEX_DECL std::string BOOST_REGEX_CALL lookup_default_collate_name(const std::string& name)
245 {
246    unsigned int i = 0;
247    while(*def_coll_names[i])
248    {
249       if(def_coll_names[i] == name)
250       {
251          return std::string(1, char(i));
252       }
253       ++i;
254    }
255    i = 0;
256    while(*def_multi_coll[i])
257    {
258       if(def_multi_coll[i] == name)
259       {
260          return def_multi_coll[i];
261       }
262       ++i;
263    }
264    return std::string();
265 }
266 
do_global_lower(char c)267 BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_lower(char c)
268 {
269    return static_cast<char>((std::tolower)((unsigned char)c));
270 }
271 
do_global_upper(char c)272 BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_upper(char c)
273 {
274    return static_cast<char>((std::toupper)((unsigned char)c));
275 }
276 #ifndef BOOST_NO_WREGEX
do_global_lower(wchar_t c)277 BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_lower(wchar_t c)
278 {
279    return (std::towlower)(c);
280 }
281 
do_global_upper(wchar_t c)282 BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_upper(wchar_t c)
283 {
284    return (std::towupper)(c);
285 }
286 #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
do_global_lower(unsigned short c)287 BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_lower(unsigned short c)
288 {
289    return (std::towlower)(c);
290 }
291 
do_global_upper(unsigned short c)292 BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_upper(unsigned short c)
293 {
294    return (std::towupper)(c);
295 }
296 #endif
297 
298 #endif
299 
get_default_escape_syntax_type(char c)300 BOOST_REGEX_DECL regex_constants::escape_syntax_type BOOST_REGEX_CALL get_default_escape_syntax_type(char c)
301 {
302    //
303    // char_syntax determines how the compiler treats a given character
304    // in a regular expression.
305    //
306    static regex_constants::escape_syntax_type char_syntax[] = {
307       regex_constants::escape_type_identity,        /**/
308       regex_constants::escape_type_identity,        /**/
309       regex_constants::escape_type_identity,        /**/
310       regex_constants::escape_type_identity,        /**/
311       regex_constants::escape_type_identity,        /**/
312       regex_constants::escape_type_identity,        /**/
313       regex_constants::escape_type_identity,        /**/
314       regex_constants::escape_type_identity,        /**/
315       regex_constants::escape_type_identity,        /**/
316       regex_constants::escape_type_identity,        /**/
317       regex_constants::escape_type_identity,     /**/
318       regex_constants::escape_type_identity,        /**/
319       regex_constants::escape_type_identity,        /**/
320       regex_constants::escape_type_identity,        /**/
321       regex_constants::escape_type_identity,        /**/
322       regex_constants::escape_type_identity,        /**/
323       regex_constants::escape_type_identity,        /**/
324       regex_constants::escape_type_identity,        /**/
325       regex_constants::escape_type_identity,        /**/
326       regex_constants::escape_type_identity,        /**/
327       regex_constants::escape_type_identity,        /**/
328       regex_constants::escape_type_identity,        /**/
329       regex_constants::escape_type_identity,        /**/
330       regex_constants::escape_type_identity,        /**/
331       regex_constants::escape_type_identity,        /**/
332       regex_constants::escape_type_identity,        /**/
333       regex_constants::escape_type_identity,        /**/
334       regex_constants::escape_type_identity,        /**/
335       regex_constants::escape_type_identity,        /**/
336       regex_constants::escape_type_identity,        /**/
337       regex_constants::escape_type_identity,        /**/
338       regex_constants::escape_type_identity,        /**/
339       regex_constants::escape_type_identity,        /* */    // 32
340       regex_constants::escape_type_identity,        /*!*/
341       regex_constants::escape_type_identity,        /*"*/
342       regex_constants::escape_type_identity,        /*#*/
343       regex_constants::escape_type_identity,        /*$*/
344       regex_constants::escape_type_identity,        /*%*/
345       regex_constants::escape_type_identity,        /*&*/
346       regex_constants::escape_type_end_buffer,        /*'*/
347       regex_constants::syntax_open_mark,        /*(*/
348       regex_constants::syntax_close_mark,        /*)*/
349       regex_constants::escape_type_identity,        /***/
350       regex_constants::syntax_plus,                 /*+*/
351       regex_constants::escape_type_identity,        /*,*/
352       regex_constants::escape_type_identity,        /*-*/
353       regex_constants::escape_type_identity,        /*.*/
354       regex_constants::escape_type_identity,        /*/*/
355       regex_constants::escape_type_decimal,        /*0*/
356       regex_constants::escape_type_backref,        /*1*/
357       regex_constants::escape_type_backref,        /*2*/
358       regex_constants::escape_type_backref,        /*3*/
359       regex_constants::escape_type_backref,        /*4*/
360       regex_constants::escape_type_backref,        /*5*/
361       regex_constants::escape_type_backref,        /*6*/
362       regex_constants::escape_type_backref,        /*7*/
363       regex_constants::escape_type_backref,        /*8*/
364       regex_constants::escape_type_backref,        /*9*/
365       regex_constants::escape_type_identity,        /*:*/
366       regex_constants::escape_type_identity,        /*;*/
367       regex_constants::escape_type_left_word,        /*<*/
368       regex_constants::escape_type_identity,        /*=*/
369       regex_constants::escape_type_right_word,        /*>*/
370       regex_constants::syntax_question,              /*?*/
371       regex_constants::escape_type_identity,         /*@*/
372       regex_constants::escape_type_start_buffer,     /*A*/
373       regex_constants::escape_type_not_word_assert,  /*B*/
374       regex_constants::escape_type_C,                /*C*/
375       regex_constants::escape_type_not_class,        /*D*/
376       regex_constants::escape_type_E,                /*E*/
377       regex_constants::escape_type_not_class,        /*F*/
378       regex_constants::escape_type_G,                /*G*/
379       regex_constants::escape_type_not_class,        /*H*/
380       regex_constants::escape_type_not_class,        /*I*/
381       regex_constants::escape_type_not_class,        /*J*/
382       regex_constants::escape_type_reset_start_mark, /*K*/
383       regex_constants::escape_type_not_class,        /*L*/
384       regex_constants::escape_type_not_class,        /*M*/
385       regex_constants::escape_type_named_char,       /*N*/
386       regex_constants::escape_type_not_class,        /*O*/
387       regex_constants::escape_type_not_property,     /*P*/
388       regex_constants::escape_type_Q,                /*Q*/
389       regex_constants::escape_type_line_ending,      /*R*/
390       regex_constants::escape_type_not_class,        /*S*/
391       regex_constants::escape_type_not_class,        /*T*/
392       regex_constants::escape_type_not_class,        /*U*/
393       regex_constants::escape_type_not_class,        /*V*/
394       regex_constants::escape_type_not_class,        /*W*/
395       regex_constants::escape_type_X,                /*X*/
396       regex_constants::escape_type_not_class,        /*Y*/
397       regex_constants::escape_type_Z,                /*Z*/
398       regex_constants::escape_type_identity,        /*[*/
399       regex_constants::escape_type_identity,        /*\*/
400       regex_constants::escape_type_identity,        /*]*/
401       regex_constants::escape_type_identity,        /*^*/
402       regex_constants::escape_type_identity,        /*_*/
403       regex_constants::escape_type_start_buffer,        /*`*/
404       regex_constants::escape_type_control_a,        /*a*/
405       regex_constants::escape_type_word_assert,        /*b*/
406       regex_constants::escape_type_ascii_control,        /*c*/
407       regex_constants::escape_type_class,        /*d*/
408       regex_constants::escape_type_e,        /*e*/
409       regex_constants::escape_type_control_f,       /*f*/
410       regex_constants::escape_type_extended_backref,  /*g*/
411       regex_constants::escape_type_class,        /*h*/
412       regex_constants::escape_type_class,        /*i*/
413       regex_constants::escape_type_class,        /*j*/
414       regex_constants::escape_type_extended_backref, /*k*/
415       regex_constants::escape_type_class,        /*l*/
416       regex_constants::escape_type_class,        /*m*/
417       regex_constants::escape_type_control_n,       /*n*/
418       regex_constants::escape_type_class,           /*o*/
419       regex_constants::escape_type_property,        /*p*/
420       regex_constants::escape_type_class,           /*q*/
421       regex_constants::escape_type_control_r,       /*r*/
422       regex_constants::escape_type_class,           /*s*/
423       regex_constants::escape_type_control_t,       /*t*/
424       regex_constants::escape_type_class,         /*u*/
425       regex_constants::escape_type_control_v,       /*v*/
426       regex_constants::escape_type_class,           /*w*/
427       regex_constants::escape_type_hex,             /*x*/
428       regex_constants::escape_type_class,           /*y*/
429       regex_constants::escape_type_end_buffer,      /*z*/
430       regex_constants::syntax_open_brace,           /*{*/
431       regex_constants::syntax_or,                   /*|*/
432       regex_constants::syntax_close_brace,          /*}*/
433       regex_constants::escape_type_identity,        /*~*/
434       regex_constants::escape_type_identity,        /**/
435       regex_constants::escape_type_identity,        /**/
436       regex_constants::escape_type_identity,        /**/
437       regex_constants::escape_type_identity,        /**/
438       regex_constants::escape_type_identity,        /**/
439       regex_constants::escape_type_identity,        /**/
440       regex_constants::escape_type_identity,        /**/
441       regex_constants::escape_type_identity,        /**/
442       regex_constants::escape_type_identity,        /**/
443       regex_constants::escape_type_identity,        /**/
444       regex_constants::escape_type_identity,        /**/
445       regex_constants::escape_type_identity,        /**/
446       regex_constants::escape_type_identity,        /**/
447       regex_constants::escape_type_identity,        /**/
448       regex_constants::escape_type_identity,        /**/
449       regex_constants::escape_type_identity,        /**/
450       regex_constants::escape_type_identity,        /**/
451       regex_constants::escape_type_identity,        /**/
452       regex_constants::escape_type_identity,        /**/
453       regex_constants::escape_type_identity,        /**/
454       regex_constants::escape_type_identity,        /**/
455       regex_constants::escape_type_identity,        /**/
456       regex_constants::escape_type_identity,        /**/
457       regex_constants::escape_type_identity,        /**/
458       regex_constants::escape_type_identity,        /**/
459       regex_constants::escape_type_identity,        /**/
460       regex_constants::escape_type_identity,        /**/
461       regex_constants::escape_type_identity,        /**/
462       regex_constants::escape_type_identity,        /**/
463       regex_constants::escape_type_identity,        /**/
464       regex_constants::escape_type_identity,        /**/
465       regex_constants::escape_type_identity,        /**/
466       regex_constants::escape_type_identity,        /**/
467       regex_constants::escape_type_identity,        /**/
468       regex_constants::escape_type_identity,        /**/
469       regex_constants::escape_type_identity,        /**/
470       regex_constants::escape_type_identity,        /**/
471       regex_constants::escape_type_identity,        /**/
472       regex_constants::escape_type_identity,        /**/
473       regex_constants::escape_type_identity,        /**/
474       regex_constants::escape_type_identity,        /**/
475       regex_constants::escape_type_identity,        /**/
476       regex_constants::escape_type_identity,        /**/
477       regex_constants::escape_type_identity,        /**/
478       regex_constants::escape_type_identity,        /**/
479       regex_constants::escape_type_identity,        /**/
480       regex_constants::escape_type_identity,        /**/
481       regex_constants::escape_type_identity,        /**/
482       regex_constants::escape_type_identity,        /**/
483       regex_constants::escape_type_identity,        /**/
484       regex_constants::escape_type_identity,        /**/
485       regex_constants::escape_type_identity,        /**/
486       regex_constants::escape_type_identity,        /**/
487       regex_constants::escape_type_identity,        /**/
488       regex_constants::escape_type_identity,        /**/
489       regex_constants::escape_type_identity,        /**/
490    };
491 
492    return char_syntax[(unsigned char)c];
493 }
494 
get_default_syntax_type(char c)495 BOOST_REGEX_DECL regex_constants::syntax_type BOOST_REGEX_CALL get_default_syntax_type(char c)
496 {
497    //
498    // char_syntax determines how the compiler treats a given character
499    // in a regular expression.
500    //
501    static regex_constants::syntax_type char_syntax[] = {
502       regex_constants::syntax_char,        /**/
503       regex_constants::syntax_char,        /**/
504       regex_constants::syntax_char,        /**/
505       regex_constants::syntax_char,        /**/
506       regex_constants::syntax_char,        /**/
507       regex_constants::syntax_char,        /**/
508       regex_constants::syntax_char,        /**/
509       regex_constants::syntax_char,        /**/
510       regex_constants::syntax_char,        /**/
511       regex_constants::syntax_char,        /**/
512       regex_constants::syntax_newline,     /**/
513       regex_constants::syntax_char,        /**/
514       regex_constants::syntax_char,        /**/
515       regex_constants::syntax_char,        /**/
516       regex_constants::syntax_char,        /**/
517       regex_constants::syntax_char,        /**/
518       regex_constants::syntax_char,        /**/
519       regex_constants::syntax_char,        /**/
520       regex_constants::syntax_char,        /**/
521       regex_constants::syntax_char,        /**/
522       regex_constants::syntax_char,        /**/
523       regex_constants::syntax_char,        /**/
524       regex_constants::syntax_char,        /**/
525       regex_constants::syntax_char,        /**/
526       regex_constants::syntax_char,        /**/
527       regex_constants::syntax_char,        /**/
528       regex_constants::syntax_char,        /**/
529       regex_constants::syntax_char,        /**/
530       regex_constants::syntax_char,        /**/
531       regex_constants::syntax_char,        /**/
532       regex_constants::syntax_char,        /**/
533       regex_constants::syntax_char,        /**/
534       regex_constants::syntax_char,        /* */    // 32
535       regex_constants::syntax_not,        /*!*/
536       regex_constants::syntax_char,        /*"*/
537       regex_constants::syntax_hash,        /*#*/
538       regex_constants::syntax_dollar,        /*$*/
539       regex_constants::syntax_char,        /*%*/
540       regex_constants::syntax_char,        /*&*/
541       regex_constants::escape_type_end_buffer,  /*'*/
542       regex_constants::syntax_open_mark,        /*(*/
543       regex_constants::syntax_close_mark,        /*)*/
544       regex_constants::syntax_star,        /***/
545       regex_constants::syntax_plus,        /*+*/
546       regex_constants::syntax_comma,        /*,*/
547       regex_constants::syntax_dash,        /*-*/
548       regex_constants::syntax_dot,        /*.*/
549       regex_constants::syntax_char,        /*/*/
550       regex_constants::syntax_digit,        /*0*/
551       regex_constants::syntax_digit,        /*1*/
552       regex_constants::syntax_digit,        /*2*/
553       regex_constants::syntax_digit,        /*3*/
554       regex_constants::syntax_digit,        /*4*/
555       regex_constants::syntax_digit,        /*5*/
556       regex_constants::syntax_digit,        /*6*/
557       regex_constants::syntax_digit,        /*7*/
558       regex_constants::syntax_digit,        /*8*/
559       regex_constants::syntax_digit,        /*9*/
560       regex_constants::syntax_colon,        /*:*/
561       regex_constants::syntax_char,        /*;*/
562       regex_constants::escape_type_left_word, /*<*/
563       regex_constants::syntax_equal,        /*=*/
564       regex_constants::escape_type_right_word, /*>*/
565       regex_constants::syntax_question,        /*?*/
566       regex_constants::syntax_char,        /*@*/
567       regex_constants::syntax_char,        /*A*/
568       regex_constants::syntax_char,        /*B*/
569       regex_constants::syntax_char,        /*C*/
570       regex_constants::syntax_char,        /*D*/
571       regex_constants::syntax_char,        /*E*/
572       regex_constants::syntax_char,        /*F*/
573       regex_constants::syntax_char,        /*G*/
574       regex_constants::syntax_char,        /*H*/
575       regex_constants::syntax_char,        /*I*/
576       regex_constants::syntax_char,        /*J*/
577       regex_constants::syntax_char,        /*K*/
578       regex_constants::syntax_char,        /*L*/
579       regex_constants::syntax_char,        /*M*/
580       regex_constants::syntax_char,        /*N*/
581       regex_constants::syntax_char,        /*O*/
582       regex_constants::syntax_char,        /*P*/
583       regex_constants::syntax_char,        /*Q*/
584       regex_constants::syntax_char,        /*R*/
585       regex_constants::syntax_char,        /*S*/
586       regex_constants::syntax_char,        /*T*/
587       regex_constants::syntax_char,        /*U*/
588       regex_constants::syntax_char,        /*V*/
589       regex_constants::syntax_char,        /*W*/
590       regex_constants::syntax_char,        /*X*/
591       regex_constants::syntax_char,        /*Y*/
592       regex_constants::syntax_char,        /*Z*/
593       regex_constants::syntax_open_set,        /*[*/
594       regex_constants::syntax_escape,        /*\*/
595       regex_constants::syntax_close_set,        /*]*/
596       regex_constants::syntax_caret,        /*^*/
597       regex_constants::syntax_char,        /*_*/
598       regex_constants::syntax_char,        /*`*/
599       regex_constants::syntax_char,        /*a*/
600       regex_constants::syntax_char,        /*b*/
601       regex_constants::syntax_char,        /*c*/
602       regex_constants::syntax_char,        /*d*/
603       regex_constants::syntax_char,        /*e*/
604       regex_constants::syntax_char,        /*f*/
605       regex_constants::syntax_char,        /*g*/
606       regex_constants::syntax_char,        /*h*/
607       regex_constants::syntax_char,        /*i*/
608       regex_constants::syntax_char,        /*j*/
609       regex_constants::syntax_char,        /*k*/
610       regex_constants::syntax_char,        /*l*/
611       regex_constants::syntax_char,        /*m*/
612       regex_constants::syntax_char,        /*n*/
613       regex_constants::syntax_char,        /*o*/
614       regex_constants::syntax_char,        /*p*/
615       regex_constants::syntax_char,        /*q*/
616       regex_constants::syntax_char,        /*r*/
617       regex_constants::syntax_char,        /*s*/
618       regex_constants::syntax_char,        /*t*/
619       regex_constants::syntax_char,        /*u*/
620       regex_constants::syntax_char,        /*v*/
621       regex_constants::syntax_char,        /*w*/
622       regex_constants::syntax_char,        /*x*/
623       regex_constants::syntax_char,        /*y*/
624       regex_constants::syntax_char,        /*z*/
625       regex_constants::syntax_open_brace,        /*{*/
626       regex_constants::syntax_or,        /*|*/
627       regex_constants::syntax_close_brace,        /*}*/
628       regex_constants::syntax_char,        /*~*/
629       regex_constants::syntax_char,        /**/
630       regex_constants::syntax_char,        /**/
631       regex_constants::syntax_char,        /**/
632       regex_constants::syntax_char,        /**/
633       regex_constants::syntax_char,        /**/
634       regex_constants::syntax_char,        /**/
635       regex_constants::syntax_char,        /**/
636       regex_constants::syntax_char,        /**/
637       regex_constants::syntax_char,        /**/
638       regex_constants::syntax_char,        /**/
639       regex_constants::syntax_char,        /**/
640       regex_constants::syntax_char,        /**/
641       regex_constants::syntax_char,        /**/
642       regex_constants::syntax_char,        /**/
643       regex_constants::syntax_char,        /**/
644       regex_constants::syntax_char,        /**/
645       regex_constants::syntax_char,        /**/
646       regex_constants::syntax_char,        /**/
647       regex_constants::syntax_char,        /**/
648       regex_constants::syntax_char,        /**/
649       regex_constants::syntax_char,        /**/
650       regex_constants::syntax_char,        /**/
651       regex_constants::syntax_char,        /**/
652       regex_constants::syntax_char,        /**/
653       regex_constants::syntax_char,        /**/
654       regex_constants::syntax_char,        /**/
655       regex_constants::syntax_char,        /**/
656       regex_constants::syntax_char,        /**/
657       regex_constants::syntax_char,        /**/
658       regex_constants::syntax_char,        /**/
659       regex_constants::syntax_char,        /**/
660       regex_constants::syntax_char,        /**/
661       regex_constants::syntax_char,        /**/
662       regex_constants::syntax_char,        /**/
663       regex_constants::syntax_char,        /**/
664       regex_constants::syntax_char,        /**/
665       regex_constants::syntax_char,        /**/
666       regex_constants::syntax_char,        /**/
667       regex_constants::syntax_char,        /**/
668       regex_constants::syntax_char,        /**/
669       regex_constants::syntax_char,        /**/
670       regex_constants::syntax_char,        /**/
671       regex_constants::syntax_char,        /**/
672       regex_constants::syntax_char,        /**/
673       regex_constants::syntax_char,        /**/
674       regex_constants::syntax_char,        /**/
675       regex_constants::syntax_char,        /**/
676       regex_constants::syntax_char,        /**/
677       regex_constants::syntax_char,        /**/
678       regex_constants::syntax_char,        /**/
679       regex_constants::syntax_char,        /**/
680       regex_constants::syntax_char,        /**/
681       regex_constants::syntax_char,        /**/
682       regex_constants::syntax_char,        /**/
683       regex_constants::syntax_char,        /**/
684       regex_constants::syntax_char,        /**/
685    };
686 
687    return char_syntax[(unsigned char)c];
688 }
689 
690 
691 } // BOOST_REGEX_DETAIL_NS
692 } // boost
693