Go to the documentation of this file.
4 #ifndef LEXY_DSL_UNICODE_HPP_INCLUDED
5 #define LEXY_DSL_UNICODE_HPP_INCLUDED
18 return "code-point.non-control";
31 template <
typename Encoding>
34 return ascii::_print::template char_class_match_swar<Encoding>(c);
42 return "code-point.control";
55 template <
typename Encoding>
58 return ascii::_control::template char_class_match_swar<Encoding>(c);
77 return "code-point.blank";
88 return lexy::code_point(cp).general_category() == lexy::code_point::space_separator;
91 template <
typename Encoding>
94 return ascii::_blank::template char_class_match_swar<Encoding>(c);
103 return "code-point.newline";
114 return cp == 0x85 || cp == 0x2029 || cp == 0x2028;
117 template <
typename Encoding>
120 return ascii::_newline::template char_class_match_swar<Encoding>(c);
129 return "code-point.other-space";
139 template <
typename Encoding>
142 return ascii::_other_space::template char_class_match_swar<Encoding>(c);
151 return "code-point.whitespace";
161 return lexy::_detail::code_point_has_properties<LEXY_UNICODE_PROPERTY(whitespace)>(cp);
164 template <
typename Encoding>
167 return ascii::_space::template char_class_match_swar<Encoding>(c);
177 return "code-point.lowercase";
187 return lexy::_detail::code_point_has_properties<LEXY_UNICODE_PROPERTY(lowercase)>(cp);
190 template <
typename Encoding>
193 return ascii::_lower::template char_class_match_swar<Encoding>(c);
202 return "code-point.uppercase";
212 return lexy::_detail::code_point_has_properties<LEXY_UNICODE_PROPERTY(uppercase)>(cp);
215 template <
typename Encoding>
218 return ascii::_upper::template char_class_match_swar<Encoding>(c);
227 return "code-point.alphabetic";
237 return lexy::_detail::code_point_has_properties<LEXY_UNICODE_PROPERTY(alphabetic)>(cp);
240 template <
typename Encoding>
243 return ascii::_alpha::template char_class_match_swar<Encoding>(c);
253 return "code-point.decimal-number";
263 return lexy::code_point(cp).general_category() == lexy::code_point::decimal_number;
266 template <
typename Encoding>
269 return ascii::_digit::template char_class_match_swar<Encoding>(c);
278 return "code-point.alphabetic-decimal";
288 return lexy::_detail::code_point_has_properties<LEXY_UNICODE_PROPERTY(alphabetic)>(cp)
289 ||
lexy::code_point(cp).general_category() == lexy::code_point::decimal_number;
292 template <
typename Encoding>
295 return ascii::_alnum::template char_class_match_swar<Encoding>(c);
305 return "code-point.word";
316 if (
cat == lexy::code_point::mark ||
cat == lexy::code_point::connector_punctuation
317 ||
cat == lexy::code_point::decimal_number)
324 template <
typename Encoding>
327 return ascii::_word::template char_class_match_swar<Encoding>(c);
337 return "code-point.graph";
350 return !cp.is_control() && !cp.is_surrogate()
351 && cp.general_category() != lexy::code_point::unassigned
355 template <
typename Encoding>
358 return ascii::_graph::template char_class_match_swar<Encoding>(c);
367 return "code-point.print";
382 template <
typename Encoding>
385 return ascii::_print::template char_class_match_swar<Encoding>(c);
394 return "code-point.character";
404 return lexy::code_point(cp).general_category() != lexy::code_point::unassigned;
407 template <
typename Encoding>
410 return ascii::_char::template char_class_match_swar<Encoding>(c);
422 return "code-point.XID-start";
432 return lexy::_detail::code_point_has_properties<LEXY_UNICODE_PROPERTY(xid_start)>(cp);
435 template <
typename Encoding>
438 return ascii::_alpha::template char_class_match_swar<Encoding>(c);
447 return "code-point.XID-start-underscore";
458 return lexy::_detail::code_point_has_properties<LEXY_UNICODE_PROPERTY(xid_start)>(cp);
461 template <
typename Encoding>
464 return ascii::_alphau::template char_class_match_swar<Encoding>(c);
473 return "code-point.XID-continue";
484 return lexy::_detail::code_point_has_properties<LEXY_UNICODE_PROPERTY(xid_continue)>(cp);
487 template <
typename Encoding>
490 return ascii::_word::template char_class_match_swar<Encoding>(c);
496 #endif // LEXY_DSL_UNICODE_HPP_INCLUDED
static LEXY_CONSTEVAL auto char_class_name()
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_name()
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_ascii()
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
constexpr auto operator-(_control)
constexpr auto xid_start_underscore
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static constexpr bool char_class_match_cp(char32_t cp)
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_name()
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_name()
constexpr auto code_point
Matches a single unicode code point in the current unicode encoding.
static LEXY_CONSTEVAL auto char_class_name()
static LEXY_CONSTEVAL auto char_class_ascii()
constexpr auto other_space
#define LEXY_UNICODE_CONSTEXPR
static LEXY_CONSTEVAL auto char_class_name()
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static LEXY_CONSTEVAL auto char_class_name()
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t _cp)
static LEXY_CONSTEVAL auto char_class_name()
static LEXY_CONSTEVAL auto char_class_name()
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_name()
static LEXY_CONSTEVAL auto char_class_ascii()
typename cat_< A, B >::type cat
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_name()
#define LEXY_UNICODE_PROPERTY(Name)
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static constexpr bool char_class_match_cp(char32_t cp)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_name()
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_name()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_name()
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_name()
bool code_point_has_properties(char32_t cp)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static constexpr bool char_class_match_cp(char32_t cp)
constexpr auto alpha_digit
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_name()
static constexpr auto char_class_match_swar(lexy::_detail::swar_int c)
static LEXY_CONSTEVAL auto char_class_name()
static LEXY_CONSTEVAL auto char_class_ascii()
static LEXY_CONSTEVAL auto char_class_name()
static LEXY_UNICODE_CONSTEXPR bool char_class_match_cp(char32_t cp)
constexpr auto xid_continue