REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
unicode_property.hpp File Reference

Unicode General_Category ranges for \p{...} (UCD contract; distinct from the re-contract shorthands). More...

#include "real/version.hpp"
#include <cstddef>
#include <cstdint>
#include <span>
#include <string_view>
#include "real/core/program.hpp"
#include "real/unicode/unicode_props.hpp"
Include dependency graph for unicode_property.hpp:

Go to the source code of this file.

Classes

struct  real::detail::gc_alias_entry
 A loose-normalized (lowercase, no _/-/space) General_Category name and its property. More...
 

Namespaces

namespace  real
 
namespace  real::detail
 

Enumerations

enum class  real::detail::gc_property : std::uint8_t {
  real::detail::Lu , real::detail::Ll , real::detail::Lt , real::detail::Lm ,
  real::detail::Lo , real::detail::Mn , real::detail::Mc , real::detail::Me ,
  real::detail::Nd , real::detail::Nl , real::detail::No , real::detail::Pc ,
  real::detail::Pd , real::detail::Ps , real::detail::Pe , real::detail::Pi ,
  real::detail::Pf , real::detail::Po , real::detail::Sm , real::detail::Sc ,
  real::detail::Sk , real::detail::So , real::detail::Zs , real::detail::Zl ,
  real::detail::Zp , real::detail::Cc , real::detail::Cf , real::detail::Co ,
  real::detail::Cn , real::detail::L , real::detail::M , real::detail::N ,
  real::detail::P , real::detail::S , real::detail::Z , real::detail::C ,
  real::detail::count
}
 A Unicode General_Category property: the 29 assignable categories then the 7 groups. More...
 

Functions

constexpr bool real::detail::is_gc_cp (gc_property prop, char32_t cp)
 Whether cp is in the General_Category property prop (== the UCD).
 
constexpr gc_property real::detail::resolve_gc (std::string_view loose)
 Resolve a loose-normalized General_Category name to its property, or count if unknown.
 

Variables

constexpr const char * real::detail::unicode_property_unidata_version {"16.0.0"}
 The Unicode data version these tables were generated from (16.0.0).
 
constexpr code_range real::detail::gc_Lu_ranges []
 \p{Lu} — 651 ranges, 1858 code points.
 
constexpr code_range real::detail::gc_Ll_ranges []
 \p{Ll} — 662 ranges, 2258 code points.
 
constexpr code_range real::detail::gc_Lt_ranges []
 \p{Lt} — 10 ranges, 31 code points.
 
constexpr code_range real::detail::gc_Lm_ranges []
 \p{Lm} — 75 ranges, 404 code points.
 
constexpr code_range real::detail::gc_Lo_ranges []
 \p{Lo} — 528 ranges, 136477 code points.
 
constexpr code_range real::detail::gc_Mn_ranges []
 \p{Mn} — 357 ranges, 2020 code points.
 
constexpr code_range real::detail::gc_Mc_ranges []
 \p{Mc} — 190 ranges, 468 code points.
 
constexpr code_range real::detail::gc_Me_ranges []
 \p{Me} — 5 ranges, 13 code points.
 
constexpr code_range real::detail::gc_Nd_ranges []
 \p{Nd} — 71 ranges, 760 code points.
 
constexpr code_range real::detail::gc_Nl_ranges []
 \p{Nl} — 12 ranges, 236 code points.
 
constexpr code_range real::detail::gc_No_ranges []
 \p{No} — 72 ranges, 915 code points.
 
constexpr code_range real::detail::gc_Pc_ranges []
 \p{Pc} — 6 ranges, 10 code points.
 
constexpr code_range real::detail::gc_Pd_ranges []
 \p{Pd} — 20 ranges, 27 code points.
 
constexpr code_range real::detail::gc_Ps_ranges []
 \p{Ps} — 79 ranges, 79 code points.
 
constexpr code_range real::detail::gc_Pe_ranges []
 \p{Pe} — 76 ranges, 77 code points.
 
constexpr code_range real::detail::gc_Pi_ranges []
 \p{Pi} — 11 ranges, 12 code points.
 
constexpr code_range real::detail::gc_Pf_ranges []
 \p{Pf} — 10 ranges, 10 code points.
 
constexpr code_range real::detail::gc_Po_ranges []
 \p{Po} — 193 ranges, 640 code points.
 
constexpr code_range real::detail::gc_Sm_ranges []
 \p{Sm} — 65 ranges, 950 code points.
 
constexpr code_range real::detail::gc_Sc_ranges []
 \p{Sc} — 21 ranges, 63 code points.
 
constexpr code_range real::detail::gc_Sk_ranges []
 \p{Sk} — 31 ranges, 125 code points.
 
constexpr code_range real::detail::gc_So_ranges []
 \p{So} — 187 ranges, 7376 code points.
 
constexpr code_range real::detail::gc_Zs_ranges []
 \p{Zs} — 7 ranges, 17 code points.
 
constexpr code_range real::detail::gc_Zl_ranges []
 \p{Zl} — 1 ranges, 1 code points.
 
constexpr code_range real::detail::gc_Zp_ranges []
 \p{Zp} — 1 ranges, 1 code points.
 
constexpr code_range real::detail::gc_Cc_ranges []
 \p{Cc} — 2 ranges, 65 code points.
 
constexpr code_range real::detail::gc_Cf_ranges []
 \p{Cf} — 21 ranges, 170 code points.
 
constexpr code_range real::detail::gc_Co_ranges []
 \p{Co} — 3 ranges, 137468 code points.
 
constexpr code_range real::detail::gc_Cn_ranges []
 \p{Cn} — 731 ranges, 819533 code points.
 
constexpr code_range real::detail::gc_L_ranges []
 \p{L} — 677 ranges, 141028 code points.
 
constexpr code_range real::detail::gc_M_ranges []
 \p{M} — 321 ranges, 2501 code points.
 
constexpr code_range real::detail::gc_N_ranges []
 \p{N} — 144 ranges, 1911 code points.
 
constexpr code_range real::detail::gc_P_ranges []
 \p{P} — 198 ranges, 855 code points.
 
constexpr code_range real::detail::gc_S_ranges []
 \p{S} — 236 ranges, 8514 code points.
 
constexpr code_range real::detail::gc_Z_ranges []
 \p{Z} — 8 ranges, 19 code points.
 
constexpr code_range real::detail::gc_C_ranges []
 \p{C} — 737 ranges, 957236 code points.
 
constexpr std::span< const code_rangereal::detail::gc_property_ranges []
 Range table indexed by gc_property (parallel to the enum order).
 
constexpr gc_alias_entry real::detail::gc_aliases []
 Short codes (Lu) and long names (Uppercase_Letter), loose-keyed; for the \p{...} parser.
 

Detailed Description

Unicode General_Category ranges for \p{...} (UCD contract; distinct from the re-contract shorthands).

GENERATED by tools/gen_unicode_property_tables.py – DO NOT EDIT BY HAND.

Built from, and exhaustively validated against, the Unicode Character Database via unicodedata.category, so REAL's \p{Gc} classes equal the UCD by construction (matching the regex crate). SEPARATE from unicode_props.hpp, whose contract is CPython re. Unicode data version: 16.0.0 (asserted). INERT: no parser reaches these yet (the P0a data slice).

Definition in file unicode_property.hpp.