File indexing completed on 2025-01-19 09:47:48
0001
0002
0003
0004
0005
0006
0007
0008 #if !defined(BOOST_SPIRIT_UNICODE_1_JANUARY_12_2010_0728PM)
0009 #define BOOST_SPIRIT_UNICODE_1_JANUARY_12_2010_0728PM
0010
0011 #if defined(_MSC_VER)
0012 #pragma once
0013 #endif
0014
0015 #include <boost/cstdint.hpp>
0016 #include <boost/spirit/home/support/char_encoding/unicode/query.hpp>
0017
0018 namespace boost { namespace spirit { namespace char_encoding
0019 {
0020
0021
0022
0023 struct unicode
0024 {
0025 #ifdef BOOST_NO_CXX11_CHAR32_T
0026 typedef ::boost::uint32_t char_type;
0027 #else
0028 typedef char32_t char_type;
0029 #endif
0030 typedef ::boost::uint32_t classify_type;
0031
0032
0033
0034
0035 static bool
0036 isascii_(char_type ch)
0037 {
0038 return 0 == (ch & ~0x7f);
0039 }
0040
0041 static bool
0042 ischar(char_type ch)
0043 {
0044
0045 return ch <= 0x10FFFF;
0046 }
0047
0048 static bool
0049 isalnum(char_type ch)
0050 {
0051 return ucd::is_alphanumeric(ch);
0052 }
0053
0054 static bool
0055 isalpha(char_type ch)
0056 {
0057 return ucd::is_alphabetic(ch);
0058 }
0059
0060 static bool
0061 isdigit(char_type ch)
0062 {
0063 return ucd::is_decimal_number(ch);
0064 }
0065
0066 static bool
0067 isxdigit(char_type ch)
0068 {
0069 return ucd::is_hex_digit(ch);
0070 }
0071
0072 static bool
0073 iscntrl(char_type ch)
0074 {
0075 return ucd::is_control(ch);
0076 }
0077
0078 static bool
0079 isgraph(char_type ch)
0080 {
0081 return ucd::is_graph(ch);
0082 }
0083
0084 static bool
0085 islower(char_type ch)
0086 {
0087 return ucd::is_lowercase(ch);
0088 }
0089
0090 static bool
0091 isprint(char_type ch)
0092 {
0093 return ucd::is_print(ch);
0094 }
0095
0096 static bool
0097 ispunct(char_type ch)
0098 {
0099 return ucd::is_punctuation(ch);
0100 }
0101
0102 static bool
0103 isspace(char_type ch)
0104 {
0105 return ucd::is_white_space(ch);
0106 }
0107
0108 static bool
0109 isblank BOOST_PREVENT_MACRO_SUBSTITUTION (char_type ch)
0110 {
0111 return ucd::is_blank(ch);
0112 }
0113
0114 static bool
0115 isupper(char_type ch)
0116 {
0117 return ucd::is_uppercase(ch);
0118 }
0119
0120
0121
0122
0123
0124 static char_type
0125 tolower(char_type ch)
0126 {
0127 return ucd::to_lowercase(ch);
0128 }
0129
0130 static char_type
0131 toupper(char_type ch)
0132 {
0133 return ucd::to_uppercase(ch);
0134 }
0135
0136 static ::boost::uint32_t
0137 toucs4(char_type ch)
0138 {
0139 return ch;
0140 }
0141
0142
0143
0144
0145 #define BOOST_SPIRIT_MAJOR_CATEGORY(name) \
0146 static bool \
0147 is_##name(char_type ch) \
0148 { \
0149 return ucd::get_major_category(ch) == ucd::properties::name; \
0150 } \
0151
0152
0153 BOOST_SPIRIT_MAJOR_CATEGORY(letter)
0154 BOOST_SPIRIT_MAJOR_CATEGORY(mark)
0155 BOOST_SPIRIT_MAJOR_CATEGORY(number)
0156 BOOST_SPIRIT_MAJOR_CATEGORY(separator)
0157 BOOST_SPIRIT_MAJOR_CATEGORY(other)
0158 BOOST_SPIRIT_MAJOR_CATEGORY(punctuation)
0159 BOOST_SPIRIT_MAJOR_CATEGORY(symbol)
0160
0161
0162
0163
0164 #define BOOST_SPIRIT_CATEGORY(name) \
0165 static bool \
0166 is_##name(char_type ch) \
0167 { \
0168 return ucd::get_category(ch) == ucd::properties::name; \
0169 } \
0170
0171
0172 BOOST_SPIRIT_CATEGORY(uppercase_letter)
0173 BOOST_SPIRIT_CATEGORY(lowercase_letter)
0174 BOOST_SPIRIT_CATEGORY(titlecase_letter)
0175 BOOST_SPIRIT_CATEGORY(modifier_letter)
0176 BOOST_SPIRIT_CATEGORY(other_letter)
0177
0178 BOOST_SPIRIT_CATEGORY(nonspacing_mark)
0179 BOOST_SPIRIT_CATEGORY(enclosing_mark)
0180 BOOST_SPIRIT_CATEGORY(spacing_mark)
0181
0182 BOOST_SPIRIT_CATEGORY(decimal_number)
0183 BOOST_SPIRIT_CATEGORY(letter_number)
0184 BOOST_SPIRIT_CATEGORY(other_number)
0185
0186 BOOST_SPIRIT_CATEGORY(space_separator)
0187 BOOST_SPIRIT_CATEGORY(line_separator)
0188 BOOST_SPIRIT_CATEGORY(paragraph_separator)
0189
0190 BOOST_SPIRIT_CATEGORY(control)
0191 BOOST_SPIRIT_CATEGORY(format)
0192 BOOST_SPIRIT_CATEGORY(private_use)
0193 BOOST_SPIRIT_CATEGORY(surrogate)
0194 BOOST_SPIRIT_CATEGORY(unassigned)
0195
0196 BOOST_SPIRIT_CATEGORY(dash_punctuation)
0197 BOOST_SPIRIT_CATEGORY(open_punctuation)
0198 BOOST_SPIRIT_CATEGORY(close_punctuation)
0199 BOOST_SPIRIT_CATEGORY(connector_punctuation)
0200 BOOST_SPIRIT_CATEGORY(other_punctuation)
0201 BOOST_SPIRIT_CATEGORY(initial_punctuation)
0202 BOOST_SPIRIT_CATEGORY(final_punctuation)
0203
0204 BOOST_SPIRIT_CATEGORY(math_symbol)
0205 BOOST_SPIRIT_CATEGORY(currency_symbol)
0206 BOOST_SPIRIT_CATEGORY(modifier_symbol)
0207 BOOST_SPIRIT_CATEGORY(other_symbol)
0208
0209
0210
0211
0212 #define BOOST_SPIRIT_DERIVED_CATEGORY(name) \
0213 static bool \
0214 is_##name(char_type ch) \
0215 { \
0216 return ucd::is_##name(ch); \
0217 } \
0218
0219
0220 BOOST_SPIRIT_DERIVED_CATEGORY(alphabetic)
0221 BOOST_SPIRIT_DERIVED_CATEGORY(uppercase)
0222 BOOST_SPIRIT_DERIVED_CATEGORY(lowercase)
0223 BOOST_SPIRIT_DERIVED_CATEGORY(white_space)
0224 BOOST_SPIRIT_DERIVED_CATEGORY(hex_digit)
0225 BOOST_SPIRIT_DERIVED_CATEGORY(noncharacter_code_point)
0226 BOOST_SPIRIT_DERIVED_CATEGORY(default_ignorable_code_point)
0227
0228
0229
0230
0231 #define BOOST_SPIRIT_SCRIPT(name) \
0232 static bool \
0233 is_##name(char_type ch) \
0234 { \
0235 return ucd::get_script(ch) == ucd::properties::name; \
0236 } \
0237
0238
0239 BOOST_SPIRIT_SCRIPT(adlam)
0240 BOOST_SPIRIT_SCRIPT(caucasian_albanian)
0241 BOOST_SPIRIT_SCRIPT(ahom)
0242 BOOST_SPIRIT_SCRIPT(arabic)
0243 BOOST_SPIRIT_SCRIPT(imperial_aramaic)
0244 BOOST_SPIRIT_SCRIPT(armenian)
0245 BOOST_SPIRIT_SCRIPT(avestan)
0246 BOOST_SPIRIT_SCRIPT(balinese)
0247 BOOST_SPIRIT_SCRIPT(bamum)
0248 BOOST_SPIRIT_SCRIPT(bassa_vah)
0249 BOOST_SPIRIT_SCRIPT(batak)
0250 BOOST_SPIRIT_SCRIPT(bengali)
0251 BOOST_SPIRIT_SCRIPT(bhaiksuki)
0252 BOOST_SPIRIT_SCRIPT(bopomofo)
0253 BOOST_SPIRIT_SCRIPT(brahmi)
0254 BOOST_SPIRIT_SCRIPT(braille)
0255 BOOST_SPIRIT_SCRIPT(buginese)
0256 BOOST_SPIRIT_SCRIPT(buhid)
0257 BOOST_SPIRIT_SCRIPT(chakma)
0258 BOOST_SPIRIT_SCRIPT(canadian_aboriginal)
0259 BOOST_SPIRIT_SCRIPT(carian)
0260 BOOST_SPIRIT_SCRIPT(cham)
0261 BOOST_SPIRIT_SCRIPT(cherokee)
0262 BOOST_SPIRIT_SCRIPT(chorasmian)
0263 BOOST_SPIRIT_SCRIPT(coptic)
0264 BOOST_SPIRIT_SCRIPT(cypro_minoan)
0265 BOOST_SPIRIT_SCRIPT(cypriot)
0266 BOOST_SPIRIT_SCRIPT(cyrillic)
0267 BOOST_SPIRIT_SCRIPT(devanagari)
0268 BOOST_SPIRIT_SCRIPT(dives_akuru)
0269 BOOST_SPIRIT_SCRIPT(dogra)
0270 BOOST_SPIRIT_SCRIPT(deseret)
0271 BOOST_SPIRIT_SCRIPT(duployan)
0272 BOOST_SPIRIT_SCRIPT(egyptian_hieroglyphs)
0273 BOOST_SPIRIT_SCRIPT(elbasan)
0274 BOOST_SPIRIT_SCRIPT(elymaic)
0275 BOOST_SPIRIT_SCRIPT(ethiopic)
0276 BOOST_SPIRIT_SCRIPT(georgian)
0277 BOOST_SPIRIT_SCRIPT(glagolitic)
0278 BOOST_SPIRIT_SCRIPT(gunjala_gondi)
0279 BOOST_SPIRIT_SCRIPT(masaram_gondi)
0280 BOOST_SPIRIT_SCRIPT(gothic)
0281 BOOST_SPIRIT_SCRIPT(grantha)
0282 BOOST_SPIRIT_SCRIPT(greek)
0283 BOOST_SPIRIT_SCRIPT(gujarati)
0284 BOOST_SPIRIT_SCRIPT(gurmukhi)
0285 BOOST_SPIRIT_SCRIPT(hangul)
0286 BOOST_SPIRIT_SCRIPT(han)
0287 BOOST_SPIRIT_SCRIPT(hanunoo)
0288 BOOST_SPIRIT_SCRIPT(hatran)
0289 BOOST_SPIRIT_SCRIPT(hebrew)
0290 BOOST_SPIRIT_SCRIPT(hiragana)
0291 BOOST_SPIRIT_SCRIPT(anatolian_hieroglyphs)
0292 BOOST_SPIRIT_SCRIPT(pahawh_hmong)
0293 BOOST_SPIRIT_SCRIPT(nyiakeng_puachue_hmong)
0294 BOOST_SPIRIT_SCRIPT(katakana_or_hiragana)
0295 BOOST_SPIRIT_SCRIPT(old_hungarian)
0296 BOOST_SPIRIT_SCRIPT(old_italic)
0297 BOOST_SPIRIT_SCRIPT(javanese)
0298 BOOST_SPIRIT_SCRIPT(kayah_li)
0299 BOOST_SPIRIT_SCRIPT(katakana)
0300 BOOST_SPIRIT_SCRIPT(kawi)
0301 BOOST_SPIRIT_SCRIPT(kharoshthi)
0302 BOOST_SPIRIT_SCRIPT(khmer)
0303 BOOST_SPIRIT_SCRIPT(khojki)
0304 BOOST_SPIRIT_SCRIPT(khitan_small_script)
0305 BOOST_SPIRIT_SCRIPT(kannada)
0306 BOOST_SPIRIT_SCRIPT(kaithi)
0307 BOOST_SPIRIT_SCRIPT(tai_tham)
0308 BOOST_SPIRIT_SCRIPT(lao)
0309 BOOST_SPIRIT_SCRIPT(latin)
0310 BOOST_SPIRIT_SCRIPT(lepcha)
0311 BOOST_SPIRIT_SCRIPT(limbu)
0312 BOOST_SPIRIT_SCRIPT(linear_a)
0313 BOOST_SPIRIT_SCRIPT(linear_b)
0314 BOOST_SPIRIT_SCRIPT(lisu)
0315 BOOST_SPIRIT_SCRIPT(lycian)
0316 BOOST_SPIRIT_SCRIPT(lydian)
0317 BOOST_SPIRIT_SCRIPT(mahajani)
0318 BOOST_SPIRIT_SCRIPT(makasar)
0319 BOOST_SPIRIT_SCRIPT(mandaic)
0320 BOOST_SPIRIT_SCRIPT(manichaean)
0321 BOOST_SPIRIT_SCRIPT(marchen)
0322 BOOST_SPIRIT_SCRIPT(medefaidrin)
0323 BOOST_SPIRIT_SCRIPT(mende_kikakui)
0324 BOOST_SPIRIT_SCRIPT(meroitic_cursive)
0325 BOOST_SPIRIT_SCRIPT(meroitic_hieroglyphs)
0326 BOOST_SPIRIT_SCRIPT(malayalam)
0327 BOOST_SPIRIT_SCRIPT(modi)
0328 BOOST_SPIRIT_SCRIPT(mongolian)
0329 BOOST_SPIRIT_SCRIPT(mro)
0330 BOOST_SPIRIT_SCRIPT(meetei_mayek)
0331 BOOST_SPIRIT_SCRIPT(multani)
0332 BOOST_SPIRIT_SCRIPT(myanmar)
0333 BOOST_SPIRIT_SCRIPT(nag_mundari)
0334 BOOST_SPIRIT_SCRIPT(nandinagari)
0335 BOOST_SPIRIT_SCRIPT(old_north_arabian)
0336 BOOST_SPIRIT_SCRIPT(nabataean)
0337 BOOST_SPIRIT_SCRIPT(newa)
0338 BOOST_SPIRIT_SCRIPT(nko)
0339 BOOST_SPIRIT_SCRIPT(nushu)
0340 BOOST_SPIRIT_SCRIPT(ogham)
0341 BOOST_SPIRIT_SCRIPT(ol_chiki)
0342 BOOST_SPIRIT_SCRIPT(old_turkic)
0343 BOOST_SPIRIT_SCRIPT(oriya)
0344 BOOST_SPIRIT_SCRIPT(osage)
0345 BOOST_SPIRIT_SCRIPT(osmanya)
0346 BOOST_SPIRIT_SCRIPT(old_uyghur)
0347 BOOST_SPIRIT_SCRIPT(palmyrene)
0348 BOOST_SPIRIT_SCRIPT(pau_cin_hau)
0349 BOOST_SPIRIT_SCRIPT(old_permic)
0350 BOOST_SPIRIT_SCRIPT(phags_pa)
0351 BOOST_SPIRIT_SCRIPT(inscriptional_pahlavi)
0352 BOOST_SPIRIT_SCRIPT(psalter_pahlavi)
0353 BOOST_SPIRIT_SCRIPT(phoenician)
0354 BOOST_SPIRIT_SCRIPT(miao)
0355 BOOST_SPIRIT_SCRIPT(inscriptional_parthian)
0356 BOOST_SPIRIT_SCRIPT(rejang)
0357 BOOST_SPIRIT_SCRIPT(hanifi_rohingya)
0358 BOOST_SPIRIT_SCRIPT(runic)
0359 BOOST_SPIRIT_SCRIPT(samaritan)
0360 BOOST_SPIRIT_SCRIPT(old_south_arabian)
0361 BOOST_SPIRIT_SCRIPT(saurashtra)
0362 BOOST_SPIRIT_SCRIPT(signwriting)
0363 BOOST_SPIRIT_SCRIPT(shavian)
0364 BOOST_SPIRIT_SCRIPT(sharada)
0365 BOOST_SPIRIT_SCRIPT(siddham)
0366 BOOST_SPIRIT_SCRIPT(khudawadi)
0367 BOOST_SPIRIT_SCRIPT(sinhala)
0368 BOOST_SPIRIT_SCRIPT(sogdian)
0369 BOOST_SPIRIT_SCRIPT(old_sogdian)
0370 BOOST_SPIRIT_SCRIPT(sora_sompeng)
0371 BOOST_SPIRIT_SCRIPT(soyombo)
0372 BOOST_SPIRIT_SCRIPT(sundanese)
0373 BOOST_SPIRIT_SCRIPT(syloti_nagri)
0374 BOOST_SPIRIT_SCRIPT(syriac)
0375 BOOST_SPIRIT_SCRIPT(tagbanwa)
0376 BOOST_SPIRIT_SCRIPT(takri)
0377 BOOST_SPIRIT_SCRIPT(tai_le)
0378 BOOST_SPIRIT_SCRIPT(new_tai_lue)
0379 BOOST_SPIRIT_SCRIPT(tamil)
0380 BOOST_SPIRIT_SCRIPT(tangut)
0381 BOOST_SPIRIT_SCRIPT(tai_viet)
0382 BOOST_SPIRIT_SCRIPT(telugu)
0383 BOOST_SPIRIT_SCRIPT(tifinagh)
0384 BOOST_SPIRIT_SCRIPT(tagalog)
0385 BOOST_SPIRIT_SCRIPT(thaana)
0386 BOOST_SPIRIT_SCRIPT(thai)
0387 BOOST_SPIRIT_SCRIPT(tibetan)
0388 BOOST_SPIRIT_SCRIPT(tirhuta)
0389 BOOST_SPIRIT_SCRIPT(tangsa)
0390 BOOST_SPIRIT_SCRIPT(toto)
0391 BOOST_SPIRIT_SCRIPT(ugaritic)
0392 BOOST_SPIRIT_SCRIPT(vai)
0393 BOOST_SPIRIT_SCRIPT(vithkuqi)
0394 BOOST_SPIRIT_SCRIPT(warang_citi)
0395 BOOST_SPIRIT_SCRIPT(wancho)
0396 BOOST_SPIRIT_SCRIPT(old_persian)
0397 BOOST_SPIRIT_SCRIPT(cuneiform)
0398 BOOST_SPIRIT_SCRIPT(yezidi)
0399 BOOST_SPIRIT_SCRIPT(yi)
0400 BOOST_SPIRIT_SCRIPT(zanabazar_square)
0401 BOOST_SPIRIT_SCRIPT(inherited)
0402 BOOST_SPIRIT_SCRIPT(common)
0403 BOOST_SPIRIT_SCRIPT(unknown)
0404
0405 #undef BOOST_SPIRIT_MAJOR_CATEGORY
0406 #undef BOOST_SPIRIT_CATEGORY
0407 #undef BOOST_SPIRIT_DERIVED_CATEGORY
0408 #undef BOOST_SPIRIT_SCRIPT
0409
0410 };
0411
0412 }}}
0413
0414 #endif
0415