Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:47:54

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003     Copyright (c) 2001-2011 Hartmut Kaiser
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 =============================================================================*/
0008 #if !defined(BOOST_SPIRIT_CHAR_CLASS_NOVEMBER_10_2006_0907AM)
0009 #define BOOST_SPIRIT_CHAR_CLASS_NOVEMBER_10_2006_0907AM
0010 
0011 #if defined(_MSC_VER)
0012 #pragma once
0013 #endif
0014 
0015 #include <boost/config.hpp>
0016 #include <boost/mpl/bool.hpp>
0017 #include <boost/spirit/home/support/unused.hpp>
0018 #include <boost/spirit/home/support/detail/is_spirit_tag.hpp>
0019 #include <boost/type_traits/is_signed.hpp>
0020 #include <boost/type_traits/make_unsigned.hpp>
0021 #include <boost/type_traits/make_signed.hpp>
0022 
0023 #if defined(BOOST_MSVC)
0024 # pragma warning(push)
0025 # pragma warning(disable: 4127) // conditional expression is constant
0026 # pragma warning(disable: 4800) // 'int' : forcing value to bool 'true' or 'false' warning
0027 #endif
0028 
0029 namespace boost { namespace spirit { namespace detail
0030 {
0031     // Here's the thing... typical encodings (except ASCII) deal with unsigned
0032     // integers > 127. ASCII uses only 127. Yet, most char and wchar_t are signed.
0033     // Thus, a char with value > 127 is negative (e.g. char 233 is -23). When you
0034     // cast this to an unsigned int with 32 bits, you get 4294967273!
0035     //
0036     // The trick is to cast to an unsigned version of the source char first
0037     // before casting to the target. {P.S. Don't worry about the code, the
0038     // optimizer will optimize the if-else branches}
0039 
0040     template <typename TargetChar, typename SourceChar>
0041     TargetChar cast_char(SourceChar ch)
0042     {
0043         if (is_signed<TargetChar>::value != is_signed<SourceChar>::value)
0044         {
0045             if (is_signed<SourceChar>::value)
0046             {
0047                  // source is signed, target is unsigned
0048                 typedef typename make_unsigned<SourceChar>::type USourceChar;
0049                 return TargetChar(USourceChar(ch));
0050             }
0051             else
0052             {
0053                  // source is unsigned, target is signed
0054                 typedef typename make_signed<SourceChar>::type SSourceChar;
0055                 return TargetChar(SSourceChar(ch));
0056             }
0057         }
0058         else
0059         {
0060             // source and target has same signedness
0061             return TargetChar(ch); // just cast
0062         }
0063     }
0064 }}}
0065 
0066 namespace boost { namespace spirit { namespace tag
0067 {
0068     struct char_ { BOOST_SPIRIT_IS_TAG() };
0069     struct string { BOOST_SPIRIT_IS_TAG() };
0070 
0071     ///////////////////////////////////////////////////////////////////////////
0072     // classification tags
0073     struct alnum { BOOST_SPIRIT_IS_TAG() };
0074     struct alpha { BOOST_SPIRIT_IS_TAG() };
0075     struct digit { BOOST_SPIRIT_IS_TAG() };
0076     struct xdigit { BOOST_SPIRIT_IS_TAG() };
0077     struct cntrl { BOOST_SPIRIT_IS_TAG() };
0078     struct graph { BOOST_SPIRIT_IS_TAG() };
0079     struct print { BOOST_SPIRIT_IS_TAG() };
0080     struct punct { BOOST_SPIRIT_IS_TAG() };
0081     struct space { BOOST_SPIRIT_IS_TAG() };
0082     struct blank { BOOST_SPIRIT_IS_TAG() };
0083 
0084     ///////////////////////////////////////////////////////////////////////////
0085     // classification/conversion tags
0086     struct no_case { BOOST_SPIRIT_IS_TAG() };
0087     struct lower { BOOST_SPIRIT_IS_TAG() };
0088     struct upper { BOOST_SPIRIT_IS_TAG() };
0089     struct lowernum { BOOST_SPIRIT_IS_TAG() };
0090     struct uppernum { BOOST_SPIRIT_IS_TAG() };
0091     struct ucs4 { BOOST_SPIRIT_IS_TAG() };
0092     struct encoding { BOOST_SPIRIT_IS_TAG() };
0093 
0094 #if defined(BOOST_SPIRIT_UNICODE)
0095 ///////////////////////////////////////////////////////////////////////////
0096 //  Unicode Major Categories
0097 ///////////////////////////////////////////////////////////////////////////
0098     struct letter { BOOST_SPIRIT_IS_TAG() };
0099     struct mark { BOOST_SPIRIT_IS_TAG() };
0100     struct number { BOOST_SPIRIT_IS_TAG() };
0101     struct separator { BOOST_SPIRIT_IS_TAG() };
0102     struct other { BOOST_SPIRIT_IS_TAG() };
0103     struct punctuation { BOOST_SPIRIT_IS_TAG() };
0104     struct symbol { BOOST_SPIRIT_IS_TAG() };
0105 
0106 ///////////////////////////////////////////////////////////////////////////
0107 //  Unicode General Categories
0108 ///////////////////////////////////////////////////////////////////////////
0109     struct uppercase_letter { BOOST_SPIRIT_IS_TAG() };
0110     struct lowercase_letter { BOOST_SPIRIT_IS_TAG() };
0111     struct titlecase_letter { BOOST_SPIRIT_IS_TAG() };
0112     struct modifier_letter { BOOST_SPIRIT_IS_TAG() };
0113     struct other_letter { BOOST_SPIRIT_IS_TAG() };
0114 
0115     struct nonspacing_mark { BOOST_SPIRIT_IS_TAG() };
0116     struct enclosing_mark { BOOST_SPIRIT_IS_TAG() };
0117     struct spacing_mark { BOOST_SPIRIT_IS_TAG() };
0118 
0119     struct decimal_number { BOOST_SPIRIT_IS_TAG() };
0120     struct letter_number { BOOST_SPIRIT_IS_TAG() };
0121     struct other_number { BOOST_SPIRIT_IS_TAG() };
0122 
0123     struct space_separator { BOOST_SPIRIT_IS_TAG() };
0124     struct line_separator { BOOST_SPIRIT_IS_TAG() };
0125     struct paragraph_separator { BOOST_SPIRIT_IS_TAG() };
0126 
0127     struct control { BOOST_SPIRIT_IS_TAG() };
0128     struct format { BOOST_SPIRIT_IS_TAG() };
0129     struct private_use { BOOST_SPIRIT_IS_TAG() };
0130     struct surrogate { BOOST_SPIRIT_IS_TAG() };
0131     struct unassigned { BOOST_SPIRIT_IS_TAG() };
0132 
0133     struct dash_punctuation { BOOST_SPIRIT_IS_TAG() };
0134     struct open_punctuation { BOOST_SPIRIT_IS_TAG() };
0135     struct close_punctuation { BOOST_SPIRIT_IS_TAG() };
0136     struct connector_punctuation { BOOST_SPIRIT_IS_TAG() };
0137     struct other_punctuation { BOOST_SPIRIT_IS_TAG() };
0138     struct initial_punctuation { BOOST_SPIRIT_IS_TAG() };
0139     struct final_punctuation { BOOST_SPIRIT_IS_TAG() };
0140 
0141     struct math_symbol { BOOST_SPIRIT_IS_TAG() };
0142     struct currency_symbol { BOOST_SPIRIT_IS_TAG() };
0143     struct modifier_symbol { BOOST_SPIRIT_IS_TAG() };
0144     struct other_symbol { BOOST_SPIRIT_IS_TAG() };
0145 
0146 ///////////////////////////////////////////////////////////////////////////
0147 //  Unicode Derived Categories
0148 ///////////////////////////////////////////////////////////////////////////
0149     struct alphabetic { BOOST_SPIRIT_IS_TAG() };
0150     struct uppercase { BOOST_SPIRIT_IS_TAG() };
0151     struct lowercase { BOOST_SPIRIT_IS_TAG() };
0152     struct white_space { BOOST_SPIRIT_IS_TAG() };
0153     struct hex_digit { BOOST_SPIRIT_IS_TAG() };
0154     struct noncharacter_code_point { BOOST_SPIRIT_IS_TAG() };
0155     struct default_ignorable_code_point { BOOST_SPIRIT_IS_TAG() };
0156 
0157 ///////////////////////////////////////////////////////////////////////////
0158 //  Unicode Scripts
0159 ///////////////////////////////////////////////////////////////////////////
0160     struct adlam { BOOST_SPIRIT_IS_TAG() };
0161     struct caucasian_albanian { BOOST_SPIRIT_IS_TAG() };
0162     struct ahom { BOOST_SPIRIT_IS_TAG() };
0163     struct arabic { BOOST_SPIRIT_IS_TAG() };
0164     struct imperial_aramaic { BOOST_SPIRIT_IS_TAG() };
0165     struct armenian { BOOST_SPIRIT_IS_TAG() };
0166     struct avestan { BOOST_SPIRIT_IS_TAG() };
0167     struct balinese { BOOST_SPIRIT_IS_TAG() };
0168     struct bamum { BOOST_SPIRIT_IS_TAG() };
0169     struct bassa_vah { BOOST_SPIRIT_IS_TAG() };
0170     struct batak { BOOST_SPIRIT_IS_TAG() };
0171     struct bengali { BOOST_SPIRIT_IS_TAG() };
0172     struct bhaiksuki { BOOST_SPIRIT_IS_TAG() };
0173     struct bopomofo { BOOST_SPIRIT_IS_TAG() };
0174     struct brahmi { BOOST_SPIRIT_IS_TAG() };
0175     struct braille { BOOST_SPIRIT_IS_TAG() };
0176     struct buginese { BOOST_SPIRIT_IS_TAG() };
0177     struct buhid { BOOST_SPIRIT_IS_TAG() };
0178     struct chakma { BOOST_SPIRIT_IS_TAG() };
0179     struct canadian_aboriginal { BOOST_SPIRIT_IS_TAG() };
0180     struct carian { BOOST_SPIRIT_IS_TAG() };
0181     struct cham { BOOST_SPIRIT_IS_TAG() };
0182     struct cherokee { BOOST_SPIRIT_IS_TAG() };
0183     struct chorasmian { BOOST_SPIRIT_IS_TAG() };
0184     struct coptic { BOOST_SPIRIT_IS_TAG() };
0185     struct cypro_minoan { BOOST_SPIRIT_IS_TAG() };
0186     struct cypriot { BOOST_SPIRIT_IS_TAG() };
0187     struct cyrillic { BOOST_SPIRIT_IS_TAG() };
0188     struct devanagari { BOOST_SPIRIT_IS_TAG() };
0189     struct dives_akuru { BOOST_SPIRIT_IS_TAG() };
0190     struct dogra { BOOST_SPIRIT_IS_TAG() };
0191     struct deseret { BOOST_SPIRIT_IS_TAG() };
0192     struct duployan { BOOST_SPIRIT_IS_TAG() };
0193     struct egyptian_hieroglyphs { BOOST_SPIRIT_IS_TAG() };
0194     struct elbasan { BOOST_SPIRIT_IS_TAG() };
0195     struct elymaic { BOOST_SPIRIT_IS_TAG() };
0196     struct ethiopic { BOOST_SPIRIT_IS_TAG() };
0197     struct georgian { BOOST_SPIRIT_IS_TAG() };
0198     struct glagolitic { BOOST_SPIRIT_IS_TAG() };
0199     struct gunjala_gondi { BOOST_SPIRIT_IS_TAG() };
0200     struct masaram_gondi { BOOST_SPIRIT_IS_TAG() };
0201     struct gothic { BOOST_SPIRIT_IS_TAG() };
0202     struct grantha { BOOST_SPIRIT_IS_TAG() };
0203     struct greek { BOOST_SPIRIT_IS_TAG() };
0204     struct gujarati { BOOST_SPIRIT_IS_TAG() };
0205     struct gurmukhi { BOOST_SPIRIT_IS_TAG() };
0206     struct hangul { BOOST_SPIRIT_IS_TAG() };
0207     struct han { BOOST_SPIRIT_IS_TAG() };
0208     struct hanunoo { BOOST_SPIRIT_IS_TAG() };
0209     struct hatran { BOOST_SPIRIT_IS_TAG() };
0210     struct hebrew { BOOST_SPIRIT_IS_TAG() };
0211     struct hiragana { BOOST_SPIRIT_IS_TAG() };
0212     struct anatolian_hieroglyphs { BOOST_SPIRIT_IS_TAG() };
0213     struct pahawh_hmong { BOOST_SPIRIT_IS_TAG() };
0214     struct nyiakeng_puachue_hmong { BOOST_SPIRIT_IS_TAG() };
0215     struct katakana_or_hiragana { BOOST_SPIRIT_IS_TAG() };
0216     struct old_hungarian { BOOST_SPIRIT_IS_TAG() };
0217     struct old_italic { BOOST_SPIRIT_IS_TAG() };
0218     struct javanese { BOOST_SPIRIT_IS_TAG() };
0219     struct kayah_li { BOOST_SPIRIT_IS_TAG() };
0220     struct katakana { BOOST_SPIRIT_IS_TAG() };
0221     struct kawi { BOOST_SPIRIT_IS_TAG() };
0222     struct kharoshthi { BOOST_SPIRIT_IS_TAG() };
0223     struct khmer { BOOST_SPIRIT_IS_TAG() };
0224     struct khojki { BOOST_SPIRIT_IS_TAG() };
0225     struct khitan_small_script { BOOST_SPIRIT_IS_TAG() };
0226     struct kannada { BOOST_SPIRIT_IS_TAG() };
0227     struct kaithi { BOOST_SPIRIT_IS_TAG() };
0228     struct tai_tham { BOOST_SPIRIT_IS_TAG() };
0229     struct lao { BOOST_SPIRIT_IS_TAG() };
0230     struct latin { BOOST_SPIRIT_IS_TAG() };
0231     struct lepcha { BOOST_SPIRIT_IS_TAG() };
0232     struct limbu { BOOST_SPIRIT_IS_TAG() };
0233     struct linear_a { BOOST_SPIRIT_IS_TAG() };
0234     struct linear_b { BOOST_SPIRIT_IS_TAG() };
0235     struct lisu { BOOST_SPIRIT_IS_TAG() };
0236     struct lycian { BOOST_SPIRIT_IS_TAG() };
0237     struct lydian { BOOST_SPIRIT_IS_TAG() };
0238     struct mahajani { BOOST_SPIRIT_IS_TAG() };
0239     struct makasar { BOOST_SPIRIT_IS_TAG() };
0240     struct mandaic { BOOST_SPIRIT_IS_TAG() };
0241     struct manichaean { BOOST_SPIRIT_IS_TAG() };
0242     struct marchen { BOOST_SPIRIT_IS_TAG() };
0243     struct medefaidrin { BOOST_SPIRIT_IS_TAG() };
0244     struct mende_kikakui { BOOST_SPIRIT_IS_TAG() };
0245     struct meroitic_cursive { BOOST_SPIRIT_IS_TAG() };
0246     struct meroitic_hieroglyphs { BOOST_SPIRIT_IS_TAG() };
0247     struct malayalam { BOOST_SPIRIT_IS_TAG() };
0248     struct modi { BOOST_SPIRIT_IS_TAG() };
0249     struct mongolian { BOOST_SPIRIT_IS_TAG() };
0250     struct mro { BOOST_SPIRIT_IS_TAG() };
0251     struct meetei_mayek { BOOST_SPIRIT_IS_TAG() };
0252     struct multani { BOOST_SPIRIT_IS_TAG() };
0253     struct myanmar { BOOST_SPIRIT_IS_TAG() };
0254     struct nag_mundari { BOOST_SPIRIT_IS_TAG() };
0255     struct nandinagari { BOOST_SPIRIT_IS_TAG() };
0256     struct old_north_arabian { BOOST_SPIRIT_IS_TAG() };
0257     struct nabataean { BOOST_SPIRIT_IS_TAG() };
0258     struct newa { BOOST_SPIRIT_IS_TAG() };
0259     struct nko { BOOST_SPIRIT_IS_TAG() };
0260     struct nushu { BOOST_SPIRIT_IS_TAG() };
0261     struct ogham { BOOST_SPIRIT_IS_TAG() };
0262     struct ol_chiki { BOOST_SPIRIT_IS_TAG() };
0263     struct old_turkic { BOOST_SPIRIT_IS_TAG() };
0264     struct oriya { BOOST_SPIRIT_IS_TAG() };
0265     struct osage { BOOST_SPIRIT_IS_TAG() };
0266     struct osmanya { BOOST_SPIRIT_IS_TAG() };
0267     struct old_uyghur { BOOST_SPIRIT_IS_TAG() };
0268     struct palmyrene { BOOST_SPIRIT_IS_TAG() };
0269     struct pau_cin_hau { BOOST_SPIRIT_IS_TAG() };
0270     struct old_permic { BOOST_SPIRIT_IS_TAG() };
0271     struct phags_pa { BOOST_SPIRIT_IS_TAG() };
0272     struct inscriptional_pahlavi { BOOST_SPIRIT_IS_TAG() };
0273     struct psalter_pahlavi { BOOST_SPIRIT_IS_TAG() };
0274     struct phoenician { BOOST_SPIRIT_IS_TAG() };
0275     struct miao { BOOST_SPIRIT_IS_TAG() };
0276     struct inscriptional_parthian { BOOST_SPIRIT_IS_TAG() };
0277     struct rejang { BOOST_SPIRIT_IS_TAG() };
0278     struct hanifi_rohingya { BOOST_SPIRIT_IS_TAG() };
0279     struct runic { BOOST_SPIRIT_IS_TAG() };
0280     struct samaritan { BOOST_SPIRIT_IS_TAG() };
0281     struct old_south_arabian { BOOST_SPIRIT_IS_TAG() };
0282     struct saurashtra { BOOST_SPIRIT_IS_TAG() };
0283     struct signwriting { BOOST_SPIRIT_IS_TAG() };
0284     struct shavian { BOOST_SPIRIT_IS_TAG() };
0285     struct sharada { BOOST_SPIRIT_IS_TAG() };
0286     struct siddham { BOOST_SPIRIT_IS_TAG() };
0287     struct khudawadi { BOOST_SPIRIT_IS_TAG() };
0288     struct sinhala { BOOST_SPIRIT_IS_TAG() };
0289     struct sogdian { BOOST_SPIRIT_IS_TAG() };
0290     struct old_sogdian { BOOST_SPIRIT_IS_TAG() };
0291     struct sora_sompeng { BOOST_SPIRIT_IS_TAG() };
0292     struct soyombo { BOOST_SPIRIT_IS_TAG() };
0293     struct sundanese { BOOST_SPIRIT_IS_TAG() };
0294     struct syloti_nagri { BOOST_SPIRIT_IS_TAG() };
0295     struct syriac { BOOST_SPIRIT_IS_TAG() };
0296     struct tagbanwa { BOOST_SPIRIT_IS_TAG() };
0297     struct takri { BOOST_SPIRIT_IS_TAG() };
0298     struct tai_le { BOOST_SPIRIT_IS_TAG() };
0299     struct new_tai_lue { BOOST_SPIRIT_IS_TAG() };
0300     struct tamil { BOOST_SPIRIT_IS_TAG() };
0301     struct tangut { BOOST_SPIRIT_IS_TAG() };
0302     struct tai_viet { BOOST_SPIRIT_IS_TAG() };
0303     struct telugu { BOOST_SPIRIT_IS_TAG() };
0304     struct tifinagh { BOOST_SPIRIT_IS_TAG() };
0305     struct tagalog { BOOST_SPIRIT_IS_TAG() };
0306     struct thaana { BOOST_SPIRIT_IS_TAG() };
0307     struct thai { BOOST_SPIRIT_IS_TAG() };
0308     struct tibetan { BOOST_SPIRIT_IS_TAG() };
0309     struct tirhuta { BOOST_SPIRIT_IS_TAG() };
0310     struct tangsa { BOOST_SPIRIT_IS_TAG() };
0311     struct toto { BOOST_SPIRIT_IS_TAG() };
0312     struct ugaritic { BOOST_SPIRIT_IS_TAG() };
0313     struct vai { BOOST_SPIRIT_IS_TAG() };
0314     struct vithkuqi { BOOST_SPIRIT_IS_TAG() };
0315     struct warang_citi { BOOST_SPIRIT_IS_TAG() };
0316     struct wancho { BOOST_SPIRIT_IS_TAG() };
0317     struct old_persian { BOOST_SPIRIT_IS_TAG() };
0318     struct cuneiform { BOOST_SPIRIT_IS_TAG() };
0319     struct yezidi { BOOST_SPIRIT_IS_TAG() };
0320     struct yi { BOOST_SPIRIT_IS_TAG() };
0321     struct zanabazar_square { BOOST_SPIRIT_IS_TAG() };
0322     struct inherited { BOOST_SPIRIT_IS_TAG() };
0323     struct common { BOOST_SPIRIT_IS_TAG() };
0324     struct unknown { BOOST_SPIRIT_IS_TAG() };
0325 #endif
0326 
0327     ///////////////////////////////////////////////////////////////////////////
0328     // This composite tag type encodes both the character
0329     // set and the specific char tag (used for classification
0330     // or conversion). char_code_base and char_encoding_base
0331     // can be used to test for modifier membership (see modifier.hpp)
0332     template <typename CharClass>
0333     struct char_code_base {};
0334 
0335     template <typename CharEncoding>
0336     struct char_encoding_base {};
0337 
0338     template <typename CharClass, typename CharEncoding>
0339     struct char_code
0340         : char_code_base<CharClass>, char_encoding_base<CharEncoding>
0341     {
0342         BOOST_SPIRIT_IS_TAG()
0343         typedef CharEncoding char_encoding; // e.g. ascii
0344         typedef CharClass char_class;       // e.g. tag::alnum
0345     };
0346 }}}
0347 
0348 namespace boost { namespace spirit { namespace char_class
0349 {
0350     ///////////////////////////////////////////////////////////////////////////
0351     // Test characters for classification
0352     template <typename CharEncoding>
0353     struct classify
0354     {
0355         typedef typename CharEncoding::classify_type char_type;
0356 
0357 #define BOOST_SPIRIT_CLASSIFY(name, isname)                                     \
0358         template <typename Char>                                                \
0359         static bool                                                             \
0360         is(tag::name, Char ch)                                                  \
0361         {                                                                       \
0362             return CharEncoding::isname                                         \
0363                 BOOST_PREVENT_MACRO_SUBSTITUTION                                \
0364                     (detail::cast_char<char_type>(ch));                         \
0365         }                                                                       \
0366         /***/
0367 
0368         BOOST_SPIRIT_CLASSIFY(char_, ischar)
0369         BOOST_SPIRIT_CLASSIFY(alnum, isalnum)
0370         BOOST_SPIRIT_CLASSIFY(alpha, isalpha)
0371         BOOST_SPIRIT_CLASSIFY(digit, isdigit)
0372         BOOST_SPIRIT_CLASSIFY(xdigit, isxdigit)
0373         BOOST_SPIRIT_CLASSIFY(cntrl, iscntrl)
0374         BOOST_SPIRIT_CLASSIFY(graph, isgraph)
0375         BOOST_SPIRIT_CLASSIFY(lower, islower)
0376         BOOST_SPIRIT_CLASSIFY(print, isprint)
0377         BOOST_SPIRIT_CLASSIFY(punct, ispunct)
0378         BOOST_SPIRIT_CLASSIFY(space, isspace)
0379         BOOST_SPIRIT_CLASSIFY(blank, isblank)
0380         BOOST_SPIRIT_CLASSIFY(upper, isupper)
0381 
0382 #undef BOOST_SPIRIT_CLASSIFY
0383 
0384         template <typename Char>
0385         static bool
0386         is(tag::lowernum, Char ch)
0387         {
0388             return CharEncoding::islower(detail::cast_char<char_type>(ch)) ||
0389                    CharEncoding::isdigit(detail::cast_char<char_type>(ch));
0390         }
0391 
0392         template <typename Char>
0393         static bool
0394         is(tag::uppernum, Char ch)
0395         {
0396             return CharEncoding::isupper(detail::cast_char<char_type>(ch)) ||
0397                    CharEncoding::isdigit(detail::cast_char<char_type>(ch));
0398         }
0399 
0400 #if defined(BOOST_SPIRIT_UNICODE)
0401 
0402 #define BOOST_SPIRIT_UNICODE_CLASSIFY(name)                                     \
0403         template <typename Char>                                                \
0404         static bool                                                             \
0405         is(tag::name, Char ch)                                                  \
0406         {                                                                       \
0407             return CharEncoding::is_##name(detail::cast_char<char_type>(ch));   \
0408         }                                                                       \
0409         /***/
0410 
0411 ///////////////////////////////////////////////////////////////////////////
0412 //  Unicode Major Categories
0413 ///////////////////////////////////////////////////////////////////////////
0414     BOOST_SPIRIT_UNICODE_CLASSIFY(letter)
0415     BOOST_SPIRIT_UNICODE_CLASSIFY(mark)
0416     BOOST_SPIRIT_UNICODE_CLASSIFY(number)
0417     BOOST_SPIRIT_UNICODE_CLASSIFY(separator)
0418     BOOST_SPIRIT_UNICODE_CLASSIFY(other)
0419     BOOST_SPIRIT_UNICODE_CLASSIFY(punctuation)
0420     BOOST_SPIRIT_UNICODE_CLASSIFY(symbol)
0421 
0422 ///////////////////////////////////////////////////////////////////////////
0423 //  Unicode General Categories
0424 ///////////////////////////////////////////////////////////////////////////
0425     BOOST_SPIRIT_UNICODE_CLASSIFY(uppercase_letter)
0426     BOOST_SPIRIT_UNICODE_CLASSIFY(lowercase_letter)
0427     BOOST_SPIRIT_UNICODE_CLASSIFY(titlecase_letter)
0428     BOOST_SPIRIT_UNICODE_CLASSIFY(modifier_letter)
0429     BOOST_SPIRIT_UNICODE_CLASSIFY(other_letter)
0430 
0431     BOOST_SPIRIT_UNICODE_CLASSIFY(nonspacing_mark)
0432     BOOST_SPIRIT_UNICODE_CLASSIFY(enclosing_mark)
0433     BOOST_SPIRIT_UNICODE_CLASSIFY(spacing_mark)
0434 
0435     BOOST_SPIRIT_UNICODE_CLASSIFY(decimal_number)
0436     BOOST_SPIRIT_UNICODE_CLASSIFY(letter_number)
0437     BOOST_SPIRIT_UNICODE_CLASSIFY(other_number)
0438 
0439     BOOST_SPIRIT_UNICODE_CLASSIFY(space_separator)
0440     BOOST_SPIRIT_UNICODE_CLASSIFY(line_separator)
0441     BOOST_SPIRIT_UNICODE_CLASSIFY(paragraph_separator)
0442 
0443     BOOST_SPIRIT_UNICODE_CLASSIFY(control)
0444     BOOST_SPIRIT_UNICODE_CLASSIFY(format)
0445     BOOST_SPIRIT_UNICODE_CLASSIFY(private_use)
0446     BOOST_SPIRIT_UNICODE_CLASSIFY(surrogate)
0447     BOOST_SPIRIT_UNICODE_CLASSIFY(unassigned)
0448 
0449     BOOST_SPIRIT_UNICODE_CLASSIFY(dash_punctuation)
0450     BOOST_SPIRIT_UNICODE_CLASSIFY(open_punctuation)
0451     BOOST_SPIRIT_UNICODE_CLASSIFY(close_punctuation)
0452     BOOST_SPIRIT_UNICODE_CLASSIFY(connector_punctuation)
0453     BOOST_SPIRIT_UNICODE_CLASSIFY(other_punctuation)
0454     BOOST_SPIRIT_UNICODE_CLASSIFY(initial_punctuation)
0455     BOOST_SPIRIT_UNICODE_CLASSIFY(final_punctuation)
0456 
0457     BOOST_SPIRIT_UNICODE_CLASSIFY(math_symbol)
0458     BOOST_SPIRIT_UNICODE_CLASSIFY(currency_symbol)
0459     BOOST_SPIRIT_UNICODE_CLASSIFY(modifier_symbol)
0460     BOOST_SPIRIT_UNICODE_CLASSIFY(other_symbol)
0461 
0462 ///////////////////////////////////////////////////////////////////////////
0463 //  Unicode Derived Categories
0464 ///////////////////////////////////////////////////////////////////////////
0465     BOOST_SPIRIT_UNICODE_CLASSIFY(alphabetic)
0466     BOOST_SPIRIT_UNICODE_CLASSIFY(uppercase)
0467     BOOST_SPIRIT_UNICODE_CLASSIFY(lowercase)
0468     BOOST_SPIRIT_UNICODE_CLASSIFY(white_space)
0469     BOOST_SPIRIT_UNICODE_CLASSIFY(hex_digit)
0470     BOOST_SPIRIT_UNICODE_CLASSIFY(noncharacter_code_point)
0471     BOOST_SPIRIT_UNICODE_CLASSIFY(default_ignorable_code_point)
0472 
0473 ///////////////////////////////////////////////////////////////////////////
0474 //  Unicode Scripts
0475 ///////////////////////////////////////////////////////////////////////////
0476     BOOST_SPIRIT_UNICODE_CLASSIFY(adlam)
0477     BOOST_SPIRIT_UNICODE_CLASSIFY(caucasian_albanian)
0478     BOOST_SPIRIT_UNICODE_CLASSIFY(ahom)
0479     BOOST_SPIRIT_UNICODE_CLASSIFY(arabic)
0480     BOOST_SPIRIT_UNICODE_CLASSIFY(imperial_aramaic)
0481     BOOST_SPIRIT_UNICODE_CLASSIFY(armenian)
0482     BOOST_SPIRIT_UNICODE_CLASSIFY(avestan)
0483     BOOST_SPIRIT_UNICODE_CLASSIFY(balinese)
0484     BOOST_SPIRIT_UNICODE_CLASSIFY(bamum)
0485     BOOST_SPIRIT_UNICODE_CLASSIFY(bassa_vah)
0486     BOOST_SPIRIT_UNICODE_CLASSIFY(batak)
0487     BOOST_SPIRIT_UNICODE_CLASSIFY(bengali)
0488     BOOST_SPIRIT_UNICODE_CLASSIFY(bhaiksuki)
0489     BOOST_SPIRIT_UNICODE_CLASSIFY(bopomofo)
0490     BOOST_SPIRIT_UNICODE_CLASSIFY(brahmi)
0491     BOOST_SPIRIT_UNICODE_CLASSIFY(braille)
0492     BOOST_SPIRIT_UNICODE_CLASSIFY(buginese)
0493     BOOST_SPIRIT_UNICODE_CLASSIFY(buhid)
0494     BOOST_SPIRIT_UNICODE_CLASSIFY(chakma)
0495     BOOST_SPIRIT_UNICODE_CLASSIFY(canadian_aboriginal)
0496     BOOST_SPIRIT_UNICODE_CLASSIFY(carian)
0497     BOOST_SPIRIT_UNICODE_CLASSIFY(cham)
0498     BOOST_SPIRIT_UNICODE_CLASSIFY(cherokee)
0499     BOOST_SPIRIT_UNICODE_CLASSIFY(chorasmian)
0500     BOOST_SPIRIT_UNICODE_CLASSIFY(coptic)
0501     BOOST_SPIRIT_UNICODE_CLASSIFY(cypro_minoan)
0502     BOOST_SPIRIT_UNICODE_CLASSIFY(cypriot)
0503     BOOST_SPIRIT_UNICODE_CLASSIFY(cyrillic)
0504     BOOST_SPIRIT_UNICODE_CLASSIFY(devanagari)
0505     BOOST_SPIRIT_UNICODE_CLASSIFY(dives_akuru)
0506     BOOST_SPIRIT_UNICODE_CLASSIFY(dogra)
0507     BOOST_SPIRIT_UNICODE_CLASSIFY(deseret)
0508     BOOST_SPIRIT_UNICODE_CLASSIFY(duployan)
0509     BOOST_SPIRIT_UNICODE_CLASSIFY(egyptian_hieroglyphs)
0510     BOOST_SPIRIT_UNICODE_CLASSIFY(elbasan)
0511     BOOST_SPIRIT_UNICODE_CLASSIFY(elymaic)
0512     BOOST_SPIRIT_UNICODE_CLASSIFY(ethiopic)
0513     BOOST_SPIRIT_UNICODE_CLASSIFY(georgian)
0514     BOOST_SPIRIT_UNICODE_CLASSIFY(glagolitic)
0515     BOOST_SPIRIT_UNICODE_CLASSIFY(gunjala_gondi)
0516     BOOST_SPIRIT_UNICODE_CLASSIFY(masaram_gondi)
0517     BOOST_SPIRIT_UNICODE_CLASSIFY(gothic)
0518     BOOST_SPIRIT_UNICODE_CLASSIFY(grantha)
0519     BOOST_SPIRIT_UNICODE_CLASSIFY(greek)
0520     BOOST_SPIRIT_UNICODE_CLASSIFY(gujarati)
0521     BOOST_SPIRIT_UNICODE_CLASSIFY(gurmukhi)
0522     BOOST_SPIRIT_UNICODE_CLASSIFY(hangul)
0523     BOOST_SPIRIT_UNICODE_CLASSIFY(han)
0524     BOOST_SPIRIT_UNICODE_CLASSIFY(hanunoo)
0525     BOOST_SPIRIT_UNICODE_CLASSIFY(hatran)
0526     BOOST_SPIRIT_UNICODE_CLASSIFY(hebrew)
0527     BOOST_SPIRIT_UNICODE_CLASSIFY(hiragana)
0528     BOOST_SPIRIT_UNICODE_CLASSIFY(anatolian_hieroglyphs)
0529     BOOST_SPIRIT_UNICODE_CLASSIFY(pahawh_hmong)
0530     BOOST_SPIRIT_UNICODE_CLASSIFY(nyiakeng_puachue_hmong)
0531     BOOST_SPIRIT_UNICODE_CLASSIFY(katakana_or_hiragana)
0532     BOOST_SPIRIT_UNICODE_CLASSIFY(old_hungarian)
0533     BOOST_SPIRIT_UNICODE_CLASSIFY(old_italic)
0534     BOOST_SPIRIT_UNICODE_CLASSIFY(javanese)
0535     BOOST_SPIRIT_UNICODE_CLASSIFY(kayah_li)
0536     BOOST_SPIRIT_UNICODE_CLASSIFY(katakana)
0537     BOOST_SPIRIT_UNICODE_CLASSIFY(kawi)
0538     BOOST_SPIRIT_UNICODE_CLASSIFY(kharoshthi)
0539     BOOST_SPIRIT_UNICODE_CLASSIFY(khmer)
0540     BOOST_SPIRIT_UNICODE_CLASSIFY(khojki)
0541     BOOST_SPIRIT_UNICODE_CLASSIFY(khitan_small_script)
0542     BOOST_SPIRIT_UNICODE_CLASSIFY(kannada)
0543     BOOST_SPIRIT_UNICODE_CLASSIFY(kaithi)
0544     BOOST_SPIRIT_UNICODE_CLASSIFY(tai_tham)
0545     BOOST_SPIRIT_UNICODE_CLASSIFY(lao)
0546     BOOST_SPIRIT_UNICODE_CLASSIFY(latin)
0547     BOOST_SPIRIT_UNICODE_CLASSIFY(lepcha)
0548     BOOST_SPIRIT_UNICODE_CLASSIFY(limbu)
0549     BOOST_SPIRIT_UNICODE_CLASSIFY(linear_a)
0550     BOOST_SPIRIT_UNICODE_CLASSIFY(linear_b)
0551     BOOST_SPIRIT_UNICODE_CLASSIFY(lisu)
0552     BOOST_SPIRIT_UNICODE_CLASSIFY(lycian)
0553     BOOST_SPIRIT_UNICODE_CLASSIFY(lydian)
0554     BOOST_SPIRIT_UNICODE_CLASSIFY(mahajani)
0555     BOOST_SPIRIT_UNICODE_CLASSIFY(makasar)
0556     BOOST_SPIRIT_UNICODE_CLASSIFY(mandaic)
0557     BOOST_SPIRIT_UNICODE_CLASSIFY(manichaean)
0558     BOOST_SPIRIT_UNICODE_CLASSIFY(marchen)
0559     BOOST_SPIRIT_UNICODE_CLASSIFY(medefaidrin)
0560     BOOST_SPIRIT_UNICODE_CLASSIFY(mende_kikakui)
0561     BOOST_SPIRIT_UNICODE_CLASSIFY(meroitic_cursive)
0562     BOOST_SPIRIT_UNICODE_CLASSIFY(meroitic_hieroglyphs)
0563     BOOST_SPIRIT_UNICODE_CLASSIFY(malayalam)
0564     BOOST_SPIRIT_UNICODE_CLASSIFY(modi)
0565     BOOST_SPIRIT_UNICODE_CLASSIFY(mongolian)
0566     BOOST_SPIRIT_UNICODE_CLASSIFY(mro)
0567     BOOST_SPIRIT_UNICODE_CLASSIFY(meetei_mayek)
0568     BOOST_SPIRIT_UNICODE_CLASSIFY(multani)
0569     BOOST_SPIRIT_UNICODE_CLASSIFY(myanmar)
0570     BOOST_SPIRIT_UNICODE_CLASSIFY(nag_mundari)
0571     BOOST_SPIRIT_UNICODE_CLASSIFY(nandinagari)
0572     BOOST_SPIRIT_UNICODE_CLASSIFY(old_north_arabian)
0573     BOOST_SPIRIT_UNICODE_CLASSIFY(nabataean)
0574     BOOST_SPIRIT_UNICODE_CLASSIFY(newa)
0575     BOOST_SPIRIT_UNICODE_CLASSIFY(nko)
0576     BOOST_SPIRIT_UNICODE_CLASSIFY(nushu)
0577     BOOST_SPIRIT_UNICODE_CLASSIFY(ogham)
0578     BOOST_SPIRIT_UNICODE_CLASSIFY(ol_chiki)
0579     BOOST_SPIRIT_UNICODE_CLASSIFY(old_turkic)
0580     BOOST_SPIRIT_UNICODE_CLASSIFY(oriya)
0581     BOOST_SPIRIT_UNICODE_CLASSIFY(osage)
0582     BOOST_SPIRIT_UNICODE_CLASSIFY(osmanya)
0583     BOOST_SPIRIT_UNICODE_CLASSIFY(old_uyghur)
0584     BOOST_SPIRIT_UNICODE_CLASSIFY(palmyrene)
0585     BOOST_SPIRIT_UNICODE_CLASSIFY(pau_cin_hau)
0586     BOOST_SPIRIT_UNICODE_CLASSIFY(old_permic)
0587     BOOST_SPIRIT_UNICODE_CLASSIFY(phags_pa)
0588     BOOST_SPIRIT_UNICODE_CLASSIFY(inscriptional_pahlavi)
0589     BOOST_SPIRIT_UNICODE_CLASSIFY(psalter_pahlavi)
0590     BOOST_SPIRIT_UNICODE_CLASSIFY(phoenician)
0591     BOOST_SPIRIT_UNICODE_CLASSIFY(miao)
0592     BOOST_SPIRIT_UNICODE_CLASSIFY(inscriptional_parthian)
0593     BOOST_SPIRIT_UNICODE_CLASSIFY(rejang)
0594     BOOST_SPIRIT_UNICODE_CLASSIFY(hanifi_rohingya)
0595     BOOST_SPIRIT_UNICODE_CLASSIFY(runic)
0596     BOOST_SPIRIT_UNICODE_CLASSIFY(samaritan)
0597     BOOST_SPIRIT_UNICODE_CLASSIFY(old_south_arabian)
0598     BOOST_SPIRIT_UNICODE_CLASSIFY(saurashtra)
0599     BOOST_SPIRIT_UNICODE_CLASSIFY(signwriting)
0600     BOOST_SPIRIT_UNICODE_CLASSIFY(shavian)
0601     BOOST_SPIRIT_UNICODE_CLASSIFY(sharada)
0602     BOOST_SPIRIT_UNICODE_CLASSIFY(siddham)
0603     BOOST_SPIRIT_UNICODE_CLASSIFY(khudawadi)
0604     BOOST_SPIRIT_UNICODE_CLASSIFY(sinhala)
0605     BOOST_SPIRIT_UNICODE_CLASSIFY(sogdian)
0606     BOOST_SPIRIT_UNICODE_CLASSIFY(old_sogdian)
0607     BOOST_SPIRIT_UNICODE_CLASSIFY(sora_sompeng)
0608     BOOST_SPIRIT_UNICODE_CLASSIFY(soyombo)
0609     BOOST_SPIRIT_UNICODE_CLASSIFY(sundanese)
0610     BOOST_SPIRIT_UNICODE_CLASSIFY(syloti_nagri)
0611     BOOST_SPIRIT_UNICODE_CLASSIFY(syriac)
0612     BOOST_SPIRIT_UNICODE_CLASSIFY(tagbanwa)
0613     BOOST_SPIRIT_UNICODE_CLASSIFY(takri)
0614     BOOST_SPIRIT_UNICODE_CLASSIFY(tai_le)
0615     BOOST_SPIRIT_UNICODE_CLASSIFY(new_tai_lue)
0616     BOOST_SPIRIT_UNICODE_CLASSIFY(tamil)
0617     BOOST_SPIRIT_UNICODE_CLASSIFY(tangut)
0618     BOOST_SPIRIT_UNICODE_CLASSIFY(tai_viet)
0619     BOOST_SPIRIT_UNICODE_CLASSIFY(telugu)
0620     BOOST_SPIRIT_UNICODE_CLASSIFY(tifinagh)
0621     BOOST_SPIRIT_UNICODE_CLASSIFY(tagalog)
0622     BOOST_SPIRIT_UNICODE_CLASSIFY(thaana)
0623     BOOST_SPIRIT_UNICODE_CLASSIFY(thai)
0624     BOOST_SPIRIT_UNICODE_CLASSIFY(tibetan)
0625     BOOST_SPIRIT_UNICODE_CLASSIFY(tirhuta)
0626     BOOST_SPIRIT_UNICODE_CLASSIFY(tangsa)
0627     BOOST_SPIRIT_UNICODE_CLASSIFY(toto)
0628     BOOST_SPIRIT_UNICODE_CLASSIFY(ugaritic)
0629     BOOST_SPIRIT_UNICODE_CLASSIFY(vai)
0630     BOOST_SPIRIT_UNICODE_CLASSIFY(vithkuqi)
0631     BOOST_SPIRIT_UNICODE_CLASSIFY(warang_citi)
0632     BOOST_SPIRIT_UNICODE_CLASSIFY(wancho)
0633     BOOST_SPIRIT_UNICODE_CLASSIFY(old_persian)
0634     BOOST_SPIRIT_UNICODE_CLASSIFY(cuneiform)
0635     BOOST_SPIRIT_UNICODE_CLASSIFY(yezidi)
0636     BOOST_SPIRIT_UNICODE_CLASSIFY(yi)
0637     BOOST_SPIRIT_UNICODE_CLASSIFY(zanabazar_square)
0638     BOOST_SPIRIT_UNICODE_CLASSIFY(inherited)
0639     BOOST_SPIRIT_UNICODE_CLASSIFY(common)
0640     BOOST_SPIRIT_UNICODE_CLASSIFY(unknown)
0641 
0642 #undef BOOST_SPIRIT_UNICODE_CLASSIFY
0643 #endif
0644 
0645     };
0646 
0647     ///////////////////////////////////////////////////////////////////////////
0648     // Convert characters
0649     template <typename CharEncoding>
0650     struct convert
0651     {
0652         typedef typename CharEncoding::classify_type char_type;
0653 
0654         template <typename Char>
0655         static Char
0656         to(tag::lower, Char ch)
0657         {
0658             return static_cast<Char>(
0659                 CharEncoding::tolower(detail::cast_char<char_type>(ch)));
0660         }
0661 
0662         template <typename Char>
0663         static Char
0664         to(tag::upper, Char ch)
0665         {
0666             return static_cast<Char>(
0667                 CharEncoding::toupper(detail::cast_char<char_type>(ch)));
0668         }
0669 
0670         template <typename Char>
0671         static Char
0672         to(tag::ucs4, Char ch)
0673         {
0674             return static_cast<Char>(
0675                 CharEncoding::toucs4(detail::cast_char<char_type>(ch)));
0676         }
0677 
0678         template <typename Char>
0679         static Char
0680         to(unused_type, Char ch)
0681         {
0682             return ch;
0683         }
0684     };
0685 
0686     ///////////////////////////////////////////////////////////////////////////
0687     // Info on character classification
0688     template <typename CharEncoding>
0689     struct what
0690     {
0691 #define BOOST_SPIRIT_CLASSIFY_WHAT(name, isname)                                \
0692         static char const* is(tag::name)                                        \
0693         {                                                                       \
0694             return isname;                                                      \
0695         }                                                                       \
0696         /***/
0697 
0698         BOOST_SPIRIT_CLASSIFY_WHAT(char_, "char")
0699         BOOST_SPIRIT_CLASSIFY_WHAT(alnum, "alnum")
0700         BOOST_SPIRIT_CLASSIFY_WHAT(alpha, "alpha")
0701         BOOST_SPIRIT_CLASSIFY_WHAT(digit, "digit")
0702         BOOST_SPIRIT_CLASSIFY_WHAT(xdigit, "xdigit")
0703         BOOST_SPIRIT_CLASSIFY_WHAT(cntrl, "cntrl")
0704         BOOST_SPIRIT_CLASSIFY_WHAT(graph, "graph")
0705         BOOST_SPIRIT_CLASSIFY_WHAT(lower, "lower")
0706         BOOST_SPIRIT_CLASSIFY_WHAT(lowernum, "lowernum")
0707         BOOST_SPIRIT_CLASSIFY_WHAT(print, "print")
0708         BOOST_SPIRIT_CLASSIFY_WHAT(punct, "punct")
0709         BOOST_SPIRIT_CLASSIFY_WHAT(space, "space")
0710         BOOST_SPIRIT_CLASSIFY_WHAT(blank, "blank")
0711         BOOST_SPIRIT_CLASSIFY_WHAT(upper, "upper")
0712         BOOST_SPIRIT_CLASSIFY_WHAT(uppernum, "uppernum")
0713         BOOST_SPIRIT_CLASSIFY_WHAT(ucs4, "ucs4")
0714 
0715 #undef BOOST_SPIRIT_CLASSIFY_WHAT
0716 
0717 #if defined(BOOST_SPIRIT_UNICODE)
0718 
0719 #define BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(name)                                \
0720         static char const* is(tag::name)                                        \
0721         {                                                                       \
0722             return BOOST_PP_STRINGIZE(name);                                    \
0723         }                                                                       \
0724         /***/
0725 
0726 ///////////////////////////////////////////////////////////////////////////
0727 //  Unicode Major Categories
0728 ///////////////////////////////////////////////////////////////////////////
0729     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(letter)
0730     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(mark)
0731     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(number)
0732     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(separator)
0733     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(other)
0734     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(punctuation)
0735     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(symbol)
0736 
0737 ///////////////////////////////////////////////////////////////////////////
0738 //  Unicode General Categories
0739 ///////////////////////////////////////////////////////////////////////////
0740     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(uppercase_letter)
0741     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lowercase_letter)
0742     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(titlecase_letter)
0743     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(modifier_letter)
0744     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(other_letter)
0745 
0746     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(nonspacing_mark)
0747     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(enclosing_mark)
0748     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(spacing_mark)
0749 
0750     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(decimal_number)
0751     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(letter_number)
0752     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(other_number)
0753 
0754     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(space_separator)
0755     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(line_separator)
0756     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(paragraph_separator)
0757 
0758     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(control)
0759     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(format)
0760     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(private_use)
0761     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(surrogate)
0762     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(unassigned)
0763 
0764     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(dash_punctuation)
0765     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(open_punctuation)
0766     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(close_punctuation)
0767     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(connector_punctuation)
0768     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(other_punctuation)
0769     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(initial_punctuation)
0770     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(final_punctuation)
0771 
0772     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(math_symbol)
0773     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(currency_symbol)
0774     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(modifier_symbol)
0775     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(other_symbol)
0776 
0777 ///////////////////////////////////////////////////////////////////////////
0778 //  Unicode Derived Categories
0779 ///////////////////////////////////////////////////////////////////////////
0780     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(alphabetic)
0781     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(uppercase)
0782     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lowercase)
0783     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(white_space)
0784     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hex_digit)
0785     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(noncharacter_code_point)
0786     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(default_ignorable_code_point)
0787 
0788 ///////////////////////////////////////////////////////////////////////////
0789 //  Unicode Scripts
0790 ///////////////////////////////////////////////////////////////////////////
0791     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(adlam)
0792     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(caucasian_albanian)
0793     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(ahom)
0794     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(arabic)
0795     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(imperial_aramaic)
0796     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(armenian)
0797     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(avestan)
0798     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(balinese)
0799     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(bamum)
0800     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(bassa_vah)
0801     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(batak)
0802     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(bengali)
0803     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(bhaiksuki)
0804     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(bopomofo)
0805     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(brahmi)
0806     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(braille)
0807     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(buginese)
0808     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(buhid)
0809     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(chakma)
0810     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(canadian_aboriginal)
0811     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(carian)
0812     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cham)
0813     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cherokee)
0814     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(chorasmian)
0815     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(coptic)
0816     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cypro_minoan)
0817     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cypriot)
0818     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cyrillic)
0819     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(devanagari)
0820     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(dives_akuru)
0821     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(dogra)
0822     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(deseret)
0823     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(duployan)
0824     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(egyptian_hieroglyphs)
0825     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(elbasan)
0826     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(elymaic)
0827     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(ethiopic)
0828     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(georgian)
0829     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(glagolitic)
0830     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(gunjala_gondi)
0831     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(masaram_gondi)
0832     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(gothic)
0833     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(grantha)
0834     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(greek)
0835     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(gujarati)
0836     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(gurmukhi)
0837     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hangul)
0838     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(han)
0839     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hanunoo)
0840     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hatran)
0841     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hebrew)
0842     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hiragana)
0843     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(anatolian_hieroglyphs)
0844     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(pahawh_hmong)
0845     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(nyiakeng_puachue_hmong)
0846     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(katakana_or_hiragana)
0847     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_hungarian)
0848     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_italic)
0849     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(javanese)
0850     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(kayah_li)
0851     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(katakana)
0852     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(kawi)
0853     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(kharoshthi)
0854     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(khmer)
0855     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(khojki)
0856     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(khitan_small_script)
0857     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(kannada)
0858     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(kaithi)
0859     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tai_tham)
0860     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lao)
0861     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(latin)
0862     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lepcha)
0863     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(limbu)
0864     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(linear_a)
0865     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(linear_b)
0866     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lisu)
0867     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lycian)
0868     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lydian)
0869     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(mahajani)
0870     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(makasar)
0871     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(mandaic)
0872     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(manichaean)
0873     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(marchen)
0874     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(medefaidrin)
0875     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(mende_kikakui)
0876     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(meroitic_cursive)
0877     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(meroitic_hieroglyphs)
0878     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(malayalam)
0879     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(modi)
0880     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(mongolian)
0881     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(mro)
0882     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(meetei_mayek)
0883     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(multani)
0884     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(myanmar)
0885     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(nag_mundari)
0886     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(nandinagari)
0887     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_north_arabian)
0888     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(nabataean)
0889     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(newa)
0890     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(nko)
0891     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(nushu)
0892     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(ogham)
0893     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(ol_chiki)
0894     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_turkic)
0895     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(oriya)
0896     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(osage)
0897     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(osmanya)
0898     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_uyghur)
0899     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(palmyrene)
0900     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(pau_cin_hau)
0901     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_permic)
0902     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(phags_pa)
0903     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(inscriptional_pahlavi)
0904     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(psalter_pahlavi)
0905     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(phoenician)
0906     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(miao)
0907     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(inscriptional_parthian)
0908     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(rejang)
0909     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hanifi_rohingya)
0910     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(runic)
0911     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(samaritan)
0912     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_south_arabian)
0913     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(saurashtra)
0914     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(signwriting)
0915     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(shavian)
0916     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(sharada)
0917     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(siddham)
0918     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(khudawadi)
0919     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(sinhala)
0920     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(sogdian)
0921     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_sogdian)
0922     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(sora_sompeng)
0923     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(soyombo)
0924     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(sundanese)
0925     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(syloti_nagri)
0926     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(syriac)
0927     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tagbanwa)
0928     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(takri)
0929     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tai_le)
0930     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(new_tai_lue)
0931     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tamil)
0932     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tangut)
0933     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tai_viet)
0934     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(telugu)
0935     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tifinagh)
0936     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tagalog)
0937     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(thaana)
0938     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(thai)
0939     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tibetan)
0940     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tirhuta)
0941     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tangsa)
0942     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(toto)
0943     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(ugaritic)
0944     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(vai)
0945     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(vithkuqi)
0946     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(warang_citi)
0947     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(wancho)
0948     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_persian)
0949     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cuneiform)
0950     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(yezidi)
0951     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(yi)
0952     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(zanabazar_square)
0953     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(inherited)
0954     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(common)
0955     BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(unknown)
0956 
0957 #undef BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT
0958 #endif
0959 
0960     };
0961 }}}
0962 
0963 namespace boost { namespace spirit { namespace traits
0964 {
0965     ///////////////////////////////////////////////////////////////////////////
0966     template <typename CharParam, typename CharEncoding>
0967     struct ischar
0968     {
0969         static bool call(CharParam const& ch)
0970         {
0971            return CharEncoding::ischar(int(ch));
0972         }
0973     };
0974 }}}
0975 
0976 #if defined(BOOST_MSVC)
0977 # pragma warning(pop)
0978 #endif
0979 
0980 #endif
0981 
0982