diff --git a/.gitmodules b/.gitmodules index 57306103a..3860651bd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,9 @@ [submodule "lib/FFXIVClientStructs"] path = lib/FFXIVClientStructs url = https://github.com/goatcorp/FFXIVClientStructs.git +[submodule "lib/Nomade040-nmd"] + path = lib/Nomade040-nmd + url = https://github.com/Nomade040/nmd.git +[submodule "lib/TsudaKageyu-minhook"] + path = lib/TsudaKageyu-minhook + url = https://github.com/TsudaKageyu/minhook.git diff --git a/Dalamud.Boot/Dalamud.Boot.vcxproj b/Dalamud.Boot/Dalamud.Boot.vcxproj index 0629d4466..e71750f47 100644 --- a/Dalamud.Boot/Dalamud.Boot.vcxproj +++ b/Dalamud.Boot/Dalamud.Boot.vcxproj @@ -25,15 +25,19 @@ DynamicLibrary true - v142 + v143 false Unicode ..\bin\$(Configuration)\ obj\$(Configuration)\ - - + + $(LibraryPath) + + + $(SolutionDir)bin\lib\$(Configuration)\libMinHook\;$(LibraryPath) + Level3 @@ -49,7 +53,7 @@ Windows true false - dbghelp.lib;%(AdditionalDependencies) + dbghelp.lib;Version.lib;%(AdditionalDependencies) ..\lib\CoreCLR;%(AdditionalLibraryDirectories) @@ -58,6 +62,8 @@ true false _DEBUG;%(PreprocessorDefinitions) + Use + 26812 false @@ -69,6 +75,8 @@ true true NDEBUG;%(PreprocessorDefinitions) + Use + 26812 true @@ -91,22 +99,54 @@ NotUsing NotUsing + + NotUsing + NotUsing + + + true + true + NotUsing + NotUsing + + + NotUsing + NotUsing + + + NotUsing + NotUsing + + + NotUsing + NotUsing + + + + + NotUsing + NotUsing + + + NotUsing + NotUsing + + + + + NotUsing + NotUsing + Create Create - - Use - Use - + Use Use - - Use - Use - + @@ -114,8 +154,22 @@ + + + + + + + + + + + + + + diff --git a/Dalamud.Boot/Dalamud.Boot.vcxproj.filters b/Dalamud.Boot/Dalamud.Boot.vcxproj.filters index ad673c2d4..b527ec60c 100644 --- a/Dalamud.Boot/Dalamud.Boot.vcxproj.filters +++ b/Dalamud.Boot/Dalamud.Boot.vcxproj.filters @@ -8,14 +8,20 @@ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + {0c915688-91ea-431f-8b68-845cad422a50} + + + {e31f7ca0-db29-4198-8b91-bb11b339705f} + + + {6ec5597d-e293-4d2a-a307-7444c8fac04b} + Dalamud.Boot DLL - - Dalamud.Boot DLL - Dalamud.Boot DLL @@ -28,6 +34,45 @@ CoreCLR + + Project Files + + + Project Files + + + Dalamud.Boot DLL + + + Dalamud.Boot DLL + + + Common Boot + + + Common Boot + + + MinHook + + + MinHook + + + MinHook + + + MinHook + + + MinHook + + + Dalamud.Boot DLL + + + Dalamud.Boot DLL + @@ -49,7 +94,49 @@ Dalamud.Boot DLL + Project Files + + Dalamud.Boot DLL + + Dalamud.Boot DLL + + + Dalamud.Boot DLL + + + Dalamud.Boot DLL + + + Common Boot + + + Common Boot + + + MinHook + + + MinHook + + + MinHook + + + MinHook + + + MinHook + + + MinHook + + + MinHook + + + MinHook + \ No newline at end of file diff --git a/Dalamud.Boot/DalamudStartInfo.cpp b/Dalamud.Boot/DalamudStartInfo.cpp new file mode 100644 index 000000000..1dddce4d3 --- /dev/null +++ b/Dalamud.Boot/DalamudStartInfo.cpp @@ -0,0 +1,117 @@ +#include "pch.h" +#include "DalamudStartInfo.h" + +#include "utils.h" + +DalamudStartInfo g_startInfo; + +void from_json(const nlohmann::json& json, DalamudStartInfo::WaitMessageboxFlags& value) { + if (json.is_number_integer()) { + value = static_cast(json.get()); + + } else if (json.is_array()) { + value = DalamudStartInfo::WaitMessageboxFlags::None; + for (const auto& item : json) { + if (item.is_number_integer()) { + value = static_cast(static_cast(value) | item.get()); + + } else if (item.is_string()) { + const auto iteml = unicode::convert(item.get(), &unicode::lower); + if (item == "beforeinitialize") + value = static_cast(static_cast(value) | static_cast(DalamudStartInfo::WaitMessageboxFlags::BeforeInitialize)); + else if (item == "beforedalamudentrypoint") + value = static_cast(static_cast(value) | static_cast(DalamudStartInfo::WaitMessageboxFlags::BeforeDalamudEntrypoint)); + } + } + + } else if (json.is_string()) { + value = DalamudStartInfo::WaitMessageboxFlags::None; + for (const auto& item : utils::split(json.get(), ",")) { + const auto iteml = unicode::convert(item, &unicode::lower); + if (iteml == "beforeinitialize") + value = static_cast(static_cast(value) | static_cast(DalamudStartInfo::WaitMessageboxFlags::BeforeInitialize)); + else if (iteml == "beforedalamudentrypoint") + value = static_cast(static_cast(value) | static_cast(DalamudStartInfo::WaitMessageboxFlags::BeforeDalamudEntrypoint)); + } + } +} + +void from_json(const nlohmann::json& json, DalamudStartInfo::DotNetOpenProcessHookMode& value) { + if (json.is_number_integer()) { + value = static_cast(json.get()); + + } else if (json.is_string()) { + const auto langstr = unicode::convert(json.get(), &unicode::lower); + if (langstr == "importhooks") + value = DalamudStartInfo::DotNetOpenProcessHookMode::ImportHooks; + else if (langstr == "directhook") + value = DalamudStartInfo::DotNetOpenProcessHookMode::DirectHook; + } +} + +void from_json(const nlohmann::json& json, DalamudStartInfo::ClientLanguage& value) { + if (json.is_number_integer()) { + value = static_cast(json.get()); + + } else if (json.is_string()) { + const auto langstr = unicode::convert(json.get(), &unicode::lower); + if (langstr == "japanese") + value = DalamudStartInfo::ClientLanguage::Japanese; + else if (langstr == "english") + value = DalamudStartInfo::ClientLanguage::English; + else if (langstr == "german") + value = DalamudStartInfo::ClientLanguage::German; + else if (langstr == "french") + value = DalamudStartInfo::ClientLanguage::French; + } +} + +void from_json(const nlohmann::json& json, DalamudStartInfo& config) { + if (!json.is_object()) + return; + + config.WorkingDirectory = json.value("WorkingDirectory", config.WorkingDirectory); + config.ConfigurationPath = json.value("ConfigurationPath", config.ConfigurationPath); + config.PluginDirectory = json.value("PluginDirectory", config.PluginDirectory); + config.DefaultPluginDirectory = json.value("DefaultPluginDirectory", config.DefaultPluginDirectory); + config.AssetDirectory = json.value("AssetDirectory", config.AssetDirectory); + config.Language = json.value("Language", config.Language); + config.GameVersion = json.value("GameVersion", config.GameVersion); + config.DelayInitializeMs = json.value("DelayInitializeMs", config.DelayInitializeMs); + + config.BootLogPath = json.value("BootLogPath", config.BootLogPath); + config.BootShowConsole = json.value("BootShowConsole", config.BootShowConsole); + config.BootDisableFallbackConsole = json.value("BootDisableFallbackConsole", config.BootDisableFallbackConsole); + config.BootWaitMessageBox = json.value("BootWaitMessageBox", config.BootWaitMessageBox); + config.BootWaitDebugger = json.value("BootWaitDebugger", config.BootWaitDebugger); + config.BootVehEnabled = json.value("BootVehEnabled", config.BootVehEnabled); + config.BootVehFull = json.value("BootVehFull", config.BootVehFull); + config.BootEnableEtw = json.value("BootEnableEtw", config.BootEnableEtw); + config.BootDotnetOpenProcessHookMode = json.value("BootDotnetOpenProcessHookMode", config.BootDotnetOpenProcessHookMode); + if (const auto it = json.find("BootEnabledGameFixes"); it != json.end() && it->is_array()) { + config.BootEnabledGameFixes.clear(); + for (const auto& val : *it) + config.BootEnabledGameFixes.insert(unicode::convert(val.get(), &unicode::lower)); + } + if (const auto it = json.find("BootUnhookDlls"); it != json.end() && it->is_array()) { + config.BootUnhookDlls.clear(); + for (const auto& val : *it) + config.BootUnhookDlls.insert(unicode::convert(val.get(), &unicode::lower)); + } +} + +void DalamudStartInfo::from_envvars() { + BootLogPath = utils::get_env(L"DALAMUD_BOOT_LOGFILE"); + BootShowConsole = utils::get_env(L"DALAMUD_SHOW_CONSOLE"); + BootDisableFallbackConsole = utils::get_env(L"DALAMUD_DISABLE_FALLBACK_CONSOLE"); + BootWaitMessageBox = static_cast(utils::get_env(L"DALAMUD_WAIT_MESSAGEBOX")); + BootWaitDebugger = utils::get_env(L"DALAMUD_WAIT_DEBUGGER"); + BootVehEnabled = utils::get_env(L"DALAMUD_IS_VEH"); + BootVehFull = utils::get_env(L"DALAMUD_IS_VEH_FULL"); + BootEnableEtw = utils::get_env(L"DALAMUD_ENABLE_ETW"); + BootDotnetOpenProcessHookMode = static_cast(utils::get_env(L"DALAMUD_DOTNET_OPENPROCESS_HOOKMODE")); + for (const auto& item : utils::get_env_list(L"DALAMUD_GAMEFIX_LIST")) + BootEnabledGameFixes.insert(unicode::convert(item, &unicode::lower)); + for (const auto& item : utils::get_env_list(L"DALAMUD_UNHOOK_DLLS")) + BootUnhookDlls.insert(unicode::convert(item, &unicode::lower)); +} diff --git a/Dalamud.Boot/DalamudStartInfo.h b/Dalamud.Boot/DalamudStartInfo.h new file mode 100644 index 000000000..5477844a1 --- /dev/null +++ b/Dalamud.Boot/DalamudStartInfo.h @@ -0,0 +1,50 @@ +#pragma once + +struct DalamudStartInfo { + enum class WaitMessageboxFlags : int { + None = 0, + BeforeInitialize = 1 << 0, + BeforeDalamudEntrypoint = 1 << 1, + }; + friend void from_json(const nlohmann::json&, WaitMessageboxFlags&); + + enum class DotNetOpenProcessHookMode : int { + ImportHooks = 0, + DirectHook = 1, + }; + friend void from_json(const nlohmann::json&, DotNetOpenProcessHookMode&); + + enum class ClientLanguage : int { + Japanese, + English, + German, + French, + }; + friend void from_json(const nlohmann::json&, ClientLanguage&); + + std::string WorkingDirectory; + std::string ConfigurationPath; + std::string PluginDirectory; + std::string DefaultPluginDirectory; + std::string AssetDirectory; + ClientLanguage Language = ClientLanguage::English; + std::string GameVersion; + int DelayInitializeMs = 0; + + std::string BootLogPath; + bool BootShowConsole = false; + bool BootDisableFallbackConsole = false; + WaitMessageboxFlags BootWaitMessageBox = WaitMessageboxFlags::None; + bool BootWaitDebugger = false; + bool BootVehEnabled = false; + bool BootVehFull = false; + bool BootEnableEtw = false; + DotNetOpenProcessHookMode BootDotnetOpenProcessHookMode = DotNetOpenProcessHookMode::ImportHooks; + std::set BootEnabledGameFixes{}; + std::set BootUnhookDlls{}; + + friend void from_json(const nlohmann::json&, DalamudStartInfo&); + void from_envvars(); +}; + +extern DalamudStartInfo g_startInfo; diff --git a/Dalamud.Boot/dllmain.cpp b/Dalamud.Boot/dllmain.cpp index cb2fa9226..bae192641 100644 --- a/Dalamud.Boot/dllmain.cpp +++ b/Dalamud.Boot/dllmain.cpp @@ -1,74 +1,122 @@ #include "pch.h" +#include "DalamudStartInfo.h" +#include "logging.h" +#include "utils.h" #include "veh.h" +#include "xivfixes.h" HMODULE g_hModule; +HINSTANCE g_hGameInstance = GetModuleHandleW(nullptr); -bool is_running_on_linux() -{ - size_t required_size; - getenv_s(&required_size, nullptr, 0, "XL_WINEONLINUX"); - if (required_size > 0) - { - if (char* is_wine_on_linux = static_cast(malloc(required_size * sizeof(char)))) - { - getenv_s(&required_size, is_wine_on_linux, required_size, "XL_WINEONLINUX"); - auto result = _stricmp(is_wine_on_linux, "true"); - free(is_wine_on_linux); - if (result == 0) - return true; +DllExport DWORD WINAPI Initialize(LPVOID lpParam, HANDLE hMainThreadContinue) { + g_startInfo.from_envvars(); + + std::string jsonParseError; + try { + from_json(nlohmann::json::parse(std::string_view(static_cast(lpParam))), g_startInfo); + } catch (const std::exception& e) { + jsonParseError = e.what(); + } + + if (g_startInfo.BootShowConsole) + ConsoleSetup(L"Dalamud Boot"); + + logging::update_dll_load_status(true); + + const auto logFilePath = unicode::convert(g_startInfo.BootLogPath); + + auto attemptFallbackLog = false; + if (logFilePath.empty()) { + attemptFallbackLog = true; + + logging::I("No log file path given; not logging to file."); + } else { + try { + logging::start_file_logging(logFilePath, !g_startInfo.BootShowConsole); + logging::I("Logging to file: {}", logFilePath); + + } catch (const std::exception& e) { + attemptFallbackLog = true; + + logging::E("Couldn't open log file: {}", logFilePath); + logging::E("Error: {} / {}", errno, e.what()); } } - HMODULE hntdll = GetModuleHandleW(L"ntdll.dll"); - if (!hntdll) // not running on NT - return true; + if (!jsonParseError.empty()) + logging::E("Couldn't parse input JSON: {}", jsonParseError); - FARPROC pwine_get_version = GetProcAddress(hntdll, "wine_get_version"); - FARPROC pwine_get_host_version = GetProcAddress(hntdll, "wine_get_host_version"); - - return pwine_get_version != nullptr || pwine_get_host_version != nullptr; -} - -bool is_veh_enabled() -{ - size_t required_size; - getenv_s(&required_size, nullptr, 0, "DALAMUD_IS_STAGING"); - if (required_size > 0) - { - if (char* is_no_veh = static_cast(malloc(required_size * sizeof(char)))) - { - getenv_s(&required_size, is_no_veh, required_size, "DALAMUD_IS_STAGING"); - auto result = _stricmp(is_no_veh, "true"); - free(is_no_veh); - if (result == 0) - return true; + if (attemptFallbackLog) { + std::wstring logFilePath(PATHCCH_MAX_CCH + 1, L'\0'); + logFilePath.resize(GetTempPathW(static_cast(logFilePath.size()), &logFilePath[0])); + if (logFilePath.empty()) { + logFilePath.resize(PATHCCH_MAX_CCH + 1); + logFilePath.resize(GetCurrentDirectoryW(static_cast(logFilePath.size()), &logFilePath[0])); + } + if (!logFilePath.empty() && logFilePath.back() != '/' && logFilePath.back() != '\\') + logFilePath += L"\\"; + SYSTEMTIME st; + GetLocalTime(&st); + logFilePath += std::format(L"Dalamud.Boot.{:04}{:02}{:02}.{:02}{:02}{:02}.{:03}.{}.log", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, GetCurrentProcessId()); + + try { + logging::start_file_logging(logFilePath, !g_startInfo.BootShowConsole); + logging::I("Logging to fallback log file: {}", logFilePath); + + } catch (const std::exception& e) { + if (!g_startInfo.BootShowConsole && !g_startInfo.BootDisableFallbackConsole) + ConsoleSetup(L"Dalamud Boot - Fallback Console"); + + logging::E("Couldn't open fallback log file: {}", logFilePath); + logging::E("Error: {} / {}", errno, e.what()); } } - return false; -} + auto minHookLoaded = false; + if (const auto mhStatus = MH_Initialize(); mhStatus == MH_OK) { + logging::I("MinHook initialized."); + minHookLoaded = true; + } else if (mhStatus == MH_ERROR_ALREADY_INITIALIZED) { + logging::I("MinHook already initialized."); + minHookLoaded = true; + } else { + logging::E("Failed to initialize MinHook (status={}({}))", MH_StatusToString(mhStatus), static_cast(mhStatus)); + } + + logging::I("Dalamud.Boot Injectable, (c) 2021 XIVLauncher Contributors"); + logging::I("Built at: " __DATE__ "@" __TIME__); -DllExport DWORD WINAPI Initialize(LPVOID lpParam) -{ - #ifndef NDEBUG - ConsoleSetup(L"Dalamud Boot"); - #endif + if (static_cast(g_startInfo.BootWaitMessageBox) & static_cast(DalamudStartInfo::WaitMessageboxFlags::BeforeInitialize)) + MessageBoxW(nullptr, L"Press OK to continue (BeforeInitialize)", L"Dalamud Boot", MB_OK); - printf("Dalamud.Boot Injectable, (c) 2021 XIVLauncher Contributors\nBuilt at: %s@%s\n\n", __DATE__, __TIME__); + if (minHookLoaded) { + logging::I("Applying fixes..."); + xivfixes::apply_all(true); + logging::I("Fixes OK"); + } else { + logging::W("Skipping fixes, as MinHook has failed to load."); + } - wchar_t _module_path[MAX_PATH]; - GetModuleFileNameW(g_hModule, _module_path, sizeof _module_path / 2); - std::filesystem::path fs_module_path(_module_path); + if (g_startInfo.BootWaitDebugger) { + logging::I("Waiting for debugger to attach..."); + while (!IsDebuggerPresent()) + Sleep(100); + logging::I("Debugger attached."); + } - std::wstring runtimeconfig_path = _wcsdup(fs_module_path.replace_filename(L"Dalamud.runtimeconfig.json").c_str()); - std::wstring module_path = _wcsdup(fs_module_path.replace_filename(L"Dalamud.dll").c_str()); + const auto fs_module_path = utils::get_module_path(g_hModule); + const auto runtimeconfig_path = std::filesystem::path(fs_module_path).replace_filename(L"Dalamud.runtimeconfig.json").wstring(); + const auto module_path = std::filesystem::path(fs_module_path).replace_filename(L"Dalamud.dll").wstring(); // ============================== CLR ========================================= // + logging::I("Calling InitializeClrAndGetEntryPoint"); + void* entrypoint_vfn; int result = InitializeClrAndGetEntryPoint( g_hModule, + g_startInfo.BootEnableEtw, runtimeconfig_path, module_path, L"Dalamud.EntryPoint, Dalamud", @@ -79,39 +127,39 @@ DllExport DWORD WINAPI Initialize(LPVOID lpParam) if (result != 0) return result; - typedef void (CORECLR_DELEGATE_CALLTYPE* custom_component_entry_point_fn)(LPVOID); - custom_component_entry_point_fn entrypoint_fn = reinterpret_cast(entrypoint_vfn); + using custom_component_entry_point_fn = void (CORECLR_DELEGATE_CALLTYPE*)(LPVOID, HANDLE); + const auto entrypoint_fn = reinterpret_cast(entrypoint_vfn); // ============================== VEH ======================================== // - printf("Initializing VEH... "); - if(is_running_on_linux()) - { - printf("VEH was disabled, running on linux\n"); - } - else if (is_veh_enabled()) - { - if (veh::add_handler()) - printf("Done!\n"); - else printf("Failed!\n"); - } - else - { - printf("VEH was disabled manually\n"); + logging::I("Initializing VEH..."); + if (utils::is_running_on_linux()) { + logging::I("=> VEH was disabled, running on linux"); + } else if (g_startInfo.BootVehEnabled) { + if (veh::add_handler(g_startInfo.BootVehFull)) + logging::I("=> Done!"); + else + logging::I("=> Failed!"); + } else { + logging::I("VEH was disabled manually"); } // ============================== Dalamud ==================================== // - printf("Initializing Dalamud... "); - entrypoint_fn(lpParam); - printf("Done!\n"); + if (static_cast(g_startInfo.BootWaitMessageBox) & static_cast(DalamudStartInfo::WaitMessageboxFlags::BeforeDalamudEntrypoint)) + MessageBoxW(nullptr, L"Press OK to continue (BeforeDalamudEntrypoint)", L"Dalamud Boot", MB_OK); - #ifndef NDEBUG - fclose(stdin); - fclose(stdout); - fclose(stderr); - FreeConsole(); - #endif + if (hMainThreadContinue) { + // Let the game initialize. + SetEvent(hMainThreadContinue); + } + + // We don't need to do this anymore, Dalamud now loads without needing the window to be there. Speed! + // utils::wait_for_game_window(); + + logging::I("Initializing Dalamud..."); + entrypoint_fn(lpParam, hMainThreadContinue); + logging::I("Done!"); return 0; } @@ -119,13 +167,28 @@ DllExport DWORD WINAPI Initialize(LPVOID lpParam) BOOL APIENTRY DllMain(const HMODULE hModule, const DWORD dwReason, LPVOID lpReserved) { DisableThreadLibraryCalls(hModule); - switch (dwReason) - { + switch (dwReason) { case DLL_PROCESS_ATTACH: g_hModule = hModule; break; + case DLL_PROCESS_DETACH: + // process is terminating; don't bother cleaning up + if (lpReserved) + return TRUE; + + logging::update_dll_load_status(false); + + xivfixes::apply_all(false); + + MH_DisableHook(MH_ALL_HOOKS); + if (const auto mhStatus = MH_Uninitialize(); MH_OK != mhStatus && MH_ERROR_NOT_INITIALIZED != mhStatus) { + logging::E("Failed to uninitialize MinHook (status={})", static_cast(mhStatus)); + __fastfail(logging::MinHookUnload); + } + veh::remove_handler(); + //logging::log_file.close(); break; } return TRUE; diff --git a/Dalamud.Boot/hooks.cpp b/Dalamud.Boot/hooks.cpp new file mode 100644 index 000000000..2619ffa72 --- /dev/null +++ b/Dalamud.Boot/hooks.cpp @@ -0,0 +1,149 @@ +#include "pch.h" + +#include "hooks.h" + +#include "logging.h" + +enum { + LDR_DLL_NOTIFICATION_REASON_LOADED = 1, + LDR_DLL_NOTIFICATION_REASON_UNLOADED = 2, +}; + +struct LDR_DLL_UNLOADED_NOTIFICATION_DATA { + ULONG Flags; //Reserved. + const UNICODE_STRING* FullDllName; //The full path name of the DLL module. + const UNICODE_STRING* BaseDllName; //The base file name of the DLL module. + PVOID DllBase; //A pointer to the base address for the DLL in memory. + ULONG SizeOfImage; //The size of the DLL image, in bytes. +}; + +struct LDR_DLL_LOADED_NOTIFICATION_DATA { + ULONG Flags; //Reserved. + const UNICODE_STRING* FullDllName; //The full path name of the DLL module. + const UNICODE_STRING* BaseDllName; //The base file name of the DLL module. + PVOID DllBase; //A pointer to the base address for the DLL in memory. + ULONG SizeOfImage; //The size of the DLL image, in bytes. +}; + +union LDR_DLL_NOTIFICATION_DATA { + LDR_DLL_LOADED_NOTIFICATION_DATA Loaded; + LDR_DLL_UNLOADED_NOTIFICATION_DATA Unloaded; +}; + +using PLDR_DLL_NOTIFICATION_FUNCTION = VOID CALLBACK(_In_ ULONG NotificationReason, _In_ const LDR_DLL_NOTIFICATION_DATA* NotificationData, _In_opt_ PVOID Context); + +static const auto LdrRegisterDllNotification = utils::loaded_module(GetModuleHandleW(L"ntdll.dll")).get_exported_function("LdrRegisterDllNotification"); +static const auto LdrUnregisterDllNotification = utils::loaded_module(GetModuleHandleW(L"ntdll.dll")).get_exported_function("LdrUnregisterDllNotification"); + +hooks::getprocaddress_singleton_import_hook::getprocaddress_singleton_import_hook() + : m_pfnGetProcAddress(GetProcAddress) + , m_thunk("kernel32!GetProcAddress(Singleton Import Hook)", + [this](HMODULE hModule, LPCSTR lpProcName) { return get_proc_address_handler(hModule, lpProcName); }) { +} + +hooks::getprocaddress_singleton_import_hook::~getprocaddress_singleton_import_hook() { + LdrUnregisterDllNotification(m_ldrDllNotificationCookie); +} + +std::shared_ptr hooks::getprocaddress_singleton_import_hook::set_handler(std::wstring dllName, std::string functionName, void* pfnDetour, std::function fnOnOriginalAddressAvailable) { + const auto hModule = GetModuleHandleW(dllName.c_str()); + if (!hModule) + throw std::out_of_range("Specified DLL is not found."); + + const auto pfn = m_pfnGetProcAddress(hModule, functionName.c_str()); + if (!pfn) + throw std::out_of_range("Could not find the specified function."); + + fnOnOriginalAddressAvailable(pfn); + + auto& target = m_targetFns[hModule][functionName]; + if (target) + throw std::runtime_error("Specified function has already been hooked."); + + target = pfnDetour; + m_dllNameMap[hModule] = unicode::convert(dllName); + for (const auto& mod : utils::loaded_module::all_modules()) + hook_module(mod); + + return { pfn,[pThis = this->shared_from_this(), hModule, functionName](void*) { + auto& modFns = pThis->m_targetFns[hModule]; + auto& hooks = pThis->m_hooks[hModule]; + modFns.erase(functionName); + hooks.erase(functionName); + if (modFns.empty()) { + pThis->m_targetFns.erase(hModule); + pThis->m_hooks.erase(hModule); + pThis->m_dllNameMap.erase(hModule); + } + } }; +} + +std::shared_ptr hooks::getprocaddress_singleton_import_hook::get_instance() { + static std::weak_ptr s_instance; + std::shared_ptr res; + + res = s_instance.lock(); + if (res) + return res; + + static std::mutex m_mtx; + const auto lock = std::lock_guard(m_mtx); + res = s_instance.lock(); + if (res) + return res; + + s_instance = res = std::make_shared(); + res->initialize(); + return res; +} + +void hooks::getprocaddress_singleton_import_hook::initialize() { + m_getProcAddressHandler = set_handler(L"kernel32.dll", "GetProcAddress", m_thunk.get_thunk(), [this](void*) {}); + + LdrRegisterDllNotification(0, [](ULONG notiReason, const LDR_DLL_NOTIFICATION_DATA* pData, void* context) { + if (notiReason == LDR_DLL_NOTIFICATION_REASON_LOADED) { + const auto dllName = unicode::convert(pData->Loaded.FullDllName->Buffer); + logging::I(R"({} "{}" has been loaded at 0x{:X} ~ 0x{:X} (0x{:X}); finding import table items to hook.)", + LogTag, dllName, + reinterpret_cast(pData->Loaded.DllBase), + reinterpret_cast(pData->Loaded.DllBase) + pData->Loaded.SizeOfImage, + pData->Loaded.SizeOfImage); + reinterpret_cast(context)->hook_module(utils::loaded_module(pData->Loaded.DllBase)); + } else if (notiReason == LDR_DLL_NOTIFICATION_REASON_UNLOADED) { + const auto dllName = unicode::convert(pData->Unloaded.FullDllName->Buffer); + logging::I(R"({} "{}" has been unloaded.)", LogTag, dllName); + } + }, this, &m_ldrDllNotificationCookie); +} + +FARPROC hooks::getprocaddress_singleton_import_hook::get_proc_address_handler(HMODULE hModule, LPCSTR lpProcName) { + if (const auto it1 = m_targetFns.find(hModule); it1 != m_targetFns.end()) { + if (const auto it2 = it1->second.find(lpProcName); it2 != it1->second.end()) { + logging::I(R"({} Redirecting GetProcAddress("{}", "{}"))", LogTag, m_dllNameMap[hModule], lpProcName); + + return reinterpret_cast(it2->second); + } + } + return this->m_pfnGetProcAddress(hModule, lpProcName); +} + +void hooks::getprocaddress_singleton_import_hook::hook_module(const utils::loaded_module& mod) { + if (mod.is_current_process()) + return; + + const auto path = unicode::convert(mod.path().wstring()); + + for (const auto& [hModule, targetFns] : m_targetFns) { + for (const auto& [targetFn, pfnThunk] : targetFns) { + const auto& dllName = m_dllNameMap[hModule]; + if (void* pGetProcAddressImport; mod.find_imported_function_pointer(dllName.c_str(), targetFn.c_str(), 0, pGetProcAddressImport)) { + auto& hook = m_hooks[hModule][targetFn][mod]; + if (!hook) { + logging::I("{} Hooking {}!{} imported by {}", LogTag, dllName, targetFn, unicode::convert(mod.path().wstring())); + + hook.emplace(std::format("getprocaddress_singleton_import_hook::hook_module({}!{})", dllName, targetFn), static_cast(pGetProcAddressImport), pfnThunk); + } + } + } + } +} diff --git a/Dalamud.Boot/hooks.h b/Dalamud.Boot/hooks.h new file mode 100644 index 000000000..ad3b2cc6c --- /dev/null +++ b/Dalamud.Boot/hooks.h @@ -0,0 +1,252 @@ +#pragma once + +#include +#include + +#include "utils.h" + +namespace hooks { + class base_untyped_hook { + std::string m_name; + + public: + base_untyped_hook(std::string name) : m_name(name) {} + + virtual ~base_untyped_hook() = default; + + virtual bool check_consistencies() const { + return true; + } + + virtual void assert_dominance() const { + } + + const std::string& name() const { + return m_name; + } + }; + + template + class base_hook; + + template + class base_hook : public base_untyped_hook { + using TFn = TReturn(TArgs...); + + private: + TFn* const m_pfnOriginal; + utils::thunk m_thunk; + + public: + base_hook(std::string name, TFn* pfnOriginal) + : base_untyped_hook(name) + , m_pfnOriginal(pfnOriginal) + , m_thunk(std::move(name), m_pfnOriginal) { + } + + virtual void set_detour(std::function fn) { + if (!fn) + m_thunk.set_target(m_pfnOriginal); + else + m_thunk.set_target(std::move(fn)); + } + + virtual TReturn call_original(TArgs... args) { + return m_pfnOriginal(std::forward(args)...); + } + + protected: + TFn* get_original() const { + return m_pfnOriginal; + } + + TFn* get_thunk() const { + return m_thunk.get_thunk(); + } + }; + + template + class import_hook : public base_hook { + using Base = base_hook; + + TFn** const m_ppfnImportTableItem; + + public: + import_hook(std::string name, TFn** ppfnImportTableItem) + : Base(std::move(name), *ppfnImportTableItem) + , m_ppfnImportTableItem(ppfnImportTableItem) { + + const utils::memory_tenderizer tenderizer(ppfnImportTableItem, sizeof * ppfnImportTableItem, PAGE_READWRITE); + *ppfnImportTableItem = Base::get_thunk(); + } + + import_hook(std::string name, const char* pcszDllName, const char* pcszFunctionName, int hintOrOrdinal) + : import_hook(std::move(name), utils::loaded_module::current_process().get_imported_function_pointer(pcszDllName, pcszFunctionName, hintOrOrdinal)) { + } + + ~import_hook() override { + const utils::memory_tenderizer tenderizer(m_ppfnImportTableItem, sizeof * m_ppfnImportTableItem, PAGE_READWRITE); + *m_ppfnImportTableItem = Base::get_original(); + } + + bool check_consistencies() const override { + return *m_ppfnImportTableItem == Base::get_thunk(); + } + + void assert_dominance() const override { + if (check_consistencies()) + return; + + const utils::memory_tenderizer tenderizer(m_ppfnImportTableItem, sizeof * m_ppfnImportTableItem, PAGE_READWRITE); + *m_ppfnImportTableItem = Base::get_thunk(); + } + }; + + template + class direct_hook; + + template + class direct_hook : public base_hook { + using TFn = TReturn(TArgs...); + using Base = base_hook; + + TFn* m_pfnMinHookBridge; + + public: + direct_hook(std::string name, TFn* pfnFunction) + : Base(std::move(name), pfnFunction) { + if (const auto mhStatus = MH_CreateHook(pfnFunction, Base::get_thunk(), reinterpret_cast(&m_pfnMinHookBridge)); mhStatus != MH_OK) + throw std::runtime_error(std::format("MH_CreateHook(0x{:X}, ...) failure: {}", reinterpret_cast(pfnFunction), static_cast(mhStatus))); + + MH_EnableHook(Base::get_original()); + } + + ~direct_hook() override { + MH_DisableHook(Base::get_original()); + } + + TReturn call_original(TArgs... args) override { + return m_pfnMinHookBridge(std::forward(args)...); + } + }; + + class wndproc_hook : public base_hook> { + using Base = base_hook>; + + const HWND m_hwnd; + + public: + wndproc_hook(std::string name, HWND hwnd) + : Base(std::move(name), reinterpret_cast(GetWindowLongPtrW(hwnd, GWLP_WNDPROC))) + , m_hwnd(hwnd) { + SetWindowLongPtrW(hwnd, GWLP_WNDPROC, reinterpret_cast(Base::get_thunk())); + } + + ~wndproc_hook() override { + SetWindowLongPtrW(m_hwnd, GWLP_WNDPROC, reinterpret_cast(Base::get_original())); + } + + LRESULT call_original(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) override { + return CallWindowProcW(Base::get_original(), hwnd, msg, wParam, lParam); + } + + bool check_consistencies() const override { + return GetWindowLongPtrW(m_hwnd, GWLP_WNDPROC) == reinterpret_cast(Base::get_thunk()); + } + + void assert_dominance() const override { + if (check_consistencies()) + return; + + SetWindowLongPtrW(m_hwnd, GWLP_WNDPROC, reinterpret_cast(Base::get_thunk())); + } + }; + + class untyped_import_hook : public base_untyped_hook { + void** const m_ppfnImportTableItem; + void* const m_pfnOriginalImport; + + public: + untyped_import_hook(std::string name, void** ppfnImportTableItem, void* pThunk) + : base_untyped_hook(std::move(name)) + , m_pfnOriginalImport(*ppfnImportTableItem) + , m_ppfnImportTableItem(ppfnImportTableItem) { + + const utils::memory_tenderizer tenderizer(ppfnImportTableItem, sizeof * ppfnImportTableItem, PAGE_READWRITE); + *ppfnImportTableItem = pThunk; + } + + ~untyped_import_hook() override { + MEMORY_BASIC_INFORMATION mbi{}; + VirtualQuery(m_ppfnImportTableItem, &mbi, sizeof mbi); + if (mbi.State != MEM_COMMIT) + return; + + const utils::memory_tenderizer tenderizer(m_ppfnImportTableItem, sizeof * m_ppfnImportTableItem, PAGE_READWRITE); + *m_ppfnImportTableItem = m_pfnOriginalImport; + } + }; + + class getprocaddress_singleton_import_hook : public std::enable_shared_from_this { + static inline const char* LogTag = "[global_import_hook]"; + + decltype(GetProcAddress)* const m_pfnGetProcAddress; + + utils::thunk m_thunk; + std::shared_ptr m_getProcAddressHandler; + + void* m_ldrDllNotificationCookie{}; + std::map m_dllNameMap; + std::map> m_targetFns; + std::map>>> m_hooks; + + public: + getprocaddress_singleton_import_hook(); + ~getprocaddress_singleton_import_hook(); + + std::shared_ptr set_handler(std::wstring dllName, std::string functionName, void* pfnDetour, std::function fnOnOriginalAddressAvailable); + + static std::shared_ptr get_instance(); + + private: + void initialize(); + + FARPROC get_proc_address_handler(HMODULE hModule, LPCSTR lpProcName); + + void hook_module(const utils::loaded_module& mod); + }; + + template + class global_import_hook; + + template + class global_import_hook : public base_untyped_hook { + using TFn = TReturn(TArgs...); + utils::thunk m_thunk; + std::shared_ptr m_singleImportHook; + + public: + global_import_hook(std::string name, std::wstring dllName, std::string functionName) + : base_untyped_hook(name) + , m_thunk(std::move(name), nullptr) { + + m_singleImportHook = getprocaddress_singleton_import_hook::get_instance()->set_handler( + dllName, + functionName, + m_thunk.get_thunk(), + [this](void* p) { m_thunk.set_target(reinterpret_cast(p)); } + ); + } + + virtual void set_detour(std::function fn) { + if (!fn) + m_thunk.set_target(reinterpret_cast(m_singleImportHook.get())); + else + m_thunk.set_target(std::move(fn)); + } + + virtual TReturn call_original(TArgs... args) { + return reinterpret_cast(m_singleImportHook.get())(std::forward(args)...); + } + }; +} diff --git a/Dalamud.Boot/logging.cpp b/Dalamud.Boot/logging.cpp new file mode 100644 index 000000000..cac9584c0 --- /dev/null +++ b/Dalamud.Boot/logging.cpp @@ -0,0 +1,91 @@ +#define WIN32_LEAN_AND_MEAN +#include + +#include +#include + +#include "logging.h" + +static bool s_bLoaded = false; +static bool s_bSkipLogFileWrite = false; +static std::shared_ptr s_hLogFile; + +void logging::start_file_logging(const std::filesystem::path& path, bool redirect_stderrout) { + if (s_hLogFile) + return; + + try { + if (exists(path) && file_size(path) > 1048576) { + auto oldPath = std::filesystem::path(path); + oldPath.replace_extension(".log.old"); + if (exists(oldPath)) + remove(oldPath); + rename(path, oldPath); + } + } catch (...) { + // whatever + } + + const auto h = CreateFile(path.wstring().c_str(), + GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + nullptr, OPEN_ALWAYS, 0, nullptr); + if (h == INVALID_HANDLE_VALUE) + throw std::runtime_error(std::format("Win32 error {}(0x{:x})", GetLastError(), GetLastError())); + + SetFilePointer(h, 0, 0, FILE_END); + s_hLogFile = {h, &CloseHandle}; + + if (redirect_stderrout) { + SetStdHandle(STD_ERROR_HANDLE, h); + SetStdHandle(STD_OUTPUT_HANDLE, h); + s_bSkipLogFileWrite = true; + } +} + +void logging::update_dll_load_status(bool loaded) { + s_bLoaded = loaded; +} + +template<> +void logging::print(Level level, const char* s) { + SYSTEMTIME st; + GetLocalTime(&st); + + std::string estr; + switch (level) { + case Level::Verbose: + estr = std::format("[{:02}:{:02}:{:02} CPP/VRB] {}\n", st.wHour, st.wMinute, st.wSecond, s); + break; + case Level::Debug: + estr = std::format("[{:02}:{:02}:{:02} CPP/DBG] {}\n", st.wHour, st.wMinute, st.wSecond, s); + break; + case Level::Info: + estr = std::format("[{:02}:{:02}:{:02} CPP/INF] {}\n", st.wHour, st.wMinute, st.wSecond, s); + break; + case Level::Warning: + estr = std::format("[{:02}:{:02}:{:02} CPP/WRN] {}\n", st.wHour, st.wMinute, st.wSecond, s); + break; + case Level::Error: + estr = std::format("[{:02}:{:02}:{:02} CPP/ERR] {}\n", st.wHour, st.wMinute, st.wSecond, s); + break; + case Level::Fatal: + estr = std::format("[{:02}:{:02}:{:02} CPP/FTL] {}\n", st.wHour, st.wMinute, st.wSecond, s); + break; + default: + estr = std::format("[{:02}:{:02}:{:02} CPP/???] {}\n", st.wHour, st.wMinute, st.wSecond, s); + break; + } + + OutputDebugStringW(unicode::convert(estr).c_str()); + + // Handle accesses should not be done during DllMain process attach/detach calls + if (s_bLoaded) { + DWORD wr{}; + WriteFile(GetStdHandle(STD_ERROR_HANDLE), &estr[0], static_cast(estr.size()), &wr, nullptr); + + if (s_hLogFile && !s_bSkipLogFileWrite) { + WriteFile(s_hLogFile.get(), &estr[0], static_cast(estr.size()), &wr, nullptr); + } + } +} diff --git a/Dalamud.Boot/logging.h b/Dalamud.Boot/logging.h new file mode 100644 index 000000000..ad6a9d73e --- /dev/null +++ b/Dalamud.Boot/logging.h @@ -0,0 +1,125 @@ +#pragma once + +#include +#include +#include + +#include "unicode.h" + +namespace logging { + enum class Level : int { + Verbose = 0, + Debug = 1, + Info = 2, + Warning = 3, + Error = 4, + Fatal = 5, + }; + + enum FastFailErrorCode : int { + Unspecified = 12345, + MinHookUnload, + }; + + /** + * @brief Starts writing log to specified file. + */ + void start_file_logging(const std::filesystem::path& path, bool redirect_stderrout = false); + + /** + * @brief Marks this DLL either as loaded or unloaded, top prevent accessing handles when the DLL is not loaded. + */ + void update_dll_load_status(bool loaded); + + /** + * @brief Prints log, unformatted. + * @param level Log level. + * @param s Log to print, as a C-string. + */ + template + void print(Level level, const TElem* s) { print(level, unicode::convert(s).c_str()); } + + /** + * @brief Prints log, unformatted. + * @param level Log level. + * @param s Log to print, as a basic_string. + */ + template, typename TAlloc = std::allocator> + void print(Level level, const std::basic_string& s) { print(level, s.c_str()); } + + /** + * @brief Prints log, unformatted. + * @param level Log level. + * @param s Log to print, as a basic_string_view. + */ + template> + void print(Level level, const std::basic_string_view& s) { print(level, unicode::convert(s).c_str()); } + + template<> + void print(Level level, const char* s); + + template + struct is_basic_string : std::false_type {}; + + template + struct is_basic_string> : std::true_type {}; + + template + inline constexpr auto is_basic_string_v = is_basic_string::value; + + template + struct is_basic_string_view : std::false_type {}; + + template + struct is_basic_string_view> : std::true_type {}; + + template + inline constexpr auto is_basic_string_view_v = is_basic_string_view::value; + + template + auto to_format_arg(T&& x) { + using Td = std::remove_cvref_t; + if constexpr (std::is_pointer_v) { + using Tdd = std::remove_cvref_t>; + if constexpr (std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v) + return unicode::convert(x); + else + return std::forward(x); + + } else { + if constexpr (is_basic_string_v || is_basic_string_view_v) { + using Tdd = Td::value_type; + if constexpr (std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v) + return unicode::convert(x); + else + return std::forward(x); + + } else if constexpr (std::is_same_v) { + auto u8s = x.u8string(); + return std::move(*reinterpret_cast(&u8s)); + + } else { + return std::forward(x); + } + } + } + + /** + * @brief Prints log, formatted. + * @param level Log level. + * @param fmt C-string. + * @param arg1 First format parameter. + * @param args Second and further format parameters, if any. + */ + template + void print(Level level, const char* fmt, Arg&& arg1, Args&&...args) { + print(level, std::vformat(fmt, std::make_format_args(to_format_arg(std::forward(arg1)), to_format_arg(std::forward(args))...))); + } + + template void V(Args&&...args) { print(Level::Verbose, std::forward(args)...); } + template void D(Args&&...args) { print(Level::Debug, std::forward(args)...); } + template void I(Args&&...args) { print(Level::Info, std::forward(args)...); } + template void W(Args&&...args) { print(Level::Warning, std::forward(args)...); } + template void E(Args&&...args) { print(Level::Error, std::forward(args)...); } + template void F(Args&&...args) { print(Level::Fatal, std::forward(args)...); } +} diff --git a/Dalamud.Boot/pch.h b/Dalamud.Boot/pch.h index 3c2bd6c4b..bbd4b3d73 100644 --- a/Dalamud.Boot/pch.h +++ b/Dalamud.Boot/pch.h @@ -8,7 +8,8 @@ #define PCH_H // Exclude rarely-used stuff from Windows headers -#define WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX // Windows Header Files #include @@ -17,25 +18,52 @@ #include #include #include +#include +#include + +// MSVC Compiler Intrinsic +#include // C++ Standard Libraries #include #include +#include #include #include #include +#include +#include +#include +#include #include +#include #include +#include + +// https://www.akenotsuki.com/misc/srell/en/ +#include "../lib/srell3_009/single-header/srell.hpp" + +// https://github.com/TsudaKageyu/minhook +#include "../lib/TsudaKageyu-minhook/include/MinHook.h" + +// https://github.com/Nomade040/nmd +#include "../lib/Nomade040-nmd/nmd_assembly.h" // https://github.com/dotnet/coreclr -#include "..\lib\CoreCLR\CoreCLR.h" -#include "..\lib\CoreCLR\boot.h" +#include "../lib/CoreCLR/CoreCLR.h" +#include "../lib/CoreCLR/boot.h" + +// https://github.com/nlohmann/json +#include "../lib/nlohmann-json/json.hpp" + +#include "unicode.h" // Commonly used macros #define DllExport extern "C" __declspec(dllexport) // Global variables extern HMODULE g_hModule; +extern HINSTANCE g_hGameInstance; extern std::optional g_clr; #endif //PCH_H diff --git a/Dalamud.Boot/pch_nmd_assembly_impl.cpp b/Dalamud.Boot/pch_nmd_assembly_impl.cpp new file mode 100644 index 000000000..6f3af675a --- /dev/null +++ b/Dalamud.Boot/pch_nmd_assembly_impl.cpp @@ -0,0 +1,2 @@ +#define NMD_ASSEMBLY_IMPLEMENTATION +#include "../lib/Nomade040-nmd/nmd_assembly.h" diff --git a/Dalamud.Boot/rewrite_entrypoint.cpp b/Dalamud.Boot/rewrite_entrypoint.cpp index c79960859..5a585da7a 100644 --- a/Dalamud.Boot/rewrite_entrypoint.cpp +++ b/Dalamud.Boot/rewrite_entrypoint.cpp @@ -1,6 +1,8 @@ #include "pch.h" -DllExport DWORD WINAPI Initialize(LPVOID lpParam); +#include "logging.h" + +DllExport DWORD WINAPI Initialize(LPVOID lpParam, HANDLE hMainThreadContinue); struct RewrittenEntryPointParameters { void* pAllocation; @@ -231,28 +233,14 @@ void* get_mapped_image_base_address(HANDLE hProcess, const std::filesystem::path return mbi.AllocationBase; - } catch (const std::filesystem::filesystem_error& e) { - printf("%s", e.what()); + } catch (const std::exception& e) { + logging::W("Failed to check memory block 0x{:X}(len=0x{:X}): {}", mbi.BaseAddress, mbi.RegionSize, e.what()); continue; } } throw std::runtime_error("corresponding base address not found"); } -/// @brief Find the game main window. -/// @return Handle to the game main window, or nullptr if it doesn't exist (yet). -HWND try_find_game_window() { - HWND hwnd = nullptr; - while ((hwnd = FindWindowExW(nullptr, hwnd, L"FFXIVGAME", nullptr))) { - DWORD pid; - GetWindowThreadProcessId(hwnd, &pid); - - if (pid == GetCurrentProcessId() && IsWindowVisible(hwnd)) - break; - } - return hwnd; -} - std::string from_utf16(const std::wstring& wstr, UINT codePage = CP_UTF8) { std::string str(WideCharToMultiByte(codePage, 0, &wstr[0], static_cast(wstr.size()), nullptr, 0, nullptr, nullptr), 0); WideCharToMultiByte(codePage, 0, &wstr[0], static_cast(wstr.size()), &str[0], static_cast(str.size()), nullptr, nullptr); @@ -358,15 +346,6 @@ DllExport DWORD WINAPI RewriteRemoteEntryPoint(HANDLE hProcess, const wchar_t* p return RewriteRemoteEntryPointW(hProcess, pcwzPath, to_utf16(pcszLoadInfo).c_str()); } -void wait_for_game_window() { - HWND game_window; - while (!(game_window = try_find_game_window())) { - WaitForInputIdle(GetCurrentProcess(), INFINITE); - Sleep(100); - }; - SendMessageW(game_window, WM_NULL, 0, 0); -} - /// @brief Entry point function "called" instead of game's original main entry point. /// @param params Parameters set up from RewriteRemoteEntryPoint. DllExport void WINAPI RewrittenEntryPoint(RewrittenEntryPointParameters& params) { @@ -379,23 +358,17 @@ DllExport void WINAPI RewrittenEntryPoint(RewrittenEntryPointParameters& params) params.hMainThread = CreateThread(nullptr, 0, [](void* p) -> DWORD { try { std::string loadInfo; + auto& params = *reinterpret_cast(p); { - auto& params = *reinterpret_cast(p); - // Restore original entry point. // Use WriteProcessMemory instead of memcpy to avoid having to fiddle with VirtualProtect. write_process_memory_or_throw(GetCurrentProcess(), params.pEntrypoint, params.pEntrypointBytes, params.entrypointLength); // Make a copy of load info, as the whole params will be freed after this code block. loadInfo = params.pLoadInfo; - - // Let the game initialize. - SetEvent(params.hMainThreadContinue); } - wait_for_game_window(); - - Initialize(&loadInfo[0]); + Initialize(&loadInfo[0], params.hMainThreadContinue); return 0; } catch (const std::exception& e) { MessageBoxA(nullptr, std::format("Failed to load Dalamud.\n\nError: {}", e.what()).c_str(), "Dalamud.Boot", MB_OK | MB_ICONERROR); diff --git a/Dalamud.Boot/unicode.cpp b/Dalamud.Boot/unicode.cpp new file mode 100644 index 000000000..b558d667a --- /dev/null +++ b/Dalamud.Boot/unicode.cpp @@ -0,0 +1,245 @@ +#include "unicode.h" + +size_t unicode::decode(EncodingTag, char32_t& out, const char8_t* in, size_t nRemainingBytes, bool strict) { + if (nRemainingBytes == 0) { + out = 0; + return 0; + } + + if (0 == (*in & 0x80)) { + out = *in; + return 1; + } + + if (0xC0 == (*in & 0xE0)) { + if (nRemainingBytes < 2) goto invalid; + if (0x80 != (in[1] & 0xC0)) goto invalid; + out = ( + ((static_cast(in[0]) & 0x1F) << 6) | + ((static_cast(in[1]) & 0x3F) << 0)); + return 2; + } + + if (0xE0 == (*in & 0xF0)) { + if (nRemainingBytes < 3) goto invalid; + if (0x80 != (in[1] & 0xC0)) goto invalid; + if (0x80 != (in[2] & 0xC0)) goto invalid; + out = static_cast( + ((static_cast(in[0]) & 0x0F) << 12) | + ((static_cast(in[1]) & 0x3F) << 6) | + ((static_cast(in[2]) & 0x3F) << 0)); + return 3; + } + + if (0xF0 == (*in & 0xF8)) { + if (nRemainingBytes < 4) goto invalid; + if (0x80 != (in[1] & 0xC0)) goto invalid; + if (0x80 != (in[2] & 0xC0)) goto invalid; + if (0x80 != (in[3] & 0xC0)) goto invalid; + out = ( + ((static_cast(in[0]) & 0x07) << 18) | + ((static_cast(in[1]) & 0x3F) << 12) | + ((static_cast(in[2]) & 0x3F) << 6) | + ((static_cast(in[3]) & 0x3F) << 0)); + return 4; + } + + if (!strict) { + if (0xF8 == (*in & 0xFC)) { + if (nRemainingBytes < 5) goto invalid; + if (0x80 != (in[1] & 0xC0)) goto invalid; + if (0x80 != (in[2] & 0xC0)) goto invalid; + if (0x80 != (in[3] & 0xC0)) goto invalid; + if (0x80 != (in[4] & 0xC0)) goto invalid; + out = ( + ((static_cast(in[0]) & 0x07) << 24) | + ((static_cast(in[1]) & 0x3F) << 18) | + ((static_cast(in[2]) & 0x3F) << 12) | + ((static_cast(in[3]) & 0x3F) << 6) | + ((static_cast(in[4]) & 0x3F) << 0)); + return 4; + } + + if (0xFC == (*in & 0xFE)) { + if (nRemainingBytes < 6) goto invalid; + if (0x80 != (in[1] & 0xC0)) goto invalid; + if (0x80 != (in[2] & 0xC0)) goto invalid; + if (0x80 != (in[3] & 0xC0)) goto invalid; + if (0x80 != (in[4] & 0xC0)) goto invalid; + if (0x80 != (in[5] & 0xC0)) goto invalid; + out = ( + ((static_cast(in[0]) & 0x07) << 30) | + ((static_cast(in[1]) & 0x3F) << 24) | + ((static_cast(in[2]) & 0x3F) << 18) | + ((static_cast(in[3]) & 0x3F) << 12) | + ((static_cast(in[4]) & 0x3F) << 6) | + ((static_cast(in[5]) & 0x3F) << 0)); + return 5; + } + } + +invalid: + out = UReplacement; + return 1; +} + +size_t unicode::decode(EncodingTag, char32_t& out, const char16_t* in, size_t nRemainingBytes, bool strict) { + if (nRemainingBytes == 0) { + out = 0; + return 0; + } + + if ((*in & 0xFC00) == 0xD800) { + if (nRemainingBytes < 2 || (in[1] & 0xFC00) != 0xDC00) + goto invalid; + out = 0x10000 + ( + ((static_cast(in[0]) & 0x03FF) << 10) | + ((static_cast(in[1]) & 0x03FF) << 0) + ); + return 2; + } + + if (0xD800 <= *in && *in <= 0xDFFF && strict) + out = UReplacement; + else + out = *in; + return 1; + +invalid: + out = UReplacement; + return 1; +} + +size_t unicode::decode(EncodingTag, char32_t& out, const char32_t* in, size_t nRemainingBytes, bool strict) { + if (nRemainingBytes == 0) { + out = 0; + return 0; + } + + out = *in; + return 1; +} + +size_t unicode::decode(EncodingTag, char32_t& out, const char* in, size_t nRemainingBytes, bool strict) { + return decode(EncodingTag(), out, reinterpret_cast(in), nRemainingBytes, strict); +} + +size_t unicode::decode(EncodingTag, char32_t& out, const wchar_t* in, size_t nRemainingBytes, bool strict) { + return decode(EncodingTag(), out, reinterpret_cast(in), nRemainingBytes, strict); +} + +size_t unicode::encode(EncodingTag, char8_t* ptr, char32_t c, bool strict) { + if (c < (1 << 7)) { + if (ptr) + *(ptr++) = static_cast(c); + return 1; + } + + if (c < (1 << (5 + 6))) { + if (ptr) { + *(ptr++) = 0xC0 | static_cast(c >> 6); + *(ptr++) = 0x80 | static_cast((c >> 0) & 0x3F); + } + return 2; + } + if (c < (1 << (4 + 6 + 6))) { + if (ptr) { + *(ptr++) = 0xE0 | static_cast(c >> 12); + *(ptr++) = 0x80 | static_cast((c >> 6) & 0x3F); + *(ptr++) = 0x80 | static_cast((c >> 0) & 0x3F); + } + return 3; + } + + if (c < (1 << (3 + 6 + 6 + 6))) { + if (ptr) { + *(ptr++) = 0xF0 | static_cast(c >> 18); + *(ptr++) = 0x80 | static_cast((c >> 12) & 0x3F); + *(ptr++) = 0x80 | static_cast((c >> 6) & 0x3F); + *(ptr++) = 0x80 | static_cast((c >> 0) & 0x3F); + } + return 4; + } + + if (strict) { + if (ptr) { // Replacement character U+FFFD + *(ptr++) = 0xEF; + *(ptr++) = 0xBF; + *(ptr++) = 0xBD; + } + return 3; + } + + if (c < (1 << (3 + 6 + 6 + 6 + 6))) { + if (ptr) { + *(ptr++) = 0xF8 | static_cast(c >> 24); + *(ptr++) = 0x80 | static_cast((c >> 18) & 0x3F); + *(ptr++) = 0x80 | static_cast((c >> 12) & 0x3F); + *(ptr++) = 0x80 | static_cast((c >> 6) & 0x3F); + *(ptr++) = 0x80 | static_cast((c >> 0) & 0x3F); + } + return 5; + } + + if (ptr) { + *(ptr++) = 0xFC | static_cast(c >> 30); + *(ptr++) = 0x80 | static_cast((c >> 24) & 0x3F); + *(ptr++) = 0x80 | static_cast((c >> 18) & 0x3F); + *(ptr++) = 0x80 | static_cast((c >> 12) & 0x3F); + *(ptr++) = 0x80 | static_cast((c >> 6) & 0x3F); + *(ptr++) = 0x80 | static_cast((c >> 0) & 0x3F); + } + return 6; +} + +size_t unicode::encode(EncodingTag, char16_t* ptr, char32_t c, bool strict) { + if (c < 0x10000) { + if (ptr) { + if (0xD800 <= c && c <= 0xDFFF && strict) + *(ptr++) = 0xFFFD; + else + *(ptr++) = static_cast(c); + } + return 1; + } + + c -= 0x10000; + + if (c < (1 << 20)) { + if (ptr) { + *(ptr++) = 0xD800 | static_cast((c >> 10) & 0x3FF); + *(ptr++) = 0xDC00 | static_cast((c >> 0) & 0x3FF); + } + return 2; + } + + if (ptr) + *(ptr++) = 0xFFFD; + return 1; +} + +size_t unicode::encode(EncodingTag, char32_t* ptr, char32_t c, bool strict) { + if (ptr) + *ptr = c; + return 1; +} + +size_t unicode::encode(EncodingTag, char* ptr, char32_t c, bool strict) { + return encode(EncodingTag(), reinterpret_cast(ptr), c, strict); +} + +size_t unicode::encode(EncodingTag, wchar_t* ptr, char32_t c, bool strict) { + return encode(EncodingTag(), reinterpret_cast(ptr), c, strict); +} + +char32_t unicode::lower(char32_t in) { + if ('A' <= in && in <= 'Z') + return in - 'A' + 'a'; + return in; +} + +char32_t unicode::upper(char32_t in) { + if ('a' <= in && in <= 'z') + return in - 'a' + 'A'; + return in; +} diff --git a/Dalamud.Boot/unicode.h b/Dalamud.Boot/unicode.h new file mode 100644 index 000000000..c4e26bb41 --- /dev/null +++ b/Dalamud.Boot/unicode.h @@ -0,0 +1,108 @@ +#pragma once + +#include +#include +#include +#include + +namespace unicode { + constexpr char32_t UReplacement = U'\uFFFD'; + constexpr char32_t UInvalid = U'\uFFFF'; + + template struct EncodingTag {}; + + size_t decode(EncodingTag, char32_t& out, const char8_t* in, size_t nRemainingBytes, bool strict); + + size_t decode(EncodingTag, char32_t& out, const char16_t* in, size_t nRemainingBytes, bool strict); + + size_t decode(EncodingTag, char32_t& out, const char32_t* in, size_t nRemainingBytes, bool strict); + + size_t decode(EncodingTag, char32_t& out, const char* in, size_t nRemainingBytes, bool strict); + + size_t decode(EncodingTag, char32_t& out, const wchar_t* in, size_t nRemainingBytes, bool strict); + + template + inline size_t decode(char32_t& out, const T* in, size_t nRemainingBytes, bool strict = true) { + return decode(EncodingTag(), out, in, nRemainingBytes, strict); + } + + size_t encode(EncodingTag, char8_t* ptr, char32_t c, bool strict); + + size_t encode(EncodingTag, char16_t* ptr, char32_t c, bool strict); + + size_t encode(EncodingTag, char32_t* ptr, char32_t c, bool strict); + + size_t encode(EncodingTag, char* ptr, char32_t c, bool strict); + + size_t encode(EncodingTag, wchar_t* ptr, char32_t c, bool strict); + + template + inline size_t encode(T* ptr, char32_t c, bool strict = true) { + return encode(EncodingTag(), ptr, c, strict); + } + + char32_t lower(char32_t in); + char32_t upper(char32_t in); + + template> + TTo& convert(TTo& out, const std::basic_string_view& in, char32_t(*pfnCharMap)(char32_t) = nullptr, bool strict = false) { + out.reserve(out.size() + in.size() * 4 / sizeof(in[0]) / sizeof(out[0])); + + char32_t c{}; + for (size_t decLen = 0, decIdx = 0; decIdx < in.size() && ((decLen = decode(c, &in[decIdx], in.size() - decIdx, strict))); decIdx += decLen) { + if (pfnCharMap) + c = pfnCharMap(c); + + const auto encIdx = out.size(); + const auto encLen = encode(nullptr, c, strict); + out.resize(encIdx + encLen); + encode(&out[encIdx], c, strict); + } + + return out; + } + + template, class TFromAlloc = std::allocator> + TTo& convert(TTo& out, const std::basic_string& in, char32_t(*pfnCharMap)(char32_t) = nullptr, bool strict = false) { + return convert(out, std::basic_string_view(in), pfnCharMap, strict); + } + + template>> + TTo& convert(TTo& out, const TFromElem* in, size_t length = (std::numeric_limits::max)(), char32_t(*pfnCharMap)(char32_t) = nullptr, bool strict = false) { + if (length == (std::numeric_limits::max)()) + length = std::char_traits::length(in); + + return convert(out, std::basic_string_view(in, length), pfnCharMap, strict); + } + + template> + TTo convert(const std::basic_string_view& in, char32_t(*pfnCharMap)(char32_t) = nullptr, bool strict = false) { + TTo out{}; + return convert(out, in, pfnCharMap, strict); + } + + template, class TFromAlloc = std::allocator> + TTo convert(const std::basic_string& in, char32_t(*pfnCharMap)(char32_t) = nullptr, bool strict = false) { + TTo out{}; + return convert(out, std::basic_string_view(in), pfnCharMap, strict); + } + + template>> + TTo convert(const TFromElem* in, size_t length = (std::numeric_limits::max)(), char32_t(*pfnCharMap)(char32_t) = nullptr, bool strict = false) { + if (length == (std::numeric_limits::max)()) + length = std::char_traits::length(in); + + TTo out{}; + return convert(out, std::basic_string_view(in, length), pfnCharMap, strict); + } + + inline const std::u8string& convert(const std::u8string& in) { return in; } + + inline const std::u16string& convert(const std::u16string& in) { return in; } + + inline const std::u32string& convert(const std::u32string& in) { return in; } + + inline const std::string& convert(const std::string& in) { return in; } + + inline const std::wstring& convert(const std::wstring& in) { return in; } +} diff --git a/Dalamud.Boot/utils.cpp b/Dalamud.Boot/utils.cpp new file mode 100644 index 000000000..f51ef7e49 --- /dev/null +++ b/Dalamud.Boot/utils.cpp @@ -0,0 +1,522 @@ +#include "pch.h" + +#include "utils.h" + +std::filesystem::path utils::loaded_module::path() const { + std::wstring buf(MAX_PATH, L'\0'); + for (;;) { + if (const auto len = GetModuleFileNameExW(GetCurrentProcess(), m_hModule, &buf[0], static_cast(buf.size())); len != buf.size()) { + if (buf.empty()) + throw std::runtime_error(std::format("Failed to resolve module path: Win32 error {}", GetLastError())); + buf.resize(len); + return buf; + } + + if (buf.size() * 2 < PATHCCH_MAX_CCH) + buf.resize(buf.size() * 2); + else if (auto p = std::filesystem::path(buf); exists(p)) + return p; + else + throw std::runtime_error("Failed to resolve module path: no amount of buffer size would fit the data"); + } +} + +bool utils::loaded_module::owns_address(const void* pAddress) const { + const auto pcAddress = reinterpret_cast(pAddress); + const auto pcModule = reinterpret_cast(m_hModule); + return pcModule <= pcAddress && pcAddress <= pcModule + (is_pe64() ? nt_header64().OptionalHeader.SizeOfImage : nt_header32().OptionalHeader.SizeOfImage); +} + +std::span utils::loaded_module::section_headers() const { + const auto& dosHeader = ref_as(0); + const auto& ntHeader32 = ref_as(dosHeader.e_lfanew); + // Since this does not refer to OptionalHeader32/64 else than its offset, we can use either. + return { IMAGE_FIRST_SECTION(&ntHeader32), ntHeader32.FileHeader.NumberOfSections }; +} + +IMAGE_SECTION_HEADER& utils::loaded_module::section_header(const char* pcszSectionName) const { + for (auto& section : section_headers()) { + if (strncmp(reinterpret_cast(section.Name), pcszSectionName, IMAGE_SIZEOF_SHORT_NAME) == 0) + return section; + } + + throw std::out_of_range(std::format("Section [{}] not found", pcszSectionName)); +} + +std::span utils::loaded_module::section(size_t index) const { + auto& sectionHeader = section_headers()[index]; + return { address(sectionHeader.VirtualAddress), sectionHeader.Misc.VirtualSize }; +} + +std::span utils::loaded_module::section(const char* pcszSectionName) const { + auto& sectionHeader = section_header(pcszSectionName); + return { address(sectionHeader.VirtualAddress), sectionHeader.Misc.VirtualSize }; +} + +template +static bool find_imported_function_pointer_helper(const char* pcBaseAddress, const IMAGE_IMPORT_DESCRIPTOR& desc, const IMAGE_DATA_DIRECTORY& dir, std::string_view reqFunc, uint32_t hintOrOrdinal, void*& ppFunctionAddress) { + const auto importLookupsOversizedSpan = std::span(reinterpret_cast(&pcBaseAddress[desc.OriginalFirstThunk]), (dir.Size - desc.OriginalFirstThunk) / sizeof(TEntryType)); + const auto importAddressesOversizedSpan = std::span(reinterpret_cast(&pcBaseAddress[desc.FirstThunk]), (dir.Size - desc.FirstThunk) / sizeof(TEntryType)); + + for (size_t i = 0, i_ = (std::min)(importLookupsOversizedSpan.size(), importAddressesOversizedSpan.size()); i < i_ && importLookupsOversizedSpan[i] && importAddressesOversizedSpan[i]; i++) { + const auto& importLookup = importLookupsOversizedSpan[i]; + const auto& importAddress = importAddressesOversizedSpan[i]; + const auto& importByName = *reinterpret_cast(&pcBaseAddress[importLookup]); + + // Is this entry importing by ordinals? A lot of socket functions are the case. + if (IMAGE_SNAP_BY_ORDINAL32(importLookup)) { + + // Is this the entry? + if (!hintOrOrdinal || IMAGE_ORDINAL32(importLookup) != hintOrOrdinal) + continue; + + // Is this entry not importing by ordinals, and are we using hint exclusively to find the entry? + } else if (reqFunc.empty()) { + + // Is this the entry? + if (importByName.Hint != hintOrOrdinal) + continue; + + } else { + + // Name must be contained in this directory. + auto currFunc = std::string_view(importByName.Name, (std::min)(&pcBaseAddress[dir.Size] - importByName.Name, reqFunc.size())); + currFunc = currFunc.substr(0, strnlen(currFunc.data(), currFunc.size())); + + // Is this the entry? (Case sensitive) + if (reqFunc != currFunc) + continue; + } + + // Found the entry; return the address of the pointer to the target function. + ppFunctionAddress = const_cast(reinterpret_cast(&importAddress)); + return true; + } + + return false; +} + +bool utils::loaded_module::find_imported_function_pointer(const char* pcszDllName, const char* pcszFunctionName, uint32_t hintOrOrdinal, void*& ppFunctionAddress) const { + const auto requestedDllName = std::string_view(pcszDllName, strlen(pcszDllName)); + const auto requestedFunctionName = pcszFunctionName ? std::string_view(pcszFunctionName, strlen(pcszFunctionName)) : std::string_view(); + const auto& directory = data_directory(IMAGE_DIRECTORY_ENTRY_IMPORT); + ppFunctionAddress = nullptr; + + // This span might be too long in terms of meaningful data; it only serves to prevent accessing memory outsides boundaries. + for (const auto& importDescriptor : span_as(directory.VirtualAddress, directory.Size / sizeof IMAGE_IMPORT_DESCRIPTOR)) { + + // Having all zero values signals the end of the table. We didn't find anything. + if (!importDescriptor.OriginalFirstThunk && !importDescriptor.TimeDateStamp && !importDescriptor.ForwarderChain && !importDescriptor.FirstThunk) + return false; + + // Skip invalid entries, just in case. + if (!importDescriptor.Name || !importDescriptor.OriginalFirstThunk) + continue; + + // Name must be contained in this directory. + if (importDescriptor.Name < directory.VirtualAddress) + continue; + auto currentDllName = std::string_view(address_as(importDescriptor.Name), (std::min)(directory.Size - importDescriptor.Name, requestedDllName.size())); + currentDllName = currentDllName.substr(0, strnlen(currentDllName.data(), currentDllName.size())); + + // Is this entry about the DLL that we're looking for? (Case insensitive) + if (requestedDllName.size() != currentDllName.size() || _strcmpi(requestedDllName.data(), currentDllName.data())) + continue; + + if (is_pe64()) { + if (find_imported_function_pointer_helper(address(), importDescriptor, directory, requestedFunctionName, hintOrOrdinal, ppFunctionAddress)) + return true; + } else { + if (find_imported_function_pointer_helper(address(), importDescriptor, directory, requestedFunctionName, hintOrOrdinal, ppFunctionAddress)) + return true; + } + } + + // Found nothing. + return false; +} + +void* utils::loaded_module::get_imported_function_pointer(const char* pcszDllName, const char* pcszFunctionName, uint32_t hintOrOrdinal) const { + if (void* ppImportTableItem{}; find_imported_function_pointer(pcszDllName, pcszFunctionName, hintOrOrdinal, ppImportTableItem)) + return ppImportTableItem; + + throw std::runtime_error("Failed to find import for kernel32!OpenProcess."); +} + +utils::loaded_module utils::loaded_module::current_process() { + return { GetModuleHandleW(nullptr) }; +} + +std::vector utils::loaded_module::all_modules() { + std::vector hModules(128); + for (DWORD dwNeeded{}; EnumProcessModules(GetCurrentProcess(), &hModules[0], static_cast(std::span(hModules).size_bytes()), &dwNeeded) && hModules.size() < dwNeeded;) + hModules.resize(hModules.size() + 128); + + std::vector modules; + modules.reserve(hModules.size()); + for (const auto hModule : hModules) { + if (!hModule) + break; + modules.emplace_back(hModule); + } + + return modules; +} + +utils::signature_finder& utils::signature_finder::look_in(const void* pFirst, size_t length) { + if (length) + m_ranges.emplace_back(std::span(reinterpret_cast(pFirst), length)); + + return *this; +} + +utils::signature_finder& utils::signature_finder::look_in(const loaded_module& m, const char* sectionName) { + return look_in(m.section(sectionName)); +} + +utils::signature_finder& utils::signature_finder::look_for(std::string_view pattern, std::string_view mask, char cExactMatch, char cWildcard) { + if (pattern.size() != mask.size()) + throw std::runtime_error("Length of pattern does not match the length of mask."); + + std::string buf; + buf.reserve(pattern.size() * 4); + for (size_t i = 0; i < pattern.size(); i++) { + const auto c = pattern[i]; + if (mask[i] == cWildcard) { + buf.push_back('.'); + } else if (mask[i] == cExactMatch) { + buf.push_back('\\'); + buf.push_back('x'); + buf.push_back((c >> 4) < 10 ? (c >> 4) - 10 : 'A' + (c >> 4) - 10); + buf.push_back((c & 15) < 10 ? (c & 15) - 10 : 'A' + (c & 15) - 10); + } + } + m_patterns.emplace_back(buf); + return *this; +} + +utils::signature_finder& utils::signature_finder::look_for(std::string_view pattern, char wildcardMask) { + std::string buf; + buf.reserve(pattern.size() * 4); + for (const auto& c : pattern) { + if (c == wildcardMask) { + buf.push_back('.'); + } else { + buf.push_back('\\'); + buf.push_back('x'); + buf.push_back((c >> 4) < 10 ? '0' + (c >> 4) : 'A' + (c >> 4) - 10); + buf.push_back((c & 15) < 10 ? '0' + (c & 15) : 'A' + (c & 15) - 10); + } + } + m_patterns.emplace_back(buf); + return *this; +} + +utils::signature_finder& utils::signature_finder::look_for(std::string_view pattern) { + std::string buf; + buf.reserve(pattern.size() * 4); + for (const auto& c : pattern) { + buf.push_back('\\'); + buf.push_back('x'); + buf.push_back((c >> 4) < 10 ? '0' + (c >> 4) : 'A' + (c >> 4) - 10); + buf.push_back((c & 15) < 10 ? '0' + (c & 15) : 'A' + (c & 15) - 10); + } + m_patterns.emplace_back(buf); + return *this; +} + +utils::signature_finder& utils::signature_finder::look_for_hex(std::string_view pattern) { + std::string buf; + buf.reserve(pattern.size()); + bool bHighByte = true; + for (size_t i = 0; i < pattern.size(); i++) { + int n = -1; + if ('0' <= pattern[i] && pattern[i] <= '9') + n = pattern[i] - '0'; + else if ('a' <= pattern[i] && pattern[i] <= 'f') + n = 10 + pattern[i] - 'A'; + else if ('A' <= pattern[i] && pattern[i] <= 'F') + n = 10 + pattern[i] - 'A'; + else if (pattern[i] == '?' && i + 1 < pattern.size() && pattern[i + 1] == '?') { + i++; + n = -2; + } else if (pattern[i] == '?') + n = -2; + + if (n == -1) + continue; + else if (n == -2) { + if (!bHighByte) { + buf.insert(buf.begin() + buf.size() - 1, '0'); + bHighByte = true; + } + buf.push_back('.'); + continue; + } + + if (bHighByte) { + buf.push_back('\\'); + buf.push_back('x'); + } + buf.push_back(pattern[i]); + bHighByte = !bHighByte; + } + m_patterns.emplace_back(buf); + return *this; +} + +std::vector utils::signature_finder::find(size_t minCount, size_t maxCount, bool bErrorOnMoreThanMaximum) const { + std::vector res; + + for (const auto& rangeSpan : m_ranges) { + for (size_t patternIndex = 0; patternIndex < m_patterns.size(); patternIndex++) { + srell::match_results::iterator> matches; + auto ptr = rangeSpan.begin(); + for (size_t matchIndex = 0;; ptr = matches[0].first + 1, matchIndex++) { + if (!m_patterns[patternIndex].search(ptr, rangeSpan.end(), rangeSpan.begin(), matches, srell::regex_constants::match_flag_type::match_default)) + break; + + for (size_t captureIndex = 0; captureIndex < matches.size(); captureIndex++) { + const auto& capture = matches[captureIndex]; + res.emplace_back( + std::span(capture.first, capture.second), + patternIndex, + matchIndex, + captureIndex); + + if (bErrorOnMoreThanMaximum) { + if (res.size() > maxCount) + throw std::runtime_error(std::format("Found {} result(s), wanted at most {} results", res.size(), maxCount)); + } else if (res.size() == maxCount) + return res; + } + } + } + } + + if (res.size() < minCount) + throw std::runtime_error(std::format("Found {} result(s), wanted at least {} results", res.size(), minCount)); + + return res; +} + +std::span utils::signature_finder::find_one() const { + return find(1, 1, false).front().Match; +} + +utils::memory_tenderizer::memory_tenderizer(const void* pAddress, size_t length, DWORD dwNewProtect) : m_data(reinterpret_cast(const_cast(pAddress)), length) { + try { + for (auto pCoveredAddress = &m_data[0]; + pCoveredAddress < &m_data[0] + m_data.size(); + pCoveredAddress = reinterpret_cast(m_regions.back().BaseAddress) + m_regions.back().RegionSize) { + + MEMORY_BASIC_INFORMATION region{}; + if (!VirtualQuery(pCoveredAddress, ®ion, sizeof region)) { + throw std::runtime_error(std::format( + "VirtualQuery(addr=0x{:X}, ..., cb={}) failed with Win32 code 0x{:X}", + reinterpret_cast(pCoveredAddress), + sizeof region, + GetLastError())); + } + + if (!VirtualProtect(region.BaseAddress, region.RegionSize, dwNewProtect, ®ion.Protect)) { + throw std::runtime_error(std::format( + "(Change)VirtualProtect(addr=0x{:X}, size=0x{:X}, ..., ...) failed with Win32 code 0x{:X}", + reinterpret_cast(region.BaseAddress), + region.RegionSize, + GetLastError())); + } + + m_regions.emplace_back(region); + } + + } catch (...) { + for (auto& region : std::ranges::reverse_view(m_regions)) { + if (!VirtualProtect(region.BaseAddress, region.RegionSize, region.Protect, ®ion.Protect)) { + // Could not restore; fast fail + __fastfail(GetLastError()); + } + } + + throw; + } +} + +utils::memory_tenderizer::~memory_tenderizer() { + for (auto& region : std::ranges::reverse_view(m_regions)) { + if (!VirtualProtect(region.BaseAddress, region.RegionSize, region.Protect, ®ion.Protect)) { + // Could not restore; fast fail + __fastfail(GetLastError()); + } + } +} + +std::shared_ptr utils::allocate_executable_heap(size_t len) { + static std::weak_ptr s_hHeap; + + std::shared_ptr hHeap; + if (hHeap = s_hHeap.lock(); !hHeap) { + static std::mutex m_mtx; + const auto lock = std::lock_guard(m_mtx); + + if (hHeap = s_hHeap.lock(); !hHeap) { + if (const auto hHeapRaw = HeapCreate(HEAP_CREATE_ENABLE_EXECUTE, 0, 0); hHeapRaw) + s_hHeap = hHeap = std::shared_ptr(hHeapRaw, HeapDestroy); + else + throw std::runtime_error("Failed to create heap."); + } + } + + const auto pAllocRaw = HeapAlloc(hHeap.get(), 0, len); + if (!pAllocRaw) + throw std::runtime_error("Failed to allocate memory."); + + return { + pAllocRaw, + [hHeap = std::move(hHeap)](void* pAddress) { HeapFree(hHeap.get(), 0, pAddress); }, + }; +} + +std::shared_ptr utils::create_thunk(void* pfnFunction, void* pThis, uint64_t placeholderValue) { + const auto pcBaseFn = reinterpret_cast(pfnFunction); + auto sourceCode = std::vector(pcBaseFn, pcBaseFn + 256); + + size_t i = 0; + auto placeholderFound = false; + for (nmd_x86_instruction instruction{}; ; i += instruction.length) { + if (i == sourceCode.size() || !nmd_x86_decode(&sourceCode[i], sourceCode.size() - i, &instruction, NMD_X86_MODE_64, NMD_X86_DECODER_FLAGS_ALL)) { + sourceCode.insert(sourceCode.end(), &pcBaseFn[sourceCode.size()], &pcBaseFn[sourceCode.size() + 512]); + if (!nmd_x86_decode(&sourceCode[i], sourceCode.size() - i, &instruction, NMD_X86_MODE_64, NMD_X86_DECODER_FLAGS_ALL)) + throw std::runtime_error("Failed to find detour function"); + } + + if (instruction.opcode == 0xCC) + throw std::runtime_error("Failed to find detour function"); + + // msvc debugger related + if ((instruction.group & NMD_GROUP_CALL) && (instruction.imm_mask & NMD_X86_IMM_ANY)) + std::fill_n(&sourceCode[i], instruction.length, 0x90); + + if ((instruction.group & NMD_GROUP_JUMP) || (instruction.group & NMD_GROUP_RET)) { + sourceCode.resize(i + instruction.length); + break; + } + + if (instruction.opcode == 0xB8 // mov , + && (instruction.imm_mask & NMD_X86_IMM64) + && instruction.immediate == placeholderValue) { + *reinterpret_cast(&sourceCode[i + instruction.length - 8]) = pThis; + placeholderFound = true; + } + } + + if (!placeholderFound) + throw std::runtime_error("Failed to find detour function"); + + return allocate_executable_heap(std::span(sourceCode)); +} + +template<> +std::wstring utils::get_env(const wchar_t* pcwzName) { + std::wstring buf(GetEnvironmentVariableW(pcwzName, nullptr, 0) + 1, L'\0'); + buf.resize(GetEnvironmentVariableW(pcwzName, &buf[0], static_cast(buf.size()))); + return buf; +} + +template<> +std::string utils::get_env(const wchar_t* pcwzName) { + return unicode::convert(get_env(pcwzName)); +} + +template<> +int utils::get_env(const wchar_t* pcwzName) { + auto env = get_env(pcwzName); + const auto trimmed = trim(std::wstring_view(env)); + if (trimmed.empty()) + return 0; + return std::wcstol(&trimmed[0], nullptr, 0); +} + +template<> +bool utils::get_env(const wchar_t* pcwzName) { + auto env = get_env(pcwzName); + const auto trimmed = trim(std::wstring_view(env)); + for (auto& c : env) { + if (c < 255) + c = std::tolower(c); + } + return trimmed == L"1" + || trimmed == L"true" + || trimmed == L"t" + || trimmed == L"yes" + || trimmed == L"y"; +} + +template<> +std::vector utils::get_env_list(const wchar_t* pcszName) { + const auto src = utils::get_env(pcszName); + auto res = utils::split(src, L","); + for (auto& s : res) + s = utils::trim(s); + if (res.size() == 1 && res[0].empty()) + return {}; + return res; +} + +template<> +std::vector utils::get_env_list(const wchar_t* pcszName) { + const auto src = utils::get_env(pcszName); + auto res = utils::split(src, ","); + for (auto& s : res) + s = utils::trim(s); + if (res.size() == 1 && res[0].empty()) + return {}; + return res; +} + +bool utils::is_running_on_linux() { + if (get_env(L"XL_WINEONLINUX")) + return true; + HMODULE hntdll = GetModuleHandleW(L"ntdll.dll"); + if (!hntdll) + return true; + if (GetProcAddress(hntdll, "wine_get_version")) + return true; + if (GetProcAddress(hntdll, "wine_get_host_version")) + return true; + return false; +} + +std::filesystem::path utils::get_module_path(HMODULE hModule) { + std::wstring buf(MAX_PATH, L'\0'); + while (true) { + if (const auto res = GetModuleFileNameW(hModule, &buf[0], static_cast(buf.size())); !res) + throw std::runtime_error(std::format("GetModuleFileName failure: 0x{:X}", GetLastError())); + else if (res < buf.size()) { + buf.resize(res); + return buf; + } else + buf.resize(buf.size() * 2); + } +} + +HWND utils::try_find_game_window() { + HWND hwnd = nullptr; + while ((hwnd = FindWindowExW(nullptr, hwnd, L"FFXIVGAME", nullptr))) { + DWORD pid; + GetWindowThreadProcessId(hwnd, &pid); + + if (pid == GetCurrentProcessId() && IsWindowVisible(hwnd)) + break; + } + return hwnd; +} + +void utils::wait_for_game_window() { + HWND game_window; + while (!(game_window = try_find_game_window())) { + WaitForInputIdle(GetCurrentProcess(), INFINITE); + Sleep(100); + }; + SendMessageW(game_window, WM_NULL, 0, 0); +} diff --git a/Dalamud.Boot/utils.h b/Dalamud.Boot/utils.h new file mode 100644 index 000000000..bbcba1f84 --- /dev/null +++ b/Dalamud.Boot/utils.h @@ -0,0 +1,263 @@ +#pragma once + +#include +#include +#include +#include +#include +#include + +#include "unicode.h" + +namespace utils { + class loaded_module { + HMODULE m_hModule; + public: + loaded_module() : m_hModule(nullptr) {} + loaded_module(const void* hModule) : m_hModule(reinterpret_cast(const_cast(hModule))) {} + loaded_module(void* hModule) : m_hModule(reinterpret_cast(hModule)) {} + loaded_module(size_t hModule) : m_hModule(reinterpret_cast(hModule)) {} + + std::filesystem::path path() const; + + bool is_current_process() const { return m_hModule == GetModuleHandleW(nullptr); } + bool owns_address(const void* pAddress) const; + + operator HMODULE() const { + return m_hModule; + } + + size_t address_int() const { return reinterpret_cast(m_hModule); } + size_t image_size() const { return is_pe64() ? nt_header64().OptionalHeader.SizeOfImage : nt_header32().OptionalHeader.SizeOfImage; } + char* address(size_t offset = 0) const { return reinterpret_cast(m_hModule) + offset; } + template T* address_as(size_t offset) const { return reinterpret_cast(address(offset)); } + template std::span span_as(size_t offset, size_t count) const { return std::span(reinterpret_cast(address(offset)), count); } + template T& ref_as(size_t offset) const { return *reinterpret_cast(address(offset)); } + + IMAGE_DOS_HEADER& dos_header() const { return ref_as(0); } + IMAGE_NT_HEADERS32& nt_header32() const { return ref_as(dos_header().e_lfanew); } + IMAGE_NT_HEADERS64& nt_header64() const { return ref_as(dos_header().e_lfanew); } + bool is_pe64() const { return nt_header32().OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC; } + + std::span data_directories() const { return is_pe64() ? nt_header64().OptionalHeader.DataDirectory : nt_header32().OptionalHeader.DataDirectory; } + IMAGE_DATA_DIRECTORY& data_directory(size_t index) const { return data_directories()[index]; } + + std::span section_headers() const; + IMAGE_SECTION_HEADER& section_header(const char* pcszSectionName) const; + std::span section(size_t index) const; + std::span section(const char* pcszSectionName) const; + + template TFn* get_exported_function(const char* pcszFunctionName) { + const auto pAddress = GetProcAddress(m_hModule, pcszFunctionName); + if (!pAddress) + throw std::out_of_range(std::format("Exported function \"{}\" not found.", pcszFunctionName)); + return reinterpret_cast(pAddress); + } + + bool find_imported_function_pointer(const char* pcszDllName, const char* pcszFunctionName, uint32_t hintOrOrdinal, void*& ppFunctionAddress) const; + void* get_imported_function_pointer(const char* pcszDllName, const char* pcszFunctionName, uint32_t hintOrOrdinal) const; + template TFn** get_imported_function_pointer(const char* pcszDllName, const char* pcszFunctionName, uint32_t hintOrOrdinal) { return reinterpret_cast(get_imported_function_pointer(pcszDllName, pcszFunctionName, hintOrOrdinal)); } + + static loaded_module current_process(); + static std::vector all_modules(); + }; + + class signature_finder { + std::vector> m_ranges; + std::vector m_patterns; + + public: + signature_finder& look_in(const void* pFirst, size_t length); + signature_finder& look_in(const loaded_module& m, const char* sectionName); + + template + signature_finder& look_in(std::span s) { + return look_in(s.data(), s.size()); + } + + signature_finder& look_for(std::string_view pattern, std::string_view mask, char cExactMatch = 'x', char cWildcard = '.'); + signature_finder& look_for(std::string_view pattern, char wildcardMask); + signature_finder& look_for(std::string_view pattern); + signature_finder& look_for_hex(std::string_view pattern); + + template + signature_finder& look_for(char pattern[len]) { + static_assert(len == 5); + } + + struct result { + std::span Match; + size_t PatternIndex; + size_t MatchIndex; + size_t CaptureIndex; + }; + + std::vector find(size_t minCount, size_t maxCount, bool bErrorOnMoreThanMaximum) const; + + std::span find_one() const; + }; + + class memory_tenderizer { + std::span m_data; + std::vector m_regions; + + public: + memory_tenderizer(const void* pAddress, size_t length, DWORD dwNewProtect); + + template&& std::is_standard_layout_v>> + memory_tenderizer(const T& object, DWORD dwNewProtect) : memory_tenderizer(&object, sizeof T, dwNewProtect) {} + + template + memory_tenderizer(std::span s, DWORD dwNewProtect) : memory_tenderizer(&s[0], s.size(), dwNewProtect) {} + + template + memory_tenderizer(std::span s, DWORD dwNewProtect) : memory_tenderizer(&s[0], s.size(), dwNewProtect) {} + + ~memory_tenderizer(); + }; + + std::shared_ptr allocate_executable_heap(size_t len); + + template + std::shared_ptr allocate_executable_heap(std::span data) { + auto res = allocate_executable_heap(data.size_bytes()); + memcpy(res.get(), data.data(), data.size_bytes()); + return res; + } + + std::shared_ptr create_thunk(void* pfnFunction, void* pThis, uint64_t placeholderValue); + + template + class thunk; + + template + class thunk { + using TFn = TReturn(TArgs...); + + static constexpr uint64_t Placeholder = 0xCC90CC90CC90CC90ULL; + + const std::shared_ptr m_pThunk; + std::string m_name; + std::function m_fnTarget; + + public: + thunk(std::string name, std::function target) + : m_pThunk(utils::create_thunk(&detour_static, this, Placeholder)) + , m_fnTarget(std::move(target)) + , m_name(name) { + } + + void set_target(std::function detour) { + m_fnTarget = std::move(detour); + } + + TFn* get_thunk() const { + return reinterpret_cast(m_pThunk.get()); + } + + const std::string& name() const { + return m_name; + } + + private: + // mark it as virtual to prevent compiler from inlining + virtual TReturn detour(TArgs... args) { + return m_fnTarget(std::forward(args)...); + } + + static TReturn detour_static(TArgs... args) { + const volatile auto pThis = reinterpret_cast*>(Placeholder); + return pThis->detour(args...); + } + }; + + template> + std::basic_string_view trim(std::basic_string_view view, bool left = true, bool right = true) { + if (left) { + while (!view.empty() && (view.front() < 255 && std::isspace(view.front()))) + view = view.substr(1); + } + if (right) { + while (!view.empty() && (view.back() < 255 && std::isspace(view.back()))) + view = view.substr(0, view.size() - 1); + } + return view; + } + + template, class TAlloc = std::allocator> + std::basic_string trim(std::basic_string view, bool left = true, bool right = true) { + return std::basic_string(trim(std::basic_string_view(view), left, right)); + } + + template, class TAlloc = std::allocator> + [[nodiscard]] std::vector> split(const std::basic_string& str, const std::basic_string_view& delimiter, size_t maxSplit = SIZE_MAX) { + std::vector> result; + if (delimiter.empty()) { + for (size_t i = 0; i < str.size(); ++i) + result.push_back(str.substr(i, 1)); + } else { + size_t previousOffset = 0, offset; + while (maxSplit && (offset = str.find(delimiter, previousOffset)) != std::string::npos) { + result.push_back(str.substr(previousOffset, offset - previousOffset)); + previousOffset = offset + delimiter.length(); + --maxSplit; + } + result.push_back(str.substr(previousOffset)); + } + return result; + } + + template, class TAlloc = std::allocator> + [[nodiscard]] std::vector> split(const std::basic_string& str, const std::basic_string& delimiter, size_t maxSplit = SIZE_MAX) { + return split(str, std::basic_string_view(delimiter), maxSplit); + } + + template, class TAlloc = std::allocator> + [[nodiscard]] std::vector> split(const std::basic_string& str, const TElem* pcszDelimiter, size_t maxSplit = SIZE_MAX) { + return split(str, std::basic_string_view(pcszDelimiter), maxSplit); + } + + template + T get_env(const wchar_t* pcwzName) = delete; + + template<> + std::wstring get_env(const wchar_t* pcwzName); + + template<> + std::string get_env(const wchar_t* pcwzName); + + template<> + int get_env(const wchar_t* pcwzName); + + template<> + bool get_env(const wchar_t* pcwzName); + + template + T get_env(const char* pcszName) { + return get_env(unicode::convert(pcszName).c_str()); + } + + template + std::vector get_env_list(const wchar_t* pcwzName) = delete; + + template<> + std::vector get_env_list(const wchar_t* pcwzName); + + template<> + std::vector get_env_list(const wchar_t* pcwzName); + + template + std::vector get_env_list(const char* pcszName) { + return get_env_list(unicode::convert(pcszName).c_str()); + } + + bool is_running_on_linux(); + + std::filesystem::path get_module_path(HMODULE hModule); + + /// @brief Find the game main window. + /// @return Handle to the game main window, or nullptr if it doesn't exist (yet). + HWND try_find_game_window(); + + void wait_for_game_window(); +} diff --git a/Dalamud.Boot/veh.cpp b/Dalamud.Boot/veh.cpp index 16ea2ab8f..5691d5b24 100644 --- a/Dalamud.Boot/veh.cpp +++ b/Dalamud.Boot/veh.cpp @@ -2,6 +2,9 @@ #include "veh.h" +PVOID g_veh_handle = nullptr; +bool g_veh_do_full_dump = false; + bool is_whitelist_exception(const DWORD code) { switch (code) @@ -251,8 +254,12 @@ LONG exception_handler(EXCEPTION_POINTERS* ex) ex_info.ExceptionPointers = ex; ex_info.ThreadId = GetCurrentThreadId(); + auto miniDumpType = MiniDumpWithDataSegs; + if (g_veh_do_full_dump) + miniDumpType = MiniDumpWithFullMemory; + HANDLE file = CreateFileW(dmp_path.c_str(), GENERIC_WRITE, FILE_SHARE_WRITE, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr); - MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), file, MiniDumpWithDataSegs, &ex_info, nullptr, nullptr); + MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), file, miniDumpType, &ex_info, nullptr, nullptr); CloseHandle(file); void* fn; @@ -262,16 +269,18 @@ LONG exception_handler(EXCEPTION_POINTERS* ex) L"Dalamud.EntryPoint+VehDelegate, Dalamud", nullptr, nullptr, &fn))) { - const auto msg = L"An error within the game has occurred.\n\n" + const auto formatted = std::format( + L"An error within the game has occurred.\n\n" L"This may be caused by a faulty plugin, a broken TexTools modification, any other third-party tool or simply a bug in the game.\n" L"Please try \"Start Over\" or \"Download Index Backup\" in TexTools, an integrity check in the XIVLauncher settings, and disabling plugins you don't need.\n\n" L"The log file is located at:\n" L"{1}\n\n" - L"Press OK to exit the application.\n\nFailed to read stack trace: {2:08x}"; + L"Press OK to exit the application.\n\nFailed to read stack trace: {2:08x}", + dmp_path, log_path, err); // show in another thread to prevent messagebox from pumping messages of current thread std::thread([&]() { - MessageBoxW(nullptr, std::format(msg, dmp_path, log_path, err).c_str(), L"Dalamud Error", MB_OK | MB_ICONERROR | MB_TOPMOST); + MessageBoxW(nullptr, formatted.c_str(), L"Dalamud Error", MB_OK | MB_ICONERROR | MB_TOPMOST); }).join(); } else @@ -282,15 +291,15 @@ LONG exception_handler(EXCEPTION_POINTERS* ex) return EXCEPTION_CONTINUE_SEARCH; } - -PVOID g_veh_handle = nullptr; - -bool veh::add_handler() +bool veh::add_handler(bool doFullDump) { if (g_veh_handle) return false; g_veh_handle = AddVectoredExceptionHandler(1, exception_handler); SetUnhandledExceptionFilter(nullptr); + + g_veh_do_full_dump = doFullDump; + return g_veh_handle != nullptr; } diff --git a/Dalamud.Boot/veh.h b/Dalamud.Boot/veh.h index d83284e87..bf0c549f3 100644 --- a/Dalamud.Boot/veh.h +++ b/Dalamud.Boot/veh.h @@ -2,6 +2,6 @@ namespace veh { - bool add_handler(); + bool add_handler(bool doFullDump); bool remove_handler(); } diff --git a/Dalamud.Boot/xivfixes.cpp b/Dalamud.Boot/xivfixes.cpp new file mode 100644 index 000000000..fd4f28d91 --- /dev/null +++ b/Dalamud.Boot/xivfixes.cpp @@ -0,0 +1,426 @@ +#include "pch.h" + +#include "xivfixes.h" + +#include "DalamudStartInfo.h" +#include "hooks.h" +#include "logging.h" +#include "utils.h" + +template +static std::span assume_nonempty_span(std::span t, const char* descr) { + if (t.empty()) + throw std::runtime_error(std::format("Unexpected empty span found: {}", descr)); + return t; +} +void xivfixes::unhook_dll(bool bApply) { + static const auto LogTag = "[xivfixes:unhook_dll]"; + static const auto LogTagW = L"[xivfixes:unhook_dll]"; + + if (!bApply) + return; + + const auto mods = utils::loaded_module::all_modules(); + + const auto test_module = [&](size_t i, const utils::loaded_module & mod) { + std::filesystem::path path; + try { + path = mod.path(); + logging::I("{} [{}/{}] Module 0x{:X} ~ 0x{:X} (0x{:X}): \"{}\"", LogTagW, i + 1, mods.size(), mod.address_int(), mod.address_int() + mod.image_size(), mod.image_size(), path.wstring()); + } catch (const std::exception& e) { + logging::W("{} [{}/{}] Module 0x{:X}: Failed to resolve path: {}", LogTag, i + 1, mods.size(), mod.address_int(), e.what()); + return; + } + + const auto moduleName = unicode::convert(path.filename().wstring()); + + std::vector buf; + std::string formatBuf; + try { + const auto& sectionHeader = mod.section_header(".text"); + const auto section = assume_nonempty_span(mod.span_as(sectionHeader.VirtualAddress, sectionHeader.Misc.VirtualSize), ".text[VA:VA+VS]"); + auto hFsDllRaw = CreateFileW(path.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr); + if (hFsDllRaw == INVALID_HANDLE_VALUE) { + logging::W("{} Module loaded in current process but could not open file: Win32 error {}", LogTag, GetLastError()); + return; + } + auto hFsDll = std::unique_ptr(hFsDllRaw, &CloseHandle); + + buf.resize(section.size()); + SetFilePointer(hFsDll.get(), sectionHeader.PointerToRawData, nullptr, FILE_CURRENT); + if (DWORD read{}; ReadFile(hFsDll.get(), &buf[0], static_cast(buf.size()), &read, nullptr)) { + if (read < section.size_bytes()) { + logging::W("{} ReadFile: read {} bytes < requested {} bytes", LogTagW, read, section.size_bytes()); + return; + } + } else { + logging::I("{} ReadFile: Win32 error {}", LogTagW, GetLastError()); + return; + } + + const auto doRestore = g_startInfo.BootUnhookDlls.contains(unicode::convert(path.filename().u8string())); + + std::optional tenderizer; + for (size_t i = 0, instructionLength = 1, printed = 0; i < buf.size(); i += instructionLength) { + if (section[i] == buf[i]) { + instructionLength = 1; + continue; + } + + const auto rva = sectionHeader.VirtualAddress + i; + nmd_x86_instruction instruction{}; + if (!nmd_x86_decode(§ion[i], section.size() - i, &instruction, NMD_X86_MODE_64, NMD_X86_DECODER_FLAGS_ALL)) { + instructionLength = 1; + if (printed < 64) { + logging::W("{} {}+0x{:0X}: dd {:02X}", LogTag, moduleName, rva, static_cast(section[i])); + printed++; + } + } else { + instructionLength = instruction.length; + if (printed < 64) { + formatBuf.resize(128); + nmd_x86_format(&instruction, &formatBuf[0], reinterpret_cast(§ion[i]), NMD_X86_FORMAT_FLAGS_DEFAULT | NMD_X86_FORMAT_FLAGS_BYTES); + formatBuf.resize(strnlen(&formatBuf[0], formatBuf.size())); + + const auto& directory = mod.data_directory(IMAGE_DIRECTORY_ENTRY_EXPORT); + const auto& exportDirectory = mod.ref_as(directory.VirtualAddress); + const auto names = mod.span_as(exportDirectory.AddressOfNames, exportDirectory.NumberOfNames); + const auto ordinals = mod.span_as(exportDirectory.AddressOfNameOrdinals, exportDirectory.NumberOfNames); + const auto functions = mod.span_as(exportDirectory.AddressOfFunctions, exportDirectory.NumberOfFunctions); + + std::string resolvedExportName; + for (size_t j = 0; j < names.size(); ++j) { + std::string_view name; + if (const char* pcszName = mod.address_as(names[j]); pcszName < mod.address() || pcszName >= mod.address() + mod.image_size()) { + if (IsBadReadPtr(pcszName, 256)) { + logging::W("{} Name #{} points to an invalid address outside the executable. Skipping.", LogTag, j); + continue; + } + + name = std::string_view(pcszName, strnlen(pcszName, 256)); + logging::W("{} Name #{} points to a seemingly valid address outside the executable: {}", LogTag, j, name); + } + + if (ordinals[j] >= functions.size()) { + logging::W("{} Ordinal #{} points to function index #{} >= #{}. Skipping.", LogTag, j, ordinals[j], functions.size()); + continue; + } + + const auto rva = functions[ordinals[j]]; + if (rva == §ion[i] - mod.address()) { + resolvedExportName = std::format("[export:{}]", name); + break; + } + } + + logging::W("{} {}+0x{:0X}{}: {}", LogTag, moduleName, rva, resolvedExportName, formatBuf); + printed++; + } + } + + if (doRestore) { + if (!tenderizer) + tenderizer.emplace(section, PAGE_EXECUTE_READWRITE); + memcpy(§ion[i], &buf[i], instructionLength); + } + } + + if (tenderizer) + logging::I("{} Verification and overwriting complete.", LogTag); + else if (doRestore) + logging::I("{} Verification complete. Overwriting was not required.", LogTag); + + } catch (const std::exception& e) { + logging::W("{} Error: {}", LogTag, e.what()); + } + }; + + // This is needed since try and __try cannot be used in the same function. Lambdas circumvent the limitation. + const auto windows_exception_handler = [&]() { + for (size_t i = 0; i < mods.size(); i++) { + const auto& mod = mods[i]; + __try { + test_module(i, mod); + } __except (EXCEPTION_EXECUTE_HANDLER) { + logging::W("{} Error: Access Violation", LogTag); + } + } + }; + + windows_exception_handler(); +} + +using TFnGetInputDeviceManager = void* (); +static TFnGetInputDeviceManager* GetGetInputDeviceManager(HWND hwnd) { + static TFnGetInputDeviceManager* pCached = nullptr; + if (pCached) + return pCached; + + char szClassName[256]; + GetClassNameA(hwnd, szClassName, static_cast(sizeof szClassName)); + + WNDCLASSEXA wcx{}; + GetClassInfoExA(g_hGameInstance, szClassName, &wcx); + const auto match = utils::signature_finder() + .look_in(utils::loaded_module(g_hGameInstance), ".text") + .look_for_hex("41 81 fe 19 02 00 00 0f 87 ?? ?? 00 00 0f 84 ?? ?? 00 00") + .find_one(); + + auto ptr = match.data() + match.size() + *reinterpret_cast(match.data() + match.size() - 4); + ptr += 4; // CMP RBX, 0x7 + ptr += 2; // JNZ + ptr += 7; // MOV RCX, + ptr += 3; // TEST RCX, RCX + ptr += 2; // JZ + ptr += 5; // CALL + ptr += *reinterpret_cast(ptr - 4); + + return pCached = reinterpret_cast(ptr); +} + +void xivfixes::prevent_devicechange_crashes(bool bApply) { + static const char* LogTag = "[xivfixes:prevent_devicechange_crashes]"; + static std::optional> s_hookCreateWindowExA; + static std::optional s_hookWndProc; + + if (bApply) { + if (!g_startInfo.BootEnabledGameFixes.contains("prevent_devicechange_crashes")) { + logging::I("{} Turned off via environment variable.", LogTag); + return; + } + + s_hookCreateWindowExA.emplace("user32.dll!CreateWindowExA (prevent_devicechange_crashes)", "user32.dll", "CreateWindowExA", 0); + s_hookCreateWindowExA->set_detour([](DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)->HWND { + const auto hWnd = s_hookCreateWindowExA->call_original(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); + + if (!hWnd + || hInstance != g_hGameInstance + || 0 != strcmp(lpClassName, "FFXIVGAME")) + return hWnd; + + logging::I(R"({} CreateWindow(0x{:08X}, "{}", "{}", 0x{:08X}, {}, {}, {}, {}, 0x{:X}, 0x{:X}, 0x{:X}, 0x{:X}) called; unhooking CreateWindowExA and hooking WndProc.)", + LogTag, dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, reinterpret_cast(hWndParent), reinterpret_cast(hMenu), reinterpret_cast(hInstance), reinterpret_cast(lpParam)); + + s_hookWndProc.emplace("FFXIVGAME:WndProc (prevent_devicechange_crashes)", hWnd); + s_hookWndProc->set_detour([](HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -> LRESULT { + + if (uMsg == WM_DEVICECHANGE && wParam == DBT_DEVNODES_CHANGED) { + if (!GetGetInputDeviceManager(hWnd)()) { + logging::I("{} WndProc(0x{:X}, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, {}) called but the game does not have InputDeviceManager initialized; doing nothing.", LogTag, reinterpret_cast(hWnd), lParam); + return 0; + } + } + + return s_hookWndProc->call_original(hWnd, uMsg, wParam, lParam); + }); + + return hWnd; + }); + + logging::I("{} Enable", LogTag); + + } else { + if (s_hookCreateWindowExA) { + logging::I("{} Disable CreateWindowExA", LogTag); + s_hookCreateWindowExA.reset(); + } + + // This will effectively revert any other WndProc alterations, including Dalamud. + if (s_hookWndProc) { + logging::I("{} Disable WndProc", LogTag); + s_hookWndProc.reset(); + } + } +} + +static bool is_xivalex(const std::filesystem::path& dllPath) { + DWORD verHandle = 0; + std::vector block; + block.resize(GetFileVersionInfoSizeW(dllPath.c_str(), &verHandle)); + if (block.empty()) + return false; + if (!GetFileVersionInfoW(dllPath.c_str(), 0, static_cast(block.size()), &block[0])) + return false; + struct LANGANDCODEPAGE { + WORD wLanguage; + WORD wCodePage; + } * lpTranslate; + UINT cbTranslate; + if (!VerQueryValueW(&block[0], + TEXT("\\VarFileInfo\\Translation"), + reinterpret_cast(&lpTranslate), + &cbTranslate)) { + return false; + } + + for (size_t i = 0; i < (cbTranslate / sizeof(struct LANGANDCODEPAGE)); i++) { + wchar_t* buf = nullptr; + UINT size = 0; + if (!VerQueryValueW(&block[0], + std::format(L"\\StringFileInfo\\{:04x}{:04x}\\FileDescription", + lpTranslate[i].wLanguage, + lpTranslate[i].wCodePage).c_str(), + reinterpret_cast(&buf), + &size)) { + continue; + } + auto currName = std::wstring_view(buf, size); + while (!currName.empty() && currName.back() == L'\0') + currName = currName.substr(0, currName.size() - 1); + if (currName.empty()) + continue; + if (currName == L"XivAlexander Main DLL") + return true; + } + return false; +} + +static bool is_openprocess_already_dealt_with() { + static const auto s_value = [] { + for (const auto& mod : utils::loaded_module::all_modules()) { + try { + if (is_xivalex(mod.path())) + return true; + + } catch (...) { + // pass + } + } + return false; + }(); + return s_value; +} + +void xivfixes::disable_game_openprocess_access_check(bool bApply) { + static const char* LogTag = "[xivfixes:disable_game_openprocess_access_check]"; + static std::optional> s_hook; + + if (bApply) { + if (!g_startInfo.BootEnabledGameFixes.contains("disable_game_openprocess_access_check")) { + logging::I("{} Turned off via environment variable.", LogTag); + return; + } + if (is_openprocess_already_dealt_with()) { + logging::I("{} Someone else already did it.", LogTag); + return; + } + + s_hook.emplace("kernel32.dll!OpenProcess (import, disable_game_openprocess_access_check)", "kernel32.dll", "OpenProcess", 0); + s_hook->set_detour([](DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId)->HANDLE { + logging::I("{} OpenProcess(0x{:08X}, {}, {}) was invoked by thread {}.", LogTag, dwDesiredAccess, bInheritHandle, dwProcessId, GetCurrentThreadId()); + + if (dwProcessId == GetCurrentProcessId()) { + // Prevent game from feeling unsafe that it restarts + if (dwDesiredAccess & PROCESS_VM_WRITE) { + logging::I("{} Returning failure with last error code set to ERROR_ACCESS_DENIED(5).", LogTag); + SetLastError(ERROR_ACCESS_DENIED); + return {}; + } + } + + return s_hook->call_original(dwDesiredAccess, bInheritHandle, dwProcessId); + }); + + logging::I("{} Enable", LogTag); + } else { + if (s_hook) { + logging::I("{} Disable OpenProcess", LogTag); + s_hook.reset(); + } + } +} + +void xivfixes::redirect_openprocess(bool bApply) { + static const char* LogTag = "[xivfixes:redirect_openprocess]"; + static std::shared_ptr s_hook; + static std::mutex s_silenceSetMtx; + static std::set s_silenceSet; + + if (bApply) { + if (!g_startInfo.BootEnabledGameFixes.contains("redirect_openprocess")) { + logging::I("{} Turned off via environment variable.", LogTag); + return; + } + if (is_openprocess_already_dealt_with()) { + logging::I("{} Someone else already did it.", LogTag); + return; + } + + if (g_startInfo.BootDotnetOpenProcessHookMode == DalamudStartInfo::DotNetOpenProcessHookMode::ImportHooks) { + auto hook = std::make_shared>("kernel32.dll!OpenProcess (global import, redirect_openprocess)", L"kernel32.dll", "OpenProcess"); + hook->set_detour([hook = hook.get()](DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId)->HANDLE { + if (dwProcessId == GetCurrentProcessId()) { + if (s_silenceSet.emplace(GetCurrentThreadId()).second) + logging::I("{} OpenProcess(0x{:08X}, {}, {}) was invoked by thread {}. Redirecting to DuplicateHandle.", LogTag, dwDesiredAccess, bInheritHandle, dwProcessId, GetCurrentThreadId()); + + if (HANDLE res; DuplicateHandle(GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &res, dwDesiredAccess, bInheritHandle, 0)) + return res; + + return {}; + } + return hook->call_original(dwDesiredAccess, bInheritHandle, dwProcessId); + }); + s_hook = std::dynamic_pointer_cast(std::move(hook)); + + logging::I("{} Enable via import_hook", LogTag); + + } else { + auto hook = std::make_shared>("kernel32.dll!OpenProcess (direct, redirect_openprocess)", OpenProcess); + hook->set_detour([hook = hook.get()](DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId)->HANDLE { + if (dwProcessId == GetCurrentProcessId()) { + if (s_silenceSet.emplace(GetCurrentThreadId()).second) + logging::I("{} OpenProcess(0x{:08X}, {}, {}) was invoked by thread {}. Redirecting to DuplicateHandle.", LogTag, dwDesiredAccess, bInheritHandle, dwProcessId, GetCurrentThreadId()); + + if (HANDLE res; DuplicateHandle(GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &res, dwDesiredAccess, bInheritHandle, 0)) + return res; + + return {}; + } + return hook->call_original(dwDesiredAccess, bInheritHandle, dwProcessId); + }); + s_hook = std::dynamic_pointer_cast(std::move(hook)); + + logging::I("{} Enable via direct_hook", LogTag); + } + + //std::thread([]() { + // SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_IDLE); + // for (const auto to = GetTickCount64() + 3000; GetTickCount64() < to;) + // s_hook->assert_dominance(); + //}).detach(); + + } else { + if (s_hook) { + logging::I("{} Disable OpenProcess", LogTag); + s_hook.reset(); + } + } +} + +void xivfixes::apply_all(bool bApply) { + for (const auto& [taskName, taskFunction] : std::initializer_list> + { + { "unhook_dll", &unhook_dll }, + { "prevent_devicechange_crashes", &prevent_devicechange_crashes }, + { "disable_game_openprocess_access_check", &disable_game_openprocess_access_check }, + { "redirect_openprocess", &redirect_openprocess }, + } + ) { + try { + taskFunction(bApply); + + } catch (const std::exception& e) { + if (bApply) + logging::W("Error trying to activate fixup [{}]: {}", taskName, e.what()); + else + logging::W("Error trying to deactivate fixup [{}]: {}", taskName, e.what()); + + continue; + } + + if (bApply) + logging::I("Fixup [{}] activated.", taskName); + else + logging::I("Fixup [{}] deactivated.", taskName); + } +} diff --git a/Dalamud.Boot/xivfixes.h b/Dalamud.Boot/xivfixes.h new file mode 100644 index 000000000..97227cd57 --- /dev/null +++ b/Dalamud.Boot/xivfixes.h @@ -0,0 +1,10 @@ +#pragma once + +namespace xivfixes { + void unhook_dll(bool bApply); + void prevent_devicechange_crashes(bool bApply); + void disable_game_openprocess_access_check(bool bApply); + void redirect_openprocess(bool bApply); + + void apply_all(bool bApply); +} diff --git a/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj b/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj index a396d4f42..282cf62a3 100644 --- a/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj +++ b/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj @@ -27,7 +27,7 @@ - + diff --git a/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj b/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj index ecd572daf..c293e258c 100644 --- a/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj +++ b/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj @@ -26,7 +26,7 @@ Application true - v142 + v143 false Unicode ..\bin\$(Configuration)\ @@ -88,16 +88,20 @@ + + + + - + diff --git a/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj.filters b/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj.filters index 75b1bf84e..8f4372d89 100644 --- a/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj.filters +++ b/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj.filters @@ -34,11 +34,14 @@ Source Files + + Source Files + + + Source Files + - - Header Files - Header Files @@ -51,5 +54,14 @@ Header Files + + Header Files + + + Header Files + + + Header Files + \ No newline at end of file diff --git a/Dalamud.Injector.Boot/main.cpp b/Dalamud.Injector.Boot/main.cpp index cf5a95b5c..ee939968d 100644 --- a/Dalamud.Injector.Boot/main.cpp +++ b/Dalamud.Injector.Boot/main.cpp @@ -3,12 +3,14 @@ #include #include #include +#include "..\Dalamud.Boot\logging.h" #include "..\lib\CoreCLR\CoreCLR.h" #include "..\lib\CoreCLR\boot.h" int wmain(int argc, wchar_t** argv) { - printf("Dalamud.Injector, (c) 2021 XIVLauncher Contributors\nBuilt at: %s@%s\n\n", __DATE__, __TIME__); + logging::I("Dalamud Injector, (c) 2021 XIVLauncher Contributors"); + logging::I("Built at : " __DATE__ "@" __TIME__); wchar_t _module_path[MAX_PATH]; GetModuleFileNameW(NULL, _module_path, sizeof _module_path / 2); @@ -22,6 +24,7 @@ int wmain(int argc, wchar_t** argv) void* entrypoint_vfn; int result = InitializeClrAndGetEntryPoint( GetModuleHandleW(nullptr), + false, runtimeconfig_path, module_path, L"Dalamud.Injector.EntryPoint, Dalamud.Injector", @@ -35,9 +38,9 @@ int wmain(int argc, wchar_t** argv) typedef void (CORECLR_DELEGATE_CALLTYPE* custom_component_entry_point_fn)(int, wchar_t**); custom_component_entry_point_fn entrypoint_fn = reinterpret_cast(entrypoint_vfn); - printf("Running Dalamud Injector...\n"); + logging::I("Running Dalamud Injector..."); entrypoint_fn(argc, argv); - printf("Done!\n"); + logging::I("Done!"); return 0; } diff --git a/Dalamud.Injector.Boot/pch.h b/Dalamud.Injector.Boot/pch.h new file mode 100644 index 000000000..6f70f09be --- /dev/null +++ b/Dalamud.Injector.Boot/pch.h @@ -0,0 +1 @@ +#pragma once diff --git a/Dalamud.Injector/Dalamud.Injector.csproj b/Dalamud.Injector/Dalamud.Injector.csproj index 868d212e5..2b2138cb4 100644 --- a/Dalamud.Injector/Dalamud.Injector.csproj +++ b/Dalamud.Injector/Dalamud.Injector.csproj @@ -64,7 +64,7 @@ - + diff --git a/Dalamud.Injector/EntryPoint.cs b/Dalamud.Injector/EntryPoint.cs index 4bbdad68b..8be568063 100644 --- a/Dalamud.Injector/EntryPoint.cs +++ b/Dalamud.Injector/EntryPoint.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; @@ -38,7 +39,6 @@ namespace Dalamud.Injector public static void Main(int argc, IntPtr argvPtr) { List args = new(argc); - Init(args); unsafe { @@ -47,6 +47,9 @@ namespace Dalamud.Injector args.Add(Marshal.PtrToStringUni(argv[i])); } + Init(args); + args.Remove("-v"); // Remove "verbose" flag + if (args.Count >= 2 && args[1].ToLowerInvariant() == "launch-test") { Environment.Exit(ProcessLaunchTestCommand(args)); @@ -80,6 +83,8 @@ namespace Dalamud.Injector } startInfo = ExtractAndInitializeStartInfoFromArguments(startInfo, args); + args.Remove("--console"); // Remove "console" flag, already handled + args.Remove("--etw"); // Remove "etw" flag, already handled var mainCommand = args[1].ToLowerInvariant(); if (mainCommand.Length > 0 && mainCommand.Length <= 6 && "inject"[..mainCommand.Length] == mainCommand) @@ -100,10 +105,23 @@ namespace Dalamud.Injector } } + private static string GetLogPath(string filename) + { + var baseDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + +#if DEBUG + var logPath = Path.Combine(baseDirectory, $"{filename}.log"); +#else + var logPath = Path.Combine(baseDirectory, "..", "..", "..", $"{filename}.log"); +#endif + + return logPath; + } + private static void Init(List args) { + InitLogging(args.Any(x => x == "-v")); InitUnhandledException(args); - InitLogging(); var cwd = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory; if (cwd.FullName != Directory.GetCurrentDirectory()) @@ -158,23 +176,18 @@ namespace Dalamud.Injector }; } - private static void InitLogging() + private static void InitLogging(bool verbose) { - var baseDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - #if DEBUG - var logPath = Path.Combine(baseDirectory, "dalamud.injector.log"); -#else - var logPath = Path.Combine(baseDirectory, "..", "..", "..", "dalamud.injector.log"); + verbose = true; #endif - var levelSwitch = new LoggingLevelSwitch(); + var levelSwitch = new LoggingLevelSwitch + { + MinimumLevel = verbose ? LogEventLevel.Verbose : LogEventLevel.Information, + }; -#if DEBUG - levelSwitch.MinimumLevel = LogEventLevel.Verbose; -#else - levelSwitch.MinimumLevel = LogEventLevel.Information; -#endif + var logPath = GetLogPath("dalamud.injector"); CullLogFile(logPath, 1 * 1024 * 1024); @@ -236,8 +249,7 @@ namespace Dalamud.Injector int len; string key; - if (startInfo == null) - startInfo = new(); + startInfo ??= new DalamudStartInfo(); var workingDirectory = startInfo.WorkingDirectory; var configurationPath = startInfo.ConfigurationPath; @@ -288,7 +300,7 @@ namespace Dalamud.Injector clientLanguage = ClientLanguage.Japanese; else if (languageStr[0..(len = Math.Min(languageStr.Length, (key = "german").Length))] == key[0..len]) clientLanguage = ClientLanguage.German; - else if (languageStr[0..(len = Math.Min(languageStr.Length, (key = "deutsche").Length))] == key[0..len]) + else if (languageStr[0..(len = Math.Min(languageStr.Length, (key = "deutsch").Length))] == key[0..len]) clientLanguage = ClientLanguage.German; else if (languageStr[0..(len = Math.Min(languageStr.Length, (key = "french").Length))] == key[0..len]) clientLanguage = ClientLanguage.French; @@ -299,17 +311,25 @@ namespace Dalamud.Injector else throw new CommandLineException($"\"{languageStr}\" is not a valid supported language."); - return new() - { - WorkingDirectory = workingDirectory, - ConfigurationPath = configurationPath, - PluginDirectory = pluginDirectory, - DefaultPluginDirectory = defaultPluginDirectory, - AssetDirectory = assetDirectory, - Language = clientLanguage, - GameVersion = null, - DelayInitializeMs = delayInitializeMs, - }; + startInfo.WorkingDirectory = workingDirectory; + startInfo.ConfigurationPath = configurationPath; + startInfo.PluginDirectory = pluginDirectory; + startInfo.DefaultPluginDirectory = defaultPluginDirectory; + startInfo.AssetDirectory = assetDirectory; + startInfo.Language = clientLanguage; + startInfo.DelayInitializeMs = delayInitializeMs; + startInfo.GameVersion = null; + + // Set boot defaults + startInfo.BootShowConsole = args.Contains("--console"); + startInfo.BootEnableEtw = args.Contains("--etw"); + startInfo.BootLogPath = GetLogPath("dalamud.boot"); + startInfo.BootEnabledGameFixes = new List { "prevent_devicechange_crashes", "disable_game_openprocess_access_check", "redirect_openprocess" }; + startInfo.BootDotnetOpenProcessHookMode = 0; + // startInfo.BootWaitMessageBox = 2; + // startInfo.BootUnhookDlls = new List() { "kernel32.dll", "ntdll.dll", "user32.dll" }; + + return startInfo; } private static int ProcessHelpCommand(List args, string? particularCommand = default) @@ -324,7 +344,7 @@ namespace Dalamud.Injector Console.WriteLine("{0} help [command]", exeName); if (particularCommand is null or "inject") - Console.WriteLine("{0} inject [-h/--help] [-a/--all] [--warn] [pid1] [pid2] [pid3] ...", exeName); + Console.WriteLine("{0} inject [-h/--help] [-a/--all] [--warn] [--fix-acl] [--se-debug-privilege] [pid1] [pid2] [pid3] ...", exeName); if (particularCommand is null or "launch") { @@ -332,7 +352,7 @@ namespace Dalamud.Injector Console.WriteLine("{0} [-g path/to/ffxiv_dx11.exe] [--game=path/to/ffxiv_dx11.exe]", exeSpaces); Console.WriteLine("{0} [-m entrypoint|inject] [--mode=entrypoint|inject]", exeSpaces); Console.WriteLine("{0} [--handle-owner=inherited-handle-value]", exeSpaces); - Console.WriteLine("{0} [--without-dalamud]", exeSpaces); + Console.WriteLine("{0} [--without-dalamud] [--no-fix-acl]", exeSpaces); Console.WriteLine("{0} [-- game_arg1=value1 game_arg2=value2 ...]", exeSpaces); } @@ -341,6 +361,10 @@ namespace Dalamud.Injector Console.WriteLine(" [--dalamud-asset-directory=path] [--dalamud-delay-initialize=0(ms)]"); Console.WriteLine(" [--dalamud-client-language=0-3|j(apanese)|e(nglish)|d|g(erman)|f(rench)]"); + Console.WriteLine("Verbose logging:\t[-v]"); + Console.WriteLine("Show Console:\t[--console]"); + Console.WriteLine("Enable ETW:\t[--etw]"); + return 0; } @@ -351,6 +375,8 @@ namespace Dalamud.Injector var targetProcessSpecified = false; var warnManualInjection = false; var showHelp = args.Count <= 2; + var tryFixAcl = false; + var tryClaimSeDebugPrivilege = false; for (var i = 2; i < args.Count; i++) { @@ -378,6 +404,14 @@ namespace Dalamud.Injector targetProcessSpecified = true; processes.AddRange(Process.GetProcessesByName("ffxiv_dx11")); } + else if (args[i] == "--fix-acl" || args[i] == "--acl-fix") + { + tryFixAcl = true; + } + else if (args[i] == "--se-debug-privilege") + { + tryClaimSeDebugPrivilege = true; + } else if (args[i] == "--warn") { warnManualInjection = true; @@ -416,8 +450,21 @@ namespace Dalamud.Injector } } + if (tryClaimSeDebugPrivilege) + { + try + { + GameStart.ClaimSeDebug(); + Log.Information("SeDebugPrivilege claimed."); + } + catch (Win32Exception e2) + { + Log.Warning(e2, "Failed to claim SeDebugPrivilege"); + } + } + foreach (var process in processes) - Inject(process, AdjustStartInfo(dalamudStartInfo, process.MainModule.FileName)); + Inject(process, AdjustStartInfo(dalamudStartInfo, process.MainModule.FileName), tryFixAcl); return 0; } @@ -431,6 +478,7 @@ namespace Dalamud.Injector var showHelp = args.Count <= 2; var handleOwner = IntPtr.Zero; var withoutDalamud = false; + var noFixAcl = false; var parsingGameArgument = false; for (var i = 2; i < args.Count; i++) @@ -447,6 +495,8 @@ namespace Dalamud.Injector useFakeArguments = true; else if (args[i] == "--without-dalamud") withoutDalamud = true; + else if (args[i] == "--no-fix-acl" || args[i] == "--no-acl-fix") + noFixAcl = true; else if (args[i] == "-g") gamePath = args[++i]; else if (args[i].StartsWith("--game=")) @@ -547,7 +597,7 @@ namespace Dalamud.Injector } var gameArgumentString = string.Join(" ", gameArguments.Select(x => EncodeParameterArgument(x))); - var process = NativeAclFix.LaunchGame(Path.GetDirectoryName(gamePath), gamePath, gameArgumentString, (Process p) => + var process = GameStart.LaunchGame(Path.GetDirectoryName(gamePath), gamePath, gameArgumentString, noFixAcl, (Process p) => { if (!withoutDalamud && mode == "entrypoint") { @@ -558,14 +608,18 @@ namespace Dalamud.Injector Log.Error("[HOOKS] RewriteRemoteEntryPointW failed"); throw new Exception("RewriteRemoteEntryPointW failed"); } + + Log.Verbose("RewriteRemoteEntryPointW called!"); } }); + Log.Verbose("Game process started with PID {0}", process.Id); + if (!withoutDalamud && mode == "inject") { var startInfo = AdjustStartInfo(dalamudStartInfo, gamePath); Log.Information("Using start info: {0}", JsonConvert.SerializeObject(startInfo)); - Inject(process, startInfo); + Inject(process, startInfo, false); } var processHandleForOwner = IntPtr.Zero; @@ -634,21 +688,26 @@ namespace Dalamud.Injector var gameVerStr = File.ReadAllText(Path.Combine(ffxivDir, "ffxivgame.ver")); var gameVer = GameVersion.Parse(gameVerStr); - return new() + return new DalamudStartInfo(startInfo) { - WorkingDirectory = startInfo.WorkingDirectory, - ConfigurationPath = startInfo.ConfigurationPath, - PluginDirectory = startInfo.PluginDirectory, - DefaultPluginDirectory = startInfo.DefaultPluginDirectory, - AssetDirectory = startInfo.AssetDirectory, - Language = startInfo.Language, GameVersion = gameVer, - DelayInitializeMs = startInfo.DelayInitializeMs, }; } - private static void Inject(Process process, DalamudStartInfo startInfo) + private static void Inject(Process process, DalamudStartInfo startInfo, bool tryFixAcl = false) { + if (tryFixAcl) + { + try + { + GameStart.CopyAclFromSelfToTargetProcess(process.SafeHandle.DangerousGetHandle()); + } + catch (Win32Exception e1) + { + Log.Warning(e1, "Failed to copy ACL"); + } + } + var bootName = "Dalamud.Boot.dll"; var bootPath = Path.GetFullPath(bootName); diff --git a/Dalamud.Injector/NativeAclFix.cs b/Dalamud.Injector/GameStart.cs similarity index 68% rename from Dalamud.Injector/NativeAclFix.cs rename to Dalamud.Injector/GameStart.cs index d3798cfde..44102d952 100644 --- a/Dalamud.Injector/NativeAclFix.cs +++ b/Dalamud.Injector/GameStart.cs @@ -12,9 +12,9 @@ using Serilog; namespace Dalamud.Injector { /// - /// Class responsible for stripping ACL protections from processes. + /// Class responsible for starting the game and stripping ACL protections from processes. /// - public static class NativeAclFix + public static class GameStart { /// /// Start a process without ACL protections. @@ -22,41 +22,47 @@ namespace Dalamud.Injector /// The working directory. /// The path to the executable file. /// Arguments to pass to the executable file. + /// Don't actually fix the ACL. /// Action to execute before the process is started. + /// Wait for the game window to be ready before proceeding. /// The started process. /// Thrown when a win32 error occurs. - /// Thrown when the process did not start correctly. - public static Process LaunchGame(string workingDir, string exePath, string arguments, Action beforeResume) + /// Thrown when the process did not start correctly. + public static Process LaunchGame(string workingDir, string exePath, string arguments, bool dontFixAcl, Action beforeResume, bool waitForGameWindow = true) { Process process = null; - var userName = Environment.UserName; - - var pExplicitAccess = default(PInvoke.EXPLICIT_ACCESS); - PInvoke.BuildExplicitAccessWithName( - ref pExplicitAccess, - userName, - PInvoke.STANDARD_RIGHTS_ALL | PInvoke.SPECIFIC_RIGHTS_ALL & ~PInvoke.PROCESS_VM_WRITE, - PInvoke.GRANT_ACCESS, - 0); - - if (PInvoke.SetEntriesInAcl(1, ref pExplicitAccess, IntPtr.Zero, out var newAcl) != 0) + var psecDesc = IntPtr.Zero; + if (!dontFixAcl) { - throw new Win32Exception(Marshal.GetLastWin32Error()); - } + var userName = Environment.UserName; - if (!PInvoke.InitializeSecurityDescriptor(out var secDesc, PInvoke.SECURITY_DESCRIPTOR_REVISION)) - { - throw new Win32Exception(Marshal.GetLastWin32Error()); - } + var pExplicitAccess = default(PInvoke.EXPLICIT_ACCESS); + PInvoke.BuildExplicitAccessWithName( + ref pExplicitAccess, + userName, + PInvoke.STANDARD_RIGHTS_ALL | PInvoke.SPECIFIC_RIGHTS_ALL & ~PInvoke.PROCESS_VM_WRITE, + PInvoke.GRANT_ACCESS, + 0); - if (!PInvoke.SetSecurityDescriptorDacl(ref secDesc, true, newAcl, false)) - { - throw new Win32Exception(Marshal.GetLastWin32Error()); - } + if (PInvoke.SetEntriesInAcl(1, ref pExplicitAccess, IntPtr.Zero, out var newAcl) != 0) + { + throw new Win32Exception(Marshal.GetLastWin32Error()); + } - var psecDesc = Marshal.AllocHGlobal(Marshal.SizeOf()); - Marshal.StructureToPtr(secDesc, psecDesc, true); + if (!PInvoke.InitializeSecurityDescriptor(out var secDesc, PInvoke.SECURITY_DESCRIPTOR_REVISION)) + { + throw new Win32Exception(Marshal.GetLastWin32Error()); + } + + if (!PInvoke.SetSecurityDescriptorDacl(ref secDesc, true, newAcl, false)) + { + throw new Win32Exception(Marshal.GetLastWin32Error()); + } + + psecDesc = Marshal.AllocHGlobal(Marshal.SizeOf()); + Marshal.StructureToPtr(secDesc, psecDesc, true); + } var lpProcessInformation = default(PInvoke.PROCESS_INFORMATION); try @@ -75,7 +81,15 @@ namespace Dalamud.Injector var compatLayerPrev = Environment.GetEnvironmentVariable("__COMPAT_LAYER"); - Environment.SetEnvironmentVariable("__COMPAT_LAYER", "RunAsInvoker"); + if (!string.IsNullOrEmpty(compatLayerPrev) && !compatLayerPrev.Contains("RunAsInvoker")) + { + Environment.SetEnvironmentVariable("__COMPAT_LAYER", $"RunAsInvoker {compatLayerPrev}"); + } + else if (string.IsNullOrEmpty(compatLayerPrev)) + { + Environment.SetEnvironmentVariable("__COMPAT_LAYER", "RunAsInvoker"); + } + try { if (!PInvoke.CreateProcess( @@ -98,7 +112,8 @@ namespace Dalamud.Injector Environment.SetEnvironmentVariable("__COMPAT_LAYER", compatLayerPrev); } - DisableSeDebug(lpProcessInformation.hProcess); + if (!dontFixAcl) + DisableSeDebug(lpProcessInformation.hProcess); process = new ExistingProcess(lpProcessInformation.hProcess); @@ -107,49 +122,40 @@ namespace Dalamud.Injector PInvoke.ResumeThread(lpProcessInformation.hThread); // Ensure that the game main window is prepared - try + if (waitForGameWindow) { - do + try { - process.WaitForInputIdle(); + var tries = 0; + const int maxTries = 420; + const int timeout = 50; - Thread.Sleep(100); + do + { + Thread.Sleep(timeout); + + if (process.HasExited) + throw new GameStartException(); + + if (tries > maxTries) + throw new GameStartException($"Couldn't find game window after {maxTries * timeout}ms"); + + tries++; + } + while (TryFindGameWindow(process) == IntPtr.Zero); + } + catch (InvalidOperationException) + { + throw new GameStartException("Could not read process information."); } - while (TryFindGameWindow(process) == IntPtr.Zero); - } - catch (InvalidOperationException) - { - throw new GameExitedException(); } - if (PInvoke.GetSecurityInfo( - PInvoke.GetCurrentProcess(), - PInvoke.SE_OBJECT_TYPE.SE_KERNEL_OBJECT, - PInvoke.SECURITY_INFORMATION.DACL_SECURITY_INFORMATION, - IntPtr.Zero, - IntPtr.Zero, - out var pACL, - IntPtr.Zero, - IntPtr.Zero) != 0) - { - throw new Win32Exception(Marshal.GetLastWin32Error()); - } - - if (PInvoke.SetSecurityInfo( - lpProcessInformation.hProcess, - PInvoke.SE_OBJECT_TYPE.SE_KERNEL_OBJECT, - PInvoke.SECURITY_INFORMATION.DACL_SECURITY_INFORMATION | PInvoke.SECURITY_INFORMATION.UNPROTECTED_DACL_SECURITY_INFORMATION, - IntPtr.Zero, - IntPtr.Zero, - pACL, - IntPtr.Zero) != 0) - { - throw new Win32Exception(Marshal.GetLastWin32Error()); - } + if (!dontFixAcl) + CopyAclFromSelfToTargetProcess(lpProcessInformation.hProcess); } catch (Exception ex) { - Log.Error(ex, "[NativeAclFix] Uncaught error during initialization, trying to kill process"); + Log.Error(ex, "[GameStart] Uncaught error during initialization, trying to kill process"); try { @@ -157,20 +163,98 @@ namespace Dalamud.Injector } catch (Exception killEx) { - Log.Error(killEx, "[NativeAclFix] Could not kill process"); + Log.Error(killEx, "[GameStart] Could not kill process"); } throw; } finally { - Marshal.FreeHGlobal(psecDesc); + if (psecDesc != IntPtr.Zero) + Marshal.FreeHGlobal(psecDesc); PInvoke.CloseHandle(lpProcessInformation.hThread); } return process; } + /// + /// Copies ACL of current process to the target process. + /// + /// Native handle to the target process. + /// Thrown when a win32 error occurs. + public static void CopyAclFromSelfToTargetProcess(IntPtr hProcess) + { + if (PInvoke.GetSecurityInfo( + PInvoke.GetCurrentProcess(), + PInvoke.SE_OBJECT_TYPE.SE_KERNEL_OBJECT, + PInvoke.SECURITY_INFORMATION.DACL_SECURITY_INFORMATION, + IntPtr.Zero, + IntPtr.Zero, + out var pACL, + IntPtr.Zero, + IntPtr.Zero) != 0) + { + throw new Win32Exception(Marshal.GetLastWin32Error()); + } + + if (PInvoke.SetSecurityInfo( + hProcess, + PInvoke.SE_OBJECT_TYPE.SE_KERNEL_OBJECT, + PInvoke.SECURITY_INFORMATION.DACL_SECURITY_INFORMATION | PInvoke.SECURITY_INFORMATION.UNPROTECTED_DACL_SECURITY_INFORMATION, + IntPtr.Zero, + IntPtr.Zero, + pACL, + IntPtr.Zero) != 0) + { + throw new Win32Exception(Marshal.GetLastWin32Error()); + } + } + + public static void ClaimSeDebug() + { + var hToken = PInvoke.INVALID_HANDLE_VALUE; + try + { + if (!PInvoke.OpenThreadToken(PInvoke.GetCurrentThread(), PInvoke.TOKEN_QUERY | PInvoke.TOKEN_ADJUST_PRIVILEGES, false, out hToken)) + { + if (Marshal.GetLastWin32Error() != PInvoke.ERROR_NO_TOKEN) + throw new Exception("ClaimSeDebug.OpenProcessToken#1", new Win32Exception(Marshal.GetLastWin32Error())); + + if (!PInvoke.ImpersonateSelf(PInvoke.SECURITY_IMPERSONATION_LEVEL.SecurityImpersonation)) + throw new Exception("ClaimSeDebug.ImpersonateSelf", new Win32Exception(Marshal.GetLastWin32Error())); + + if (!PInvoke.OpenThreadToken(PInvoke.GetCurrentThread(), PInvoke.TOKEN_QUERY | PInvoke.TOKEN_ADJUST_PRIVILEGES, false, out hToken)) + throw new Exception("ClaimSeDebug.OpenProcessToken#2", new Win32Exception(Marshal.GetLastWin32Error())); + } + + var luidDebugPrivilege = default(PInvoke.LUID); + if (!PInvoke.LookupPrivilegeValue(null, PInvoke.SE_DEBUG_NAME, ref luidDebugPrivilege)) + throw new Exception("ClaimSeDebug.LookupPrivilegeValue", new Win32Exception(Marshal.GetLastWin32Error())); + + var tpLookup = new PInvoke.TOKEN_PRIVILEGES() + { + PrivilegeCount = 1, + Privileges = new PInvoke.LUID_AND_ATTRIBUTES[1] + { + new PInvoke.LUID_AND_ATTRIBUTES() + { + Luid = luidDebugPrivilege, + Attributes = PInvoke.SE_PRIVILEGE_ENABLED, + }, + }, + }; + + if (!PInvoke.AdjustTokenPrivileges(hToken, false, ref tpLookup, 0, IntPtr.Zero, IntPtr.Zero)) + throw new Exception("ClaimSeDebug.AdjustTokenPrivileges", new Win32Exception(Marshal.GetLastWin32Error())); + } + finally + { + if (hToken != PInvoke.INVALID_HANDLE_VALUE && hToken != IntPtr.Zero) + PInvoke.CloseHandle(hToken); + } + } + private static void DisableSeDebug(IntPtr processHandle) { if (!PInvoke.OpenProcessToken(processHandle, PInvoke.TOKEN_QUERY | PInvoke.TOKEN_ADJUST_PRIVILEGES, out var tokenHandle)) @@ -179,7 +263,7 @@ namespace Dalamud.Injector } var luidDebugPrivilege = default(PInvoke.LUID); - if (!PInvoke.LookupPrivilegeValue(null, "SeDebugPrivilege", ref luidDebugPrivilege)) + if (!PInvoke.LookupPrivilegeValue(null, PInvoke.SE_DEBUG_NAME, ref luidDebugPrivilege)) { throw new Win32Exception(Marshal.GetLastWin32Error()); } @@ -211,7 +295,7 @@ namespace Dalamud.Injector tokenPrivileges.Privileges[0].Luid = luidDebugPrivilege; tokenPrivileges.Privileges[0].Attributes = PInvoke.SE_PRIVILEGE_REMOVED; - if (!PInvoke.AdjustTokenPrivileges(tokenHandle, false, ref tokenPrivileges, 0, IntPtr.Zero, 0)) + if (!PInvoke.AdjustTokenPrivileges(tokenHandle, false, ref tokenPrivileges, 0, IntPtr.Zero, IntPtr.Zero)) { throw new Win32Exception(Marshal.GetLastWin32Error()); } @@ -239,13 +323,14 @@ namespace Dalamud.Injector /// /// Exception thrown when the process has exited before a window could be found. /// - public class GameExitedException : Exception + public class GameStartException : Exception { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public GameExitedException() - : base("Game exited prematurely.") + /// The message to pass on. + public GameStartException(string? message = null) + : base(message ?? "Game exited prematurely.") { } } @@ -260,6 +345,10 @@ namespace Dalamud.Injector private static class PInvoke { #region Constants + public static readonly IntPtr INVALID_HANDLE_VALUE = new(-1); + + public const string SE_DEBUG_NAME = "SeDebugPrivilege"; + public const UInt32 STANDARD_RIGHTS_ALL = 0x001F0000; public const UInt32 SPECIFIC_RIGHTS_ALL = 0x0000FFFF; public const UInt32 PROCESS_VM_WRITE = 0x0020; @@ -278,6 +367,8 @@ namespace Dalamud.Injector public const UInt32 SE_PRIVILEGE_ENABLED = 0x00000002; public const UInt32 SE_PRIVILEGE_REMOVED = 0x00000004; + public const UInt32 ERROR_NO_TOKEN = 0x000003F0; + public enum MULTIPLE_TRUSTEE_OPERATION { NO_MULTIPLE_TRUSTEE, @@ -334,6 +425,14 @@ namespace Dalamud.Injector UNPROTECTED_DACL_SECURITY_INFORMATION = 0x20000000, PROTECTED_SACL_SECURITY_INFORMATION = 0x40000000, } + + public enum SECURITY_IMPERSONATION_LEVEL + { + SecurityAnonymous, + SecurityIdentification, + SecurityImpersonation, + SecurityDelegation + } #endregion #region Methods @@ -384,12 +483,24 @@ namespace Dalamud.Injector [DllImport("kernel32.dll", SetLastError = true)] public static extern uint ResumeThread(IntPtr hThread); + [DllImport("advapi32.dll", SetLastError = true)] + public static extern bool ImpersonateSelf( + SECURITY_IMPERSONATION_LEVEL impersonationLevel + ); + [DllImport("advapi32.dll", SetLastError = true)] public static extern bool OpenProcessToken( IntPtr processHandle, UInt32 desiredAccess, out IntPtr tokenHandle); + [DllImport("advapi32.dll", SetLastError = true)] + public static extern bool OpenThreadToken( + IntPtr ThreadHandle, + uint DesiredAccess, + bool OpenAsSelf, + out IntPtr TokenHandle); + [DllImport("advapi32.dll", SetLastError = true)] public static extern bool LookupPrivilegeValue(string lpSystemName, string lpName, ref LUID lpLuid); @@ -404,9 +515,9 @@ namespace Dalamud.Injector IntPtr tokenHandle, bool disableAllPrivileges, ref TOKEN_PRIVILEGES newState, - UInt32 bufferLengthInBytes, + int cbPreviousState, IntPtr previousState, - UInt32 returnLengthInBytes); + IntPtr cbOutPreviousState); [DllImport("advapi32.dll", SetLastError = true)] public static extern uint GetSecurityInfo( @@ -432,6 +543,9 @@ namespace Dalamud.Injector [DllImport("kernel32.dll", SetLastError = true)] public static extern IntPtr GetCurrentProcess(); + [DllImport("kernel32.dll", SetLastError = true)] + public static extern IntPtr GetCurrentThread(); + [DllImport("user32.dll", SetLastError = true)] public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr hWndChildAfter, string className, IntPtr windowTitle); diff --git a/Dalamud.sln b/Dalamud.sln index bdb771989..546e31dfe 100644 --- a/Dalamud.sln +++ b/Dalamud.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31424.327 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32319.34 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CEF7D22B-CB85-400E-BD64-349A30E3C097}" ProjectSection(SolutionItems) = preProject @@ -38,106 +38,154 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {94E5B016-02B1-459B-97D9-E783F28764B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {94E5B016-02B1-459B-97D9-E783F28764B2}.Debug|Any CPU.Build.0 = Debug|Any CPU {94E5B016-02B1-459B-97D9-E783F28764B2}.Debug|x64.ActiveCfg = Debug|Any CPU {94E5B016-02B1-459B-97D9-E783F28764B2}.Debug|x64.Build.0 = Debug|Any CPU + {94E5B016-02B1-459B-97D9-E783F28764B2}.Debug|x86.ActiveCfg = Debug|Any CPU {94E5B016-02B1-459B-97D9-E783F28764B2}.Release|Any CPU.ActiveCfg = Release|Any CPU {94E5B016-02B1-459B-97D9-E783F28764B2}.Release|Any CPU.Build.0 = Release|Any CPU {94E5B016-02B1-459B-97D9-E783F28764B2}.Release|x64.ActiveCfg = Release|Any CPU {94E5B016-02B1-459B-97D9-E783F28764B2}.Release|x64.Build.0 = Release|Any CPU + {94E5B016-02B1-459B-97D9-E783F28764B2}.Release|x86.ActiveCfg = Release|Any CPU {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Debug|Any CPU.ActiveCfg = Debug|x64 {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Debug|Any CPU.Build.0 = Debug|x64 {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Debug|x64.ActiveCfg = Debug|x64 {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Debug|x64.Build.0 = Debug|x64 + {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Debug|x86.ActiveCfg = Debug|Any CPU + {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Debug|x86.Build.0 = Debug|Any CPU {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Release|Any CPU.ActiveCfg = Release|x64 {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Release|Any CPU.Build.0 = Release|x64 {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Release|x64.ActiveCfg = Release|x64 {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Release|x64.Build.0 = Release|x64 + {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Release|x86.ActiveCfg = Release|Any CPU + {B92DAB43-2279-4A2C-96E3-D9D5910EDBEA}.Release|x86.Build.0 = Release|Any CPU {55198DC3-A03D-408E-A8EB-2077780C8576}.Debug|Any CPU.ActiveCfg = Debug|x64 {55198DC3-A03D-408E-A8EB-2077780C8576}.Debug|Any CPU.Build.0 = Debug|x64 {55198DC3-A03D-408E-A8EB-2077780C8576}.Debug|x64.ActiveCfg = Debug|x64 {55198DC3-A03D-408E-A8EB-2077780C8576}.Debug|x64.Build.0 = Debug|x64 + {55198DC3-A03D-408E-A8EB-2077780C8576}.Debug|x86.ActiveCfg = Debug|x64 + {55198DC3-A03D-408E-A8EB-2077780C8576}.Debug|x86.Build.0 = Debug|x64 {55198DC3-A03D-408E-A8EB-2077780C8576}.Release|Any CPU.ActiveCfg = Release|x64 {55198DC3-A03D-408E-A8EB-2077780C8576}.Release|Any CPU.Build.0 = Release|x64 {55198DC3-A03D-408E-A8EB-2077780C8576}.Release|x64.ActiveCfg = Release|x64 {55198DC3-A03D-408E-A8EB-2077780C8576}.Release|x64.Build.0 = Release|x64 + {55198DC3-A03D-408E-A8EB-2077780C8576}.Release|x86.ActiveCfg = Release|x64 + {55198DC3-A03D-408E-A8EB-2077780C8576}.Release|x86.Build.0 = Release|x64 {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Debug|Any CPU.ActiveCfg = Debug|x64 {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Debug|Any CPU.Build.0 = Debug|x64 {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Debug|x64.ActiveCfg = Debug|x64 {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Debug|x64.Build.0 = Debug|x64 + {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Debug|x86.ActiveCfg = Debug|Any CPU + {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Debug|x86.Build.0 = Debug|Any CPU {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Release|Any CPU.ActiveCfg = Release|x64 {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Release|Any CPU.Build.0 = Release|x64 {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Release|x64.ActiveCfg = Release|x64 {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Release|x64.Build.0 = Release|x64 + {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Release|x86.ActiveCfg = Release|Any CPU + {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Release|x86.Build.0 = Release|Any CPU {8874326B-E755-4D13-90B4-59AB263A3E6B}.Debug|Any CPU.ActiveCfg = Debug|x64 {8874326B-E755-4D13-90B4-59AB263A3E6B}.Debug|Any CPU.Build.0 = Debug|x64 {8874326B-E755-4D13-90B4-59AB263A3E6B}.Debug|x64.ActiveCfg = Debug|x64 {8874326B-E755-4D13-90B4-59AB263A3E6B}.Debug|x64.Build.0 = Debug|x64 + {8874326B-E755-4D13-90B4-59AB263A3E6B}.Debug|x86.ActiveCfg = Debug|x64 + {8874326B-E755-4D13-90B4-59AB263A3E6B}.Debug|x86.Build.0 = Debug|x64 {8874326B-E755-4D13-90B4-59AB263A3E6B}.Release|Any CPU.ActiveCfg = Release|x64 {8874326B-E755-4D13-90B4-59AB263A3E6B}.Release|Any CPU.Build.0 = Release|x64 {8874326B-E755-4D13-90B4-59AB263A3E6B}.Release|x64.ActiveCfg = Release|x64 {8874326B-E755-4D13-90B4-59AB263A3E6B}.Release|x64.Build.0 = Release|x64 + {8874326B-E755-4D13-90B4-59AB263A3E6B}.Release|x86.ActiveCfg = Release|x64 + {8874326B-E755-4D13-90B4-59AB263A3E6B}.Release|x86.Build.0 = Release|x64 {C8004563-1806-4329-844F-0EF6274291FC}.Debug|Any CPU.ActiveCfg = Debug|x64 {C8004563-1806-4329-844F-0EF6274291FC}.Debug|Any CPU.Build.0 = Debug|x64 {C8004563-1806-4329-844F-0EF6274291FC}.Debug|x64.ActiveCfg = Debug|x64 {C8004563-1806-4329-844F-0EF6274291FC}.Debug|x64.Build.0 = Debug|x64 + {C8004563-1806-4329-844F-0EF6274291FC}.Debug|x86.ActiveCfg = Debug|Any CPU + {C8004563-1806-4329-844F-0EF6274291FC}.Debug|x86.Build.0 = Debug|Any CPU {C8004563-1806-4329-844F-0EF6274291FC}.Release|Any CPU.ActiveCfg = Release|x64 {C8004563-1806-4329-844F-0EF6274291FC}.Release|Any CPU.Build.0 = Release|x64 {C8004563-1806-4329-844F-0EF6274291FC}.Release|x64.ActiveCfg = Release|x64 {C8004563-1806-4329-844F-0EF6274291FC}.Release|x64.Build.0 = Release|x64 + {C8004563-1806-4329-844F-0EF6274291FC}.Release|x86.ActiveCfg = Release|Any CPU + {C8004563-1806-4329-844F-0EF6274291FC}.Release|x86.Build.0 = Release|Any CPU {0483026E-C6CE-4B1A-AA68-46544C08140B}.Debug|Any CPU.ActiveCfg = Debug|x64 {0483026E-C6CE-4B1A-AA68-46544C08140B}.Debug|Any CPU.Build.0 = Debug|x64 {0483026E-C6CE-4B1A-AA68-46544C08140B}.Debug|x64.ActiveCfg = Debug|x64 {0483026E-C6CE-4B1A-AA68-46544C08140B}.Debug|x64.Build.0 = Debug|x64 + {0483026E-C6CE-4B1A-AA68-46544C08140B}.Debug|x86.ActiveCfg = Debug|x64 + {0483026E-C6CE-4B1A-AA68-46544C08140B}.Debug|x86.Build.0 = Debug|x64 {0483026E-C6CE-4B1A-AA68-46544C08140B}.Release|Any CPU.ActiveCfg = Release|x64 {0483026E-C6CE-4B1A-AA68-46544C08140B}.Release|Any CPU.Build.0 = Release|x64 {0483026E-C6CE-4B1A-AA68-46544C08140B}.Release|x64.ActiveCfg = Release|x64 {0483026E-C6CE-4B1A-AA68-46544C08140B}.Release|x64.Build.0 = Release|x64 + {0483026E-C6CE-4B1A-AA68-46544C08140B}.Release|x86.ActiveCfg = Release|x64 + {0483026E-C6CE-4B1A-AA68-46544C08140B}.Release|x86.Build.0 = Release|x64 {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Debug|Any CPU.ActiveCfg = Debug|x64 {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Debug|Any CPU.Build.0 = Debug|x64 {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Debug|x64.ActiveCfg = Debug|x64 {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Debug|x64.Build.0 = Debug|x64 + {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Debug|x86.ActiveCfg = Debug|x64 + {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Debug|x86.Build.0 = Debug|x64 {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Release|Any CPU.ActiveCfg = Release|x64 {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Release|Any CPU.Build.0 = Release|x64 {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Release|x64.ActiveCfg = Release|x64 {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Release|x64.Build.0 = Release|x64 + {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Release|x86.ActiveCfg = Release|x64 + {C0E7E797-4FBF-4F46-BC57-463F3719BA7A}.Release|x86.Build.0 = Release|x64 {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Debug|Any CPU.ActiveCfg = Debug|x64 {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Debug|Any CPU.Build.0 = Debug|x64 {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Debug|x64.ActiveCfg = Debug|x64 {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Debug|x64.Build.0 = Debug|x64 + {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Debug|x86.ActiveCfg = Debug|x64 + {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Debug|x86.Build.0 = Debug|x64 {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Release|Any CPU.ActiveCfg = Release|x64 {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Release|Any CPU.Build.0 = Release|x64 {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Release|x64.ActiveCfg = Release|x64 {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Release|x64.Build.0 = Release|x64 + {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Release|x86.ActiveCfg = Release|x64 + {2F7FF0A8-B619-4572-86C7-71E46FE22FB8}.Release|x86.Build.0 = Release|x64 {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Debug|Any CPU.ActiveCfg = Debug|x64 {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Debug|Any CPU.Build.0 = Debug|x64 {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Debug|x64.ActiveCfg = Debug|x64 {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Debug|x64.Build.0 = Debug|x64 + {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Debug|x86.ActiveCfg = Debug|x64 + {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Debug|x86.Build.0 = Debug|x64 {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Release|Any CPU.ActiveCfg = Release|x64 {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Release|Any CPU.Build.0 = Release|x64 {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Release|x64.ActiveCfg = Release|x64 {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Release|x64.Build.0 = Release|x64 + {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Release|x86.ActiveCfg = Release|x64 + {4AFDB34A-7467-4D41-B067-53BC4101D9D0}.Release|x86.Build.0 = Release|x64 {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Debug|Any CPU.Build.0 = Debug|Any CPU {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Debug|x64.ActiveCfg = Debug|Any CPU {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Debug|x64.Build.0 = Debug|Any CPU + {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Debug|x86.ActiveCfg = Debug|Any CPU + {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Debug|x86.Build.0 = Debug|Any CPU {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Release|Any CPU.ActiveCfg = Release|Any CPU {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Release|Any CPU.Build.0 = Release|Any CPU {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Release|x64.ActiveCfg = Release|Any CPU {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Release|x64.Build.0 = Release|Any CPU + {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Release|x86.ActiveCfg = Release|Any CPU + {C9B87BD7-AF49-41C3-91F1-D550ADEB7833}.Release|x86.Build.0 = Release|Any CPU {05AB2F46-268B-4915-806F-DDF813E2D59D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {05AB2F46-268B-4915-806F-DDF813E2D59D}.Debug|Any CPU.Build.0 = Debug|Any CPU {05AB2F46-268B-4915-806F-DDF813E2D59D}.Debug|x64.ActiveCfg = Debug|Any CPU {05AB2F46-268B-4915-806F-DDF813E2D59D}.Debug|x64.Build.0 = Debug|Any CPU + {05AB2F46-268B-4915-806F-DDF813E2D59D}.Debug|x86.ActiveCfg = Debug|Any CPU + {05AB2F46-268B-4915-806F-DDF813E2D59D}.Debug|x86.Build.0 = Debug|Any CPU {05AB2F46-268B-4915-806F-DDF813E2D59D}.Release|Any CPU.ActiveCfg = Release|Any CPU {05AB2F46-268B-4915-806F-DDF813E2D59D}.Release|Any CPU.Build.0 = Release|Any CPU {05AB2F46-268B-4915-806F-DDF813E2D59D}.Release|x64.ActiveCfg = Release|Any CPU {05AB2F46-268B-4915-806F-DDF813E2D59D}.Release|x64.Build.0 = Release|Any CPU + {05AB2F46-268B-4915-806F-DDF813E2D59D}.Release|x86.ActiveCfg = Release|Any CPU + {05AB2F46-268B-4915-806F-DDF813E2D59D}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Dalamud/Configuration/Internal/EnvironmentConfiguration.cs b/Dalamud/Configuration/Internal/EnvironmentConfiguration.cs index 01ca64bdd..99a4c6709 100644 --- a/Dalamud/Configuration/Internal/EnvironmentConfiguration.cs +++ b/Dalamud/Configuration/Internal/EnvironmentConfiguration.cs @@ -27,11 +27,6 @@ namespace Dalamud.Configuration.Internal /// public static bool DalamudForceMinHook { get; } = GetEnvironmentVariable("DALAMUD_FORCE_MINHOOK"); - /// - /// Gets a value indicating whether or not Dalamud should wait for a debugger to be attached when initializing. - /// - public static bool DalamudWaitForDebugger { get; } = GetEnvironmentVariable("DALAMUD_WAIT_DEBUGGER"); - /// /// Gets a value indicating whether or not Dalamud context menus should be disabled. /// diff --git a/Dalamud/Dalamud.cs b/Dalamud/Dalamud.cs index 537ffa516..9288a0384 100644 --- a/Dalamud/Dalamud.cs +++ b/Dalamud/Dalamud.cs @@ -26,6 +26,7 @@ using Dalamud.Plugin.Internal; using Dalamud.Plugin.Ipc.Internal; using Dalamud.Support; using Dalamud.Utility; +using Dalamud.Utility.Timing; using Serilog; using Serilog.Core; using Serilog.Events; @@ -48,6 +49,7 @@ namespace Dalamud private readonly ManualResetEvent unloadSignal; private readonly ManualResetEvent finishUnloadSignal; + private readonly IntPtr mainThreadContinueEvent; private MonoMod.RuntimeDetour.Hook processMonoHook; private bool hasDisposedPlugins = false; @@ -60,10 +62,9 @@ namespace Dalamud /// LoggingLevelSwitch to control Serilog level. /// Signal signalling shutdown. /// The Dalamud configuration. - public Dalamud(DalamudStartInfo info, LoggingLevelSwitch loggingLevelSwitch, ManualResetEvent finishSignal, DalamudConfiguration configuration) + /// Event used to signal the main thread to continue. + public Dalamud(DalamudStartInfo info, LoggingLevelSwitch loggingLevelSwitch, ManualResetEvent finishSignal, DalamudConfiguration configuration, IntPtr mainThreadContinueEvent) { - this.ApplyProcessPatch(); - Service.Set(this); Service.Set(info); Service.Set(configuration); @@ -75,6 +76,8 @@ namespace Dalamud this.finishUnloadSignal = finishSignal; this.finishUnloadSignal.Reset(); + + this.mainThreadContinueEvent = mainThreadContinueEvent; } /// @@ -92,6 +95,8 @@ namespace Dalamud /// public void LoadTier1() { + using var tier1Timing = Timings.Start("Tier 1 Init"); + try { SerilogEventSink.Instance.LogLine += SerilogOnLogLine; @@ -99,12 +104,21 @@ namespace Dalamud Service.Set(); // Initialize the process information. - Service.Set(new SigScanner(true)); + var info = Service.Get(); + var cacheDir = new DirectoryInfo(Path.Combine(info.WorkingDirectory!, "cachedSigs")); + if (!cacheDir.Exists) + cacheDir.Create(); + + Service.Set( + new SigScanner(true, new FileInfo(Path.Combine(cacheDir.FullName, $"{info.GameVersion}.json")))); Service.Set(); // Initialize FFXIVClientStructs function resolver - FFXIVClientStructs.Resolver.Initialize(); - Log.Information("[T1] FFXIVClientStructs initialized!"); + using (Timings.Start("CS Resolver Init")) + { + FFXIVClientStructs.Resolver.InitializeParallel(new FileInfo(Path.Combine(cacheDir.FullName, $"{info.GameVersion}_cs.json"))); + Log.Information("[T1] FFXIVClientStructs initialized!"); + } // Initialize game subsystem var framework = Service.Set(); @@ -123,9 +137,18 @@ namespace Dalamud } catch (Exception ex) { - Log.Error(ex, "Tier 1 load failed."); + Log.Error(ex, "Tier 1 load failed"); this.Unload(); } + finally + { + // Signal the main game thread to continue + // TODO: This is done in rewrite_entrypoint.cpp again to avoid a race condition. Should be fixed! + // NativeFunctions.SetEvent(this.mainThreadContinueEvent); + + // Timings.Event("Game kickoff"); + // Log.Information("[T1] Game thread continued!"); + } } /// @@ -134,6 +157,11 @@ namespace Dalamud /// Whether or not the load succeeded. public bool LoadTier2() { + // This marks the first time we are actually on the game's main thread + ThreadSafety.MarkMainThread(); + + using var tier2Timing = Timings.Start("Tier 2 Init"); + try { var configuration = Service.Get(); @@ -157,21 +185,27 @@ namespace Dalamud Service.Set(); Log.Information("[T2] NH OK!"); - try + using (Timings.Start("DM Init")) { - Service.Set().Initialize(this.AssetDirectory.FullName); - } - catch (Exception e) - { - Log.Error(e, "Could not initialize DataManager."); - this.Unload(); - return false; + try + { + Service.Set().Initialize(this.AssetDirectory.FullName); + } + catch (Exception e) + { + Log.Error(e, "Could not initialize DataManager"); + this.Unload(); + return false; + } } Log.Information("[T2] Data OK!"); - var clientState = Service.Set(); - Log.Information("[T2] CS OK!"); + using (Timings.Start("CS Init")) + { + Service.Set(); + Log.Information("[T2] CS OK!"); + } var localization = Service.Set(new Localization(Path.Combine(this.AssetDirectory.FullName, "UIRes", "loc", "dalamud"), "dalamud_")); if (!string.IsNullOrEmpty(configuration.LanguageOverride)) @@ -186,14 +220,23 @@ namespace Dalamud Log.Information("[T2] LOC OK!"); // This is enabled in ImGuiScene setup - Service.Set(); - Log.Information("[T2] IME OK!"); + using (Timings.Start("IME Init")) + { + Service.Set(); + Log.Information("[T2] IME OK!"); + } - Service.Set().Enable(); - Log.Information("[T2] IM OK!"); + using (Timings.Start("IM Enable")) + { + Service.Set().Enable(); + Log.Information("[T2] IM OK!"); + } - Service.Set(); - Log.Information("[T2] GFM OK!"); + using (Timings.Start("GFM Init")) + { + Service.Set(); + Log.Information("[T2] GFM OK!"); + } #pragma warning disable CS0618 // Type or member is obsolete Service.Set(); @@ -201,27 +244,30 @@ namespace Dalamud Log.Information("[T2] SeString OK!"); - // Initialize managers. Basically handlers for the logic - Service.Set(); - - Service.Set().SetupCommands(); - - Log.Information("[T2] CM OK!"); + using (Timings.Start("CM Init")) + { + Service.Set(); + Service.Set().SetupCommands(); + Log.Information("[T2] CM OK!"); + } Service.Set(); - Log.Information("[T2] CH OK!"); - clientState.Enable(); - Log.Information("[T2] CS ENABLE!"); + using (Timings.Start("CS Enable")) + { + Service.Get().Enable(); + Log.Information("[T2] CS ENABLE!"); + } Service.Set().Enable(); + Log.Information("[T2] ATKTWEAKS ENABLE!"); Log.Information("[T2] Load complete!"); } catch (Exception ex) { - Log.Error(ex, "Tier 2 load failed."); + Log.Error(ex, "Tier 2 load failed"); this.Unload(); return false; } @@ -235,46 +281,62 @@ namespace Dalamud /// Whether or not the load succeeded. public bool LoadTier3() { + using var tier3Timing = Timings.Start("Tier 3 Init"); + + ThreadSafety.AssertMainThread(); + try { Log.Information("[T3] START!"); Service.Set(); - var pluginManager = Service.Set(); - Service.Set(); - - Log.Information("[T3] PM OK!"); + PluginManager pluginManager; + using (Timings.Start("PM Init")) + { + pluginManager = Service.Set(); + Service.Set(); + Log.Information("[T3] PM OK!"); + } Service.Set(); Log.Information("[T3] DUI OK!"); try { - _ = pluginManager.SetPluginReposFromConfigAsync(false); + using (Timings.Start("PM Load Plugin Repos")) + { + _ = pluginManager.SetPluginReposFromConfigAsync(false); + pluginManager.OnInstalledPluginsChanged += Troubleshooting.LogTroubleshooting; - pluginManager.OnInstalledPluginsChanged += Troubleshooting.LogTroubleshooting; + Log.Information("[T3] PM repos OK!"); + } - Log.Information("[T3] Sync plugins OK!"); + using (Timings.Start("PM Cleanup Plugins")) + { + pluginManager.CleanupPlugins(); + Log.Information("[T3] PMC OK!"); + } - pluginManager.CleanupPlugins(); - Log.Information("[T3] PMC OK!"); - - pluginManager.LoadAllPlugins(); - Log.Information("[T3] PML OK!"); + using (Timings.Start("PM Load Sync Plugins")) + { + pluginManager.LoadAllPlugins(); + Log.Information("[T3] PML OK!"); + } } catch (Exception ex) { - Log.Error(ex, "Plugin load failed."); + Log.Error(ex, "Plugin load failed"); } Troubleshooting.LogTroubleshooting(); - Log.Information("Dalamud is ready."); + Log.Information("Dalamud is ready"); + Timings.Event("Dalamud ready"); } catch (Exception ex) { - Log.Error(ex, "Tier 3 load failed."); + Log.Error(ex, "Tier 3 load failed"); this.Unload(); return false; @@ -354,7 +416,10 @@ namespace Dalamud Service.GetNullable()?.Dispose(); Service.GetNullable()?.Dispose(); Service.GetNullable()?.Dispose(); - Service.GetNullable()?.Dispose(); + + var sigScanner = Service.Get(); + sigScanner.Save(); + sigScanner.Dispose(); SerilogEventSink.Instance.LogLine -= SerilogOnLogLine; @@ -388,35 +453,5 @@ namespace Dalamud Troubleshooting.LogException(e.Exception, e.Line); } - - /// - /// Patch method for the class Process.Handle. This patch facilitates fixing Reloaded so that it - /// uses pseudo-handles to access memory, to prevent permission errors. - /// It should never be called manually. - /// - /// A delegate that acts as the original method. - /// The equivalent of `this`. - /// A pseudo-handle for the current process, or the result from the original method. - private static IntPtr ProcessHandlePatch(Func orig, Process self) - { - var result = orig(self); - - if (self.Id == Environment.ProcessId) - { - result = (IntPtr)0xFFFFFFFF; - } - - // Log.Verbose($"Process.Handle // {self.ProcessName} // {result:X}"); - return result; - } - - private void ApplyProcessPatch() - { - var targetType = typeof(Process); - - var handleTarget = targetType.GetProperty(nameof(Process.Handle)).GetGetMethod(); - var handlePatch = typeof(Dalamud).GetMethod(nameof(Dalamud.ProcessHandlePatch), BindingFlags.NonPublic | BindingFlags.Static); - this.processMonoHook = new MonoMod.RuntimeDetour.Hook(handleTarget, handlePatch); - } } } diff --git a/Dalamud/Dalamud.csproj b/Dalamud/Dalamud.csproj index 7592d7f03..670b7cd7f 100644 --- a/Dalamud/Dalamud.csproj +++ b/Dalamud/Dalamud.csproj @@ -8,7 +8,7 @@ - 6.4.0.9 + 6.4.0.31 XIV Launcher addon framework $(DalamudVersion) $(DalamudVersion) @@ -65,13 +65,14 @@ - + + @@ -94,6 +95,13 @@ + + + + PreserveNewest + + + diff --git a/Dalamud/DalamudStartInfo.cs b/Dalamud/DalamudStartInfo.cs index 767ee5000..5ba919828 100644 --- a/Dalamud/DalamudStartInfo.cs +++ b/Dalamud/DalamudStartInfo.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using Dalamud.Game; using Newtonsoft.Json; @@ -11,45 +12,135 @@ namespace Dalamud [Serializable] public record DalamudStartInfo { + /// + /// Initializes a new instance of the class. + /// + public DalamudStartInfo() + { + // ignored + } + + /// + /// Initializes a new instance of the class. + /// + /// Object to copy values from. + public DalamudStartInfo(DalamudStartInfo other) + { + this.WorkingDirectory = other.WorkingDirectory; + this.ConfigurationPath = other.ConfigurationPath; + this.PluginDirectory = other.PluginDirectory; + this.DefaultPluginDirectory = other.DefaultPluginDirectory; + this.AssetDirectory = other.AssetDirectory; + this.Language = other.Language; + this.GameVersion = other.GameVersion; + this.DelayInitializeMs = other.DelayInitializeMs; + this.BootLogPath = other.BootLogPath; + this.BootShowConsole = other.BootShowConsole; + this.BootDisableFallbackConsole = other.BootDisableFallbackConsole; + this.BootWaitMessageBox = other.BootWaitMessageBox; + this.BootWaitDebugger = other.BootWaitDebugger; + this.BootVehEnabled = other.BootVehEnabled; + this.BootVehFull = other.BootVehFull; + this.BootEnableEtw = other.BootEnableEtw; + this.BootDotnetOpenProcessHookMode = other.BootDotnetOpenProcessHookMode; + this.BootEnabledGameFixes = other.BootEnabledGameFixes; + this.BootUnhookDlls = other.BootUnhookDlls; + } + /// /// Gets or sets the working directory of the XIVLauncher installations. /// - public string WorkingDirectory { get; set; } + public string? WorkingDirectory { get; set; } /// - /// Gets the path to the configuration file. + /// Gets or sets the path to the configuration file. /// - public string ConfigurationPath { get; init; } + public string? ConfigurationPath { get; set; } /// - /// Gets the path to the directory for installed plugins. + /// Gets or sets the path to the directory for installed plugins. /// - public string PluginDirectory { get; init; } + public string? PluginDirectory { get; set; } /// - /// Gets the path to the directory for developer plugins. + /// Gets or sets the path to the directory for developer plugins. /// - public string DefaultPluginDirectory { get; init; } + public string? DefaultPluginDirectory { get; set; } /// - /// Gets the path to core Dalamud assets. + /// Gets or sets the path to core Dalamud assets. /// - public string AssetDirectory { get; init; } + public string? AssetDirectory { get; set; } /// - /// Gets the language of the game client. + /// Gets or sets the language of the game client. /// - public ClientLanguage Language { get; init; } + public ClientLanguage Language { get; set; } = ClientLanguage.English; /// - /// Gets the current game version code. + /// Gets or sets the current game version code. /// [JsonConverter(typeof(GameVersionConverter))] - public GameVersion GameVersion { get; init; } + public GameVersion? GameVersion { get; set; } /// - /// Gets a value that specifies how much to wait before a new Dalamud session. + /// Gets or sets a value that specifies how much to wait before a new Dalamud session. /// - public int DelayInitializeMs { get; init; } = 0; + public int DelayInitializeMs { get; set; } = 0; + + /// + /// Gets or sets the path the boot log file is supposed to be written to. + /// + public string BootLogPath { get; set; } + + /// + /// Gets or sets a value indicating whether a Boot console should be shown. + /// + public bool BootShowConsole { get; set; } + + /// + /// Gets or sets a value indicating whether the fallback console should be shown, if needed. + /// + public bool BootDisableFallbackConsole { get; set; } + + /// + /// Gets or sets a flag indicating where Dalamud should wait with a message box. + /// + public int BootWaitMessageBox { get; set; } + + /// + /// Gets or sets a value indicating whether Dalamud should wait for a debugger to be attached before initializing. + /// + public bool BootWaitDebugger { get; set; } + + /// + /// Gets or sets a value indicating whether the VEH should be enabled. + /// + public bool BootVehEnabled { get; set; } + + /// + /// Gets or sets a value indicating whether the VEH should be doing full crash dumps. + /// + public bool BootVehFull { get; set; } + + /// + /// Gets or sets a value indicating whether or not ETW should be enabled. + /// + public bool BootEnableEtw { get; set; } + + /// + /// Gets or sets a value choosing the OpenProcess hookmode. + /// + public int BootDotnetOpenProcessHookMode { get; set; } + + /// + /// Gets or sets a list of enabled game fixes. + /// + public List? BootEnabledGameFixes { get; set; } + + /// + /// Gets or sets a list of DLLs that should be unhooked. + /// + public List? BootUnhookDlls { get; set; } } } diff --git a/Dalamud/Data/DataManager.cs b/Dalamud/Data/DataManager.cs index 8697dc930..2e679ab23 100644 --- a/Dalamud/Data/DataManager.cs +++ b/Dalamud/Data/DataManager.cs @@ -9,6 +9,7 @@ using Dalamud.Interface.Internal; using Dalamud.IoC; using Dalamud.IoC.Internal; using Dalamud.Utility; +using Dalamud.Utility.Timing; using ImGuiScene; using JetBrains.Annotations; using Lumina; @@ -298,25 +299,32 @@ namespace Dalamud.Data Log.Verbose("Loaded {0} ClientOpCodes.", clientOpCodeDict.Count); - var luminaOptions = new LuminaOptions + using (Timings.Start("Lumina Init")) { - CacheFileResources = true, + var luminaOptions = new LuminaOptions + { + CacheFileResources = true, #if DEBUG - PanicOnSheetChecksumMismatch = true, + PanicOnSheetChecksumMismatch = true, #else - PanicOnSheetChecksumMismatch = false, + PanicOnSheetChecksumMismatch = false, #endif - DefaultExcelLanguage = this.Language.ToLumina(), - }; + DefaultExcelLanguage = this.Language.ToLumina(), + }; - var processModule = Process.GetCurrentProcess().MainModule; - if (processModule != null) - { - this.GameData = new GameData(Path.Combine(Path.GetDirectoryName(processModule.FileName), "sqpack"), luminaOptions); + var processModule = Process.GetCurrentProcess().MainModule; + if (processModule != null) + { + this.GameData = new GameData(Path.Combine(Path.GetDirectoryName(processModule.FileName), "sqpack"), luminaOptions); + } + else + { + throw new Exception("Could not main module."); + } + + Log.Information("Lumina is ready: {0}", this.GameData.DataPath); } - Log.Information("Lumina is ready: {0}", this.GameData.DataPath); - this.IsDataReady = true; this.luminaCancellationTokenSource = new(); diff --git a/Dalamud/EntryPoint.cs b/Dalamud/EntryPoint.cs index f8e952d7b..7036d0116 100644 --- a/Dalamud/EntryPoint.cs +++ b/Dalamud/EntryPoint.cs @@ -29,7 +29,8 @@ namespace Dalamud /// A delegate used during initialization of the CLR from Dalamud.Boot. /// /// Pointer to a serialized data. - public delegate void InitDelegate(IntPtr infoPtr); + /// Event used to signal the main thread to continue. + public delegate void InitDelegate(IntPtr infoPtr, IntPtr mainThreadContinueEvent); /// /// A delegate used from VEH handler on exception which CoreCLR will fast fail by default. @@ -43,12 +44,13 @@ namespace Dalamud /// Initialize Dalamud. /// /// Pointer to a serialized data. - public static void Initialize(IntPtr infoPtr) + /// Event used to signal the main thread to continue. + public static void Initialize(IntPtr infoPtr, IntPtr mainThreadContinueEvent) { var infoStr = Marshal.PtrToStringUTF8(infoPtr); var info = JsonConvert.DeserializeObject(infoStr); - new Thread(() => RunThread(info)).Start(); + new Thread(() => RunThread(info, mainThreadContinueEvent)).Start(); } /// @@ -106,18 +108,11 @@ namespace Dalamud /// Initialize all Dalamud subsystems and start running on the main thread. /// /// The containing information needed to initialize Dalamud. - private static void RunThread(DalamudStartInfo info) + /// Event used to signal the main thread to continue. + private static void RunThread(DalamudStartInfo info, IntPtr mainThreadContinueEvent) { - if (EnvironmentConfiguration.DalamudWaitForDebugger) - { - while (!Debugger.IsAttached) - { - Thread.Sleep(100); - } - } - // Setup logger - var levelSwitch = InitLogging(info.WorkingDirectory); + var levelSwitch = InitLogging(info.WorkingDirectory, info.BootShowConsole); // Load configuration first to get some early persistent state, like log level var configuration = DalamudConfiguration.Load(info.ConfigurationPath); @@ -150,11 +145,12 @@ namespace Dalamud if (!Util.IsLinux()) InitSymbolHandler(info); - var dalamud = new Dalamud(info, levelSwitch, finishSignal, configuration); - Log.Information("Starting a session.."); + var dalamud = new Dalamud(info, levelSwitch, finishSignal, configuration, mainThreadContinueEvent); + Log.Information("This is Dalamud - Core: {GitHash}, CS: {CsGitHash}", Util.GetGitHash(), Util.GetGitHashClientStructs()); // Run session dalamud.LoadTier1(); + dalamud.WaitForUnload(); dalamud.Dispose(); @@ -197,7 +193,7 @@ namespace Dalamud } } - private static LoggingLevelSwitch InitLogging(string baseDirectory) + private static LoggingLevelSwitch InitLogging(string baseDirectory, bool logConsole) { #if DEBUG var logPath = Path.Combine(baseDirectory, "dalamud.log"); @@ -211,11 +207,15 @@ namespace Dalamud CullLogFile(oldPath, null, 10 * 1024 * 1024); var levelSwitch = new LoggingLevelSwitch(LogEventLevel.Verbose); - Log.Logger = new LoggerConfiguration() - .WriteTo.Async(a => a.File(logPath)) - .WriteTo.Sink(SerilogEventSink.Instance) - .MinimumLevel.ControlledBy(levelSwitch) - .CreateLogger(); + var config = new LoggerConfiguration() + .WriteTo.Async(a => a.File(logPath, fileSizeLimitBytes: null, buffered: false, flushToDiskInterval: TimeSpan.FromSeconds(1))) + .WriteTo.Sink(SerilogEventSink.Instance) + .MinimumLevel.ControlledBy(levelSwitch); + + if (logConsole) + config = config.WriteTo.Console(); + + Log.Logger = config.CreateLogger(); return levelSwitch; } diff --git a/Dalamud/Game/ChatHandlers.cs b/Dalamud/Game/ChatHandlers.cs index 66c366734..ceecf7638 100644 --- a/Dalamud/Game/ChatHandlers.cs +++ b/Dalamud/Game/ChatHandlers.cs @@ -65,8 +65,8 @@ namespace Dalamud.Game // }; private readonly Regex rmtRegex = new( - @"4KGOLD|We have sufficient stock|VPK\.OM|Gil for free|www\.so9\.com|Fast & Convenient|Cheap & Safety Guarantee|【Code|A O A U E|igfans|4KGOLD\.COM|Cheapest Gil with|pvp and bank on google|Selling Cheap GIL|ff14mogstation\.com|Cheap Gil 1000k|gilsforyou|server 1000K =|gils_selling|E A S Y\.C O M|bonus code|mins delivery guarantee|Sell cheap|Salegm\.com|cheap Mog|Off Code:|FF14Mog.com|使用する5%オ|Off Code( *):|offers Fantasia", - RegexOptions.Compiled); + @"4KGOLD|We have sufficient stock|VPK\.OM|[Gg]il for free|[Gg]il [Cc]heap|5GOLD|www\.so9\.com|Fast & Convenient|Cheap & Safety Guarantee|【Code|A O A U E|igfans|4KGOLD\.COM|Cheapest Gil with|pvp and bank on google|Selling Cheap GIL|ff14mogstation\.com|Cheap Gil 1000k|gilsforyou|server 1000K =|gils_selling|E A S Y\.C O M|bonus code|mins delivery guarantee|Sell cheap|Salegm\.com|cheap Mog|Off Code:|FF14Mog.com|使用する5%オ|[Oo][Ff][Ff] [Cc]ode( *)[:;]|offers Fantasia", + RegexOptions.Compiled | RegexOptions.IgnoreCase); private readonly Dictionary retainerSaleRegexes = new() { diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs index 44d81735b..ce816c994 100644 --- a/Dalamud/Game/ClientState/ClientState.cs +++ b/Dalamud/Game/ClientState/ClientState.cs @@ -17,7 +17,7 @@ using Dalamud.Hooking; using Dalamud.IoC; using Dalamud.IoC.Internal; using Dalamud.Utility; -using Lumina.Excel.GeneratedSheets; +using FFXIVClientStructs.FFXIV.Client.Game; using Serilog; namespace Dalamud.Game.ClientState @@ -100,12 +100,12 @@ namespace Dalamud.Game.ClientState /// /// Event that fires when a character is entering PvP. /// - public event System.Action EnterPvP; + public event Action EnterPvP; /// /// Event that fires when a character is leaving PvP. /// - public event System.Action LeavePvP; + public event Action LeavePvP; /// /// Event that gets fired when a duty is ready. @@ -142,6 +142,11 @@ namespace Dalamud.Game.ClientState /// public bool IsPvP { get; private set; } + /// + /// Gets a value indicating whether or not the user is playing PvP, excluding the Wolves' Den. + /// + public bool IsPvPExcludingDen { get; private set; } + /// /// Enable this module. /// @@ -203,11 +208,8 @@ namespace Dalamud.Game.ClientState gameGui.ResetUiHideState(); } - if (this.TerritoryType != 0) - { - var terriRow = data.GetExcelSheet()!.GetRow(this.TerritoryType); - this.IsPvP = terriRow?.Bg.RawString.StartsWith("ffxiv/pvp") ?? false; - } + this.IsPvP = GameMain.IsInPvPArea(); + this.IsPvPExcludingDen = this.IsPvP && this.TerritoryType != 250; if (this.IsPvP != this.lastFramePvP) { diff --git a/Dalamud/Game/Framework.cs b/Dalamud/Game/Framework.cs index 810251de2..16b742eec 100644 --- a/Dalamud/Game/Framework.cs +++ b/Dalamud/Game/Framework.cs @@ -36,8 +36,8 @@ namespace Dalamud.Game private bool tierInitError = false; private Hook updateHook; - private Hook destroyHook; - private Hook realDestroyHook; + private Hook freeHook; + private Hook destroyHook; private Thread? frameworkUpdateThread; @@ -49,14 +49,9 @@ namespace Dalamud.Game this.Address = new FrameworkAddressResolver(); this.Address.Setup(); - Log.Verbose($"Framework address 0x{this.Address.BaseAddress.ToInt64():X}"); - if (this.Address.BaseAddress == IntPtr.Zero) - { - throw new InvalidOperationException("Framework is not initalized yet."); - } - - // Hook virtual functions - this.HookVTable(); + this.updateHook = new Hook(this.Address.TickAddress, this.HandleFrameworkUpdate); + this.freeHook = new Hook(this.Address.FreeAddress, this.HandleFrameworkFree); + this.destroyHook = new Hook(this.Address.DestroyAddress, this.HandleFrameworkDestroy); } /// @@ -138,8 +133,8 @@ namespace Dalamud.Game Service.Get().Enable(); this.updateHook.Enable(); + this.freeHook.Enable(); this.destroyHook.Enable(); - this.realDestroyHook.Enable(); } /// @@ -229,38 +224,18 @@ namespace Dalamud.Game Service.GetNullable()?.ExplicitDispose(); this.updateHook?.Disable(); + this.freeHook?.Disable(); this.destroyHook?.Disable(); - this.realDestroyHook?.Disable(); Thread.Sleep(500); this.updateHook?.Dispose(); + this.freeHook?.Dispose(); this.destroyHook?.Dispose(); - this.realDestroyHook?.Dispose(); this.updateStopwatch.Reset(); statsStopwatch.Reset(); } - private void HookVTable() - { - var vtable = Marshal.ReadIntPtr(this.Address.BaseAddress); - // Virtual function layout: - // .rdata:00000001411F1FE0 dq offset Xiv__Framework___dtor - // .rdata:00000001411F1FE8 dq offset Xiv__Framework__init - // .rdata:00000001411F1FF0 dq offset Xiv__Framework__destroy - // .rdata:00000001411F1FF8 dq offset Xiv__Framework__free - // .rdata:00000001411F2000 dq offset Xiv__Framework__update - - var pUpdate = Marshal.ReadIntPtr(vtable, IntPtr.Size * 4); - this.updateHook = new Hook(pUpdate, this.HandleFrameworkUpdate); - - var pDestroy = Marshal.ReadIntPtr(vtable, IntPtr.Size * 3); - this.destroyHook = new Hook(pDestroy, this.HandleFrameworkDestroy); - - var pRealDestroy = Marshal.ReadIntPtr(vtable, IntPtr.Size * 2); - this.realDestroyHook = new Hook(pRealDestroy, this.HandleRealDestroy); - } - private bool HandleFrameworkUpdate(IntPtr framework) { // If any of the tier loads failed, just go to the original code. @@ -371,7 +346,7 @@ namespace Dalamud.Game return this.updateHook.Original(framework); } - private bool HandleRealDestroy(IntPtr framework) + private bool HandleFrameworkDestroy(IntPtr framework) { if (this.DispatchUpdateEvents) { @@ -385,15 +360,15 @@ namespace Dalamud.Game this.DispatchUpdateEvents = false; - return this.realDestroyHook.Original(framework); + return this.destroyHook.Original(framework); } - private IntPtr HandleFrameworkDestroy() + private IntPtr HandleFrameworkFree() { Log.Information("Framework::Free!"); // Store the pointer to the original trampoline location - var originalPtr = Marshal.GetFunctionPointerForDelegate(this.destroyHook.Original); + var originalPtr = Marshal.GetFunctionPointerForDelegate(this.freeHook.Original); var dalamud = Service.Get(); dalamud.Unload(); diff --git a/Dalamud/Game/FrameworkAddressResolver.cs b/Dalamud/Game/FrameworkAddressResolver.cs index 87ebb6aa7..2c6a860e0 100644 --- a/Dalamud/Game/FrameworkAddressResolver.cs +++ b/Dalamud/Game/FrameworkAddressResolver.cs @@ -1,55 +1,49 @@ using System; -using System.Runtime.InteropServices; namespace Dalamud.Game { /// /// The address resolver for the class. /// - public sealed class FrameworkAddressResolver : BaseAddressResolver + public sealed unsafe class FrameworkAddressResolver : BaseAddressResolver { /// - /// Gets the base address native Framework class. + /// Gets the base address of the Framework object. /// - public IntPtr BaseAddress { get; private set; } + [Obsolete("Please use FFXIVClientStructs.FFXIV.Client.System.Framework.Framework.Instance() instead.")] + public IntPtr BaseAddress => new(FFXIVClientStructs.FFXIV.Client.System.Framework.Framework.Instance()); /// - /// Gets the address for the native GuiManager class. + /// Gets the address for the function that is called once the Framework is destroyed. /// - public IntPtr GuiManager { get; private set; } + public IntPtr DestroyAddress { get; private set; } /// - /// Gets the address for the native ScriptManager class. + /// Gets the address for the function that is called once the Framework is free'd. /// - public IntPtr ScriptManager { get; private set; } + public IntPtr FreeAddress { get; private set; } + + /// + /// Gets the function that is called every tick. + /// + public IntPtr TickAddress { get; private set; } /// protected override void Setup64Bit(SigScanner sig) { this.SetupFramework(sig); - - // Xiv__Framework__GetGuiManager+8 000 mov rax, [rcx+2C00h] - // Xiv__Framework__GetGuiManager+F 000 retn - this.GuiManager = Marshal.ReadIntPtr(this.BaseAddress, 0x2C08); - - // Called from Framework::Init - this.ScriptManager = this.BaseAddress + 0x2C68; // note that no deref here } private void SetupFramework(SigScanner scanner) { - // Dissasembly of part of the .dtor - // 00007FF701AD665A | 48 C7 05 ?? ?? ?? ?? 00 00 00 00 | MOV QWORD PTR DS:[g_mainFramework],0 - // 00007FF701AD6665 | E8 ?? ?? ?? ?? | CALL ffxiv_dx11.7FF701E27130 - // 00007FF701AD666A | 48 8D ?? ?? ?? 00 00 | LEA RCX,QWORD PTR DS:[RBX + 2C38] - // 00007FF701AD6671 | E8 ?? ?? ?? ?? | CALL ffxiv_dx11.7FF701E2A7D0 - // 00007FF701AD6676 | 48 8D ?? ?? ?? ?? ?? | LEA RAX,QWORD PTR DS:[7FF702C31F80 - var fwDtor = scanner.ScanText("48 C7 05 ?? ?? ?? ?? 00 00 00 00 E8 ?? ?? ?? ?? 48 8D ?? ?? ?? 00 00 E8 ?? ?? ?? ?? 48 8D"); - var fwOffset = Marshal.ReadInt32(fwDtor + 3); - var pFramework = scanner.ResolveRelativeAddress(fwDtor + 11, fwOffset); + this.DestroyAddress = + scanner.ScanText("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 48 8B 3D ?? ?? ?? ?? 48 8B D9 48 85 FF"); - // Framework does not change once initialized in startup so don't bother to deref again and again. - this.BaseAddress = Marshal.ReadIntPtr(pFramework); + this.FreeAddress = + scanner.ScanText("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 48 8B D9 48 8B 0D ?? ?? ?? ??"); + + this.TickAddress = + scanner.ScanText("40 53 48 83 EC 20 FF 81 ?? ?? ?? ?? 48 8B D9 48 8D 4C 24 ??"); } } } diff --git a/Dalamud/Game/Gui/ChatGui.cs b/Dalamud/Game/Gui/ChatGui.cs index b2592fb77..58b9dfebd 100644 --- a/Dalamud/Game/Gui/ChatGui.cs +++ b/Dalamud/Game/Gui/ChatGui.cs @@ -38,13 +38,11 @@ namespace Dalamud.Game.Gui /// Initializes a new instance of the class. /// /// The base address of the ChatManager. - internal ChatGui(IntPtr baseAddress) + internal ChatGui() { - this.address = new ChatGuiAddressResolver(baseAddress); + this.address = new ChatGuiAddressResolver(); this.address.Setup(); - Log.Verbose($"Chat manager address 0x{this.address.BaseAddress.ToInt64():X}"); - this.printMessageHook = new Hook(this.address.PrintMessage, this.HandlePrintMessageDetour); this.populateItemLinkHook = new Hook(this.address.PopulateItemLinkObject, this.HandlePopulateItemLinkDetour); this.interactableLinkClickedHook = new Hook(this.address.InteractableLinkClicked, this.InteractableLinkClickedDetour); diff --git a/Dalamud/Game/Gui/ChatGuiAddressResolver.cs b/Dalamud/Game/Gui/ChatGuiAddressResolver.cs index f11f8b2f0..9a30037fa 100644 --- a/Dalamud/Game/Gui/ChatGuiAddressResolver.cs +++ b/Dalamud/Game/Gui/ChatGuiAddressResolver.cs @@ -7,20 +7,6 @@ namespace Dalamud.Game.Gui /// public sealed class ChatGuiAddressResolver : BaseAddressResolver { - /// - /// Initializes a new instance of the class. - /// - /// The base address of the native ChatManager class. - public ChatGuiAddressResolver(IntPtr baseAddress) - { - this.BaseAddress = baseAddress; - } - - /// - /// Gets the base address of the native ChatManager class. - /// - public IntPtr BaseAddress { get; } - /// /// Gets the address of the native PrintMessage method. /// diff --git a/Dalamud/Game/Gui/GameGui.cs b/Dalamud/Game/Gui/GameGui.cs index 6ed963bf1..43a372528 100644 --- a/Dalamud/Game/Gui/GameGui.cs +++ b/Dalamud/Game/Gui/GameGui.cs @@ -62,7 +62,7 @@ namespace Dalamud.Game.Gui Log.Verbose($"HandleItemOut address 0x{this.address.HandleItemOut.ToInt64():X}"); Log.Verbose($"HandleImm address 0x{this.address.HandleImm.ToInt64():X}"); - Service.Set(new ChatGui(this.address.ChatManager)); + Service.Set(); Service.Set(); Service.Set(); Service.Set(); diff --git a/Dalamud/Game/Gui/GameGuiAddressResolver.cs b/Dalamud/Game/Gui/GameGuiAddressResolver.cs index c81f9fd5c..ae36fe31b 100644 --- a/Dalamud/Game/Gui/GameGuiAddressResolver.cs +++ b/Dalamud/Game/Gui/GameGuiAddressResolver.cs @@ -7,24 +7,11 @@ namespace Dalamud.Game.Gui /// internal sealed class GameGuiAddressResolver : BaseAddressResolver { - /// - /// Initializes a new instance of the class. - /// - public GameGuiAddressResolver() - { - this.BaseAddress = Service.Get().Address.BaseAddress; - } - /// /// Gets the base address of the native GuiManager class. /// public IntPtr BaseAddress { get; private set; } - /// - /// Gets the address of the native ChatManager class. - /// - public IntPtr ChatManager { get; private set; } - /// /// Gets the address of the native SetGlobalBgm method. /// @@ -89,13 +76,5 @@ namespace Dalamud.Game.Gui this.ToggleUiHide = sig.ScanText("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 0F B6 B9 ?? ?? ?? ?? B8 ?? ?? ?? ??"); this.Utf8StringFromSequence = sig.ScanText("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 48 8D 41 22 66 C7 41 ?? ?? ?? 48 89 01 49 8B D8"); } - - /// - protected override void SetupInternal(SigScanner scanner) - { - // Xiv__UiManager__GetChatManager 000 lea rax, [rcx+13E0h] - // Xiv__UiManager__GetChatManager+7 000 retn - this.ChatManager = this.BaseAddress + 0x13E0; - } } } diff --git a/Dalamud/Game/Gui/Internal/DalamudIME.cs b/Dalamud/Game/Gui/Internal/DalamudIME.cs index 4aafa5f3b..e955997fd 100644 --- a/Dalamud/Game/Gui/Internal/DalamudIME.cs +++ b/Dalamud/Game/Gui/Internal/DalamudIME.cs @@ -1,8 +1,12 @@ using System; using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Numerics; using System.Runtime.InteropServices; using System.Text; +using Dalamud.Hooking; using Dalamud.Interface.Internal; using Dalamud.Logging.Internal; using ImGuiNET; @@ -14,7 +18,7 @@ namespace Dalamud.Game.Gui.Internal /// /// This class handles IME for non-English users. /// - internal class DalamudIME : IDisposable + internal unsafe class DalamudIME : IDisposable { private static readonly ModuleLog Log = new("IME"); @@ -22,6 +26,8 @@ namespace Dalamud.Game.Gui.Internal private IntPtr wndProcPtr; private IntPtr oldWndProcPtr; private WndProcDelegate wndProcDelegate; + private AsmHook imguiTextInputCursorHook; + private Vector2* cursorPos; /// /// Initializes a new instance of the class. @@ -60,6 +66,18 @@ namespace Dalamud.Game.Gui.Internal SetWindowLongPtrW(this.interfaceHandle, WindowLongType.WndProc, this.oldWndProcPtr); this.oldWndProcPtr = IntPtr.Zero; } + + this.imguiTextInputCursorHook?.Dispose(); + Marshal.FreeHGlobal((IntPtr)this.cursorPos); + } + + /// + /// Get the position of the cursor. + /// + /// The position of the cursor. + internal Vector2 GetCursorPos() + { + return new Vector2(this.cursorPos->X, this.cursorPos->Y); } /// @@ -73,6 +91,31 @@ namespace Dalamud.Game.Gui.Internal this.interfaceHandle = Service.Get().WindowHandlePtr; this.wndProcPtr = Marshal.GetFunctionPointerForDelegate(this.wndProcDelegate); this.oldWndProcPtr = SetWindowLongPtrW(this.interfaceHandle, WindowLongType.WndProc, this.wndProcPtr); + + var module = Process.GetCurrentProcess().Modules.Cast().First(m => m.ModuleName == "cimgui.dll"); + var scanner = new SigScanner(module); + var cursorDrawingPtr = scanner.ScanModule("F3 0F 11 75 ?? 0F 28 CF"); + Log.Debug($"Found cursorDrawingPtr at {cursorDrawingPtr:X}"); + + this.cursorPos = (Vector2*)Marshal.AllocHGlobal(sizeof(Vector2)); + this.cursorPos->X = 0f; + this.cursorPos->Y = 0f; + + var asm = new[] + { + "use64", + $"push rax", + $"mov rax, {(IntPtr)this.cursorPos + sizeof(float)}", + $"movss [rax],xmm7", + $"mov rax, {(IntPtr)this.cursorPos}", + $"movss [rax],xmm6", + $"pop rax", + }; + + Log.Debug($"Asm Code:\n{string.Join("\n", asm)}"); + this.imguiTextInputCursorHook = new AsmHook(cursorDrawingPtr, asm, "ImguiTextInputCursorHook"); + this.imguiTextInputCursorHook?.Enable(); + this.IsEnabled = true; Log.Information("Enabled!"); } diff --git a/Dalamud/Game/Internal/DalamudAtkTweaks.cs b/Dalamud/Game/Internal/DalamudAtkTweaks.cs index 111d1364c..0fede34c9 100644 --- a/Dalamud/Game/Internal/DalamudAtkTweaks.cs +++ b/Dalamud/Game/Internal/DalamudAtkTweaks.cs @@ -9,6 +9,7 @@ using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Hooking; +using Dalamud.Interface; using Dalamud.Interface.Internal; using Dalamud.Interface.Windowing; using FFXIVClientStructs.FFXIV.Component.GUI; @@ -90,8 +91,9 @@ namespace Dalamud.Game.Internal { var systemText = Service.Get().GetExcelSheet()!.GetRow(1059)!.Text.RawString; // "System" var configuration = Service.Get(); + var interfaceManager = Service.Get(); - if (args.Title == systemText && configuration.DoButtonsSystemMenu) + if (args.Title == systemText && configuration.DoButtonsSystemMenu && interfaceManager.IsDispatchingEvents) { var dalamudInterface = Service.Get(); @@ -131,8 +133,9 @@ namespace Dalamud.Game.Internal } var configuration = Service.Get(); + var interfaceManager = Service.Get(); - if (!configuration.DoButtonsSystemMenu) + if (!configuration.DoButtonsSystemMenu || !interfaceManager.IsDispatchingEvents) { this.hookAgentHudOpenSystemMenu.Original(thisPtr, atkValueArgs, menuSize); return; diff --git a/Dalamud/Game/SigScanner.cs b/Dalamud/Game/SigScanner.cs index e35b17cc4..7064d211e 100644 --- a/Dalamud/Game/SigScanner.cs +++ b/Dalamud/Game/SigScanner.cs @@ -2,11 +2,13 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; +using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Dalamud.IoC; using Dalamud.IoC.Internal; +using Newtonsoft.Json; using Serilog; namespace Dalamud.Game @@ -16,17 +18,22 @@ namespace Dalamud.Game /// [PluginInterface] [InterfaceVersion("1.0")] - public sealed class SigScanner : IDisposable + public class SigScanner : IDisposable { + private readonly FileInfo? cacheFile; + private IntPtr moduleCopyPtr; private long moduleCopyOffset; + private Dictionary? textCache; + /// /// Initializes a new instance of the class using the main module of the current process. /// /// Whether or not to copy the module upon initialization for search operations to use, as to not get disturbed by possible hooks. - public SigScanner(bool doCopy = false) - : this(Process.GetCurrentProcess().MainModule!, doCopy) + /// File used to cached signatures. + public SigScanner(bool doCopy = false, FileInfo? cacheFile = null) + : this(Process.GetCurrentProcess().MainModule!, doCopy, cacheFile) { } @@ -35,8 +42,10 @@ namespace Dalamud.Game /// /// The ProcessModule to be used for scanning. /// Whether or not to copy the module upon initialization for search operations to use, as to not get disturbed by possible hooks. - public SigScanner(ProcessModule module, bool doCopy = false) + /// File used to cached signatures. + public SigScanner(ProcessModule module, bool doCopy = false, FileInfo? cacheFile = null) { + this.cacheFile = cacheFile; this.Module = module; this.Is32BitProcess = !Environment.Is64BitProcess; this.IsCopy = doCopy; @@ -49,6 +58,9 @@ namespace Dalamud.Game Log.Verbose($"Module base: 0x{this.TextSectionBase.ToInt64():X}"); Log.Verbose($"Module size: 0x{this.TextSectionSize:X}"); + + if (cacheFile != null) + this.Load(); } /// @@ -294,8 +306,12 @@ namespace Dalamud.Game /// The real offset of the found signature. public IntPtr ScanText(string signature) { - var mBase = this.IsCopy ? this.moduleCopyPtr : this.TextSectionBase; + if (this.textCache != null && this.textCache.TryGetValue(signature, out var address)) + { + return new IntPtr(address + this.Module.BaseAddress.ToInt64()); + } + var mBase = this.IsCopy ? this.moduleCopyPtr : this.TextSectionBase; var scanRet = Scan(mBase, this.TextSectionSize, signature); if (this.IsCopy) @@ -304,7 +320,9 @@ namespace Dalamud.Game var insnByte = Marshal.ReadByte(scanRet); if (insnByte == 0xE8 || insnByte == 0xE9) - return ReadJmpCallSig(scanRet); + scanRet = ReadJmpCallSig(scanRet); + + this.textCache?.Add(signature, scanRet.ToInt64() - this.Module.BaseAddress.ToInt64()); return scanRet; } @@ -337,6 +355,17 @@ namespace Dalamud.Game Marshal.FreeHGlobal(this.moduleCopyPtr); } + /// + /// Save the current state of the cache. + /// + internal void Save() + { + if (this.cacheFile == null) + return; + + File.WriteAllText(this.cacheFile.FullName, JsonConvert.SerializeObject(this.textCache)); + } + /// /// Helper for ScanText to get the correct address for IDA sigs that mark the first JMP or CALL location. /// @@ -479,5 +508,16 @@ namespace Dalamud.Game this.moduleCopyOffset = this.moduleCopyPtr.ToInt64() - this.Module.BaseAddress.ToInt64(); } + + private void Load() + { + if (this.cacheFile is not { Exists: true }) + { + this.textCache = new(); + return; + } + + this.textCache = JsonConvert.DeserializeObject>(File.ReadAllText(this.cacheFile.FullName)) ?? new Dictionary(); + } } } diff --git a/Dalamud/Interface/GameFonts/FdtReader.cs b/Dalamud/Interface/GameFonts/FdtReader.cs index 155766ded..db373d221 100644 --- a/Dalamud/Interface/GameFonts/FdtReader.cs +++ b/Dalamud/Interface/GameFonts/FdtReader.cs @@ -9,29 +9,31 @@ namespace Dalamud.Interface.GameFonts /// public class FdtReader { + private static unsafe T StructureFromByteArray (byte[] data, int offset) + { + var len = Marshal.SizeOf(); + if (offset + len > data.Length) + throw new Exception("Data too short"); + + fixed (byte* ptr = data) + return Marshal.PtrToStructure(new(ptr + offset)); + } + /// /// Initializes a new instance of the class. /// /// Content of a FDT file. public FdtReader(byte[] data) { - unsafe - { - fixed (byte* ptr = data) - { - this.FileHeader = *(FdtHeader*)ptr; - this.FontHeader = *(FontTableHeader*)(ptr + this.FileHeader.FontTableHeaderOffset); - this.KerningHeader = *(KerningTableHeader*)(ptr + this.FileHeader.KerningTableHeaderOffset); + this.FileHeader = StructureFromByteArray(data, 0); + this.FontHeader = StructureFromByteArray(data, this.FileHeader.FontTableHeaderOffset); + this.KerningHeader = StructureFromByteArray(data, this.FileHeader.KerningTableHeaderOffset); - var glyphs = (FontTableEntry*)(ptr + this.FileHeader.FontTableHeaderOffset + Marshal.SizeOf(this.FontHeader)); - for (var i = 0; i < this.FontHeader.FontTableEntryCount; i++) - this.Glyphs.Add(glyphs[i]); + for (var i = 0; i < this.FontHeader.FontTableEntryCount; i++) + this.Glyphs.Add(StructureFromByteArray(data, this.FileHeader.FontTableHeaderOffset + Marshal.SizeOf() + (Marshal.SizeOf() * i))); - var kerns = (KerningTableEntry*)(ptr + this.FileHeader.KerningTableHeaderOffset + Marshal.SizeOf(this.KerningHeader)); - for (var i = 0; i < this.FontHeader.KerningTableEntryCount; i++) - this.Distances.Add(kerns[i]); - } - } + for (int i = 0, i_ = Math.Min(this.FontHeader.KerningTableEntryCount, this.KerningHeader.Count); i < i_; i++) + this.Distances.Add(StructureFromByteArray(data, this.FileHeader.KerningTableHeaderOffset+ Marshal.SizeOf() + (Marshal.SizeOf() * i))); } /// diff --git a/Dalamud/Interface/GameFonts/GameFontManager.cs b/Dalamud/Interface/GameFonts/GameFontManager.cs index 933558c09..7dc392717 100644 --- a/Dalamud/Interface/GameFonts/GameFontManager.cs +++ b/Dalamud/Interface/GameFonts/GameFontManager.cs @@ -7,7 +7,7 @@ using System.Text; using Dalamud.Data; using Dalamud.Interface.Internal; -using Dalamud.Utility; +using Dalamud.Utility.Timing; using ImGuiNET; using Lumina.Data.Files; using Serilog; @@ -39,7 +39,7 @@ namespace Dalamud.Interface.GameFonts private readonly Dictionary fontUseCounter = new(); private readonly Dictionary>> glyphRectIds = new(); - private bool isBetweenBuildFontsAndAfterBuildFonts = false; + private bool isBetweenBuildFontsAndRightAfterImGuiIoFontsBuild = false; private bool isBuildingAsFallbackFontMode = false; /// @@ -49,12 +49,31 @@ namespace Dalamud.Interface.GameFonts { var dataManager = Service.Get(); - this.fdts = FontNames.Select(fontName => + using (Timings.Start("Load FDTs")) { - var file = fontName == null ? null : dataManager.GetFile($"common/font/{fontName}.fdt"); - return file == null ? null : new FdtReader(file!.Data); - }).ToArray(); - this.texturePixels = Enumerable.Range(1, 1 + this.fdts.Where(x => x != null).Select(x => x.Glyphs.Select(x => x.TextureFileIndex).Max()).Max()).Select(x => dataManager.GameData.GetFile($"common/font/font{x}.tex").ImageData).ToList(); + this.fdts = FontNames.Select(fontName => + { + var fileName = $"common/font/{fontName}.fdt"; + using (Timings.Start($"Loading FDT: {fileName}")) + { + var file = fontName == null ? null : dataManager.GetFile(fileName); + return file == null ? null : new FdtReader(file!.Data); + } + }).ToArray(); + } + + using (Timings.Start("Getting texture data")) + { + this.texturePixels = Enumerable.Range(1, 1 + this.fdts.Where(x => x != null).Select(x => x.Glyphs.Select(x => x.TextureFileIndex).Max()).Max()).Select( + x => + { + var fileName = $"common/font/font{x}.tex"; + using (Timings.Start($"Get tex: {fileName}")) + { + return dataManager.GameData.GetFile(fileName)!.ImageData; + } + }).ToList(); + } this.interfaceManager = Service.Get(); } @@ -174,7 +193,7 @@ namespace Dalamud.Interface.GameFonts needRebuild = !this.fonts.ContainsKey(style); if (needRebuild) { - if (Service.Get().IsBuildingFontsBeforeAtlasBuild && this.isBetweenBuildFontsAndAfterBuildFonts) + if (Service.Get().IsBuildingFontsBeforeAtlasBuild && this.isBetweenBuildFontsAndRightAfterImGuiIoFontsBuild) { Log.Information("[GameFontManager] NewFontRef: Building {0} right now, as it is called while BuildFonts is already in progress yet atlas build has not been called yet.", style.ToString()); this.EnsureFont(style); @@ -246,7 +265,7 @@ namespace Dalamud.Interface.GameFonts public void BuildFonts(bool forceMinSize) { this.isBuildingAsFallbackFontMode = forceMinSize; - this.isBetweenBuildFontsAndAfterBuildFonts = true; + this.isBetweenBuildFontsAndRightAfterImGuiIoFontsBuild = true; this.glyphRectIds.Clear(); this.fonts.Clear(); @@ -255,6 +274,21 @@ namespace Dalamud.Interface.GameFonts this.EnsureFont(style); } + /// + /// Record that ImGui.GetIO().Fonts.Build() has been called. + /// + public void AfterIoFontsBuild() + { + this.isBetweenBuildFontsAndRightAfterImGuiIoFontsBuild = false; + } + + /// + /// Checks whether GameFontMamager owns an ImFont. + /// + /// ImFontPtr to check. + /// Whether it owns. + public bool OwnsFont(ImFontPtr fontPtr) => this.fonts.ContainsValue(fontPtr); + /// /// Post-build fonts before plugins do something more. To be called from InterfaceManager. /// @@ -270,6 +304,9 @@ namespace Dalamud.Interface.GameFonts var fdt = this.fdts[(int)(this.isBuildingAsFallbackFontMode ? style.FamilyWithMinimumSize : style.FamilyAndSize)]; var scale = style.SizePt / fdt.FontHeader.Size; var fontPtr = font.NativePtr; + + Log.Verbose("[GameFontManager] AfterBuildFonts: Scaling {0} from {1}pt to {2}pt (scale: {3})", style.ToString(), fdt.FontHeader.Size, style.SizePt, scale); + fontPtr->FontSize = fdt.FontHeader.Size * 4 / 3; if (fontPtr->ConfigData != null) fontPtr->ConfigData->SizePixels = fontPtr->FontSize; @@ -364,12 +401,8 @@ namespace Dalamud.Interface.GameFonts } } - ImGuiHelpers.CopyGlyphsAcrossFonts(InterfaceManager.DefaultFont, font, true, false); UnscaleFont(font, 1 / scale, false); - font.BuildLookupTable(); } - - this.isBetweenBuildFontsAndAfterBuildFonts = false; } /// diff --git a/Dalamud/Interface/ImGuiExtensions.cs b/Dalamud/Interface/ImGuiExtensions.cs new file mode 100644 index 000000000..0e3c58925 --- /dev/null +++ b/Dalamud/Interface/ImGuiExtensions.cs @@ -0,0 +1,66 @@ +using System; +using System.Numerics; +using System.Text; +using ImGuiNET; + +namespace Dalamud.Interface; + +public static class ImGuiExtensions +{ + public static void AddTextClippedEx( + this ImDrawListPtr drawListPtr, Vector2 posMin, Vector2 posMax, string text, Vector2? textSizeIfKnown, + Vector2 align, Vector4? clipRect) + { + var pos = posMin; + var textSize = textSizeIfKnown ?? ImGui.CalcTextSize(text, false, 0); + + var clipMin = clipRect.HasValue ? new Vector2(clipRect.Value.X, clipRect.Value.Y) : posMin; + var clipMax = clipRect.HasValue ? new Vector2(clipRect.Value.Z, clipRect.Value.W) : posMax; + + var needClipping = (pos.X + textSize.X >= clipMax.X) || (pos.Y + textSize.Y >= clipMax.Y); + if (clipRect.HasValue) + needClipping |= (pos.X < clipMin.X) || (pos.Y < clipMin.Y); + + if (align.X > 0) + { + pos.X = Math.Max(pos.X, pos.X + ((posMax.X - pos.X - textSize.X) * align.X)); + } + + if (align.Y > 0) + { + pos.Y = Math.Max(pos.Y, pos.Y + ((posMax.Y - pos.Y - textSize.Y) * align.Y)); + } + + if (needClipping) + { + var fineClipRect = new Vector4(clipMin.X, clipMin.Y, clipMax.X, clipMax.Y); + drawListPtr.AddText(ImGui.GetFont(), ImGui.GetFontSize(), pos, ImGui.GetColorU32(ImGuiCol.Text), text, ref fineClipRect); + } + else + { + drawListPtr.AddText(ImGui.GetFont(), ImGui.GetFontSize(), pos, ImGui.GetColorU32(ImGuiCol.Text), text); + } + } + + // TODO: This should go into ImDrawList.Manual.cs in ImGui.NET... + public static unsafe void AddText(this ImDrawListPtr drawListPtr, ImFontPtr font, float fontSize, Vector2 pos, uint col, string textBegin, ref Vector4 cpuFineClipRect) + { + var nativeFont = font.NativePtr; + var textBeginByteCount = Encoding.UTF8.GetByteCount(textBegin); + var nativeTextBegin = stackalloc byte[textBeginByteCount + 1]; + + fixed (char* textBeginPtr = textBegin) + { + var nativeTextBeginOffset = Encoding.UTF8.GetBytes(textBeginPtr, textBegin.Length, nativeTextBegin, textBeginByteCount); + nativeTextBegin[nativeTextBeginOffset] = 0; + } + + byte* nativeTextEnd = null; + var wrapWidth = 0.0f; + + fixed (Vector4* nativeCpuFineClipRect = &cpuFineClipRect) + { + ImGuiNative.ImDrawList_AddText_FontPtr(drawListPtr.NativePtr, nativeFont, fontSize, pos, col, nativeTextBegin, nativeTextEnd, wrapWidth, nativeCpuFineClipRect); + } + } +} diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialog.Files.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialog.Files.cs index 05e69b4f5..881ab2108 100644 --- a/Dalamud/Interface/ImGuiFileDialog/FileDialog.Files.cs +++ b/Dalamud/Interface/ImGuiFileDialog/FileDialog.Files.cs @@ -298,70 +298,25 @@ namespace Dalamud.Interface.ImGuiFileDialog private void SetupSideBar() { - var drives = DriveInfo.GetDrives(); - foreach (var drive in drives) + foreach (var drive in DriveInfo.GetDrives()) { - this.drives.Add(new SideBarItem - { - Icon = (char)FontAwesomeIcon.Server, - Location = drive.Name, - Text = drive.Name, - }); + this.drives.Add(new SideBarItem(drive.Name, drive.Name, FontAwesomeIcon.Server)); } var personal = Path.GetDirectoryName(Environment.GetFolderPath(Environment.SpecialFolder.Personal)); - this.quickAccess.Add(new SideBarItem - { - Icon = (char)FontAwesomeIcon.Desktop, - Location = Environment.GetFolderPath(Environment.SpecialFolder.Desktop), - Text = "Desktop", - }); - - this.quickAccess.Add(new SideBarItem - { - Icon = (char)FontAwesomeIcon.File, - Location = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), - Text = "Documents", - }); + this.quickAccess.Add(new SideBarItem("Desktop", Environment.GetFolderPath(Environment.SpecialFolder.Desktop), FontAwesomeIcon.Desktop)); + this.quickAccess.Add(new SideBarItem("Documents", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), FontAwesomeIcon.File)); if (!string.IsNullOrEmpty(personal)) { - this.quickAccess.Add(new SideBarItem - { - Icon = (char)FontAwesomeIcon.Download, - Location = Path.Combine(personal, "Downloads"), - Text = "Downloads", - }); + this.quickAccess.Add(new SideBarItem("Downloads", Path.Combine(personal, "Downloads"), FontAwesomeIcon.Download)); } - this.quickAccess.Add(new SideBarItem - { - Icon = (char)FontAwesomeIcon.Star, - Location = Environment.GetFolderPath(Environment.SpecialFolder.Favorites), - Text = "Favorites", - }); - - this.quickAccess.Add(new SideBarItem - { - Icon = (char)FontAwesomeIcon.Music, - Location = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic), - Text = "Music", - }); - - this.quickAccess.Add(new SideBarItem - { - Icon = (char)FontAwesomeIcon.Image, - Location = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), - Text = "Pictures", - }); - - this.quickAccess.Add(new SideBarItem - { - Icon = (char)FontAwesomeIcon.Video, - Location = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos), - Text = "Videos", - }); + this.quickAccess.Add(new SideBarItem("Favorites", Environment.GetFolderPath(Environment.SpecialFolder.Favorites), FontAwesomeIcon.Star)); + this.quickAccess.Add(new SideBarItem("Music", Environment.GetFolderPath(Environment.SpecialFolder.MyMusic), FontAwesomeIcon.Music)); + this.quickAccess.Add(new SideBarItem("Pictures", Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), FontAwesomeIcon.Image)); + this.quickAccess.Add(new SideBarItem("Videos", Environment.GetFolderPath(Environment.SpecialFolder.MyVideos), FontAwesomeIcon.Video)); } private void SortFields(SortingField sortingField, bool canChangeOrder = false) diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialog.Structs.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialog.Structs.cs index e6dd5e3a4..ddd988287 100644 --- a/Dalamud/Interface/ImGuiFileDialog/FileDialog.Structs.cs +++ b/Dalamud/Interface/ImGuiFileDialog/FileDialog.Structs.cs @@ -1,5 +1,7 @@ using System.Collections.Generic; +using System.IO; using System.Numerics; +using Dalamud.Utility; namespace Dalamud.Interface.ImGuiFileDialog { @@ -19,11 +21,26 @@ namespace Dalamud.Interface.ImGuiFileDialog public string FileModifiedDate; } - private struct SideBarItem + private readonly struct SideBarItem { - public char Icon; - public string Text; - public string Location; + public SideBarItem(string text, string location, FontAwesomeIcon icon) + { + this.Text = text; + this.Location = location; + this.Icon = icon; + this.Exists = !this.Location.IsNullOrEmpty() && Directory.Exists(this.Location); + } + + public string Text { get; init; } + + public string Location { get; init; } + + public FontAwesomeIcon Icon { get; init; } + + public bool Exists { get; init; } + + public bool CheckExistence() + => !this.Location.IsNullOrEmpty() && Directory.Exists(this.Location); } private struct FilterStruct @@ -50,7 +67,7 @@ namespace Dalamud.Interface.ImGuiFileDialog private struct IconColorItem { - public char Icon; + public FontAwesomeIcon Icon; public Vector4 Color; } } diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialog.UI.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialog.UI.cs index d5010f13c..9c54c46ef 100644 --- a/Dalamud/Interface/ImGuiFileDialog/FileDialog.UI.cs +++ b/Dalamud/Interface/ImGuiFileDialog/FileDialog.UI.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.IO; +using System.Linq; using System.Numerics; using ImGuiNET; @@ -43,11 +44,11 @@ namespace Dalamud.Interface.ImGuiFileDialog if (this.isModal && !this.okResultToConfirm) { ImGui.OpenPopup(name); - windowVisible = ImGui.BeginPopupModal(name, ref this.visible, ImGuiWindowFlags.NoScrollbar); + windowVisible = ImGui.BeginPopupModal(name, ref this.visible, this.WindowFlags); } else { - windowVisible = ImGui.Begin(name, ref this.visible, ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoNav); + windowVisible = ImGui.Begin(name, ref this.visible, this.WindowFlags); } bool wasClosed = false; @@ -99,7 +100,7 @@ namespace Dalamud.Interface.ImGuiFileDialog return wasClosed || this.ConfirmOrOpenOverWriteFileDialogIfNeeded(res); } - private static void AddToIconMap(string[] extensions, char icon, Vector4 color) + private static void AddToIconMap(string[] extensions, FontAwesomeIcon icon, Vector4 color) { foreach (var ext in extensions) { @@ -116,19 +117,19 @@ namespace Dalamud.Interface.ImGuiFileDialog if (iconMap == null) { iconMap = new(); - AddToIconMap(new[] { "mp4", "gif", "mov", "avi" }, (char)FontAwesomeIcon.FileVideo, miscTextColor); - AddToIconMap(new[] { "pdf" }, (char)FontAwesomeIcon.FilePdf, miscTextColor); - AddToIconMap(new[] { "png", "jpg", "jpeg", "tiff" }, (char)FontAwesomeIcon.FileImage, imageTextColor); - AddToIconMap(new[] { "cs", "json", "cpp", "h", "py", "xml", "yaml", "js", "html", "css", "ts", "java" }, (char)FontAwesomeIcon.FileCode, codeTextColor); - AddToIconMap(new[] { "txt", "md" }, (char)FontAwesomeIcon.FileAlt, standardTextColor); - AddToIconMap(new[] { "zip", "7z", "gz", "tar" }, (char)FontAwesomeIcon.FileArchive, miscTextColor); - AddToIconMap(new[] { "mp3", "m4a", "ogg", "wav" }, (char)FontAwesomeIcon.FileAudio, miscTextColor); - AddToIconMap(new[] { "csv" }, (char)FontAwesomeIcon.FileCsv, miscTextColor); + AddToIconMap(new[] { "mp4", "gif", "mov", "avi" }, FontAwesomeIcon.FileVideo, miscTextColor); + AddToIconMap(new[] { "pdf" }, FontAwesomeIcon.FilePdf, miscTextColor); + AddToIconMap(new[] { "png", "jpg", "jpeg", "tiff" }, FontAwesomeIcon.FileImage, imageTextColor); + AddToIconMap(new[] { "cs", "json", "cpp", "h", "py", "xml", "yaml", "js", "html", "css", "ts", "java" }, FontAwesomeIcon.FileCode, codeTextColor); + AddToIconMap(new[] { "txt", "md" }, FontAwesomeIcon.FileAlt, standardTextColor); + AddToIconMap(new[] { "zip", "7z", "gz", "tar" }, FontAwesomeIcon.FileArchive, miscTextColor); + AddToIconMap(new[] { "mp3", "m4a", "ogg", "wav" }, FontAwesomeIcon.FileAudio, miscTextColor); + AddToIconMap(new[] { "csv" }, FontAwesomeIcon.FileCsv, miscTextColor); } return iconMap.TryGetValue(ext.ToLower(), out var icon) ? icon : new IconColorItem { - Icon = (char)FontAwesomeIcon.File, + Icon = FontAwesomeIcon.File, Color = standardTextColor, }; } @@ -147,7 +148,7 @@ namespace Dalamud.Interface.ImGuiFileDialog private void DrawPathComposer() { ImGui.PushFont(UiBuilder.IconFont); - if (ImGui.Button($"{(this.pathInputActivated ? (char)FontAwesomeIcon.Times : (char)FontAwesomeIcon.Edit)}")) + if (ImGui.Button(this.pathInputActivated ? FontAwesomeIcon.Times.ToIconString() : FontAwesomeIcon.Edit.ToIconString())) { this.pathInputActivated = !this.pathInputActivated; } @@ -158,13 +159,10 @@ namespace Dalamud.Interface.ImGuiFileDialog if (this.pathDecomposition.Count > 0) { - ImGui.SameLine(); - if (this.pathInputActivated) { - ImGui.PushItemWidth(ImGui.GetContentRegionAvail().X); + ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X); ImGui.InputText("##pathedit", ref this.pathInputBuffer, 255); - ImGui.PopItemWidth(); } else { @@ -203,7 +201,7 @@ namespace Dalamud.Interface.ImGuiFileDialog private void DrawSearchBar() { ImGui.PushFont(UiBuilder.IconFont); - if (ImGui.Button($"{(char)FontAwesomeIcon.Home}")) + if (ImGui.Button(FontAwesomeIcon.Home.ToIconString())) { this.SetPath("."); } @@ -222,12 +220,10 @@ namespace Dalamud.Interface.ImGuiFileDialog if (!this.createDirectoryMode) { ImGui.SameLine(); - ImGui.Text("Search :"); + ImGui.TextUnformatted("Search :"); ImGui.SameLine(); - ImGui.PushItemWidth(ImGui.GetContentRegionAvail().X); - var edited = ImGui.InputText("##InputImGuiFileDialogSearchField", ref this.searchBuffer, 255); - ImGui.PopItemWidth(); - if (edited) + ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X); + if (ImGui.InputText("##InputImGuiFileDialogSearchField", ref this.searchBuffer, 255)) { this.ApplyFilteringOnFileList(); } @@ -239,13 +235,10 @@ namespace Dalamud.Interface.ImGuiFileDialog if (this.flags.HasFlag(ImGuiFileDialogFlags.DisableCreateDirectoryButton)) return; ImGui.PushFont(UiBuilder.IconFont); - if (ImGui.Button($"{(char)FontAwesomeIcon.FolderPlus}")) + if (ImGui.Button(FontAwesomeIcon.FolderPlus.ToIconString()) && !this.createDirectoryMode) { - if (!this.createDirectoryMode) - { - this.createDirectoryMode = true; - this.createDirectoryBuffer = string.Empty; - } + this.createDirectoryMode = true; + this.createDirectoryBuffer = string.Empty; } ImGui.PopFont(); @@ -258,12 +251,11 @@ namespace Dalamud.Interface.ImGuiFileDialog if (this.createDirectoryMode) { ImGui.SameLine(); - ImGui.Text("New Directory Name"); + ImGui.TextUnformatted("New Directory Name"); ImGui.SameLine(); - ImGui.PushItemWidth(ImGui.GetContentRegionAvail().X - 100f); + ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X - 100f); ImGui.InputText("##DirectoryFileName", ref this.createDirectoryBuffer, 255); - ImGui.PopItemWidth(); ImGui.SameLine(); @@ -292,17 +284,20 @@ namespace Dalamud.Interface.ImGuiFileDialog if (!this.flags.HasFlag(ImGuiFileDialogFlags.HideSideBar)) { - ImGui.BeginChild("##FileDialog_ColumnChild", size); - ImGui.Columns(2, "##FileDialog_Columns"); + if (ImGui.BeginChild("##FileDialog_ColumnChild", size)) + { + ImGui.Columns(2, "##FileDialog_Columns"); - this.DrawSideBar(new Vector2(150, size.Y)); + this.DrawSideBar(size with { X = 150 }); - ImGui.SetColumnWidth(0, 150); - ImGui.NextColumn(); + ImGui.SetColumnWidth(0, 150); + ImGui.NextColumn(); - this.DrawFileListView(size - new Vector2(160, 0)); + this.DrawFileListView(size - new Vector2(160, 0)); + + ImGui.Columns(1); + } - ImGui.Columns(1); ImGui.EndChild(); } else @@ -313,45 +308,30 @@ namespace Dalamud.Interface.ImGuiFileDialog private void DrawSideBar(Vector2 size) { - ImGui.BeginChild("##FileDialog_SideBar", size); - - ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 5); - - foreach (var drive in this.drives) + if (ImGui.BeginChild("##FileDialog_SideBar", size)) { - ImGui.PushFont(UiBuilder.IconFont); - if (ImGui.Selectable($"{drive.Icon}##{drive.Text}", drive.Text == this.selectedSideBar)) + + ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 5); + + var idx = 0; + foreach (var qa in this.drives.Concat(this.quickAccess).Where(qa => qa.Exists)) { - this.SetPath(drive.Location); - this.selectedSideBar = drive.Text; + ImGui.PushID(idx++); + ImGui.SetCursorPosX(25); + if (ImGui.Selectable(qa.Text, qa.Text == this.selectedSideBar) && qa.CheckExistence()) + { + this.SetPath(qa.Location); + this.selectedSideBar = qa.Text; + } + + ImGui.PushFont(UiBuilder.IconFont); + ImGui.SameLine(); + ImGui.SetCursorPosX(0); + ImGui.TextUnformatted(qa.Icon.ToIconString()); + + ImGui.PopFont(); + ImGui.PopID(); } - - ImGui.PopFont(); - - ImGui.SameLine(25); - - ImGui.Text(drive.Text); - } - - foreach (var quick in this.quickAccess) - { - if (string.IsNullOrEmpty(quick.Location)) - { - continue; - } - - ImGui.PushFont(UiBuilder.IconFont); - if (ImGui.Selectable($"{quick.Icon}##{quick.Text}", quick.Text == this.selectedSideBar)) - { - this.SetPath(quick.Location); - this.selectedSideBar = quick.Text; - } - - ImGui.PopFont(); - - ImGui.SameLine(25); - - ImGui.Text(quick.Text); } ImGui.EndChild(); @@ -359,9 +339,13 @@ namespace Dalamud.Interface.ImGuiFileDialog private unsafe void DrawFileListView(Vector2 size) { - ImGui.BeginChild("##FileDialog_FileList", size); + if (!ImGui.BeginChild("##FileDialog_FileList", size)) + { + ImGui.EndChild(); + return; + } - var tableFlags = ImGuiTableFlags.SizingFixedFit | ImGuiTableFlags.RowBg | ImGuiTableFlags.Hideable | ImGuiTableFlags.ScrollY | ImGuiTableFlags.NoHostExtendX; + const ImGuiTableFlags tableFlags = ImGuiTableFlags.SizingFixedFit | ImGuiTableFlags.RowBg | ImGuiTableFlags.Hideable | ImGuiTableFlags.ScrollY | ImGuiTableFlags.NoHostExtendX; if (ImGui.BeginTable("##FileTable", 4, tableFlags, size)) { ImGui.TableSetupScrollFreeze(0, 1); @@ -427,13 +411,12 @@ namespace Dalamud.Interface.ImGuiFileDialog var dir = file.Type == FileStructType.Directory; var item = !dir ? GetIcon(file.Ext) : new IconColorItem - { - Color = dirTextColor, - Icon = (char)FontAwesomeIcon.Folder, - }; + { + Color = dirTextColor, + Icon = FontAwesomeIcon.Folder, + }; - ImGui.PushStyleColor(ImGuiCol.Text, item.Color); - if (selected) ImGui.PushStyleColor(ImGuiCol.Text, selectedTextColor); + ImGui.PushStyleColor(ImGuiCol.Text, selected ? selectedTextColor : item.Color); ImGui.TableNextRow(); @@ -444,30 +427,28 @@ namespace Dalamud.Interface.ImGuiFileDialog if (ImGui.TableNextColumn()) { - ImGui.Text(file.Ext); + ImGui.TextUnformatted(file.Ext); } if (ImGui.TableNextColumn()) { if (file.Type == FileStructType.File) { - ImGui.Text(file.FormattedFileSize + " "); + ImGui.TextUnformatted(file.FormattedFileSize + " "); } else { - ImGui.Text(" "); + ImGui.TextUnformatted(" "); } } if (ImGui.TableNextColumn()) { var sz = ImGui.CalcTextSize(file.FileModifiedDate); - ImGui.PushItemWidth(sz.X + 5); - ImGui.Text(file.FileModifiedDate + " "); - ImGui.PopItemWidth(); + ImGui.SetNextItemWidth(sz.X + 5); + ImGui.TextUnformatted(file.FileModifiedDate + " "); } - if (selected) ImGui.PopStyleColor(); ImGui.PopStyleColor(); if (needToBreak) break; @@ -475,6 +456,7 @@ namespace Dalamud.Interface.ImGuiFileDialog } clipper.End(); + clipper.Destroy(); } } @@ -503,13 +485,13 @@ namespace Dalamud.Interface.ImGuiFileDialog ImGui.EndChild(); } - private bool SelectableItem(FileStruct file, bool selected, char icon) + private bool SelectableItem(FileStruct file, bool selected, FontAwesomeIcon icon) { - var flags = ImGuiSelectableFlags.AllowDoubleClick | ImGuiSelectableFlags.SpanAllColumns; + const ImGuiSelectableFlags flags = ImGuiSelectableFlags.AllowDoubleClick | ImGuiSelectableFlags.SpanAllColumns; ImGui.PushFont(UiBuilder.IconFont); - ImGui.Text($"{icon}"); + ImGui.TextUnformatted(icon.ToIconString()); ImGui.PopFont(); ImGui.SameLine(25f); @@ -523,7 +505,7 @@ namespace Dalamud.Interface.ImGuiFileDialog this.pathClicked = this.SelectDirectory(file); return true; } - else if (this.IsDirectoryMode()) + if (this.IsDirectoryMode()) { this.SelectFileName(file); } @@ -712,11 +694,11 @@ namespace Dalamud.Interface.ImGuiFileDialog if (this.IsDirectoryMode()) { - ImGui.Text("Directory Path :"); + ImGui.TextUnformatted("Directory Path :"); } else { - ImGui.Text("File Name :"); + ImGui.TextUnformatted("File Name :"); } ImGui.SameLine(); @@ -729,18 +711,17 @@ namespace Dalamud.Interface.ImGuiFileDialog var selectOnly = this.flags.HasFlag(ImGuiFileDialogFlags.SelectOnly); - ImGui.PushItemWidth(width); + ImGui.SetNextItemWidth(width); if (selectOnly) ImGui.PushStyleVar(ImGuiStyleVar.Alpha, 0.5f); ImGui.InputText("##FileName", ref this.fileNameBuffer, 255, selectOnly ? ImGuiInputTextFlags.ReadOnly : ImGuiInputTextFlags.None); if (selectOnly) ImGui.PopStyleVar(); - ImGui.PopItemWidth(); if (this.filters.Count > 0) { ImGui.SameLine(); var needToApplyNewFilter = false; - ImGui.PushItemWidth(150f); + ImGui.SetNextItemWidth(150f); if (ImGui.BeginCombo("##Filters", this.selectedFilter.Filter, ImGuiComboFlags.None)) { var idx = 0; @@ -760,8 +741,6 @@ namespace Dalamud.Interface.ImGuiFileDialog ImGui.EndCombo(); } - ImGui.PopItemWidth(); - if (needToApplyNewFilter) { this.SetPath(this.currentPath); @@ -825,11 +804,10 @@ namespace Dalamud.Interface.ImGuiFileDialog { // quit dialog, it doesn't exist anyway return true; } - else - { // already exists, open dialog to confirm overwrite - this.isOk = false; - this.okResultToConfirm = true; - } + + // already exists, open dialog to confirm overwrite + this.isOk = false; + this.okResultToConfirm = true; } var name = $"The file Already Exists !##{this.title}{this.id}OverWriteDialog"; @@ -839,7 +817,7 @@ namespace Dalamud.Interface.ImGuiFileDialog ImGui.OpenPopup(name); if (ImGui.BeginPopupModal(name, ref open, ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoMove)) { - ImGui.Text("Would you like to Overwrite it ?"); + ImGui.TextUnformatted("Would you like to Overwrite it ?"); if (ImGui.Button("Confirm")) { this.okResultToConfirm = false; diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs index 924dc68c3..8308c7116 100644 --- a/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs +++ b/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using ImGuiNET; namespace Dalamud.Interface.ImGuiFileDialog { @@ -10,6 +11,11 @@ namespace Dalamud.Interface.ImGuiFileDialog /// public partial class FileDialog { + /// + /// The flags used to draw the file picker window. + /// + public ImGuiWindowFlags WindowFlags; + private readonly string title; private readonly int selectionCountMax; private readonly ImGuiFileDialogFlags flags; @@ -74,6 +80,9 @@ namespace Dalamud.Interface.ImGuiFileDialog this.flags = flags; this.selectionCountMax = selectionCountMax; this.isModal = isModal; + this.WindowFlags = ImGuiWindowFlags.NoNav; + if (!isModal) + this.WindowFlags |= ImGuiWindowFlags.NoScrollbar; this.currentPath = path; this.defaultExtension = defaultExtension; @@ -161,6 +170,42 @@ namespace Dalamud.Interface.ImGuiFileDialog return this.currentPath; } + /// + /// Set or remove a quick access folder for the navigation panel. + /// + /// The displayed name of the folder. If this name already exists, it will be overwritten. + /// The new linked path. If this is empty, no link will be added and existing links will be removed. + /// The FontAwesomeIcon-ID of the icon displayed before the name. + /// An optional position at which to insert the new link. If the link is updated, having this less than zero will keep its position. + /// Otherwise, invalid indices will insert it at the end. + public void SetQuickAccess(string name, string path, FontAwesomeIcon icon, int position = -1) + { + var idx = this.quickAccess.FindIndex(q => q.Text.Equals(name, StringComparison.InvariantCultureIgnoreCase)); + if (idx >= 0) + { + if (position >= 0 || path.Length == 0) + { + this.quickAccess.RemoveAt(idx); + } + else + { + this.quickAccess[idx] = new SideBarItem(name, path, icon); + return; + } + } + + if (path.Length == 0) return; + + if (position < 0 || position >= this.quickAccess.Count) + { + this.quickAccess.Add(new SideBarItem(name, path, icon)); + } + else + { + this.quickAccess.Insert(position, new SideBarItem(name, path, icon)); + } + } + private string GetFilePathName() { var path = this.GetCurrentPath(); @@ -184,7 +229,7 @@ namespace Dalamud.Interface.ImGuiFileDialog var result = this.fileNameBuffer; // a collection like {.cpp, .h}, so can't decide on an extension - if (this.selectedFilter.CollectionFilters != null && this.selectedFilter.CollectionFilters.Count > 0) + if (this.selectedFilter.CollectionFilters is { Count: > 0 }) { return result; } @@ -195,7 +240,7 @@ namespace Dalamud.Interface.ImGuiFileDialog var lastPoint = result.LastIndexOf('.'); if (lastPoint != -1) { - result = result.Substring(0, lastPoint); + result = result[..lastPoint]; } result += this.selectedFilter.Filter; @@ -230,7 +275,7 @@ namespace Dalamud.Interface.ImGuiFileDialog this.currentPath = dir.FullName; if (this.currentPath[^1] == Path.DirectorySeparatorChar) { // handle selecting a drive, like C: -> C:\ - this.currentPath = this.currentPath[0..^1]; + this.currentPath = this.currentPath[..^1]; } this.pathInputBuffer = this.currentPath; diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs index f9cd06290..05d6a040e 100644 --- a/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs +++ b/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using ImGuiNET; namespace Dalamud.Interface.ImGuiFileDialog { @@ -8,6 +9,12 @@ namespace Dalamud.Interface.ImGuiFileDialog /// public class FileDialogManager { + /// Additional quick access items for the side bar. + public readonly List<(string Name, string Path, FontAwesomeIcon Icon, int Position)> CustomSideBarItems = new(); + + /// Additional flags with which to draw the window. + public ImGuiWindowFlags AddedWindowFlags = ImGuiWindowFlags.None; + private FileDialog? dialog; private Action? callback; private Action>? multiCallback; @@ -181,6 +188,9 @@ namespace Dalamud.Interface.ImGuiFileDialog } this.dialog = new FileDialog(id, title, filters, path, defaultFileName, defaultExtension, selectionCountMax, isModal, flags); + this.dialog.WindowFlags |= this.AddedWindowFlags; + foreach (var (name, location, icon, position) in this.CustomSideBarItems) + this.dialog.SetQuickAccess(name, location, icon, position); this.dialog.Show(); } } diff --git a/Dalamud/Interface/ImGuiFileDialog/ImGuiFileDialogFlags.cs b/Dalamud/Interface/ImGuiFileDialog/ImGuiFileDialogFlags.cs index 7ed959796..fd5ee2531 100644 --- a/Dalamud/Interface/ImGuiFileDialog/ImGuiFileDialogFlags.cs +++ b/Dalamud/Interface/ImGuiFileDialog/ImGuiFileDialogFlags.cs @@ -16,41 +16,41 @@ namespace Dalamud.Interface.ImGuiFileDialog /// /// Confirm the selection when choosing a file which already exists. /// - ConfirmOverwrite = 1, + ConfirmOverwrite = 0x01, /// /// Only allow selection of files or folders which currently exist. /// - SelectOnly = 2, + SelectOnly = 0x02, /// /// Hide files or folders which start with a period. /// - DontShowHiddenFiles = 3, + DontShowHiddenFiles = 0x04, /// /// Disable the creation of new folders within the dialog. /// - DisableCreateDirectoryButton = 4, + DisableCreateDirectoryButton = 0x08, /// /// Hide the type column. /// - HideColumnType = 5, + HideColumnType = 0x10, /// /// Hide the file size column. /// - HideColumnSize = 6, + HideColumnSize = 0x20, /// /// Hide the last modified date column. /// - HideColumnDate = 7, + HideColumnDate = 0x40, /// /// Hide the quick access sidebar. /// - HideSideBar = 8, + HideSideBar = 0x80, } } diff --git a/Dalamud/Interface/Internal/DalamudCommands.cs b/Dalamud/Interface/Internal/DalamudCommands.cs index eaeaaa267..56ec778d8 100644 --- a/Dalamud/Interface/Internal/DalamudCommands.cs +++ b/Dalamud/Interface/Internal/DalamudCommands.cs @@ -131,6 +131,13 @@ namespace Dalamud.Interface.Internal HelpMessage = "Dalamud version info", }); + commandManager.AddHandler("/xlui", new CommandInfo(this.OnUiCommand) + { + HelpMessage = Loc.Localize( + "DalamudUiModeHelp", + "Toggle Dalamud UI display modes. Native UI modifications may also be affected by this, but that depends on the plugin."), + }); + commandManager.AddHandler("/imdebug", new CommandInfo(this.OnDebugImInfoCommand) { HelpMessage = "ImGui DEBUG", @@ -366,5 +373,31 @@ namespace Dalamud.Interface.Internal { Service.Get().ToggleSettingsWindow(); } + + private void OnUiCommand(string command, string arguments) + { + var im = Service.Get(); + + im.IsDispatchingEvents = arguments switch + { + "show" => true, + "hide" => false, + _ => !im.IsDispatchingEvents, + }; + + var pm = Service.Get(); + + foreach (var plugin in pm.InstalledPlugins) + { + if (im.IsDispatchingEvents) + { + plugin.DalamudInterface?.UiBuilder.NotifyShowUi(); + } + else + { + plugin.DalamudInterface?.UiBuilder.NotifyHideUi(); + } + } + } } } diff --git a/Dalamud/Interface/Internal/DalamudInterface.cs b/Dalamud/Interface/Internal/DalamudInterface.cs index fda86ac43..a25279e26 100644 --- a/Dalamud/Interface/Internal/DalamudInterface.cs +++ b/Dalamud/Interface/Internal/DalamudInterface.cs @@ -54,6 +54,7 @@ namespace Dalamud.Interface.Internal private readonly StyleEditorWindow styleEditorWindow; private readonly TitleScreenMenuWindow titleScreenMenuWindow; private readonly FallbackFontNoticeWindow fallbackFontNoticeWindow; + private readonly ProfilerWindow profilerWindow; private readonly TextureWrap logoTexture; private readonly TextureWrap tsmLogoTexture; @@ -66,7 +67,12 @@ namespace Dalamud.Interface.Internal private bool isImGuiDrawDevMenu = false; #endif +#if BOOT_AGING + private bool signaledBoot = false; +#endif + private bool isImGuiDrawDemoWindow = false; + private bool isImGuiTestWindowsInMonospace = false; private bool isImGuiDrawMetricsWindow = false; /// @@ -94,6 +100,7 @@ namespace Dalamud.Interface.Internal this.styleEditorWindow = new StyleEditorWindow() { IsOpen = false }; this.titleScreenMenuWindow = new TitleScreenMenuWindow() { IsOpen = false }; this.fallbackFontNoticeWindow = new FallbackFontNoticeWindow() { IsOpen = interfaceManager.IsFallbackFontMode && !configuration.DisableFontFallbackNotice }; + this.profilerWindow = new ProfilerWindow() { IsOpen = false }; this.WindowSystem.AddWindow(this.changelogWindow); this.WindowSystem.AddWindow(this.colorDemoWindow); @@ -110,6 +117,7 @@ namespace Dalamud.Interface.Internal this.WindowSystem.AddWindow(this.styleEditorWindow); this.WindowSystem.AddWindow(this.titleScreenMenuWindow); this.WindowSystem.AddWindow(this.fallbackFontNoticeWindow); + this.WindowSystem.AddWindow(this.profilerWindow); ImGuiManagedAsserts.AssertsEnabled = configuration.AssertsEnabledAtStartup; this.isImGuiDrawDevMenu = this.isImGuiDrawDevMenu || configuration.DevBarOpenAtStartup; @@ -255,6 +263,11 @@ namespace Dalamud.Interface.Internal /// Opens the . /// public void OpenStyleEditor() => this.styleEditorWindow.IsOpen = true; + + /// + /// Opens the . + /// + public void OpenProfiler() => this.profilerWindow.IsOpen = true; #endregion @@ -346,6 +359,11 @@ namespace Dalamud.Interface.Internal /// Toggles the . /// public void ToggleStyleEditorWindow() => this.selfTestWindow.Toggle(); + + /// + /// Toggles the . + /// + public void ToggleProfilerWindow() => this.profilerWindow.Toggle(); #endregion @@ -353,6 +371,19 @@ namespace Dalamud.Interface.Internal { this.frameCount++; +#if BOOT_AGING + if (this.frameCount > 500 && !this.signaledBoot) + { + this.signaledBoot = true; + + System.Threading.Tasks.Task.Run(async () => + { + using var client = new System.Net.Http.HttpClient(); + await client.PostAsync("http://localhost:1415/aging/success", new System.Net.Http.StringContent(string.Empty)); + }); + } +#endif + try { this.DrawHiddenDevMenuOpener(); @@ -363,12 +394,18 @@ namespace Dalamud.Interface.Internal this.WindowSystem.Draw(); + if (this.isImGuiTestWindowsInMonospace) + ImGui.PushFont(InterfaceManager.MonoFont); + if (this.isImGuiDrawDemoWindow) ImGui.ShowDemoWindow(ref this.isImGuiDrawDemoWindow); if (this.isImGuiDrawMetricsWindow) ImGui.ShowMetricsWindow(ref this.isImGuiDrawMetricsWindow); + if (this.isImGuiTestWindowsInMonospace) + ImGui.PopFont(); + // Release focus of any ImGui window if we click into the game. var io = ImGui.GetIO(); if (!io.WantCaptureMouse && (User32.GetKeyState((int)User32.VirtualKey.VK_LBUTTON) & 0x8000) != 0) @@ -519,6 +556,11 @@ namespace Dalamud.Interface.Internal this.OpenStyleEditor(); } + if (ImGui.MenuItem("Open Profiler")) + { + this.OpenProfiler(); + } + ImGui.Separator(); if (ImGui.MenuItem("Unload Dalamud")) @@ -566,8 +608,8 @@ namespace Dalamud.Interface.Internal if (ImGui.BeginMenu("GUI")) { + ImGui.MenuItem("Use Monospace font for following windows", string.Empty, ref this.isImGuiTestWindowsInMonospace); ImGui.MenuItem("Draw ImGui demo", string.Empty, ref this.isImGuiDrawDemoWindow); - ImGui.MenuItem("Draw metrics", string.Empty, ref this.isImGuiDrawMetricsWindow); ImGui.Separator(); diff --git a/Dalamud/Interface/Internal/InterfaceManager.cs b/Dalamud/Interface/Internal/InterfaceManager.cs index 6de07e0bd..a4a477f25 100644 --- a/Dalamud/Interface/Internal/InterfaceManager.cs +++ b/Dalamud/Interface/Internal/InterfaceManager.cs @@ -21,6 +21,7 @@ using Dalamud.Interface.Internal.Notifications; using Dalamud.Interface.Style; using Dalamud.Interface.Windowing; using Dalamud.Utility; +using Dalamud.Utility.Timing; using ImGuiNET; using ImGuiScene; using PInvoke; @@ -151,7 +152,7 @@ namespace Dalamud.Interface.Internal /// /// Gets or sets an action that is executed right after font fallback mode has been changed. /// - public event Action OnFallbackFontModeChange; + public event Action FallbackFontModeChange; /// /// Gets the default ImGui font. @@ -202,6 +203,11 @@ namespace Dalamud.Interface.Internal /// public bool IsReady => this.scene != null; + /// + /// Gets or sets a value indicating whether or not Draw events should be dispatched. + /// + public bool IsDispatchingEvents { get; set; } = true; + /// /// Gets or sets a value indicating whether the font has been loaded in fallback mode. /// @@ -214,7 +220,7 @@ namespace Dalamud.Interface.Internal return; this.isFallbackFontMode = value; - this.OnFallbackFontModeChange?.Invoke(value); + this.FallbackFontModeChange?.Invoke(value); } } @@ -469,118 +475,121 @@ namespace Dalamud.Interface.Internal if (this.scene == null) { - try + using (Timings.Start("IM Scene Init")) { - this.scene = new RawDX11Scene(swapChain); - } - catch (DllNotFoundException ex) - { - Log.Error(ex, "Could not load ImGui dependencies."); - - var res = PInvoke.User32.MessageBox( - IntPtr.Zero, - "Dalamud plugins require the Microsoft Visual C++ Redistributable to be installed.\nPlease install the runtime from the official Microsoft website or disable Dalamud.\n\nDo you want to download the redistributable now?", - "Dalamud Error", - User32.MessageBoxOptions.MB_YESNO | User32.MessageBoxOptions.MB_TOPMOST | User32.MessageBoxOptions.MB_ICONERROR); - - if (res == User32.MessageBoxResult.IDYES) + try { - var psi = new ProcessStartInfo + this.scene = new RawDX11Scene(swapChain); + } + catch (DllNotFoundException ex) + { + Log.Error(ex, "Could not load ImGui dependencies."); + + var res = PInvoke.User32.MessageBox( + IntPtr.Zero, + "Dalamud plugins require the Microsoft Visual C++ Redistributable to be installed.\nPlease install the runtime from the official Microsoft website or disable Dalamud.\n\nDo you want to download the redistributable now?", + "Dalamud Error", + User32.MessageBoxOptions.MB_YESNO | User32.MessageBoxOptions.MB_TOPMOST | User32.MessageBoxOptions.MB_ICONERROR); + + if (res == User32.MessageBoxResult.IDYES) { - FileName = "https://aka.ms/vs/16/release/vc_redist.x64.exe", - UseShellExecute = true, - }; - Process.Start(psi); + var psi = new ProcessStartInfo + { + FileName = "https://aka.ms/vs/16/release/vc_redist.x64.exe", + UseShellExecute = true, + }; + Process.Start(psi); + } + + Environment.Exit(-1); } - Environment.Exit(-1); - } + var startInfo = Service.Get(); + var configuration = Service.Get(); - var startInfo = Service.Get(); - var configuration = Service.Get(); + var iniFileInfo = new FileInfo(Path.Combine(Path.GetDirectoryName(startInfo.ConfigurationPath), "dalamudUI.ini")); - var iniFileInfo = new FileInfo(Path.Combine(Path.GetDirectoryName(startInfo.ConfigurationPath), "dalamudUI.ini")); - - try - { - if (iniFileInfo.Length > 1200000) + try { - Log.Warning("dalamudUI.ini was over 1mb, deleting"); - iniFileInfo.CopyTo(Path.Combine(iniFileInfo.DirectoryName, $"dalamudUI-{DateTimeOffset.Now.ToUnixTimeSeconds()}.ini")); - iniFileInfo.Delete(); + if (iniFileInfo.Length > 1200000) + { + Log.Warning("dalamudUI.ini was over 1mb, deleting"); + iniFileInfo.CopyTo(Path.Combine(iniFileInfo.DirectoryName, $"dalamudUI-{DateTimeOffset.Now.ToUnixTimeSeconds()}.ini")); + iniFileInfo.Delete(); + } } + catch (Exception ex) + { + Log.Error(ex, "Could not delete dalamudUI.ini"); + } + + this.scene.ImGuiIniPath = iniFileInfo.FullName; + this.scene.OnBuildUI += this.Display; + this.scene.OnNewInputFrame += this.OnNewInputFrame; + + StyleModel.TransferOldModels(); + + if (configuration.SavedStyles == null || configuration.SavedStyles.All(x => x.Name != StyleModelV1.DalamudStandard.Name)) + { + configuration.SavedStyles = new List { StyleModelV1.DalamudStandard, StyleModelV1.DalamudClassic }; + configuration.ChosenStyle = StyleModelV1.DalamudStandard.Name; + } + else if (configuration.SavedStyles.Count == 1) + { + configuration.SavedStyles.Add(StyleModelV1.DalamudClassic); + } + else if (configuration.SavedStyles[1].Name != StyleModelV1.DalamudClassic.Name) + { + configuration.SavedStyles.Insert(1, StyleModelV1.DalamudClassic); + } + + configuration.SavedStyles[0] = StyleModelV1.DalamudStandard; + configuration.SavedStyles[1] = StyleModelV1.DalamudClassic; + + var style = configuration.SavedStyles.FirstOrDefault(x => x.Name == configuration.ChosenStyle); + if (style == null) + { + style = StyleModelV1.DalamudStandard; + configuration.ChosenStyle = style.Name; + configuration.Save(); + } + + style.Apply(); + + ImGui.GetIO().FontGlobalScale = configuration.GlobalUiScale; + + this.SetupFonts(); + + if (!configuration.IsDocking) + { + ImGui.GetIO().ConfigFlags &= ~ImGuiConfigFlags.DockingEnable; + } + else + { + ImGui.GetIO().ConfigFlags |= ImGuiConfigFlags.DockingEnable; + } + + // NOTE (Chiv) Toggle gamepad navigation via setting + if (!configuration.IsGamepadNavigationEnabled) + { + ImGui.GetIO().BackendFlags &= ~ImGuiBackendFlags.HasGamepad; + ImGui.GetIO().ConfigFlags &= ~ImGuiConfigFlags.NavEnableSetMousePos; + } + else + { + ImGui.GetIO().BackendFlags |= ImGuiBackendFlags.HasGamepad; + ImGui.GetIO().ConfigFlags |= ImGuiConfigFlags.NavEnableSetMousePos; + } + + // NOTE (Chiv) Explicitly deactivate on dalamud boot + ImGui.GetIO().ConfigFlags &= ~ImGuiConfigFlags.NavEnableGamepad; + + ImGuiHelpers.MainViewport = ImGui.GetMainViewport(); + + Log.Information("[IM] Scene & ImGui setup OK!"); + + Service.Get().Enable(); } - catch (Exception ex) - { - Log.Error(ex, "Could not delete dalamudUI.ini"); - } - - this.scene.ImGuiIniPath = iniFileInfo.FullName; - this.scene.OnBuildUI += this.Display; - this.scene.OnNewInputFrame += this.OnNewInputFrame; - - this.SetupFonts(); - - StyleModel.TransferOldModels(); - - if (configuration.SavedStyles == null || configuration.SavedStyles.All(x => x.Name != StyleModelV1.DalamudStandard.Name)) - { - configuration.SavedStyles = new List { StyleModelV1.DalamudStandard, StyleModelV1.DalamudClassic }; - configuration.ChosenStyle = StyleModelV1.DalamudStandard.Name; - } - else if (configuration.SavedStyles.Count == 1) - { - configuration.SavedStyles.Add(StyleModelV1.DalamudClassic); - } - else if (configuration.SavedStyles[1].Name != StyleModelV1.DalamudClassic.Name) - { - configuration.SavedStyles.Insert(1, StyleModelV1.DalamudClassic); - } - - configuration.SavedStyles[0] = StyleModelV1.DalamudStandard; - configuration.SavedStyles[1] = StyleModelV1.DalamudClassic; - - var style = configuration.SavedStyles.FirstOrDefault(x => x.Name == configuration.ChosenStyle); - if (style == null) - { - style = StyleModelV1.DalamudStandard; - configuration.ChosenStyle = style.Name; - configuration.Save(); - } - - style.Apply(); - - ImGui.GetIO().FontGlobalScale = configuration.GlobalUiScale; - - if (!configuration.IsDocking) - { - ImGui.GetIO().ConfigFlags &= ~ImGuiConfigFlags.DockingEnable; - } - else - { - ImGui.GetIO().ConfigFlags |= ImGuiConfigFlags.DockingEnable; - } - - // NOTE (Chiv) Toggle gamepad navigation via setting - if (!configuration.IsGamepadNavigationEnabled) - { - ImGui.GetIO().BackendFlags &= ~ImGuiBackendFlags.HasGamepad; - ImGui.GetIO().ConfigFlags &= ~ImGuiConfigFlags.NavEnableSetMousePos; - } - else - { - ImGui.GetIO().BackendFlags |= ImGuiBackendFlags.HasGamepad; - ImGui.GetIO().ConfigFlags |= ImGuiConfigFlags.NavEnableSetMousePos; - } - - // NOTE (Chiv) Explicitly deactivate on dalamud boot - ImGui.GetIO().ConfigFlags &= ~ImGuiConfigFlags.NavEnableGamepad; - - ImGuiHelpers.MainViewport = ImGui.GetMainViewport(); - - Log.Information("[IM] Scene & ImGui setup OK!"); - - Service.Get().Enable(); } if (this.address.IsReshade) @@ -628,6 +637,8 @@ namespace Dalamud.Interface.Internal /// If set, then glyphs will be loaded in smaller resolution to make all glyphs fit into given constraints. private unsafe void SetupFonts(bool disableBigFonts = false) { + using var setupFontsTimings = Timings.Start("IM SetupFonts"); + var gameFontManager = Service.Get(); var dalamud = Service.Get(); var io = ImGui.GetIO(); @@ -828,10 +839,15 @@ namespace Dalamud.Interface.Internal for (int i = customFontFirstConfigIndex, i_ = ioFonts.ConfigData.Size; i < i_; i++) { var config = ioFonts.ConfigData[i]; + if (gameFontManager.OwnsFont(config.DstFont)) + continue; + config.OversampleH = 1; config.OversampleV = 1; var name = Encoding.UTF8.GetString((byte*)config.Name.Data, config.Name.Count).TrimEnd('\0'); + if (name.IsNullOrEmpty()) + name = $"{config.SizePixels}px"; // ImFont information is reflected only if corresponding ImFontConfig has MergeMode not set. if (config.MergeMode) @@ -869,6 +885,7 @@ namespace Dalamud.Interface.Internal Log.Verbose("[FONT] ImGui.IO.Build will be called."); ioFonts.Build(); + gameFontManager.AfterIoFontsBuild(); Log.Verbose("[FONT] ImGui.IO.Build OK!"); if (ioFonts.TexHeight > maxTexDimension) @@ -886,6 +903,7 @@ namespace Dalamud.Interface.Internal if (possibilityForScaling && !disableBigFonts) { Log.Information("[FONT] Atlas size is {0}x{1} which is bigger than allowed {2}x{3}. Retrying with minimized font sizes.", ioFonts.TexWidth, ioFonts.TexHeight, maxTexDimension, maxTexDimension); + this.IsFallbackFontMode = true; this.SetupFonts(true); return; } @@ -895,7 +913,8 @@ namespace Dalamud.Interface.Internal } } - this.IsFallbackFontMode = disableBigFonts; + if (!disableBigFonts) + this.IsFallbackFontMode = false; if (Math.Abs(fontGamma - 1.0f) >= 0.001) { @@ -929,9 +948,10 @@ namespace Dalamud.Interface.Internal if (mod.Axis == TargetFontModification.AxisMode.Overwrite) { Log.Verbose("[FONT] {0}: Overwrite from AXIS of size {1}px (was {2}px)", mod.Name, mod.SourceAxis.ImFont.FontSize, font.FontSize); - font.FontSize = mod.SourceAxis.ImFont.FontSize; - font.Ascent = mod.SourceAxis.ImFont.Ascent; - font.Descent = mod.SourceAxis.ImFont.Descent; + GameFontManager.UnscaleFont(font, font.FontSize / mod.SourceAxis.ImFont.FontSize, false); + var ascentDiff = mod.SourceAxis.ImFont.Ascent - font.Ascent; + font.Ascent += ascentDiff; + font.Descent = ascentDiff; font.FallbackChar = mod.SourceAxis.ImFont.FallbackChar; font.EllipsisChar = mod.SourceAxis.ImFont.EllipsisChar; ImGuiHelpers.CopyGlyphsAcrossFonts(mod.SourceAxis.ImFont, font, false, false); @@ -964,6 +984,9 @@ namespace Dalamud.Interface.Internal this.AfterBuildFonts?.Invoke(); Log.Verbose("[FONT] OnAfterBuildFonts OK!"); + if (ioFonts.Fonts[0].NativePtr != DefaultFont.NativePtr) + Log.Warning("[FONT] First font is not DefaultFont"); + Log.Verbose("[FONT] Fonts built!"); this.fontBuildSignal.Set(); @@ -995,7 +1018,36 @@ namespace Dalamud.Interface.Internal Log.Verbose("[FONT] RebuildFontsInternal() detaching"); this.scene.OnNewRenderFrame -= this.RebuildFontsInternal; - this.scene.InvalidateFonts(); + + Log.Verbose("[FONT] Calling InvalidateFonts"); + try + { + this.scene.InvalidateFonts(); + } + catch (Exception ex) + { + if (this.FontResolutionLevel > 2) + { + Log.Error(ex, "[FONT] Failed to create font textures; setting font resolution level to 2 and retrying"); + this.FontResolutionLevelOverride = 2; + this.SetupFonts(); + } + else + { + Log.Error(ex, "[FONT] Failed to create font textures; forcing fallback font mode"); + this.SetupFonts(true); + } + + Log.Verbose("[FONT] Calling InvalidateFonts again"); + try + { + this.scene.InvalidateFonts(); + } + catch (Exception ex2) + { + Log.Error(ex2, "[FONT] Giving up"); + } + } Log.Verbose("[FONT] Font Rebuild OK!"); @@ -1109,7 +1161,10 @@ namespace Dalamud.Interface.Internal WindowSystem.FocusedWindowSystemNamespace = string.Empty; var snap = ImGuiManagedAsserts.GetSnapshot(); - this.Draw?.Invoke(); + + if (this.IsDispatchingEvents) + this.Draw?.Invoke(); + ImGuiManagedAsserts.ReportProblems("Dalamud Core", snap); Service.Get().Draw(); diff --git a/Dalamud/Interface/Internal/Windows/CreditsWindow.cs b/Dalamud/Interface/Internal/Windows/CreditsWindow.cs index 9dd7fa4cb..89d0e8d86 100644 --- a/Dalamud/Interface/Internal/Windows/CreditsWindow.cs +++ b/Dalamud/Interface/Internal/Windows/CreditsWindow.cs @@ -28,24 +28,30 @@ Version D{0} created by: goat -Mino -Meli -attick -Aida-Enna -perchbird -Wintermute -fmauNeko -Caraxi -Adam -nibs/Poliwrath -karashiiro -Pohky daemitus -Aireil -kalilistic -MgAl2O4 +Soreepeong +ff-meli +attickdoor +Caraxi ascclemens -r00telement +kalilistic +0ceal0t +lmcintyre +pohky +Aireil +fitzchivalrik +MgAl2O4 +NotAdam +marimelon +karashiiro +pmgr +Ottermandias +aers +Poliwrath +Minizbot2021 +MalRD +SheepGoMeh +philpax @@ -99,15 +105,31 @@ Franz aers -We use these awesome C# libraries: +We use these awesome libraries: Lumina by Adam FFXIVClientStructs by aers ({2}) DotNetCorePlugins -Copyright (c) Nate McMaster +Copyright (c) Nate McMaster Licensed under the Apache License, Version 2.0 -See License.txt for license information. + +json +Copyright (c) 2013-2022 Niels Lohmann +Licensed under the MIT License + +nmd by Nomade040 +Licensed under the Unlicense + +MinHook +Copyright (C) 2009-2017 Tsuda Kageyu +Licensed under the BSD 2-Clause License + +SRELL +Copyright (c) 2012-2022, Nozomu Katoo + +Please see licenses.txt for more information. + Thanks to everyone in the XIVLauncher Discord server diff --git a/Dalamud/Interface/Internal/Windows/DataWindow.cs b/Dalamud/Interface/Internal/Windows/DataWindow.cs index d4f100915..bf1a13d01 100644 --- a/Dalamud/Interface/Internal/Windows/DataWindow.cs +++ b/Dalamud/Interface/Internal/Windows/DataWindow.cs @@ -452,7 +452,6 @@ namespace Dalamud.Interface.Internal.Windows } else { - stateString += $"FrameworkBase: {framework.Address.BaseAddress.ToInt64():X}\n"; stateString += $"ObjectTableLen: {objectTable.Length}\n"; stateString += $"LocalPlayerName: {clientState.LocalPlayer.Name}\n"; stateString += $"CurrentWorldName: {(this.resolveGameData ? clientState.LocalPlayer.CurrentWorld.GameData.Name : clientState.LocalPlayer.CurrentWorld.Id.ToString())}\n"; @@ -530,7 +529,6 @@ namespace Dalamud.Interface.Internal.Windows } else { - stateString += $"FrameworkBase: {framework.Address.BaseAddress.ToInt64():X}\n"; stateString += $"FateTableLen: {fateTable.Length}\n"; ImGui.TextUnformatted(stateString); diff --git a/Dalamud/Interface/Internal/Windows/FallbackFontNoticeWindow.cs b/Dalamud/Interface/Internal/Windows/FallbackFontNoticeWindow.cs index c0a035d52..fc83f2138 100644 --- a/Dalamud/Interface/Internal/Windows/FallbackFontNoticeWindow.cs +++ b/Dalamud/Interface/Internal/Windows/FallbackFontNoticeWindow.cs @@ -29,7 +29,7 @@ namespace Dalamud.Interface.Internal.Windows var interfaceManager = Service.Get(); var dalamud = Service.Get(); - Service.Get().OnFallbackFontModeChange += this.OnFallbackFontModeChange; + Service.Get().FallbackFontModeChange += this.OnFallbackFontModeChange; } private static string Title => Loc.Localize("FallbackFontNoticeWindowTitle", "Fallback Font Mode Active"); @@ -80,7 +80,7 @@ namespace Dalamud.Interface.Internal.Windows /// public void Dispose() { - Service.Get().OnFallbackFontModeChange -= this.OnFallbackFontModeChange; + Service.Get().FallbackFontModeChange -= this.OnFallbackFontModeChange; } private void OnFallbackFontModeChange(bool mode) diff --git a/Dalamud/Interface/Internal/Windows/IMEWindow.cs b/Dalamud/Interface/Internal/Windows/IMEWindow.cs index 5c936d4e9..f07c56202 100644 --- a/Dalamud/Interface/Internal/Windows/IMEWindow.cs +++ b/Dalamud/Interface/Internal/Windows/IMEWindow.cs @@ -1,7 +1,7 @@ using System.Numerics; +using Dalamud.Game.ClientState.Keys; using Dalamud.Game.Gui.Internal; -using Dalamud.Interface.Colors; using Dalamud.Interface.Windowing; using ImGuiNET; @@ -10,7 +10,7 @@ namespace Dalamud.Interface.Internal.Windows /// /// A window for displaying IME details. /// - internal class IMEWindow : Window + internal unsafe class IMEWindow : Window { private const int ImePageSize = 9; @@ -18,7 +18,7 @@ namespace Dalamud.Interface.Internal.Windows /// Initializes a new instance of the class. /// public IMEWindow() - : base("Dalamud IME", ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoFocusOnAppearing | ImGuiWindowFlags.AlwaysAutoResize) + : base("Dalamud IME", ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoFocusOnAppearing | ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoBackground) { this.Size = new Vector2(100, 200); this.SizeCondition = ImGuiCond.FirstUseEver; @@ -29,6 +29,7 @@ namespace Dalamud.Interface.Internal.Windows /// public override void Draw() { + if (this.IsOpen && Service.Get()[VirtualKey.SHIFT]) Service.Get().CloseIMEWindow(); var ime = Service.GetNullable(); if (ime == null || !ime.IsEnabled) @@ -36,34 +37,70 @@ namespace Dalamud.Interface.Internal.Windows ImGui.Text("IME is unavailable."); return; } + } - ImGui.Text(ime.ImmComp); + /// + public override void PostDraw() + { + if (this.IsOpen && Service.Get()[VirtualKey.SHIFT]) Service.Get().CloseIMEWindow(); + var ime = Service.GetNullable(); - ImGui.Separator(); + if (ime == null || !ime.IsEnabled) + return; + + var cursorPos = ime.GetCursorPos(); + + var nextDrawPosY = cursorPos.Y; + var maxTextWidth = 0f; + var textHeight = ImGui.CalcTextSize(ime.ImmComp).Y; + var drawAreaPosX = cursorPos.X + ImGui.GetStyle().WindowPadding.X; var native = ime.ImmCandNative; - for (var i = 0; i < ime.ImmCand.Count; i++) - { - var selected = i == (native.Selection % ImePageSize); - - if (selected) - ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.HealerGreen); - - ImGui.Text($"{i + 1}. {ime.ImmCand[i]}"); - - if (selected) - ImGui.PopStyleColor(); - } - var totalIndex = native.Selection + 1; var totalSize = native.Count; var pageStart = native.PageStart; var pageIndex = (pageStart / ImePageSize) + 1; var pageCount = (totalSize / ImePageSize) + 1; + var pageInfo = $"{totalIndex}/{totalSize} ({pageIndex}/{pageCount})"; - ImGui.Separator(); - ImGui.Text($"{totalIndex}/{totalSize} ({pageIndex}/{pageCount})"); + // Calc the window size + for (var i = 0; i < ime.ImmCand.Count; i++) + { + var textSize = ImGui.CalcTextSize($"{i + 1}. {ime.ImmCand[i]}"); + maxTextWidth = maxTextWidth > textSize.X ? maxTextWidth : textSize.X; + } + + maxTextWidth = maxTextWidth > ImGui.CalcTextSize(pageInfo).X ? maxTextWidth : ImGui.CalcTextSize(pageInfo).X; + maxTextWidth = maxTextWidth > ImGui.CalcTextSize(ime.ImmComp).X ? maxTextWidth : ImGui.CalcTextSize(ime.ImmComp).X; + + var imeWindowMinPos = new Vector2(cursorPos.X, cursorPos.Y); + var imeWindowMaxPos = new Vector2(cursorPos.X + maxTextWidth + (2 * ImGui.GetStyle().WindowPadding.X), cursorPos.Y + (textHeight * (ime.ImmCand.Count + 2)) + (5 * (ime.ImmCand.Count - 1)) + (2 * ImGui.GetStyle().WindowPadding.Y)); + + var drawList = ImGui.GetForegroundDrawList(); + // Draw the background rect + drawList.AddRectFilled(imeWindowMinPos, imeWindowMaxPos, ImGui.GetColorU32(ImGuiCol.WindowBg), ImGui.GetStyle().WindowRounding); + // Add component text + drawList.AddText(new Vector2(drawAreaPosX, nextDrawPosY), ImGui.GetColorU32(ImGuiCol.Text), ime.ImmComp); + nextDrawPosY += textHeight + ImGui.GetStyle().ItemSpacing.Y; + // Add separator + drawList.AddLine(new Vector2(drawAreaPosX, nextDrawPosY), new Vector2(drawAreaPosX + maxTextWidth, nextDrawPosY), ImGui.GetColorU32(ImGuiCol.Separator)); + // Add candidate words + for (var i = 0; i < ime.ImmCand.Count; i++) + { + var selected = i == (native.Selection % ImePageSize); + var color = ImGui.GetColorU32(ImGuiCol.Text); + if (selected) + color = ImGui.GetColorU32(ImGuiCol.NavHighlight); + + drawList.AddText(new Vector2(drawAreaPosX, nextDrawPosY), color, $"{i + 1}. {ime.ImmCand[i]}"); + nextDrawPosY += textHeight + ImGui.GetStyle().ItemSpacing.Y; + } + + // Add separator + drawList.AddLine(new Vector2(drawAreaPosX, nextDrawPosY), new Vector2(drawAreaPosX + maxTextWidth, nextDrawPosY), ImGui.GetColorU32(ImGuiCol.Separator)); + // Add pages infomation + drawList.AddText(new Vector2(drawAreaPosX, nextDrawPosY), ImGui.GetColorU32(ImGuiCol.Text), pageInfo); } } } diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index b98e4e5f1..1845156b4 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -386,6 +386,10 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller if (this.errorModalOnNextFrame) { + // NOTE(goat): ImGui cannot open a modal if no window is focused, at the moment. + // If people click out of the installer into the game while a plugin is installing, we won't be able to show a modal if we don't grab focus. + ImGui.SetWindowFocus(this.WindowName); + ImGui.OpenPopup(modalTitle); this.errorModalOnNextFrame = false; this.errorModalDrawing = true; diff --git a/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs b/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs new file mode 100644 index 000000000..ddaa26756 --- /dev/null +++ b/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs @@ -0,0 +1,176 @@ +using System; +using System.Linq; +using System.Numerics; +using Dalamud.Interface.Colors; +using Dalamud.Interface.Windowing; +using Dalamud.Utility.Numerics; +using Dalamud.Utility.Timing; +using ImGuiNET; + +namespace Dalamud.Interface.Internal.Windows; + +public class ProfilerWindow : Window +{ + private double min; + private double max; + + public ProfilerWindow() : base("Profiler", forceMainWindow: true) { } + + public override void OnOpen() + { + this.min = Timings.AllTimings.Min(x => x.StartTime); + this.max = Timings.AllTimings.Max(x => x.EndTime); + } + + /// + public override void Draw() + { + var width = ImGui.GetWindowWidth(); + var actualMin = Timings.AllTimings.Min(x => x.StartTime); + var actualMax = Timings.AllTimings.Max(x => x.EndTime); + + ImGui.Text("Timings"); + + const int childHeight = 300; + + if (ImGui.BeginChild("Timings", new Vector2(0, childHeight), true)) + { + var pos = ImGui.GetCursorScreenPos(); + + for (var i = 0; i < width; i += 80) + { + ImGui.PushFont(InterfaceManager.MonoFont); + + var lineEnd = childHeight - 20; + + ImGui.GetWindowDrawList().AddLine( + pos + new Vector2(i, 0), + pos + new Vector2(i, lineEnd - 10), + ImGui.GetColorU32(ImGuiColors.ParsedGrey.WithW(0x40))); + + // Draw ms label for line + var ms = ((i / width) * (this.max - this.min)) + this.min; + var msStr = (ms / 1000).ToString("F2") + "s"; + var msSize = ImGui.CalcTextSize(msStr); + var labelPos = pos + new Vector2(i - (msSize.X / 2), (-msSize.Y / 2) + lineEnd); + + // nudge label to the side if it's the first, so we're not cut off + if (i == 0) + labelPos.X += msSize.X / 2; + + ImGui.GetWindowDrawList().AddText( + labelPos, + ImGui.GetColorU32(ImGuiColors.ParsedGrey.WithW(0x40)), + msStr); + + ImGui.PopFont(); + } + + uint maxRectDept = 0; + + foreach (var timingHandle in Timings.AllTimings) + { + var startX = (timingHandle.StartTime - this.min) / (this.max - this.min) * width; + var endX = (timingHandle.EndTime - this.min) / (this.max - this.min) * width; + + startX = Math.Max(startX, 0); + endX = Math.Max(endX, 0); + + var rectColor = timingHandle.IsMainThread ? ImGuiColors.ParsedBlue : ImGuiColors.ParsedPurple; + rectColor.X -= timingHandle.Depth * 0.12f; + rectColor.Y -= timingHandle.Depth * 0.12f; + rectColor.Z -= timingHandle.Depth * 0.12f; + + if (maxRectDept < timingHandle.Depth) + maxRectDept = timingHandle.Depth; + + if (startX == endX) + { + continue; + } + + var minPos = pos + new Vector2((uint)startX, 20 * timingHandle.Depth); + var maxPos = pos + new Vector2((uint)endX, 20 * (timingHandle.Depth + 1)); + + ImGui.GetWindowDrawList().AddRectFilled( + minPos, + maxPos, + ImGui.GetColorU32(rectColor)); + + ImGui.GetWindowDrawList().AddTextClippedEx(minPos, maxPos, timingHandle.Name, null, Vector2.Zero, null); + + // Show tooltip when hovered + var mousePos = ImGui.GetMousePos(); + if (mousePos.X > pos.X + startX && mousePos.X < pos.X + endX && + mousePos.Y > pos.Y + (20 * timingHandle.Depth) && + mousePos.Y < pos.Y + (20 * (timingHandle.Depth + 1))) + { + ImGui.BeginTooltip(); + ImGui.Text(timingHandle.Name); + ImGui.Text(timingHandle.MemberName); + ImGui.Text($"{timingHandle.FileName}:{timingHandle.LineNumber}"); + ImGui.Text($"Duration: {timingHandle.Duration}ms"); + ImGui.EndTooltip(); + } + } + + uint eventTextDepth = maxRectDept + 2; + + foreach (var timingEvent in Timings.Events) + { + var startX = (timingEvent.StartTime - this.min) / (this.max - this.min) * width; + + if (startX < 0 || startX > width) + { + continue; + } + + ImGui.GetWindowDrawList().AddLine( + pos + new Vector2((uint)startX, 0), + pos + new Vector2((uint)startX, childHeight), + ImGui.GetColorU32(ImGuiColors.ParsedOrange), + 1.5f); + + const uint padding = 5; + + var textSize = ImGui.CalcTextSize(timingEvent.Name); + var textPos = pos + new Vector2((uint)startX + padding, eventTextDepth * 20); + + if (textPos.X + textSize.X > pos.X + width - 20) + { + textPos.X = pos.X + (uint)startX - textSize.X - padding; + } + + ImGui.GetWindowDrawList().AddText( + textPos, + ImGui.GetColorU32(ImGuiColors.DalamudWhite), + timingEvent.Name); + } + } + + ImGui.EndChild(); + + var sliderMin = (float)this.min / 1000f; + if (ImGui.SliderFloat("Start", ref sliderMin, (float)actualMin / 1000f, (float)this.max / 1000f, "%.1fs")) + { + this.min = sliderMin * 1000f; + } + + var sliderMax = (float)this.max / 1000f; + if (ImGui.SliderFloat("End", ref sliderMax, (float)this.min / 1000f, (float)actualMax / 1000f, "%.1fs")) + { + this.max = sliderMax * 1000f; + } + + var sizeShown = (float)(this.max - this.min); + var sizeActual = (float)(actualMax - actualMin); + if (ImGui.SliderFloat("Size", ref sizeShown, sizeActual / 10f, sizeActual, "%.1fs")) + { + this.max = this.min + sizeShown; + } + + ImGui.Text("Min: " + actualMin.ToString("0.000")); + ImGui.Text("Max: " + actualMax.ToString("0.000")); + ImGui.Text("Timings: " + Timings.AllTimings.Count); + } +} diff --git a/Dalamud/Interface/Internal/Windows/SettingsWindow.cs b/Dalamud/Interface/Internal/Windows/SettingsWindow.cs index 72f699840..729390aa0 100644 --- a/Dalamud/Interface/Internal/Windows/SettingsWindow.cs +++ b/Dalamud/Interface/Internal/Windows/SettingsWindow.cs @@ -277,7 +277,7 @@ namespace Dalamud.Interface.Internal.Windows ImGui.TextColored(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingsSystemMenuMsgHint", "Add buttons for Dalamud plugins and settings to the system menu.")); ImGui.Checkbox(Loc.Localize("DalamudSettingsDisableRmtFiltering", "Disable RMT Filtering"), ref this.disableRmtFiltering); - ImGui.TextColored(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingsDisableRmtFilteringMsgHint", "Disable dalamud's built-in RMT ad filtering.")); + ImGui.TextColored(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingsDisableRmtFilteringMsgHint", "Disable Dalamud's built-in RMT ad filtering.")); ImGuiHelpers.ScaledDummy(5); @@ -367,6 +367,8 @@ namespace Dalamud.Interface.Internal.Windows ImGuiHelpers.ScaledDummy(3); ImGui.Text(Loc.Localize("DalamudSettingsFontResolutionLevel", "Font resolution level")); + if (interfaceManager.FontResolutionLevelOverride != null) + this.fontResolutionLevel = interfaceManager.FontResolutionLevelOverride.Value; if (ImGui.Combo("##DalamudSettingsFontResolutionLevelCombo", ref this.fontResolutionLevel, this.fontResolutionLevelStrings, this.fontResolutionLevelStrings.Length)) { interfaceManager.FontResolutionLevelOverride = this.fontResolutionLevel; @@ -375,7 +377,9 @@ namespace Dalamud.Interface.Internal.Windows ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudGrey); ImGui.TextWrapped(string.Format( - Loc.Localize("DalamudSettingsFontResolutionLevelHint", "This option allows Dalamud fonts to look better. If your game crashes when changing this option, your PC does not support high font resolutions in Dalamud - you will have to use a lower one.\nCurrent font atlas size is {0}px * {1}px."), + Loc.Localize( + "DalamudSettingsFontResolutionLevelHint", + "This option allows Dalamud fonts to look better.\n* If your game crashes right away, or the option reverts, when changing this option, your PC does not support high font resolutions in Dalamud - you will have to use a lower one.\n* If it doesn't crash or revert immediately, then you can keep the new choice indefinitely as it's not going to crash your game once it worked.\n* Either choose the 3rd or 5th option. Use other options only when neither works well.\n* Current font atlas size is {0}px * {1}px."), ImGui.GetIO().Fonts.TexWidth, ImGui.GetIO().Fonts.TexHeight)); ImGui.PopStyleColor(); diff --git a/Dalamud/Interface/UiBuilder.cs b/Dalamud/Interface/UiBuilder.cs index e3f85426c..753e81b4e 100644 --- a/Dalamud/Interface/UiBuilder.cs +++ b/Dalamud/Interface/UiBuilder.cs @@ -25,7 +25,8 @@ namespace Dalamud.Interface private readonly Stopwatch stopwatch; private readonly string namespaceName; - private bool hasErrorWindow; + private bool hasErrorWindow = false; + private bool lastFrameUiHideState = false; /// /// Initializes a new instance of the class and registers it. @@ -78,6 +79,18 @@ namespace Dalamud.Interface /// public event Action AfterBuildFonts; + /// + /// Gets or sets an action that is called when plugin UI or interface modifications are supposed to be hidden. + /// These may be fired consecutively. + /// + public event Action ShowUi; + + /// + /// Gets or sets an action that is called when plugin UI or interface modifications are supposed to be shown. + /// These may be fired consecutively. + /// + public event Action HideUi; + /// /// Gets the default Dalamud font based on Noto Sans CJK Medium in 17pt - supporting all game languages and icons. /// @@ -137,6 +150,36 @@ namespace Dalamud.Interface /// public ulong FrameCount { get; private set; } = 0; + /// + /// Gets a value indicating whether or not a cutscene is playing. + /// + public bool CutsceneActive + { + get + { + var condition = Service.Get(); + return condition[ConditionFlag.OccupiedInCutSceneEvent] + || condition[ConditionFlag.WatchingCutscene78]; + } + } + + /// + /// Gets a value indicating whether or not gpose is active. + /// + public bool GposeActive + { + get + { + var condition = Service.Get(); + return condition[ConditionFlag.WatchingCutscene]; + } + } + + /// + /// Gets a value indicating whether this plugin should modify the game's interface at this time. + /// + public bool ShouldModifyUi => Service.GetNullable()?.IsDispatchingEvents ?? true; + /// /// Gets or sets a value indicating whether statistics about UI draw time should be collected. /// @@ -166,25 +209,6 @@ namespace Dalamud.Interface /// internal List DrawTimeHistory { get; set; } = new List(); - private bool CutsceneActive - { - get - { - var condition = Service.Get(); - return condition[ConditionFlag.OccupiedInCutSceneEvent] - || condition[ConditionFlag.WatchingCutscene78]; - } - } - - private bool GposeActive - { - get - { - var condition = Service.Get(); - return condition[ConditionFlag.WatchingCutscene]; - } - } - /// /// Loads an image from the specified file. /// @@ -261,16 +285,49 @@ namespace Dalamud.Interface this.OpenConfigUi?.Invoke(); } + /// + /// Notify this UiBuilder about plugin UI being hidden. + /// + internal void NotifyHideUi() + { + this.HideUi?.Invoke(); + } + + /// + /// Notify this UiBuilder about plugin UI being shown. + /// + internal void NotifyShowUi() + { + this.ShowUi?.Invoke(); + } + private void OnDraw() { var configuration = Service.Get(); var gameGui = Service.Get(); var interfaceManager = Service.Get(); - if ((gameGui.GameUiHidden && configuration.ToggleUiHide && !(this.DisableUserUiHide || this.DisableAutomaticUiHide)) || - (this.CutsceneActive && configuration.ToggleUiHideDuringCutscenes && !(this.DisableCutsceneUiHide || this.DisableAutomaticUiHide)) || - (this.GposeActive && configuration.ToggleUiHideDuringGpose && !(this.DisableGposeUiHide || this.DisableAutomaticUiHide))) + if ((gameGui.GameUiHidden && configuration.ToggleUiHide && + !(this.DisableUserUiHide || this.DisableAutomaticUiHide)) || + (this.CutsceneActive && configuration.ToggleUiHideDuringCutscenes && + !(this.DisableCutsceneUiHide || this.DisableAutomaticUiHide)) || + (this.GposeActive && configuration.ToggleUiHideDuringGpose && + !(this.DisableGposeUiHide || this.DisableAutomaticUiHide))) + { + if (!this.lastFrameUiHideState) + { + this.lastFrameUiHideState = true; + this.HideUi?.Invoke(); + } + return; + } + + if (this.lastFrameUiHideState) + { + this.lastFrameUiHideState = false; + this.ShowUi?.Invoke(); + } if (!interfaceManager.FontsReady) return; diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index e1333e072..3b8b903c8 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -65,7 +65,7 @@ namespace Dalamud.Interface.Windowing public ImGuiCond PositionCondition { get; set; } /// - /// Gets or sets the size of the window. + /// Gets or sets the size of the window. The size provided will be scaled by the global scale. /// public Vector2? Size { get; set; } @@ -75,7 +75,7 @@ namespace Dalamud.Interface.Windowing public ImGuiCond SizeCondition { get; set; } /// - /// Gets or sets the size constraints of the window. + /// Gets or sets the size constraints of the window. The size constraints provided will be scaled by the global scale. /// public WindowSizeConstraints? SizeConstraints { get; set; } diff --git a/Dalamud/NativeFunctions.cs b/Dalamud/NativeFunctions.cs index d11c39464..5b03eeb33 100644 --- a/Dalamud/NativeFunctions.cs +++ b/Dalamud/NativeFunctions.cs @@ -1393,6 +1393,18 @@ namespace Dalamud WriteCombine = 0x400, } + /// + /// See https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-setevent + /// Sets the specified event object to the signaled state. + /// + /// A handle to the event object. The CreateEvent or OpenEvent function returns this handle. + /// + /// If the function succeeds, the return value is nonzero. + /// If the function fails, the return value is zero. To get extended error information, call GetLastError. + /// + [DllImport("kernel32.dll")] + public static extern bool SetEvent(IntPtr hEvent); + /// /// See https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-freelibrary. /// Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count. When the reference diff --git a/Dalamud/Plugin/DalamudPluginInterface.cs b/Dalamud/Plugin/DalamudPluginInterface.cs index 4e2ecc6c6..b973ea296 100644 --- a/Dalamud/Plugin/DalamudPluginInterface.cs +++ b/Dalamud/Plugin/DalamudPluginInterface.cs @@ -15,6 +15,7 @@ using Dalamud.Game.Text.Sanitizer; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Interface; +using Dalamud.Interface.Internal; using Dalamud.Plugin.Internal; using Dalamud.Plugin.Ipc; using Dalamud.Plugin.Ipc.Exceptions; @@ -139,6 +140,11 @@ namespace Dalamud.Plugin /// /// Gets a value indicating whether Dalamud is running in Debug mode or the /xldev menu is open. This can occur on release builds. /// + public bool IsDevMenuOpen => Service.GetNullable() is { IsDevMenuOpen: true }; // Can be null during boot + + /// + /// Gets a value indicating whether a debugger is attached. + /// public bool IsDebugging => Debugger.IsAttached; /// diff --git a/Dalamud/Plugin/Internal/PluginManager.cs b/Dalamud/Plugin/Internal/PluginManager.cs index 25ec9a11c..d8595f5d5 100644 --- a/Dalamud/Plugin/Internal/PluginManager.cs +++ b/Dalamud/Plugin/Internal/PluginManager.cs @@ -12,6 +12,7 @@ using System.Threading.Tasks; using CheapLoc; using Dalamud.Configuration; using Dalamud.Configuration.Internal; +using Dalamud.Game; using Dalamud.Game.Gui; using Dalamud.Game.Gui.Dtr; using Dalamud.Game.Text; @@ -340,6 +341,9 @@ internal partial class PluginManager : IDisposable { this.PluginsReady = true; this.NotifyInstalledPluginsChanged(); + + // Save signatures, makes sense to do it here since all plugins will be loaded + Service.Get().Save(); }); } diff --git a/Dalamud/Utility/MapUtil.cs b/Dalamud/Utility/MapUtil.cs new file mode 100644 index 000000000..b4bbe1038 --- /dev/null +++ b/Dalamud/Utility/MapUtil.cs @@ -0,0 +1,131 @@ +using System.Numerics; + +using Lumina.Excel.GeneratedSheets; + +namespace Dalamud.Utility; + +/// +/// Utility helper class for game maps and coordinate translations that don't require state. +/// +/// The conversion methods were found in 89 54 24 10 56 41 55 41 56 48 81 EC, which itself was found by looking for +/// uses of AddonText 1631. +/// +public static class MapUtil +{ + /// + /// Helper method to convert one of the game's Vector3 X/Z provided by the game to a map coordinate suitable for + /// display to the player. + /// + /// The raw float of a game Vector3 X or Z coordinate to convert. + /// The scale factor of the map, generally retrieved from Lumina. + /// The dimension offset for either X or Z, generally retrieved from Lumina. + /// Returns a converted float for display to the player. + public static float ConvertWorldCoordXZToMapCoord(float value, uint scale, int offset) + { + // Derived from E8 ?? ?? ?? ?? 0F B7 4B 1C and simplified. + + return (0.02f * offset) + (2048f / scale) + (0.02f * value) + 1.0f; + } + + /// + /// Helper method to convert a game Vector3 Y coordinate to a map coordinate suitable for display to the player. + /// + /// The raw float of a game Vector3 Y coordinate to convert. + /// The zOffset for this map. Retrieved from TerritoryTypeTransient. + /// Optionally enable Z offset correction. When a Z offset of -10,000 is set, replace + /// it with 0 for calculation purposes to show a more sane Z coordinate. + /// Returns a converted float for display to the player. + public static float ConvertWorldCoordYToMapCoord(float value, int zOffset, bool correctZOffset = false) + { + // Derived from 48 83 EC 38 80 3D ?? ?? ?? ?? ?? 0F 29 74 24 + + // zOffset of -10000 indicates that the map should not display a Z coordinate. + if (zOffset == -10000 && correctZOffset) zOffset = 0; + + return (value - zOffset) / 100; + } + + /// + /// All-in-one helper method to convert a World Coordinate (internal to the game) to a Map Coordinate (visible to + /// players in the minimap/elsewhere). + /// + /// + /// Note that this method will swap Y and Z in the resulting Vector3 to appropriately reflect the game's display. + /// + /// A Vector3 of raw World coordinates from the game. + /// The offset to apply to the incoming X parameter, generally Lumina's Map.OffsetX. + /// The offset to apply to the incoming Y parameter, generally Lumina's Map.OffsetY. + /// The offset to apply to the incoming Z parameter, generally Lumina's TerritoryTypeTransient.OffsetZ. + /// The global scale to apply to the incoming X and Y parameters, generally Lumina's Map.SizeFactor. + /// An optional mode to "correct" a Z offset of -10000 to be a more human-friendly value. + /// Returns a Vector3 representing visible map coordinates. + public static Vector3 WorldToMap( + Vector3 worldCoordinates, + int xOffset = 0, + int yOffset = 0, + int zOffset = 0, + uint scale = 100, + bool correctZOffset = false) + { + return new Vector3( + ConvertWorldCoordXZToMapCoord(worldCoordinates.X, scale, xOffset), + ConvertWorldCoordXZToMapCoord(worldCoordinates.Z, scale, yOffset), + ConvertWorldCoordYToMapCoord(worldCoordinates.Y, zOffset, correctZOffset)); + } + + /// + /// All-in-one helper method to convert a World Coordinate (internal to the game) to a Map Coordinate (visible to + /// players in the minimap/elsewhere). + /// + /// + /// Note that this method will swap Y and Z to appropriately reflect the game's display. + /// + /// A Vector3 of raw World coordinates from the game. + /// A Lumina map to use for offset/scale information. + /// A TerritoryTypeTransient to use for Z offset information. + /// An optional mode to "correct" a Z offset of -10000 to be a more human-friendly value. + /// Returns a Vector3 representing visible map coordinates. + public static Vector3 WorldToMap( + Vector3 worldCoordinates, Map map, TerritoryTypeTransient territoryTransient, bool correctZOffset = false) + { + return WorldToMap( + worldCoordinates, + map.OffsetX, + map.OffsetY, + territoryTransient.OffsetZ, + map.SizeFactor, + correctZOffset); + } + + /// + /// All-in-one helper method to convert a World Coordinate (internal to the game) to a Map Coordinate (visible to + /// players in the minimap/elsewhere). + /// + /// A Vector2 of raw World coordinates from the game. + /// The offset to apply to the incoming X parameter, generally Lumina's Map.OffsetX. + /// The offset to apply to the incoming Y parameter, generally Lumina's Map.OffsetY. + /// The global scale to apply to the incoming X and Y parameters, generally Lumina's Map.SizeFactor. + /// Returns a Vector2 representing visible map coordinates. + public static Vector2 WorldToMap( + Vector2 worldCoordinates, + int xOffset = 0, + int yOffset = 0, + uint scale = 100) + { + return new Vector2( + ConvertWorldCoordXZToMapCoord(worldCoordinates.X, scale, xOffset), + ConvertWorldCoordXZToMapCoord(worldCoordinates.Y, scale, yOffset)); + } + + /// + /// All-in-one helper method to convert a World Coordinate (internal to the game) to a Map Coordinate (visible to + /// players in the minimap/elsewhere). + /// + /// A Vector2 of raw World coordinates from the game. + /// A Lumina map to use for offset/scale information. + /// Returns a Vector2 representing visible map coordinates. + public static Vector2 WorldToMap(Vector2 worldCoordinates, Map map) + { + return WorldToMap(worldCoordinates, map.OffsetX, map.OffsetY, map.SizeFactor); + } +} diff --git a/Dalamud/Utility/Numerics/VectorExtensions.cs b/Dalamud/Utility/Numerics/VectorExtensions.cs new file mode 100644 index 000000000..e6cf2e408 --- /dev/null +++ b/Dalamud/Utility/Numerics/VectorExtensions.cs @@ -0,0 +1,56 @@ +using System.Diagnostics.CodeAnalysis; +using System.Numerics; + +namespace Dalamud.Utility.Numerics; + +/// +/// Extension methods for vectors. +/// +[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Redundant.")] +public static class VectorExtensions +{ + public static Vector4 WithX(this Vector4 v, float x) + { + return new Vector4(x, v.Y, v.Z, v.W); + } + + public static Vector4 WithY(this Vector4 v, float y) + { + return new Vector4(v.X, y, v.Z, v.W); + } + + public static Vector4 WithZ(this Vector4 v, float z) + { + return new Vector4(v.X, v.Y, z, v.W); + } + + public static Vector4 WithW(this Vector4 v, float w) + { + return new Vector4(v.X, v.Y, v.Z, w); + } + + public static Vector3 WithX(this Vector3 v, float x) + { + return new Vector3(x, v.Y, v.Z); + } + + public static Vector3 WithY(this Vector3 v, float y) + { + return new Vector3(v.X, y, v.Z); + } + + public static Vector3 WithZ(this Vector3 v, float z) + { + return new Vector3(v.X, v.Y, z); + } + + public static Vector2 WithX(this Vector2 v, float x) + { + return new Vector2(x, v.Y); + } + + public static Vector2 WithY(this Vector2 v, float y) + { + return new Vector2(v.X, y); + } +} diff --git a/Dalamud/Utility/StringExtensions.cs b/Dalamud/Utility/StringExtensions.cs index 3aa9f70bd..1cd72c674 100644 --- a/Dalamud/Utility/StringExtensions.cs +++ b/Dalamud/Utility/StringExtensions.cs @@ -1,3 +1,5 @@ +using System.Diagnostics.CodeAnalysis; + namespace Dalamud.Utility { /// @@ -18,13 +20,13 @@ namespace Dalamud.Utility /// /// The string to test. /// true if the value parameter is null or an empty string (""); otherwise, false. - public static bool IsNullOrEmpty(this string? value) => string.IsNullOrEmpty(value); + public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value) => string.IsNullOrEmpty(value); /// /// Indicates whether a specified string is null, empty, or consists only of white-space characters. /// /// The string to test. /// true if the value parameter is null or an empty string (""), or if value consists exclusively of white-space characters. - public static bool IsNullOrWhitespace(this string? value) => string.IsNullOrWhiteSpace(value); + public static bool IsNullOrWhitespace([NotNullWhen(false)] this string? value) => string.IsNullOrWhiteSpace(value); } } diff --git a/Dalamud/Utility/ThreadSafety.cs b/Dalamud/Utility/ThreadSafety.cs new file mode 100644 index 000000000..b7cdebb40 --- /dev/null +++ b/Dalamud/Utility/ThreadSafety.cs @@ -0,0 +1,49 @@ +using System; + +namespace Dalamud.Utility; + +/// +/// Helpers for working with thread safety. +/// +public static class ThreadSafety +{ + [ThreadStatic] + private static bool isMainThread; + + /// + /// Gets a value indicating whether the current thread is the main thread. + /// + public static bool IsMainThread => isMainThread; + + /// + /// Throws an exception when the current thread is not the main thread. + /// + /// Thrown when the current thread is not the main thread. + public static void AssertMainThread() + { + if (!isMainThread) + { + throw new InvalidOperationException("Not on main thread!"); + } + } + + /// + /// Throws an exception when the current thread is the main thread. + /// + /// Thrown when the current thread is the main thread. + public static void AssertNotMainThread() + { + if (isMainThread) + { + throw new InvalidOperationException("On main thread!"); + } + } + + /// + /// Marks a thread as the main thread. + /// + internal static void MarkMainThread() + { + isMainThread = true; + } +} diff --git a/Dalamud/Utility/Timing/TimingEvent.cs b/Dalamud/Utility/Timing/TimingEvent.cs new file mode 100644 index 000000000..8067c8a68 --- /dev/null +++ b/Dalamud/Utility/Timing/TimingEvent.cs @@ -0,0 +1,35 @@ +namespace Dalamud.Utility.Timing; + +public class TimingEvent +{ + internal TimingEvent(string name) + { + this.Name = name; + this.StartTime = Timings.Stopwatch.Elapsed.TotalMilliseconds; + } + + /// + /// Gets the time this timing started. + /// + public double StartTime { get; private set; } + + /// + /// Gets the name of the timing. + /// + public string Name { get; init; } + + /// + /// Gets the member that created this timing. + /// + public string? MemberName { get; init; } + + /// + /// Gets the file name that created this timing. + /// + public string? FileName { get; init; } + + /// + /// Gets the line number that created this timing. + /// + public int LineNumber { get; init; } +} diff --git a/Dalamud/Utility/Timing/TimingHandle.cs b/Dalamud/Utility/Timing/TimingHandle.cs new file mode 100644 index 000000000..a0b55b30f --- /dev/null +++ b/Dalamud/Utility/Timing/TimingHandle.cs @@ -0,0 +1,93 @@ +using System; +using System.Diagnostics; +using System.Linq; + +namespace Dalamud.Utility.Timing; + +/// +/// Class used for tracking a time interval taken. +/// +[DebuggerDisplay("{Name} - {Duration}")] +public sealed class TimingHandle : TimingEvent, IDisposable +{ + /// + /// Initializes a new instance of the class. + /// + /// The name of this timing. + internal TimingHandle(string name) : base(name) + { + this.Parent = Timings.Current.Value; + Timings.Current.Value = this; + + lock (Timings.AllTimings) + { + if (this.Parent != null) + { + this.ChildCount++; + } + + this.EndTime = this.StartTime; + this.IsMainThread = ThreadSafety.IsMainThread; + + if (Timings.ActiveTimings.Count > 0) + { + this.Depth = Timings.ActiveTimings.Max(x => x.Depth) + 1; + } + + Timings.ActiveTimings.Add(this); + } + } + + /// + /// Gets the time this timing ended. + /// + public double EndTime { get; private set; } + + /// + /// Gets the duration of this timing. + /// + public double Duration => Math.Floor(this.EndTime - this.StartTime); + + /// + /// Gets the parent timing. + /// + public TimingHandle? Parent { get; private set; } + + /// + /// Gets a value indicating whether or not this timing has already returned to its parent. + /// + public bool Returned { get; private set; } + + /// + /// Gets a value indicating whether or not this timing was started on the main thread. + /// + public bool IsMainThread { get; private set; } + + /// + /// Gets the number of child timings. + /// + public uint ChildCount { get; private set; } + + /// + /// Gets the depth of this timing. + /// + public uint Depth { get; private set; } + + /// + public void Dispose() + { + this.EndTime = Timings.Stopwatch.Elapsed.TotalMilliseconds; + Timings.Current.Value = this.Parent; + + lock (Timings.AllTimings) + { + if (this.Duration > 1 || this.ChildCount > 0) + { + Timings.AllTimings.Add(this); + this.Returned = this.Parent != null && Timings.ActiveTimings.Contains(this.Parent); + } + + Timings.ActiveTimings.Remove(this); + } + } +} diff --git a/Dalamud/Utility/Timing/Timings.cs b/Dalamud/Utility/Timing/Timings.cs new file mode 100644 index 000000000..c644156f5 --- /dev/null +++ b/Dalamud/Utility/Timing/Timings.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Threading; + +namespace Dalamud.Utility.Timing; + +/// +/// Class for measuring time taken in various subsystems. +/// +public static class Timings +{ + /// + /// Stopwatch used for timing. + /// + internal static readonly Stopwatch Stopwatch = Stopwatch.StartNew(); + + /// + /// All concluded timings. + /// + internal static readonly List AllTimings = new(); + + /// + /// All active timings. + /// + internal static readonly List ActiveTimings = new(); + + internal static readonly List Events = new(); + + /// + /// Current active timing entry. + /// + internal static readonly AsyncLocal Current = new(); + + /// + /// Start a new timing. + /// + /// The name of the timing. + /// Name of the calling member. + /// Name of the calling file. + /// Name of the calling line number. + /// Disposable that stops the timing once disposed. + public static IDisposable Start(string name, [CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) + { + return new TimingHandle(name) + { + MemberName = memberName, + FileName = sourceFilePath, + LineNumber = sourceLineNumber, + }; + } + + /// + /// Record a one-time event. + /// + /// The name of the timing. + /// Name of the calling member. + /// Name of the calling file. + /// Name of the calling line number. + /// Disposable that stops the timing once disposed. + public static void Event(string name, [CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", + [CallerLineNumber] int sourceLineNumber = 0) + { + lock (Events) + { + Events.Add(new TimingEvent(name) + { + MemberName = memberName, + FileName = sourceFilePath, + LineNumber = sourceLineNumber, + }); + } + } +} diff --git a/Dalamud/licenses.txt b/Dalamud/licenses.txt new file mode 100644 index 000000000..7bfd358c3 --- /dev/null +++ b/Dalamud/licenses.txt @@ -0,0 +1,407 @@ +============== SRELL ============== + +/***************************************************************************** +** +** SRELL (std::regex-like library) version 3.009 +** +** Copyright (c) 2012-2022, Nozomu Katoo. All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS +** IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +** THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +****************************************************************************** +**/ + + +============== MINHOOK ============== + +MinHook - The Minimalistic API Hooking Library for x64/x86 +Copyright (C) 2009-2017 Tsuda Kageyu. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +================================================================================ +Portions of this software are Copyright (c) 2008-2009, Vyacheslav Patkov. +================================================================================ +Hacker Disassembler Engine 32 C +Copyright (c) 2008-2009, Vyacheslav Patkov. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------- +Hacker Disassembler Engine 64 C +Copyright (c) 2008-2009, Vyacheslav Patkov. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +============== NLOHMANN/JSON ============== + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 3.10.5 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Licensed under the MIT License . +SPDX-License-Identifier: MIT +Copyright (c) 2013-2022 Niels Lohmann . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +============== NMD ============== + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + + +============== FFXIVCLIENTSTRUCTS ============== + +MIT License + +Copyright (c) 2021 aers + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +============== DOTNETCOREPLUGINS ============== + +https://github.com/natemcmaster/DotNetCorePlugins + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/lib/CoreCLR/CoreCLR.cpp b/lib/CoreCLR/CoreCLR.cpp index 53288f94f..e4a62eeba 100644 --- a/lib/CoreCLR/CoreCLR.cpp +++ b/lib/CoreCLR/CoreCLR.cpp @@ -5,6 +5,7 @@ #include #include #include "nethost/nethost.h" +#include "..\..\Dalamud.Boot\logging.h" CoreCLR::CoreCLR(void* calling_module) : m_calling_module(calling_module) @@ -82,7 +83,7 @@ int CoreCLR::load_runtime(const std::wstring& runtime_config_path, const struct // Success_HostAlreadyInitialized if (result == 1) { - printf("Success_HostAlreadyInitialized (0x1) "); + logging::I("Success_HostAlreadyInitialized (0x1)"); result = 0; } diff --git a/lib/CoreCLR/boot.cpp b/lib/CoreCLR/boot.cpp index acdba1909..c16ee3984 100644 --- a/lib/CoreCLR/boot.cpp +++ b/lib/CoreCLR/boot.cpp @@ -5,6 +5,7 @@ #include #include #include "CoreCLR.h" +#include "..\..\Dalamud.Boot\logging.h" FILE* g_CmdStream; void ConsoleSetup(const std::wstring console_name) @@ -16,6 +17,7 @@ void ConsoleSetup(const std::wstring console_name) freopen_s(&g_CmdStream, "CONOUT$", "w", stdout); freopen_s(&g_CmdStream, "CONOUT$", "w", stderr); freopen_s(&g_CmdStream, "CONIN$", "r", stdin); + SetConsoleOutputCP(CP_UTF8); } void ConsoleTeardown() @@ -27,6 +29,7 @@ std::optional g_clr; int InitializeClrAndGetEntryPoint( void* calling_module, + bool enable_etw, std::wstring runtimeconfig_path, std::wstring module_path, std::wstring entrypoint_assembly_name, @@ -42,6 +45,13 @@ int InitializeClrAndGetEntryPoint( SetEnvironmentVariable(L"DOTNET_legacyCorruptedStateExceptionsPolicy", L"1"); SetEnvironmentVariable(L"COMPLUS_ForceENC", L"1"); + // Enable Dynamic PGO + SetEnvironmentVariable(L"DOTNET_TieredPGO", L"1"); + SetEnvironmentVariable(L"DOTNET_TC_QuickJitForLoops", L"1"); + SetEnvironmentVariable(L"DOTNET_ReadyToRun", L"1"); + + SetEnvironmentVariable(L"COMPlus_ETWEnabled", enable_etw ? L"1" : L"0"); + wchar_t* dotnet_path; wchar_t* _appdata; @@ -61,7 +71,7 @@ int InitializeClrAndGetEntryPoint( if (result != 0) { - printf("Error: Unable to get RoamingAppData path (err=%d)\n", result); + logging::E("Unable to get RoamingAppData path (err={})", result); return result; } @@ -71,13 +81,13 @@ int InitializeClrAndGetEntryPoint( // =========================================================================== // - wprintf(L"with dotnet_path: %s\n", dotnet_path); - wprintf(L"with config_path: %s\n", runtimeconfig_path.c_str()); - wprintf(L"with module_path: %s\n", module_path.c_str()); + logging::I("with dotnet_path: {}", dotnet_path); + logging::I("with config_path: {}", runtimeconfig_path); + logging::I("with module_path: {}", module_path); if (!std::filesystem::exists(dotnet_path)) { - printf("Error: Unable to find .NET runtime path\n"); + logging::E("Error: Unable to find .NET runtime path"); return 1; } @@ -88,13 +98,13 @@ int InitializeClrAndGetEntryPoint( dotnet_path, }; - printf("Loading hostfxr... "); + logging::I("Loading hostfxr..."); if ((result = g_clr->load_hostfxr(&init_parameters)) != 0) { - printf("\nError: Failed to load the `hostfxr` library (err=0x%08x)\n", result); + logging::E("Failed to load the `hostfxr` library (err=0x{:08x})", result); return result; } - printf("Done!\n"); + logging::I("Done!"); // =========================================================================== // @@ -105,17 +115,17 @@ int InitializeClrAndGetEntryPoint( dotnet_path, }; - printf("Loading coreclr... ");; + logging::I("Loading coreclr... "); if ((result = g_clr->load_runtime(runtimeconfig_path, &runtime_parameters)) != 0) { - printf("\nError: Failed to load coreclr (err=%d)\n", result); + logging::E("Failed to load coreclr (err=0x{:08X})", static_cast(result)); return result; } - printf("Done!\n"); + logging::I("Done!"); // =========================================================================== // - printf("Loading module... "); + logging::I("Loading module..."); if ((result = g_clr->load_assembly_and_get_function_pointer( module_path.c_str(), entrypoint_assembly_name.c_str(), @@ -123,10 +133,10 @@ int InitializeClrAndGetEntryPoint( entrypoint_delegate_type_name.c_str(), nullptr, entrypoint_fn)) != 0) { - printf("\nError: Failed to load module (err=%d)\n", result); + logging::E("Failed to load module (err={})", result); return result; } - printf("Done!\n"); + logging::I("Done!"); // =========================================================================== // diff --git a/lib/CoreCLR/boot.h b/lib/CoreCLR/boot.h index f306563ad..f75077edd 100644 --- a/lib/CoreCLR/boot.h +++ b/lib/CoreCLR/boot.h @@ -3,6 +3,7 @@ void ConsoleTeardown(); int InitializeClrAndGetEntryPoint( void* calling_module, + bool enable_etw, std::wstring runtimeconfig_path, std::wstring module_path, std::wstring entrypoint_assembly_name, diff --git a/lib/FFXIVClientStructs b/lib/FFXIVClientStructs index a2972adbd..a0244fc29 160000 --- a/lib/FFXIVClientStructs +++ b/lib/FFXIVClientStructs @@ -1 +1 @@ -Subproject commit a2972adbd333d0ad9c127fff1cfc288d1cecf6b4 +Subproject commit a0244fc290eb64fccfac2fd36704f7371f5c5c7f diff --git a/lib/Nomade040-nmd b/lib/Nomade040-nmd new file mode 160000 index 000000000..33ac3b62c --- /dev/null +++ b/lib/Nomade040-nmd @@ -0,0 +1 @@ +Subproject commit 33ac3b62c7d1eb28ae6b71d4dd78aa133ef96488 diff --git a/lib/TsudaKageyu-minhook b/lib/TsudaKageyu-minhook new file mode 160000 index 000000000..4a455528f --- /dev/null +++ b/lib/TsudaKageyu-minhook @@ -0,0 +1 @@ +Subproject commit 4a455528f61b5a375b1f9d44e7d296d47f18bb18 diff --git a/lib/nlohmann-json/json.hpp b/lib/nlohmann-json/json.hpp new file mode 100644 index 000000000..cb27e0581 --- /dev/null +++ b/lib/nlohmann-json/json.hpp @@ -0,0 +1,22091 @@ +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 3.10.5 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Licensed under the MIT License . +SPDX-License-Identifier: MIT +Copyright (c) 2013-2022 Niels Lohmann . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +/****************************************************************************\ + * Note on documentation: The source files contain links to the online * + * documentation of the public API at https://json.nlohmann.me. This URL * + * contains the most recent documentation and should also be applicable to * + * previous versions; documentation for deprecated functions is not * + * removed, but marked deprecated. See "Generate documentation" section in * + * file doc/README.md. * +\****************************************************************************/ + +#ifndef INCLUDE_NLOHMANN_JSON_HPP_ +#define INCLUDE_NLOHMANN_JSON_HPP_ + +#define NLOHMANN_JSON_VERSION_MAJOR 3 +#define NLOHMANN_JSON_VERSION_MINOR 10 +#define NLOHMANN_JSON_VERSION_PATCH 5 + +#include // all_of, find, for_each +#include // nullptr_t, ptrdiff_t, size_t +#include // hash, less +#include // initializer_list +#ifndef JSON_NO_IO + #include // istream, ostream +#endif // JSON_NO_IO +#include // random_access_iterator_tag +#include // unique_ptr +#include // accumulate +#include // string, stoi, to_string +#include // declval, forward, move, pair, swap +#include // vector + +// #include + + +#include +#include + +// #include + + +#include // transform +#include // array +#include // forward_list +#include // inserter, front_inserter, end +#include // map +#include // string +#include // tuple, make_tuple +#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include // unordered_map +#include // pair, declval +#include // valarray + +// #include + + +#include // exception +#include // runtime_error +#include // to_string +#include // vector + +// #include + + +#include // array +#include // size_t +#include // uint8_t +#include // string + +namespace nlohmann +{ +namespace detail +{ +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : std::uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + binary, ///< binary array (ordered collection of bytes) + discarded ///< discarded by the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string < binary +- furthermore, each type is not smaller than itself +- discarded values are not comparable +- binary is represented as a b"" string in python and directly comparable to a + string; however, making a binary array directly comparable with a string would + be surprising behavior in a JSON file. + +@since version 1.0.0 +*/ +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + static constexpr std::array order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */, + 6 /* binary */ + } + }; + + const auto l_index = static_cast(lhs); + const auto r_index = static_cast(rhs); + return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; +} +} // namespace detail +} // namespace nlohmann + +// #include + + +#include +// #include + + +#include // declval, pair +// #include + + +/* Hedley - https://nemequ.github.io/hedley + * Created by Evan Nemerson + * + * To the extent possible under law, the author(s) have dedicated all + * copyright and related and neighboring rights to this software to + * the public domain worldwide. This software is distributed without + * any warranty. + * + * For details, see . + * SPDX-License-Identifier: CC0-1.0 + */ + +#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15) +#if defined(JSON_HEDLEY_VERSION) + #undef JSON_HEDLEY_VERSION +#endif +#define JSON_HEDLEY_VERSION 15 + +#if defined(JSON_HEDLEY_STRINGIFY_EX) + #undef JSON_HEDLEY_STRINGIFY_EX +#endif +#define JSON_HEDLEY_STRINGIFY_EX(x) #x + +#if defined(JSON_HEDLEY_STRINGIFY) + #undef JSON_HEDLEY_STRINGIFY +#endif +#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) + +#if defined(JSON_HEDLEY_CONCAT_EX) + #undef JSON_HEDLEY_CONCAT_EX +#endif +#define JSON_HEDLEY_CONCAT_EX(a,b) a##b + +#if defined(JSON_HEDLEY_CONCAT) + #undef JSON_HEDLEY_CONCAT +#endif +#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b) + +#if defined(JSON_HEDLEY_CONCAT3_EX) + #undef JSON_HEDLEY_CONCAT3_EX +#endif +#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c + +#if defined(JSON_HEDLEY_CONCAT3) + #undef JSON_HEDLEY_CONCAT3 +#endif +#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c) + +#if defined(JSON_HEDLEY_VERSION_ENCODE) + #undef JSON_HEDLEY_VERSION_ENCODE +#endif +#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) + #undef JSON_HEDLEY_VERSION_DECODE_MAJOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) + #undef JSON_HEDLEY_VERSION_DECODE_MINOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) + #undef JSON_HEDLEY_VERSION_DECODE_REVISION +#endif +#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) + +#if defined(JSON_HEDLEY_GNUC_VERSION) + #undef JSON_HEDLEY_GNUC_VERSION +#endif +#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#elif defined(__GNUC__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) +#endif + +#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) + #undef JSON_HEDLEY_GNUC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GNUC_VERSION) + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION) + #undef JSON_HEDLEY_MSVC_VERSION +#endif +#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) +#elif defined(_MSC_FULL_VER) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) +#elif defined(_MSC_VER) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) + #undef JSON_HEDLEY_MSVC_VERSION_CHECK +#endif +#if !defined(JSON_HEDLEY_MSVC_VERSION) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) +#elif defined(_MSC_VER) && (_MSC_VER >= 1400) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) +#elif defined(_MSC_VER) && (_MSC_VER >= 1200) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) +#else + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor))) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION) + #undef JSON_HEDLEY_INTEL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) +#elif defined(__INTEL_COMPILER) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_VERSION) + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #undef JSON_HEDLEY_INTEL_CL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL) + #define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION) + #undef JSON_HEDLEY_PGI_VERSION +#endif +#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) + #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) + #undef JSON_HEDLEY_PGI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PGI_VERSION) + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #undef JSON_HEDLEY_SUNPRO_VERSION +#endif +#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10) +#elif defined(__SUNPRO_C) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) +#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10) +#elif defined(__SUNPRO_CC) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) + #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION +#endif +#if defined(__EMSCRIPTEN__) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION) + #undef JSON_HEDLEY_ARM_VERSION +#endif +#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100) +#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) + #undef JSON_HEDLEY_ARM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_ARM_VERSION) + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION) + #undef JSON_HEDLEY_IBM_VERSION +#endif +#if defined(__ibmxl__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) +#elif defined(__xlC__) && defined(__xlC_ver__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) +#elif defined(__xlC__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) + #undef JSON_HEDLEY_IBM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IBM_VERSION) + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_VERSION) + #undef JSON_HEDLEY_TI_VERSION +#endif +#if \ + defined(__TI_COMPILER_VERSION__) && \ + ( \ + defined(__TMS470__) || defined(__TI_ARM__) || \ + defined(__MSP430__) || \ + defined(__TMS320C2000__) \ + ) +#if (__TI_COMPILER_VERSION__ >= 16000000) + #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif +#endif + +#if defined(JSON_HEDLEY_TI_VERSION_CHECK) + #undef JSON_HEDLEY_TI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_VERSION) + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #undef JSON_HEDLEY_TI_CL2000_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__) + #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #undef JSON_HEDLEY_TI_CL430_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__) + #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #undef JSON_HEDLEY_TI_ARMCL_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__)) + #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK) + #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #undef JSON_HEDLEY_TI_CL6X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__) + #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #undef JSON_HEDLEY_TI_CL7X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__) + #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #undef JSON_HEDLEY_TI_CLPRU_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__) + #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION) + #undef JSON_HEDLEY_CRAY_VERSION +#endif +#if defined(_CRAYC) + #if defined(_RELEASE_PATCHLEVEL) + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) + #else + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) + #undef JSON_HEDLEY_CRAY_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_CRAY_VERSION) + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION) + #undef JSON_HEDLEY_IAR_VERSION +#endif +#if defined(__IAR_SYSTEMS_ICC__) + #if __VER__ > 1000 + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) + #else + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100, __VER__ % 100, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) + #undef JSON_HEDLEY_IAR_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IAR_VERSION) + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION) + #undef JSON_HEDLEY_TINYC_VERSION +#endif +#if defined(__TINYC__) + #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) + #undef JSON_HEDLEY_TINYC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION) + #undef JSON_HEDLEY_DMC_VERSION +#endif +#if defined(__DMC__) + #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) + #undef JSON_HEDLEY_DMC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_DMC_VERSION) + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #undef JSON_HEDLEY_COMPCERT_VERSION +#endif +#if defined(__COMPCERT_VERSION__) + #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) + #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION) + #undef JSON_HEDLEY_PELLES_VERSION +#endif +#if defined(__POCC__) + #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) + #undef JSON_HEDLEY_PELLES_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PELLES_VERSION) + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #undef JSON_HEDLEY_MCST_LCC_VERSION +#endif +#if defined(__LCC__) && defined(__LCC_MINOR__) + #define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK) + #undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION) + #undef JSON_HEDLEY_GCC_VERSION +#endif +#if \ + defined(JSON_HEDLEY_GNUC_VERSION) && \ + !defined(__clang__) && \ + !defined(JSON_HEDLEY_INTEL_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_ARM_VERSION) && \ + !defined(JSON_HEDLEY_CRAY_VERSION) && \ + !defined(JSON_HEDLEY_TI_VERSION) && \ + !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL430_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \ + !defined(__COMPCERT__) && \ + !defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_ATTRIBUTE +#endif +#if \ + defined(__has_attribute) && \ + ( \ + (!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9)) \ + ) +# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) +#else +# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE +#endif +#if \ + defined(__has_cpp_attribute) && \ + defined(__cplusplus) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS +#endif +#if !defined(__cplusplus) || !defined(__has_cpp_attribute) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#elif \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \ + (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_BUILTIN) + #undef JSON_HEDLEY_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) +#else + #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) + #undef JSON_HEDLEY_GNUC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) + #undef JSON_HEDLEY_GCC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_FEATURE) + #undef JSON_HEDLEY_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) +#else + #define JSON_HEDLEY_HAS_FEATURE(feature) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) + #undef JSON_HEDLEY_GNUC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) + #undef JSON_HEDLEY_GCC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_EXTENSION) + #undef JSON_HEDLEY_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) +#else + #define JSON_HEDLEY_HAS_EXTENSION(extension) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) + #undef JSON_HEDLEY_GNUC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) + #undef JSON_HEDLEY_GCC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_WARNING) + #undef JSON_HEDLEY_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) +#else + #define JSON_HEDLEY_HAS_WARNING(warning) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) + #undef JSON_HEDLEY_GNUC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_WARNING) + #undef JSON_HEDLEY_GCC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + defined(__clang__) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR)) + #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_PRAGMA(value) __pragma(value) +#else + #define JSON_HEDLEY_PRAGMA(value) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) + #undef JSON_HEDLEY_DIAGNOSTIC_PUSH +#endif +#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) + #undef JSON_HEDLEY_DIAGNOSTIC_POP +#endif +#if defined(__clang__) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) + #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) +#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_PUSH + #define JSON_HEDLEY_DIAGNOSTIC_POP +#endif + +/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") +# if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions") +# if JSON_HEDLEY_HAS_WARNING("-Wc++1z-extensions") +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# endif +#endif +#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x +#endif + +#if defined(JSON_HEDLEY_CONST_CAST) + #undef JSON_HEDLEY_CONST_CAST +#endif +#if defined(__cplusplus) +# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast(expr)) +#elif \ + JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_REINTERPRET_CAST) + #undef JSON_HEDLEY_REINTERPRET_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast(expr)) +#else + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_STATIC_CAST) + #undef JSON_HEDLEY_STATIC_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast(expr)) +#else + #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_CPP_CAST) + #undef JSON_HEDLEY_CPP_CAST +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast") +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \ + ((T) (expr)) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0) +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("diag_suppress=Pe137") \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr)) +# endif +#else +# define JSON_HEDLEY_CPP_CAST(T, expr) (expr) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:161)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068)) +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:1292)) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunused-function") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif + +#if defined(JSON_HEDLEY_DEPRECATED) + #undef JSON_HEDLEY_DEPRECATED +#endif +#if defined(JSON_HEDLEY_DEPRECATED_FOR) + #undef JSON_HEDLEY_DEPRECATED_FOR +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) +#elif \ + (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement))) +#elif defined(__cplusplus) && (__cplusplus >= 201402L) + #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") +#else + #define JSON_HEDLEY_DEPRECATED(since) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) +#endif + +#if defined(JSON_HEDLEY_UNAVAILABLE) + #undef JSON_HEDLEY_UNAVAILABLE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) +#else + #define JSON_HEDLEY_UNAVAILABLE(available_since) +#endif + +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT +#endif +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) +#elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) +#elif defined(_Check_return_) /* SAL */ + #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_ +#else + #define JSON_HEDLEY_WARN_UNUSED_RESULT + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) +#endif + +#if defined(JSON_HEDLEY_SENTINEL) + #undef JSON_HEDLEY_SENTINEL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) +#else + #define JSON_HEDLEY_SENTINEL(position) +#endif + +#if defined(JSON_HEDLEY_NO_RETURN) + #undef JSON_HEDLEY_NO_RETURN +#endif +#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NO_RETURN __noreturn +#elif \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L + #define JSON_HEDLEY_NO_RETURN _Noreturn +#elif defined(__cplusplus) && (__cplusplus >= 201103L) + #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#else + #define JSON_HEDLEY_NO_RETURN +#endif + +#if defined(JSON_HEDLEY_NO_ESCAPE) + #undef JSON_HEDLEY_NO_ESCAPE +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) + #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) +#else + #define JSON_HEDLEY_NO_ESCAPE +#endif + +#if defined(JSON_HEDLEY_UNREACHABLE) + #undef JSON_HEDLEY_UNREACHABLE +#endif +#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) + #undef JSON_HEDLEY_UNREACHABLE_RETURN +#endif +#if defined(JSON_HEDLEY_ASSUME) + #undef JSON_HEDLEY_ASSUME +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_ASSUME(expr) __assume(expr) +#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) + #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) +#elif \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #if defined(__cplusplus) + #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) + #else + #define JSON_HEDLEY_ASSUME(expr) _nassert(expr) + #endif +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() +#elif defined(JSON_HEDLEY_ASSUME) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif +#if !defined(JSON_HEDLEY_ASSUME) + #if defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1))) + #else + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr) + #endif +#endif +#if defined(JSON_HEDLEY_UNREACHABLE) + #if \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value)) + #else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() + #endif +#else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value) +#endif +#if !defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif + +JSON_HEDLEY_DIAGNOSTIC_PUSH +#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") + #pragma clang diagnostic ignored "-Wpedantic" +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) + #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif +#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0) + #if defined(__clang__) + #pragma clang diagnostic ignored "-Wvariadic-macros" + #elif defined(JSON_HEDLEY_GCC_VERSION) + #pragma GCC diagnostic ignored "-Wvariadic-macros" + #endif +#endif +#if defined(JSON_HEDLEY_NON_NULL) + #undef JSON_HEDLEY_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) +#else + #define JSON_HEDLEY_NON_NULL(...) +#endif +JSON_HEDLEY_DIAGNOSTIC_POP + +#if defined(JSON_HEDLEY_PRINTF_FORMAT) + #undef JSON_HEDLEY_PRINTF_FORMAT +#endif +#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check))) +#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(format) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check))) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) +#else + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) +#endif + +#if defined(JSON_HEDLEY_CONSTEXPR) + #undef JSON_HEDLEY_CONSTEXPR +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) + #endif +#endif +#if !defined(JSON_HEDLEY_CONSTEXPR) + #define JSON_HEDLEY_CONSTEXPR +#endif + +#if defined(JSON_HEDLEY_PREDICT) + #undef JSON_HEDLEY_PREDICT +#endif +#if defined(JSON_HEDLEY_LIKELY) + #undef JSON_HEDLEY_LIKELY +#endif +#if defined(JSON_HEDLEY_UNLIKELY) + #undef JSON_HEDLEY_UNLIKELY +#endif +#if defined(JSON_HEDLEY_UNPREDICTABLE) + #undef JSON_HEDLEY_UNPREDICTABLE +#endif +#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) + #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr)) +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) && !defined(JSON_HEDLEY_PGI_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1 , (probability)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0 , (probability)) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1 ) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0 ) +#elif \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PREDICT(expr, expected, probability) \ + (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ + })) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ + })) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) +#else +# define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_LIKELY(expr) (!!(expr)) +# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) +#endif +#if !defined(JSON_HEDLEY_UNPREDICTABLE) + #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) +#endif + +#if defined(JSON_HEDLEY_MALLOC) + #undef JSON_HEDLEY_MALLOC +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_MALLOC __declspec(restrict) +#else + #define JSON_HEDLEY_MALLOC +#endif + +#if defined(JSON_HEDLEY_PURE) + #undef JSON_HEDLEY_PURE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PURE __attribute__((__pure__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +# define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \ + ) +# define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") +#else +# define JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_CONST) + #undef JSON_HEDLEY_CONST +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(const) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_CONST __attribute__((__const__)) +#elif \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_CONST _Pragma("no_side_effect") +#else + #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_RESTRICT) + #undef JSON_HEDLEY_RESTRICT +#endif +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT restrict +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + defined(__clang__) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_RESTRICT __restrict +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT _Restrict +#else + #define JSON_HEDLEY_RESTRICT +#endif + +#if defined(JSON_HEDLEY_INLINE) + #undef JSON_HEDLEY_INLINE +#endif +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + (defined(__cplusplus) && (__cplusplus >= 199711L)) + #define JSON_HEDLEY_INLINE inline +#elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0) + #define JSON_HEDLEY_INLINE __inline__ +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_INLINE __inline +#else + #define JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_ALWAYS_INLINE) + #undef JSON_HEDLEY_ALWAYS_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) +# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_ALWAYS_INLINE __forceinline +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \ + ) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") +#else +# define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_NEVER_INLINE) + #undef JSON_HEDLEY_NEVER_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#else + #define JSON_HEDLEY_NEVER_INLINE +#endif + +#if defined(JSON_HEDLEY_PRIVATE) + #undef JSON_HEDLEY_PRIVATE +#endif +#if defined(JSON_HEDLEY_PUBLIC) + #undef JSON_HEDLEY_PUBLIC +#endif +#if defined(JSON_HEDLEY_IMPORT) + #undef JSON_HEDLEY_IMPORT +#endif +#if defined(_WIN32) || defined(__CYGWIN__) +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC __declspec(dllexport) +# define JSON_HEDLEY_IMPORT __declspec(dllimport) +#else +# if \ + JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + ( \ + defined(__TI_EABI__) && \ + ( \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \ + ) \ + ) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) +# define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) +# else +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC +# endif +# define JSON_HEDLEY_IMPORT extern +#endif + +#if defined(JSON_HEDLEY_NO_THROW) + #undef JSON_HEDLEY_NO_THROW +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NO_THROW __declspec(nothrow) +#else + #define JSON_HEDLEY_NO_THROW +#endif + +#if defined(JSON_HEDLEY_FALL_THROUGH) + #undef JSON_HEDLEY_FALL_THROUGH +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) +#elif defined(__fallthrough) /* SAL */ + #define JSON_HEDLEY_FALL_THROUGH __fallthrough +#else + #define JSON_HEDLEY_FALL_THROUGH +#endif + +#if defined(JSON_HEDLEY_RETURNS_NON_NULL) + #undef JSON_HEDLEY_RETURNS_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) +#elif defined(_Ret_notnull_) /* SAL */ + #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ +#else + #define JSON_HEDLEY_RETURNS_NON_NULL +#endif + +#if defined(JSON_HEDLEY_ARRAY_PARAM) + #undef JSON_HEDLEY_ARRAY_PARAM +#endif +#if \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ + !defined(__STDC_NO_VLA__) && \ + !defined(__cplusplus) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_ARRAY_PARAM(name) (name) +#else + #define JSON_HEDLEY_ARRAY_PARAM(name) +#endif + +#if defined(JSON_HEDLEY_IS_CONSTANT) + #undef JSON_HEDLEY_IS_CONSTANT +#endif +#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) + #undef JSON_HEDLEY_REQUIRE_CONSTEXPR +#endif +/* JSON_HEDLEY_IS_CONSTEXPR_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #undef JSON_HEDLEY_IS_CONSTEXPR_ +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) +#endif +#if !defined(__cplusplus) +# if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*) +#endif +# elif \ + ( \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ + !defined(JSON_HEDLEY_SUNPRO_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION)) || \ + (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0) +#endif +# elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + defined(JSON_HEDLEY_INTEL_VERSION) || \ + defined(JSON_HEDLEY_TINYC_VERSION) || \ + defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \ + defined(JSON_HEDLEY_TI_CL2000_VERSION) || \ + defined(JSON_HEDLEY_TI_CL6X_VERSION) || \ + defined(JSON_HEDLEY_TI_CL7X_VERSION) || \ + defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \ + defined(__clang__) +# define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \ + sizeof(void) != \ + sizeof(*( \ + 1 ? \ + ((void*) ((expr) * 0L) ) : \ +((struct { char v[sizeof(void) * 2]; } *) 1) \ + ) \ + ) \ + ) +# endif +#endif +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) +#else + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) (0) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) +#endif + +#if defined(JSON_HEDLEY_BEGIN_C_DECLS) + #undef JSON_HEDLEY_BEGIN_C_DECLS +#endif +#if defined(JSON_HEDLEY_END_C_DECLS) + #undef JSON_HEDLEY_END_C_DECLS +#endif +#if defined(JSON_HEDLEY_C_DECL) + #undef JSON_HEDLEY_C_DECL +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { + #define JSON_HEDLEY_END_C_DECLS } + #define JSON_HEDLEY_C_DECL extern "C" +#else + #define JSON_HEDLEY_BEGIN_C_DECLS + #define JSON_HEDLEY_END_C_DECLS + #define JSON_HEDLEY_C_DECL +#endif + +#if defined(JSON_HEDLEY_STATIC_ASSERT) + #undef JSON_HEDLEY_STATIC_ASSERT +#endif +#if \ + !defined(__cplusplus) && ( \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ + (JSON_HEDLEY_HAS_FEATURE(c_static_assert) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + defined(_Static_assert) \ + ) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) +#elif \ + (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) +#else +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) +#endif + +#if defined(JSON_HEDLEY_NULL) + #undef JSON_HEDLEY_NULL +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) + #elif defined(NULL) + #define JSON_HEDLEY_NULL NULL + #else + #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) + #endif +#elif defined(NULL) + #define JSON_HEDLEY_NULL NULL +#else + #define JSON_HEDLEY_NULL ((void*) 0) +#endif + +#if defined(JSON_HEDLEY_MESSAGE) + #undef JSON_HEDLEY_MESSAGE +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_MESSAGE(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(message msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) +#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_WARNING) + #undef JSON_HEDLEY_WARNING +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_WARNING(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(clang warning msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_REQUIRE) + #undef JSON_HEDLEY_REQUIRE +#endif +#if defined(JSON_HEDLEY_REQUIRE_MSG) + #undef JSON_HEDLEY_REQUIRE_MSG +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) +# if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") +# define JSON_HEDLEY_REQUIRE(expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), #expr, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), msg, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error"))) +# endif +#else +# define JSON_HEDLEY_REQUIRE(expr) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) +#endif + +#if defined(JSON_HEDLEY_FLAGS) + #undef JSON_HEDLEY_FLAGS +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) && (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion")) + #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) +#else + #define JSON_HEDLEY_FLAGS +#endif + +#if defined(JSON_HEDLEY_FLAGS_CAST) + #undef JSON_HEDLEY_FLAGS_CAST +#endif +#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0) +# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("warning(disable:188)") \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) +#endif + +#if defined(JSON_HEDLEY_EMPTY_BASES) + #undef JSON_HEDLEY_EMPTY_BASES +#endif +#if \ + (JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0)) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) +#else + #define JSON_HEDLEY_EMPTY_BASES +#endif + +/* Remaining macros are deprecated. */ + +#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK +#endif +#if defined(__clang__) + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0) +#else + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) + #undef JSON_HEDLEY_CLANG_HAS_BUILTIN +#endif +#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) + +#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) + #undef JSON_HEDLEY_CLANG_HAS_FEATURE +#endif +#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) + +#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) + #undef JSON_HEDLEY_CLANG_HAS_EXTENSION +#endif +#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) + +#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) + #undef JSON_HEDLEY_CLANG_HAS_WARNING +#endif +#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) + +#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ + +// #include + + +#include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template struct make_void +{ + using type = void; +}; +template using void_t = typename make_void::type; +} // namespace detail +} // namespace nlohmann + + +// https://en.cppreference.com/w/cpp/experimental/is_detected +namespace nlohmann +{ +namespace detail +{ +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; +}; + +template class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +template class Op, class... Args> +using is_detected = typename detector::value_t; + +template class Op, class... Args> +struct is_detected_lazy : is_detected { }; + +template class Op, class... Args> +using detected_t = typename detector::type; + +template class Op, class... Args> +using detected_or = detector; + +template class Op, class... Args> +using detected_or_t = typename detected_or::type; + +template class Op, class... Args> +using is_detected_exact = std::is_same>; + +template class Op, class... Args> +using is_detected_convertible = + std::is_convertible, To>; +} // namespace detail +} // namespace nlohmann + + +// This file contains all internal macro definitions +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// C++ language standard detection +// if the user manually specified the used c++ version this is skipped +#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) + #if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 + #endif + // the cpp 11 flag is always specified because it is the minimal required version + #define JSON_HAS_CPP_11 +#endif + +#if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM) + #ifdef JSON_HAS_CPP_17 + #if defined(__cpp_lib_filesystem) + #define JSON_HAS_FILESYSTEM 1 + #elif defined(__cpp_lib_experimental_filesystem) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif !defined(__has_include) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #endif + + // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ + #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before GCC 8: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before Clang 7: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__clang_major__) && __clang_major__ < 7 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support + #if defined(_MSC_VER) && _MSC_VER < 1940 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before iOS 13 + #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before macOS Catalina + #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + #endif +#endif + +#ifndef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_FILESYSTEM + #define JSON_HAS_FILESYSTEM 0 +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdocumentation" + #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" +#endif + +// allow disabling exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #include + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// allow overriding assert +#if !defined(JSON_ASSERT) + #include // assert + #define JSON_ASSERT(x) assert(x) +#endif + +// allow to access some private functions (needed by the test suite) +#if defined(JSON_TESTS_PRIVATE) + #define JSON_PRIVATE_UNLESS_TESTED public +#else + #define JSON_PRIVATE_UNLESS_TESTED private +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [&j](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer, \ + class BinaryType> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + +// Macros to simplify conversion from/to types + +#define NLOHMANN_JSON_EXPAND( x ) x +#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME +#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \ + NLOHMANN_JSON_PASTE64, \ + NLOHMANN_JSON_PASTE63, \ + NLOHMANN_JSON_PASTE62, \ + NLOHMANN_JSON_PASTE61, \ + NLOHMANN_JSON_PASTE60, \ + NLOHMANN_JSON_PASTE59, \ + NLOHMANN_JSON_PASTE58, \ + NLOHMANN_JSON_PASTE57, \ + NLOHMANN_JSON_PASTE56, \ + NLOHMANN_JSON_PASTE55, \ + NLOHMANN_JSON_PASTE54, \ + NLOHMANN_JSON_PASTE53, \ + NLOHMANN_JSON_PASTE52, \ + NLOHMANN_JSON_PASTE51, \ + NLOHMANN_JSON_PASTE50, \ + NLOHMANN_JSON_PASTE49, \ + NLOHMANN_JSON_PASTE48, \ + NLOHMANN_JSON_PASTE47, \ + NLOHMANN_JSON_PASTE46, \ + NLOHMANN_JSON_PASTE45, \ + NLOHMANN_JSON_PASTE44, \ + NLOHMANN_JSON_PASTE43, \ + NLOHMANN_JSON_PASTE42, \ + NLOHMANN_JSON_PASTE41, \ + NLOHMANN_JSON_PASTE40, \ + NLOHMANN_JSON_PASTE39, \ + NLOHMANN_JSON_PASTE38, \ + NLOHMANN_JSON_PASTE37, \ + NLOHMANN_JSON_PASTE36, \ + NLOHMANN_JSON_PASTE35, \ + NLOHMANN_JSON_PASTE34, \ + NLOHMANN_JSON_PASTE33, \ + NLOHMANN_JSON_PASTE32, \ + NLOHMANN_JSON_PASTE31, \ + NLOHMANN_JSON_PASTE30, \ + NLOHMANN_JSON_PASTE29, \ + NLOHMANN_JSON_PASTE28, \ + NLOHMANN_JSON_PASTE27, \ + NLOHMANN_JSON_PASTE26, \ + NLOHMANN_JSON_PASTE25, \ + NLOHMANN_JSON_PASTE24, \ + NLOHMANN_JSON_PASTE23, \ + NLOHMANN_JSON_PASTE22, \ + NLOHMANN_JSON_PASTE21, \ + NLOHMANN_JSON_PASTE20, \ + NLOHMANN_JSON_PASTE19, \ + NLOHMANN_JSON_PASTE18, \ + NLOHMANN_JSON_PASTE17, \ + NLOHMANN_JSON_PASTE16, \ + NLOHMANN_JSON_PASTE15, \ + NLOHMANN_JSON_PASTE14, \ + NLOHMANN_JSON_PASTE13, \ + NLOHMANN_JSON_PASTE12, \ + NLOHMANN_JSON_PASTE11, \ + NLOHMANN_JSON_PASTE10, \ + NLOHMANN_JSON_PASTE9, \ + NLOHMANN_JSON_PASTE8, \ + NLOHMANN_JSON_PASTE7, \ + NLOHMANN_JSON_PASTE6, \ + NLOHMANN_JSON_PASTE5, \ + NLOHMANN_JSON_PASTE4, \ + NLOHMANN_JSON_PASTE3, \ + NLOHMANN_JSON_PASTE2, \ + NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) +#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) +#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) +#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) +#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) +#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) +#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) +#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) +#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) +#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) +#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) +#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) +#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) +#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) +#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) +#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) +#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) +#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) +#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) +#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) +#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) +#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) +#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) +#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) +#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) +#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) +#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) +#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) +#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) +#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) +#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) +#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) +#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) +#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) +#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) +#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) +#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) +#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) +#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) +#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) +#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) +#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) +#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) +#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) +#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) +#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) +#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) +#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) +#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) +#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) +#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) +#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) +#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) +#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) +#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) +#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) +#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) +#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) +#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) +#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) +#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) +#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) +#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) +#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) + +#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; +#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE +@since version 3.9.0 +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ + friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE +@since version 3.9.0 +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ + inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + + +// inspired from https://stackoverflow.com/a/26745591 +// allows to call any std function as if (e.g. with begin): +// using std::begin; begin(x); +// +// it allows using the detected idiom to retrieve the return type +// of such an expression +#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name) \ + namespace detail { \ + using std::std_name; \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + } \ + \ + namespace detail2 { \ + struct std_name##_tag \ + { \ + }; \ + \ + template \ + std_name##_tag std_name(T&&...); \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + \ + template \ + struct would_call_std_##std_name \ + { \ + static constexpr auto const value = ::nlohmann::detail:: \ + is_detected_exact::value; \ + }; \ + } /* namespace detail2 */ \ + \ + template \ + struct would_call_std_##std_name : detail2::would_call_std_##std_name \ + { \ + } + +#ifndef JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_USE_IMPLICIT_CONVERSIONS 1 +#endif + +#if JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_EXPLICIT +#else + #define JSON_EXPLICIT explicit +#endif + +#ifndef JSON_DIAGNOSTICS + #define JSON_DIAGNOSTICS 0 +#endif + + +namespace nlohmann +{ +namespace detail +{ + +/*! +@brief replace all occurrences of a substring by another string + +@param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t +@param[in] f the substring to replace with @a t +@param[in] t the string to replace @a f + +@pre The search string @a f must not be empty. **This precondition is +enforced with an assertion.** + +@since version 2.0.0 +*/ +inline void replace_substring(std::string& s, const std::string& f, + const std::string& t) +{ + JSON_ASSERT(!f.empty()); + for (auto pos = s.find(f); // find first occurrence of f + pos != std::string::npos; // make sure f was found + s.replace(pos, f.size(), t), // replace with t, and + pos = s.find(f, pos + t.size())) // find next occurrence of f + {} +} + +/*! + * @brief string escaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to escape + * @return escaped string + * + * Note the order of escaping "~" to "~0" and "/" to "~1" is important. + */ +inline std::string escape(std::string s) +{ + replace_substring(s, "~", "~0"); + replace_substring(s, "/", "~1"); + return s; +} + +/*! + * @brief string unescaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to unescape + * @return unescaped string + * + * Note the order of escaping "~1" to "/" and "~0" to "~" is important. + */ +static void unescape(std::string& s) +{ + replace_substring(s, "~1", "/"); + replace_substring(s, "~0", "~"); +} + +} // namespace detail +} // namespace nlohmann + +// #include + + +#include // size_t + +namespace nlohmann +{ +namespace detail +{ +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +} // namespace nlohmann + +// #include + + +namespace nlohmann +{ +namespace detail +{ +//////////////// +// exceptions // +//////////////// + +/// @brief general exception of the @ref basic_json class +/// @sa https://json.nlohmann.me/api/basic_json/exception/ +class exception : public std::exception +{ + public: + /// returns the explanatory string + const char* what() const noexcept override + { + return m.what(); + } + + /// the id of the exception + const int id; // NOLINT(cppcoreguidelines-non-private-member-variables-in-classes) + + protected: + JSON_HEDLEY_NON_NULL(3) + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} // NOLINT(bugprone-throw-keyword-missing) + + static std::string name(const std::string& ename, int id_) + { + return "[json.exception." + ename + "." + std::to_string(id_) + "] "; + } + + template + static std::string diagnostics(const BasicJsonType& leaf_element) + { +#if JSON_DIAGNOSTICS + std::vector tokens; + for (const auto* current = &leaf_element; current->m_parent != nullptr; current = current->m_parent) + { + switch (current->m_parent->type()) + { + case value_t::array: + { + for (std::size_t i = 0; i < current->m_parent->m_value.array->size(); ++i) + { + if (¤t->m_parent->m_value.array->operator[](i) == current) + { + tokens.emplace_back(std::to_string(i)); + break; + } + } + break; + } + + case value_t::object: + { + for (const auto& element : *current->m_parent->m_value.object) + { + if (&element.second == current) + { + tokens.emplace_back(element.first.c_str()); + break; + } + } + break; + } + + case value_t::null: // LCOV_EXCL_LINE + case value_t::string: // LCOV_EXCL_LINE + case value_t::boolean: // LCOV_EXCL_LINE + case value_t::number_integer: // LCOV_EXCL_LINE + case value_t::number_unsigned: // LCOV_EXCL_LINE + case value_t::number_float: // LCOV_EXCL_LINE + case value_t::binary: // LCOV_EXCL_LINE + case value_t::discarded: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + break; // LCOV_EXCL_LINE + } + } + + if (tokens.empty()) + { + return ""; + } + + return "(" + std::accumulate(tokens.rbegin(), tokens.rend(), std::string{}, + [](const std::string & a, const std::string & b) + { + return a + "/" + detail::escape(b); + }) + ") "; +#else + static_cast(leaf_element); + return ""; +#endif + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; +}; + +/// @brief exception indicating a parse error +/// @sa https://json.nlohmann.me/api/basic_json/parse_error/ +class parse_error : public exception +{ + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] pos the position where the error occurred (or with + chars_read_total=0 if the position cannot be + determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + template + static parse_error create(int id_, const position_t& pos, const std::string& what_arg, const BasicJsonType& context) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + position_string(pos) + ": " + exception::diagnostics(context) + what_arg; + return {id_, pos.chars_read_total, w.c_str()}; + } + + template + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg, const BasicJsonType& context) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + (byte_ != 0 ? (" at byte " + std::to_string(byte_)) : "") + + ": " + exception::diagnostics(context) + what_arg; + return {id_, byte_, w.c_str()}; + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} + + static std::string position_string(const position_t& pos) + { + return " at line " + std::to_string(pos.lines_read + 1) + + ", column " + std::to_string(pos.chars_read_current_line); + } +}; + +/// @brief exception indicating errors with iterators +/// @sa https://json.nlohmann.me/api/basic_json/invalid_iterator/ +class invalid_iterator : public exception +{ + public: + template + static invalid_iterator create(int id_, const std::string& what_arg, const BasicJsonType& context) + { + std::string w = exception::name("invalid_iterator", id_) + exception::diagnostics(context) + what_arg; + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} +}; + +/// @brief exception indicating executing a member function with a wrong type +/// @sa https://json.nlohmann.me/api/basic_json/type_error/ +class type_error : public exception +{ + public: + template + static type_error create(int id_, const std::string& what_arg, const BasicJsonType& context) + { + std::string w = exception::name("type_error", id_) + exception::diagnostics(context) + what_arg; + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/// @brief exception indicating access out of the defined range +/// @sa https://json.nlohmann.me/api/basic_json/out_of_range/ +class out_of_range : public exception +{ + public: + template + static out_of_range create(int id_, const std::string& what_arg, const BasicJsonType& context) + { + std::string w = exception::name("out_of_range", id_) + exception::diagnostics(context) + what_arg; + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/// @brief exception indicating other library errors +/// @sa https://json.nlohmann.me/api/basic_json/other_error/ +class other_error : public exception +{ + public: + template + static other_error create(int id_, const std::string& what_arg, const BasicJsonType& context) + { + std::string w = exception::name("other_error", id_) + exception::diagnostics(context) + what_arg; + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + + +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type +#include // index_sequence, make_index_sequence, index_sequence_for + +// #include + + +namespace nlohmann +{ +namespace detail +{ + +template +using uncvref_t = typename std::remove_cv::type>::type; + +#ifdef JSON_HAS_CPP_14 + +// the following utilities are natively available in C++14 +using std::enable_if_t; +using std::index_sequence; +using std::make_index_sequence; +using std::index_sequence_for; + +#else + +// alias templates to reduce boilerplate +template +using enable_if_t = typename std::enable_if::type; + +// The following code is taken from https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h +// which is part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0. + +//// START OF CODE FROM GOOGLE ABSEIL + +// integer_sequence +// +// Class template representing a compile-time integer sequence. An instantiation +// of `integer_sequence` has a sequence of integers encoded in its +// type through its template arguments (which is a common need when +// working with C++11 variadic templates). `absl::integer_sequence` is designed +// to be a drop-in replacement for C++14's `std::integer_sequence`. +// +// Example: +// +// template< class T, T... Ints > +// void user_function(integer_sequence); +// +// int main() +// { +// // user_function's `T` will be deduced to `int` and `Ints...` +// // will be deduced to `0, 1, 2, 3, 4`. +// user_function(make_integer_sequence()); +// } +template +struct integer_sequence +{ + using value_type = T; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +// index_sequence +// +// A helper template for an `integer_sequence` of `size_t`, +// `absl::index_sequence` is designed to be a drop-in replacement for C++14's +// `std::index_sequence`. +template +using index_sequence = integer_sequence; + +namespace utility_internal +{ + +template +struct Extend; + +// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency. +template +struct Extend, SeqSize, 0> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)... >; +}; + +template +struct Extend, SeqSize, 1> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)..., 2 * SeqSize >; +}; + +// Recursion helper for 'make_integer_sequence'. +// 'Gen::type' is an alias for 'integer_sequence'. +template +struct Gen +{ + using type = + typename Extend < typename Gen < T, N / 2 >::type, N / 2, N % 2 >::type; +}; + +template +struct Gen +{ + using type = integer_sequence; +}; + +} // namespace utility_internal + +// Compile-time sequences of integers + +// make_integer_sequence +// +// This template alias is equivalent to +// `integer_sequence`, and is designed to be a drop-in +// replacement for C++14's `std::make_integer_sequence`. +template +using make_integer_sequence = typename utility_internal::Gen::type; + +// make_index_sequence +// +// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`, +// and is designed to be a drop-in replacement for C++14's +// `std::make_index_sequence`. +template +using make_index_sequence = make_integer_sequence; + +// index_sequence_for +// +// Converts a typename pack into an index sequence of the same length, and +// is designed to be a drop-in replacement for C++14's +// `std::index_sequence_for()` +template +using index_sequence_for = make_index_sequence; + +//// END OF CODE FROM GOOGLE ABSEIL + +#endif + +// dispatch utility (taken from ranges-v3) +template struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template +struct static_const +{ + static constexpr T value{}; +}; + +template +constexpr T static_const::value; // NOLINT(readability-redundant-declaration) + +} // namespace detail +} // namespace nlohmann + +// #include + + +namespace nlohmann +{ +namespace detail +{ +// dispatching helper struct +template struct identity_tag {}; +} // namespace detail +} // namespace nlohmann + +// #include + + +#include // numeric_limits +#include // false_type, is_constructible, is_integral, is_same, true_type +#include // declval +#include // tuple + +// #include + + +// #include + + +#include // random_access_iterator_tag + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template +struct iterator_types {}; + +template +struct iterator_types < + It, + void_t> +{ + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; +}; + +// This is required as some compilers implement std::iterator_traits in a way that +// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. +template +struct iterator_traits +{ +}; + +template +struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> + : iterator_types +{ +}; + +template +struct iterator_traits::value>> +{ + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; +}; +} // namespace detail +} // namespace nlohmann + +// #include + + +// #include + + +namespace nlohmann +{ +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); +} // namespace nlohmann + +// #include + + +// #include + + +namespace nlohmann +{ +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); +} // namespace nlohmann + +// #include + +// #include + +// #include +#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ +#define INCLUDE_NLOHMANN_JSON_FWD_HPP_ + +#include // int64_t, uint64_t +#include // map +#include // allocator +#include // string +#include // vector + +/*! +@brief namespace for Niels Lohmann +@see https://github.com/nlohmann +@since version 1.0.0 +*/ +namespace nlohmann +{ +/*! +@brief default JSONSerializer template argument + +This serializer ignores the template arguments and uses ADL +([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) +for serialization. +*/ +template +struct adl_serializer; + +/// a class to store JSON values +/// @sa https://json.nlohmann.me/api/basic_json/ +template class ObjectType = + std::map, + template class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template class AllocatorType = std::allocator, + template class JSONSerializer = + adl_serializer, + class BinaryType = std::vector> +class basic_json; + +/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document +/// @sa https://json.nlohmann.me/api/json_pointer/ +template +class json_pointer; + +/*! +@brief default specialization +@sa https://json.nlohmann.me/api/json/ +*/ +using json = basic_json<>; + +/// @brief a minimal map-like container that preserves insertion order +/// @sa https://json.nlohmann.me/api/ordered_map/ +template +struct ordered_map; + +/// @brief specialization that maintains the insertion order of object keys +/// @sa https://json.nlohmann.me/api/ordered_json/ +using ordered_json = basic_json; + +} // namespace nlohmann + +#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + +namespace nlohmann +{ +/*! +@brief detail namespace with internal helper functions + +This namespace collects functions that should not be exposed, +implementations of some @ref basic_json methods, and meta-programming helpers. + +@since version 2.1.0 +*/ +namespace detail +{ +///////////// +// helpers // +///////////// + +// Note to maintainers: +// +// Every trait in this file expects a non CV-qualified type. +// The only exceptions are in the 'aliases for detected' section +// (i.e. those of the form: decltype(T::member_function(std::declval()))) +// +// In this case, T has to be properly CV-qualified to constraint the function arguments +// (e.g. to_json(BasicJsonType&, const T&)) + +template struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json : std::true_type {}; + +////////////////////// +// json_ref helpers // +////////////////////// + +template +class json_ref; + +template +struct is_json_ref : std::false_type {}; + +template +struct is_json_ref> : std::true_type {}; + +////////////////////////// +// aliases for detected // +////////////////////////// + +template +using mapped_type_t = typename T::mapped_type; + +template +using key_type_t = typename T::key_type; + +template +using value_type_t = typename T::value_type; + +template +using difference_type_t = typename T::difference_type; + +template +using pointer_t = typename T::pointer; + +template +using reference_t = typename T::reference; + +template +using iterator_category_t = typename T::iterator_category; + +template +using to_json_function = decltype(T::to_json(std::declval()...)); + +template +using from_json_function = decltype(T::from_json(std::declval()...)); + +template +using get_template_function = decltype(std::declval().template get()); + +// trait checking if JSONSerializer::from_json(json const&, udt&) exists +template +struct has_from_json : std::false_type {}; + +// trait checking if j.get is valid +// use this trait instead of std::is_constructible or std::is_convertible, +// both rely on, or make use of implicit conversions, and thus fail when T +// has several constructors/operator= (see https://github.com/nlohmann/json/issues/958) +template +struct is_getable +{ + static constexpr bool value = is_detected::value; +}; + +template +struct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if JSONSerializer::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template +struct has_non_default_from_json : std::false_type {}; + +template +struct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if BasicJsonType::json_serializer::to_json exists +// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion. +template +struct has_to_json : std::false_type {}; + +template +struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + + +/////////////////// +// is_ functions // +/////////////////// + +// https://en.cppreference.com/w/cpp/types/conjunction +template struct conjunction : std::true_type { }; +template struct conjunction : B1 { }; +template +struct conjunction +: std::conditional, B1>::type {}; + +// https://en.cppreference.com/w/cpp/types/negation +template struct negation : std::integral_constant < bool, !B::value > { }; + +// Reimplementation of is_constructible and is_default_constructible, due to them being broken for +// std::pair and std::tuple until LWG 2367 fix (see https://cplusplus.github.io/LWG/lwg-defects.html#2367). +// This causes compile errors in e.g. clang 3.5 or gcc 4.9. +template +struct is_default_constructible : std::is_default_constructible {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + + +template +struct is_constructible : std::is_constructible {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + + +template +struct is_iterator_traits : std::false_type {}; + +template +struct is_iterator_traits> +{ + private: + using traits = iterator_traits; + + public: + static constexpr auto value = + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value; +}; + +template +struct is_range +{ + private: + using t_ref = typename std::add_lvalue_reference::type; + + using iterator = detected_t; + using sentinel = detected_t; + + // to be 100% correct, it should use https://en.cppreference.com/w/cpp/iterator/input_or_output_iterator + // and https://en.cppreference.com/w/cpp/iterator/sentinel_for + // but reimplementing these would be too much work, as a lot of other concepts are used underneath + static constexpr auto is_iterator_begin = + is_iterator_traits>::value; + + public: + static constexpr bool value = !std::is_same::value && !std::is_same::value && is_iterator_begin; +}; + +template +using iterator_t = enable_if_t::value, result_of_begin())>>; + +template +using range_value_t = value_type_t>>; + +// The following implementation of is_complete_type is taken from +// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/ +// and is written by Xiang Fan who agreed to using it in this library. + +template +struct is_complete_type : std::false_type {}; + +template +struct is_complete_type : std::true_type {}; + +template +struct is_compatible_object_type_impl : std::false_type {}; + +template +struct is_compatible_object_type_impl < + BasicJsonType, CompatibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + // macOS's is_constructible does not play well with nonesuch... + static constexpr bool value = + is_constructible::value && + is_constructible::value; +}; + +template +struct is_compatible_object_type + : is_compatible_object_type_impl {}; + +template +struct is_constructible_object_type_impl : std::false_type {}; + +template +struct is_constructible_object_type_impl < + BasicJsonType, ConstructibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + static constexpr bool value = + (is_default_constructible::value && + (std::is_move_assignable::value || + std::is_copy_assignable::value) && + (is_constructible::value && + std::is_same < + typename object_t::mapped_type, + typename ConstructibleObjectType::mapped_type >::value)) || + (has_from_json::value || + has_non_default_from_json < + BasicJsonType, + typename ConstructibleObjectType::mapped_type >::value); +}; + +template +struct is_constructible_object_type + : is_constructible_object_type_impl {}; + +template +struct is_compatible_string_type +{ + static constexpr auto value = + is_constructible::value; +}; + +template +struct is_constructible_string_type +{ + static constexpr auto value = + is_constructible::value; +}; + +template +struct is_compatible_array_type_impl : std::false_type {}; + +template +struct is_compatible_array_type_impl < + BasicJsonType, CompatibleArrayType, + enable_if_t < + is_detected::value&& + is_iterator_traits>>::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 + !std::is_same>::value >> +{ + static constexpr bool value = + is_constructible>::value; +}; + +template +struct is_compatible_array_type + : is_compatible_array_type_impl {}; + +template +struct is_constructible_array_type_impl : std::false_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t::value >> + : std::true_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t < !std::is_same::value&& + !is_compatible_string_type::value&& + is_default_constructible::value&& +(std::is_move_assignable::value || + std::is_copy_assignable::value)&& +is_detected::value&& +is_iterator_traits>>::value&& +is_detected::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 +!std::is_same>::value&& + is_complete_type < + detected_t>::value >> +{ + using value_type = range_value_t; + + static constexpr bool value = + std::is_same::value || + has_from_json::value || + has_non_default_from_json < + BasicJsonType, + value_type >::value; +}; + +template +struct is_constructible_array_type + : is_constructible_array_type_impl {}; + +template +struct is_compatible_integer_type_impl : std::false_type {}; + +template +struct is_compatible_integer_type_impl < + RealIntegerType, CompatibleNumberIntegerType, + enable_if_t < std::is_integral::value&& + std::is_integral::value&& + !std::is_same::value >> +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits; + using CompatibleLimits = std::numeric_limits; + + static constexpr auto value = + is_constructible::value && + CompatibleLimits::is_integer && + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template +struct is_compatible_integer_type + : is_compatible_integer_type_impl {}; + +template +struct is_compatible_type_impl: std::false_type {}; + +template +struct is_compatible_type_impl < + BasicJsonType, CompatibleType, + enable_if_t::value >> +{ + static constexpr bool value = + has_to_json::value; +}; + +template +struct is_compatible_type + : is_compatible_type_impl {}; + +template +struct is_constructible_tuple : std::false_type {}; + +template +struct is_constructible_tuple> : conjunction...> {}; + +// a naive helper to check if a type is an ordered_map (exploits the fact that +// ordered_map inherits capacity() from std::vector) +template +struct is_ordered_map +{ + using one = char; + + struct two + { + char x[2]; // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) + }; + + template static one test( decltype(&C::capacity) ) ; + template static two test(...); + + enum { value = sizeof(test(nullptr)) == sizeof(char) }; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) +}; + +// to avoid useless casts (see https://github.com/nlohmann/json/issues/2893#issuecomment-889152324) +template < typename T, typename U, enable_if_t < !std::is_same::value, int > = 0 > +T conditional_static_cast(U value) +{ + return static_cast(value); +} + +template::value, int> = 0> +T conditional_static_cast(U value) +{ + return value; +} + +} // namespace detail +} // namespace nlohmann + +// #include + + +#if JSON_HAS_EXPERIMENTAL_FILESYSTEM +#include +namespace nlohmann::detail +{ +namespace std_fs = std::experimental::filesystem; +} // namespace nlohmann::detail +#elif JSON_HAS_FILESYSTEM +#include +namespace nlohmann::detail +{ +namespace std_fs = std::filesystem; +} // namespace nlohmann::detail +#endif + +namespace nlohmann +{ +namespace detail +{ +template +void from_json(const BasicJsonType& j, typename std::nullptr_t& n) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_null())) + { + JSON_THROW(type_error::create(302, "type must be null, but is " + std::string(j.type_name()), j)); + } + n = nullptr; +} + +// overloads for basic_json template parameters +template < typename BasicJsonType, typename ArithmeticType, + enable_if_t < std::is_arithmetic::value&& + !std::is_same::value, + int > = 0 > +void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast(j)) + { + case value_t::number_unsigned: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_integer: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_float: + { + val = static_cast(*j.template get_ptr()); + break; + } + + case value_t::null: + case value_t::object: + case value_t::array: + case value_t::string: + case value_t::boolean: + case value_t::binary: + case value_t::discarded: + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()), j)); + } +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_boolean())) + { + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(j.type_name()), j)); + } + b = *j.template get_ptr(); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_string())) + { + JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()), j)); + } + s = *j.template get_ptr(); +} + +template < + typename BasicJsonType, typename ConstructibleStringType, + enable_if_t < + is_constructible_string_type::value&& + !std::is_same::value, + int > = 0 > +void from_json(const BasicJsonType& j, ConstructibleStringType& s) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_string())) + { + JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()), j)); + } + + s = *j.template get_ptr(); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val) +{ + get_arithmetic_value(j, val); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val) +{ + get_arithmetic_value(j, val); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val) +{ + get_arithmetic_value(j, val); +} + +template::value, int> = 0> +void from_json(const BasicJsonType& j, EnumType& e) +{ + typename std::underlying_type::type val; + get_arithmetic_value(j, val); + e = static_cast(val); +} + +// forward_list doesn't have an insert method +template::value, int> = 0> +void from_json(const BasicJsonType& j, std::forward_list& l) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()), j)); + } + l.clear(); + std::transform(j.rbegin(), j.rend(), + std::front_inserter(l), [](const BasicJsonType & i) + { + return i.template get(); + }); +} + +// valarray doesn't have an insert method +template::value, int> = 0> +void from_json(const BasicJsonType& j, std::valarray& l) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()), j)); + } + l.resize(j.size()); + std::transform(j.begin(), j.end(), std::begin(l), + [](const BasicJsonType & elem) + { + return elem.template get(); + }); +} + +template +auto from_json(const BasicJsonType& j, T (&arr)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +-> decltype(j.template get(), void()) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get(); + } +} + +template +void from_json_array_impl(const BasicJsonType& j, typename BasicJsonType::array_t& arr, priority_tag<3> /*unused*/) +{ + arr = *j.template get_ptr(); +} + +template +auto from_json_array_impl(const BasicJsonType& j, std::array& arr, + priority_tag<2> /*unused*/) +-> decltype(j.template get(), void()) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get(); + } +} + +template::value, + int> = 0> +auto from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, priority_tag<1> /*unused*/) +-> decltype( + arr.reserve(std::declval()), + j.template get(), + void()) +{ + using std::end; + + ConstructibleArrayType ret; + ret.reserve(j.size()); + std::transform(j.begin(), j.end(), + std::inserter(ret, end(ret)), [](const BasicJsonType & i) + { + // get() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get(); + }); + arr = std::move(ret); +} + +template::value, + int> = 0> +void from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, + priority_tag<0> /*unused*/) +{ + using std::end; + + ConstructibleArrayType ret; + std::transform( + j.begin(), j.end(), std::inserter(ret, end(ret)), + [](const BasicJsonType & i) + { + // get() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get(); + }); + arr = std::move(ret); +} + +template < typename BasicJsonType, typename ConstructibleArrayType, + enable_if_t < + is_constructible_array_type::value&& + !is_constructible_object_type::value&& + !is_constructible_string_type::value&& + !std::is_same::value&& + !is_basic_json::value, + int > = 0 > +auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr) +-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}), +j.template get(), +void()) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()), j)); + } + + from_json_array_impl(j, arr, priority_tag<3> {}); +} + +template < typename BasicJsonType, typename T, std::size_t... Idx > +std::array from_json_inplace_array_impl(BasicJsonType&& j, + identity_tag> /*unused*/, index_sequence /*unused*/) +{ + return { { std::forward(j).at(Idx).template get()... } }; +} + +template < typename BasicJsonType, typename T, std::size_t N > +auto from_json(BasicJsonType&& j, identity_tag> tag) +-> decltype(from_json_inplace_array_impl(std::forward(j), tag, make_index_sequence {})) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()), j)); + } + + return from_json_inplace_array_impl(std::forward(j), tag, make_index_sequence {}); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::binary_t& bin) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_binary())) + { + JSON_THROW(type_error::create(302, "type must be binary, but is " + std::string(j.type_name()), j)); + } + + bin = *j.template get_ptr(); +} + +template::value, int> = 0> +void from_json(const BasicJsonType& j, ConstructibleObjectType& obj) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_object())) + { + JSON_THROW(type_error::create(302, "type must be object, but is " + std::string(j.type_name()), j)); + } + + ConstructibleObjectType ret; + const auto* inner_object = j.template get_ptr(); + using value_type = typename ConstructibleObjectType::value_type; + std::transform( + inner_object->begin(), inner_object->end(), + std::inserter(ret, ret.begin()), + [](typename BasicJsonType::object_t::value_type const & p) + { + return value_type(p.first, p.second.template get()); + }); + obj = std::move(ret); +} + +// overload for arithmetic types, not chosen for basic_json template arguments +// (BooleanType, etc..); note: Is it really necessary to provide explicit +// overloads for boolean_t etc. in case of a custom BooleanType which is not +// an arithmetic type? +template < typename BasicJsonType, typename ArithmeticType, + enable_if_t < + std::is_arithmetic::value&& + !std::is_same::value&& + !std::is_same::value&& + !std::is_same::value&& + !std::is_same::value, + int > = 0 > +void from_json(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast(j)) + { + case value_t::number_unsigned: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_integer: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_float: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::boolean: + { + val = static_cast(*j.template get_ptr()); + break; + } + + case value_t::null: + case value_t::object: + case value_t::array: + case value_t::string: + case value_t::binary: + case value_t::discarded: + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()), j)); + } +} + +template +std::tuple from_json_tuple_impl_base(BasicJsonType&& j, index_sequence /*unused*/) +{ + return std::make_tuple(std::forward(j).at(Idx).template get()...); +} + +template < typename BasicJsonType, class A1, class A2 > +std::pair from_json_tuple_impl(BasicJsonType&& j, identity_tag> /*unused*/, priority_tag<0> /*unused*/) +{ + return {std::forward(j).at(0).template get(), + std::forward(j).at(1).template get()}; +} + +template +void from_json_tuple_impl(BasicJsonType&& j, std::pair& p, priority_tag<1> /*unused*/) +{ + p = from_json_tuple_impl(std::forward(j), identity_tag> {}, priority_tag<0> {}); +} + +template +std::tuple from_json_tuple_impl(BasicJsonType&& j, identity_tag> /*unused*/, priority_tag<2> /*unused*/) +{ + return from_json_tuple_impl_base(std::forward(j), index_sequence_for {}); +} + +template +void from_json_tuple_impl(BasicJsonType&& j, std::tuple& t, priority_tag<3> /*unused*/) +{ + t = from_json_tuple_impl_base(std::forward(j), index_sequence_for {}); +} + +template +auto from_json(BasicJsonType&& j, TupleRelated&& t) +-> decltype(from_json_tuple_impl(std::forward(j), std::forward(t), priority_tag<3> {})) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()), j)); + } + + return from_json_tuple_impl(std::forward(j), std::forward(t), priority_tag<3> {}); +} + +template < typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator, + typename = enable_if_t < !std::is_constructible < + typename BasicJsonType::string_t, Key >::value >> +void from_json(const BasicJsonType& j, std::map& m) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()), j)); + } + m.clear(); + for (const auto& p : j) + { + if (JSON_HEDLEY_UNLIKELY(!p.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(p.type_name()), j)); + } + m.emplace(p.at(0).template get(), p.at(1).template get()); + } +} + +template < typename BasicJsonType, typename Key, typename Value, typename Hash, typename KeyEqual, typename Allocator, + typename = enable_if_t < !std::is_constructible < + typename BasicJsonType::string_t, Key >::value >> +void from_json(const BasicJsonType& j, std::unordered_map& m) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()), j)); + } + m.clear(); + for (const auto& p : j) + { + if (JSON_HEDLEY_UNLIKELY(!p.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(p.type_name()), j)); + } + m.emplace(p.at(0).template get(), p.at(1).template get()); + } +} + +#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM +template +void from_json(const BasicJsonType& j, std_fs::path& p) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_string())) + { + JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()), j)); + } + p = *j.template get_ptr(); +} +#endif + +struct from_json_fn +{ + template + auto operator()(const BasicJsonType& j, T&& val) const + noexcept(noexcept(from_json(j, std::forward(val)))) + -> decltype(from_json(j, std::forward(val))) + { + return from_json(j, std::forward(val)); + } +}; +} // namespace detail + +/// namespace to hold default `from_json` function +/// to see why this is required: +/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html +namespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces) +{ +constexpr const auto& from_json = detail::static_const::value; // NOLINT(misc-definitions-in-headers) +} // namespace +} // namespace nlohmann + +// #include + + +#include // copy +#include // begin, end +#include // string +#include // tuple, get +#include // is_same, is_constructible, is_floating_point, is_enum, underlying_type +#include // move, forward, declval, pair +#include // valarray +#include // vector + +// #include + +// #include + + +#include // size_t +#include // input_iterator_tag +#include // string, to_string +#include // tuple_size, get, tuple_element +#include // move + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template +void int_to_string( string_type& target, std::size_t value ) +{ + // For ADL + using std::to_string; + target = to_string(value); +} +template class iteration_proxy_value +{ + public: + using difference_type = std::ptrdiff_t; + using value_type = iteration_proxy_value; + using pointer = value_type * ; + using reference = value_type & ; + using iterator_category = std::input_iterator_tag; + using string_type = typename std::remove_cv< typename std::remove_reference().key() ) >::type >::type; + + private: + /// the iterator + IteratorType anchor; + /// an index for arrays (used to create key names) + std::size_t array_index = 0; + /// last stringified array index + mutable std::size_t array_index_last = 0; + /// a string representation of the array index + mutable string_type array_index_str = "0"; + /// an empty string (to return a reference for primitive values) + const string_type empty_str{}; + + public: + explicit iteration_proxy_value(IteratorType it) noexcept + : anchor(std::move(it)) + {} + + /// dereference operator (needed for range-based for) + iteration_proxy_value& operator*() + { + return *this; + } + + /// increment operator (needed for range-based for) + iteration_proxy_value& operator++() + { + ++anchor; + ++array_index; + + return *this; + } + + /// equality operator (needed for InputIterator) + bool operator==(const iteration_proxy_value& o) const + { + return anchor == o.anchor; + } + + /// inequality operator (needed for range-based for) + bool operator!=(const iteration_proxy_value& o) const + { + return anchor != o.anchor; + } + + /// return key of the iterator + const string_type& key() const + { + JSON_ASSERT(anchor.m_object != nullptr); + + switch (anchor.m_object->type()) + { + // use integer array index as key + case value_t::array: + { + if (array_index != array_index_last) + { + int_to_string( array_index_str, array_index ); + array_index_last = array_index; + } + return array_index_str; + } + + // use key from the object + case value_t::object: + return anchor.key(); + + // use an empty key for all primitive types + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return empty_str; + } + } + + /// return value of the iterator + typename IteratorType::reference value() const + { + return anchor.value(); + } +}; + +/// proxy class for the items() function +template class iteration_proxy +{ + private: + /// the container to iterate + typename IteratorType::reference container; + + public: + /// construct iteration proxy from a container + explicit iteration_proxy(typename IteratorType::reference cont) noexcept + : container(cont) {} + + /// return iterator begin (needed for range-based for) + iteration_proxy_value begin() noexcept + { + return iteration_proxy_value(container.begin()); + } + + /// return iterator end (needed for range-based for) + iteration_proxy_value end() noexcept + { + return iteration_proxy_value(container.end()); + } +}; +// Structured Bindings Support +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +template = 0> +auto get(const nlohmann::detail::iteration_proxy_value& i) -> decltype(i.key()) +{ + return i.key(); +} +// Structured Bindings Support +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +template = 0> +auto get(const nlohmann::detail::iteration_proxy_value& i) -> decltype(i.value()) +{ + return i.value(); +} +} // namespace detail +} // namespace nlohmann + +// The Addition to the STD Namespace is required to add +// Structured Bindings Support to the iteration_proxy_value class +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +namespace std +{ +#if defined(__clang__) + // Fix: https://github.com/nlohmann/json/issues/1401 + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wmismatched-tags" +#endif +template +class tuple_size<::nlohmann::detail::iteration_proxy_value> + : public std::integral_constant {}; + +template +class tuple_element> +{ + public: + using type = decltype( + get(std::declval < + ::nlohmann::detail::iteration_proxy_value> ())); +}; +#if defined(__clang__) + #pragma clang diagnostic pop +#endif +} // namespace std + +// #include + +// #include + +// #include + + +#if JSON_HAS_EXPERIMENTAL_FILESYSTEM +#include +namespace nlohmann::detail +{ +namespace std_fs = std::experimental::filesystem; +} // namespace nlohmann::detail +#elif JSON_HAS_FILESYSTEM +#include +namespace nlohmann::detail +{ +namespace std_fs = std::filesystem; +} // namespace nlohmann::detail +#endif + +namespace nlohmann +{ +namespace detail +{ +////////////////// +// constructors // +////////////////// + +/* + * Note all external_constructor<>::construct functions need to call + * j.m_value.destroy(j.m_type) to avoid a memory leak in case j contains an + * allocated value (e.g., a string). See bug issue + * https://github.com/nlohmann/json/issues/2865 for more information. + */ + +template struct external_constructor; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::boolean; + j.m_value = b; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::string; + j.m_value = s; + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::string; + j.m_value = std::move(s); + j.assert_invariant(); + } + + template < typename BasicJsonType, typename CompatibleStringType, + enable_if_t < !std::is_same::value, + int > = 0 > + static void construct(BasicJsonType& j, const CompatibleStringType& str) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::string; + j.m_value.string = j.template create(str); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::binary_t& b) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::binary; + j.m_value = typename BasicJsonType::binary_t(b); + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::binary_t&& b) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::binary; + j.m_value = typename BasicJsonType::binary_t(std::move(b)); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::number_float; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::number_unsigned; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::number_integer; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::array; + j.m_value = arr; + j.set_parents(); + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::array; + j.m_value = std::move(arr); + j.set_parents(); + j.assert_invariant(); + } + + template < typename BasicJsonType, typename CompatibleArrayType, + enable_if_t < !std::is_same::value, + int > = 0 > + static void construct(BasicJsonType& j, const CompatibleArrayType& arr) + { + using std::begin; + using std::end; + + j.m_value.destroy(j.m_type); + j.m_type = value_t::array; + j.m_value.array = j.template create(begin(arr), end(arr)); + j.set_parents(); + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, const std::vector& arr) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->reserve(arr.size()); + for (const bool x : arr) + { + j.m_value.array->push_back(x); + j.set_parent(j.m_value.array->back()); + } + j.assert_invariant(); + } + + template::value, int> = 0> + static void construct(BasicJsonType& j, const std::valarray& arr) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->resize(arr.size()); + if (arr.size() > 0) + { + std::copy(std::begin(arr), std::end(arr), j.m_value.array->begin()); + } + j.set_parents(); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::object; + j.m_value = obj; + j.set_parents(); + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj) + { + j.m_value.destroy(j.m_type); + j.m_type = value_t::object; + j.m_value = std::move(obj); + j.set_parents(); + j.assert_invariant(); + } + + template < typename BasicJsonType, typename CompatibleObjectType, + enable_if_t < !std::is_same::value, int > = 0 > + static void construct(BasicJsonType& j, const CompatibleObjectType& obj) + { + using std::begin; + using std::end; + + j.m_value.destroy(j.m_type); + j.m_type = value_t::object; + j.m_value.object = j.template create(begin(obj), end(obj)); + j.set_parents(); + j.assert_invariant(); + } +}; + +///////////// +// to_json // +///////////// + +template::value, int> = 0> +void to_json(BasicJsonType& j, T b) noexcept +{ + external_constructor::construct(j, b); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleString& s) +{ + external_constructor::construct(j, s); +} + +template +void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) +{ + external_constructor::construct(j, std::move(s)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, FloatType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, EnumType e) noexcept +{ + using underlying_type = typename std::underlying_type::type; + external_constructor::construct(j, static_cast(e)); +} + +template +void to_json(BasicJsonType& j, const std::vector& e) +{ + external_constructor::construct(j, e); +} + +template < typename BasicJsonType, typename CompatibleArrayType, + enable_if_t < is_compatible_array_type::value&& + !is_compatible_object_type::value&& + !is_compatible_string_type::value&& + !std::is_same::value&& + !is_basic_json::value, + int > = 0 > +void to_json(BasicJsonType& j, const CompatibleArrayType& arr) +{ + external_constructor::construct(j, arr); +} + +template +void to_json(BasicJsonType& j, const typename BasicJsonType::binary_t& bin) +{ + external_constructor::construct(j, bin); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, const std::valarray& arr) +{ + external_constructor::construct(j, std::move(arr)); +} + +template +void to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr) +{ + external_constructor::construct(j, std::move(arr)); +} + +template < typename BasicJsonType, typename CompatibleObjectType, + enable_if_t < is_compatible_object_type::value&& !is_basic_json::value, int > = 0 > +void to_json(BasicJsonType& j, const CompatibleObjectType& obj) +{ + external_constructor::construct(j, obj); +} + +template +void to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj) +{ + external_constructor::construct(j, std::move(obj)); +} + +template < + typename BasicJsonType, typename T, std::size_t N, + enable_if_t < !std::is_constructible::value, // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) + int > = 0 > +void to_json(BasicJsonType& j, const T(&arr)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +{ + external_constructor::construct(j, arr); +} + +template < typename BasicJsonType, typename T1, typename T2, enable_if_t < std::is_constructible::value&& std::is_constructible::value, int > = 0 > +void to_json(BasicJsonType& j, const std::pair& p) +{ + j = { p.first, p.second }; +} + +// for https://github.com/nlohmann/json/pull/1134 +template>::value, int> = 0> +void to_json(BasicJsonType& j, const T& b) +{ + j = { {b.key(), b.value()} }; +} + +template +void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence /*unused*/) +{ + j = { std::get(t)... }; +} + +template::value, int > = 0> +void to_json(BasicJsonType& j, const T& t) +{ + to_json_tuple_impl(j, t, make_index_sequence::value> {}); +} + +#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM +template +void to_json(BasicJsonType& j, const std_fs::path& p) +{ + j = p.string(); +} +#endif + +struct to_json_fn +{ + template + auto operator()(BasicJsonType& j, T&& val) const noexcept(noexcept(to_json(j, std::forward(val)))) + -> decltype(to_json(j, std::forward(val)), void()) + { + return to_json(j, std::forward(val)); + } +}; +} // namespace detail + +/// namespace to hold default `to_json` function +/// to see why this is required: +/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html +namespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces) +{ +constexpr const auto& to_json = detail::static_const::value; // NOLINT(misc-definitions-in-headers) +} // namespace +} // namespace nlohmann + +// #include + +// #include + + +namespace nlohmann +{ + +/// @sa https://json.nlohmann.me/api/adl_serializer/ +template +struct adl_serializer +{ + /// @brief convert a JSON value to any value type + /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/ + template + static auto from_json(BasicJsonType && j, TargetType& val) noexcept( + noexcept(::nlohmann::from_json(std::forward(j), val))) + -> decltype(::nlohmann::from_json(std::forward(j), val), void()) + { + ::nlohmann::from_json(std::forward(j), val); + } + + /// @brief convert a JSON value to any value type + /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/ + template + static auto from_json(BasicJsonType && j) noexcept( + noexcept(::nlohmann::from_json(std::forward(j), detail::identity_tag {}))) + -> decltype(::nlohmann::from_json(std::forward(j), detail::identity_tag {})) + { + return ::nlohmann::from_json(std::forward(j), detail::identity_tag {}); + } + + /// @brief convert any value type to a JSON value + /// @sa https://json.nlohmann.me/api/adl_serializer/to_json/ + template + static auto to_json(BasicJsonType& j, TargetType && val) noexcept( + noexcept(::nlohmann::to_json(j, std::forward(val)))) + -> decltype(::nlohmann::to_json(j, std::forward(val)), void()) + { + ::nlohmann::to_json(j, std::forward(val)); + } +}; +} // namespace nlohmann + +// #include + + +#include // uint8_t, uint64_t +#include // tie +#include // move + +namespace nlohmann +{ + +/// @brief an internal type for a backed binary type +/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/ +template +class byte_container_with_subtype : public BinaryType +{ + public: + using container_type = BinaryType; + using subtype_type = std::uint64_t; + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype() noexcept(noexcept(container_type())) + : container_type() + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(const container_type& b) noexcept(noexcept(container_type(b))) + : container_type(b) + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(container_type&& b) noexcept(noexcept(container_type(std::move(b)))) + : container_type(std::move(b)) + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(const container_type& b, subtype_type subtype_) noexcept(noexcept(container_type(b))) + : container_type(b) + , m_subtype(subtype_) + , m_has_subtype(true) + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(container_type&& b, subtype_type subtype_) noexcept(noexcept(container_type(std::move(b)))) + : container_type(std::move(b)) + , m_subtype(subtype_) + , m_has_subtype(true) + {} + + bool operator==(const byte_container_with_subtype& rhs) const + { + return std::tie(static_cast(*this), m_subtype, m_has_subtype) == + std::tie(static_cast(rhs), rhs.m_subtype, rhs.m_has_subtype); + } + + bool operator!=(const byte_container_with_subtype& rhs) const + { + return !(rhs == *this); + } + + /// @brief sets the binary subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/set_subtype/ + void set_subtype(subtype_type subtype_) noexcept + { + m_subtype = subtype_; + m_has_subtype = true; + } + + /// @brief return the binary subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/subtype/ + constexpr subtype_type subtype() const noexcept + { + return m_has_subtype ? m_subtype : static_cast(-1); + } + + /// @brief return whether the value has a subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/has_subtype/ + constexpr bool has_subtype() const noexcept + { + return m_has_subtype; + } + + /// @brief clears the binary subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/clear_subtype/ + void clear_subtype() noexcept + { + m_subtype = 0; + m_has_subtype = false; + } + + private: + subtype_type m_subtype = 0; + bool m_has_subtype = false; +}; + +} // namespace nlohmann + +// #include + +// #include + +// #include + +// #include + + +#include // uint8_t +#include // size_t +#include // hash + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ + +// boost::hash_combine +inline std::size_t combine(std::size_t seed, std::size_t h) noexcept +{ + seed ^= h + 0x9e3779b9 + (seed << 6U) + (seed >> 2U); + return seed; +} + +/*! +@brief hash a JSON value + +The hash function tries to rely on std::hash where possible. Furthermore, the +type of the JSON value is taken into account to have different hash values for +null, 0, 0U, and false, etc. + +@tparam BasicJsonType basic_json specialization +@param j JSON value to hash +@return hash value of j +*/ +template +std::size_t hash(const BasicJsonType& j) +{ + using string_t = typename BasicJsonType::string_t; + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + + const auto type = static_cast(j.type()); + switch (j.type()) + { + case BasicJsonType::value_t::null: + case BasicJsonType::value_t::discarded: + { + return combine(type, 0); + } + + case BasicJsonType::value_t::object: + { + auto seed = combine(type, j.size()); + for (const auto& element : j.items()) + { + const auto h = std::hash {}(element.key()); + seed = combine(seed, h); + seed = combine(seed, hash(element.value())); + } + return seed; + } + + case BasicJsonType::value_t::array: + { + auto seed = combine(type, j.size()); + for (const auto& element : j) + { + seed = combine(seed, hash(element)); + } + return seed; + } + + case BasicJsonType::value_t::string: + { + const auto h = std::hash {}(j.template get_ref()); + return combine(type, h); + } + + case BasicJsonType::value_t::boolean: + { + const auto h = std::hash {}(j.template get()); + return combine(type, h); + } + + case BasicJsonType::value_t::number_integer: + { + const auto h = std::hash {}(j.template get()); + return combine(type, h); + } + + case BasicJsonType::value_t::number_unsigned: + { + const auto h = std::hash {}(j.template get()); + return combine(type, h); + } + + case BasicJsonType::value_t::number_float: + { + const auto h = std::hash {}(j.template get()); + return combine(type, h); + } + + case BasicJsonType::value_t::binary: + { + auto seed = combine(type, j.get_binary().size()); + const auto h = std::hash {}(j.get_binary().has_subtype()); + seed = combine(seed, h); + seed = combine(seed, static_cast(j.get_binary().subtype())); + for (const auto byte : j.get_binary()) + { + seed = combine(seed, std::hash {}(byte)); + } + return seed; + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + return 0; // LCOV_EXCL_LINE + } +} + +} // namespace detail +} // namespace nlohmann + +// #include + + +#include // generate_n +#include // array +#include // ldexp +#include // size_t +#include // uint8_t, uint16_t, uint32_t, uint64_t +#include // snprintf +#include // memcpy +#include // back_inserter +#include // numeric_limits +#include // char_traits, string +#include // make_pair, move +#include // vector + +// #include + +// #include + + +#include // array +#include // size_t +#include // strlen +#include // begin, end, iterator_traits, random_access_iterator_tag, distance, next +#include // shared_ptr, make_shared, addressof +#include // accumulate +#include // string, char_traits +#include // enable_if, is_base_of, is_pointer, is_integral, remove_pointer +#include // pair, declval + +#ifndef JSON_NO_IO + #include // FILE * + #include // istream +#endif // JSON_NO_IO + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +/// the supported input formats +enum class input_format_t { json, cbor, msgpack, ubjson, bson }; + +//////////////////// +// input adapters // +//////////////////// + +#ifndef JSON_NO_IO +/*! +Input adapter for stdio file access. This adapter read only 1 byte and do not use any + buffer. This adapter is a very low level adapter. +*/ +class file_input_adapter +{ + public: + using char_type = char; + + JSON_HEDLEY_NON_NULL(2) + explicit file_input_adapter(std::FILE* f) noexcept + : m_file(f) + {} + + // make class move-only + file_input_adapter(const file_input_adapter&) = delete; + file_input_adapter(file_input_adapter&&) noexcept = default; + file_input_adapter& operator=(const file_input_adapter&) = delete; + file_input_adapter& operator=(file_input_adapter&&) = delete; + ~file_input_adapter() = default; + + std::char_traits::int_type get_character() noexcept + { + return std::fgetc(m_file); + } + + private: + /// the file pointer to read from + std::FILE* m_file; +}; + + +/*! +Input adapter for a (caching) istream. Ignores a UFT Byte Order Mark at +beginning of input. Does not support changing the underlying std::streambuf +in mid-input. Maintains underlying std::istream and std::streambuf to support +subsequent use of standard std::istream operations to process any input +characters following those used in parsing the JSON input. Clears the +std::istream flags; any input errors (e.g., EOF) will be detected by the first +subsequent call for input from the std::istream. +*/ +class input_stream_adapter +{ + public: + using char_type = char; + + ~input_stream_adapter() + { + // clear stream flags; we use underlying streambuf I/O, do not + // maintain ifstream flags, except eof + if (is != nullptr) + { + is->clear(is->rdstate() & std::ios::eofbit); + } + } + + explicit input_stream_adapter(std::istream& i) + : is(&i), sb(i.rdbuf()) + {} + + // delete because of pointer members + input_stream_adapter(const input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&&) = delete; + + input_stream_adapter(input_stream_adapter&& rhs) noexcept + : is(rhs.is), sb(rhs.sb) + { + rhs.is = nullptr; + rhs.sb = nullptr; + } + + // std::istream/std::streambuf use std::char_traits::to_int_type, to + // ensure that std::char_traits::eof() and the character 0xFF do not + // end up as the same value, e.g. 0xFFFFFFFF. + std::char_traits::int_type get_character() + { + auto res = sb->sbumpc(); + // set eof manually, as we don't use the istream interface. + if (JSON_HEDLEY_UNLIKELY(res == std::char_traits::eof())) + { + is->clear(is->rdstate() | std::ios::eofbit); + } + return res; + } + + private: + /// the associated input stream + std::istream* is = nullptr; + std::streambuf* sb = nullptr; +}; +#endif // JSON_NO_IO + +// General-purpose iterator-based adapter. It might not be as fast as +// theoretically possible for some containers, but it is extremely versatile. +template +class iterator_input_adapter +{ + public: + using char_type = typename std::iterator_traits::value_type; + + iterator_input_adapter(IteratorType first, IteratorType last) + : current(std::move(first)), end(std::move(last)) + {} + + typename std::char_traits::int_type get_character() + { + if (JSON_HEDLEY_LIKELY(current != end)) + { + auto result = std::char_traits::to_int_type(*current); + std::advance(current, 1); + return result; + } + + return std::char_traits::eof(); + } + + private: + IteratorType current; + IteratorType end; + + template + friend struct wide_string_input_helper; + + bool empty() const + { + return current == end; + } +}; + + +template +struct wide_string_input_helper; + +template +struct wide_string_input_helper +{ + // UTF-32 + static void fill_buffer(BaseInputAdapter& input, + std::array::int_type, 4>& utf8_bytes, + size_t& utf8_bytes_index, + size_t& utf8_bytes_filled) + { + utf8_bytes_index = 0; + + if (JSON_HEDLEY_UNLIKELY(input.empty())) + { + utf8_bytes[0] = std::char_traits::eof(); + utf8_bytes_filled = 1; + } + else + { + // get the current character + const auto wc = input.get_character(); + + // UTF-32 to UTF-8 encoding + if (wc < 0x80) + { + utf8_bytes[0] = static_cast::int_type>(wc); + utf8_bytes_filled = 1; + } + else if (wc <= 0x7FF) + { + utf8_bytes[0] = static_cast::int_type>(0xC0u | ((static_cast(wc) >> 6u) & 0x1Fu)); + utf8_bytes[1] = static_cast::int_type>(0x80u | (static_cast(wc) & 0x3Fu)); + utf8_bytes_filled = 2; + } + else if (wc <= 0xFFFF) + { + utf8_bytes[0] = static_cast::int_type>(0xE0u | ((static_cast(wc) >> 12u) & 0x0Fu)); + utf8_bytes[1] = static_cast::int_type>(0x80u | ((static_cast(wc) >> 6u) & 0x3Fu)); + utf8_bytes[2] = static_cast::int_type>(0x80u | (static_cast(wc) & 0x3Fu)); + utf8_bytes_filled = 3; + } + else if (wc <= 0x10FFFF) + { + utf8_bytes[0] = static_cast::int_type>(0xF0u | ((static_cast(wc) >> 18u) & 0x07u)); + utf8_bytes[1] = static_cast::int_type>(0x80u | ((static_cast(wc) >> 12u) & 0x3Fu)); + utf8_bytes[2] = static_cast::int_type>(0x80u | ((static_cast(wc) >> 6u) & 0x3Fu)); + utf8_bytes[3] = static_cast::int_type>(0x80u | (static_cast(wc) & 0x3Fu)); + utf8_bytes_filled = 4; + } + else + { + // unknown character + utf8_bytes[0] = static_cast::int_type>(wc); + utf8_bytes_filled = 1; + } + } + } +}; + +template +struct wide_string_input_helper +{ + // UTF-16 + static void fill_buffer(BaseInputAdapter& input, + std::array::int_type, 4>& utf8_bytes, + size_t& utf8_bytes_index, + size_t& utf8_bytes_filled) + { + utf8_bytes_index = 0; + + if (JSON_HEDLEY_UNLIKELY(input.empty())) + { + utf8_bytes[0] = std::char_traits::eof(); + utf8_bytes_filled = 1; + } + else + { + // get the current character + const auto wc = input.get_character(); + + // UTF-16 to UTF-8 encoding + if (wc < 0x80) + { + utf8_bytes[0] = static_cast::int_type>(wc); + utf8_bytes_filled = 1; + } + else if (wc <= 0x7FF) + { + utf8_bytes[0] = static_cast::int_type>(0xC0u | ((static_cast(wc) >> 6u))); + utf8_bytes[1] = static_cast::int_type>(0x80u | (static_cast(wc) & 0x3Fu)); + utf8_bytes_filled = 2; + } + else if (0xD800 > wc || wc >= 0xE000) + { + utf8_bytes[0] = static_cast::int_type>(0xE0u | ((static_cast(wc) >> 12u))); + utf8_bytes[1] = static_cast::int_type>(0x80u | ((static_cast(wc) >> 6u) & 0x3Fu)); + utf8_bytes[2] = static_cast::int_type>(0x80u | (static_cast(wc) & 0x3Fu)); + utf8_bytes_filled = 3; + } + else + { + if (JSON_HEDLEY_UNLIKELY(!input.empty())) + { + const auto wc2 = static_cast(input.get_character()); + const auto charcode = 0x10000u + (((static_cast(wc) & 0x3FFu) << 10u) | (wc2 & 0x3FFu)); + utf8_bytes[0] = static_cast::int_type>(0xF0u | (charcode >> 18u)); + utf8_bytes[1] = static_cast::int_type>(0x80u | ((charcode >> 12u) & 0x3Fu)); + utf8_bytes[2] = static_cast::int_type>(0x80u | ((charcode >> 6u) & 0x3Fu)); + utf8_bytes[3] = static_cast::int_type>(0x80u | (charcode & 0x3Fu)); + utf8_bytes_filled = 4; + } + else + { + utf8_bytes[0] = static_cast::int_type>(wc); + utf8_bytes_filled = 1; + } + } + } + } +}; + +// Wraps another input apdater to convert wide character types into individual bytes. +template +class wide_string_input_adapter +{ + public: + using char_type = char; + + wide_string_input_adapter(BaseInputAdapter base) + : base_adapter(base) {} + + typename std::char_traits::int_type get_character() noexcept + { + // check if buffer needs to be filled + if (utf8_bytes_index == utf8_bytes_filled) + { + fill_buffer(); + + JSON_ASSERT(utf8_bytes_filled > 0); + JSON_ASSERT(utf8_bytes_index == 0); + } + + // use buffer + JSON_ASSERT(utf8_bytes_filled > 0); + JSON_ASSERT(utf8_bytes_index < utf8_bytes_filled); + return utf8_bytes[utf8_bytes_index++]; + } + + private: + BaseInputAdapter base_adapter; + + template + void fill_buffer() + { + wide_string_input_helper::fill_buffer(base_adapter, utf8_bytes, utf8_bytes_index, utf8_bytes_filled); + } + + /// a buffer for UTF-8 bytes + std::array::int_type, 4> utf8_bytes = {{0, 0, 0, 0}}; + + /// index to the utf8_codes array for the next valid byte + std::size_t utf8_bytes_index = 0; + /// number of valid bytes in the utf8_codes array + std::size_t utf8_bytes_filled = 0; +}; + + +template +struct iterator_input_adapter_factory +{ + using iterator_type = IteratorType; + using char_type = typename std::iterator_traits::value_type; + using adapter_type = iterator_input_adapter; + + static adapter_type create(IteratorType first, IteratorType last) + { + return adapter_type(std::move(first), std::move(last)); + } +}; + +template +struct is_iterator_of_multibyte +{ + using value_type = typename std::iterator_traits::value_type; + enum + { + value = sizeof(value_type) > 1 + }; +}; + +template +struct iterator_input_adapter_factory::value>> +{ + using iterator_type = IteratorType; + using char_type = typename std::iterator_traits::value_type; + using base_adapter_type = iterator_input_adapter; + using adapter_type = wide_string_input_adapter; + + static adapter_type create(IteratorType first, IteratorType last) + { + return adapter_type(base_adapter_type(std::move(first), std::move(last))); + } +}; + +// General purpose iterator-based input +template +typename iterator_input_adapter_factory::adapter_type input_adapter(IteratorType first, IteratorType last) +{ + using factory_type = iterator_input_adapter_factory; + return factory_type::create(first, last); +} + +// Convenience shorthand from container to iterator +// Enables ADL on begin(container) and end(container) +// Encloses the using declarations in namespace for not to leak them to outside scope + +namespace container_input_adapter_factory_impl +{ + +using std::begin; +using std::end; + +template +struct container_input_adapter_factory {}; + +template +struct container_input_adapter_factory< ContainerType, + void_t()), end(std::declval()))>> + { + using adapter_type = decltype(input_adapter(begin(std::declval()), end(std::declval()))); + + static adapter_type create(const ContainerType& container) +{ + return input_adapter(begin(container), end(container)); +} + }; + +} // namespace container_input_adapter_factory_impl + +template +typename container_input_adapter_factory_impl::container_input_adapter_factory::adapter_type input_adapter(const ContainerType& container) +{ + return container_input_adapter_factory_impl::container_input_adapter_factory::create(container); +} + +#ifndef JSON_NO_IO +// Special cases with fast paths +inline file_input_adapter input_adapter(std::FILE* file) +{ + return file_input_adapter(file); +} + +inline input_stream_adapter input_adapter(std::istream& stream) +{ + return input_stream_adapter(stream); +} + +inline input_stream_adapter input_adapter(std::istream&& stream) +{ + return input_stream_adapter(stream); +} +#endif // JSON_NO_IO + +using contiguous_bytes_input_adapter = decltype(input_adapter(std::declval(), std::declval())); + +// Null-delimited strings, and the like. +template < typename CharT, + typename std::enable_if < + std::is_pointer::value&& + !std::is_array::value&& + std::is_integral::type>::value&& + sizeof(typename std::remove_pointer::type) == 1, + int >::type = 0 > +contiguous_bytes_input_adapter input_adapter(CharT b) +{ + auto length = std::strlen(reinterpret_cast(b)); + const auto* ptr = reinterpret_cast(b); + return input_adapter(ptr, ptr + length); +} + +template +auto input_adapter(T (&array)[N]) -> decltype(input_adapter(array, array + N)) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +{ + return input_adapter(array, array + N); +} + +// This class only handles inputs of input_buffer_adapter type. +// It's required so that expressions like {ptr, len} can be implicitly cast +// to the correct adapter. +class span_input_adapter +{ + public: + template < typename CharT, + typename std::enable_if < + std::is_pointer::value&& + std::is_integral::type>::value&& + sizeof(typename std::remove_pointer::type) == 1, + int >::type = 0 > + span_input_adapter(CharT b, std::size_t l) + : ia(reinterpret_cast(b), reinterpret_cast(b) + l) {} + + template::iterator_category, std::random_access_iterator_tag>::value, + int>::type = 0> + span_input_adapter(IteratorType first, IteratorType last) + : ia(input_adapter(first, last)) {} + + contiguous_bytes_input_adapter&& get() + { + return std::move(ia); // NOLINT(hicpp-move-const-arg,performance-move-const-arg) + } + + private: + contiguous_bytes_input_adapter ia; +}; +} // namespace detail +} // namespace nlohmann + +// #include + + +#include +#include // string +#include // move +#include // vector + +// #include + +// #include + + +namespace nlohmann +{ + +/*! +@brief SAX interface + +This class describes the SAX interface used by @ref nlohmann::json::sax_parse. +Each function is called in different situations while the input is parsed. The +boolean return value informs the parser whether to continue processing the +input. +*/ +template +struct json_sax +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + /*! + @brief a null value was read + @return whether parsing should proceed + */ + virtual bool null() = 0; + + /*! + @brief a boolean value was read + @param[in] val boolean value + @return whether parsing should proceed + */ + virtual bool boolean(bool val) = 0; + + /*! + @brief an integer number was read + @param[in] val integer value + @return whether parsing should proceed + */ + virtual bool number_integer(number_integer_t val) = 0; + + /*! + @brief an unsigned integer number was read + @param[in] val unsigned integer value + @return whether parsing should proceed + */ + virtual bool number_unsigned(number_unsigned_t val) = 0; + + /*! + @brief a floating-point number was read + @param[in] val floating-point value + @param[in] s raw token value + @return whether parsing should proceed + */ + virtual bool number_float(number_float_t val, const string_t& s) = 0; + + /*! + @brief a string value was read + @param[in] val string value + @return whether parsing should proceed + @note It is safe to move the passed string value. + */ + virtual bool string(string_t& val) = 0; + + /*! + @brief a binary value was read + @param[in] val binary value + @return whether parsing should proceed + @note It is safe to move the passed binary value. + */ + virtual bool binary(binary_t& val) = 0; + + /*! + @brief the beginning of an object was read + @param[in] elements number of object elements or -1 if unknown + @return whether parsing should proceed + @note binary formats may report the number of elements + */ + virtual bool start_object(std::size_t elements) = 0; + + /*! + @brief an object key was read + @param[in] val object key + @return whether parsing should proceed + @note It is safe to move the passed string. + */ + virtual bool key(string_t& val) = 0; + + /*! + @brief the end of an object was read + @return whether parsing should proceed + */ + virtual bool end_object() = 0; + + /*! + @brief the beginning of an array was read + @param[in] elements number of array elements or -1 if unknown + @return whether parsing should proceed + @note binary formats may report the number of elements + */ + virtual bool start_array(std::size_t elements) = 0; + + /*! + @brief the end of an array was read + @return whether parsing should proceed + */ + virtual bool end_array() = 0; + + /*! + @brief a parse error occurred + @param[in] position the position in the input where the error occurs + @param[in] last_token the last read token + @param[in] ex an exception object describing the error + @return whether parsing should proceed (must return false) + */ + virtual bool parse_error(std::size_t position, + const std::string& last_token, + const detail::exception& ex) = 0; + + json_sax() = default; + json_sax(const json_sax&) = default; + json_sax(json_sax&&) noexcept = default; + json_sax& operator=(const json_sax&) = default; + json_sax& operator=(json_sax&&) noexcept = default; + virtual ~json_sax() = default; +}; + + +namespace detail +{ +/*! +@brief SAX implementation to create a JSON value from SAX events + +This class implements the @ref json_sax interface and processes the SAX events +to create a JSON value which makes it basically a DOM parser. The structure or +hierarchy of the JSON value is managed by the stack `ref_stack` which contains +a pointer to the respective array or object for each recursion depth. + +After successful parsing, the value that is passed by reference to the +constructor contains the parsed value. + +@tparam BasicJsonType the JSON type +*/ +template +class json_sax_dom_parser +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + /*! + @param[in,out] r reference to a JSON value that is manipulated while + parsing + @param[in] allow_exceptions_ whether parse errors yield exceptions + */ + explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true) + : root(r), allow_exceptions(allow_exceptions_) + {} + + // make class move-only + json_sax_dom_parser(const json_sax_dom_parser&) = delete; + json_sax_dom_parser(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + json_sax_dom_parser& operator=(const json_sax_dom_parser&) = delete; + json_sax_dom_parser& operator=(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~json_sax_dom_parser() = default; + + bool null() + { + handle_value(nullptr); + return true; + } + + bool boolean(bool val) + { + handle_value(val); + return true; + } + + bool number_integer(number_integer_t val) + { + handle_value(val); + return true; + } + + bool number_unsigned(number_unsigned_t val) + { + handle_value(val); + return true; + } + + bool number_float(number_float_t val, const string_t& /*unused*/) + { + handle_value(val); + return true; + } + + bool string(string_t& val) + { + handle_value(val); + return true; + } + + bool binary(binary_t& val) + { + handle_value(std::move(val)); + return true; + } + + bool start_object(std::size_t len) + { + ref_stack.push_back(handle_value(BasicJsonType::value_t::object)); + + if (JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, "excessive object size: " + std::to_string(len), *ref_stack.back())); + } + + return true; + } + + bool key(string_t& val) + { + // add null at given key and store the reference for later + object_element = &(ref_stack.back()->m_value.object->operator[](val)); + return true; + } + + bool end_object() + { + ref_stack.back()->set_parents(); + ref_stack.pop_back(); + return true; + } + + bool start_array(std::size_t len) + { + ref_stack.push_back(handle_value(BasicJsonType::value_t::array)); + + if (JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, "excessive array size: " + std::to_string(len), *ref_stack.back())); + } + + return true; + } + + bool end_array() + { + ref_stack.back()->set_parents(); + ref_stack.pop_back(); + return true; + } + + template + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, + const Exception& ex) + { + errored = true; + static_cast(ex); + if (allow_exceptions) + { + JSON_THROW(ex); + } + return false; + } + + constexpr bool is_errored() const + { + return errored; + } + + private: + /*! + @invariant If the ref stack is empty, then the passed value will be the new + root. + @invariant If the ref stack contains a value, then it is an array or an + object to which we can add elements + */ + template + JSON_HEDLEY_RETURNS_NON_NULL + BasicJsonType* handle_value(Value&& v) + { + if (ref_stack.empty()) + { + root = BasicJsonType(std::forward(v)); + return &root; + } + + JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); + + if (ref_stack.back()->is_array()) + { + ref_stack.back()->m_value.array->emplace_back(std::forward(v)); + return &(ref_stack.back()->m_value.array->back()); + } + + JSON_ASSERT(ref_stack.back()->is_object()); + JSON_ASSERT(object_element); + *object_element = BasicJsonType(std::forward(v)); + return object_element; + } + + /// the parsed JSON value + BasicJsonType& root; + /// stack to model hierarchy of values + std::vector ref_stack {}; + /// helper to hold the reference for the next object element + BasicJsonType* object_element = nullptr; + /// whether a syntax error occurred + bool errored = false; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; + +template +class json_sax_dom_callback_parser +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using parser_callback_t = typename BasicJsonType::parser_callback_t; + using parse_event_t = typename BasicJsonType::parse_event_t; + + json_sax_dom_callback_parser(BasicJsonType& r, + const parser_callback_t cb, + const bool allow_exceptions_ = true) + : root(r), callback(cb), allow_exceptions(allow_exceptions_) + { + keep_stack.push_back(true); + } + + // make class move-only + json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = delete; + json_sax_dom_callback_parser(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_parser&) = delete; + json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~json_sax_dom_callback_parser() = default; + + bool null() + { + handle_value(nullptr); + return true; + } + + bool boolean(bool val) + { + handle_value(val); + return true; + } + + bool number_integer(number_integer_t val) + { + handle_value(val); + return true; + } + + bool number_unsigned(number_unsigned_t val) + { + handle_value(val); + return true; + } + + bool number_float(number_float_t val, const string_t& /*unused*/) + { + handle_value(val); + return true; + } + + bool string(string_t& val) + { + handle_value(val); + return true; + } + + bool binary(binary_t& val) + { + handle_value(std::move(val)); + return true; + } + + bool start_object(std::size_t len) + { + // check callback for object start + const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::object_start, discarded); + keep_stack.push_back(keep); + + auto val = handle_value(BasicJsonType::value_t::object, true); + ref_stack.push_back(val.second); + + // check object limit + if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, "excessive object size: " + std::to_string(len), *ref_stack.back())); + } + + return true; + } + + bool key(string_t& val) + { + BasicJsonType k = BasicJsonType(val); + + // check callback for key + const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::key, k); + key_keep_stack.push_back(keep); + + // add discarded value at given key and store the reference for later + if (keep && ref_stack.back()) + { + object_element = &(ref_stack.back()->m_value.object->operator[](val) = discarded); + } + + return true; + } + + bool end_object() + { + if (ref_stack.back()) + { + if (!callback(static_cast(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) + { + // discard object + *ref_stack.back() = discarded; + } + else + { + ref_stack.back()->set_parents(); + } + } + + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(!keep_stack.empty()); + ref_stack.pop_back(); + keep_stack.pop_back(); + + if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured()) + { + // remove discarded value + for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) + { + if (it->is_discarded()) + { + ref_stack.back()->erase(it); + break; + } + } + } + + return true; + } + + bool start_array(std::size_t len) + { + const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::array_start, discarded); + keep_stack.push_back(keep); + + auto val = handle_value(BasicJsonType::value_t::array, true); + ref_stack.push_back(val.second); + + // check array limit + if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, "excessive array size: " + std::to_string(len), *ref_stack.back())); + } + + return true; + } + + bool end_array() + { + bool keep = true; + + if (ref_stack.back()) + { + keep = callback(static_cast(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back()); + if (keep) + { + ref_stack.back()->set_parents(); + } + else + { + // discard array + *ref_stack.back() = discarded; + } + } + + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(!keep_stack.empty()); + ref_stack.pop_back(); + keep_stack.pop_back(); + + // remove discarded value + if (!keep && !ref_stack.empty() && ref_stack.back()->is_array()) + { + ref_stack.back()->m_value.array->pop_back(); + } + + return true; + } + + template + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, + const Exception& ex) + { + errored = true; + static_cast(ex); + if (allow_exceptions) + { + JSON_THROW(ex); + } + return false; + } + + constexpr bool is_errored() const + { + return errored; + } + + private: + /*! + @param[in] v value to add to the JSON value we build during parsing + @param[in] skip_callback whether we should skip calling the callback + function; this is required after start_array() and + start_object() SAX events, because otherwise we would call the + callback function with an empty array or object, respectively. + + @invariant If the ref stack is empty, then the passed value will be the new + root. + @invariant If the ref stack contains a value, then it is an array or an + object to which we can add elements + + @return pair of boolean (whether value should be kept) and pointer (to the + passed value in the ref_stack hierarchy; nullptr if not kept) + */ + template + std::pair handle_value(Value&& v, const bool skip_callback = false) + { + JSON_ASSERT(!keep_stack.empty()); + + // do not handle this value if we know it would be added to a discarded + // container + if (!keep_stack.back()) + { + return {false, nullptr}; + } + + // create value + auto value = BasicJsonType(std::forward(v)); + + // check callback + const bool keep = skip_callback || callback(static_cast(ref_stack.size()), parse_event_t::value, value); + + // do not handle this value if we just learnt it shall be discarded + if (!keep) + { + return {false, nullptr}; + } + + if (ref_stack.empty()) + { + root = std::move(value); + return {true, &root}; + } + + // skip this value if we already decided to skip the parent + // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) + if (!ref_stack.back()) + { + return {false, nullptr}; + } + + // we now only expect arrays and objects + JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); + + // array + if (ref_stack.back()->is_array()) + { + ref_stack.back()->m_value.array->emplace_back(std::move(value)); + return {true, &(ref_stack.back()->m_value.array->back())}; + } + + // object + JSON_ASSERT(ref_stack.back()->is_object()); + // check if we should store an element for the current key + JSON_ASSERT(!key_keep_stack.empty()); + const bool store_element = key_keep_stack.back(); + key_keep_stack.pop_back(); + + if (!store_element) + { + return {false, nullptr}; + } + + JSON_ASSERT(object_element); + *object_element = std::move(value); + return {true, object_element}; + } + + /// the parsed JSON value + BasicJsonType& root; + /// stack to model hierarchy of values + std::vector ref_stack {}; + /// stack to manage which values to keep + std::vector keep_stack {}; + /// stack to manage which object keys to keep + std::vector key_keep_stack {}; + /// helper to hold the reference for the next object element + BasicJsonType* object_element = nullptr; + /// whether a syntax error occurred + bool errored = false; + /// callback function + const parser_callback_t callback = nullptr; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; + /// a discarded value for the callback + BasicJsonType discarded = BasicJsonType::value_t::discarded; +}; + +template +class json_sax_acceptor +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + bool null() + { + return true; + } + + bool boolean(bool /*unused*/) + { + return true; + } + + bool number_integer(number_integer_t /*unused*/) + { + return true; + } + + bool number_unsigned(number_unsigned_t /*unused*/) + { + return true; + } + + bool number_float(number_float_t /*unused*/, const string_t& /*unused*/) + { + return true; + } + + bool string(string_t& /*unused*/) + { + return true; + } + + bool binary(binary_t& /*unused*/) + { + return true; + } + + bool start_object(std::size_t /*unused*/ = static_cast(-1)) + { + return true; + } + + bool key(string_t& /*unused*/) + { + return true; + } + + bool end_object() + { + return true; + } + + bool start_array(std::size_t /*unused*/ = static_cast(-1)) + { + return true; + } + + bool end_array() + { + return true; + } + + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const detail::exception& /*unused*/) + { + return false; + } +}; +} // namespace detail + +} // namespace nlohmann + +// #include + + +#include // array +#include // localeconv +#include // size_t +#include // snprintf +#include // strtof, strtod, strtold, strtoll, strtoull +#include // initializer_list +#include // char_traits, string +#include // move +#include // vector + +// #include + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +/////////// +// lexer // +/////////// + +template +class lexer_base +{ + public: + /// token types for the parser + enum class token_type + { + uninitialized, ///< indicating the scanner is uninitialized + literal_true, ///< the `true` literal + literal_false, ///< the `false` literal + literal_null, ///< the `null` literal + value_string, ///< a string -- use get_string() for actual value + value_unsigned, ///< an unsigned integer -- use get_number_unsigned() for actual value + value_integer, ///< a signed integer -- use get_number_integer() for actual value + value_float, ///< an floating point number -- use get_number_float() for actual value + begin_array, ///< the character for array begin `[` + begin_object, ///< the character for object begin `{` + end_array, ///< the character for array end `]` + end_object, ///< the character for object end `}` + name_separator, ///< the name separator `:` + value_separator, ///< the value separator `,` + parse_error, ///< indicating a parse error + end_of_input, ///< indicating the end of the input buffer + literal_or_value ///< a literal or the begin of a value (only for diagnostics) + }; + + /// return name of values of type token_type (only used for errors) + JSON_HEDLEY_RETURNS_NON_NULL + JSON_HEDLEY_CONST + static const char* token_type_name(const token_type t) noexcept + { + switch (t) + { + case token_type::uninitialized: + return ""; + case token_type::literal_true: + return "true literal"; + case token_type::literal_false: + return "false literal"; + case token_type::literal_null: + return "null literal"; + case token_type::value_string: + return "string literal"; + case token_type::value_unsigned: + case token_type::value_integer: + case token_type::value_float: + return "number literal"; + case token_type::begin_array: + return "'['"; + case token_type::begin_object: + return "'{'"; + case token_type::end_array: + return "']'"; + case token_type::end_object: + return "'}'"; + case token_type::name_separator: + return "':'"; + case token_type::value_separator: + return "','"; + case token_type::parse_error: + return ""; + case token_type::end_of_input: + return "end of input"; + case token_type::literal_or_value: + return "'[', '{', or a literal"; + // LCOV_EXCL_START + default: // catch non-enum values + return "unknown token"; + // LCOV_EXCL_STOP + } + } +}; +/*! +@brief lexical analysis + +This class organizes the lexical analysis during JSON deserialization. +*/ +template +class lexer : public lexer_base +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using char_type = typename InputAdapterType::char_type; + using char_int_type = typename std::char_traits::int_type; + + public: + using token_type = typename lexer_base::token_type; + + explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept + : ia(std::move(adapter)) + , ignore_comments(ignore_comments_) + , decimal_point_char(static_cast(get_decimal_point())) + {} + + // delete because of pointer members + lexer(const lexer&) = delete; + lexer(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + lexer& operator=(lexer&) = delete; + lexer& operator=(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~lexer() = default; + + private: + ///////////////////// + // locales + ///////////////////// + + /// return the locale-dependent decimal point + JSON_HEDLEY_PURE + static char get_decimal_point() noexcept + { + const auto* loc = localeconv(); + JSON_ASSERT(loc != nullptr); + return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point); + } + + ///////////////////// + // scan functions + ///////////////////// + + /*! + @brief get codepoint from 4 hex characters following `\u` + + For input "\u c1 c2 c3 c4" the codepoint is: + (c1 * 0x1000) + (c2 * 0x0100) + (c3 * 0x0010) + c4 + = (c1 << 12) + (c2 << 8) + (c3 << 4) + (c4 << 0) + + Furthermore, the possible characters '0'..'9', 'A'..'F', and 'a'..'f' + must be converted to the integers 0x0..0x9, 0xA..0xF, 0xA..0xF, resp. The + conversion is done by subtracting the offset (0x30, 0x37, and 0x57) + between the ASCII value of the character and the desired integer value. + + @return codepoint (0x0000..0xFFFF) or -1 in case of an error (e.g. EOF or + non-hex character) + */ + int get_codepoint() + { + // this function only makes sense after reading `\u` + JSON_ASSERT(current == 'u'); + int codepoint = 0; + + const auto factors = { 12u, 8u, 4u, 0u }; + for (const auto factor : factors) + { + get(); + + if (current >= '0' && current <= '9') + { + codepoint += static_cast((static_cast(current) - 0x30u) << factor); + } + else if (current >= 'A' && current <= 'F') + { + codepoint += static_cast((static_cast(current) - 0x37u) << factor); + } + else if (current >= 'a' && current <= 'f') + { + codepoint += static_cast((static_cast(current) - 0x57u) << factor); + } + else + { + return -1; + } + } + + JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); + return codepoint; + } + + /*! + @brief check if the next byte(s) are inside a given range + + Adds the current byte and, for each passed range, reads a new byte and + checks if it is inside the range. If a violation was detected, set up an + error message and return false. Otherwise, return true. + + @param[in] ranges list of integers; interpreted as list of pairs of + inclusive lower and upper bound, respectively + + @pre The passed list @a ranges must have 2, 4, or 6 elements; that is, + 1, 2, or 3 pairs. This precondition is enforced by an assertion. + + @return true if and only if no range violation was detected + */ + bool next_byte_in_range(std::initializer_list ranges) + { + JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); + add(current); + + for (auto range = ranges.begin(); range != ranges.end(); ++range) + { + get(); + if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) + { + add(current); + } + else + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return false; + } + } + + return true; + } + + /*! + @brief scan a string literal + + This function scans a string according to Sect. 7 of RFC 8259. While + scanning, bytes are escaped and copied into buffer token_buffer. Then the + function returns successfully, token_buffer is *not* null-terminated (as it + may contain \0 bytes), and token_buffer.size() is the number of bytes in the + string. + + @return token_type::value_string if string could be successfully scanned, + token_type::parse_error otherwise + + @note In case of errors, variable error_message contains a textual + description. + */ + token_type scan_string() + { + // reset token_buffer (ignore opening quote) + reset(); + + // we entered the function by reading an open quote + JSON_ASSERT(current == '\"'); + + while (true) + { + // get next character + switch (get()) + { + // end of file while parsing string + case std::char_traits::eof(): + { + error_message = "invalid string: missing closing quote"; + return token_type::parse_error; + } + + // closing quote + case '\"': + { + return token_type::value_string; + } + + // escapes + case '\\': + { + switch (get()) + { + // quotation mark + case '\"': + add('\"'); + break; + // reverse solidus + case '\\': + add('\\'); + break; + // solidus + case '/': + add('/'); + break; + // backspace + case 'b': + add('\b'); + break; + // form feed + case 'f': + add('\f'); + break; + // line feed + case 'n': + add('\n'); + break; + // carriage return + case 'r': + add('\r'); + break; + // tab + case 't': + add('\t'); + break; + + // unicode escapes + case 'u': + { + const int codepoint1 = get_codepoint(); + int codepoint = codepoint1; // start with codepoint1 + + if (JSON_HEDLEY_UNLIKELY(codepoint1 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if code point is a high surrogate + if (0xD800 <= codepoint1 && codepoint1 <= 0xDBFF) + { + // expect next \uxxxx entry + if (JSON_HEDLEY_LIKELY(get() == '\\' && get() == 'u')) + { + const int codepoint2 = get_codepoint(); + + if (JSON_HEDLEY_UNLIKELY(codepoint2 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if codepoint2 is a low surrogate + if (JSON_HEDLEY_LIKELY(0xDC00 <= codepoint2 && codepoint2 <= 0xDFFF)) + { + // overwrite codepoint + codepoint = static_cast( + // high surrogate occupies the most significant 22 bits + (static_cast(codepoint1) << 10u) + // low surrogate occupies the least significant 15 bits + + static_cast(codepoint2) + // there is still the 0xD800, 0xDC00 and 0x10000 noise + // in the result, so we have to subtract with: + // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00 + - 0x35FDC00u); + } + else + { + error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + if (JSON_HEDLEY_UNLIKELY(0xDC00 <= codepoint1 && codepoint1 <= 0xDFFF)) + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; + return token_type::parse_error; + } + } + + // result of the above calculation yields a proper codepoint + JSON_ASSERT(0x00 <= codepoint && codepoint <= 0x10FFFF); + + // translate codepoint into bytes + if (codepoint < 0x80) + { + // 1-byte characters: 0xxxxxxx (ASCII) + add(static_cast(codepoint)); + } + else if (codepoint <= 0x7FF) + { + // 2-byte characters: 110xxxxx 10xxxxxx + add(static_cast(0xC0u | (static_cast(codepoint) >> 6u))); + add(static_cast(0x80u | (static_cast(codepoint) & 0x3Fu))); + } + else if (codepoint <= 0xFFFF) + { + // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx + add(static_cast(0xE0u | (static_cast(codepoint) >> 12u))); + add(static_cast(0x80u | ((static_cast(codepoint) >> 6u) & 0x3Fu))); + add(static_cast(0x80u | (static_cast(codepoint) & 0x3Fu))); + } + else + { + // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + add(static_cast(0xF0u | (static_cast(codepoint) >> 18u))); + add(static_cast(0x80u | ((static_cast(codepoint) >> 12u) & 0x3Fu))); + add(static_cast(0x80u | ((static_cast(codepoint) >> 6u) & 0x3Fu))); + add(static_cast(0x80u | (static_cast(codepoint) & 0x3Fu))); + } + + break; + } + + // other characters after escape + default: + error_message = "invalid string: forbidden character after backslash"; + return token_type::parse_error; + } + + break; + } + + // invalid control characters + case 0x00: + { + error_message = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000"; + return token_type::parse_error; + } + + case 0x01: + { + error_message = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001"; + return token_type::parse_error; + } + + case 0x02: + { + error_message = "invalid string: control character U+0002 (STX) must be escaped to \\u0002"; + return token_type::parse_error; + } + + case 0x03: + { + error_message = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003"; + return token_type::parse_error; + } + + case 0x04: + { + error_message = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004"; + return token_type::parse_error; + } + + case 0x05: + { + error_message = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005"; + return token_type::parse_error; + } + + case 0x06: + { + error_message = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006"; + return token_type::parse_error; + } + + case 0x07: + { + error_message = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007"; + return token_type::parse_error; + } + + case 0x08: + { + error_message = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b"; + return token_type::parse_error; + } + + case 0x09: + { + error_message = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t"; + return token_type::parse_error; + } + + case 0x0A: + { + error_message = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n"; + return token_type::parse_error; + } + + case 0x0B: + { + error_message = "invalid string: control character U+000B (VT) must be escaped to \\u000B"; + return token_type::parse_error; + } + + case 0x0C: + { + error_message = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f"; + return token_type::parse_error; + } + + case 0x0D: + { + error_message = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r"; + return token_type::parse_error; + } + + case 0x0E: + { + error_message = "invalid string: control character U+000E (SO) must be escaped to \\u000E"; + return token_type::parse_error; + } + + case 0x0F: + { + error_message = "invalid string: control character U+000F (SI) must be escaped to \\u000F"; + return token_type::parse_error; + } + + case 0x10: + { + error_message = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010"; + return token_type::parse_error; + } + + case 0x11: + { + error_message = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011"; + return token_type::parse_error; + } + + case 0x12: + { + error_message = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012"; + return token_type::parse_error; + } + + case 0x13: + { + error_message = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013"; + return token_type::parse_error; + } + + case 0x14: + { + error_message = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014"; + return token_type::parse_error; + } + + case 0x15: + { + error_message = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015"; + return token_type::parse_error; + } + + case 0x16: + { + error_message = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016"; + return token_type::parse_error; + } + + case 0x17: + { + error_message = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017"; + return token_type::parse_error; + } + + case 0x18: + { + error_message = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018"; + return token_type::parse_error; + } + + case 0x19: + { + error_message = "invalid string: control character U+0019 (EM) must be escaped to \\u0019"; + return token_type::parse_error; + } + + case 0x1A: + { + error_message = "invalid string: control character U+001A (SUB) must be escaped to \\u001A"; + return token_type::parse_error; + } + + case 0x1B: + { + error_message = "invalid string: control character U+001B (ESC) must be escaped to \\u001B"; + return token_type::parse_error; + } + + case 0x1C: + { + error_message = "invalid string: control character U+001C (FS) must be escaped to \\u001C"; + return token_type::parse_error; + } + + case 0x1D: + { + error_message = "invalid string: control character U+001D (GS) must be escaped to \\u001D"; + return token_type::parse_error; + } + + case 0x1E: + { + error_message = "invalid string: control character U+001E (RS) must be escaped to \\u001E"; + return token_type::parse_error; + } + + case 0x1F: + { + error_message = "invalid string: control character U+001F (US) must be escaped to \\u001F"; + return token_type::parse_error; + } + + // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace)) + case 0x20: + case 0x21: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + { + add(current); + break; + } + + // U+0080..U+07FF: bytes C2..DF 80..BF + case 0xC2: + case 0xC3: + case 0xC4: + case 0xC5: + case 0xC6: + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD5: + case 0xD6: + case 0xD7: + case 0xD8: + case 0xD9: + case 0xDA: + case 0xDB: + case 0xDC: + case 0xDD: + case 0xDE: + case 0xDF: + { + if (JSON_HEDLEY_UNLIKELY(!next_byte_in_range({0x80, 0xBF}))) + { + return token_type::parse_error; + } + break; + } + + // U+0800..U+0FFF: bytes E0 A0..BF 80..BF + case 0xE0: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF + // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xEE: + case 0xEF: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+D000..U+D7FF: bytes ED 80..9F 80..BF + case 0xED: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x9F, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF + case 0xF0: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF + case 0xF1: + case 0xF2: + case 0xF3: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF + case 0xF4: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // remaining bytes (80..C1 and F5..FF) are ill-formed + default: + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return token_type::parse_error; + } + } + } + } + + /*! + * @brief scan a comment + * @return whether comment could be scanned successfully + */ + bool scan_comment() + { + switch (get()) + { + // single-line comments skip input until a newline or EOF is read + case '/': + { + while (true) + { + switch (get()) + { + case '\n': + case '\r': + case std::char_traits::eof(): + case '\0': + return true; + + default: + break; + } + } + } + + // multi-line comments skip input until */ is read + case '*': + { + while (true) + { + switch (get()) + { + case std::char_traits::eof(): + case '\0': + { + error_message = "invalid comment; missing closing '*/'"; + return false; + } + + case '*': + { + switch (get()) + { + case '/': + return true; + + default: + { + unget(); + continue; + } + } + } + + default: + continue; + } + } + } + + // unexpected character after reading '/' + default: + { + error_message = "invalid comment; expecting '/' or '*' after '/'"; + return false; + } + } + } + + JSON_HEDLEY_NON_NULL(2) + static void strtof(float& f, const char* str, char** endptr) noexcept + { + f = std::strtof(str, endptr); + } + + JSON_HEDLEY_NON_NULL(2) + static void strtof(double& f, const char* str, char** endptr) noexcept + { + f = std::strtod(str, endptr); + } + + JSON_HEDLEY_NON_NULL(2) + static void strtof(long double& f, const char* str, char** endptr) noexcept + { + f = std::strtold(str, endptr); + } + + /*! + @brief scan a number literal + + This function scans a string according to Sect. 6 of RFC 8259. + + The function is realized with a deterministic finite state machine derived + from the grammar described in RFC 8259. Starting in state "init", the + input is read and used to determined the next state. Only state "done" + accepts the number. State "error" is a trap state to model errors. In the + table below, "anything" means any character but the ones listed before. + + state | 0 | 1-9 | e E | + | - | . | anything + ---------|----------|----------|----------|---------|---------|----------|----------- + init | zero | any1 | [error] | [error] | minus | [error] | [error] + minus | zero | any1 | [error] | [error] | [error] | [error] | [error] + zero | done | done | exponent | done | done | decimal1 | done + any1 | any1 | any1 | exponent | done | done | decimal1 | done + decimal1 | decimal2 | decimal2 | [error] | [error] | [error] | [error] | [error] + decimal2 | decimal2 | decimal2 | exponent | done | done | done | done + exponent | any2 | any2 | [error] | sign | sign | [error] | [error] + sign | any2 | any2 | [error] | [error] | [error] | [error] | [error] + any2 | any2 | any2 | done | done | done | done | done + + The state machine is realized with one label per state (prefixed with + "scan_number_") and `goto` statements between them. The state machine + contains cycles, but any cycle can be left when EOF is read. Therefore, + the function is guaranteed to terminate. + + During scanning, the read bytes are stored in token_buffer. This string is + then converted to a signed integer, an unsigned integer, or a + floating-point number. + + @return token_type::value_unsigned, token_type::value_integer, or + token_type::value_float if number could be successfully scanned, + token_type::parse_error otherwise + + @note The scanner is independent of the current locale. Internally, the + locale's decimal point is used instead of `.` to work with the + locale-dependent converters. + */ + token_type scan_number() // lgtm [cpp/use-of-goto] + { + // reset token_buffer to store the number's bytes + reset(); + + // the type of the parsed number; initially set to unsigned; will be + // changed if minus sign, decimal point or exponent is read + token_type number_type = token_type::value_unsigned; + + // state (init): we just found out we need to scan a number + switch (current) + { + case '-': + { + add(current); + goto scan_number_minus; + } + + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + // all other characters are rejected outside scan_number() + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + +scan_number_minus: + // state: we just parsed a leading minus sign + number_type = token_type::value_integer; + switch (get()) + { + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + error_message = "invalid number; expected digit after '-'"; + return token_type::parse_error; + } + } + +scan_number_zero: + // state: we just parse a zero (maybe with a leading minus sign) + switch (get()) + { + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_any1: + // state: we just parsed a number 0-9 (maybe with a leading minus sign) + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_decimal1: + // state: we just parsed a decimal point + number_type = token_type::value_float; + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + default: + { + error_message = "invalid number; expected digit after '.'"; + return token_type::parse_error; + } + } + +scan_number_decimal2: + // we just parsed at least one number after a decimal point + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_exponent: + // we just parsed an exponent + number_type = token_type::value_float; + switch (get()) + { + case '+': + case '-': + { + add(current); + goto scan_number_sign; + } + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = + "invalid number; expected '+', '-', or digit after exponent"; + return token_type::parse_error; + } + } + +scan_number_sign: + // we just parsed an exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = "invalid number; expected digit after exponent sign"; + return token_type::parse_error; + } + } + +scan_number_any2: + // we just parsed a number after the exponent or exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + goto scan_number_done; + } + +scan_number_done: + // unget the character after the number (we only read it to know that + // we are done scanning a number) + unget(); + + char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + errno = 0; + + // try to parse integers first and fall back to floats + if (number_type == token_type::value_unsigned) + { + const auto x = std::strtoull(token_buffer.data(), &endptr, 10); + + // we checked the number format before + JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); + + if (errno == 0) + { + value_unsigned = static_cast(x); + if (value_unsigned == x) + { + return token_type::value_unsigned; + } + } + } + else if (number_type == token_type::value_integer) + { + const auto x = std::strtoll(token_buffer.data(), &endptr, 10); + + // we checked the number format before + JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); + + if (errno == 0) + { + value_integer = static_cast(x); + if (value_integer == x) + { + return token_type::value_integer; + } + } + } + + // this code is reached if we parse a floating-point number or if an + // integer conversion above failed + strtof(value_float, token_buffer.data(), &endptr); + + // we checked the number format before + JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); + + return token_type::value_float; + } + + /*! + @param[in] literal_text the literal text to expect + @param[in] length the length of the passed literal text + @param[in] return_type the token type to return on success + */ + JSON_HEDLEY_NON_NULL(2) + token_type scan_literal(const char_type* literal_text, const std::size_t length, + token_type return_type) + { + JSON_ASSERT(std::char_traits::to_char_type(current) == literal_text[0]); + for (std::size_t i = 1; i < length; ++i) + { + if (JSON_HEDLEY_UNLIKELY(std::char_traits::to_char_type(get()) != literal_text[i])) + { + error_message = "invalid literal"; + return token_type::parse_error; + } + } + return return_type; + } + + ///////////////////// + // input management + ///////////////////// + + /// reset token_buffer; current character is beginning of token + void reset() noexcept + { + token_buffer.clear(); + token_string.clear(); + token_string.push_back(std::char_traits::to_char_type(current)); + } + + /* + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a + `std::char_traits::eof()` in that case. Stores the scanned characters + for use in error messages. + + @return character read from the input + */ + char_int_type get() + { + ++position.chars_read_total; + ++position.chars_read_current_line; + + if (next_unget) + { + // just reset the next_unget variable and work with current + next_unget = false; + } + else + { + current = ia.get_character(); + } + + if (JSON_HEDLEY_LIKELY(current != std::char_traits::eof())) + { + token_string.push_back(std::char_traits::to_char_type(current)); + } + + if (current == '\n') + { + ++position.lines_read; + position.chars_read_current_line = 0; + } + + return current; + } + + /*! + @brief unget current character (read it again on next get) + + We implement unget by setting variable next_unget to true. The input is not + changed - we just simulate ungetting by modifying chars_read_total, + chars_read_current_line, and token_string. The next call to get() will + behave as if the unget character is read again. + */ + void unget() + { + next_unget = true; + + --position.chars_read_total; + + // in case we "unget" a newline, we have to also decrement the lines_read + if (position.chars_read_current_line == 0) + { + if (position.lines_read > 0) + { + --position.lines_read; + } + } + else + { + --position.chars_read_current_line; + } + + if (JSON_HEDLEY_LIKELY(current != std::char_traits::eof())) + { + JSON_ASSERT(!token_string.empty()); + token_string.pop_back(); + } + } + + /// add a character to token_buffer + void add(char_int_type c) + { + token_buffer.push_back(static_cast(c)); + } + + public: + ///////////////////// + // value getters + ///////////////////// + + /// return integer value + constexpr number_integer_t get_number_integer() const noexcept + { + return value_integer; + } + + /// return unsigned integer value + constexpr number_unsigned_t get_number_unsigned() const noexcept + { + return value_unsigned; + } + + /// return floating-point value + constexpr number_float_t get_number_float() const noexcept + { + return value_float; + } + + /// return current string value (implicitly resets the token; useful only once) + string_t& get_string() + { + return token_buffer; + } + + ///////////////////// + // diagnostics + ///////////////////// + + /// return position of last read token + constexpr position_t get_position() const noexcept + { + return position; + } + + /// return the last read token (for errors only). Will never contain EOF + /// (an arbitrary value that is not a valid char value, often -1), because + /// 255 may legitimately occur. May contain NUL, which should be escaped. + std::string get_token_string() const + { + // escape control characters + std::string result; + for (const auto c : token_string) + { + if (static_cast(c) <= '\x1F') + { + // escape control characters + std::array cs{{}}; + static_cast((std::snprintf)(cs.data(), cs.size(), "", static_cast(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + result += cs.data(); + } + else + { + // add character as is + result.push_back(static_cast(c)); + } + } + + return result; + } + + /// return syntax error message + JSON_HEDLEY_RETURNS_NON_NULL + constexpr const char* get_error_message() const noexcept + { + return error_message; + } + + ///////////////////// + // actual scanner + ///////////////////// + + /*! + @brief skip the UTF-8 byte order mark + @return true iff there is no BOM or the correct BOM has been skipped + */ + bool skip_bom() + { + if (get() == 0xEF) + { + // check if we completely parse the BOM + return get() == 0xBB && get() == 0xBF; + } + + // the first character is not the beginning of the BOM; unget it to + // process is later + unget(); + return true; + } + + void skip_whitespace() + { + do + { + get(); + } + while (current == ' ' || current == '\t' || current == '\n' || current == '\r'); + } + + token_type scan() + { + // initially, skip the BOM + if (position.chars_read_total == 0 && !skip_bom()) + { + error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; + return token_type::parse_error; + } + + // read next character and ignore whitespace + skip_whitespace(); + + // ignore comments + while (ignore_comments && current == '/') + { + if (!scan_comment()) + { + return token_type::parse_error; + } + + // skip following whitespace + skip_whitespace(); + } + + switch (current) + { + // structural characters + case '[': + return token_type::begin_array; + case ']': + return token_type::end_array; + case '{': + return token_type::begin_object; + case '}': + return token_type::end_object; + case ':': + return token_type::name_separator; + case ',': + return token_type::value_separator; + + // literals + case 't': + { + std::array true_literal = {{static_cast('t'), static_cast('r'), static_cast('u'), static_cast('e')}}; + return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); + } + case 'f': + { + std::array false_literal = {{static_cast('f'), static_cast('a'), static_cast('l'), static_cast('s'), static_cast('e')}}; + return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); + } + case 'n': + { + std::array null_literal = {{static_cast('n'), static_cast('u'), static_cast('l'), static_cast('l')}}; + return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); + } + + // string + case '\"': + return scan_string(); + + // number + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return scan_number(); + + // end of input (the null byte is needed when parsing from + // string literals) + case '\0': + case std::char_traits::eof(): + return token_type::end_of_input; + + // error + default: + error_message = "invalid literal"; + return token_type::parse_error; + } + } + + private: + /// input adapter + InputAdapterType ia; + + /// whether comments should be ignored (true) or signaled as errors (false) + const bool ignore_comments = false; + + /// the current character + char_int_type current = std::char_traits::eof(); + + /// whether the next get() call should just return current + bool next_unget = false; + + /// the start position of the current token + position_t position {}; + + /// raw input token string (for error messages) + std::vector token_string {}; + + /// buffer for variable-length tokens (numbers, strings) + string_t token_buffer {}; + + /// a description of occurred lexer errors + const char* error_message = ""; + + // number values + number_integer_t value_integer = 0; + number_unsigned_t value_unsigned = 0; + number_float_t value_float = 0; + + /// the decimal point + const char_int_type decimal_point_char = '.'; +}; +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + + +#include // size_t +#include // declval +#include // string + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template +using null_function_t = decltype(std::declval().null()); + +template +using boolean_function_t = + decltype(std::declval().boolean(std::declval())); + +template +using number_integer_function_t = + decltype(std::declval().number_integer(std::declval())); + +template +using number_unsigned_function_t = + decltype(std::declval().number_unsigned(std::declval())); + +template +using number_float_function_t = decltype(std::declval().number_float( + std::declval(), std::declval())); + +template +using string_function_t = + decltype(std::declval().string(std::declval())); + +template +using binary_function_t = + decltype(std::declval().binary(std::declval())); + +template +using start_object_function_t = + decltype(std::declval().start_object(std::declval())); + +template +using key_function_t = + decltype(std::declval().key(std::declval())); + +template +using end_object_function_t = decltype(std::declval().end_object()); + +template +using start_array_function_t = + decltype(std::declval().start_array(std::declval())); + +template +using end_array_function_t = decltype(std::declval().end_array()); + +template +using parse_error_function_t = decltype(std::declval().parse_error( + std::declval(), std::declval(), + std::declval())); + +template +struct is_sax +{ + private: + static_assert(is_basic_json::value, + "BasicJsonType must be of type basic_json<...>"); + + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using exception_t = typename BasicJsonType::exception; + + public: + static constexpr bool value = + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value; +}; + +template +struct is_sax_static_asserts +{ + private: + static_assert(is_basic_json::value, + "BasicJsonType must be of type basic_json<...>"); + + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using exception_t = typename BasicJsonType::exception; + + public: + static_assert(is_detected_exact::value, + "Missing/invalid function: bool null()"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool boolean(bool)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool boolean(bool)"); + static_assert( + is_detected_exact::value, + "Missing/invalid function: bool number_integer(number_integer_t)"); + static_assert( + is_detected_exact::value, + "Missing/invalid function: bool number_unsigned(number_unsigned_t)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool number_float(number_float_t, const string_t&)"); + static_assert( + is_detected_exact::value, + "Missing/invalid function: bool string(string_t&)"); + static_assert( + is_detected_exact::value, + "Missing/invalid function: bool binary(binary_t&)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool start_object(std::size_t)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool key(string_t&)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool end_object()"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool start_array(std::size_t)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool end_array()"); + static_assert( + is_detected_exact::value, + "Missing/invalid function: bool parse_error(std::size_t, const " + "std::string&, const exception&)"); +}; +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ + +/// how to treat CBOR tags +enum class cbor_tag_handler_t +{ + error, ///< throw a parse_error exception in case of a tag + ignore, ///< ignore tags + store ///< store tags as binary type +}; + +/*! +@brief determine system byte order + +@return true if and only if system's byte order is little endian + +@note from https://stackoverflow.com/a/1001328/266378 +*/ +static inline bool little_endianness(int num = 1) noexcept +{ + return *reinterpret_cast(&num) == 1; +} + + +/////////////////// +// binary reader // +/////////////////// + +/*! +@brief deserialization of CBOR, MessagePack, and UBJSON values +*/ +template> +class binary_reader +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using json_sax_t = SAX; + using char_type = typename InputAdapterType::char_type; + using char_int_type = typename std::char_traits::int_type; + + public: + /*! + @brief create a binary reader + + @param[in] adapter input adapter to read from + */ + explicit binary_reader(InputAdapterType&& adapter) noexcept : ia(std::move(adapter)) + { + (void)detail::is_sax_static_asserts {}; + } + + // make class move-only + binary_reader(const binary_reader&) = delete; + binary_reader(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + binary_reader& operator=(const binary_reader&) = delete; + binary_reader& operator=(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~binary_reader() = default; + + /*! + @param[in] format the binary format to parse + @param[in] sax_ a SAX event processor + @param[in] strict whether to expect the input to be consumed completed + @param[in] tag_handler how to treat CBOR tags + + @return whether parsing was successful + */ + JSON_HEDLEY_NON_NULL(3) + bool sax_parse(const input_format_t format, + json_sax_t* sax_, + const bool strict = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + sax = sax_; + bool result = false; + + switch (format) + { + case input_format_t::bson: + result = parse_bson_internal(); + break; + + case input_format_t::cbor: + result = parse_cbor_internal(true, tag_handler); + break; + + case input_format_t::msgpack: + result = parse_msgpack_internal(); + break; + + case input_format_t::ubjson: + result = parse_ubjson_internal(); + break; + + case input_format_t::json: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + + // strict mode: next byte must be EOF + if (result && strict) + { + if (format == input_format_t::ubjson) + { + get_ignore_noop(); + } + else + { + get(); + } + + if (JSON_HEDLEY_UNLIKELY(current != std::char_traits::eof())) + { + return sax->parse_error(chars_read, get_token_string(), + parse_error::create(110, chars_read, exception_message(format, "expected end of input; last byte: 0x" + get_token_string(), "value"), BasicJsonType())); + } + } + + return result; + } + + private: + ////////// + // BSON // + ////////// + + /*! + @brief Reads in a BSON-object and passes it to the SAX-parser. + @return whether a valid BSON-value was passed to the SAX parser + */ + bool parse_bson_internal() + { + std::int32_t document_size{}; + get_number(input_format_t::bson, document_size); + + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast(-1)))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/false))) + { + return false; + } + + return sax->end_object(); + } + + /*! + @brief Parses a C-style string from the BSON input. + @param[in,out] result A reference to the string variable where the read + string is to be stored. + @return `true` if the \x00-byte indicating the end of the string was + encountered before the EOF; false` indicates an unexpected EOF. + */ + bool get_bson_cstr(string_t& result) + { + auto out = std::back_inserter(result); + while (true) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson, "cstring"))) + { + return false; + } + if (current == 0x00) + { + return true; + } + *out++ = static_cast(current); + } + } + + /*! + @brief Parses a zero-terminated string of length @a len from the BSON + input. + @param[in] len The length (including the zero-byte at the end) of the + string to be read. + @param[in,out] result A reference to the string variable where the read + string is to be stored. + @tparam NumberType The type of the length @a len + @pre len >= 1 + @return `true` if the string was successfully parsed + */ + template + bool get_bson_string(const NumberType len, string_t& result) + { + if (JSON_HEDLEY_UNLIKELY(len < 1)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, "string length must be at least 1, is " + std::to_string(len), "string"), BasicJsonType())); + } + + return get_string(input_format_t::bson, len - static_cast(1), result) && get() != std::char_traits::eof(); + } + + /*! + @brief Parses a byte array input of length @a len from the BSON input. + @param[in] len The length of the byte array to be read. + @param[in,out] result A reference to the binary variable where the read + array is to be stored. + @tparam NumberType The type of the length @a len + @pre len >= 0 + @return `true` if the byte array was successfully parsed + */ + template + bool get_bson_binary(const NumberType len, binary_t& result) + { + if (JSON_HEDLEY_UNLIKELY(len < 0)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, "byte array length cannot be negative, is " + std::to_string(len), "binary"), BasicJsonType())); + } + + // All BSON binary values have a subtype + std::uint8_t subtype{}; + get_number(input_format_t::bson, subtype); + result.set_subtype(subtype); + + return get_binary(input_format_t::bson, len, result); + } + + /*! + @brief Read a BSON document element of the given @a element_type. + @param[in] element_type The BSON element type, c.f. http://bsonspec.org/spec.html + @param[in] element_type_parse_position The position in the input stream, + where the `element_type` was read. + @warning Not all BSON element types are supported yet. An unsupported + @a element_type will give rise to a parse_error.114: + Unsupported BSON record type 0x... + @return whether a valid BSON-object/array was passed to the SAX parser + */ + bool parse_bson_element_internal(const char_int_type element_type, + const std::size_t element_type_parse_position) + { + switch (element_type) + { + case 0x01: // double + { + double number{}; + return get_number(input_format_t::bson, number) && sax->number_float(static_cast(number), ""); + } + + case 0x02: // string + { + std::int32_t len{}; + string_t value; + return get_number(input_format_t::bson, len) && get_bson_string(len, value) && sax->string(value); + } + + case 0x03: // object + { + return parse_bson_internal(); + } + + case 0x04: // array + { + return parse_bson_array(); + } + + case 0x05: // binary + { + std::int32_t len{}; + binary_t value; + return get_number(input_format_t::bson, len) && get_bson_binary(len, value) && sax->binary(value); + } + + case 0x08: // boolean + { + return sax->boolean(get() != 0); + } + + case 0x0A: // null + { + return sax->null(); + } + + case 0x10: // int32 + { + std::int32_t value{}; + return get_number(input_format_t::bson, value) && sax->number_integer(value); + } + + case 0x12: // int64 + { + std::int64_t value{}; + return get_number(input_format_t::bson, value) && sax->number_integer(value); + } + + default: // anything else not supported (yet) + { + std::array cr{{}}; + static_cast((std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast(element_type))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + return sax->parse_error(element_type_parse_position, std::string(cr.data()), parse_error::create(114, element_type_parse_position, "Unsupported BSON record type 0x" + std::string(cr.data()), BasicJsonType())); + } + } + } + + /*! + @brief Read a BSON element list (as specified in the BSON-spec) + + The same binary layout is used for objects and arrays, hence it must be + indicated with the argument @a is_array which one is expected + (true --> array, false --> object). + + @param[in] is_array Determines if the element list being read is to be + treated as an object (@a is_array == false), or as an + array (@a is_array == true). + @return whether a valid BSON-object/array was passed to the SAX parser + */ + bool parse_bson_element_list(const bool is_array) + { + string_t key; + + while (auto element_type = get()) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson, "element list"))) + { + return false; + } + + const std::size_t element_type_parse_position = chars_read; + if (JSON_HEDLEY_UNLIKELY(!get_bson_cstr(key))) + { + return false; + } + + if (!is_array && !sax->key(key)) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_internal(element_type, element_type_parse_position))) + { + return false; + } + + // get_bson_cstr only appends + key.clear(); + } + + return true; + } + + /*! + @brief Reads an array from the BSON input and passes it to the SAX-parser. + @return whether a valid BSON-array was passed to the SAX parser + */ + bool parse_bson_array() + { + std::int32_t document_size{}; + get_number(input_format_t::bson, document_size); + + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast(-1)))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/true))) + { + return false; + } + + return sax->end_array(); + } + + ////////// + // CBOR // + ////////// + + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true) or whether the last read character should + be considered instead (false) + @param[in] tag_handler how CBOR tags should be treated + + @return whether a valid CBOR value was passed to the SAX parser + */ + bool parse_cbor_internal(const bool get_char, + const cbor_tag_handler_t tag_handler) + { + switch (get_char ? get() : current) + { + // EOF + case std::char_traits::eof(): + return unexpect_eof(input_format_t::cbor, "value"); + + // Integer 0x00..0x17 (0..23) + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + return sax->number_unsigned(static_cast(current)); + + case 0x18: // Unsigned integer (one-byte uint8_t follows) + { + std::uint8_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + case 0x19: // Unsigned integer (two-byte uint16_t follows) + { + std::uint16_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + case 0x1A: // Unsigned integer (four-byte uint32_t follows) + { + std::uint32_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + case 0x1B: // Unsigned integer (eight-byte uint64_t follows) + { + std::uint64_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + // Negative integer -1-0x00..-1-0x17 (-1..-24) + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + return sax->number_integer(static_cast(0x20 - 1 - current)); + + case 0x38: // Negative integer (one-byte uint8_t follows) + { + std::uint8_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast(-1) - number); + } + + case 0x39: // Negative integer -1-n (two-byte uint16_t follows) + { + std::uint16_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast(-1) - number); + } + + case 0x3A: // Negative integer -1-n (four-byte uint32_t follows) + { + std::uint32_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast(-1) - number); + } + + case 0x3B: // Negative integer -1-n (eight-byte uint64_t follows) + { + std::uint64_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast(-1) + - static_cast(number)); + } + + // Binary data (0x00..0x17 bytes follow) + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: // Binary data (one-byte uint8_t for n follows) + case 0x59: // Binary data (two-byte uint16_t for n follow) + case 0x5A: // Binary data (four-byte uint32_t for n follow) + case 0x5B: // Binary data (eight-byte uint64_t for n follow) + case 0x5F: // Binary data (indefinite length) + { + binary_t b; + return get_cbor_binary(b) && sax->binary(b); + } + + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + case 0x7F: // UTF-8 string (indefinite length) + { + string_t s; + return get_cbor_string(s) && sax->string(s); + } + + // array (0x00..0x17 data items follow) + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + return get_cbor_array(static_cast(static_cast(current) & 0x1Fu), tag_handler); + + case 0x98: // array (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast(len), tag_handler); + } + + case 0x99: // array (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast(len), tag_handler); + } + + case 0x9A: // array (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast(len), tag_handler); + } + + case 0x9B: // array (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(detail::conditional_static_cast(len), tag_handler); + } + + case 0x9F: // array (indefinite length) + return get_cbor_array(static_cast(-1), tag_handler); + + // map (0x00..0x17 pairs of data items follow) + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + return get_cbor_object(static_cast(static_cast(current) & 0x1Fu), tag_handler); + + case 0xB8: // map (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast(len), tag_handler); + } + + case 0xB9: // map (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast(len), tag_handler); + } + + case 0xBA: // map (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast(len), tag_handler); + } + + case 0xBB: // map (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(detail::conditional_static_cast(len), tag_handler); + } + + case 0xBF: // map (indefinite length) + return get_cbor_object(static_cast(-1), tag_handler); + + case 0xC6: // tagged item + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD8: // tagged item (1 bytes follow) + case 0xD9: // tagged item (2 bytes follow) + case 0xDA: // tagged item (4 bytes follow) + case 0xDB: // tagged item (8 bytes follow) + { + switch (tag_handler) + { + case cbor_tag_handler_t::error: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::cbor, "invalid byte: 0x" + last_token, "value"), BasicJsonType())); + } + + case cbor_tag_handler_t::ignore: + { + // ignore binary subtype + switch (current) + { + case 0xD8: + { + std::uint8_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + case 0xD9: + { + std::uint16_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + case 0xDA: + { + std::uint32_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + case 0xDB: + { + std::uint64_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + default: + break; + } + return parse_cbor_internal(true, tag_handler); + } + + case cbor_tag_handler_t::store: + { + binary_t b; + // use binary subtype and store in binary container + switch (current) + { + case 0xD8: + { + std::uint8_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast(subtype)); + break; + } + case 0xD9: + { + std::uint16_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast(subtype)); + break; + } + case 0xDA: + { + std::uint32_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast(subtype)); + break; + } + case 0xDB: + { + std::uint64_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast(subtype)); + break; + } + default: + return parse_cbor_internal(true, tag_handler); + } + get(); + return get_cbor_binary(b) && sax->binary(b); + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + return false; // LCOV_EXCL_LINE + } + } + + case 0xF4: // false + return sax->boolean(false); + + case 0xF5: // true + return sax->boolean(true); + + case 0xF6: // null + return sax->null(); + + case 0xF9: // Half-Precision Float (two-byte IEEE 754) + { + const auto byte1_raw = get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "number"))) + { + return false; + } + const auto byte2_raw = get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "number"))) + { + return false; + } + + const auto byte1 = static_cast(byte1_raw); + const auto byte2 = static_cast(byte2_raw); + + // code from RFC 7049, Appendix D, Figure 3: + // As half-precision floating-point numbers were only added + // to IEEE 754 in 2008, today's programming platforms often + // still only have limited support for them. It is very + // easy to include at least decoding support for them even + // without such support. An example of a small decoder for + // half-precision floating-point numbers in the C language + // is shown in Fig. 3. + const auto half = static_cast((byte1 << 8u) + byte2); + const double val = [&half] + { + const int exp = (half >> 10u) & 0x1Fu; + const unsigned int mant = half & 0x3FFu; + JSON_ASSERT(0 <= exp&& exp <= 32); + JSON_ASSERT(mant <= 1024); + switch (exp) + { + case 0: + return std::ldexp(mant, -24); + case 31: + return (mant == 0) + ? std::numeric_limits::infinity() + : std::numeric_limits::quiet_NaN(); + default: + return std::ldexp(mant + 1024, exp - 25); + } + }(); + return sax->number_float((half & 0x8000u) != 0 + ? static_cast(-val) + : static_cast(val), ""); + } + + case 0xFA: // Single-Precision Float (four-byte IEEE 754) + { + float number{}; + return get_number(input_format_t::cbor, number) && sax->number_float(static_cast(number), ""); + } + + case 0xFB: // Double-Precision Float (eight-byte IEEE 754) + { + double number{}; + return get_number(input_format_t::cbor, number) && sax->number_float(static_cast(number), ""); + } + + default: // anything else (0xFF is handled inside the other types) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::cbor, "invalid byte: 0x" + last_token, "value"), BasicJsonType())); + } + } + } + + /*! + @brief reads a CBOR string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + Additionally, CBOR's strings with indefinite lengths are supported. + + @param[out] result created string + + @return whether string creation completed + */ + bool get_cbor_string(string_t& result) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "string"))) + { + return false; + } + + switch (current) + { + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + { + return get_string(input_format_t::cbor, static_cast(current) & 0x1Fu, result); + } + + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x7F: // UTF-8 string (indefinite length) + { + while (get() != 0xFF) + { + string_t chunk; + if (!get_cbor_string(chunk)) + { + return false; + } + result.append(chunk); + } + return true; + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::cbor, "expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0x" + last_token, "string"), BasicJsonType())); + } + } + } + + /*! + @brief reads a CBOR byte array + + This function first reads starting bytes to determine the expected + byte array length and then copies this number of bytes into the byte array. + Additionally, CBOR's byte arrays with indefinite lengths are supported. + + @param[out] result created byte array + + @return whether byte array creation completed + */ + bool get_cbor_binary(binary_t& result) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "binary"))) + { + return false; + } + + switch (current) + { + // Binary data (0x00..0x17 bytes follow) + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + { + return get_binary(input_format_t::cbor, static_cast(current) & 0x1Fu, result); + } + + case 0x58: // Binary data (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x59: // Binary data (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x5A: // Binary data (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x5B: // Binary data (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x5F: // Binary data (indefinite length) + { + while (get() != 0xFF) + { + binary_t chunk; + if (!get_cbor_binary(chunk)) + { + return false; + } + result.insert(result.end(), chunk.begin(), chunk.end()); + } + return true; + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::cbor, "expected length specification (0x40-0x5B) or indefinite binary array type (0x5F); last byte: 0x" + last_token, "binary"), BasicJsonType())); + } + } + } + + /*! + @param[in] len the length of the array or static_cast(-1) for an + array of indefinite size + @param[in] tag_handler how CBOR tags should be treated + @return whether array creation completed + */ + bool get_cbor_array(const std::size_t len, + const cbor_tag_handler_t tag_handler) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(len))) + { + return false; + } + + if (len != static_cast(-1)) + { + for (std::size_t i = 0; i < len; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler))) + { + return false; + } + } + } + else + { + while (get() != 0xFF) + { + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(false, tag_handler))) + { + return false; + } + } + } + + return sax->end_array(); + } + + /*! + @param[in] len the length of the object or static_cast(-1) for an + object of indefinite size + @param[in] tag_handler how CBOR tags should be treated + @return whether object creation completed + */ + bool get_cbor_object(const std::size_t len, + const cbor_tag_handler_t tag_handler) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len))) + { + return false; + } + + if (len != 0) + { + string_t key; + if (len != static_cast(-1)) + { + for (std::size_t i = 0; i < len; ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!get_cbor_string(key) || !sax->key(key))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler))) + { + return false; + } + key.clear(); + } + } + else + { + while (get() != 0xFF) + { + if (JSON_HEDLEY_UNLIKELY(!get_cbor_string(key) || !sax->key(key))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler))) + { + return false; + } + key.clear(); + } + } + } + + return sax->end_object(); + } + + ///////////// + // MsgPack // + ///////////// + + /*! + @return whether a valid MessagePack value was passed to the SAX parser + */ + bool parse_msgpack_internal() + { + switch (get()) + { + // EOF + case std::char_traits::eof(): + return unexpect_eof(input_format_t::msgpack, "value"); + + // positive fixint + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5C: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + return sax->number_unsigned(static_cast(current)); + + // fixmap + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + return get_msgpack_object(static_cast(static_cast(current) & 0x0Fu)); + + // fixarray + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + case 0x98: + case 0x99: + case 0x9A: + case 0x9B: + case 0x9C: + case 0x9D: + case 0x9E: + case 0x9F: + return get_msgpack_array(static_cast(static_cast(current) & 0x0Fu)); + + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + case 0xD9: // str 8 + case 0xDA: // str 16 + case 0xDB: // str 32 + { + string_t s; + return get_msgpack_string(s) && sax->string(s); + } + + case 0xC0: // nil + return sax->null(); + + case 0xC2: // false + return sax->boolean(false); + + case 0xC3: // true + return sax->boolean(true); + + case 0xC4: // bin 8 + case 0xC5: // bin 16 + case 0xC6: // bin 32 + case 0xC7: // ext 8 + case 0xC8: // ext 16 + case 0xC9: // ext 32 + case 0xD4: // fixext 1 + case 0xD5: // fixext 2 + case 0xD6: // fixext 4 + case 0xD7: // fixext 8 + case 0xD8: // fixext 16 + { + binary_t b; + return get_msgpack_binary(b) && sax->binary(b); + } + + case 0xCA: // float 32 + { + float number{}; + return get_number(input_format_t::msgpack, number) && sax->number_float(static_cast(number), ""); + } + + case 0xCB: // float 64 + { + double number{}; + return get_number(input_format_t::msgpack, number) && sax->number_float(static_cast(number), ""); + } + + case 0xCC: // uint 8 + { + std::uint8_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xCD: // uint 16 + { + std::uint16_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xCE: // uint 32 + { + std::uint32_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xCF: // uint 64 + { + std::uint64_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xD0: // int 8 + { + std::int8_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xD1: // int 16 + { + std::int16_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xD2: // int 32 + { + std::int32_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xD3: // int 64 + { + std::int64_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xDC: // array 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_array(static_cast(len)); + } + + case 0xDD: // array 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_array(static_cast(len)); + } + + case 0xDE: // map 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_object(static_cast(len)); + } + + case 0xDF: // map 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_object(static_cast(len)); + } + + // negative fixint + case 0xE0: + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xED: + case 0xEE: + case 0xEF: + case 0xF0: + case 0xF1: + case 0xF2: + case 0xF3: + case 0xF4: + case 0xF5: + case 0xF6: + case 0xF7: + case 0xF8: + case 0xF9: + case 0xFA: + case 0xFB: + case 0xFC: + case 0xFD: + case 0xFE: + case 0xFF: + return sax->number_integer(static_cast(current)); + + default: // anything else + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::msgpack, "invalid byte: 0x" + last_token, "value"), BasicJsonType())); + } + } + } + + /*! + @brief reads a MessagePack string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + + @param[out] result created string + + @return whether string creation completed + */ + bool get_msgpack_string(string_t& result) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::msgpack, "string"))) + { + return false; + } + + switch (current) + { + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + { + return get_string(input_format_t::msgpack, static_cast(current) & 0x1Fu, result); + } + + case 0xD9: // str 8 + { + std::uint8_t len{}; + return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); + } + + case 0xDA: // str 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); + } + + case 0xDB: // str 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::msgpack, "expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0x" + last_token, "string"), BasicJsonType())); + } + } + } + + /*! + @brief reads a MessagePack byte array + + This function first reads starting bytes to determine the expected + byte array length and then copies this number of bytes into a byte array. + + @param[out] result created byte array + + @return whether byte array creation completed + */ + bool get_msgpack_binary(binary_t& result) + { + // helper function to set the subtype + auto assign_and_return_true = [&result](std::int8_t subtype) + { + result.set_subtype(static_cast(subtype)); + return true; + }; + + switch (current) + { + case 0xC4: // bin 8 + { + std::uint8_t len{}; + return get_number(input_format_t::msgpack, len) && + get_binary(input_format_t::msgpack, len, result); + } + + case 0xC5: // bin 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && + get_binary(input_format_t::msgpack, len, result); + } + + case 0xC6: // bin 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && + get_binary(input_format_t::msgpack, len, result); + } + + case 0xC7: // ext 8 + { + std::uint8_t len{}; + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, len) && + get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, len, result) && + assign_and_return_true(subtype); + } + + case 0xC8: // ext 16 + { + std::uint16_t len{}; + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, len) && + get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, len, result) && + assign_and_return_true(subtype); + } + + case 0xC9: // ext 32 + { + std::uint32_t len{}; + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, len) && + get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, len, result) && + assign_and_return_true(subtype); + } + + case 0xD4: // fixext 1 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 1, result) && + assign_and_return_true(subtype); + } + + case 0xD5: // fixext 2 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 2, result) && + assign_and_return_true(subtype); + } + + case 0xD6: // fixext 4 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 4, result) && + assign_and_return_true(subtype); + } + + case 0xD7: // fixext 8 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 8, result) && + assign_and_return_true(subtype); + } + + case 0xD8: // fixext 16 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 16, result) && + assign_and_return_true(subtype); + } + + default: // LCOV_EXCL_LINE + return false; // LCOV_EXCL_LINE + } + } + + /*! + @param[in] len the length of the array + @return whether array creation completed + */ + bool get_msgpack_array(const std::size_t len) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(len))) + { + return false; + } + + for (std::size_t i = 0; i < len; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal())) + { + return false; + } + } + + return sax->end_array(); + } + + /*! + @param[in] len the length of the object + @return whether object creation completed + */ + bool get_msgpack_object(const std::size_t len) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len))) + { + return false; + } + + string_t key; + for (std::size_t i = 0; i < len; ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!get_msgpack_string(key) || !sax->key(key))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal())) + { + return false; + } + key.clear(); + } + + return sax->end_object(); + } + + //////////// + // UBJSON // + //////////// + + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + + @return whether a valid UBJSON value was passed to the SAX parser + */ + bool parse_ubjson_internal(const bool get_char = true) + { + return get_ubjson_value(get_char ? get_ignore_noop() : current); + } + + /*! + @brief reads a UBJSON string + + This function is either called after reading the 'S' byte explicitly + indicating a string, or in case of an object key where the 'S' byte can be + left out. + + @param[out] result created string + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + + @return whether string creation completed + */ + bool get_ubjson_string(string_t& result, const bool get_char = true) + { + if (get_char) + { + get(); // TODO(niels): may we ignore N here? + } + + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, "value"))) + { + return false; + } + + switch (current) + { + case 'U': + { + std::uint8_t len{}; + return get_number(input_format_t::ubjson, len) && get_string(input_format_t::ubjson, len, result); + } + + case 'i': + { + std::int8_t len{}; + return get_number(input_format_t::ubjson, len) && get_string(input_format_t::ubjson, len, result); + } + + case 'I': + { + std::int16_t len{}; + return get_number(input_format_t::ubjson, len) && get_string(input_format_t::ubjson, len, result); + } + + case 'l': + { + std::int32_t len{}; + return get_number(input_format_t::ubjson, len) && get_string(input_format_t::ubjson, len, result); + } + + case 'L': + { + std::int64_t len{}; + return get_number(input_format_t::ubjson, len) && get_string(input_format_t::ubjson, len, result); + } + + default: + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, "expected length type specification (U, i, I, l, L); last byte: 0x" + last_token, "string"), BasicJsonType())); + } + } + + /*! + @param[out] result determined size + @return whether size determination completed + */ + bool get_ubjson_size_value(std::size_t& result) + { + switch (get_ignore_noop()) + { + case 'U': + { + std::uint8_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson, number))) + { + return false; + } + result = static_cast(number); + return true; + } + + case 'i': + { + std::int8_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson, number))) + { + return false; + } + result = static_cast(number); // NOLINT(bugprone-signed-char-misuse,cert-str34-c): number is not a char + return true; + } + + case 'I': + { + std::int16_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson, number))) + { + return false; + } + result = static_cast(number); + return true; + } + + case 'l': + { + std::int32_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson, number))) + { + return false; + } + result = static_cast(number); + return true; + } + + case 'L': + { + std::int64_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson, number))) + { + return false; + } + result = static_cast(number); + return true; + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, "expected length type specification (U, i, I, l, L) after '#'; last byte: 0x" + last_token, "size"), BasicJsonType())); + } + } + } + + /*! + @brief determine the type and size for a container + + In the optimized UBJSON format, a type and a size can be provided to allow + for a more compact representation. + + @param[out] result pair of the size and the type + + @return whether pair creation completed + */ + bool get_ubjson_size_type(std::pair& result) + { + result.first = string_t::npos; // size + result.second = 0; // type + + get_ignore_noop(); + + if (current == '$') + { + result.second = get(); // must not ignore 'N', because 'N' maybe the type + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, "type"))) + { + return false; + } + + get_ignore_noop(); + if (JSON_HEDLEY_UNLIKELY(current != '#')) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, "value"))) + { + return false; + } + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::ubjson, "expected '#' after type information; last byte: 0x" + last_token, "size"), BasicJsonType())); + } + + return get_ubjson_size_value(result.first); + } + + if (current == '#') + { + return get_ubjson_size_value(result.first); + } + + return true; + } + + /*! + @param prefix the previously read or set type prefix + @return whether value creation completed + */ + bool get_ubjson_value(const char_int_type prefix) + { + switch (prefix) + { + case std::char_traits::eof(): // EOF + return unexpect_eof(input_format_t::ubjson, "value"); + + case 'T': // true + return sax->boolean(true); + case 'F': // false + return sax->boolean(false); + + case 'Z': // null + return sax->null(); + + case 'U': + { + std::uint8_t number{}; + return get_number(input_format_t::ubjson, number) && sax->number_unsigned(number); + } + + case 'i': + { + std::int8_t number{}; + return get_number(input_format_t::ubjson, number) && sax->number_integer(number); + } + + case 'I': + { + std::int16_t number{}; + return get_number(input_format_t::ubjson, number) && sax->number_integer(number); + } + + case 'l': + { + std::int32_t number{}; + return get_number(input_format_t::ubjson, number) && sax->number_integer(number); + } + + case 'L': + { + std::int64_t number{}; + return get_number(input_format_t::ubjson, number) && sax->number_integer(number); + } + + case 'd': + { + float number{}; + return get_number(input_format_t::ubjson, number) && sax->number_float(static_cast(number), ""); + } + + case 'D': + { + double number{}; + return get_number(input_format_t::ubjson, number) && sax->number_float(static_cast(number), ""); + } + + case 'H': + { + return get_ubjson_high_precision_number(); + } + + case 'C': // char + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, "char"))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(current > 127)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, "byte after 'C' must be in range 0x00..0x7F; last byte: 0x" + last_token, "char"), BasicJsonType())); + } + string_t s(1, static_cast(current)); + return sax->string(s); + } + + case 'S': // string + { + string_t s; + return get_ubjson_string(s) && sax->string(s); + } + + case '[': // array + return get_ubjson_array(); + + case '{': // object + return get_ubjson_object(); + + default: // anything else + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::ubjson, "invalid byte: 0x" + last_token, "value"), BasicJsonType())); + } + } + } + + /*! + @return whether array creation completed + */ + bool get_ubjson_array() + { + std::pair size_and_type; + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type))) + { + return false; + } + + if (size_and_type.first != string_t::npos) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(size_and_type.first))) + { + return false; + } + + if (size_and_type.second != 0) + { + if (size_and_type.second != 'N') + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second))) + { + return false; + } + } + } + } + else + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) + { + return false; + } + } + } + } + else + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast(-1)))) + { + return false; + } + + while (current != ']') + { + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal(false))) + { + return false; + } + get_ignore_noop(); + } + } + + return sax->end_array(); + } + + /*! + @return whether object creation completed + */ + bool get_ubjson_object() + { + std::pair size_and_type; + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type))) + { + return false; + } + + string_t key; + if (size_and_type.first != string_t::npos) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(size_and_type.first))) + { + return false; + } + + if (size_and_type.second != 0) + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key) || !sax->key(key))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second))) + { + return false; + } + key.clear(); + } + } + else + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key) || !sax->key(key))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) + { + return false; + } + key.clear(); + } + } + } + else + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast(-1)))) + { + return false; + } + + while (current != '}') + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key, false) || !sax->key(key))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) + { + return false; + } + get_ignore_noop(); + key.clear(); + } + } + + return sax->end_object(); + } + + // Note, no reader for UBJSON binary types is implemented because they do + // not exist + + bool get_ubjson_high_precision_number() + { + // get size of following number string + std::size_t size{}; + auto res = get_ubjson_size_value(size); + if (JSON_HEDLEY_UNLIKELY(!res)) + { + return res; + } + + // get number string + std::vector number_vector; + for (std::size_t i = 0; i < size; ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, "number"))) + { + return false; + } + number_vector.push_back(static_cast(current)); + } + + // parse number string + using ia_type = decltype(detail::input_adapter(number_vector)); + auto number_lexer = detail::lexer(detail::input_adapter(number_vector), false); + const auto result_number = number_lexer.scan(); + const auto number_string = number_lexer.get_token_string(); + const auto result_remainder = number_lexer.scan(); + + using token_type = typename detail::lexer_base::token_type; + + if (JSON_HEDLEY_UNLIKELY(result_remainder != token_type::end_of_input)) + { + return sax->parse_error(chars_read, number_string, parse_error::create(115, chars_read, exception_message(input_format_t::ubjson, "invalid number text: " + number_lexer.get_token_string(), "high-precision number"), BasicJsonType())); + } + + switch (result_number) + { + case token_type::value_integer: + return sax->number_integer(number_lexer.get_number_integer()); + case token_type::value_unsigned: + return sax->number_unsigned(number_lexer.get_number_unsigned()); + case token_type::value_float: + return sax->number_float(number_lexer.get_number_float(), std::move(number_string)); + case token_type::uninitialized: + case token_type::literal_true: + case token_type::literal_false: + case token_type::literal_null: + case token_type::value_string: + case token_type::begin_array: + case token_type::begin_object: + case token_type::end_array: + case token_type::end_object: + case token_type::name_separator: + case token_type::value_separator: + case token_type::parse_error: + case token_type::end_of_input: + case token_type::literal_or_value: + default: + return sax->parse_error(chars_read, number_string, parse_error::create(115, chars_read, exception_message(input_format_t::ubjson, "invalid number text: " + number_lexer.get_token_string(), "high-precision number"), BasicJsonType())); + } + } + + /////////////////////// + // Utility functions // + /////////////////////// + + /*! + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a -'ve valued + `std::char_traits::eof()` in that case. + + @return character read from the input + */ + char_int_type get() + { + ++chars_read; + return current = ia.get_character(); + } + + /*! + @return character read from the input after ignoring all 'N' entries + */ + char_int_type get_ignore_noop() + { + do + { + get(); + } + while (current == 'N'); + + return current; + } + + /* + @brief read a number from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[out] result number of type @a NumberType + + @return whether conversion completed + + @note This function needs to respect the system's endianness, because + bytes in CBOR, MessagePack, and UBJSON are stored in network order + (big endian) and therefore need reordering on little endian systems. + */ + template + bool get_number(const input_format_t format, NumberType& result) + { + // step 1: read input into array with system's byte order + std::array vec{}; + for (std::size_t i = 0; i < sizeof(NumberType); ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "number"))) + { + return false; + } + + // reverse byte order prior to conversion if necessary + if (is_little_endian != InputIsLittleEndian) + { + vec[sizeof(NumberType) - i - 1] = static_cast(current); + } + else + { + vec[i] = static_cast(current); // LCOV_EXCL_LINE + } + } + + // step 2: convert array into number of type T and return + std::memcpy(&result, vec.data(), sizeof(NumberType)); + return true; + } + + /*! + @brief create a string by reading characters from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[in] len number of characters to read + @param[out] result string created by reading @a len bytes + + @return whether string creation completed + + @note We can not reserve @a len bytes for the result, because @a len + may be too large. Usually, @ref unexpect_eof() detects the end of + the input before we run out of string memory. + */ + template + bool get_string(const input_format_t format, + const NumberType len, + string_t& result) + { + bool success = true; + for (NumberType i = 0; i < len; i++) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "string"))) + { + success = false; + break; + } + result.push_back(static_cast(current)); + } + return success; + } + + /*! + @brief create a byte array by reading bytes from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[in] len number of bytes to read + @param[out] result byte array created by reading @a len bytes + + @return whether byte array creation completed + + @note We can not reserve @a len bytes for the result, because @a len + may be too large. Usually, @ref unexpect_eof() detects the end of + the input before we run out of memory. + */ + template + bool get_binary(const input_format_t format, + const NumberType len, + binary_t& result) + { + bool success = true; + for (NumberType i = 0; i < len; i++) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "binary"))) + { + success = false; + break; + } + result.push_back(static_cast(current)); + } + return success; + } + + /*! + @param[in] format the current format (for diagnostics) + @param[in] context further context information (for diagnostics) + @return whether the last read character is not EOF + */ + JSON_HEDLEY_NON_NULL(3) + bool unexpect_eof(const input_format_t format, const char* context) const + { + if (JSON_HEDLEY_UNLIKELY(current == std::char_traits::eof())) + { + return sax->parse_error(chars_read, "", + parse_error::create(110, chars_read, exception_message(format, "unexpected end of input", context), BasicJsonType())); + } + return true; + } + + /*! + @return a string representation of the last read byte + */ + std::string get_token_string() const + { + std::array cr{{}}; + static_cast((std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast(current))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + return std::string{cr.data()}; + } + + /*! + @param[in] format the current format + @param[in] detail a detailed error message + @param[in] context further context information + @return a message string to use in the parse_error exceptions + */ + std::string exception_message(const input_format_t format, + const std::string& detail, + const std::string& context) const + { + std::string error_msg = "syntax error while parsing "; + + switch (format) + { + case input_format_t::cbor: + error_msg += "CBOR"; + break; + + case input_format_t::msgpack: + error_msg += "MessagePack"; + break; + + case input_format_t::ubjson: + error_msg += "UBJSON"; + break; + + case input_format_t::bson: + error_msg += "BSON"; + break; + + case input_format_t::json: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + + return error_msg + " " + context + ": " + detail; + } + + private: + /// input adapter + InputAdapterType ia; + + /// the current character + char_int_type current = std::char_traits::eof(); + + /// the number of characters read + std::size_t chars_read = 0; + + /// whether we can assume little endianness + const bool is_little_endian = little_endianness(); + + /// the SAX parser + json_sax_t* sax = nullptr; +}; +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + +// #include + + +#include // isfinite +#include // uint8_t +#include // function +#include // string +#include // move +#include // vector + +// #include + +// #include + +// #include + +// #include + +// #include + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +//////////// +// parser // +//////////// + +enum class parse_event_t : std::uint8_t +{ + /// the parser read `{` and started to process a JSON object + object_start, + /// the parser read `}` and finished processing a JSON object + object_end, + /// the parser read `[` and started to process a JSON array + array_start, + /// the parser read `]` and finished processing a JSON array + array_end, + /// the parser read a key of a value in an object + key, + /// the parser finished reading a JSON value + value +}; + +template +using parser_callback_t = + std::function; + +/*! +@brief syntax analysis + +This class implements a recursive descent parser. +*/ +template +class parser +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using lexer_t = lexer; + using token_type = typename lexer_t::token_type; + + public: + /// a parser reading from an input adapter + explicit parser(InputAdapterType&& adapter, + const parser_callback_t cb = nullptr, + const bool allow_exceptions_ = true, + const bool skip_comments = false) + : callback(cb) + , m_lexer(std::move(adapter), skip_comments) + , allow_exceptions(allow_exceptions_) + { + // read first token + get_token(); + } + + /*! + @brief public parser interface + + @param[in] strict whether to expect the last token to be EOF + @param[in,out] result parsed JSON value + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + */ + void parse(const bool strict, BasicJsonType& result) + { + if (callback) + { + json_sax_dom_callback_parser sdp(result, callback, allow_exceptions); + sax_parse_internal(&sdp); + + // in strict mode, input must be completely read + if (strict && (get_token() != token_type::end_of_input)) + { + sdp.parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::end_of_input, "value"), BasicJsonType())); + } + + // in case of an error, return discarded value + if (sdp.is_errored()) + { + result = value_t::discarded; + return; + } + + // set top-level value to null if it was discarded by the callback + // function + if (result.is_discarded()) + { + result = nullptr; + } + } + else + { + json_sax_dom_parser sdp(result, allow_exceptions); + sax_parse_internal(&sdp); + + // in strict mode, input must be completely read + if (strict && (get_token() != token_type::end_of_input)) + { + sdp.parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), BasicJsonType())); + } + + // in case of an error, return discarded value + if (sdp.is_errored()) + { + result = value_t::discarded; + return; + } + } + + result.assert_invariant(); + } + + /*! + @brief public accept interface + + @param[in] strict whether to expect the last token to be EOF + @return whether the input is a proper JSON text + */ + bool accept(const bool strict = true) + { + json_sax_acceptor sax_acceptor; + return sax_parse(&sax_acceptor, strict); + } + + template + JSON_HEDLEY_NON_NULL(2) + bool sax_parse(SAX* sax, const bool strict = true) + { + (void)detail::is_sax_static_asserts {}; + const bool result = sax_parse_internal(sax); + + // strict mode: next byte must be EOF + if (result && strict && (get_token() != token_type::end_of_input)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), BasicJsonType())); + } + + return result; + } + + private: + template + JSON_HEDLEY_NON_NULL(2) + bool sax_parse_internal(SAX* sax) + { + // stack to remember the hierarchy of structured values we are parsing + // true = array; false = object + std::vector states; + // value to avoid a goto (see comment where set to true) + bool skip_to_state_evaluation = false; + + while (true) + { + if (!skip_to_state_evaluation) + { + // invariant: get_token() was called before each iteration + switch (last_token) + { + case token_type::begin_object: + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast(-1)))) + { + return false; + } + + // closing } -> we are done + if (get_token() == token_type::end_object) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_object())) + { + return false; + } + break; + } + + // parse key + if (JSON_HEDLEY_UNLIKELY(last_token != token_type::value_string)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, "object key"), BasicJsonType())); + } + if (JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string()))) + { + return false; + } + + // parse separator (:) + if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, "object separator"), BasicJsonType())); + } + + // remember we are now inside an object + states.push_back(false); + + // parse values + get_token(); + continue; + } + + case token_type::begin_array: + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast(-1)))) + { + return false; + } + + // closing ] -> we are done + if (get_token() == token_type::end_array) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_array())) + { + return false; + } + break; + } + + // remember we are now inside an array + states.push_back(true); + + // parse values (no need to call get_token) + continue; + } + + case token_type::value_float: + { + const auto res = m_lexer.get_number_float(); + + if (JSON_HEDLEY_UNLIKELY(!std::isfinite(res))) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + out_of_range::create(406, "number overflow parsing '" + m_lexer.get_token_string() + "'", BasicJsonType())); + } + + if (JSON_HEDLEY_UNLIKELY(!sax->number_float(res, m_lexer.get_string()))) + { + return false; + } + + break; + } + + case token_type::literal_false: + { + if (JSON_HEDLEY_UNLIKELY(!sax->boolean(false))) + { + return false; + } + break; + } + + case token_type::literal_null: + { + if (JSON_HEDLEY_UNLIKELY(!sax->null())) + { + return false; + } + break; + } + + case token_type::literal_true: + { + if (JSON_HEDLEY_UNLIKELY(!sax->boolean(true))) + { + return false; + } + break; + } + + case token_type::value_integer: + { + if (JSON_HEDLEY_UNLIKELY(!sax->number_integer(m_lexer.get_number_integer()))) + { + return false; + } + break; + } + + case token_type::value_string: + { + if (JSON_HEDLEY_UNLIKELY(!sax->string(m_lexer.get_string()))) + { + return false; + } + break; + } + + case token_type::value_unsigned: + { + if (JSON_HEDLEY_UNLIKELY(!sax->number_unsigned(m_lexer.get_number_unsigned()))) + { + return false; + } + break; + } + + case token_type::parse_error: + { + // using "uninitialized" to avoid "expected" message + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::uninitialized, "value"), BasicJsonType())); + } + + case token_type::uninitialized: + case token_type::end_array: + case token_type::end_object: + case token_type::name_separator: + case token_type::value_separator: + case token_type::end_of_input: + case token_type::literal_or_value: + default: // the last token was unexpected + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::literal_or_value, "value"), BasicJsonType())); + } + } + } + else + { + skip_to_state_evaluation = false; + } + + // we reached this line after we successfully parsed a value + if (states.empty()) + { + // empty stack: we reached the end of the hierarchy: done + return true; + } + + if (states.back()) // array + { + // comma -> next value + if (get_token() == token_type::value_separator) + { + // parse a new value + get_token(); + continue; + } + + // closing ] + if (JSON_HEDLEY_LIKELY(last_token == token_type::end_array)) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_array())) + { + return false; + } + + // We are done with this array. Before we can parse a + // new value, we need to evaluate the new state first. + // By setting skip_to_state_evaluation to false, we + // are effectively jumping to the beginning of this if. + JSON_ASSERT(!states.empty()); + states.pop_back(); + skip_to_state_evaluation = true; + continue; + } + + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_array, "array"), BasicJsonType())); + } + + // states.back() is false -> object + + // comma -> next value + if (get_token() == token_type::value_separator) + { + // parse key + if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::value_string)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, "object key"), BasicJsonType())); + } + + if (JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string()))) + { + return false; + } + + // parse separator (:) + if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, "object separator"), BasicJsonType())); + } + + // parse values + get_token(); + continue; + } + + // closing } + if (JSON_HEDLEY_LIKELY(last_token == token_type::end_object)) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_object())) + { + return false; + } + + // We are done with this object. Before we can parse a + // new value, we need to evaluate the new state first. + // By setting skip_to_state_evaluation to false, we + // are effectively jumping to the beginning of this if. + JSON_ASSERT(!states.empty()); + states.pop_back(); + skip_to_state_evaluation = true; + continue; + } + + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_object, "object"), BasicJsonType())); + } + } + + /// get next token from lexer + token_type get_token() + { + return last_token = m_lexer.scan(); + } + + std::string exception_message(const token_type expected, const std::string& context) + { + std::string error_msg = "syntax error "; + + if (!context.empty()) + { + error_msg += "while parsing " + context + " "; + } + + error_msg += "- "; + + if (last_token == token_type::parse_error) + { + error_msg += std::string(m_lexer.get_error_message()) + "; last read: '" + + m_lexer.get_token_string() + "'"; + } + else + { + error_msg += "unexpected " + std::string(lexer_t::token_type_name(last_token)); + } + + if (expected != token_type::uninitialized) + { + error_msg += "; expected " + std::string(lexer_t::token_type_name(expected)); + } + + return error_msg; + } + + private: + /// callback function + const parser_callback_t callback = nullptr; + /// the type of the last read token + token_type last_token = token_type::uninitialized; + /// the lexer + lexer_t m_lexer; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; + +} // namespace detail +} // namespace nlohmann + +// #include + + +// #include + + +#include // ptrdiff_t +#include // numeric_limits + +// #include + + +namespace nlohmann +{ +namespace detail +{ +/* +@brief an iterator for primitive JSON types + +This class models an iterator for primitive JSON types (boolean, number, +string). It's only purpose is to allow the iterator/const_iterator classes +to "iterate" over primitive values. Internally, the iterator is modeled by +a `difference_type` variable. Value begin_value (`0`) models the begin, +end_value (`1`) models past the end. +*/ +class primitive_iterator_t +{ + private: + using difference_type = std::ptrdiff_t; + static constexpr difference_type begin_value = 0; + static constexpr difference_type end_value = begin_value + 1; + + JSON_PRIVATE_UNLESS_TESTED: + /// iterator as signed integer type + difference_type m_it = (std::numeric_limits::min)(); + + public: + constexpr difference_type get_value() const noexcept + { + return m_it; + } + + /// set iterator to a defined beginning + void set_begin() noexcept + { + m_it = begin_value; + } + + /// set iterator to a defined past the end + void set_end() noexcept + { + m_it = end_value; + } + + /// return whether the iterator can be dereferenced + constexpr bool is_begin() const noexcept + { + return m_it == begin_value; + } + + /// return whether the iterator is at end + constexpr bool is_end() const noexcept + { + return m_it == end_value; + } + + friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it == rhs.m_it; + } + + friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it < rhs.m_it; + } + + primitive_iterator_t operator+(difference_type n) noexcept + { + auto result = *this; + result += n; + return result; + } + + friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it - rhs.m_it; + } + + primitive_iterator_t& operator++() noexcept + { + ++m_it; + return *this; + } + + primitive_iterator_t const operator++(int) noexcept // NOLINT(readability-const-return-type) + { + auto result = *this; + ++m_it; + return result; + } + + primitive_iterator_t& operator--() noexcept + { + --m_it; + return *this; + } + + primitive_iterator_t const operator--(int) noexcept // NOLINT(readability-const-return-type) + { + auto result = *this; + --m_it; + return result; + } + + primitive_iterator_t& operator+=(difference_type n) noexcept + { + m_it += n; + return *this; + } + + primitive_iterator_t& operator-=(difference_type n) noexcept + { + m_it -= n; + return *this; + } +}; +} // namespace detail +} // namespace nlohmann + + +namespace nlohmann +{ +namespace detail +{ +/*! +@brief an iterator value + +@note This structure could easily be a union, but MSVC currently does not allow +unions members with complex constructors, see https://github.com/nlohmann/json/pull/105. +*/ +template struct internal_iterator +{ + /// iterator for JSON objects + typename BasicJsonType::object_t::iterator object_iterator {}; + /// iterator for JSON arrays + typename BasicJsonType::array_t::iterator array_iterator {}; + /// generic iterator for all other types + primitive_iterator_t primitive_iterator {}; +}; +} // namespace detail +} // namespace nlohmann + +// #include + + +#include // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next +#include // conditional, is_const, remove_const + +// #include + +// #include + +// #include + +// #include + +// #include + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +// forward declare, to be able to friend it later on +template class iteration_proxy; +template class iteration_proxy_value; + +/*! +@brief a template for a bidirectional iterator for the @ref basic_json class +This class implements a both iterators (iterator and const_iterator) for the +@ref basic_json class. +@note An iterator is called *initialized* when a pointer to a JSON value has + been set (e.g., by a constructor or a copy assignment). If the iterator is + default-constructed, it is *uninitialized* and most methods are undefined. + **The library uses assertions to detect calls on uninitialized iterators.** +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +@since version 1.0.0, simplified in version 2.0.9, change to bidirectional + iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593) +*/ +template +class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions) +{ + /// the iterator with BasicJsonType of different const-ness + using other_iter_impl = iter_impl::value, typename std::remove_const::type, const BasicJsonType>::type>; + /// allow basic_json to access private members + friend other_iter_impl; + friend BasicJsonType; + friend iteration_proxy; + friend iteration_proxy_value; + + using object_t = typename BasicJsonType::object_t; + using array_t = typename BasicJsonType::array_t; + // make sure BasicJsonType is basic_json or const basic_json + static_assert(is_basic_json::type>::value, + "iter_impl only accepts (const) basic_json"); + + public: + + /// The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. + /// The C++ Standard has never required user-defined iterators to derive from std::iterator. + /// A user-defined iterator should provide publicly accessible typedefs named + /// iterator_category, value_type, difference_type, pointer, and reference. + /// Note that value_type is required to be non-const, even for constant iterators. + using iterator_category = std::bidirectional_iterator_tag; + + /// the type of the values when the iterator is dereferenced + using value_type = typename BasicJsonType::value_type; + /// a type to represent differences between iterators + using difference_type = typename BasicJsonType::difference_type; + /// defines a pointer to the type iterated over (value_type) + using pointer = typename std::conditional::value, + typename BasicJsonType::const_pointer, + typename BasicJsonType::pointer>::type; + /// defines a reference to the type iterated over (value_type) + using reference = + typename std::conditional::value, + typename BasicJsonType::const_reference, + typename BasicJsonType::reference>::type; + + iter_impl() = default; + ~iter_impl() = default; + iter_impl(iter_impl&&) noexcept = default; + iter_impl& operator=(iter_impl&&) noexcept = default; + + /*! + @brief constructor for a given JSON instance + @param[in] object pointer to a JSON object for this iterator + @pre object != nullptr + @post The iterator is initialized; i.e. `m_object != nullptr`. + */ + explicit iter_impl(pointer object) noexcept : m_object(object) + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = typename object_t::iterator(); + break; + } + + case value_t::array: + { + m_it.array_iterator = typename array_t::iterator(); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator = primitive_iterator_t(); + break; + } + } + } + + /*! + @note The conventional copy constructor and copy assignment are implicitly + defined. Combined with the following converting constructor and + assignment, they support: (1) copy from iterator to iterator, (2) + copy from const iterator to const iterator, and (3) conversion from + iterator to const iterator. However conversion from const iterator + to iterator is not defined. + */ + + /*! + @brief const copy constructor + @param[in] other const iterator to copy from + @note This copy constructor had to be defined explicitly to circumvent a bug + occurring on msvc v19.0 compiler (VS 2015) debug build. For more + information refer to: https://github.com/nlohmann/json/issues/1608 + */ + iter_impl(const iter_impl& other) noexcept + : m_object(other.m_object), m_it(other.m_it) + {} + + /*! + @brief converting assignment + @param[in] other const iterator to copy from + @return const/non-const iterator + @note It is not checked whether @a other is initialized. + */ + iter_impl& operator=(const iter_impl& other) noexcept + { + if (&other != this) + { + m_object = other.m_object; + m_it = other.m_it; + } + return *this; + } + + /*! + @brief converting constructor + @param[in] other non-const iterator to copy from + @note It is not checked whether @a other is initialized. + */ + iter_impl(const iter_impl::type>& other) noexcept + : m_object(other.m_object), m_it(other.m_it) + {} + + /*! + @brief converting assignment + @param[in] other non-const iterator to copy from + @return const/non-const iterator + @note It is not checked whether @a other is initialized. + */ + iter_impl& operator=(const iter_impl::type>& other) noexcept // NOLINT(cert-oop54-cpp) + { + m_object = other.m_object; + m_it = other.m_it; + return *this; + } + + JSON_PRIVATE_UNLESS_TESTED: + /*! + @brief set the iterator to the first value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_begin() noexcept + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_value.object->begin(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_value.array->begin(); + break; + } + + case value_t::null: + { + // set to end so begin()==end() is true: null is empty + m_it.primitive_iterator.set_end(); + break; + } + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator.set_begin(); + break; + } + } + } + + /*! + @brief set the iterator past the last value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_end() noexcept + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_value.object->end(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_value.array->end(); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator.set_end(); + break; + } + } + } + + public: + /*! + @brief return a reference to the value pointed to by the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator*() const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + JSON_ASSERT(m_it.object_iterator != m_object->m_value.object->end()); + return m_it.object_iterator->second; + } + + case value_t::array: + { + JSON_ASSERT(m_it.array_iterator != m_object->m_value.array->end()); + return *m_it.array_iterator; + } + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value", *m_object)); + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin())) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value", *m_object)); + } + } + } + + /*! + @brief dereference the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + pointer operator->() const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + JSON_ASSERT(m_it.object_iterator != m_object->m_value.object->end()); + return &(m_it.object_iterator->second); + } + + case value_t::array: + { + JSON_ASSERT(m_it.array_iterator != m_object->m_value.array->end()); + return &*m_it.array_iterator; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin())) + { + return m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value", *m_object)); + } + } + } + + /*! + @brief post-increment (it++) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl const operator++(int) // NOLINT(readability-const-return-type) + { + auto result = *this; + ++(*this); + return result; + } + + /*! + @brief pre-increment (++it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator++() + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, 1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, 1); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + ++m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief post-decrement (it--) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl const operator--(int) // NOLINT(readability-const-return-type) + { + auto result = *this; + --(*this); + return result; + } + + /*! + @brief pre-decrement (--it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator--() + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, -1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, -1); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + --m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief comparison: equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + template < typename IterImpl, detail::enable_if_t < (std::is_same::value || std::is_same::value), std::nullptr_t > = nullptr > + bool operator==(const IterImpl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", *m_object)); + } + + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + return (m_it.object_iterator == other.m_it.object_iterator); + + case value_t::array: + return (m_it.array_iterator == other.m_it.array_iterator); + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return (m_it.primitive_iterator == other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: not equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + template < typename IterImpl, detail::enable_if_t < (std::is_same::value || std::is_same::value), std::nullptr_t > = nullptr > + bool operator!=(const IterImpl& other) const + { + return !operator==(other); + } + + /*! + @brief comparison: smaller + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", *m_object)); + } + + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(213, "cannot compare order of object iterators", *m_object)); + + case value_t::array: + return (m_it.array_iterator < other.m_it.array_iterator); + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return (m_it.primitive_iterator < other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: less than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<=(const iter_impl& other) const + { + return !other.operator < (*this); + } + + /*! + @brief comparison: greater than + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>(const iter_impl& other) const + { + return !operator<=(other); + } + + /*! + @brief comparison: greater than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>=(const iter_impl& other) const + { + return !operator<(other); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator+=(difference_type i) + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators", *m_object)); + + case value_t::array: + { + std::advance(m_it.array_iterator, i); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator += i; + break; + } + } + + return *this; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator-=(difference_type i) + { + return operator+=(-i); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator+(difference_type i) const + { + auto result = *this; + result += i; + return result; + } + + /*! + @brief addition of distance and iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + friend iter_impl operator+(difference_type i, const iter_impl& it) + { + auto result = it; + result += i; + return result; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator-(difference_type i) const + { + auto result = *this; + result -= i; + return result; + } + + /*! + @brief return difference + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + difference_type operator-(const iter_impl& other) const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators", *m_object)); + + case value_t::array: + return m_it.array_iterator - other.m_it.array_iterator; + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return m_it.primitive_iterator - other.m_it.primitive_iterator; + } + } + + /*! + @brief access to successor + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator[](difference_type n) const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(208, "cannot use operator[] for object iterators", *m_object)); + + case value_t::array: + return *std::next(m_it.array_iterator, n); + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value", *m_object)); + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.get_value() == -n)) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value", *m_object)); + } + } + } + + /*! + @brief return the key of an object iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + const typename object_t::key_type& key() const + { + JSON_ASSERT(m_object != nullptr); + + if (JSON_HEDLEY_LIKELY(m_object->is_object())) + { + return m_it.object_iterator->first; + } + + JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", *m_object)); + } + + /*! + @brief return the value of an iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference value() const + { + return operator*(); + } + + JSON_PRIVATE_UNLESS_TESTED: + /// associated JSON instance + pointer m_object = nullptr; + /// the actual iterator of the associated instance + internal_iterator::type> m_it {}; +}; +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + + +#include // ptrdiff_t +#include // reverse_iterator +#include // declval + +namespace nlohmann +{ +namespace detail +{ +////////////////////// +// reverse_iterator // +////////////////////// + +/*! +@brief a template for a reverse iterator class + +@tparam Base the base iterator type to reverse. Valid types are @ref +iterator (to create @ref reverse_iterator) and @ref const_iterator (to +create @ref const_reverse_iterator). + +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +- [OutputIterator](https://en.cppreference.com/w/cpp/named_req/OutputIterator): + It is possible to write to the pointed-to element (only if @a Base is + @ref iterator). + +@since version 1.0.0 +*/ +template +class json_reverse_iterator : public std::reverse_iterator +{ + public: + using difference_type = std::ptrdiff_t; + /// shortcut to the reverse iterator adapter + using base_iterator = std::reverse_iterator; + /// the reference type for the pointed-to element + using reference = typename Base::reference; + + /// create reverse iterator from iterator + explicit json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept + : base_iterator(it) {} + + /// create reverse iterator from base class + explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} + + /// post-increment (it++) + json_reverse_iterator const operator++(int) // NOLINT(readability-const-return-type) + { + return static_cast(base_iterator::operator++(1)); + } + + /// pre-increment (++it) + json_reverse_iterator& operator++() + { + return static_cast(base_iterator::operator++()); + } + + /// post-decrement (it--) + json_reverse_iterator const operator--(int) // NOLINT(readability-const-return-type) + { + return static_cast(base_iterator::operator--(1)); + } + + /// pre-decrement (--it) + json_reverse_iterator& operator--() + { + return static_cast(base_iterator::operator--()); + } + + /// add to iterator + json_reverse_iterator& operator+=(difference_type i) + { + return static_cast(base_iterator::operator+=(i)); + } + + /// add to iterator + json_reverse_iterator operator+(difference_type i) const + { + return static_cast(base_iterator::operator+(i)); + } + + /// subtract from iterator + json_reverse_iterator operator-(difference_type i) const + { + return static_cast(base_iterator::operator-(i)); + } + + /// return difference + difference_type operator-(const json_reverse_iterator& other) const + { + return base_iterator(*this) - base_iterator(other); + } + + /// access to successor + reference operator[](difference_type n) const + { + return *(this->operator+(n)); + } + + /// return the key of an object iterator + auto key() const -> decltype(std::declval().key()) + { + auto it = --this->base(); + return it.key(); + } + + /// return the value of an iterator + reference value() const + { + auto it = --this->base(); + return it.operator * (); + } +}; +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + + +#include // all_of +#include // isdigit +#include // max +#include // accumulate +#include // string +#include // move +#include // vector + +// #include + +// #include + +// #include + +// #include + + +namespace nlohmann +{ + +/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document +/// @sa https://json.nlohmann.me/api/json_pointer/ +template +class json_pointer +{ + // allow basic_json to access private members + NLOHMANN_BASIC_JSON_TPL_DECLARATION + friend class basic_json; + + public: + /// @brief create JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/json_pointer/ + explicit json_pointer(const std::string& s = "") + : reference_tokens(split(s)) + {} + + /// @brief return a string representation of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/to_string/ + std::string to_string() const + { + return std::accumulate(reference_tokens.begin(), reference_tokens.end(), + std::string{}, + [](const std::string & a, const std::string & b) + { + return a + "/" + detail::escape(b); + }); + } + + /// @brief return a string representation of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_string/ + operator std::string() const + { + return to_string(); + } + + /// @brief append another JSON pointer at the end of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/ + json_pointer& operator/=(const json_pointer& ptr) + { + reference_tokens.insert(reference_tokens.end(), + ptr.reference_tokens.begin(), + ptr.reference_tokens.end()); + return *this; + } + + /// @brief append an unescaped reference token at the end of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/ + json_pointer& operator/=(std::string token) + { + push_back(std::move(token)); + return *this; + } + + /// @brief append an array index at the end of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/ + json_pointer& operator/=(std::size_t array_idx) + { + return *this /= std::to_string(array_idx); + } + + /// @brief create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/ + friend json_pointer operator/(const json_pointer& lhs, + const json_pointer& rhs) + { + return json_pointer(lhs) /= rhs; + } + + /// @brief create a new JSON pointer by appending the unescaped token at the end of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/ + friend json_pointer operator/(const json_pointer& lhs, std::string token) // NOLINT(performance-unnecessary-value-param) + { + return json_pointer(lhs) /= std::move(token); + } + + /// @brief create a new JSON pointer by appending the array-index-token at the end of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/ + friend json_pointer operator/(const json_pointer& lhs, std::size_t array_idx) + { + return json_pointer(lhs) /= array_idx; + } + + /// @brief returns the parent of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/parent_pointer/ + json_pointer parent_pointer() const + { + if (empty()) + { + return *this; + } + + json_pointer res = *this; + res.pop_back(); + return res; + } + + /// @brief remove last reference token + /// @sa https://json.nlohmann.me/api/json_pointer/pop_back/ + void pop_back() + { + if (JSON_HEDLEY_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", BasicJsonType())); + } + + reference_tokens.pop_back(); + } + + /// @brief return last reference token + /// @sa https://json.nlohmann.me/api/json_pointer/back/ + const std::string& back() const + { + if (JSON_HEDLEY_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", BasicJsonType())); + } + + return reference_tokens.back(); + } + + /// @brief append an unescaped token at the end of the reference pointer + /// @sa https://json.nlohmann.me/api/json_pointer/push_back/ + void push_back(const std::string& token) + { + reference_tokens.push_back(token); + } + + /// @brief append an unescaped token at the end of the reference pointer + /// @sa https://json.nlohmann.me/api/json_pointer/push_back/ + void push_back(std::string&& token) + { + reference_tokens.push_back(std::move(token)); + } + + /// @brief return whether pointer points to the root document + /// @sa https://json.nlohmann.me/api/json_pointer/empty/ + bool empty() const noexcept + { + return reference_tokens.empty(); + } + + private: + /*! + @param[in] s reference token to be converted into an array index + + @return integer representation of @a s + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index begins not with a digit + @throw out_of_range.404 if string @a s could not be converted to an integer + @throw out_of_range.410 if an array index exceeds size_type + */ + static typename BasicJsonType::size_type array_index(const std::string& s) + { + using size_type = typename BasicJsonType::size_type; + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_HEDLEY_UNLIKELY(s.size() > 1 && s[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, "array index '" + s + "' must not begin with '0'", BasicJsonType())); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_HEDLEY_UNLIKELY(s.size() > 1 && !(s[0] >= '1' && s[0] <= '9'))) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + s + "' is not a number", BasicJsonType())); + } + + std::size_t processed_chars = 0; + unsigned long long res = 0; // NOLINT(runtime/int) + JSON_TRY + { + res = std::stoull(s, &processed_chars); + } + JSON_CATCH(std::out_of_range&) + { + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + s + "'", BasicJsonType())); + } + + // check if the string was completely read + if (JSON_HEDLEY_UNLIKELY(processed_chars != s.size())) + { + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + s + "'", BasicJsonType())); + } + + // only triggered on special platforms (like 32bit), see also + // https://github.com/nlohmann/json/pull/2203 + if (res >= static_cast((std::numeric_limits::max)())) // NOLINT(runtime/int) + { + JSON_THROW(detail::out_of_range::create(410, "array index " + s + " exceeds size_type", BasicJsonType())); // LCOV_EXCL_LINE + } + + return static_cast(res); + } + + JSON_PRIVATE_UNLESS_TESTED: + json_pointer top() const + { + if (JSON_HEDLEY_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", BasicJsonType())); + } + + json_pointer result = *this; + result.reference_tokens = {reference_tokens[0]}; + return result; + } + + private: + /*! + @brief create and return a reference to the pointed to value + + @complexity Linear in the number of reference tokens. + + @throw parse_error.109 if array index is not a number + @throw type_error.313 if value cannot be unflattened + */ + BasicJsonType& get_and_create(BasicJsonType& j) const + { + auto* result = &j; + + // in case no reference tokens exist, return a reference to the JSON value + // j which will be overwritten by a primitive value + for (const auto& reference_token : reference_tokens) + { + switch (result->type()) + { + case detail::value_t::null: + { + if (reference_token == "0") + { + // start a new array if reference token is 0 + result = &result->operator[](0); + } + else + { + // start a new object otherwise + result = &result->operator[](reference_token); + } + break; + } + + case detail::value_t::object: + { + // create an entry in the object + result = &result->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // create an entry in the array + result = &result->operator[](array_index(reference_token)); + break; + } + + /* + The following code is only reached if there exists a reference + token _and_ the current value is primitive. In this case, we have + an error situation, because primitive values may only occur as + single value; that is, with an empty list of reference tokens. + */ + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::type_error::create(313, "invalid value to unflatten", j)); + } + } + + return *result; + } + + /*! + @brief return a reference to the pointed to value + + @note This version does not throw if a value is not present, but tries to + create nested values instead. For instance, calling this function + with pointer `"/this/that"` on a null value is equivalent to calling + `operator[]("this").operator[]("that")` on that value, effectively + changing the null value to an object. + + @param[in] ptr a JSON value + + @return reference to the JSON value pointed to by the JSON pointer + + @complexity Linear in the length of the JSON pointer. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + BasicJsonType& get_unchecked(BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + // convert null values to arrays or objects before continuing + if (ptr->is_null()) + { + // check if reference token is a number + const bool nums = + std::all_of(reference_token.begin(), reference_token.end(), + [](const unsigned char x) + { + return std::isdigit(x); + }); + + // change value to array for numbers or "-" or to object otherwise + *ptr = (nums || reference_token == "-") + ? detail::value_t::array + : detail::value_t::object; + } + + switch (ptr->type()) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (reference_token == "-") + { + // explicitly treat "-" as index beyond the end + ptr = &ptr->operator[](ptr->m_value.array->size()); + } + else + { + // convert array index to number; unchecked access + ptr = &ptr->operator[](array_index(reference_token)); + } + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'", *ptr)); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + BasicJsonType& get_checked(BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range", *ptr)); + } + + // note: at performs range check + ptr = &ptr->at(array_index(reference_token)); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'", *ptr)); + } + } + + return *ptr; + } + + /*! + @brief return a const reference to the pointed to value + + @param[in] ptr a JSON value + + @return const reference to the JSON value pointed to by the JSON + pointer + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + const BasicJsonType& get_unchecked(const BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" cannot be used for const access + JSON_THROW(detail::out_of_range::create(402, "array index '-' (" + std::to_string(ptr->m_value.array->size()) + ") is out of range", *ptr)); + } + + // use unchecked array access + ptr = &ptr->operator[](array_index(reference_token)); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'", *ptr)); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + const BasicJsonType& get_checked(const BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range", *ptr)); + } + + // note: at performs range check + ptr = &ptr->at(array_index(reference_token)); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'", *ptr)); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + */ + bool contains(const BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + if (!ptr->contains(reference_token)) + { + // we did not find the key in the object + return false; + } + + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + return false; + } + if (JSON_HEDLEY_UNLIKELY(reference_token.size() == 1 && !("0" <= reference_token && reference_token <= "9"))) + { + // invalid char + return false; + } + if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1)) + { + if (JSON_HEDLEY_UNLIKELY(!('1' <= reference_token[0] && reference_token[0] <= '9'))) + { + // first char should be between '1' and '9' + return false; + } + for (std::size_t i = 1; i < reference_token.size(); i++) + { + if (JSON_HEDLEY_UNLIKELY(!('0' <= reference_token[i] && reference_token[i] <= '9'))) + { + // other char should be between '0' and '9' + return false; + } + } + } + + const auto idx = array_index(reference_token); + if (idx >= ptr->size()) + { + // index out of range + return false; + } + + ptr = &ptr->operator[](idx); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + { + // we do not expect primitive values if there is still a + // reference token to process + return false; + } + } + } + + // no reference token left means we found a primitive value + return true; + } + + /*! + @brief split the string input to reference tokens + + @note This function is only called by the json_pointer constructor. + All exceptions below are documented there. + + @throw parse_error.107 if the pointer is not empty or begins with '/' + @throw parse_error.108 if character '~' is not followed by '0' or '1' + */ + static std::vector split(const std::string& reference_string) + { + std::vector result; + + // special case: empty reference string -> no reference tokens + if (reference_string.empty()) + { + return result; + } + + // check if nonempty reference string begins with slash + if (JSON_HEDLEY_UNLIKELY(reference_string[0] != '/')) + { + JSON_THROW(detail::parse_error::create(107, 1, "JSON pointer must be empty or begin with '/' - was: '" + reference_string + "'", BasicJsonType())); + } + + // extract the reference tokens: + // - slash: position of the last read slash (or end of string) + // - start: position after the previous slash + for ( + // search for the first slash after the first character + std::size_t slash = reference_string.find_first_of('/', 1), + // set the beginning of the first reference token + start = 1; + // we can stop if start == 0 (if slash == std::string::npos) + start != 0; + // set the beginning of the next reference token + // (will eventually be 0 if slash == std::string::npos) + start = (slash == std::string::npos) ? 0 : slash + 1, + // find next slash + slash = reference_string.find_first_of('/', start)) + { + // use the text between the beginning of the reference token + // (start) and the last slash (slash). + auto reference_token = reference_string.substr(start, slash - start); + + // check reference tokens are properly escaped + for (std::size_t pos = reference_token.find_first_of('~'); + pos != std::string::npos; + pos = reference_token.find_first_of('~', pos + 1)) + { + JSON_ASSERT(reference_token[pos] == '~'); + + // ~ must be followed by 0 or 1 + if (JSON_HEDLEY_UNLIKELY(pos == reference_token.size() - 1 || + (reference_token[pos + 1] != '0' && + reference_token[pos + 1] != '1'))) + { + JSON_THROW(detail::parse_error::create(108, 0, "escape character '~' must be followed with '0' or '1'", BasicJsonType())); + } + } + + // finally, store the reference token + detail::unescape(reference_token); + result.push_back(reference_token); + } + + return result; + } + + private: + /*! + @param[in] reference_string the reference string to the current value + @param[in] value the value to consider + @param[in,out] result the result object to insert values to + + @note Empty objects or arrays are flattened to `null`. + */ + static void flatten(const std::string& reference_string, + const BasicJsonType& value, + BasicJsonType& result) + { + switch (value.type()) + { + case detail::value_t::array: + { + if (value.m_value.array->empty()) + { + // flatten empty array as null + result[reference_string] = nullptr; + } + else + { + // iterate array and use index as reference string + for (std::size_t i = 0; i < value.m_value.array->size(); ++i) + { + flatten(reference_string + "/" + std::to_string(i), + value.m_value.array->operator[](i), result); + } + } + break; + } + + case detail::value_t::object: + { + if (value.m_value.object->empty()) + { + // flatten empty object as null + result[reference_string] = nullptr; + } + else + { + // iterate object and use keys as reference string + for (const auto& element : *value.m_value.object) + { + flatten(reference_string + "/" + detail::escape(element.first), element.second, result); + } + } + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + { + // add primitive value with its reference string + result[reference_string] = value; + break; + } + } + } + + /*! + @param[in] value flattened JSON + + @return unflattened JSON + + @throw parse_error.109 if array index is not a number + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + @throw type_error.313 if value cannot be unflattened + */ + static BasicJsonType + unflatten(const BasicJsonType& value) + { + if (JSON_HEDLEY_UNLIKELY(!value.is_object())) + { + JSON_THROW(detail::type_error::create(314, "only objects can be unflattened", value)); + } + + BasicJsonType result; + + // iterate the JSON object values + for (const auto& element : *value.m_value.object) + { + if (JSON_HEDLEY_UNLIKELY(!element.second.is_primitive())) + { + JSON_THROW(detail::type_error::create(315, "values in object must be primitive", element.second)); + } + + // assign value to reference pointed to by JSON pointer; Note that if + // the JSON pointer is "" (i.e., points to the whole value), function + // get_and_create returns a reference to result itself. An assignment + // will then create a primitive value. + json_pointer(element.first).get_and_create(result) = element.second; + } + + return result; + } + + /*! + @brief compares two JSON pointers for equality + + @param[in] lhs JSON pointer to compare + @param[in] rhs JSON pointer to compare + @return whether @a lhs is equal to @a rhs + + @complexity Linear in the length of the JSON pointer + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + */ + friend bool operator==(json_pointer const& lhs, + json_pointer const& rhs) noexcept + { + return lhs.reference_tokens == rhs.reference_tokens; + } + + /*! + @brief compares two JSON pointers for inequality + + @param[in] lhs JSON pointer to compare + @param[in] rhs JSON pointer to compare + @return whether @a lhs is not equal @a rhs + + @complexity Linear in the length of the JSON pointer + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + */ + friend bool operator!=(json_pointer const& lhs, + json_pointer const& rhs) noexcept + { + return !(lhs == rhs); + } + + /// the reference tokens + std::vector reference_tokens; +}; +} // namespace nlohmann + +// #include + + +#include +#include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template +class json_ref +{ + public: + using value_type = BasicJsonType; + + json_ref(value_type&& value) + : owned_value(std::move(value)) + {} + + json_ref(const value_type& value) + : value_ref(&value) + {} + + json_ref(std::initializer_list init) + : owned_value(init) + {} + + template < + class... Args, + enable_if_t::value, int> = 0 > + json_ref(Args && ... args) + : owned_value(std::forward(args)...) + {} + + // class should be movable only + json_ref(json_ref&&) noexcept = default; + json_ref(const json_ref&) = delete; + json_ref& operator=(const json_ref&) = delete; + json_ref& operator=(json_ref&&) = delete; + ~json_ref() = default; + + value_type moved_or_copied() const + { + if (value_ref == nullptr) + { + return std::move(owned_value); + } + return *value_ref; + } + + value_type const& operator*() const + { + return value_ref ? *value_ref : owned_value; + } + + value_type const* operator->() const + { + return &** this; + } + + private: + mutable value_type owned_value = nullptr; + value_type const* value_ref = nullptr; +}; +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + +// #include + +// #include + +// #include + + +#include // reverse +#include // array +#include // isnan, isinf +#include // uint8_t, uint16_t, uint32_t, uint64_t +#include // memcpy +#include // numeric_limits +#include // string +#include // move + +// #include + +// #include + +// #include + + +#include // copy +#include // size_t +#include // back_inserter +#include // shared_ptr, make_shared +#include // basic_string +#include // vector + +#ifndef JSON_NO_IO + #include // streamsize + #include // basic_ostream +#endif // JSON_NO_IO + +// #include + + +namespace nlohmann +{ +namespace detail +{ +/// abstract output adapter interface +template struct output_adapter_protocol +{ + virtual void write_character(CharType c) = 0; + virtual void write_characters(const CharType* s, std::size_t length) = 0; + virtual ~output_adapter_protocol() = default; + + output_adapter_protocol() = default; + output_adapter_protocol(const output_adapter_protocol&) = default; + output_adapter_protocol(output_adapter_protocol&&) noexcept = default; + output_adapter_protocol& operator=(const output_adapter_protocol&) = default; + output_adapter_protocol& operator=(output_adapter_protocol&&) noexcept = default; +}; + +/// a type to simplify interfaces +template +using output_adapter_t = std::shared_ptr>; + +/// output adapter for byte vectors +template> +class output_vector_adapter : public output_adapter_protocol +{ + public: + explicit output_vector_adapter(std::vector& vec) noexcept + : v(vec) + {} + + void write_character(CharType c) override + { + v.push_back(c); + } + + JSON_HEDLEY_NON_NULL(2) + void write_characters(const CharType* s, std::size_t length) override + { + std::copy(s, s + length, std::back_inserter(v)); + } + + private: + std::vector& v; +}; + +#ifndef JSON_NO_IO +/// output adapter for output streams +template +class output_stream_adapter : public output_adapter_protocol +{ + public: + explicit output_stream_adapter(std::basic_ostream& s) noexcept + : stream(s) + {} + + void write_character(CharType c) override + { + stream.put(c); + } + + JSON_HEDLEY_NON_NULL(2) + void write_characters(const CharType* s, std::size_t length) override + { + stream.write(s, static_cast(length)); + } + + private: + std::basic_ostream& stream; +}; +#endif // JSON_NO_IO + +/// output adapter for basic_string +template> +class output_string_adapter : public output_adapter_protocol +{ + public: + explicit output_string_adapter(StringType& s) noexcept + : str(s) + {} + + void write_character(CharType c) override + { + str.push_back(c); + } + + JSON_HEDLEY_NON_NULL(2) + void write_characters(const CharType* s, std::size_t length) override + { + str.append(s, length); + } + + private: + StringType& str; +}; + +template> +class output_adapter +{ + public: + template> + output_adapter(std::vector& vec) + : oa(std::make_shared>(vec)) {} + +#ifndef JSON_NO_IO + output_adapter(std::basic_ostream& s) + : oa(std::make_shared>(s)) {} +#endif // JSON_NO_IO + + output_adapter(StringType& s) + : oa(std::make_shared>(s)) {} + + operator output_adapter_t() + { + return oa; + } + + private: + output_adapter_t oa = nullptr; +}; +} // namespace detail +} // namespace nlohmann + + +namespace nlohmann +{ +namespace detail +{ +/////////////////// +// binary writer // +/////////////////// + +/*! +@brief serialization to CBOR and MessagePack values +*/ +template +class binary_writer +{ + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using number_float_t = typename BasicJsonType::number_float_t; + + public: + /*! + @brief create a binary writer + + @param[in] adapter output adapter to write to + */ + explicit binary_writer(output_adapter_t adapter) : oa(std::move(adapter)) + { + JSON_ASSERT(oa); + } + + /*! + @param[in] j JSON value to serialize + @pre j.type() == value_t::object + */ + void write_bson(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::object: + { + write_bson_object(*j.m_value.object); + break; + } + + case value_t::null: + case value_t::array: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + JSON_THROW(type_error::create(317, "to serialize to BSON, top-level type must be object, but is " + std::string(j.type_name()), j)); + } + } + } + + /*! + @param[in] j JSON value to serialize + */ + void write_cbor(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: + { + oa->write_character(to_char_type(0xF6)); + break; + } + + case value_t::boolean: + { + oa->write_character(j.m_value.boolean + ? to_char_type(0xF5) + : to_char_type(0xF4)); + break; + } + + case value_t::number_integer: + { + if (j.m_value.number_integer >= 0) + { + // CBOR does not differentiate between positive signed + // integers and unsigned integers. Therefore, we used the + // code from the value_t::number_unsigned case here. + if (j.m_value.number_integer <= 0x17) + { + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x18)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x19)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x1A)); + write_number(static_cast(j.m_value.number_integer)); + } + else + { + oa->write_character(to_char_type(0x1B)); + write_number(static_cast(j.m_value.number_integer)); + } + } + else + { + // The conversions below encode the sign in the first + // byte, and the value is converted to a positive number. + const auto positive_number = -1 - j.m_value.number_integer; + if (j.m_value.number_integer >= -24) + { + write_number(static_cast(0x20 + positive_number)); + } + else if (positive_number <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x38)); + write_number(static_cast(positive_number)); + } + else if (positive_number <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x39)); + write_number(static_cast(positive_number)); + } + else if (positive_number <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x3A)); + write_number(static_cast(positive_number)); + } + else + { + oa->write_character(to_char_type(0x3B)); + write_number(static_cast(positive_number)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned <= 0x17) + { + write_number(static_cast(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x18)); + write_number(static_cast(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x19)); + write_number(static_cast(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x1A)); + write_number(static_cast(j.m_value.number_unsigned)); + } + else + { + oa->write_character(to_char_type(0x1B)); + write_number(static_cast(j.m_value.number_unsigned)); + } + break; + } + + case value_t::number_float: + { + if (std::isnan(j.m_value.number_float)) + { + // NaN is 0xf97e00 in CBOR + oa->write_character(to_char_type(0xF9)); + oa->write_character(to_char_type(0x7E)); + oa->write_character(to_char_type(0x00)); + } + else if (std::isinf(j.m_value.number_float)) + { + // Infinity is 0xf97c00, -Infinity is 0xf9fc00 + oa->write_character(to_char_type(0xf9)); + oa->write_character(j.m_value.number_float > 0 ? to_char_type(0x7C) : to_char_type(0xFC)); + oa->write_character(to_char_type(0x00)); + } + else + { + write_compact_float(j.m_value.number_float, detail::input_format_t::cbor); + } + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_value.string->size(); + if (N <= 0x17) + { + write_number(static_cast(0x60 + N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x78)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x79)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x7A)); + write_number(static_cast(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x7B)); + write_number(static_cast(N)); + } + // LCOV_EXCL_STOP + + // step 2: write the string + oa->write_characters( + reinterpret_cast(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_value.array->size(); + if (N <= 0x17) + { + write_number(static_cast(0x80 + N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x98)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x99)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x9A)); + write_number(static_cast(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x9B)); + write_number(static_cast(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_value.array) + { + write_cbor(el); + } + break; + } + + case value_t::binary: + { + if (j.m_value.binary->has_subtype()) + { + if (j.m_value.binary->subtype() <= (std::numeric_limits::max)()) + { + write_number(static_cast(0xd8)); + write_number(static_cast(j.m_value.binary->subtype())); + } + else if (j.m_value.binary->subtype() <= (std::numeric_limits::max)()) + { + write_number(static_cast(0xd9)); + write_number(static_cast(j.m_value.binary->subtype())); + } + else if (j.m_value.binary->subtype() <= (std::numeric_limits::max)()) + { + write_number(static_cast(0xda)); + write_number(static_cast(j.m_value.binary->subtype())); + } + else if (j.m_value.binary->subtype() <= (std::numeric_limits::max)()) + { + write_number(static_cast(0xdb)); + write_number(static_cast(j.m_value.binary->subtype())); + } + } + + // step 1: write control byte and the binary array size + const auto N = j.m_value.binary->size(); + if (N <= 0x17) + { + write_number(static_cast(0x40 + N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x58)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x59)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x5A)); + write_number(static_cast(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0x5B)); + write_number(static_cast(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + oa->write_characters( + reinterpret_cast(j.m_value.binary->data()), + N); + + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_value.object->size(); + if (N <= 0x17) + { + write_number(static_cast(0xA0 + N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0xB8)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0xB9)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0xBA)); + write_number(static_cast(N)); + } + // LCOV_EXCL_START + else if (N <= (std::numeric_limits::max)()) + { + oa->write_character(to_char_type(0xBB)); + write_number(static_cast(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_value.object) + { + write_cbor(el.first); + write_cbor(el.second); + } + break; + } + + case value_t::discarded: + default: + break; + } + } + + /*! + @param[in] j JSON value to serialize + */ + void write_msgpack(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: // nil + { + oa->write_character(to_char_type(0xC0)); + break; + } + + case value_t::boolean: // true and false + { + oa->write_character(j.m_value.boolean + ? to_char_type(0xC3) + : to_char_type(0xC2)); + break; + } + + case value_t::number_integer: + { + if (j.m_value.number_integer >= 0) + { + // MessagePack does not differentiate between positive + // signed integers and unsigned integers. Therefore, we used + // the code from the value_t::number_unsigned case here. + if (j.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 8 + oa->write_character(to_char_type(0xCC)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 16 + oa->write_character(to_char_type(0xCD)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 32 + oa->write_character(to_char_type(0xCE)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 64 + oa->write_character(to_char_type(0xCF)); + write_number(static_cast(j.m_value.number_integer)); + } + } + else + { + if (j.m_value.number_integer >= -32) + { + // negative fixnum + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits::min)() && + j.m_value.number_integer <= (std::numeric_limits::max)()) + { + // int 8 + oa->write_character(to_char_type(0xD0)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits::min)() && + j.m_value.number_integer <= (std::numeric_limits::max)()) + { + // int 16 + oa->write_character(to_char_type(0xD1)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits::min)() && + j.m_value.number_integer <= (std::numeric_limits::max)()) + { + // int 32 + oa->write_character(to_char_type(0xD2)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits::min)() && + j.m_value.number_integer <= (std::numeric_limits::max)()) + { + // int 64 + oa->write_character(to_char_type(0xD3)); + write_number(static_cast(j.m_value.number_integer)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 8 + oa->write_character(to_char_type(0xCC)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 16 + oa->write_character(to_char_type(0xCD)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 32 + oa->write_character(to_char_type(0xCE)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 64 + oa->write_character(to_char_type(0xCF)); + write_number(static_cast(j.m_value.number_integer)); + } + break; + } + + case value_t::number_float: + { + write_compact_float(j.m_value.number_float, detail::input_format_t::msgpack); + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_value.string->size(); + if (N <= 31) + { + // fixstr + write_number(static_cast(0xA0 | N)); + } + else if (N <= (std::numeric_limits::max)()) + { + // str 8 + oa->write_character(to_char_type(0xD9)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + // str 16 + oa->write_character(to_char_type(0xDA)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + // str 32 + oa->write_character(to_char_type(0xDB)); + write_number(static_cast(N)); + } + + // step 2: write the string + oa->write_characters( + reinterpret_cast(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_value.array->size(); + if (N <= 15) + { + // fixarray + write_number(static_cast(0x90 | N)); + } + else if (N <= (std::numeric_limits::max)()) + { + // array 16 + oa->write_character(to_char_type(0xDC)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + // array 32 + oa->write_character(to_char_type(0xDD)); + write_number(static_cast(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_value.array) + { + write_msgpack(el); + } + break; + } + + case value_t::binary: + { + // step 0: determine if the binary type has a set subtype to + // determine whether or not to use the ext or fixext types + const bool use_ext = j.m_value.binary->has_subtype(); + + // step 1: write control byte and the byte string length + const auto N = j.m_value.binary->size(); + if (N <= (std::numeric_limits::max)()) + { + std::uint8_t output_type{}; + bool fixed = true; + if (use_ext) + { + switch (N) + { + case 1: + output_type = 0xD4; // fixext 1 + break; + case 2: + output_type = 0xD5; // fixext 2 + break; + case 4: + output_type = 0xD6; // fixext 4 + break; + case 8: + output_type = 0xD7; // fixext 8 + break; + case 16: + output_type = 0xD8; // fixext 16 + break; + default: + output_type = 0xC7; // ext 8 + fixed = false; + break; + } + + } + else + { + output_type = 0xC4; // bin 8 + fixed = false; + } + + oa->write_character(to_char_type(output_type)); + if (!fixed) + { + write_number(static_cast(N)); + } + } + else if (N <= (std::numeric_limits::max)()) + { + std::uint8_t output_type = use_ext + ? 0xC8 // ext 16 + : 0xC5; // bin 16 + + oa->write_character(to_char_type(output_type)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + std::uint8_t output_type = use_ext + ? 0xC9 // ext 32 + : 0xC6; // bin 32 + + oa->write_character(to_char_type(output_type)); + write_number(static_cast(N)); + } + + // step 1.5: if this is an ext type, write the subtype + if (use_ext) + { + write_number(static_cast(j.m_value.binary->subtype())); + } + + // step 2: write the byte string + oa->write_characters( + reinterpret_cast(j.m_value.binary->data()), + N); + + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_value.object->size(); + if (N <= 15) + { + // fixmap + write_number(static_cast(0x80 | (N & 0xF))); + } + else if (N <= (std::numeric_limits::max)()) + { + // map 16 + oa->write_character(to_char_type(0xDE)); + write_number(static_cast(N)); + } + else if (N <= (std::numeric_limits::max)()) + { + // map 32 + oa->write_character(to_char_type(0xDF)); + write_number(static_cast(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_value.object) + { + write_msgpack(el.first); + write_msgpack(el.second); + } + break; + } + + case value_t::discarded: + default: + break; + } + } + + /*! + @param[in] j JSON value to serialize + @param[in] use_count whether to use '#' prefixes (optimized format) + @param[in] use_type whether to use '$' prefixes (optimized format) + @param[in] add_prefix whether prefixes need to be used for this value + */ + void write_ubjson(const BasicJsonType& j, const bool use_count, + const bool use_type, const bool add_prefix = true) + { + switch (j.type()) + { + case value_t::null: + { + if (add_prefix) + { + oa->write_character(to_char_type('Z')); + } + break; + } + + case value_t::boolean: + { + if (add_prefix) + { + oa->write_character(j.m_value.boolean + ? to_char_type('T') + : to_char_type('F')); + } + break; + } + + case value_t::number_integer: + { + write_number_with_ubjson_prefix(j.m_value.number_integer, add_prefix); + break; + } + + case value_t::number_unsigned: + { + write_number_with_ubjson_prefix(j.m_value.number_unsigned, add_prefix); + break; + } + + case value_t::number_float: + { + write_number_with_ubjson_prefix(j.m_value.number_float, add_prefix); + break; + } + + case value_t::string: + { + if (add_prefix) + { + oa->write_character(to_char_type('S')); + } + write_number_with_ubjson_prefix(j.m_value.string->size(), true); + oa->write_characters( + reinterpret_cast(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + if (add_prefix) + { + oa->write_character(to_char_type('[')); + } + + bool prefix_required = true; + if (use_type && !j.m_value.array->empty()) + { + JSON_ASSERT(use_count); + const CharType first_prefix = ubjson_prefix(j.front()); + const bool same_prefix = std::all_of(j.begin() + 1, j.end(), + [this, first_prefix](const BasicJsonType & v) + { + return ubjson_prefix(v) == first_prefix; + }); + + if (same_prefix) + { + prefix_required = false; + oa->write_character(to_char_type('$')); + oa->write_character(first_prefix); + } + } + + if (use_count) + { + oa->write_character(to_char_type('#')); + write_number_with_ubjson_prefix(j.m_value.array->size(), true); + } + + for (const auto& el : *j.m_value.array) + { + write_ubjson(el, use_count, use_type, prefix_required); + } + + if (!use_count) + { + oa->write_character(to_char_type(']')); + } + + break; + } + + case value_t::binary: + { + if (add_prefix) + { + oa->write_character(to_char_type('[')); + } + + if (use_type && !j.m_value.binary->empty()) + { + JSON_ASSERT(use_count); + oa->write_character(to_char_type('$')); + oa->write_character('U'); + } + + if (use_count) + { + oa->write_character(to_char_type('#')); + write_number_with_ubjson_prefix(j.m_value.binary->size(), true); + } + + if (use_type) + { + oa->write_characters( + reinterpret_cast(j.m_value.binary->data()), + j.m_value.binary->size()); + } + else + { + for (size_t i = 0; i < j.m_value.binary->size(); ++i) + { + oa->write_character(to_char_type('U')); + oa->write_character(j.m_value.binary->data()[i]); + } + } + + if (!use_count) + { + oa->write_character(to_char_type(']')); + } + + break; + } + + case value_t::object: + { + if (add_prefix) + { + oa->write_character(to_char_type('{')); + } + + bool prefix_required = true; + if (use_type && !j.m_value.object->empty()) + { + JSON_ASSERT(use_count); + const CharType first_prefix = ubjson_prefix(j.front()); + const bool same_prefix = std::all_of(j.begin(), j.end(), + [this, first_prefix](const BasicJsonType & v) + { + return ubjson_prefix(v) == first_prefix; + }); + + if (same_prefix) + { + prefix_required = false; + oa->write_character(to_char_type('$')); + oa->write_character(first_prefix); + } + } + + if (use_count) + { + oa->write_character(to_char_type('#')); + write_number_with_ubjson_prefix(j.m_value.object->size(), true); + } + + for (const auto& el : *j.m_value.object) + { + write_number_with_ubjson_prefix(el.first.size(), true); + oa->write_characters( + reinterpret_cast(el.first.c_str()), + el.first.size()); + write_ubjson(el.second, use_count, use_type, prefix_required); + } + + if (!use_count) + { + oa->write_character(to_char_type('}')); + } + + break; + } + + case value_t::discarded: + default: + break; + } + } + + private: + ////////// + // BSON // + ////////// + + /*! + @return The size of a BSON document entry header, including the id marker + and the entry name size (and its null-terminator). + */ + static std::size_t calc_bson_entry_header_size(const string_t& name, const BasicJsonType& j) + { + const auto it = name.find(static_cast(0)); + if (JSON_HEDLEY_UNLIKELY(it != BasicJsonType::string_t::npos)) + { + JSON_THROW(out_of_range::create(409, "BSON key cannot contain code point U+0000 (at byte " + std::to_string(it) + ")", j)); + static_cast(j); + } + + return /*id*/ 1ul + name.size() + /*zero-terminator*/1u; + } + + /*! + @brief Writes the given @a element_type and @a name to the output adapter + */ + void write_bson_entry_header(const string_t& name, + const std::uint8_t element_type) + { + oa->write_character(to_char_type(element_type)); // boolean + oa->write_characters( + reinterpret_cast(name.c_str()), + name.size() + 1u); + } + + /*! + @brief Writes a BSON element with key @a name and boolean value @a value + */ + void write_bson_boolean(const string_t& name, + const bool value) + { + write_bson_entry_header(name, 0x08); + oa->write_character(value ? to_char_type(0x01) : to_char_type(0x00)); + } + + /*! + @brief Writes a BSON element with key @a name and double value @a value + */ + void write_bson_double(const string_t& name, + const double value) + { + write_bson_entry_header(name, 0x01); + write_number(value); + } + + /*! + @return The size of the BSON-encoded string in @a value + */ + static std::size_t calc_bson_string_size(const string_t& value) + { + return sizeof(std::int32_t) + value.size() + 1ul; + } + + /*! + @brief Writes a BSON element with key @a name and string value @a value + */ + void write_bson_string(const string_t& name, + const string_t& value) + { + write_bson_entry_header(name, 0x02); + + write_number(static_cast(value.size() + 1ul)); + oa->write_characters( + reinterpret_cast(value.c_str()), + value.size() + 1); + } + + /*! + @brief Writes a BSON element with key @a name and null value + */ + void write_bson_null(const string_t& name) + { + write_bson_entry_header(name, 0x0A); + } + + /*! + @return The size of the BSON-encoded integer @a value + */ + static std::size_t calc_bson_integer_size(const std::int64_t value) + { + return (std::numeric_limits::min)() <= value && value <= (std::numeric_limits::max)() + ? sizeof(std::int32_t) + : sizeof(std::int64_t); + } + + /*! + @brief Writes a BSON element with key @a name and integer @a value + */ + void write_bson_integer(const string_t& name, + const std::int64_t value) + { + if ((std::numeric_limits::min)() <= value && value <= (std::numeric_limits::max)()) + { + write_bson_entry_header(name, 0x10); // int32 + write_number(static_cast(value)); + } + else + { + write_bson_entry_header(name, 0x12); // int64 + write_number(static_cast(value)); + } + } + + /*! + @return The size of the BSON-encoded unsigned integer in @a j + */ + static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept + { + return (value <= static_cast((std::numeric_limits::max)())) + ? sizeof(std::int32_t) + : sizeof(std::int64_t); + } + + /*! + @brief Writes a BSON element with key @a name and unsigned @a value + */ + void write_bson_unsigned(const string_t& name, + const BasicJsonType& j) + { + if (j.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) + { + write_bson_entry_header(name, 0x10 /* int32 */); + write_number(static_cast(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) + { + write_bson_entry_header(name, 0x12 /* int64 */); + write_number(static_cast(j.m_value.number_unsigned)); + } + else + { + JSON_THROW(out_of_range::create(407, "integer number " + std::to_string(j.m_value.number_unsigned) + " cannot be represented by BSON as it does not fit int64", j)); + } + } + + /*! + @brief Writes a BSON element with key @a name and object @a value + */ + void write_bson_object_entry(const string_t& name, + const typename BasicJsonType::object_t& value) + { + write_bson_entry_header(name, 0x03); // object + write_bson_object(value); + } + + /*! + @return The size of the BSON-encoded array @a value + */ + static std::size_t calc_bson_array_size(const typename BasicJsonType::array_t& value) + { + std::size_t array_index = 0ul; + + const std::size_t embedded_document_size = std::accumulate(std::begin(value), std::end(value), static_cast(0), [&array_index](std::size_t result, const typename BasicJsonType::array_t::value_type & el) + { + return result + calc_bson_element_size(std::to_string(array_index++), el); + }); + + return sizeof(std::int32_t) + embedded_document_size + 1ul; + } + + /*! + @return The size of the BSON-encoded binary array @a value + */ + static std::size_t calc_bson_binary_size(const typename BasicJsonType::binary_t& value) + { + return sizeof(std::int32_t) + value.size() + 1ul; + } + + /*! + @brief Writes a BSON element with key @a name and array @a value + */ + void write_bson_array(const string_t& name, + const typename BasicJsonType::array_t& value) + { + write_bson_entry_header(name, 0x04); // array + write_number(static_cast(calc_bson_array_size(value))); + + std::size_t array_index = 0ul; + + for (const auto& el : value) + { + write_bson_element(std::to_string(array_index++), el); + } + + oa->write_character(to_char_type(0x00)); + } + + /*! + @brief Writes a BSON element with key @a name and binary value @a value + */ + void write_bson_binary(const string_t& name, + const binary_t& value) + { + write_bson_entry_header(name, 0x05); + + write_number(static_cast(value.size())); + write_number(value.has_subtype() ? static_cast(value.subtype()) : static_cast(0x00)); + + oa->write_characters(reinterpret_cast(value.data()), value.size()); + } + + /*! + @brief Calculates the size necessary to serialize the JSON value @a j with its @a name + @return The calculated size for the BSON document entry for @a j with the given @a name. + */ + static std::size_t calc_bson_element_size(const string_t& name, + const BasicJsonType& j) + { + const auto header_size = calc_bson_entry_header_size(name, j); + switch (j.type()) + { + case value_t::object: + return header_size + calc_bson_object_size(*j.m_value.object); + + case value_t::array: + return header_size + calc_bson_array_size(*j.m_value.array); + + case value_t::binary: + return header_size + calc_bson_binary_size(*j.m_value.binary); + + case value_t::boolean: + return header_size + 1ul; + + case value_t::number_float: + return header_size + 8ul; + + case value_t::number_integer: + return header_size + calc_bson_integer_size(j.m_value.number_integer); + + case value_t::number_unsigned: + return header_size + calc_bson_unsigned_size(j.m_value.number_unsigned); + + case value_t::string: + return header_size + calc_bson_string_size(*j.m_value.string); + + case value_t::null: + return header_size + 0ul; + + // LCOV_EXCL_START + case value_t::discarded: + default: + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) + return 0ul; + // LCOV_EXCL_STOP + } + } + + /*! + @brief Serializes the JSON value @a j to BSON and associates it with the + key @a name. + @param name The name to associate with the JSON entity @a j within the + current BSON document + */ + void write_bson_element(const string_t& name, + const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::object: + return write_bson_object_entry(name, *j.m_value.object); + + case value_t::array: + return write_bson_array(name, *j.m_value.array); + + case value_t::binary: + return write_bson_binary(name, *j.m_value.binary); + + case value_t::boolean: + return write_bson_boolean(name, j.m_value.boolean); + + case value_t::number_float: + return write_bson_double(name, j.m_value.number_float); + + case value_t::number_integer: + return write_bson_integer(name, j.m_value.number_integer); + + case value_t::number_unsigned: + return write_bson_unsigned(name, j); + + case value_t::string: + return write_bson_string(name, *j.m_value.string); + + case value_t::null: + return write_bson_null(name); + + // LCOV_EXCL_START + case value_t::discarded: + default: + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) + return; + // LCOV_EXCL_STOP + } + } + + /*! + @brief Calculates the size of the BSON serialization of the given + JSON-object @a j. + @param[in] value JSON value to serialize + @pre value.type() == value_t::object + */ + static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t& value) + { + std::size_t document_size = std::accumulate(value.begin(), value.end(), static_cast(0), + [](size_t result, const typename BasicJsonType::object_t::value_type & el) + { + return result += calc_bson_element_size(el.first, el.second); + }); + + return sizeof(std::int32_t) + document_size + 1ul; + } + + /*! + @param[in] value JSON value to serialize + @pre value.type() == value_t::object + */ + void write_bson_object(const typename BasicJsonType::object_t& value) + { + write_number(static_cast(calc_bson_object_size(value))); + + for (const auto& el : value) + { + write_bson_element(el.first, el.second); + } + + oa->write_character(to_char_type(0x00)); + } + + ////////// + // CBOR // + ////////// + + static constexpr CharType get_cbor_float_prefix(float /*unused*/) + { + return to_char_type(0xFA); // Single-Precision Float + } + + static constexpr CharType get_cbor_float_prefix(double /*unused*/) + { + return to_char_type(0xFB); // Double-Precision Float + } + + ///////////// + // MsgPack // + ///////////// + + static constexpr CharType get_msgpack_float_prefix(float /*unused*/) + { + return to_char_type(0xCA); // float 32 + } + + static constexpr CharType get_msgpack_float_prefix(double /*unused*/) + { + return to_char_type(0xCB); // float 64 + } + + //////////// + // UBJSON // + //////////// + + // UBJSON: write number (floating point) + template::value, int>::type = 0> + void write_number_with_ubjson_prefix(const NumberType n, + const bool add_prefix) + { + if (add_prefix) + { + oa->write_character(get_ubjson_float_prefix(n)); + } + write_number(n); + } + + // UBJSON: write number (unsigned integer) + template::value, int>::type = 0> + void write_number_with_ubjson_prefix(const NumberType n, + const bool add_prefix) + { + if (n <= static_cast((std::numeric_limits::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('i')); // int8 + } + write_number(static_cast(n)); + } + else if (n <= (std::numeric_limits::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('U')); // uint8 + } + write_number(static_cast(n)); + } + else if (n <= static_cast((std::numeric_limits::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('I')); // int16 + } + write_number(static_cast(n)); + } + else if (n <= static_cast((std::numeric_limits::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('l')); // int32 + } + write_number(static_cast(n)); + } + else if (n <= static_cast((std::numeric_limits::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('L')); // int64 + } + write_number(static_cast(n)); + } + else + { + if (add_prefix) + { + oa->write_character(to_char_type('H')); // high-precision number + } + + const auto number = BasicJsonType(n).dump(); + write_number_with_ubjson_prefix(number.size(), true); + for (std::size_t i = 0; i < number.size(); ++i) + { + oa->write_character(to_char_type(static_cast(number[i]))); + } + } + } + + // UBJSON: write number (signed integer) + template < typename NumberType, typename std::enable_if < + std::is_signed::value&& + !std::is_floating_point::value, int >::type = 0 > + void write_number_with_ubjson_prefix(const NumberType n, + const bool add_prefix) + { + if ((std::numeric_limits::min)() <= n && n <= (std::numeric_limits::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('i')); // int8 + } + write_number(static_cast(n)); + } + else if (static_cast((std::numeric_limits::min)()) <= n && n <= static_cast((std::numeric_limits::max)())) + { + if (add_prefix) + { + oa->write_character(to_char_type('U')); // uint8 + } + write_number(static_cast(n)); + } + else if ((std::numeric_limits::min)() <= n && n <= (std::numeric_limits::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('I')); // int16 + } + write_number(static_cast(n)); + } + else if ((std::numeric_limits::min)() <= n && n <= (std::numeric_limits::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('l')); // int32 + } + write_number(static_cast(n)); + } + else if ((std::numeric_limits::min)() <= n && n <= (std::numeric_limits::max)()) + { + if (add_prefix) + { + oa->write_character(to_char_type('L')); // int64 + } + write_number(static_cast(n)); + } + // LCOV_EXCL_START + else + { + if (add_prefix) + { + oa->write_character(to_char_type('H')); // high-precision number + } + + const auto number = BasicJsonType(n).dump(); + write_number_with_ubjson_prefix(number.size(), true); + for (std::size_t i = 0; i < number.size(); ++i) + { + oa->write_character(to_char_type(static_cast(number[i]))); + } + } + // LCOV_EXCL_STOP + } + + /*! + @brief determine the type prefix of container values + */ + CharType ubjson_prefix(const BasicJsonType& j) const noexcept + { + switch (j.type()) + { + case value_t::null: + return 'Z'; + + case value_t::boolean: + return j.m_value.boolean ? 'T' : 'F'; + + case value_t::number_integer: + { + if ((std::numeric_limits::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits::max)()) + { + return 'i'; + } + if ((std::numeric_limits::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits::max)()) + { + return 'U'; + } + if ((std::numeric_limits::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits::max)()) + { + return 'I'; + } + if ((std::numeric_limits::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits::max)()) + { + return 'l'; + } + if ((std::numeric_limits::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits::max)()) + { + return 'L'; + } + // anything else is treated as high-precision number + return 'H'; // LCOV_EXCL_LINE + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) + { + return 'i'; + } + if (j.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) + { + return 'U'; + } + if (j.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) + { + return 'I'; + } + if (j.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) + { + return 'l'; + } + if (j.m_value.number_unsigned <= static_cast((std::numeric_limits::max)())) + { + return 'L'; + } + // anything else is treated as high-precision number + return 'H'; // LCOV_EXCL_LINE + } + + case value_t::number_float: + return get_ubjson_float_prefix(j.m_value.number_float); + + case value_t::string: + return 'S'; + + case value_t::array: // fallthrough + case value_t::binary: + return '['; + + case value_t::object: + return '{'; + + case value_t::discarded: + default: // discarded values + return 'N'; + } + } + + static constexpr CharType get_ubjson_float_prefix(float /*unused*/) + { + return 'd'; // float 32 + } + + static constexpr CharType get_ubjson_float_prefix(double /*unused*/) + { + return 'D'; // float 64 + } + + /////////////////////// + // Utility functions // + /////////////////////// + + /* + @brief write a number to output input + @param[in] n number of type @a NumberType + @tparam NumberType the type of the number + @tparam OutputIsLittleEndian Set to true if output data is + required to be little endian + + @note This function needs to respect the system's endianness, because bytes + in CBOR, MessagePack, and UBJSON are stored in network order (big + endian) and therefore need reordering on little endian systems. + */ + template + void write_number(const NumberType n) + { + // step 1: write number to array of length NumberType + std::array vec{}; + std::memcpy(vec.data(), &n, sizeof(NumberType)); + + // step 2: write array to output (with possible reordering) + if (is_little_endian != OutputIsLittleEndian) + { + // reverse byte order prior to conversion if necessary + std::reverse(vec.begin(), vec.end()); + } + + oa->write_characters(vec.data(), sizeof(NumberType)); + } + + void write_compact_float(const number_float_t n, detail::input_format_t format) + { +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + if (static_cast(n) >= static_cast(std::numeric_limits::lowest()) && + static_cast(n) <= static_cast((std::numeric_limits::max)()) && + static_cast(static_cast(n)) == static_cast(n)) + { + oa->write_character(format == detail::input_format_t::cbor + ? get_cbor_float_prefix(static_cast(n)) + : get_msgpack_float_prefix(static_cast(n))); + write_number(static_cast(n)); + } + else + { + oa->write_character(format == detail::input_format_t::cbor + ? get_cbor_float_prefix(n) + : get_msgpack_float_prefix(n)); + write_number(n); + } +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + } + + public: + // The following to_char_type functions are implement the conversion + // between uint8_t and CharType. In case CharType is not unsigned, + // such a conversion is required to allow values greater than 128. + // See for a discussion. + template < typename C = CharType, + enable_if_t < std::is_signed::value && std::is_signed::value > * = nullptr > + static constexpr CharType to_char_type(std::uint8_t x) noexcept + { + return *reinterpret_cast(&x); + } + + template < typename C = CharType, + enable_if_t < std::is_signed::value && std::is_unsigned::value > * = nullptr > + static CharType to_char_type(std::uint8_t x) noexcept + { + static_assert(sizeof(std::uint8_t) == sizeof(CharType), "size of CharType must be equal to std::uint8_t"); + static_assert(std::is_trivial::value, "CharType must be trivial"); + CharType result; + std::memcpy(&result, &x, sizeof(x)); + return result; + } + + template::value>* = nullptr> + static constexpr CharType to_char_type(std::uint8_t x) noexcept + { + return x; + } + + template < typename InputCharType, typename C = CharType, + enable_if_t < + std::is_signed::value && + std::is_signed::value && + std::is_same::type>::value + > * = nullptr > + static constexpr CharType to_char_type(InputCharType x) noexcept + { + return x; + } + + private: + /// whether we can assume little endianness + const bool is_little_endian = little_endianness(); + + /// the output + output_adapter_t oa = nullptr; +}; +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + + +#include // reverse, remove, fill, find, none_of +#include // array +#include // localeconv, lconv +#include // labs, isfinite, isnan, signbit +#include // size_t, ptrdiff_t +#include // uint8_t +#include // snprintf +#include // numeric_limits +#include // string, char_traits +#include // setfill, setw +#include // stringstream +#include // is_same +#include // move + +// #include + + +#include // array +#include // signbit, isfinite +#include // intN_t, uintN_t +#include // memcpy, memmove +#include // numeric_limits +#include // conditional + +// #include + + +namespace nlohmann +{ +namespace detail +{ + +/*! +@brief implements the Grisu2 algorithm for binary to decimal floating-point +conversion. + +This implementation is a slightly modified version of the reference +implementation which may be obtained from +http://florian.loitsch.com/publications (bench.tar.gz). + +The code is distributed under the MIT license, Copyright (c) 2009 Florian Loitsch. + +For a detailed description of the algorithm see: + +[1] Loitsch, "Printing Floating-Point Numbers Quickly and Accurately with + Integers", Proceedings of the ACM SIGPLAN 2010 Conference on Programming + Language Design and Implementation, PLDI 2010 +[2] Burger, Dybvig, "Printing Floating-Point Numbers Quickly and Accurately", + Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language + Design and Implementation, PLDI 1996 +*/ +namespace dtoa_impl +{ + +template +Target reinterpret_bits(const Source source) +{ + static_assert(sizeof(Target) == sizeof(Source), "size mismatch"); + + Target target; + std::memcpy(&target, &source, sizeof(Source)); + return target; +} + +struct diyfp // f * 2^e +{ + static constexpr int kPrecision = 64; // = q + + std::uint64_t f = 0; + int e = 0; + + constexpr diyfp(std::uint64_t f_, int e_) noexcept : f(f_), e(e_) {} + + /*! + @brief returns x - y + @pre x.e == y.e and x.f >= y.f + */ + static diyfp sub(const diyfp& x, const diyfp& y) noexcept + { + JSON_ASSERT(x.e == y.e); + JSON_ASSERT(x.f >= y.f); + + return {x.f - y.f, x.e}; + } + + /*! + @brief returns x * y + @note The result is rounded. (Only the upper q bits are returned.) + */ + static diyfp mul(const diyfp& x, const diyfp& y) noexcept + { + static_assert(kPrecision == 64, "internal error"); + + // Computes: + // f = round((x.f * y.f) / 2^q) + // e = x.e + y.e + q + + // Emulate the 64-bit * 64-bit multiplication: + // + // p = u * v + // = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi) + // = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi ) + // = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 ) + // = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 ) + // = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3) + // = (p0_lo ) + 2^32 (Q ) + 2^64 (H ) + // = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H ) + // + // (Since Q might be larger than 2^32 - 1) + // + // = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H) + // + // (Q_hi + H does not overflow a 64-bit int) + // + // = p_lo + 2^64 p_hi + + const std::uint64_t u_lo = x.f & 0xFFFFFFFFu; + const std::uint64_t u_hi = x.f >> 32u; + const std::uint64_t v_lo = y.f & 0xFFFFFFFFu; + const std::uint64_t v_hi = y.f >> 32u; + + const std::uint64_t p0 = u_lo * v_lo; + const std::uint64_t p1 = u_lo * v_hi; + const std::uint64_t p2 = u_hi * v_lo; + const std::uint64_t p3 = u_hi * v_hi; + + const std::uint64_t p0_hi = p0 >> 32u; + const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu; + const std::uint64_t p1_hi = p1 >> 32u; + const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu; + const std::uint64_t p2_hi = p2 >> 32u; + + std::uint64_t Q = p0_hi + p1_lo + p2_lo; + + // The full product might now be computed as + // + // p_hi = p3 + p2_hi + p1_hi + (Q >> 32) + // p_lo = p0_lo + (Q << 32) + // + // But in this particular case here, the full p_lo is not required. + // Effectively we only need to add the highest bit in p_lo to p_hi (and + // Q_hi + 1 does not overflow). + + Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up + + const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u); + + return {h, x.e + y.e + 64}; + } + + /*! + @brief normalize x such that the significand is >= 2^(q-1) + @pre x.f != 0 + */ + static diyfp normalize(diyfp x) noexcept + { + JSON_ASSERT(x.f != 0); + + while ((x.f >> 63u) == 0) + { + x.f <<= 1u; + x.e--; + } + + return x; + } + + /*! + @brief normalize x such that the result has the exponent E + @pre e >= x.e and the upper e - x.e bits of x.f must be zero. + */ + static diyfp normalize_to(const diyfp& x, const int target_exponent) noexcept + { + const int delta = x.e - target_exponent; + + JSON_ASSERT(delta >= 0); + JSON_ASSERT(((x.f << delta) >> delta) == x.f); + + return {x.f << delta, target_exponent}; + } +}; + +struct boundaries +{ + diyfp w; + diyfp minus; + diyfp plus; +}; + +/*! +Compute the (normalized) diyfp representing the input number 'value' and its +boundaries. + +@pre value must be finite and positive +*/ +template +boundaries compute_boundaries(FloatType value) +{ + JSON_ASSERT(std::isfinite(value)); + JSON_ASSERT(value > 0); + + // Convert the IEEE representation into a diyfp. + // + // If v is denormal: + // value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1)) + // If v is normalized: + // value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1)) + + static_assert(std::numeric_limits::is_iec559, + "internal error: dtoa_short requires an IEEE-754 floating-point implementation"); + + constexpr int kPrecision = std::numeric_limits::digits; // = p (includes the hidden bit) + constexpr int kBias = std::numeric_limits::max_exponent - 1 + (kPrecision - 1); + constexpr int kMinExp = 1 - kBias; + constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1) + + using bits_type = typename std::conditional::type; + + const auto bits = static_cast(reinterpret_bits(value)); + const std::uint64_t E = bits >> (kPrecision - 1); + const std::uint64_t F = bits & (kHiddenBit - 1); + + const bool is_denormal = E == 0; + const diyfp v = is_denormal + ? diyfp(F, kMinExp) + : diyfp(F + kHiddenBit, static_cast(E) - kBias); + + // Compute the boundaries m- and m+ of the floating-point value + // v = f * 2^e. + // + // Determine v- and v+, the floating-point predecessor and successor if v, + // respectively. + // + // v- = v - 2^e if f != 2^(p-1) or e == e_min (A) + // = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B) + // + // v+ = v + 2^e + // + // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_ + // between m- and m+ round to v, regardless of how the input rounding + // algorithm breaks ties. + // + // ---+-------------+-------------+-------------+-------------+--- (A) + // v- m- v m+ v+ + // + // -----------------+------+------+-------------+-------------+--- (B) + // v- m- v m+ v+ + + const bool lower_boundary_is_closer = F == 0 && E > 1; + const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); + const diyfp m_minus = lower_boundary_is_closer + ? diyfp(4 * v.f - 1, v.e - 2) // (B) + : diyfp(2 * v.f - 1, v.e - 1); // (A) + + // Determine the normalized w+ = m+. + const diyfp w_plus = diyfp::normalize(m_plus); + + // Determine w- = m- such that e_(w-) = e_(w+). + const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e); + + return {diyfp::normalize(v), w_minus, w_plus}; +} + +// Given normalized diyfp w, Grisu needs to find a (normalized) cached +// power-of-ten c, such that the exponent of the product c * w = f * 2^e lies +// within a certain range [alpha, gamma] (Definition 3.2 from [1]) +// +// alpha <= e = e_c + e_w + q <= gamma +// +// or +// +// f_c * f_w * 2^alpha <= f_c 2^(e_c) * f_w 2^(e_w) * 2^q +// <= f_c * f_w * 2^gamma +// +// Since c and w are normalized, i.e. 2^(q-1) <= f < 2^q, this implies +// +// 2^(q-1) * 2^(q-1) * 2^alpha <= c * w * 2^q < 2^q * 2^q * 2^gamma +// +// or +// +// 2^(q - 2 + alpha) <= c * w < 2^(q + gamma) +// +// The choice of (alpha,gamma) determines the size of the table and the form of +// the digit generation procedure. Using (alpha,gamma)=(-60,-32) works out well +// in practice: +// +// The idea is to cut the number c * w = f * 2^e into two parts, which can be +// processed independently: An integral part p1, and a fractional part p2: +// +// f * 2^e = ( (f div 2^-e) * 2^-e + (f mod 2^-e) ) * 2^e +// = (f div 2^-e) + (f mod 2^-e) * 2^e +// = p1 + p2 * 2^e +// +// The conversion of p1 into decimal form requires a series of divisions and +// modulos by (a power of) 10. These operations are faster for 32-bit than for +// 64-bit integers, so p1 should ideally fit into a 32-bit integer. This can be +// achieved by choosing +// +// -e >= 32 or e <= -32 := gamma +// +// In order to convert the fractional part +// +// p2 * 2^e = p2 / 2^-e = d[-1] / 10^1 + d[-2] / 10^2 + ... +// +// into decimal form, the fraction is repeatedly multiplied by 10 and the digits +// d[-i] are extracted in order: +// +// (10 * p2) div 2^-e = d[-1] +// (10 * p2) mod 2^-e = d[-2] / 10^1 + ... +// +// The multiplication by 10 must not overflow. It is sufficient to choose +// +// 10 * p2 < 16 * p2 = 2^4 * p2 <= 2^64. +// +// Since p2 = f mod 2^-e < 2^-e, +// +// -e <= 60 or e >= -60 := alpha + +constexpr int kAlpha = -60; +constexpr int kGamma = -32; + +struct cached_power // c = f * 2^e ~= 10^k +{ + std::uint64_t f; + int e; + int k; +}; + +/*! +For a normalized diyfp w = f * 2^e, this function returns a (normalized) cached +power-of-ten c = f_c * 2^e_c, such that the exponent of the product w * c +satisfies (Definition 3.2 from [1]) + + alpha <= e_c + e + q <= gamma. +*/ +inline cached_power get_cached_power_for_binary_exponent(int e) +{ + // Now + // + // alpha <= e_c + e + q <= gamma (1) + // ==> f_c * 2^alpha <= c * 2^e * 2^q + // + // and since the c's are normalized, 2^(q-1) <= f_c, + // + // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) + // ==> 2^(alpha - e - 1) <= c + // + // If c were an exact power of ten, i.e. c = 10^k, one may determine k as + // + // k = ceil( log_10( 2^(alpha - e - 1) ) ) + // = ceil( (alpha - e - 1) * log_10(2) ) + // + // From the paper: + // "In theory the result of the procedure could be wrong since c is rounded, + // and the computation itself is approximated [...]. In practice, however, + // this simple function is sufficient." + // + // For IEEE double precision floating-point numbers converted into + // normalized diyfp's w = f * 2^e, with q = 64, + // + // e >= -1022 (min IEEE exponent) + // -52 (p - 1) + // -52 (p - 1, possibly normalize denormal IEEE numbers) + // -11 (normalize the diyfp) + // = -1137 + // + // and + // + // e <= +1023 (max IEEE exponent) + // -52 (p - 1) + // -11 (normalize the diyfp) + // = 960 + // + // This binary exponent range [-1137,960] results in a decimal exponent + // range [-307,324]. One does not need to store a cached power for each + // k in this range. For each such k it suffices to find a cached power + // such that the exponent of the product lies in [alpha,gamma]. + // This implies that the difference of the decimal exponents of adjacent + // table entries must be less than or equal to + // + // floor( (gamma - alpha) * log_10(2) ) = 8. + // + // (A smaller distance gamma-alpha would require a larger table.) + + // NB: + // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34. + + constexpr int kCachedPowersMinDecExp = -300; + constexpr int kCachedPowersDecStep = 8; + + static constexpr std::array kCachedPowers = + { + { + { 0xAB70FE17C79AC6CA, -1060, -300 }, + { 0xFF77B1FCBEBCDC4F, -1034, -292 }, + { 0xBE5691EF416BD60C, -1007, -284 }, + { 0x8DD01FAD907FFC3C, -980, -276 }, + { 0xD3515C2831559A83, -954, -268 }, + { 0x9D71AC8FADA6C9B5, -927, -260 }, + { 0xEA9C227723EE8BCB, -901, -252 }, + { 0xAECC49914078536D, -874, -244 }, + { 0x823C12795DB6CE57, -847, -236 }, + { 0xC21094364DFB5637, -821, -228 }, + { 0x9096EA6F3848984F, -794, -220 }, + { 0xD77485CB25823AC7, -768, -212 }, + { 0xA086CFCD97BF97F4, -741, -204 }, + { 0xEF340A98172AACE5, -715, -196 }, + { 0xB23867FB2A35B28E, -688, -188 }, + { 0x84C8D4DFD2C63F3B, -661, -180 }, + { 0xC5DD44271AD3CDBA, -635, -172 }, + { 0x936B9FCEBB25C996, -608, -164 }, + { 0xDBAC6C247D62A584, -582, -156 }, + { 0xA3AB66580D5FDAF6, -555, -148 }, + { 0xF3E2F893DEC3F126, -529, -140 }, + { 0xB5B5ADA8AAFF80B8, -502, -132 }, + { 0x87625F056C7C4A8B, -475, -124 }, + { 0xC9BCFF6034C13053, -449, -116 }, + { 0x964E858C91BA2655, -422, -108 }, + { 0xDFF9772470297EBD, -396, -100 }, + { 0xA6DFBD9FB8E5B88F, -369, -92 }, + { 0xF8A95FCF88747D94, -343, -84 }, + { 0xB94470938FA89BCF, -316, -76 }, + { 0x8A08F0F8BF0F156B, -289, -68 }, + { 0xCDB02555653131B6, -263, -60 }, + { 0x993FE2C6D07B7FAC, -236, -52 }, + { 0xE45C10C42A2B3B06, -210, -44 }, + { 0xAA242499697392D3, -183, -36 }, + { 0xFD87B5F28300CA0E, -157, -28 }, + { 0xBCE5086492111AEB, -130, -20 }, + { 0x8CBCCC096F5088CC, -103, -12 }, + { 0xD1B71758E219652C, -77, -4 }, + { 0x9C40000000000000, -50, 4 }, + { 0xE8D4A51000000000, -24, 12 }, + { 0xAD78EBC5AC620000, 3, 20 }, + { 0x813F3978F8940984, 30, 28 }, + { 0xC097CE7BC90715B3, 56, 36 }, + { 0x8F7E32CE7BEA5C70, 83, 44 }, + { 0xD5D238A4ABE98068, 109, 52 }, + { 0x9F4F2726179A2245, 136, 60 }, + { 0xED63A231D4C4FB27, 162, 68 }, + { 0xB0DE65388CC8ADA8, 189, 76 }, + { 0x83C7088E1AAB65DB, 216, 84 }, + { 0xC45D1DF942711D9A, 242, 92 }, + { 0x924D692CA61BE758, 269, 100 }, + { 0xDA01EE641A708DEA, 295, 108 }, + { 0xA26DA3999AEF774A, 322, 116 }, + { 0xF209787BB47D6B85, 348, 124 }, + { 0xB454E4A179DD1877, 375, 132 }, + { 0x865B86925B9BC5C2, 402, 140 }, + { 0xC83553C5C8965D3D, 428, 148 }, + { 0x952AB45CFA97A0B3, 455, 156 }, + { 0xDE469FBD99A05FE3, 481, 164 }, + { 0xA59BC234DB398C25, 508, 172 }, + { 0xF6C69A72A3989F5C, 534, 180 }, + { 0xB7DCBF5354E9BECE, 561, 188 }, + { 0x88FCF317F22241E2, 588, 196 }, + { 0xCC20CE9BD35C78A5, 614, 204 }, + { 0x98165AF37B2153DF, 641, 212 }, + { 0xE2A0B5DC971F303A, 667, 220 }, + { 0xA8D9D1535CE3B396, 694, 228 }, + { 0xFB9B7CD9A4A7443C, 720, 236 }, + { 0xBB764C4CA7A44410, 747, 244 }, + { 0x8BAB8EEFB6409C1A, 774, 252 }, + { 0xD01FEF10A657842C, 800, 260 }, + { 0x9B10A4E5E9913129, 827, 268 }, + { 0xE7109BFBA19C0C9D, 853, 276 }, + { 0xAC2820D9623BF429, 880, 284 }, + { 0x80444B5E7AA7CF85, 907, 292 }, + { 0xBF21E44003ACDD2D, 933, 300 }, + { 0x8E679C2F5E44FF8F, 960, 308 }, + { 0xD433179D9C8CB841, 986, 316 }, + { 0x9E19DB92B4E31BA9, 1013, 324 }, + } + }; + + // This computation gives exactly the same results for k as + // k = ceil((kAlpha - e - 1) * 0.30102999566398114) + // for |e| <= 1500, but doesn't require floating-point operations. + // NB: log_10(2) ~= 78913 / 2^18 + JSON_ASSERT(e >= -1500); + JSON_ASSERT(e <= 1500); + const int f = kAlpha - e - 1; + const int k = (f * 78913) / (1 << 18) + static_cast(f > 0); + + const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; + JSON_ASSERT(index >= 0); + JSON_ASSERT(static_cast(index) < kCachedPowers.size()); + + const cached_power cached = kCachedPowers[static_cast(index)]; + JSON_ASSERT(kAlpha <= cached.e + e + 64); + JSON_ASSERT(kGamma >= cached.e + e + 64); + + return cached; +} + +/*! +For n != 0, returns k, such that pow10 := 10^(k-1) <= n < 10^k. +For n == 0, returns 1 and sets pow10 := 1. +*/ +inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10) +{ + // LCOV_EXCL_START + if (n >= 1000000000) + { + pow10 = 1000000000; + return 10; + } + // LCOV_EXCL_STOP + if (n >= 100000000) + { + pow10 = 100000000; + return 9; + } + if (n >= 10000000) + { + pow10 = 10000000; + return 8; + } + if (n >= 1000000) + { + pow10 = 1000000; + return 7; + } + if (n >= 100000) + { + pow10 = 100000; + return 6; + } + if (n >= 10000) + { + pow10 = 10000; + return 5; + } + if (n >= 1000) + { + pow10 = 1000; + return 4; + } + if (n >= 100) + { + pow10 = 100; + return 3; + } + if (n >= 10) + { + pow10 = 10; + return 2; + } + + pow10 = 1; + return 1; +} + +inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta, + std::uint64_t rest, std::uint64_t ten_k) +{ + JSON_ASSERT(len >= 1); + JSON_ASSERT(dist <= delta); + JSON_ASSERT(rest <= delta); + JSON_ASSERT(ten_k > 0); + + // <--------------------------- delta ----> + // <---- dist ---------> + // --------------[------------------+-------------------]-------------- + // M- w M+ + // + // ten_k + // <------> + // <---- rest ----> + // --------------[------------------+----+--------------]-------------- + // w V + // = buf * 10^k + // + // ten_k represents a unit-in-the-last-place in the decimal representation + // stored in buf. + // Decrement buf by ten_k while this takes buf closer to w. + + // The tests are written in this order to avoid overflow in unsigned + // integer arithmetic. + + while (rest < dist + && delta - rest >= ten_k + && (rest + ten_k < dist || dist - rest > rest + ten_k - dist)) + { + JSON_ASSERT(buf[len - 1] != '0'); + buf[len - 1]--; + rest += ten_k; + } +} + +/*! +Generates V = buffer * 10^decimal_exponent, such that M- <= V <= M+. +M- and M+ must be normalized and share the same exponent -60 <= e <= -32. +*/ +inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, + diyfp M_minus, diyfp w, diyfp M_plus) +{ + static_assert(kAlpha >= -60, "internal error"); + static_assert(kGamma <= -32, "internal error"); + + // Generates the digits (and the exponent) of a decimal floating-point + // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's + // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma. + // + // <--------------------------- delta ----> + // <---- dist ---------> + // --------------[------------------+-------------------]-------------- + // M- w M+ + // + // Grisu2 generates the digits of M+ from left to right and stops as soon as + // V is in [M-,M+]. + + JSON_ASSERT(M_plus.e >= kAlpha); + JSON_ASSERT(M_plus.e <= kGamma); + + std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e) + std::uint64_t dist = diyfp::sub(M_plus, w ).f; // (significand of (M+ - w ), implicit exponent is e) + + // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0): + // + // M+ = f * 2^e + // = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e + // = ((p1 ) * 2^-e + (p2 )) * 2^e + // = p1 + p2 * 2^e + + const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e); + + auto p1 = static_cast(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.) + std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e + + // 1) + // + // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0] + + JSON_ASSERT(p1 > 0); + + std::uint32_t pow10{}; + const int k = find_largest_pow10(p1, pow10); + + // 10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1) + // + // p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1)) + // = (d[k-1] ) * 10^(k-1) + (p1 mod 10^(k-1)) + // + // M+ = p1 + p2 * 2^e + // = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1)) + p2 * 2^e + // = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e + // = d[k-1] * 10^(k-1) + ( rest) * 2^e + // + // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0) + // + // p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0] + // + // but stop as soon as + // + // rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e + + int n = k; + while (n > 0) + { + // Invariants: + // M+ = buffer * 10^n + (p1 + p2 * 2^e) (buffer = 0 for n = k) + // pow10 = 10^(n-1) <= p1 < 10^n + // + const std::uint32_t d = p1 / pow10; // d = p1 div 10^(n-1) + const std::uint32_t r = p1 % pow10; // r = p1 mod 10^(n-1) + // + // M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e + // = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e) + // + JSON_ASSERT(d <= 9); + buffer[length++] = static_cast('0' + d); // buffer := buffer * 10 + d + // + // M+ = buffer * 10^(n-1) + (r + p2 * 2^e) + // + p1 = r; + n--; + // + // M+ = buffer * 10^n + (p1 + p2 * 2^e) + // pow10 = 10^n + // + + // Now check if enough digits have been generated. + // Compute + // + // p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e + // + // Note: + // Since rest and delta share the same exponent e, it suffices to + // compare the significands. + const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2; + if (rest <= delta) + { + // V = buffer * 10^n, with M- <= V <= M+. + + decimal_exponent += n; + + // We may now just stop. But instead look if the buffer could be + // decremented to bring V closer to w. + // + // pow10 = 10^n is now 1 ulp in the decimal representation V. + // The rounding procedure works with diyfp's with an implicit + // exponent of e. + // + // 10^n = (10^n * 2^-e) * 2^e = ulp * 2^e + // + const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e; + grisu2_round(buffer, length, dist, delta, rest, ten_n); + + return; + } + + pow10 /= 10; + // + // pow10 = 10^(n-1) <= p1 < 10^n + // Invariants restored. + } + + // 2) + // + // The digits of the integral part have been generated: + // + // M+ = d[k-1]...d[1]d[0] + p2 * 2^e + // = buffer + p2 * 2^e + // + // Now generate the digits of the fractional part p2 * 2^e. + // + // Note: + // No decimal point is generated: the exponent is adjusted instead. + // + // p2 actually represents the fraction + // + // p2 * 2^e + // = p2 / 2^-e + // = d[-1] / 10^1 + d[-2] / 10^2 + ... + // + // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...) + // + // p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m + // + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...) + // + // using + // + // 10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e) + // = ( d) * 2^-e + ( r) + // + // or + // 10^m * p2 * 2^e = d + r * 2^e + // + // i.e. + // + // M+ = buffer + p2 * 2^e + // = buffer + 10^-m * (d + r * 2^e) + // = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e + // + // and stop as soon as 10^-m * r * 2^e <= delta * 2^e + + JSON_ASSERT(p2 > delta); + + int m = 0; + for (;;) + { + // Invariant: + // M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e + // = buffer * 10^-m + 10^-m * (p2 ) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e + // + JSON_ASSERT(p2 <= (std::numeric_limits::max)() / 10); + p2 *= 10; + const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e + const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e + // + // M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e)) + // = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e + // + JSON_ASSERT(d <= 9); + buffer[length++] = static_cast('0' + d); // buffer := buffer * 10 + d + // + // M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e + // + p2 = r; + m++; + // + // M+ = buffer * 10^-m + 10^-m * p2 * 2^e + // Invariant restored. + + // Check if enough digits have been generated. + // + // 10^-m * p2 * 2^e <= delta * 2^e + // p2 * 2^e <= 10^m * delta * 2^e + // p2 <= 10^m * delta + delta *= 10; + dist *= 10; + if (p2 <= delta) + { + break; + } + } + + // V = buffer * 10^-m, with M- <= V <= M+. + + decimal_exponent -= m; + + // 1 ulp in the decimal representation is now 10^-m. + // Since delta and dist are now scaled by 10^m, we need to do the + // same with ulp in order to keep the units in sync. + // + // 10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e + // + const std::uint64_t ten_m = one.f; + grisu2_round(buffer, length, dist, delta, p2, ten_m); + + // By construction this algorithm generates the shortest possible decimal + // number (Loitsch, Theorem 6.2) which rounds back to w. + // For an input number of precision p, at least + // + // N = 1 + ceil(p * log_10(2)) + // + // decimal digits are sufficient to identify all binary floating-point + // numbers (Matula, "In-and-Out conversions"). + // This implies that the algorithm does not produce more than N decimal + // digits. + // + // N = 17 for p = 53 (IEEE double precision) + // N = 9 for p = 24 (IEEE single precision) +} + +/*! +v = buf * 10^decimal_exponent +len is the length of the buffer (number of decimal digits) +The buffer must be large enough, i.e. >= max_digits10. +*/ +JSON_HEDLEY_NON_NULL(1) +inline void grisu2(char* buf, int& len, int& decimal_exponent, + diyfp m_minus, diyfp v, diyfp m_plus) +{ + JSON_ASSERT(m_plus.e == m_minus.e); + JSON_ASSERT(m_plus.e == v.e); + + // --------(-----------------------+-----------------------)-------- (A) + // m- v m+ + // + // --------------------(-----------+-----------------------)-------- (B) + // m- v m+ + // + // First scale v (and m- and m+) such that the exponent is in the range + // [alpha, gamma]. + + const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e); + + const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k + + // The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma] + const diyfp w = diyfp::mul(v, c_minus_k); + const diyfp w_minus = diyfp::mul(m_minus, c_minus_k); + const diyfp w_plus = diyfp::mul(m_plus, c_minus_k); + + // ----(---+---)---------------(---+---)---------------(---+---)---- + // w- w w+ + // = c*m- = c*v = c*m+ + // + // diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and + // w+ are now off by a small amount. + // In fact: + // + // w - v * 10^k < 1 ulp + // + // To account for this inaccuracy, add resp. subtract 1 ulp. + // + // --------+---[---------------(---+---)---------------]---+-------- + // w- M- w M+ w+ + // + // Now any number in [M-, M+] (bounds included) will round to w when input, + // regardless of how the input rounding algorithm breaks ties. + // + // And digit_gen generates the shortest possible such number in [M-, M+]. + // Note that this does not mean that Grisu2 always generates the shortest + // possible number in the interval (m-, m+). + const diyfp M_minus(w_minus.f + 1, w_minus.e); + const diyfp M_plus (w_plus.f - 1, w_plus.e ); + + decimal_exponent = -cached.k; // = -(-k) = k + + grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus); +} + +/*! +v = buf * 10^decimal_exponent +len is the length of the buffer (number of decimal digits) +The buffer must be large enough, i.e. >= max_digits10. +*/ +template +JSON_HEDLEY_NON_NULL(1) +void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value) +{ + static_assert(diyfp::kPrecision >= std::numeric_limits::digits + 3, + "internal error: not enough precision"); + + JSON_ASSERT(std::isfinite(value)); + JSON_ASSERT(value > 0); + + // If the neighbors (and boundaries) of 'value' are always computed for double-precision + // numbers, all float's can be recovered using strtod (and strtof). However, the resulting + // decimal representations are not exactly "short". + // + // The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars) + // says "value is converted to a string as if by std::sprintf in the default ("C") locale" + // and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars' + // does. + // On the other hand, the documentation for 'std::to_chars' requires that "parsing the + // representation using the corresponding std::from_chars function recovers value exactly". That + // indicates that single precision floating-point numbers should be recovered using + // 'std::strtof'. + // + // NB: If the neighbors are computed for single-precision numbers, there is a single float + // (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision + // value is off by 1 ulp. +#if 0 + const boundaries w = compute_boundaries(static_cast(value)); +#else + const boundaries w = compute_boundaries(value); +#endif + + grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus); +} + +/*! +@brief appends a decimal representation of e to buf +@return a pointer to the element following the exponent. +@pre -1000 < e < 1000 +*/ +JSON_HEDLEY_NON_NULL(1) +JSON_HEDLEY_RETURNS_NON_NULL +inline char* append_exponent(char* buf, int e) +{ + JSON_ASSERT(e > -1000); + JSON_ASSERT(e < 1000); + + if (e < 0) + { + e = -e; + *buf++ = '-'; + } + else + { + *buf++ = '+'; + } + + auto k = static_cast(e); + if (k < 10) + { + // Always print at least two digits in the exponent. + // This is for compatibility with printf("%g"). + *buf++ = '0'; + *buf++ = static_cast('0' + k); + } + else if (k < 100) + { + *buf++ = static_cast('0' + k / 10); + k %= 10; + *buf++ = static_cast('0' + k); + } + else + { + *buf++ = static_cast('0' + k / 100); + k %= 100; + *buf++ = static_cast('0' + k / 10); + k %= 10; + *buf++ = static_cast('0' + k); + } + + return buf; +} + +/*! +@brief prettify v = buf * 10^decimal_exponent + +If v is in the range [10^min_exp, 10^max_exp) it will be printed in fixed-point +notation. Otherwise it will be printed in exponential notation. + +@pre min_exp < 0 +@pre max_exp > 0 +*/ +JSON_HEDLEY_NON_NULL(1) +JSON_HEDLEY_RETURNS_NON_NULL +inline char* format_buffer(char* buf, int len, int decimal_exponent, + int min_exp, int max_exp) +{ + JSON_ASSERT(min_exp < 0); + JSON_ASSERT(max_exp > 0); + + const int k = len; + const int n = len + decimal_exponent; + + // v = buf * 10^(n-k) + // k is the length of the buffer (number of decimal digits) + // n is the position of the decimal point relative to the start of the buffer. + + if (k <= n && n <= max_exp) + { + // digits[000] + // len <= max_exp + 2 + + std::memset(buf + k, '0', static_cast(n) - static_cast(k)); + // Make it look like a floating-point number (#362, #378) + buf[n + 0] = '.'; + buf[n + 1] = '0'; + return buf + (static_cast(n) + 2); + } + + if (0 < n && n <= max_exp) + { + // dig.its + // len <= max_digits10 + 1 + + JSON_ASSERT(k > n); + + std::memmove(buf + (static_cast(n) + 1), buf + n, static_cast(k) - static_cast(n)); + buf[n] = '.'; + return buf + (static_cast(k) + 1U); + } + + if (min_exp < n && n <= 0) + { + // 0.[000]digits + // len <= 2 + (-min_exp - 1) + max_digits10 + + std::memmove(buf + (2 + static_cast(-n)), buf, static_cast(k)); + buf[0] = '0'; + buf[1] = '.'; + std::memset(buf + 2, '0', static_cast(-n)); + return buf + (2U + static_cast(-n) + static_cast(k)); + } + + if (k == 1) + { + // dE+123 + // len <= 1 + 5 + + buf += 1; + } + else + { + // d.igitsE+123 + // len <= max_digits10 + 1 + 5 + + std::memmove(buf + 2, buf + 1, static_cast(k) - 1); + buf[1] = '.'; + buf += 1 + static_cast(k); + } + + *buf++ = 'e'; + return append_exponent(buf, n - 1); +} + +} // namespace dtoa_impl + +/*! +@brief generates a decimal representation of the floating-point number value in [first, last). + +The format of the resulting decimal representation is similar to printf's %g +format. Returns an iterator pointing past-the-end of the decimal representation. + +@note The input number must be finite, i.e. NaN's and Inf's are not supported. +@note The buffer must be large enough. +@note The result is NOT null-terminated. +*/ +template +JSON_HEDLEY_NON_NULL(1, 2) +JSON_HEDLEY_RETURNS_NON_NULL +char* to_chars(char* first, const char* last, FloatType value) +{ + static_cast(last); // maybe unused - fix warning + JSON_ASSERT(std::isfinite(value)); + + // Use signbit(value) instead of (value < 0) since signbit works for -0. + if (std::signbit(value)) + { + value = -value; + *first++ = '-'; + } + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + if (value == 0) // +-0 + { + *first++ = '0'; + // Make it look like a floating-point number (#362, #378) + *first++ = '.'; + *first++ = '0'; + return first; + } +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + + JSON_ASSERT(last - first >= std::numeric_limits::max_digits10); + + // Compute v = buffer * 10^decimal_exponent. + // The decimal digits are stored in the buffer, which needs to be interpreted + // as an unsigned decimal integer. + // len is the length of the buffer, i.e. the number of decimal digits. + int len = 0; + int decimal_exponent = 0; + dtoa_impl::grisu2(first, len, decimal_exponent, value); + + JSON_ASSERT(len <= std::numeric_limits::max_digits10); + + // Format the buffer like printf("%.*g", prec, value) + constexpr int kMinExp = -4; + // Use digits10 here to increase compatibility with version 2. + constexpr int kMaxExp = std::numeric_limits::digits10; + + JSON_ASSERT(last - first >= kMaxExp + 2); + JSON_ASSERT(last - first >= 2 + (-kMinExp - 1) + std::numeric_limits::max_digits10); + JSON_ASSERT(last - first >= std::numeric_limits::max_digits10 + 6); + + return dtoa_impl::format_buffer(first, len, decimal_exponent, kMinExp, kMaxExp); +} + +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + +// #include + +// #include + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +/////////////////// +// serialization // +/////////////////// + +/// how to treat decoding errors +enum class error_handler_t +{ + strict, ///< throw a type_error exception in case of invalid UTF-8 + replace, ///< replace invalid UTF-8 sequences with U+FFFD + ignore ///< ignore invalid UTF-8 sequences +}; + +template +class serializer +{ + using string_t = typename BasicJsonType::string_t; + using number_float_t = typename BasicJsonType::number_float_t; + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using binary_char_t = typename BasicJsonType::binary_t::value_type; + static constexpr std::uint8_t UTF8_ACCEPT = 0; + static constexpr std::uint8_t UTF8_REJECT = 1; + + public: + /*! + @param[in] s output stream to serialize to + @param[in] ichar indentation character to use + @param[in] error_handler_ how to react on decoding errors + */ + serializer(output_adapter_t s, const char ichar, + error_handler_t error_handler_ = error_handler_t::strict) + : o(std::move(s)) + , loc(std::localeconv()) + , thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits::to_char_type(* (loc->thousands_sep))) + , decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits::to_char_type(* (loc->decimal_point))) + , indent_char(ichar) + , indent_string(512, indent_char) + , error_handler(error_handler_) + {} + + // delete because of pointer members + serializer(const serializer&) = delete; + serializer& operator=(const serializer&) = delete; + serializer(serializer&&) = delete; + serializer& operator=(serializer&&) = delete; + ~serializer() = default; + + /*! + @brief internal implementation of the serialization function + + This function is called by the public member function dump and organizes + the serialization internally. The indentation level is propagated as + additional parameter. In case of arrays and objects, the function is + called recursively. + + - strings and object keys are escaped using `escape_string()` + - integer numbers are converted implicitly via `operator<<` + - floating-point numbers are converted to a string using `"%g"` format + - binary values are serialized as objects containing the subtype and the + byte array + + @param[in] val value to serialize + @param[in] pretty_print whether the output shall be pretty-printed + @param[in] ensure_ascii If @a ensure_ascii is true, all non-ASCII characters + in the output are escaped with `\uXXXX` sequences, and the result consists + of ASCII characters only. + @param[in] indent_step the indent level + @param[in] current_indent the current indent level (only used internally) + */ + void dump(const BasicJsonType& val, + const bool pretty_print, + const bool ensure_ascii, + const unsigned int indent_step, + const unsigned int current_indent = 0) + { + switch (val.m_type) + { + case value_t::object: + { + if (val.m_value.object->empty()) + { + o->write_characters("{}", 2); + return; + } + + if (pretty_print) + { + o->write_characters("{\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + auto i = val.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + JSON_ASSERT(i != val.m_value.object->cend()); + JSON_ASSERT(std::next(i) == val.m_value.object->cend()); + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character('}'); + } + else + { + o->write_character('{'); + + // first n-1 elements + auto i = val.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + JSON_ASSERT(i != val.m_value.object->cend()); + JSON_ASSERT(std::next(i) == val.m_value.object->cend()); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + + o->write_character('}'); + } + + return; + } + + case value_t::array: + { + if (val.m_value.array->empty()) + { + o->write_characters("[]", 2); + return; + } + + if (pretty_print) + { + o->write_characters("[\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + for (auto i = val.m_value.array->cbegin(); + i != val.m_value.array->cend() - 1; ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + dump(*i, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + JSON_ASSERT(!val.m_value.array->empty()); + o->write_characters(indent_string.c_str(), new_indent); + dump(val.m_value.array->back(), true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character(']'); + } + else + { + o->write_character('['); + + // first n-1 elements + for (auto i = val.m_value.array->cbegin(); + i != val.m_value.array->cend() - 1; ++i) + { + dump(*i, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + JSON_ASSERT(!val.m_value.array->empty()); + dump(val.m_value.array->back(), false, ensure_ascii, indent_step, current_indent); + + o->write_character(']'); + } + + return; + } + + case value_t::string: + { + o->write_character('\"'); + dump_escaped(*val.m_value.string, ensure_ascii); + o->write_character('\"'); + return; + } + + case value_t::binary: + { + if (pretty_print) + { + o->write_characters("{\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + o->write_characters(indent_string.c_str(), new_indent); + + o->write_characters("\"bytes\": [", 10); + + if (!val.m_value.binary->empty()) + { + for (auto i = val.m_value.binary->cbegin(); + i != val.m_value.binary->cend() - 1; ++i) + { + dump_integer(*i); + o->write_characters(", ", 2); + } + dump_integer(val.m_value.binary->back()); + } + + o->write_characters("],\n", 3); + o->write_characters(indent_string.c_str(), new_indent); + + o->write_characters("\"subtype\": ", 11); + if (val.m_value.binary->has_subtype()) + { + dump_integer(val.m_value.binary->subtype()); + } + else + { + o->write_characters("null", 4); + } + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character('}'); + } + else + { + o->write_characters("{\"bytes\":[", 10); + + if (!val.m_value.binary->empty()) + { + for (auto i = val.m_value.binary->cbegin(); + i != val.m_value.binary->cend() - 1; ++i) + { + dump_integer(*i); + o->write_character(','); + } + dump_integer(val.m_value.binary->back()); + } + + o->write_characters("],\"subtype\":", 12); + if (val.m_value.binary->has_subtype()) + { + dump_integer(val.m_value.binary->subtype()); + o->write_character('}'); + } + else + { + o->write_characters("null}", 5); + } + } + return; + } + + case value_t::boolean: + { + if (val.m_value.boolean) + { + o->write_characters("true", 4); + } + else + { + o->write_characters("false", 5); + } + return; + } + + case value_t::number_integer: + { + dump_integer(val.m_value.number_integer); + return; + } + + case value_t::number_unsigned: + { + dump_integer(val.m_value.number_unsigned); + return; + } + + case value_t::number_float: + { + dump_float(val.m_value.number_float); + return; + } + + case value_t::discarded: + { + o->write_characters("", 11); + return; + } + + case value_t::null: + { + o->write_characters("null", 4); + return; + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + } + + JSON_PRIVATE_UNLESS_TESTED: + /*! + @brief dump escaped string + + Escape a string by replacing certain special characters by a sequence of an + escape character (backslash) and another character and other control + characters by a sequence of "\u" followed by a four-digit hex + representation. The escaped string is written to output stream @a o. + + @param[in] s the string to escape + @param[in] ensure_ascii whether to escape non-ASCII characters with + \uXXXX sequences + + @complexity Linear in the length of string @a s. + */ + void dump_escaped(const string_t& s, const bool ensure_ascii) + { + std::uint32_t codepoint{}; + std::uint8_t state = UTF8_ACCEPT; + std::size_t bytes = 0; // number of bytes written to string_buffer + + // number of bytes written at the point of the last valid byte + std::size_t bytes_after_last_accept = 0; + std::size_t undumped_chars = 0; + + for (std::size_t i = 0; i < s.size(); ++i) + { + const auto byte = static_cast(s[i]); + + switch (decode(state, codepoint, byte)) + { + case UTF8_ACCEPT: // decode found a new code point + { + switch (codepoint) + { + case 0x08: // backspace + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'b'; + break; + } + + case 0x09: // horizontal tab + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 't'; + break; + } + + case 0x0A: // newline + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'n'; + break; + } + + case 0x0C: // formfeed + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'f'; + break; + } + + case 0x0D: // carriage return + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'r'; + break; + } + + case 0x22: // quotation mark + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = '\"'; + break; + } + + case 0x5C: // reverse solidus + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = '\\'; + break; + } + + default: + { + // escape control characters (0x00..0x1F) or, if + // ensure_ascii parameter is used, non-ASCII characters + if ((codepoint <= 0x1F) || (ensure_ascii && (codepoint >= 0x7F))) + { + if (codepoint <= 0xFFFF) + { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + static_cast((std::snprintf)(string_buffer.data() + bytes, 7, "\\u%04x", + static_cast(codepoint))); + bytes += 6; + } + else + { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + static_cast((std::snprintf)(string_buffer.data() + bytes, 13, "\\u%04x\\u%04x", + static_cast(0xD7C0u + (codepoint >> 10u)), + static_cast(0xDC00u + (codepoint & 0x3FFu)))); + bytes += 12; + } + } + else + { + // copy byte to buffer (all previous bytes + // been copied have in default case above) + string_buffer[bytes++] = s[i]; + } + break; + } + } + + // write buffer and reset index; there must be 13 bytes + // left, as this is the maximal number of bytes to be + // written ("\uxxxx\uxxxx\0") for one code point + if (string_buffer.size() - bytes < 13) + { + o->write_characters(string_buffer.data(), bytes); + bytes = 0; + } + + // remember the byte position of this accept + bytes_after_last_accept = bytes; + undumped_chars = 0; + break; + } + + case UTF8_REJECT: // decode found invalid UTF-8 byte + { + switch (error_handler) + { + case error_handler_t::strict: + { + std::stringstream ss; + ss << std::uppercase << std::setfill('0') << std::setw(2) << std::hex << (byte | 0); + JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + ss.str(), BasicJsonType())); + } + + case error_handler_t::ignore: + case error_handler_t::replace: + { + // in case we saw this character the first time, we + // would like to read it again, because the byte + // may be OK for itself, but just not OK for the + // previous sequence + if (undumped_chars > 0) + { + --i; + } + + // reset length buffer to the last accepted index; + // thus removing/ignoring the invalid characters + bytes = bytes_after_last_accept; + + if (error_handler == error_handler_t::replace) + { + // add a replacement character + if (ensure_ascii) + { + string_buffer[bytes++] = '\\'; + string_buffer[bytes++] = 'u'; + string_buffer[bytes++] = 'f'; + string_buffer[bytes++] = 'f'; + string_buffer[bytes++] = 'f'; + string_buffer[bytes++] = 'd'; + } + else + { + string_buffer[bytes++] = detail::binary_writer::to_char_type('\xEF'); + string_buffer[bytes++] = detail::binary_writer::to_char_type('\xBF'); + string_buffer[bytes++] = detail::binary_writer::to_char_type('\xBD'); + } + + // write buffer and reset index; there must be 13 bytes + // left, as this is the maximal number of bytes to be + // written ("\uxxxx\uxxxx\0") for one code point + if (string_buffer.size() - bytes < 13) + { + o->write_characters(string_buffer.data(), bytes); + bytes = 0; + } + + bytes_after_last_accept = bytes; + } + + undumped_chars = 0; + + // continue processing the string + state = UTF8_ACCEPT; + break; + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + break; + } + + default: // decode found yet incomplete multi-byte code point + { + if (!ensure_ascii) + { + // code point will not be escaped - copy byte to buffer + string_buffer[bytes++] = s[i]; + } + ++undumped_chars; + break; + } + } + } + + // we finished processing the string + if (JSON_HEDLEY_LIKELY(state == UTF8_ACCEPT)) + { + // write buffer + if (bytes > 0) + { + o->write_characters(string_buffer.data(), bytes); + } + } + else + { + // we finish reading, but do not accept: string was incomplete + switch (error_handler) + { + case error_handler_t::strict: + { + std::stringstream ss; + ss << std::uppercase << std::setfill('0') << std::setw(2) << std::hex << (static_cast(s.back()) | 0); + JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + ss.str(), BasicJsonType())); + } + + case error_handler_t::ignore: + { + // write all accepted bytes + o->write_characters(string_buffer.data(), bytes_after_last_accept); + break; + } + + case error_handler_t::replace: + { + // write all accepted bytes + o->write_characters(string_buffer.data(), bytes_after_last_accept); + // add a replacement character + if (ensure_ascii) + { + o->write_characters("\\ufffd", 6); + } + else + { + o->write_characters("\xEF\xBF\xBD", 3); + } + break; + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + } + } + + private: + /*! + @brief count digits + + Count the number of decimal (base 10) digits for an input unsigned integer. + + @param[in] x unsigned integer number to count its digits + @return number of decimal digits + */ + inline unsigned int count_digits(number_unsigned_t x) noexcept + { + unsigned int n_digits = 1; + for (;;) + { + if (x < 10) + { + return n_digits; + } + if (x < 100) + { + return n_digits + 1; + } + if (x < 1000) + { + return n_digits + 2; + } + if (x < 10000) + { + return n_digits + 3; + } + x = x / 10000u; + n_digits += 4; + } + } + + // templates to avoid warnings about useless casts + template ::value, int> = 0> + bool is_negative_number(NumberType x) + { + return x < 0; + } + + template < typename NumberType, enable_if_t ::value, int > = 0 > + bool is_negative_number(NumberType /*unused*/) + { + return false; + } + + /*! + @brief dump an integer + + Dump a given integer to output stream @a o. Works internally with + @a number_buffer. + + @param[in] x integer number (signed or unsigned) to dump + @tparam NumberType either @a number_integer_t or @a number_unsigned_t + */ + template < typename NumberType, detail::enable_if_t < + std::is_integral::value || + std::is_same::value || + std::is_same::value || + std::is_same::value, + int > = 0 > + void dump_integer(NumberType x) + { + static constexpr std::array, 100> digits_to_99 + { + { + {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}}, + {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}}, + {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}}, + {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}}, + {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}}, + {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}}, + {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}}, + {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}}, + {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}}, + {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}}, + } + }; + + // special case for "0" + if (x == 0) + { + o->write_character('0'); + return; + } + + // use a pointer to fill the buffer + auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg) + + number_unsigned_t abs_value; + + unsigned int n_chars{}; + + if (is_negative_number(x)) + { + *buffer_ptr = '-'; + abs_value = remove_sign(static_cast(x)); + + // account one more byte for the minus sign + n_chars = 1 + count_digits(abs_value); + } + else + { + abs_value = static_cast(x); + n_chars = count_digits(abs_value); + } + + // spare 1 byte for '\0' + JSON_ASSERT(n_chars < number_buffer.size() - 1); + + // jump to the end to generate the string from backward, + // so we later avoid reversing the result + buffer_ptr += n_chars; + + // Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu + // See: https://www.youtube.com/watch?v=o4-CwDo2zpg + while (abs_value >= 100) + { + const auto digits_index = static_cast((abs_value % 100)); + abs_value /= 100; + *(--buffer_ptr) = digits_to_99[digits_index][1]; + *(--buffer_ptr) = digits_to_99[digits_index][0]; + } + + if (abs_value >= 10) + { + const auto digits_index = static_cast(abs_value); + *(--buffer_ptr) = digits_to_99[digits_index][1]; + *(--buffer_ptr) = digits_to_99[digits_index][0]; + } + else + { + *(--buffer_ptr) = static_cast('0' + abs_value); + } + + o->write_characters(number_buffer.data(), n_chars); + } + + /*! + @brief dump a floating-point number + + Dump a given floating-point number to output stream @a o. Works internally + with @a number_buffer. + + @param[in] x floating-point number to dump + */ + void dump_float(number_float_t x) + { + // NaN / inf + if (!std::isfinite(x)) + { + o->write_characters("null", 4); + return; + } + + // If number_float_t is an IEEE-754 single or double precision number, + // use the Grisu2 algorithm to produce short numbers which are + // guaranteed to round-trip, using strtof and strtod, resp. + // + // NB: The test below works if == . + static constexpr bool is_ieee_single_or_double + = (std::numeric_limits::is_iec559 && std::numeric_limits::digits == 24 && std::numeric_limits::max_exponent == 128) || + (std::numeric_limits::is_iec559 && std::numeric_limits::digits == 53 && std::numeric_limits::max_exponent == 1024); + + dump_float(x, std::integral_constant()); + } + + void dump_float(number_float_t x, std::true_type /*is_ieee_single_or_double*/) + { + auto* begin = number_buffer.data(); + auto* end = ::nlohmann::detail::to_chars(begin, begin + number_buffer.size(), x); + + o->write_characters(begin, static_cast(end - begin)); + } + + void dump_float(number_float_t x, std::false_type /*is_ieee_single_or_double*/) + { + // get number of digits for a float -> text -> float round-trip + static constexpr auto d = std::numeric_limits::max_digits10; + + // the actual conversion + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + std::ptrdiff_t len = (std::snprintf)(number_buffer.data(), number_buffer.size(), "%.*g", d, x); + + // negative value indicates an error + JSON_ASSERT(len > 0); + // check if buffer was large enough + JSON_ASSERT(static_cast(len) < number_buffer.size()); + + // erase thousands separator + if (thousands_sep != '\0') + { + // NOLINTNEXTLINE(readability-qualified-auto,llvm-qualified-auto): std::remove returns an iterator, see https://github.com/nlohmann/json/issues/3081 + const auto end = std::remove(number_buffer.begin(), number_buffer.begin() + len, thousands_sep); + std::fill(end, number_buffer.end(), '\0'); + JSON_ASSERT((end - number_buffer.begin()) <= len); + len = (end - number_buffer.begin()); + } + + // convert decimal point to '.' + if (decimal_point != '\0' && decimal_point != '.') + { + // NOLINTNEXTLINE(readability-qualified-auto,llvm-qualified-auto): std::find returns an iterator, see https://github.com/nlohmann/json/issues/3081 + const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point); + if (dec_pos != number_buffer.end()) + { + *dec_pos = '.'; + } + } + + o->write_characters(number_buffer.data(), static_cast(len)); + + // determine if we need to append ".0" + const bool value_is_int_like = + std::none_of(number_buffer.begin(), number_buffer.begin() + len + 1, + [](char c) + { + return c == '.' || c == 'e'; + }); + + if (value_is_int_like) + { + o->write_characters(".0", 2); + } + } + + /*! + @brief check whether a string is UTF-8 encoded + + The function checks each byte of a string whether it is UTF-8 encoded. The + result of the check is stored in the @a state parameter. The function must + be called initially with state 0 (accept). State 1 means the string must + be rejected, because the current byte is not allowed. If the string is + completely processed, but the state is non-zero, the string ended + prematurely; that is, the last byte indicated more bytes should have + followed. + + @param[in,out] state the state of the decoding + @param[in,out] codep codepoint (valid only if resulting state is UTF8_ACCEPT) + @param[in] byte next byte to decode + @return new state + + @note The function has been edited: a std::array is used. + + @copyright Copyright (c) 2008-2009 Bjoern Hoehrmann + @sa http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ + */ + static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept + { + static const std::array utf8d = + { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF + 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF + 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF + 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF + 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2 + 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4 + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6 + 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8 + } + }; + + JSON_ASSERT(byte < utf8d.size()); + const std::uint8_t type = utf8d[byte]; + + codep = (state != UTF8_ACCEPT) + ? (byte & 0x3fu) | (codep << 6u) + : (0xFFu >> type) & (byte); + + std::size_t index = 256u + static_cast(state) * 16u + static_cast(type); + JSON_ASSERT(index < 400); + state = utf8d[index]; + return state; + } + + /* + * Overload to make the compiler happy while it is instantiating + * dump_integer for number_unsigned_t. + * Must never be called. + */ + number_unsigned_t remove_sign(number_unsigned_t x) + { + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + return x; // LCOV_EXCL_LINE + } + + /* + * Helper function for dump_integer + * + * This function takes a negative signed integer and returns its absolute + * value as unsigned integer. The plus/minus shuffling is necessary as we can + * not directly remove the sign of an arbitrary signed integer as the + * absolute values of INT_MIN and INT_MAX are usually not the same. See + * #1708 for details. + */ + inline number_unsigned_t remove_sign(number_integer_t x) noexcept + { + JSON_ASSERT(x < 0 && x < (std::numeric_limits::max)()); // NOLINT(misc-redundant-expression) + return static_cast(-(x + 1)) + 1; + } + + private: + /// the output of the serializer + output_adapter_t o = nullptr; + + /// a (hopefully) large enough character buffer + std::array number_buffer{{}}; + + /// the locale + const std::lconv* loc = nullptr; + /// the locale's thousand separator character + const char thousands_sep = '\0'; + /// the locale's decimal point character + const char decimal_point = '\0'; + + /// string buffer + std::array string_buffer{{}}; + + /// the indentation character + const char indent_char; + /// the indentation string + string_t indent_string; + + /// error_handler how to react on decoding errors + const error_handler_t error_handler; +}; +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + +// #include + + +#include // less +#include // initializer_list +#include // input_iterator_tag, iterator_traits +#include // allocator +#include // for out_of_range +#include // enable_if, is_convertible +#include // pair +#include // vector + +// #include + + +namespace nlohmann +{ + +/// ordered_map: a minimal map-like container that preserves insertion order +/// for use within nlohmann::basic_json +template , + class Allocator = std::allocator>> + struct ordered_map : std::vector, Allocator> +{ + using key_type = Key; + using mapped_type = T; + using Container = std::vector, Allocator>; + using iterator = typename Container::iterator; + using const_iterator = typename Container::const_iterator; + using size_type = typename Container::size_type; + using value_type = typename Container::value_type; + + // Explicit constructors instead of `using Container::Container` + // otherwise older compilers choke on it (GCC <= 5.5, xcode <= 9.4) + ordered_map(const Allocator& alloc = Allocator()) : Container{alloc} {} + template + ordered_map(It first, It last, const Allocator& alloc = Allocator()) + : Container{first, last, alloc} {} + ordered_map(std::initializer_list init, const Allocator& alloc = Allocator() ) + : Container{init, alloc} {} + + std::pair emplace(const key_type& key, T&& t) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (it->first == key) + { + return {it, false}; + } + } + Container::emplace_back(key, t); + return {--this->end(), true}; + } + + T& operator[](const Key& key) + { + return emplace(key, T{}).first->second; + } + + const T& operator[](const Key& key) const + { + return at(key); + } + + T& at(const Key& key) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (it->first == key) + { + return it->second; + } + } + + JSON_THROW(std::out_of_range("key not found")); + } + + const T& at(const Key& key) const + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (it->first == key) + { + return it->second; + } + } + + JSON_THROW(std::out_of_range("key not found")); + } + + size_type erase(const Key& key) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (it->first == key) + { + // Since we cannot move const Keys, re-construct them in place + for (auto next = it; ++next != this->end(); ++it) + { + it->~value_type(); // Destroy but keep allocation + new (&*it) value_type{std::move(*next)}; + } + Container::pop_back(); + return 1; + } + } + return 0; + } + + iterator erase(iterator pos) + { + return erase(pos, std::next(pos)); + } + + iterator erase(iterator first, iterator last) + { + const auto elements_affected = std::distance(first, last); + const auto offset = std::distance(Container::begin(), first); + + // This is the start situation. We need to delete elements_affected + // elements (3 in this example: e, f, g), and need to return an + // iterator past the last deleted element (h in this example). + // Note that offset is the distance from the start of the vector + // to first. We will need this later. + + // [ a, b, c, d, e, f, g, h, i, j ] + // ^ ^ + // first last + + // Since we cannot move const Keys, we re-construct them in place. + // We start at first and re-construct (viz. copy) the elements from + // the back of the vector. Example for first iteration: + + // ,--------. + // v | destroy e and re-construct with h + // [ a, b, c, d, e, f, g, h, i, j ] + // ^ ^ + // it it + elements_affected + + for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) + { + it->~value_type(); // destroy but keep allocation + new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it + } + + // [ a, b, c, d, h, i, j, h, i, j ] + // ^ ^ + // first last + + // remove the unneeded elements at the end of the vector + Container::resize(this->size() - static_cast(elements_affected)); + + // [ a, b, c, d, h, i, j ] + // ^ ^ + // first last + + // first is now pointing past the last deleted element, but we cannot + // use this iterator, because it may have been invalidated by the + // resize call. Instead, we can return begin() + offset. + return Container::begin() + offset; + } + + size_type count(const Key& key) const + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (it->first == key) + { + return 1; + } + } + return 0; + } + + iterator find(const Key& key) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (it->first == key) + { + return it; + } + } + return Container::end(); + } + + const_iterator find(const Key& key) const + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (it->first == key) + { + return it; + } + } + return Container::end(); + } + + std::pair insert( value_type&& value ) + { + return emplace(value.first, std::move(value.second)); + } + + std::pair insert( const value_type& value ) + { + for (auto it = this->begin(); it != this->end(); ++it) + { + if (it->first == value.first) + { + return {it, false}; + } + } + Container::push_back(value); + return {--this->end(), true}; + } + + template + using require_input_iter = typename std::enable_if::iterator_category, + std::input_iterator_tag>::value>::type; + + template> + void insert(InputIt first, InputIt last) + { + for (auto it = first; it != last; ++it) + { + insert(*it); + } + } +}; + +} // namespace nlohmann + + +#if defined(JSON_HAS_CPP_17) + #include +#endif + +/*! +@brief namespace for Niels Lohmann +@see https://github.com/nlohmann +@since version 1.0.0 +*/ +namespace nlohmann +{ + +/*! +@brief a class to store JSON values + +@internal +@invariant The member variables @a m_value and @a m_type have the following +relationship: +- If `m_type == value_t::object`, then `m_value.object != nullptr`. +- If `m_type == value_t::array`, then `m_value.array != nullptr`. +- If `m_type == value_t::string`, then `m_value.string != nullptr`. +The invariants are checked by member function assert_invariant(). + +@note ObjectType trick from https://stackoverflow.com/a/9860911 +@endinternal + +@since version 1.0.0 + +@nosubgrouping +*/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions) +{ + private: + template friend struct detail::external_constructor; + friend ::nlohmann::json_pointer; + + template + friend class ::nlohmann::detail::parser; + friend ::nlohmann::detail::serializer; + template + friend class ::nlohmann::detail::iter_impl; + template + friend class ::nlohmann::detail::binary_writer; + template + friend class ::nlohmann::detail::binary_reader; + template + friend class ::nlohmann::detail::json_sax_dom_parser; + template + friend class ::nlohmann::detail::json_sax_dom_callback_parser; + friend class ::nlohmann::detail::exception; + + /// workaround type for MSVC + using basic_json_t = NLOHMANN_BASIC_JSON_TPL; + + JSON_PRIVATE_UNLESS_TESTED: + // convenience aliases for types residing in namespace detail; + using lexer = ::nlohmann::detail::lexer_base; + + template + static ::nlohmann::detail::parser parser( + InputAdapterType adapter, + detail::parser_callback_tcb = nullptr, + const bool allow_exceptions = true, + const bool ignore_comments = false + ) + { + return ::nlohmann::detail::parser(std::move(adapter), + std::move(cb), allow_exceptions, ignore_comments); + } + + private: + using primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t; + template + using internal_iterator = ::nlohmann::detail::internal_iterator; + template + using iter_impl = ::nlohmann::detail::iter_impl; + template + using iteration_proxy = ::nlohmann::detail::iteration_proxy; + template using json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator; + + template + using output_adapter_t = ::nlohmann::detail::output_adapter_t; + + template + using binary_reader = ::nlohmann::detail::binary_reader; + template using binary_writer = ::nlohmann::detail::binary_writer; + + JSON_PRIVATE_UNLESS_TESTED: + using serializer = ::nlohmann::detail::serializer; + + public: + using value_t = detail::value_t; + /// JSON Pointer, see @ref nlohmann::json_pointer + using json_pointer = ::nlohmann::json_pointer; + template + using json_serializer = JSONSerializer; + /// how to treat decoding errors + using error_handler_t = detail::error_handler_t; + /// how to treat CBOR tags + using cbor_tag_handler_t = detail::cbor_tag_handler_t; + /// helper type for initializer lists of basic_json values + using initializer_list_t = std::initializer_list>; + + using input_format_t = detail::input_format_t; + /// SAX interface type, see @ref nlohmann::json_sax + using json_sax_t = json_sax; + + //////////////// + // exceptions // + //////////////// + + /// @name exceptions + /// Classes to implement user-defined exceptions. + /// @{ + + using exception = detail::exception; + using parse_error = detail::parse_error; + using invalid_iterator = detail::invalid_iterator; + using type_error = detail::type_error; + using out_of_range = detail::out_of_range; + using other_error = detail::other_error; + + /// @} + + + ///////////////////// + // container types // + ///////////////////// + + /// @name container types + /// The canonic container types to use @ref basic_json like any other STL + /// container. + /// @{ + + /// the type of elements in a basic_json container + using value_type = basic_json; + + /// the type of an element reference + using reference = value_type&; + /// the type of an element const reference + using const_reference = const value_type&; + + /// a type to represent differences between iterators + using difference_type = std::ptrdiff_t; + /// a type to represent container sizes + using size_type = std::size_t; + + /// the allocator type + using allocator_type = AllocatorType; + + /// the type of an element pointer + using pointer = typename std::allocator_traits::pointer; + /// the type of an element const pointer + using const_pointer = typename std::allocator_traits::const_pointer; + + /// an iterator for a basic_json container + using iterator = iter_impl; + /// a const iterator for a basic_json container + using const_iterator = iter_impl; + /// a reverse iterator for a basic_json container + using reverse_iterator = json_reverse_iterator; + /// a const reverse iterator for a basic_json container + using const_reverse_iterator = json_reverse_iterator; + + /// @} + + + /// @brief returns the allocator associated with the container + /// @sa https://json.nlohmann.me/api/basic_json/get_allocator/ + static allocator_type get_allocator() + { + return allocator_type(); + } + + /// @brief returns version information on the library + /// @sa https://json.nlohmann.me/api/basic_json/meta/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json meta() + { + basic_json result; + + result["copyright"] = "(C) 2013-2022 Niels Lohmann"; + result["name"] = "JSON for Modern C++"; + result["url"] = "https://github.com/nlohmann/json"; + result["version"]["string"] = + std::to_string(NLOHMANN_JSON_VERSION_MAJOR) + "." + + std::to_string(NLOHMANN_JSON_VERSION_MINOR) + "." + + std::to_string(NLOHMANN_JSON_VERSION_PATCH); + result["version"]["major"] = NLOHMANN_JSON_VERSION_MAJOR; + result["version"]["minor"] = NLOHMANN_JSON_VERSION_MINOR; + result["version"]["patch"] = NLOHMANN_JSON_VERSION_PATCH; + +#ifdef _WIN32 + result["platform"] = "win32"; +#elif defined __linux__ + result["platform"] = "linux"; +#elif defined __APPLE__ + result["platform"] = "apple"; +#elif defined __unix__ + result["platform"] = "unix"; +#else + result["platform"] = "unknown"; +#endif + +#if defined(__ICC) || defined(__INTEL_COMPILER) + result["compiler"] = {{"family", "icc"}, {"version", __INTEL_COMPILER}}; +#elif defined(__clang__) + result["compiler"] = {{"family", "clang"}, {"version", __clang_version__}}; +#elif defined(__GNUC__) || defined(__GNUG__) + result["compiler"] = {{"family", "gcc"}, {"version", std::to_string(__GNUC__) + "." + std::to_string(__GNUC_MINOR__) + "." + std::to_string(__GNUC_PATCHLEVEL__)}}; +#elif defined(__HP_cc) || defined(__HP_aCC) + result["compiler"] = "hp" +#elif defined(__IBMCPP__) + result["compiler"] = {{"family", "ilecpp"}, {"version", __IBMCPP__}}; +#elif defined(_MSC_VER) + result["compiler"] = {{"family", "msvc"}, {"version", _MSC_VER}}; +#elif defined(__PGI) + result["compiler"] = {{"family", "pgcpp"}, {"version", __PGI}}; +#elif defined(__SUNPRO_CC) + result["compiler"] = {{"family", "sunpro"}, {"version", __SUNPRO_CC}}; +#else + result["compiler"] = {{"family", "unknown"}, {"version", "unknown"}}; +#endif + +#ifdef __cplusplus + result["compiler"]["c++"] = std::to_string(__cplusplus); +#else + result["compiler"]["c++"] = "unknown"; +#endif + return result; + } + + + /////////////////////////// + // JSON value data types // + /////////////////////////// + + /// @name JSON value data types + /// The data types to store a JSON value. These types are derived from + /// the template arguments passed to class @ref basic_json. + /// @{ + + /// @brief object key comparator type + /// @sa https://json.nlohmann.me/api/basic_json/object_comparator_t/ +#if defined(JSON_HAS_CPP_14) + // Use transparent comparator if possible, combined with perfect forwarding + // on find() and count() calls prevents unnecessary string construction. + using object_comparator_t = std::less<>; +#else + using object_comparator_t = std::less; +#endif + + /// @brief a type for an object + /// @sa https://json.nlohmann.me/api/basic_json/object_t/ + using object_t = ObjectType>>; + + /// @brief a type for an array + /// @sa https://json.nlohmann.me/api/basic_json/array_t/ + using array_t = ArrayType>; + + /// @brief a type for a string + /// @sa https://json.nlohmann.me/api/basic_json/string_t/ + using string_t = StringType; + + /// @brief a type for a boolean + /// @sa https://json.nlohmann.me/api/basic_json/boolean_t/ + using boolean_t = BooleanType; + + /// @brief a type for a number (integer) + /// @sa https://json.nlohmann.me/api/basic_json/number_integer_t/ + using number_integer_t = NumberIntegerType; + + /// @brief a type for a number (unsigned) + /// @sa https://json.nlohmann.me/api/basic_json/number_unsigned_t/ + using number_unsigned_t = NumberUnsignedType; + + /// @brief a type for a number (floating-point) + /// @sa https://json.nlohmann.me/api/basic_json/number_float_t/ + using number_float_t = NumberFloatType; + + /// @brief a type for a packed binary type + /// @sa https://json.nlohmann.me/api/basic_json/binary_t/ + using binary_t = nlohmann::byte_container_with_subtype; + + /// @} + + private: + + /// helper for exception-safe object creation + template + JSON_HEDLEY_RETURNS_NON_NULL + static T* create(Args&& ... args) + { + AllocatorType alloc; + using AllocatorTraits = std::allocator_traits>; + + auto deleter = [&](T * obj) + { + AllocatorTraits::deallocate(alloc, obj, 1); + }; + std::unique_ptr obj(AllocatorTraits::allocate(alloc, 1), deleter); + AllocatorTraits::construct(alloc, obj.get(), std::forward(args)...); + JSON_ASSERT(obj != nullptr); + return obj.release(); + } + + //////////////////////// + // JSON value storage // + //////////////////////// + + JSON_PRIVATE_UNLESS_TESTED: + /*! + @brief a JSON value + + The actual storage for a JSON value of the @ref basic_json class. This + union combines the different storage types for the JSON value types + defined in @ref value_t. + + JSON type | value_t type | used type + --------- | --------------- | ------------------------ + object | object | pointer to @ref object_t + array | array | pointer to @ref array_t + string | string | pointer to @ref string_t + boolean | boolean | @ref boolean_t + number | number_integer | @ref number_integer_t + number | number_unsigned | @ref number_unsigned_t + number | number_float | @ref number_float_t + binary | binary | pointer to @ref binary_t + null | null | *no value is stored* + + @note Variable-length types (objects, arrays, and strings) are stored as + pointers. The size of the union should not exceed 64 bits if the default + value types are used. + + @since version 1.0.0 + */ + union json_value + { + /// object (stored with pointer to save storage) + object_t* object; + /// array (stored with pointer to save storage) + array_t* array; + /// string (stored with pointer to save storage) + string_t* string; + /// binary (stored with pointer to save storage) + binary_t* binary; + /// boolean + boolean_t boolean; + /// number (integer) + number_integer_t number_integer; + /// number (unsigned integer) + number_unsigned_t number_unsigned; + /// number (floating-point) + number_float_t number_float; + + /// default constructor (for null values) + json_value() = default; + /// constructor for booleans + json_value(boolean_t v) noexcept : boolean(v) {} + /// constructor for numbers (integer) + json_value(number_integer_t v) noexcept : number_integer(v) {} + /// constructor for numbers (unsigned) + json_value(number_unsigned_t v) noexcept : number_unsigned(v) {} + /// constructor for numbers (floating-point) + json_value(number_float_t v) noexcept : number_float(v) {} + /// constructor for empty values of a given type + json_value(value_t t) + { + switch (t) + { + case value_t::object: + { + object = create(); + break; + } + + case value_t::array: + { + array = create(); + break; + } + + case value_t::string: + { + string = create(""); + break; + } + + case value_t::binary: + { + binary = create(); + break; + } + + case value_t::boolean: + { + boolean = static_cast(false); + break; + } + + case value_t::number_integer: + { + number_integer = static_cast(0); + break; + } + + case value_t::number_unsigned: + { + number_unsigned = static_cast(0); + break; + } + + case value_t::number_float: + { + number_float = static_cast(0.0); + break; + } + + case value_t::null: + { + object = nullptr; // silence warning, see #821 + break; + } + + case value_t::discarded: + default: + { + object = nullptr; // silence warning, see #821 + if (JSON_HEDLEY_UNLIKELY(t == value_t::null)) + { + JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.10.5", basic_json())); // LCOV_EXCL_LINE + } + break; + } + } + } + + /// constructor for strings + json_value(const string_t& value) : string(create(value)) {} + + /// constructor for rvalue strings + json_value(string_t&& value) : string(create(std::move(value))) {} + + /// constructor for objects + json_value(const object_t& value) : object(create(value)) {} + + /// constructor for rvalue objects + json_value(object_t&& value) : object(create(std::move(value))) {} + + /// constructor for arrays + json_value(const array_t& value) : array(create(value)) {} + + /// constructor for rvalue arrays + json_value(array_t&& value) : array(create(std::move(value))) {} + + /// constructor for binary arrays + json_value(const typename binary_t::container_type& value) : binary(create(value)) {} + + /// constructor for rvalue binary arrays + json_value(typename binary_t::container_type&& value) : binary(create(std::move(value))) {} + + /// constructor for binary arrays (internal type) + json_value(const binary_t& value) : binary(create(value)) {} + + /// constructor for rvalue binary arrays (internal type) + json_value(binary_t&& value) : binary(create(std::move(value))) {} + + void destroy(value_t t) + { + if (t == value_t::array || t == value_t::object) + { + // flatten the current json_value to a heap-allocated stack + std::vector stack; + + // move the top-level items to stack + if (t == value_t::array) + { + stack.reserve(array->size()); + std::move(array->begin(), array->end(), std::back_inserter(stack)); + } + else + { + stack.reserve(object->size()); + for (auto&& it : *object) + { + stack.push_back(std::move(it.second)); + } + } + + while (!stack.empty()) + { + // move the last item to local variable to be processed + basic_json current_item(std::move(stack.back())); + stack.pop_back(); + + // if current_item is array/object, move + // its children to the stack to be processed later + if (current_item.is_array()) + { + std::move(current_item.m_value.array->begin(), current_item.m_value.array->end(), std::back_inserter(stack)); + + current_item.m_value.array->clear(); + } + else if (current_item.is_object()) + { + for (auto&& it : *current_item.m_value.object) + { + stack.push_back(std::move(it.second)); + } + + current_item.m_value.object->clear(); + } + + // it's now safe that current_item get destructed + // since it doesn't have any children + } + } + + switch (t) + { + case value_t::object: + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, object); + std::allocator_traits::deallocate(alloc, object, 1); + break; + } + + case value_t::array: + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, array); + std::allocator_traits::deallocate(alloc, array, 1); + break; + } + + case value_t::string: + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, string); + std::allocator_traits::deallocate(alloc, string, 1); + break; + } + + case value_t::binary: + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, binary); + std::allocator_traits::deallocate(alloc, binary, 1); + break; + } + + case value_t::null: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::discarded: + default: + { + break; + } + } + } + }; + + private: + /*! + @brief checks the class invariants + + This function asserts the class invariants. It needs to be called at the + end of every constructor to make sure that created objects respect the + invariant. Furthermore, it has to be called each time the type of a JSON + value is changed, because the invariant expresses a relationship between + @a m_type and @a m_value. + + Furthermore, the parent relation is checked for arrays and objects: If + @a check_parents true and the value is an array or object, then the + container's elements must have the current value as parent. + + @param[in] check_parents whether the parent relation should be checked. + The value is true by default and should only be set to false + during destruction of objects when the invariant does not + need to hold. + */ + void assert_invariant(bool check_parents = true) const noexcept + { + JSON_ASSERT(m_type != value_t::object || m_value.object != nullptr); + JSON_ASSERT(m_type != value_t::array || m_value.array != nullptr); + JSON_ASSERT(m_type != value_t::string || m_value.string != nullptr); + JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr); + +#if JSON_DIAGNOSTICS + JSON_TRY + { + // cppcheck-suppress assertWithSideEffect + JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j) + { + return j.m_parent == this; + })); + } + JSON_CATCH(...) {} // LCOV_EXCL_LINE +#endif + static_cast(check_parents); + } + + void set_parents() + { +#if JSON_DIAGNOSTICS + switch (m_type) + { + case value_t::array: + { + for (auto& element : *m_value.array) + { + element.m_parent = this; + } + break; + } + + case value_t::object: + { + for (auto& element : *m_value.object) + { + element.second.m_parent = this; + } + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + break; + } +#endif + } + + iterator set_parents(iterator it, typename iterator::difference_type count_set_parents) + { +#if JSON_DIAGNOSTICS + for (typename iterator::difference_type i = 0; i < count_set_parents; ++i) + { + (it + i)->m_parent = this; + } +#else + static_cast(count_set_parents); +#endif + return it; + } + + reference set_parent(reference j, std::size_t old_capacity = static_cast(-1)) + { +#if JSON_DIAGNOSTICS + if (old_capacity != static_cast(-1)) + { + // see https://github.com/nlohmann/json/issues/2838 + JSON_ASSERT(type() == value_t::array); + if (JSON_HEDLEY_UNLIKELY(m_value.array->capacity() != old_capacity)) + { + // capacity has changed: update all parents + set_parents(); + return j; + } + } + + // ordered_json uses a vector internally, so pointers could have + // been invalidated; see https://github.com/nlohmann/json/issues/2962 +#ifdef JSON_HEDLEY_MSVC_VERSION +#pragma warning(push ) +#pragma warning(disable : 4127) // ignore warning to replace if with if constexpr +#endif + if (detail::is_ordered_map::value) + { + set_parents(); + return j; + } +#ifdef JSON_HEDLEY_MSVC_VERSION +#pragma warning( pop ) +#endif + + j.m_parent = this; +#else + static_cast(j); + static_cast(old_capacity); +#endif + return j; + } + + public: + ////////////////////////// + // JSON parser callback // + ////////////////////////// + + /// @brief parser event types + /// @sa https://json.nlohmann.me/api/basic_json/parse_event_t/ + using parse_event_t = detail::parse_event_t; + + /// @brief per-element parser callback type + /// @sa https://json.nlohmann.me/api/basic_json/parser_callback_t/ + using parser_callback_t = detail::parser_callback_t; + + ////////////////// + // constructors // + ////////////////// + + /// @name constructors and destructors + /// Constructors of class @ref basic_json, copy/move constructor, copy + /// assignment, static functions creating objects, and the destructor. + /// @{ + + /// @brief create an empty value with a given type + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(const value_t v) + : m_type(v), m_value(v) + { + assert_invariant(); + } + + /// @brief create a null object + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(std::nullptr_t = nullptr) noexcept + : basic_json(value_t::null) + { + assert_invariant(); + } + + /// @brief create a JSON value from compatible types + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + template < typename CompatibleType, + typename U = detail::uncvref_t, + detail::enable_if_t < + !detail::is_basic_json::value && detail::is_compatible_type::value, int > = 0 > + basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload,bugprone-exception-escape) + JSONSerializer::to_json(std::declval(), + std::forward(val)))) + { + JSONSerializer::to_json(*this, std::forward(val)); + set_parents(); + assert_invariant(); + } + + /// @brief create a JSON value from an existing one + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + template < typename BasicJsonType, + detail::enable_if_t < + detail::is_basic_json::value&& !std::is_same::value, int > = 0 > + basic_json(const BasicJsonType& val) + { + using other_boolean_t = typename BasicJsonType::boolean_t; + using other_number_float_t = typename BasicJsonType::number_float_t; + using other_number_integer_t = typename BasicJsonType::number_integer_t; + using other_number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using other_string_t = typename BasicJsonType::string_t; + using other_object_t = typename BasicJsonType::object_t; + using other_array_t = typename BasicJsonType::array_t; + using other_binary_t = typename BasicJsonType::binary_t; + + switch (val.type()) + { + case value_t::boolean: + JSONSerializer::to_json(*this, val.template get()); + break; + case value_t::number_float: + JSONSerializer::to_json(*this, val.template get()); + break; + case value_t::number_integer: + JSONSerializer::to_json(*this, val.template get()); + break; + case value_t::number_unsigned: + JSONSerializer::to_json(*this, val.template get()); + break; + case value_t::string: + JSONSerializer::to_json(*this, val.template get_ref()); + break; + case value_t::object: + JSONSerializer::to_json(*this, val.template get_ref()); + break; + case value_t::array: + JSONSerializer::to_json(*this, val.template get_ref()); + break; + case value_t::binary: + JSONSerializer::to_json(*this, val.template get_ref()); + break; + case value_t::null: + *this = nullptr; + break; + case value_t::discarded: + m_type = value_t::discarded; + break; + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + set_parents(); + assert_invariant(); + } + + /// @brief create a container (array or object) from an initializer list + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(initializer_list_t init, + bool type_deduction = true, + value_t manual_type = value_t::array) + { + // check if each element is an array with two elements whose first + // element is a string + bool is_an_object = std::all_of(init.begin(), init.end(), + [](const detail::json_ref& element_ref) + { + return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[0].is_string(); + }); + + // adjust type if type deduction is not wanted + if (!type_deduction) + { + // if array is wanted, do not create an object though possible + if (manual_type == value_t::array) + { + is_an_object = false; + } + + // if object is wanted but impossible, throw an exception + if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) + { + JSON_THROW(type_error::create(301, "cannot create object from initializer list", basic_json())); + } + } + + if (is_an_object) + { + // the initializer list is a list of pairs -> create object + m_type = value_t::object; + m_value = value_t::object; + + for (auto& element_ref : init) + { + auto element = element_ref.moved_or_copied(); + m_value.object->emplace( + std::move(*((*element.m_value.array)[0].m_value.string)), + std::move((*element.m_value.array)[1])); + } + } + else + { + // the initializer list describes an array -> create array + m_type = value_t::array; + m_value.array = create(init.begin(), init.end()); + } + + set_parents(); + assert_invariant(); + } + + /// @brief explicitly create a binary array (without subtype) + /// @sa https://json.nlohmann.me/api/basic_json/binary/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json binary(const typename binary_t::container_type& init) + { + auto res = basic_json(); + res.m_type = value_t::binary; + res.m_value = init; + return res; + } + + /// @brief explicitly create a binary array (with subtype) + /// @sa https://json.nlohmann.me/api/basic_json/binary/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json binary(const typename binary_t::container_type& init, typename binary_t::subtype_type subtype) + { + auto res = basic_json(); + res.m_type = value_t::binary; + res.m_value = binary_t(init, subtype); + return res; + } + + /// @brief explicitly create a binary array + /// @sa https://json.nlohmann.me/api/basic_json/binary/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json binary(typename binary_t::container_type&& init) + { + auto res = basic_json(); + res.m_type = value_t::binary; + res.m_value = std::move(init); + return res; + } + + /// @brief explicitly create a binary array (with subtype) + /// @sa https://json.nlohmann.me/api/basic_json/binary/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json binary(typename binary_t::container_type&& init, typename binary_t::subtype_type subtype) + { + auto res = basic_json(); + res.m_type = value_t::binary; + res.m_value = binary_t(std::move(init), subtype); + return res; + } + + /// @brief explicitly create an array from an initializer list + /// @sa https://json.nlohmann.me/api/basic_json/array/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json array(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::array); + } + + /// @brief explicitly create an object from an initializer list + /// @sa https://json.nlohmann.me/api/basic_json/object/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json object(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::object); + } + + /// @brief construct an array with count copies of given value + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(size_type cnt, const basic_json& val) + : m_type(value_t::array) + { + m_value.array = create(cnt, val); + set_parents(); + assert_invariant(); + } + + /// @brief construct a JSON container given an iterator range + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + template < class InputIT, typename std::enable_if < + std::is_same::value || + std::is_same::value, int >::type = 0 > + basic_json(InputIT first, InputIT last) + { + JSON_ASSERT(first.m_object != nullptr); + JSON_ASSERT(last.m_object != nullptr); + + // make sure iterator fits the current value + if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(201, "iterators are not compatible", basic_json())); + } + + // copy type from first iterator + m_type = first.m_object->m_type; + + // check if iterator range is complete for primitive values + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_HEDLEY_UNLIKELY(!first.m_it.primitive_iterator.is_begin() + || !last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range", *first.m_object)); + } + break; + } + + case value_t::null: + case value_t::object: + case value_t::array: + case value_t::binary: + case value_t::discarded: + default: + break; + } + + switch (m_type) + { + case value_t::number_integer: + { + m_value.number_integer = first.m_object->m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_value.number_unsigned = first.m_object->m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_value.number_float = first.m_object->m_value.number_float; + break; + } + + case value_t::boolean: + { + m_value.boolean = first.m_object->m_value.boolean; + break; + } + + case value_t::string: + { + m_value = *first.m_object->m_value.string; + break; + } + + case value_t::object: + { + m_value.object = create(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + m_value.array = create(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + case value_t::binary: + { + m_value = *first.m_object->m_value.binary; + break; + } + + case value_t::null: + case value_t::discarded: + default: + JSON_THROW(invalid_iterator::create(206, "cannot construct with iterators from " + std::string(first.m_object->type_name()), *first.m_object)); + } + + set_parents(); + assert_invariant(); + } + + + /////////////////////////////////////// + // other constructors and destructor // + /////////////////////////////////////// + + template, + std::is_same>::value, int> = 0 > + basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {} + + /// @brief copy constructor + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(const basic_json& other) + : m_type(other.m_type) + { + // check of passed value is valid + other.assert_invariant(); + + switch (m_type) + { + case value_t::object: + { + m_value = *other.m_value.object; + break; + } + + case value_t::array: + { + m_value = *other.m_value.array; + break; + } + + case value_t::string: + { + m_value = *other.m_value.string; + break; + } + + case value_t::boolean: + { + m_value = other.m_value.boolean; + break; + } + + case value_t::number_integer: + { + m_value = other.m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_value = other.m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_value = other.m_value.number_float; + break; + } + + case value_t::binary: + { + m_value = *other.m_value.binary; + break; + } + + case value_t::null: + case value_t::discarded: + default: + break; + } + + set_parents(); + assert_invariant(); + } + + /// @brief move constructor + /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ + basic_json(basic_json&& other) noexcept + : m_type(std::move(other.m_type)), + m_value(std::move(other.m_value)) + { + // check that passed value is valid + other.assert_invariant(false); + + // invalidate payload + other.m_type = value_t::null; + other.m_value = {}; + + set_parents(); + assert_invariant(); + } + + /// @brief copy assignment + /// @sa https://json.nlohmann.me/api/basic_json/operator=/ + basic_json& operator=(basic_json other) noexcept ( + std::is_nothrow_move_constructible::value&& + std::is_nothrow_move_assignable::value&& + std::is_nothrow_move_constructible::value&& + std::is_nothrow_move_assignable::value + ) + { + // check that passed value is valid + other.assert_invariant(); + + using std::swap; + swap(m_type, other.m_type); + swap(m_value, other.m_value); + + set_parents(); + assert_invariant(); + return *this; + } + + /// @brief destructor + /// @sa https://json.nlohmann.me/api/basic_json/~basic_json/ + ~basic_json() noexcept + { + assert_invariant(false); + m_value.destroy(m_type); + } + + /// @} + + public: + /////////////////////// + // object inspection // + /////////////////////// + + /// @name object inspection + /// Functions to inspect the type of a JSON value. + /// @{ + + /// @brief serialization + /// @sa https://json.nlohmann.me/api/basic_json/dump/ + string_t dump(const int indent = -1, + const char indent_char = ' ', + const bool ensure_ascii = false, + const error_handler_t error_handler = error_handler_t::strict) const + { + string_t result; + serializer s(detail::output_adapter(result), indent_char, error_handler); + + if (indent >= 0) + { + s.dump(*this, true, ensure_ascii, static_cast(indent)); + } + else + { + s.dump(*this, false, ensure_ascii, 0); + } + + return result; + } + + /// @brief return the type of the JSON value (explicit) + /// @sa https://json.nlohmann.me/api/basic_json/type/ + constexpr value_t type() const noexcept + { + return m_type; + } + + /// @brief return whether type is primitive + /// @sa https://json.nlohmann.me/api/basic_json/is_primitive/ + constexpr bool is_primitive() const noexcept + { + return is_null() || is_string() || is_boolean() || is_number() || is_binary(); + } + + /// @brief return whether type is structured + /// @sa https://json.nlohmann.me/api/basic_json/is_structured/ + constexpr bool is_structured() const noexcept + { + return is_array() || is_object(); + } + + /// @brief return whether value is null + /// @sa https://json.nlohmann.me/api/basic_json/is_null/ + constexpr bool is_null() const noexcept + { + return m_type == value_t::null; + } + + /// @brief return whether value is a boolean + /// @sa https://json.nlohmann.me/api/basic_json/is_boolean/ + constexpr bool is_boolean() const noexcept + { + return m_type == value_t::boolean; + } + + /// @brief return whether value is a number + /// @sa https://json.nlohmann.me/api/basic_json/is_number/ + constexpr bool is_number() const noexcept + { + return is_number_integer() || is_number_float(); + } + + /// @brief return whether value is an integer number + /// @sa https://json.nlohmann.me/api/basic_json/is_number_integer/ + constexpr bool is_number_integer() const noexcept + { + return m_type == value_t::number_integer || m_type == value_t::number_unsigned; + } + + /// @brief return whether value is an unsigned integer number + /// @sa https://json.nlohmann.me/api/basic_json/is_number_unsigned/ + constexpr bool is_number_unsigned() const noexcept + { + return m_type == value_t::number_unsigned; + } + + /// @brief return whether value is a floating-point number + /// @sa https://json.nlohmann.me/api/basic_json/is_number_float/ + constexpr bool is_number_float() const noexcept + { + return m_type == value_t::number_float; + } + + /// @brief return whether value is an object + /// @sa https://json.nlohmann.me/api/basic_json/is_object/ + constexpr bool is_object() const noexcept + { + return m_type == value_t::object; + } + + /// @brief return whether value is an array + /// @sa https://json.nlohmann.me/api/basic_json/is_array/ + constexpr bool is_array() const noexcept + { + return m_type == value_t::array; + } + + /// @brief return whether value is a string + /// @sa https://json.nlohmann.me/api/basic_json/is_string/ + constexpr bool is_string() const noexcept + { + return m_type == value_t::string; + } + + /// @brief return whether value is a binary array + /// @sa https://json.nlohmann.me/api/basic_json/is_binary/ + constexpr bool is_binary() const noexcept + { + return m_type == value_t::binary; + } + + /// @brief return whether value is discarded + /// @sa https://json.nlohmann.me/api/basic_json/is_discarded/ + constexpr bool is_discarded() const noexcept + { + return m_type == value_t::discarded; + } + + /// @brief return the type of the JSON value (implicit) + /// @sa https://json.nlohmann.me/api/basic_json/operator_value_t/ + constexpr operator value_t() const noexcept + { + return m_type; + } + + /// @} + + private: + ////////////////// + // value access // + ////////////////// + + /// get a boolean (explicit) + boolean_t get_impl(boolean_t* /*unused*/) const + { + if (JSON_HEDLEY_LIKELY(is_boolean())) + { + return m_value.boolean; + } + + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(type_name()), *this)); + } + + /// get a pointer to the value (object) + object_t* get_impl_ptr(object_t* /*unused*/) noexcept + { + return is_object() ? m_value.object : nullptr; + } + + /// get a pointer to the value (object) + constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept + { + return is_object() ? m_value.object : nullptr; + } + + /// get a pointer to the value (array) + array_t* get_impl_ptr(array_t* /*unused*/) noexcept + { + return is_array() ? m_value.array : nullptr; + } + + /// get a pointer to the value (array) + constexpr const array_t* get_impl_ptr(const array_t* /*unused*/) const noexcept + { + return is_array() ? m_value.array : nullptr; + } + + /// get a pointer to the value (string) + string_t* get_impl_ptr(string_t* /*unused*/) noexcept + { + return is_string() ? m_value.string : nullptr; + } + + /// get a pointer to the value (string) + constexpr const string_t* get_impl_ptr(const string_t* /*unused*/) const noexcept + { + return is_string() ? m_value.string : nullptr; + } + + /// get a pointer to the value (boolean) + boolean_t* get_impl_ptr(boolean_t* /*unused*/) noexcept + { + return is_boolean() ? &m_value.boolean : nullptr; + } + + /// get a pointer to the value (boolean) + constexpr const boolean_t* get_impl_ptr(const boolean_t* /*unused*/) const noexcept + { + return is_boolean() ? &m_value.boolean : nullptr; + } + + /// get a pointer to the value (integer number) + number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept + { + return is_number_integer() ? &m_value.number_integer : nullptr; + } + + /// get a pointer to the value (integer number) + constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /*unused*/) const noexcept + { + return is_number_integer() ? &m_value.number_integer : nullptr; + } + + /// get a pointer to the value (unsigned number) + number_unsigned_t* get_impl_ptr(number_unsigned_t* /*unused*/) noexcept + { + return is_number_unsigned() ? &m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (unsigned number) + constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t* /*unused*/) const noexcept + { + return is_number_unsigned() ? &m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (floating-point number) + number_float_t* get_impl_ptr(number_float_t* /*unused*/) noexcept + { + return is_number_float() ? &m_value.number_float : nullptr; + } + + /// get a pointer to the value (floating-point number) + constexpr const number_float_t* get_impl_ptr(const number_float_t* /*unused*/) const noexcept + { + return is_number_float() ? &m_value.number_float : nullptr; + } + + /// get a pointer to the value (binary) + binary_t* get_impl_ptr(binary_t* /*unused*/) noexcept + { + return is_binary() ? m_value.binary : nullptr; + } + + /// get a pointer to the value (binary) + constexpr const binary_t* get_impl_ptr(const binary_t* /*unused*/) const noexcept + { + return is_binary() ? m_value.binary : nullptr; + } + + /*! + @brief helper function to implement get_ref() + + This function helps to implement get_ref() without code duplication for + const and non-const overloads + + @tparam ThisType will be deduced as `basic_json` or `const basic_json` + + @throw type_error.303 if ReferenceType does not match underlying value + type of the current JSON + */ + template + static ReferenceType get_ref_impl(ThisType& obj) + { + // delegate the call to get_ptr<>() + auto* ptr = obj.template get_ptr::type>(); + + if (JSON_HEDLEY_LIKELY(ptr != nullptr)) + { + return *ptr; + } + + JSON_THROW(type_error::create(303, "incompatible ReferenceType for get_ref, actual type is " + std::string(obj.type_name()), obj)); + } + + public: + /// @name value access + /// Direct access to the stored value of a JSON value. + /// @{ + + /// @brief get a pointer value (implicit) + /// @sa https://json.nlohmann.me/api/basic_json/get_ptr/ + template::value, int>::type = 0> + auto get_ptr() noexcept -> decltype(std::declval().get_impl_ptr(std::declval())) + { + // delegate the call to get_impl_ptr<>() + return get_impl_ptr(static_cast(nullptr)); + } + + /// @brief get a pointer value (implicit) + /// @sa https://json.nlohmann.me/api/basic_json/get_ptr/ + template < typename PointerType, typename std::enable_if < + std::is_pointer::value&& + std::is_const::type>::value, int >::type = 0 > + constexpr auto get_ptr() const noexcept -> decltype(std::declval().get_impl_ptr(std::declval())) + { + // delegate the call to get_impl_ptr<>() const + return get_impl_ptr(static_cast(nullptr)); + } + + private: + /*! + @brief get a value (explicit) + + Explicit type conversion between the JSON value and a compatible value + which is [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible) + and [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible). + The value is converted by calling the @ref json_serializer + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + ValueType ret; + JSONSerializer::from_json(*this, ret); + return ret; + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json, + - @ref json_serializer has a `from_json()` method of the form + `void from_json(const basic_json&, ValueType&)`, and + - @ref json_serializer does not have a `from_json()` method of + the form `ValueType from_json(const basic_json&)` + + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer `from_json()` method throws + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map`.,get__ValueType_const} + + @since version 2.1.0 + */ + template < typename ValueType, + detail::enable_if_t < + detail::is_default_constructible::value&& + detail::has_from_json::value, + int > = 0 > + ValueType get_impl(detail::priority_tag<0> /*unused*/) const noexcept(noexcept( + JSONSerializer::from_json(std::declval(), std::declval()))) + { + auto ret = ValueType(); + JSONSerializer::from_json(*this, ret); + return ret; + } + + /*! + @brief get a value (explicit); special case + + Explicit type conversion between the JSON value and a compatible value + which is **not** [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible) + and **not** [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible). + The value is converted by calling the @ref json_serializer + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + return JSONSerializer::from_json(*this); + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json and + - @ref json_serializer has a `from_json()` method of the form + `ValueType from_json(const basic_json&)` + + @note If @ref json_serializer has both overloads of + `from_json()`, this one is chosen. + + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer `from_json()` method throws + + @since version 2.1.0 + */ + template < typename ValueType, + detail::enable_if_t < + detail::has_non_default_from_json::value, + int > = 0 > + ValueType get_impl(detail::priority_tag<1> /*unused*/) const noexcept(noexcept( + JSONSerializer::from_json(std::declval()))) + { + return JSONSerializer::from_json(*this); + } + + /*! + @brief get special-case overload + + This overloads converts the current @ref basic_json in a different + @ref basic_json type + + @tparam BasicJsonType == @ref basic_json + + @return a copy of *this, converted into @a BasicJsonType + + @complexity Depending on the implementation of the called `from_json()` + method. + + @since version 3.2.0 + */ + template < typename BasicJsonType, + detail::enable_if_t < + detail::is_basic_json::value, + int > = 0 > + BasicJsonType get_impl(detail::priority_tag<2> /*unused*/) const + { + return *this; + } + + /*! + @brief get special-case overload + + This overloads avoids a lot of template boilerplate, it can be seen as the + identity method + + @tparam BasicJsonType == @ref basic_json + + @return a copy of *this + + @complexity Constant. + + @since version 2.1.0 + */ + template::value, + int> = 0> + basic_json get_impl(detail::priority_tag<3> /*unused*/) const + { + return *this; + } + + /*! + @brief get a pointer value (explicit) + @copydoc get() + */ + template::value, + int> = 0> + constexpr auto get_impl(detail::priority_tag<4> /*unused*/) const noexcept + -> decltype(std::declval().template get_ptr()) + { + // delegate the call to get_ptr + return get_ptr(); + } + + public: + /*! + @brief get a (pointer) value (explicit) + + Performs explicit type conversion between the JSON value and a compatible value if required. + + - If the requested type is a pointer to the internally stored JSON value that pointer is returned. + No copies are made. + + - If the requested type is the current @ref basic_json, or a different @ref basic_json convertible + from the current @ref basic_json. + + - Otherwise the value is converted by calling the @ref json_serializer `from_json()` + method. + + @tparam ValueTypeCV the provided value type + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @tparam ValueType if necessary + + @throw what @ref json_serializer `from_json()` method throws if conversion is required + + @since version 2.1.0 + */ + template < typename ValueTypeCV, typename ValueType = detail::uncvref_t> +#if defined(JSON_HAS_CPP_14) + constexpr +#endif + auto get() const noexcept( + noexcept(std::declval().template get_impl(detail::priority_tag<4> {}))) + -> decltype(std::declval().template get_impl(detail::priority_tag<4> {})) + { + // we cannot static_assert on ValueTypeCV being non-const, because + // there is support for get(), which is why we + // still need the uncvref + static_assert(!std::is_reference::value, + "get() cannot be used with reference types, you might want to use get_ref()"); + return get_impl(detail::priority_tag<4> {}); + } + + /*! + @brief get a pointer value (explicit) + + Explicit pointer access to the internally stored JSON value. No copies are + made. + + @warning The pointer becomes invalid if the underlying JSON object + changes. + + @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref + object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, + @ref number_unsigned_t, or @ref number_float_t. + + @return pointer to the internally stored JSON value if the requested + pointer type @a PointerType fits to the JSON value; `nullptr` otherwise + + @complexity Constant. + + @liveexample{The example below shows how pointers to internal values of a + JSON value can be requested. Note that no type conversions are made and a + `nullptr` is returned if the value and the requested pointer type does not + match.,get__PointerType} + + @sa see @ref get_ptr() for explicit pointer-member access + + @since version 1.0.0 + */ + template::value, int>::type = 0> + auto get() noexcept -> decltype(std::declval().template get_ptr()) + { + // delegate the call to get_ptr + return get_ptr(); + } + + /// @brief get a value (explicit) + /// @sa https://json.nlohmann.me/api/basic_json/get_to/ + template < typename ValueType, + detail::enable_if_t < + !detail::is_basic_json::value&& + detail::has_from_json::value, + int > = 0 > + ValueType & get_to(ValueType& v) const noexcept(noexcept( + JSONSerializer::from_json(std::declval(), v))) + { + JSONSerializer::from_json(*this, v); + return v; + } + + // specialization to allow calling get_to with a basic_json value + // see https://github.com/nlohmann/json/issues/2175 + template::value, + int> = 0> + ValueType & get_to(ValueType& v) const + { + v = *this; + return v; + } + + template < + typename T, std::size_t N, + typename Array = T (&)[N], // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) + detail::enable_if_t < + detail::has_from_json::value, int > = 0 > + Array get_to(T (&v)[N]) const // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) + noexcept(noexcept(JSONSerializer::from_json( + std::declval(), v))) + { + JSONSerializer::from_json(*this, v); + return v; + } + + /// @brief get a reference value (implicit) + /// @sa https://json.nlohmann.me/api/basic_json/get_ref/ + template::value, int>::type = 0> + ReferenceType get_ref() + { + // delegate call to get_ref_impl + return get_ref_impl(*this); + } + + /// @brief get a reference value (implicit) + /// @sa https://json.nlohmann.me/api/basic_json/get_ref/ + template < typename ReferenceType, typename std::enable_if < + std::is_reference::value&& + std::is_const::type>::value, int >::type = 0 > + ReferenceType get_ref() const + { + // delegate call to get_ref_impl + return get_ref_impl(*this); + } + + /*! + @brief get a value (implicit) + + Implicit type conversion between the JSON value and a compatible value. + The call is realized by calling @ref get() const. + + @tparam ValueType non-pointer type compatible to the JSON value, for + instance `int` for JSON integer numbers, `bool` for JSON booleans, or + `std::vector` types for JSON arrays. The character type of @ref string_t + as well as an initializer list of this type is excluded to avoid + ambiguities as these types implicitly convert to `std::string`. + + @return copy of the JSON value, converted to type @a ValueType + + @throw type_error.302 in case passed type @a ValueType is incompatible + to the JSON value type (e.g., the JSON value is of type boolean, but a + string is requested); see example below + + @complexity Linear in the size of the JSON value. + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map`.,operator__ValueType} + + @since version 1.0.0 + */ + template < typename ValueType, typename std::enable_if < + detail::conjunction < + detail::negation>, + detail::negation>>, + detail::negation>, + detail::negation>, + detail::negation>>, + +#if defined(JSON_HAS_CPP_17) && (defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSC_VER <= 1914)) + detail::negation>, +#endif + detail::is_detected_lazy + >::value, int >::type = 0 > + JSON_EXPLICIT operator ValueType() const + { + // delegate the call to get<>() const + return get(); + } + + /// @brief get a binary value + /// @sa https://json.nlohmann.me/api/basic_json/get_binary/ + binary_t& get_binary() + { + if (!is_binary()) + { + JSON_THROW(type_error::create(302, "type must be binary, but is " + std::string(type_name()), *this)); + } + + return *get_ptr(); + } + + /// @brief get a binary value + /// @sa https://json.nlohmann.me/api/basic_json/get_binary/ + const binary_t& get_binary() const + { + if (!is_binary()) + { + JSON_THROW(type_error::create(302, "type must be binary, but is " + std::string(type_name()), *this)); + } + + return *get_ptr(); + } + + /// @} + + + //////////////////// + // element access // + //////////////////// + + /// @name element access + /// Access to the JSON value. + /// @{ + + /// @brief access specified array element with bounds checking + /// @sa https://json.nlohmann.me/api/basic_json/at/ + reference at(size_type idx) + { + // at only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + JSON_TRY + { + return set_parent(m_value.array->at(idx)); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range", *this)); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()), *this)); + } + } + + /// @brief access specified array element with bounds checking + /// @sa https://json.nlohmann.me/api/basic_json/at/ + const_reference at(size_type idx) const + { + // at only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + JSON_TRY + { + return m_value.array->at(idx); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range", *this)); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()), *this)); + } + } + + /// @brief access specified object element with bounds checking + /// @sa https://json.nlohmann.me/api/basic_json/at/ + reference at(const typename object_t::key_type& key) + { + // at only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + JSON_TRY + { + return set_parent(m_value.object->at(key)); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(403, "key '" + key + "' not found", *this)); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()), *this)); + } + } + + /// @brief access specified object element with bounds checking + /// @sa https://json.nlohmann.me/api/basic_json/at/ + const_reference at(const typename object_t::key_type& key) const + { + // at only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + JSON_TRY + { + return m_value.object->at(key); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(403, "key '" + key + "' not found", *this)); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()), *this)); + } + } + + /// @brief access specified array element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + reference operator[](size_type idx) + { + // implicitly convert null value to an empty array + if (is_null()) + { + m_type = value_t::array; + m_value.array = create(); + assert_invariant(); + } + + // operator[] only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + // fill up array with null values if given idx is outside range + if (idx >= m_value.array->size()) + { +#if JSON_DIAGNOSTICS + // remember array size & capacity before resizing + const auto old_size = m_value.array->size(); + const auto old_capacity = m_value.array->capacity(); +#endif + m_value.array->resize(idx + 1); + +#if JSON_DIAGNOSTICS + if (JSON_HEDLEY_UNLIKELY(m_value.array->capacity() != old_capacity)) + { + // capacity has changed: update all parents + set_parents(); + } + else + { + // set parent for values added above + set_parents(begin() + static_cast(old_size), static_cast(idx + 1 - old_size)); + } +#endif + assert_invariant(); + } + + return m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a numeric argument with " + std::string(type_name()), *this)); + } + + /// @brief access specified array element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + const_reference operator[](size_type idx) const + { + // const operator[] only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + return m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a numeric argument with " + std::string(type_name()), *this)); + } + + /// @brief access specified object element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + reference operator[](const typename object_t::key_type& key) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create(); + assert_invariant(); + } + + // operator[] only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + return set_parent(m_value.object->operator[](key)); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name()), *this)); + } + + /// @brief access specified object element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + const_reference operator[](const typename object_t::key_type& key) const + { + // const operator[] only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + JSON_ASSERT(m_value.object->find(key) != m_value.object->end()); + return m_value.object->find(key)->second; + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name()), *this)); + } + + /// @brief access specified object element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + template + JSON_HEDLEY_NON_NULL(2) + reference operator[](T* key) + { + // implicitly convert null to object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // at only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + return set_parent(m_value.object->operator[](key)); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name()), *this)); + } + + /// @brief access specified object element + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + template + JSON_HEDLEY_NON_NULL(2) + const_reference operator[](T* key) const + { + // at only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + JSON_ASSERT(m_value.object->find(key) != m_value.object->end()); + return m_value.object->find(key)->second; + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name()), *this)); + } + + /// @brief access specified object element with default value + /// @sa https://json.nlohmann.me/api/basic_json/value/ + /// using std::is_convertible in a std::enable_if will fail when using explicit conversions + template < class ValueType, typename std::enable_if < + detail::is_getable::value + && !std::is_same::value, int >::type = 0 > + ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const + { + // at only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + // if key is found, return value and given default value otherwise + const auto it = find(key); + if (it != end()) + { + return it->template get(); + } + + return default_value; + } + + JSON_THROW(type_error::create(306, "cannot use value() with " + std::string(type_name()), *this)); + } + + /// @brief access specified object element with default value + /// @sa https://json.nlohmann.me/api/basic_json/value/ + /// overload for a default value of type const char* + string_t value(const typename object_t::key_type& key, const char* default_value) const + { + return value(key, string_t(default_value)); + } + + /// @brief access specified object element via JSON Pointer with default value + /// @sa https://json.nlohmann.me/api/basic_json/value/ + template::value, int>::type = 0> + ValueType value(const json_pointer& ptr, const ValueType& default_value) const + { + // at only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + // if pointer resolves a value, return it or use default value + JSON_TRY + { + return ptr.get_checked(this).template get(); + } + JSON_INTERNAL_CATCH (out_of_range&) + { + return default_value; + } + } + + JSON_THROW(type_error::create(306, "cannot use value() with " + std::string(type_name()), *this)); + } + + /// @brief access specified object element via JSON Pointer with default value + /// @sa https://json.nlohmann.me/api/basic_json/value/ + /// overload for a default value of type const char* + JSON_HEDLEY_NON_NULL(3) + string_t value(const json_pointer& ptr, const char* default_value) const + { + return value(ptr, string_t(default_value)); + } + + /// @brief access the first element + /// @sa https://json.nlohmann.me/api/basic_json/front/ + reference front() + { + return *begin(); + } + + /// @brief access the first element + /// @sa https://json.nlohmann.me/api/basic_json/front/ + const_reference front() const + { + return *cbegin(); + } + + /// @brief access the last element + /// @sa https://json.nlohmann.me/api/basic_json/back/ + reference back() + { + auto tmp = end(); + --tmp; + return *tmp; + } + + /// @brief access the last element + /// @sa https://json.nlohmann.me/api/basic_json/back/ + const_reference back() const + { + auto tmp = cend(); + --tmp; + return *tmp; + } + + /// @brief remove element given an iterator + /// @sa https://json.nlohmann.me/api/basic_json/erase/ + template < class IteratorType, typename std::enable_if < + std::is_same::value || + std::is_same::value, int >::type + = 0 > + IteratorType erase(IteratorType pos) + { + // make sure iterator fits the current value + if (JSON_HEDLEY_UNLIKELY(this != pos.m_object)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", *this)); + } + + IteratorType result = end(); + + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + case value_t::binary: + { + if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin())) + { + JSON_THROW(invalid_iterator::create(205, "iterator out of range", *this)); + } + + if (is_string()) + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, m_value.string); + std::allocator_traits::deallocate(alloc, m_value.string, 1); + m_value.string = nullptr; + } + else if (is_binary()) + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, m_value.binary); + std::allocator_traits::deallocate(alloc, m_value.binary, 1); + m_value.binary = nullptr; + } + + m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator); + break; + } + + case value_t::null: + case value_t::discarded: + default: + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()), *this)); + } + + return result; + } + + /// @brief remove elements given an iterator range + /// @sa https://json.nlohmann.me/api/basic_json/erase/ + template < class IteratorType, typename std::enable_if < + std::is_same::value || + std::is_same::value, int >::type + = 0 > + IteratorType erase(IteratorType first, IteratorType last) + { + // make sure iterator fits the current value + if (JSON_HEDLEY_UNLIKELY(this != first.m_object || this != last.m_object)) + { + JSON_THROW(invalid_iterator::create(203, "iterators do not fit current value", *this)); + } + + IteratorType result = end(); + + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + case value_t::binary: + { + if (JSON_HEDLEY_LIKELY(!first.m_it.primitive_iterator.is_begin() + || !last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range", *this)); + } + + if (is_string()) + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, m_value.string); + std::allocator_traits::deallocate(alloc, m_value.string, 1); + m_value.string = nullptr; + } + else if (is_binary()) + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, m_value.binary); + std::allocator_traits::deallocate(alloc, m_value.binary, 1); + m_value.binary = nullptr; + } + + m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + case value_t::null: + case value_t::discarded: + default: + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()), *this)); + } + + return result; + } + + /// @brief remove element from a JSON object given a key + /// @sa https://json.nlohmann.me/api/basic_json/erase/ + size_type erase(const typename object_t::key_type& key) + { + // this erase only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + return m_value.object->erase(key); + } + + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()), *this)); + } + + /// @brief remove element from a JSON array given an index + /// @sa https://json.nlohmann.me/api/basic_json/erase/ + void erase(const size_type idx) + { + // this erase only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + if (JSON_HEDLEY_UNLIKELY(idx >= size())) + { + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range", *this)); + } + + m_value.array->erase(m_value.array->begin() + static_cast(idx)); + } + else + { + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()), *this)); + } + } + + /// @} + + + //////////// + // lookup // + //////////// + + /// @name lookup + /// @{ + + /// @brief find an element in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/find/ + template + iterator find(KeyT&& key) + { + auto result = end(); + + if (is_object()) + { + result.m_it.object_iterator = m_value.object->find(std::forward(key)); + } + + return result; + } + + /// @brief find an element in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/find/ + template + const_iterator find(KeyT&& key) const + { + auto result = cend(); + + if (is_object()) + { + result.m_it.object_iterator = m_value.object->find(std::forward(key)); + } + + return result; + } + + /// @brief returns the number of occurrences of a key in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/count/ + template + size_type count(KeyT&& key) const + { + // return 0 for all nonobject types + return is_object() ? m_value.object->count(std::forward(key)) : 0; + } + + /// @brief check the existence of an element in a JSON object + /// @sa https://json.nlohmann.me/api/basic_json/contains/ + template < typename KeyT, typename std::enable_if < + !std::is_same::type, json_pointer>::value, int >::type = 0 > + bool contains(KeyT && key) const + { + return is_object() && m_value.object->find(std::forward(key)) != m_value.object->end(); + } + + /// @brief check the existence of an element in a JSON object given a JSON pointer + /// @sa https://json.nlohmann.me/api/basic_json/contains/ + bool contains(const json_pointer& ptr) const + { + return ptr.contains(this); + } + + /// @} + + + /////////////// + // iterators // + /////////////// + + /// @name iterators + /// @{ + + /// @brief returns an iterator to the first element + /// @sa https://json.nlohmann.me/api/basic_json/begin/ + iterator begin() noexcept + { + iterator result(this); + result.set_begin(); + return result; + } + + /// @brief returns an iterator to the first element + /// @sa https://json.nlohmann.me/api/basic_json/begin/ + const_iterator begin() const noexcept + { + return cbegin(); + } + + /// @brief returns a const iterator to the first element + /// @sa https://json.nlohmann.me/api/basic_json/cbegin/ + const_iterator cbegin() const noexcept + { + const_iterator result(this); + result.set_begin(); + return result; + } + + /// @brief returns an iterator to one past the last element + /// @sa https://json.nlohmann.me/api/basic_json/end/ + iterator end() noexcept + { + iterator result(this); + result.set_end(); + return result; + } + + /// @brief returns an iterator to one past the last element + /// @sa https://json.nlohmann.me/api/basic_json/end/ + const_iterator end() const noexcept + { + return cend(); + } + + /// @brief returns an iterator to one past the last element + /// @sa https://json.nlohmann.me/api/basic_json/cend/ + const_iterator cend() const noexcept + { + const_iterator result(this); + result.set_end(); + return result; + } + + /// @brief returns an iterator to the reverse-beginning + /// @sa https://json.nlohmann.me/api/basic_json/rbegin/ + reverse_iterator rbegin() noexcept + { + return reverse_iterator(end()); + } + + /// @brief returns an iterator to the reverse-beginning + /// @sa https://json.nlohmann.me/api/basic_json/rbegin/ + const_reverse_iterator rbegin() const noexcept + { + return crbegin(); + } + + /// @brief returns an iterator to the reverse-end + /// @sa https://json.nlohmann.me/api/basic_json/rend/ + reverse_iterator rend() noexcept + { + return reverse_iterator(begin()); + } + + /// @brief returns an iterator to the reverse-end + /// @sa https://json.nlohmann.me/api/basic_json/rend/ + const_reverse_iterator rend() const noexcept + { + return crend(); + } + + /// @brief returns a const reverse iterator to the last element + /// @sa https://json.nlohmann.me/api/basic_json/crbegin/ + const_reverse_iterator crbegin() const noexcept + { + return const_reverse_iterator(cend()); + } + + /// @brief returns a const reverse iterator to one before the first + /// @sa https://json.nlohmann.me/api/basic_json/crend/ + const_reverse_iterator crend() const noexcept + { + return const_reverse_iterator(cbegin()); + } + + public: + /// @brief wrapper to access iterator member functions in range-based for + /// @sa https://json.nlohmann.me/api/basic_json/items/ + /// @deprecated This function is deprecated since 3.1.0 and will be removed in + /// version 4.0.0 of the library. Please use @ref items() instead; + /// that is, replace `json::iterator_wrapper(j)` with `j.items()`. + JSON_HEDLEY_DEPRECATED_FOR(3.1.0, items()) + static iteration_proxy iterator_wrapper(reference ref) noexcept + { + return ref.items(); + } + + /// @brief wrapper to access iterator member functions in range-based for + /// @sa https://json.nlohmann.me/api/basic_json/items/ + /// @deprecated This function is deprecated since 3.1.0 and will be removed in + /// version 4.0.0 of the library. Please use @ref items() instead; + /// that is, replace `json::iterator_wrapper(j)` with `j.items()`. + JSON_HEDLEY_DEPRECATED_FOR(3.1.0, items()) + static iteration_proxy iterator_wrapper(const_reference ref) noexcept + { + return ref.items(); + } + + /// @brief helper to access iterator member functions in range-based for + /// @sa https://json.nlohmann.me/api/basic_json/items/ + iteration_proxy items() noexcept + { + return iteration_proxy(*this); + } + + /// @brief helper to access iterator member functions in range-based for + /// @sa https://json.nlohmann.me/api/basic_json/items/ + iteration_proxy items() const noexcept + { + return iteration_proxy(*this); + } + + /// @} + + + ////////////// + // capacity // + ////////////// + + /// @name capacity + /// @{ + + /// @brief checks whether the container is empty. + /// @sa https://json.nlohmann.me/api/basic_json/empty/ + bool empty() const noexcept + { + switch (m_type) + { + case value_t::null: + { + // null values are empty + return true; + } + + case value_t::array: + { + // delegate call to array_t::empty() + return m_value.array->empty(); + } + + case value_t::object: + { + // delegate call to object_t::empty() + return m_value.object->empty(); + } + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + // all other types are nonempty + return false; + } + } + } + + /// @brief returns the number of elements + /// @sa https://json.nlohmann.me/api/basic_json/size/ + size_type size() const noexcept + { + switch (m_type) + { + case value_t::null: + { + // null values are empty + return 0; + } + + case value_t::array: + { + // delegate call to array_t::size() + return m_value.array->size(); + } + + case value_t::object: + { + // delegate call to object_t::size() + return m_value.object->size(); + } + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + // all other types have size 1 + return 1; + } + } + } + + /// @brief returns the maximum possible number of elements + /// @sa https://json.nlohmann.me/api/basic_json/max_size/ + size_type max_size() const noexcept + { + switch (m_type) + { + case value_t::array: + { + // delegate call to array_t::max_size() + return m_value.array->max_size(); + } + + case value_t::object: + { + // delegate call to object_t::max_size() + return m_value.object->max_size(); + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + // all other types have max_size() == size() + return size(); + } + } + } + + /// @} + + + /////////////// + // modifiers // + /////////////// + + /// @name modifiers + /// @{ + + /// @brief clears the contents + /// @sa https://json.nlohmann.me/api/basic_json/clear/ + void clear() noexcept + { + switch (m_type) + { + case value_t::number_integer: + { + m_value.number_integer = 0; + break; + } + + case value_t::number_unsigned: + { + m_value.number_unsigned = 0; + break; + } + + case value_t::number_float: + { + m_value.number_float = 0.0; + break; + } + + case value_t::boolean: + { + m_value.boolean = false; + break; + } + + case value_t::string: + { + m_value.string->clear(); + break; + } + + case value_t::binary: + { + m_value.binary->clear(); + break; + } + + case value_t::array: + { + m_value.array->clear(); + break; + } + + case value_t::object: + { + m_value.object->clear(); + break; + } + + case value_t::null: + case value_t::discarded: + default: + break; + } + } + + /// @brief add an object to an array + /// @sa https://json.nlohmann.me/api/basic_json/push_back/ + void push_back(basic_json&& val) + { + // push_back only works for null objects or arrays + if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()), *this)); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array (move semantics) + const auto old_capacity = m_value.array->capacity(); + m_value.array->push_back(std::move(val)); + set_parent(m_value.array->back(), old_capacity); + // if val is moved from, basic_json move constructor marks it null, so we do not call the destructor + } + + /// @brief add an object to an array + /// @sa https://json.nlohmann.me/api/basic_json/operator+=/ + reference operator+=(basic_json&& val) + { + push_back(std::move(val)); + return *this; + } + + /// @brief add an object to an array + /// @sa https://json.nlohmann.me/api/basic_json/push_back/ + void push_back(const basic_json& val) + { + // push_back only works for null objects or arrays + if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()), *this)); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array + const auto old_capacity = m_value.array->capacity(); + m_value.array->push_back(val); + set_parent(m_value.array->back(), old_capacity); + } + + /// @brief add an object to an array + /// @sa https://json.nlohmann.me/api/basic_json/operator+=/ + reference operator+=(const basic_json& val) + { + push_back(val); + return *this; + } + + /// @brief add an object to an object + /// @sa https://json.nlohmann.me/api/basic_json/push_back/ + void push_back(const typename object_t::value_type& val) + { + // push_back only works for null objects or objects + if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()), *this)); + } + + // transform null object into an object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // add element to object + auto res = m_value.object->insert(val); + set_parent(res.first->second); + } + + /// @brief add an object to an object + /// @sa https://json.nlohmann.me/api/basic_json/operator+=/ + reference operator+=(const typename object_t::value_type& val) + { + push_back(val); + return *this; + } + + /// @brief add an object to an object + /// @sa https://json.nlohmann.me/api/basic_json/push_back/ + void push_back(initializer_list_t init) + { + if (is_object() && init.size() == 2 && (*init.begin())->is_string()) + { + basic_json&& key = init.begin()->moved_or_copied(); + push_back(typename object_t::value_type( + std::move(key.get_ref()), (init.begin() + 1)->moved_or_copied())); + } + else + { + push_back(basic_json(init)); + } + } + + /// @brief add an object to an object + /// @sa https://json.nlohmann.me/api/basic_json/operator+=/ + reference operator+=(initializer_list_t init) + { + push_back(init); + return *this; + } + + /// @brief add an object to an array + /// @sa https://json.nlohmann.me/api/basic_json/emplace_back/ + template + reference emplace_back(Args&& ... args) + { + // emplace_back only works for null objects or arrays + if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) + { + JSON_THROW(type_error::create(311, "cannot use emplace_back() with " + std::string(type_name()), *this)); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array (perfect forwarding) + const auto old_capacity = m_value.array->capacity(); + m_value.array->emplace_back(std::forward(args)...); + return set_parent(m_value.array->back(), old_capacity); + } + + /// @brief add an object to an object if key does not exist + /// @sa https://json.nlohmann.me/api/basic_json/emplace/ + template + std::pair emplace(Args&& ... args) + { + // emplace only works for null objects or arrays + if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) + { + JSON_THROW(type_error::create(311, "cannot use emplace() with " + std::string(type_name()), *this)); + } + + // transform null object into an object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // add element to array (perfect forwarding) + auto res = m_value.object->emplace(std::forward(args)...); + set_parent(res.first->second); + + // create result iterator and set iterator to the result of emplace + auto it = begin(); + it.m_it.object_iterator = res.first; + + // return pair of iterator and boolean + return {it, res.second}; + } + + /// Helper for insertion of an iterator + /// @note: This uses std::distance to support GCC 4.8, + /// see https://github.com/nlohmann/json/pull/1257 + template + iterator insert_iterator(const_iterator pos, Args&& ... args) + { + iterator result(this); + JSON_ASSERT(m_value.array != nullptr); + + auto insert_pos = std::distance(m_value.array->begin(), pos.m_it.array_iterator); + m_value.array->insert(pos.m_it.array_iterator, std::forward(args)...); + result.m_it.array_iterator = m_value.array->begin() + insert_pos; + + // This could have been written as: + // result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val); + // but the return value of insert is missing in GCC 4.8, so it is written this way instead. + + set_parents(); + return result; + } + + /// @brief inserts element into array + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + iterator insert(const_iterator pos, const basic_json& val) + { + // insert only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", *this)); + } + + // insert to array and return iterator + return insert_iterator(pos, val); + } + + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()), *this)); + } + + /// @brief inserts element into array + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + iterator insert(const_iterator pos, basic_json&& val) + { + return insert(pos, val); + } + + /// @brief inserts copies of element into array + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + iterator insert(const_iterator pos, size_type cnt, const basic_json& val) + { + // insert only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", *this)); + } + + // insert to array and return iterator + return insert_iterator(pos, cnt, val); + } + + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()), *this)); + } + + /// @brief inserts range of elements into array + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + iterator insert(const_iterator pos, const_iterator first, const_iterator last) + { + // insert only works for arrays + if (JSON_HEDLEY_UNLIKELY(!is_array())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()), *this)); + } + + // check if iterator pos fits to this JSON value + if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", *this)); + } + + // check if range iterators belong to the same JSON object + if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit", *this)); + } + + if (JSON_HEDLEY_UNLIKELY(first.m_object == this)) + { + JSON_THROW(invalid_iterator::create(211, "passed iterators may not belong to container", *this)); + } + + // insert to array and return iterator + return insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator); + } + + /// @brief inserts elements from initializer list into array + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + iterator insert(const_iterator pos, initializer_list_t ilist) + { + // insert only works for arrays + if (JSON_HEDLEY_UNLIKELY(!is_array())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()), *this)); + } + + // check if iterator pos fits to this JSON value + if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", *this)); + } + + // insert to array and return iterator + return insert_iterator(pos, ilist.begin(), ilist.end()); + } + + /// @brief inserts range of elements into object + /// @sa https://json.nlohmann.me/api/basic_json/insert/ + void insert(const_iterator first, const_iterator last) + { + // insert only works for objects + if (JSON_HEDLEY_UNLIKELY(!is_object())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()), *this)); + } + + // check if range iterators belong to the same JSON object + if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit", *this)); + } + + // passed iterators must belong to objects + if (JSON_HEDLEY_UNLIKELY(!first.m_object->is_object())) + { + JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects", *this)); + } + + m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator); + } + + /// @brief updates a JSON object from another object, overwriting existing keys + /// @sa https://json.nlohmann.me/api/basic_json/update/ + void update(const_reference j, bool merge_objects = false) + { + update(j.begin(), j.end(), merge_objects); + } + + /// @brief updates a JSON object from another object, overwriting existing keys + /// @sa https://json.nlohmann.me/api/basic_json/update/ + void update(const_iterator first, const_iterator last, bool merge_objects = false) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create(); + assert_invariant(); + } + + if (JSON_HEDLEY_UNLIKELY(!is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(type_name()), *this)); + } + + // check if range iterators belong to the same JSON object + if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit", *this)); + } + + // passed iterators must belong to objects + if (JSON_HEDLEY_UNLIKELY(!first.m_object->is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(first.m_object->type_name()), *first.m_object)); + } + + for (auto it = first; it != last; ++it) + { + if (merge_objects && it.value().is_object()) + { + auto it2 = m_value.object->find(it.key()); + if (it2 != m_value.object->end()) + { + it2->second.update(it.value(), true); + continue; + } + } + m_value.object->operator[](it.key()) = it.value(); +#if JSON_DIAGNOSTICS + m_value.object->operator[](it.key()).m_parent = this; +#endif + } + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(reference other) noexcept ( + std::is_nothrow_move_constructible::value&& + std::is_nothrow_move_assignable::value&& + std::is_nothrow_move_constructible::value&& + std::is_nothrow_move_assignable::value + ) + { + std::swap(m_type, other.m_type); + std::swap(m_value, other.m_value); + + set_parents(); + other.set_parents(); + assert_invariant(); + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + friend void swap(reference left, reference right) noexcept ( + std::is_nothrow_move_constructible::value&& + std::is_nothrow_move_assignable::value&& + std::is_nothrow_move_constructible::value&& + std::is_nothrow_move_assignable::value + ) + { + left.swap(right); + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(array_t& other) // NOLINT(bugprone-exception-escape) + { + // swap only works for arrays + if (JSON_HEDLEY_LIKELY(is_array())) + { + std::swap(*(m_value.array), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()), *this)); + } + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(object_t& other) // NOLINT(bugprone-exception-escape) + { + // swap only works for objects + if (JSON_HEDLEY_LIKELY(is_object())) + { + std::swap(*(m_value.object), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()), *this)); + } + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(string_t& other) // NOLINT(bugprone-exception-escape) + { + // swap only works for strings + if (JSON_HEDLEY_LIKELY(is_string())) + { + std::swap(*(m_value.string), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()), *this)); + } + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(binary_t& other) // NOLINT(bugprone-exception-escape) + { + // swap only works for strings + if (JSON_HEDLEY_LIKELY(is_binary())) + { + std::swap(*(m_value.binary), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()), *this)); + } + } + + /// @brief exchanges the values + /// @sa https://json.nlohmann.me/api/basic_json/swap/ + void swap(typename binary_t::container_type& other) // NOLINT(bugprone-exception-escape) + { + // swap only works for strings + if (JSON_HEDLEY_LIKELY(is_binary())) + { + std::swap(*(m_value.binary), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()), *this)); + } + } + + /// @} + + public: + ////////////////////////////////////////// + // lexicographical comparison operators // + ////////////////////////////////////////// + + /// @name lexicographical comparison operators + /// @{ + + /// @brief comparison: equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ + friend bool operator==(const_reference lhs, const_reference rhs) noexcept + { +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + const auto lhs_type = lhs.type(); + const auto rhs_type = rhs.type(); + + if (lhs_type == rhs_type) + { + switch (lhs_type) + { + case value_t::array: + return *lhs.m_value.array == *rhs.m_value.array; + + case value_t::object: + return *lhs.m_value.object == *rhs.m_value.object; + + case value_t::null: + return true; + + case value_t::string: + return *lhs.m_value.string == *rhs.m_value.string; + + case value_t::boolean: + return lhs.m_value.boolean == rhs.m_value.boolean; + + case value_t::number_integer: + return lhs.m_value.number_integer == rhs.m_value.number_integer; + + case value_t::number_unsigned: + return lhs.m_value.number_unsigned == rhs.m_value.number_unsigned; + + case value_t::number_float: + return lhs.m_value.number_float == rhs.m_value.number_float; + + case value_t::binary: + return *lhs.m_value.binary == *rhs.m_value.binary; + + case value_t::discarded: + default: + return false; + } + } + else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_float) + { + return static_cast(lhs.m_value.number_integer) == rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float && rhs_type == value_t::number_integer) + { + return lhs.m_value.number_float == static_cast(rhs.m_value.number_integer); + } + else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_float) + { + return static_cast(lhs.m_value.number_unsigned) == rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float && rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_float == static_cast(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_integer) + { + return static_cast(lhs.m_value.number_unsigned) == rhs.m_value.number_integer; + } + else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_integer == static_cast(rhs.m_value.number_unsigned); + } + + return false; +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + } + + /// @brief comparison: equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ + template::value, int>::type = 0> + friend bool operator==(const_reference lhs, ScalarType rhs) noexcept + { + return lhs == basic_json(rhs); + } + + /// @brief comparison: equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_eq/ + template::value, int>::type = 0> + friend bool operator==(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) == rhs; + } + + /// @brief comparison: not equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ne/ + friend bool operator!=(const_reference lhs, const_reference rhs) noexcept + { + return !(lhs == rhs); + } + + /// @brief comparison: not equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ne/ + template::value, int>::type = 0> + friend bool operator!=(const_reference lhs, ScalarType rhs) noexcept + { + return lhs != basic_json(rhs); + } + + /// @brief comparison: not equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ne/ + template::value, int>::type = 0> + friend bool operator!=(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) != rhs; + } + + /// @brief comparison: less than + /// @sa https://json.nlohmann.me/api/basic_json/operator_lt/ + friend bool operator<(const_reference lhs, const_reference rhs) noexcept + { + const auto lhs_type = lhs.type(); + const auto rhs_type = rhs.type(); + + if (lhs_type == rhs_type) + { + switch (lhs_type) + { + case value_t::array: + // note parentheses are necessary, see + // https://github.com/nlohmann/json/issues/1530 + return (*lhs.m_value.array) < (*rhs.m_value.array); + + case value_t::object: + return (*lhs.m_value.object) < (*rhs.m_value.object); + + case value_t::null: + return false; + + case value_t::string: + return (*lhs.m_value.string) < (*rhs.m_value.string); + + case value_t::boolean: + return (lhs.m_value.boolean) < (rhs.m_value.boolean); + + case value_t::number_integer: + return (lhs.m_value.number_integer) < (rhs.m_value.number_integer); + + case value_t::number_unsigned: + return (lhs.m_value.number_unsigned) < (rhs.m_value.number_unsigned); + + case value_t::number_float: + return (lhs.m_value.number_float) < (rhs.m_value.number_float); + + case value_t::binary: + return (*lhs.m_value.binary) < (*rhs.m_value.binary); + + case value_t::discarded: + default: + return false; + } + } + else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_float) + { + return static_cast(lhs.m_value.number_integer) < rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float && rhs_type == value_t::number_integer) + { + return lhs.m_value.number_float < static_cast(rhs.m_value.number_integer); + } + else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_float) + { + return static_cast(lhs.m_value.number_unsigned) < rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float && rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_float < static_cast(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_integer && rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_integer < static_cast(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_unsigned && rhs_type == value_t::number_integer) + { + return static_cast(lhs.m_value.number_unsigned) < rhs.m_value.number_integer; + } + + // We only reach this line if we cannot compare values. In that case, + // we compare types. Note we have to call the operator explicitly, + // because MSVC has problems otherwise. + return operator<(lhs_type, rhs_type); + } + + /// @brief comparison: less than + /// @sa https://json.nlohmann.me/api/basic_json/operator_lt/ + template::value, int>::type = 0> + friend bool operator<(const_reference lhs, ScalarType rhs) noexcept + { + return lhs < basic_json(rhs); + } + + /// @brief comparison: less than + /// @sa https://json.nlohmann.me/api/basic_json/operator_lt/ + template::value, int>::type = 0> + friend bool operator<(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) < rhs; + } + + /// @brief comparison: less than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_le/ + friend bool operator<=(const_reference lhs, const_reference rhs) noexcept + { + return !(rhs < lhs); + } + + /// @brief comparison: less than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_le/ + template::value, int>::type = 0> + friend bool operator<=(const_reference lhs, ScalarType rhs) noexcept + { + return lhs <= basic_json(rhs); + } + + /// @brief comparison: less than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_le/ + template::value, int>::type = 0> + friend bool operator<=(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) <= rhs; + } + + /// @brief comparison: greater than + /// @sa https://json.nlohmann.me/api/basic_json/operator_gt/ + friend bool operator>(const_reference lhs, const_reference rhs) noexcept + { + return !(lhs <= rhs); + } + + /// @brief comparison: greater than + /// @sa https://json.nlohmann.me/api/basic_json/operator_gt/ + template::value, int>::type = 0> + friend bool operator>(const_reference lhs, ScalarType rhs) noexcept + { + return lhs > basic_json(rhs); + } + + /// @brief comparison: greater than + /// @sa https://json.nlohmann.me/api/basic_json/operator_gt/ + template::value, int>::type = 0> + friend bool operator>(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) > rhs; + } + + /// @brief comparison: greater than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/ + friend bool operator>=(const_reference lhs, const_reference rhs) noexcept + { + return !(lhs < rhs); + } + + /// @brief comparison: greater than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/ + template::value, int>::type = 0> + friend bool operator>=(const_reference lhs, ScalarType rhs) noexcept + { + return lhs >= basic_json(rhs); + } + + /// @brief comparison: greater than or equal + /// @sa https://json.nlohmann.me/api/basic_json/operator_ge/ + template::value, int>::type = 0> + friend bool operator>=(ScalarType lhs, const_reference rhs) noexcept + { + return basic_json(lhs) >= rhs; + } + + /// @} + + /////////////////// + // serialization // + /////////////////// + + /// @name serialization + /// @{ +#ifndef JSON_NO_IO + /// @brief serialize to stream + /// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/ + friend std::ostream& operator<<(std::ostream& o, const basic_json& j) + { + // read width member and use it as indentation parameter if nonzero + const bool pretty_print = o.width() > 0; + const auto indentation = pretty_print ? o.width() : 0; + + // reset width to 0 for subsequent calls to this stream + o.width(0); + + // do the actual serialization + serializer s(detail::output_adapter(o), o.fill()); + s.dump(j, pretty_print, false, static_cast(indentation)); + return o; + } + + /// @brief serialize to stream + /// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/ + /// @deprecated This function is deprecated since 3.0.0 and will be removed in + /// version 4.0.0 of the library. Please use + /// operator<<(std::ostream&, const basic_json&) instead; that is, + /// replace calls like `j >> o;` with `o << j;`. + JSON_HEDLEY_DEPRECATED_FOR(3.0.0, operator<<(std::ostream&, const basic_json&)) + friend std::ostream& operator>>(const basic_json& j, std::ostream& o) + { + return o << j; + } +#endif // JSON_NO_IO + /// @} + + + ///////////////////// + // deserialization // + ///////////////////// + + /// @name deserialization + /// @{ + + /// @brief deserialize from a compatible input + /// @sa https://json.nlohmann.me/api/basic_json/parse/ + template + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json parse(InputType&& i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true, + const bool ignore_comments = false) + { + basic_json result; + parser(detail::input_adapter(std::forward(i)), cb, allow_exceptions, ignore_comments).parse(true, result); + return result; + } + + /// @brief deserialize from a pair of character iterators + /// @sa https://json.nlohmann.me/api/basic_json/parse/ + template + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json parse(IteratorType first, + IteratorType last, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true, + const bool ignore_comments = false) + { + basic_json result; + parser(detail::input_adapter(std::move(first), std::move(last)), cb, allow_exceptions, ignore_comments).parse(true, result); + return result; + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, parse(ptr, ptr + len)) + static basic_json parse(detail::span_input_adapter&& i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true, + const bool ignore_comments = false) + { + basic_json result; + parser(i.get(), cb, allow_exceptions, ignore_comments).parse(true, result); + return result; + } + + /// @brief check if the input is valid JSON + /// @sa https://json.nlohmann.me/api/basic_json/accept/ + template + static bool accept(InputType&& i, + const bool ignore_comments = false) + { + return parser(detail::input_adapter(std::forward(i)), nullptr, false, ignore_comments).accept(true); + } + + /// @brief check if the input is valid JSON + /// @sa https://json.nlohmann.me/api/basic_json/accept/ + template + static bool accept(IteratorType first, IteratorType last, + const bool ignore_comments = false) + { + return parser(detail::input_adapter(std::move(first), std::move(last)), nullptr, false, ignore_comments).accept(true); + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, accept(ptr, ptr + len)) + static bool accept(detail::span_input_adapter&& i, + const bool ignore_comments = false) + { + return parser(i.get(), nullptr, false, ignore_comments).accept(true); + } + + /// @brief generate SAX events + /// @sa https://json.nlohmann.me/api/basic_json/sax_parse/ + template + JSON_HEDLEY_NON_NULL(2) + static bool sax_parse(InputType&& i, SAX* sax, + input_format_t format = input_format_t::json, + const bool strict = true, + const bool ignore_comments = false) + { + auto ia = detail::input_adapter(std::forward(i)); + return format == input_format_t::json + ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict) + : detail::binary_reader(std::move(ia)).sax_parse(format, sax, strict); + } + + /// @brief generate SAX events + /// @sa https://json.nlohmann.me/api/basic_json/sax_parse/ + template + JSON_HEDLEY_NON_NULL(3) + static bool sax_parse(IteratorType first, IteratorType last, SAX* sax, + input_format_t format = input_format_t::json, + const bool strict = true, + const bool ignore_comments = false) + { + auto ia = detail::input_adapter(std::move(first), std::move(last)); + return format == input_format_t::json + ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict) + : detail::binary_reader(std::move(ia)).sax_parse(format, sax, strict); + } + + /// @brief generate SAX events + /// @sa https://json.nlohmann.me/api/basic_json/sax_parse/ + /// @deprecated This function is deprecated since 3.8.0 and will be removed in + /// version 4.0.0 of the library. Please use + /// sax_parse(ptr, ptr + len) instead. + template + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, sax_parse(ptr, ptr + len, ...)) + JSON_HEDLEY_NON_NULL(2) + static bool sax_parse(detail::span_input_adapter&& i, SAX* sax, + input_format_t format = input_format_t::json, + const bool strict = true, + const bool ignore_comments = false) + { + auto ia = i.get(); + return format == input_format_t::json + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + ? parser(std::move(ia), nullptr, true, ignore_comments).sax_parse(sax, strict) + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + : detail::binary_reader(std::move(ia)).sax_parse(format, sax, strict); + } +#ifndef JSON_NO_IO + /// @brief deserialize from stream + /// @sa https://json.nlohmann.me/api/basic_json/operator_gtgt/ + /// @deprecated This stream operator is deprecated since 3.0.0 and will be removed in + /// version 4.0.0 of the library. Please use + /// operator>>(std::istream&, basic_json&) instead; that is, + /// replace calls like `j << i;` with `i >> j;`. + JSON_HEDLEY_DEPRECATED_FOR(3.0.0, operator>>(std::istream&, basic_json&)) + friend std::istream& operator<<(basic_json& j, std::istream& i) + { + return operator>>(i, j); + } + + /// @brief deserialize from stream + /// @sa https://json.nlohmann.me/api/basic_json/operator_gtgt/ + friend std::istream& operator>>(std::istream& i, basic_json& j) + { + parser(detail::input_adapter(i)).parse(false, j); + return i; + } +#endif // JSON_NO_IO + /// @} + + /////////////////////////// + // convenience functions // + /////////////////////////// + + /// @brief return the type as string + /// @sa https://json.nlohmann.me/api/basic_json/type_name/ + JSON_HEDLEY_RETURNS_NON_NULL + const char* type_name() const noexcept + { + switch (m_type) + { + case value_t::null: + return "null"; + case value_t::object: + return "object"; + case value_t::array: + return "array"; + case value_t::string: + return "string"; + case value_t::boolean: + return "boolean"; + case value_t::binary: + return "binary"; + case value_t::discarded: + return "discarded"; + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + default: + return "number"; + } + } + + + JSON_PRIVATE_UNLESS_TESTED: + ////////////////////// + // member variables // + ////////////////////// + + /// the type of the current element + value_t m_type = value_t::null; + + /// the value of the current element + json_value m_value = {}; + +#if JSON_DIAGNOSTICS + /// a pointer to a parent value (for debugging purposes) + basic_json* m_parent = nullptr; +#endif + + ////////////////////////////////////////// + // binary serialization/deserialization // + ////////////////////////////////////////// + + /// @name binary serialization/deserialization support + /// @{ + + public: + /// @brief create a CBOR serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_cbor/ + static std::vector to_cbor(const basic_json& j) + { + std::vector result; + to_cbor(j, result); + return result; + } + + /// @brief create a CBOR serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_cbor/ + static void to_cbor(const basic_json& j, detail::output_adapter o) + { + binary_writer(o).write_cbor(j); + } + + /// @brief create a CBOR serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_cbor/ + static void to_cbor(const basic_json& j, detail::output_adapter o) + { + binary_writer(o).write_cbor(j); + } + + /// @brief create a MessagePack serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_msgpack/ + static std::vector to_msgpack(const basic_json& j) + { + std::vector result; + to_msgpack(j, result); + return result; + } + + /// @brief create a MessagePack serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_msgpack/ + static void to_msgpack(const basic_json& j, detail::output_adapter o) + { + binary_writer(o).write_msgpack(j); + } + + /// @brief create a MessagePack serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_msgpack/ + static void to_msgpack(const basic_json& j, detail::output_adapter o) + { + binary_writer(o).write_msgpack(j); + } + + /// @brief create a UBJSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_ubjson/ + static std::vector to_ubjson(const basic_json& j, + const bool use_size = false, + const bool use_type = false) + { + std::vector result; + to_ubjson(j, result, use_size, use_type); + return result; + } + + /// @brief create a UBJSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_ubjson/ + static void to_ubjson(const basic_json& j, detail::output_adapter o, + const bool use_size = false, const bool use_type = false) + { + binary_writer(o).write_ubjson(j, use_size, use_type); + } + + /// @brief create a UBJSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_ubjson/ + static void to_ubjson(const basic_json& j, detail::output_adapter o, + const bool use_size = false, const bool use_type = false) + { + binary_writer(o).write_ubjson(j, use_size, use_type); + } + + /// @brief create a BSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_bson/ + static std::vector to_bson(const basic_json& j) + { + std::vector result; + to_bson(j, result); + return result; + } + + /// @brief create a BSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_bson/ + static void to_bson(const basic_json& j, detail::output_adapter o) + { + binary_writer(o).write_bson(j); + } + + /// @brief create a BSON serialization of a given JSON value + /// @sa https://json.nlohmann.me/api/basic_json/to_bson/ + static void to_bson(const basic_json& j, detail::output_adapter o) + { + binary_writer(o).write_bson(j); + } + + /// @brief create a JSON value from an input in CBOR format + /// @sa https://json.nlohmann.me/api/basic_json/from_cbor/ + template + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_cbor(InputType&& i, + const bool strict = true, + const bool allow_exceptions = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::forward(i)); + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in CBOR format + /// @sa https://json.nlohmann.me/api/basic_json/from_cbor/ + template + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_cbor(IteratorType first, IteratorType last, + const bool strict = true, + const bool allow_exceptions = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::move(first), std::move(last)); + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); + return res ? result : basic_json(value_t::discarded); + } + + template + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_cbor(ptr, ptr + len)) + static basic_json from_cbor(const T* ptr, std::size_t len, + const bool strict = true, + const bool allow_exceptions = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + return from_cbor(ptr, ptr + len, strict, allow_exceptions, tag_handler); + } + + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_cbor(ptr, ptr + len)) + static basic_json from_cbor(detail::span_input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = i.get(); + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in MessagePack format + /// @sa https://json.nlohmann.me/api/basic_json/from_msgpack/ + template + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_msgpack(InputType&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::forward(i)); + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::msgpack, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in MessagePack format + /// @sa https://json.nlohmann.me/api/basic_json/from_msgpack/ + template + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_msgpack(IteratorType first, IteratorType last, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::move(first), std::move(last)); + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::msgpack, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + template + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_msgpack(ptr, ptr + len)) + static basic_json from_msgpack(const T* ptr, std::size_t len, + const bool strict = true, + const bool allow_exceptions = true) + { + return from_msgpack(ptr, ptr + len, strict, allow_exceptions); + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_msgpack(ptr, ptr + len)) + static basic_json from_msgpack(detail::span_input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = i.get(); + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::msgpack, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in UBJSON format + /// @sa https://json.nlohmann.me/api/basic_json/from_ubjson/ + template + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_ubjson(InputType&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::forward(i)); + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::ubjson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in UBJSON format + /// @sa https://json.nlohmann.me/api/basic_json/from_ubjson/ + template + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_ubjson(IteratorType first, IteratorType last, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::move(first), std::move(last)); + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::ubjson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + template + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_ubjson(ptr, ptr + len)) + static basic_json from_ubjson(const T* ptr, std::size_t len, + const bool strict = true, + const bool allow_exceptions = true) + { + return from_ubjson(ptr, ptr + len, strict, allow_exceptions); + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_ubjson(ptr, ptr + len)) + static basic_json from_ubjson(detail::span_input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = i.get(); + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::ubjson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in BSON format + /// @sa https://json.nlohmann.me/api/basic_json/from_bson/ + template + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_bson(InputType&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::forward(i)); + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::bson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + /// @brief create a JSON value from an input in BSON format + /// @sa https://json.nlohmann.me/api/basic_json/from_bson/ + template + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json from_bson(IteratorType first, IteratorType last, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = detail::input_adapter(std::move(first), std::move(last)); + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::bson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + + template + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_bson(ptr, ptr + len)) + static basic_json from_bson(const T* ptr, std::size_t len, + const bool strict = true, + const bool allow_exceptions = true) + { + return from_bson(ptr, ptr + len, strict, allow_exceptions); + } + + JSON_HEDLEY_WARN_UNUSED_RESULT + JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_bson(ptr, ptr + len)) + static basic_json from_bson(detail::span_input_adapter&& i, + const bool strict = true, + const bool allow_exceptions = true) + { + basic_json result; + detail::json_sax_dom_parser sdp(result, allow_exceptions); + auto ia = i.get(); + // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) + const bool res = binary_reader(std::move(ia)).sax_parse(input_format_t::bson, &sdp, strict); + return res ? result : basic_json(value_t::discarded); + } + /// @} + + ////////////////////////// + // JSON Pointer support // + ////////////////////////// + + /// @name JSON Pointer functions + /// @{ + + /// @brief access specified element via JSON Pointer + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + reference operator[](const json_pointer& ptr) + { + return ptr.get_unchecked(this); + } + + /// @brief access specified element via JSON Pointer + /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ + const_reference operator[](const json_pointer& ptr) const + { + return ptr.get_unchecked(this); + } + + /// @brief access specified element via JSON Pointer + /// @sa https://json.nlohmann.me/api/basic_json/at/ + reference at(const json_pointer& ptr) + { + return ptr.get_checked(this); + } + + /// @brief access specified element via JSON Pointer + /// @sa https://json.nlohmann.me/api/basic_json/at/ + const_reference at(const json_pointer& ptr) const + { + return ptr.get_checked(this); + } + + /// @brief return flattened JSON value + /// @sa https://json.nlohmann.me/api/basic_json/flatten/ + basic_json flatten() const + { + basic_json result(value_t::object); + json_pointer::flatten("", *this, result); + return result; + } + + /// @brief unflatten a previously flattened JSON value + /// @sa https://json.nlohmann.me/api/basic_json/unflatten/ + basic_json unflatten() const + { + return json_pointer::unflatten(*this); + } + + /// @} + + ////////////////////////// + // JSON Patch functions // + ////////////////////////// + + /// @name JSON Patch functions + /// @{ + + /// @brief applies a JSON patch + /// @sa https://json.nlohmann.me/api/basic_json/patch/ + basic_json patch(const basic_json& json_patch) const + { + // make a working copy to apply the patch to + basic_json result = *this; + + // the valid JSON Patch operations + enum class patch_operations {add, remove, replace, move, copy, test, invalid}; + + const auto get_op = [](const std::string & op) + { + if (op == "add") + { + return patch_operations::add; + } + if (op == "remove") + { + return patch_operations::remove; + } + if (op == "replace") + { + return patch_operations::replace; + } + if (op == "move") + { + return patch_operations::move; + } + if (op == "copy") + { + return patch_operations::copy; + } + if (op == "test") + { + return patch_operations::test; + } + + return patch_operations::invalid; + }; + + // wrapper for "add" operation; add value at ptr + const auto operation_add = [&result](json_pointer & ptr, basic_json val) + { + // adding to the root of the target document means replacing it + if (ptr.empty()) + { + result = val; + return; + } + + // make sure the top element of the pointer exists + json_pointer top_pointer = ptr.top(); + if (top_pointer != ptr) + { + result.at(top_pointer); + } + + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.back(); + ptr.pop_back(); + basic_json& parent = result[ptr]; + + switch (parent.m_type) + { + case value_t::null: + case value_t::object: + { + // use operator[] to add value + parent[last_path] = val; + break; + } + + case value_t::array: + { + if (last_path == "-") + { + // special case: append to back + parent.push_back(val); + } + else + { + const auto idx = json_pointer::array_index(last_path); + if (JSON_HEDLEY_UNLIKELY(idx > parent.size())) + { + // avoid undefined behavior + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range", parent)); + } + + // default case: insert add offset + parent.insert(parent.begin() + static_cast(idx), val); + } + break; + } + + // if there exists a parent it cannot be primitive + case value_t::string: // LCOV_EXCL_LINE + case value_t::boolean: // LCOV_EXCL_LINE + case value_t::number_integer: // LCOV_EXCL_LINE + case value_t::number_unsigned: // LCOV_EXCL_LINE + case value_t::number_float: // LCOV_EXCL_LINE + case value_t::binary: // LCOV_EXCL_LINE + case value_t::discarded: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + }; + + // wrapper for "remove" operation; remove value at ptr + const auto operation_remove = [this, &result](json_pointer & ptr) + { + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.back(); + ptr.pop_back(); + basic_json& parent = result.at(ptr); + + // remove child + if (parent.is_object()) + { + // perform range check + auto it = parent.find(last_path); + if (JSON_HEDLEY_LIKELY(it != parent.end())) + { + parent.erase(it); + } + else + { + JSON_THROW(out_of_range::create(403, "key '" + last_path + "' not found", *this)); + } + } + else if (parent.is_array()) + { + // note erase performs range check + parent.erase(json_pointer::array_index(last_path)); + } + }; + + // type check: top level value must be an array + if (JSON_HEDLEY_UNLIKELY(!json_patch.is_array())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects", json_patch)); + } + + // iterate and apply the operations + for (const auto& val : json_patch) + { + // wrapper to get a value for an operation + const auto get_value = [&val](const std::string & op, + const std::string & member, + bool string_type) -> basic_json & + { + // find value + auto it = val.m_value.object->find(member); + + // context-sensitive error message + const auto error_msg = (op == "op") ? "operation" : "operation '" + op + "'"; + + // check if desired value is present + if (JSON_HEDLEY_UNLIKELY(it == val.m_value.object->end())) + { + // NOLINTNEXTLINE(performance-inefficient-string-concatenation) + JSON_THROW(parse_error::create(105, 0, error_msg + " must have member '" + member + "'", val)); + } + + // check if result is of type string + if (JSON_HEDLEY_UNLIKELY(string_type && !it->second.is_string())) + { + // NOLINTNEXTLINE(performance-inefficient-string-concatenation) + JSON_THROW(parse_error::create(105, 0, error_msg + " must have string member '" + member + "'", val)); + } + + // no error: return value + return it->second; + }; + + // type check: every element of the array must be an object + if (JSON_HEDLEY_UNLIKELY(!val.is_object())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects", val)); + } + + // collect mandatory members + const auto op = get_value("op", "op", true).template get(); + const auto path = get_value(op, "path", true).template get(); + json_pointer ptr(path); + + switch (get_op(op)) + { + case patch_operations::add: + { + operation_add(ptr, get_value("add", "value", false)); + break; + } + + case patch_operations::remove: + { + operation_remove(ptr); + break; + } + + case patch_operations::replace: + { + // the "path" location must exist - use at() + result.at(ptr) = get_value("replace", "value", false); + break; + } + + case patch_operations::move: + { + const auto from_path = get_value("move", "from", true).template get(); + json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json v = result.at(from_ptr); + + // The move operation is functionally identical to a + // "remove" operation on the "from" location, followed + // immediately by an "add" operation at the target + // location with the value that was just removed. + operation_remove(from_ptr); + operation_add(ptr, v); + break; + } + + case patch_operations::copy: + { + const auto from_path = get_value("copy", "from", true).template get(); + const json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json v = result.at(from_ptr); + + // The copy is functionally identical to an "add" + // operation at the target location using the value + // specified in the "from" member. + operation_add(ptr, v); + break; + } + + case patch_operations::test: + { + bool success = false; + JSON_TRY + { + // check if "value" matches the one at "path" + // the "path" location must exist - use at() + success = (result.at(ptr) == get_value("test", "value", false)); + } + JSON_INTERNAL_CATCH (out_of_range&) + { + // ignore out of range errors: success remains false + } + + // throw an exception if test fails + if (JSON_HEDLEY_UNLIKELY(!success)) + { + JSON_THROW(other_error::create(501, "unsuccessful: " + val.dump(), val)); + } + + break; + } + + case patch_operations::invalid: + default: + { + // op must be "add", "remove", "replace", "move", "copy", or + // "test" + JSON_THROW(parse_error::create(105, 0, "operation value '" + op + "' is invalid", val)); + } + } + } + + return result; + } + + /// @brief creates a diff as a JSON patch + /// @sa https://json.nlohmann.me/api/basic_json/diff/ + JSON_HEDLEY_WARN_UNUSED_RESULT + static basic_json diff(const basic_json& source, const basic_json& target, + const std::string& path = "") + { + // the patch + basic_json result(value_t::array); + + // if the values are the same, return empty patch + if (source == target) + { + return result; + } + + if (source.type() != target.type()) + { + // different types: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + return result; + } + + switch (source.type()) + { + case value_t::array: + { + // first pass: traverse common elements + std::size_t i = 0; + while (i < source.size() && i < target.size()) + { + // recursive call to compare array values at index i + auto temp_diff = diff(source[i], target[i], path + "/" + std::to_string(i)); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + ++i; + } + + // We now reached the end of at least one array + // in a second pass, traverse the remaining elements + + // remove my remaining elements + const auto end_index = static_cast(result.size()); + while (i < source.size()) + { + // add operations in reverse order to avoid invalid + // indices + result.insert(result.begin() + end_index, object( + { + {"op", "remove"}, + {"path", path + "/" + std::to_string(i)} + })); + ++i; + } + + // add other remaining elements + while (i < target.size()) + { + result.push_back( + { + {"op", "add"}, + {"path", path + "/-"}, + {"value", target[i]} + }); + ++i; + } + + break; + } + + case value_t::object: + { + // first pass: traverse this object's elements + for (auto it = source.cbegin(); it != source.cend(); ++it) + { + // escape the key name to be used in a JSON patch + const auto path_key = path + "/" + detail::escape(it.key()); + + if (target.find(it.key()) != target.end()) + { + // recursive call to compare object values at key it + auto temp_diff = diff(it.value(), target[it.key()], path_key); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + } + else + { + // found a key that is not in o -> remove it + result.push_back(object( + { + {"op", "remove"}, {"path", path_key} + })); + } + } + + // second pass: traverse other object's elements + for (auto it = target.cbegin(); it != target.cend(); ++it) + { + if (source.find(it.key()) == source.end()) + { + // found a key that is not in this -> add it + const auto path_key = path + "/" + detail::escape(it.key()); + result.push_back( + { + {"op", "add"}, {"path", path_key}, + {"value", it.value()} + }); + } + } + + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + // both primitive type: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + break; + } + } + + return result; + } + + /// @} + + //////////////////////////////// + // JSON Merge Patch functions // + //////////////////////////////// + + /// @name JSON Merge Patch functions + /// @{ + + /// @brief applies a JSON Merge Patch + /// @sa https://json.nlohmann.me/api/basic_json/merge_patch/ + void merge_patch(const basic_json& apply_patch) + { + if (apply_patch.is_object()) + { + if (!is_object()) + { + *this = object(); + } + for (auto it = apply_patch.begin(); it != apply_patch.end(); ++it) + { + if (it.value().is_null()) + { + erase(it.key()); + } + else + { + operator[](it.key()).merge_patch(it.value()); + } + } + } + else + { + *this = apply_patch; + } + } + + /// @} +}; + +/// @brief user-defined to_string function for JSON values +/// @sa https://json.nlohmann.me/api/basic_json/to_string/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +std::string to_string(const NLOHMANN_BASIC_JSON_TPL& j) +{ + return j.dump(); +} + +} // namespace nlohmann + +/////////////////////// +// nonmember support // +/////////////////////// + +namespace std // NOLINT(cert-dcl58-cpp) +{ + +/// @brief hash value for JSON objects +/// @sa https://json.nlohmann.me/api/basic_json/std_hash/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct hash +{ + std::size_t operator()(const nlohmann::NLOHMANN_BASIC_JSON_TPL& j) const + { + return nlohmann::detail::hash(j); + } +}; + +// specialization for std::less +template<> +struct less< ::nlohmann::detail::value_t> // do not remove the space after '<', see https://github.com/nlohmann/json/pull/679 +{ + /*! + @brief compare two value_t enum values + @since version 3.0.0 + */ + bool operator()(nlohmann::detail::value_t lhs, + nlohmann::detail::value_t rhs) const noexcept + { + return nlohmann::detail::operator<(lhs, rhs); + } +}; + +// C++20 prohibit function specialization in the std namespace. +#ifndef JSON_HAS_CPP_20 + +/// @brief exchanges the values of two JSON objects +/// @sa https://json.nlohmann.me/api/basic_json/std_swap/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC_JSON_TPL& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name) + is_nothrow_move_constructible::value&& // NOLINT(misc-redundant-expression) + is_nothrow_move_assignable::value) +{ + j1.swap(j2); +} + +#endif + +} // namespace std + +/// @brief user-defined string literal for JSON values +/// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json/ +JSON_HEDLEY_NON_NULL(1) +inline nlohmann::json operator "" _json(const char* s, std::size_t n) +{ + return nlohmann::json::parse(s, s + n); +} + +/// @brief user-defined string literal for JSON pointer +/// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json_pointer/ +JSON_HEDLEY_NON_NULL(1) +inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) +{ + return nlohmann::json::json_pointer(std::string(s, n)); +} + +// #include + + +// restore clang diagnostic settings +#if defined(__clang__) + #pragma clang diagnostic pop +#endif + +// clean up +#undef JSON_ASSERT +#undef JSON_INTERNAL_CATCH +#undef JSON_CATCH +#undef JSON_THROW +#undef JSON_TRY +#undef JSON_PRIVATE_UNLESS_TESTED +#undef JSON_HAS_CPP_11 +#undef JSON_HAS_CPP_14 +#undef JSON_HAS_CPP_17 +#undef JSON_HAS_CPP_20 +#undef JSON_HAS_FILESYSTEM +#undef JSON_HAS_EXPERIMENTAL_FILESYSTEM +#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION +#undef NLOHMANN_BASIC_JSON_TPL +#undef JSON_EXPLICIT +#undef NLOHMANN_CAN_CALL_STD_FUNC_IMPL + +// #include + + +#undef JSON_HEDLEY_ALWAYS_INLINE +#undef JSON_HEDLEY_ARM_VERSION +#undef JSON_HEDLEY_ARM_VERSION_CHECK +#undef JSON_HEDLEY_ARRAY_PARAM +#undef JSON_HEDLEY_ASSUME +#undef JSON_HEDLEY_BEGIN_C_DECLS +#undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE +#undef JSON_HEDLEY_CLANG_HAS_BUILTIN +#undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE +#undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE +#undef JSON_HEDLEY_CLANG_HAS_EXTENSION +#undef JSON_HEDLEY_CLANG_HAS_FEATURE +#undef JSON_HEDLEY_CLANG_HAS_WARNING +#undef JSON_HEDLEY_COMPCERT_VERSION +#undef JSON_HEDLEY_COMPCERT_VERSION_CHECK +#undef JSON_HEDLEY_CONCAT +#undef JSON_HEDLEY_CONCAT3 +#undef JSON_HEDLEY_CONCAT3_EX +#undef JSON_HEDLEY_CONCAT_EX +#undef JSON_HEDLEY_CONST +#undef JSON_HEDLEY_CONSTEXPR +#undef JSON_HEDLEY_CONST_CAST +#undef JSON_HEDLEY_CPP_CAST +#undef JSON_HEDLEY_CRAY_VERSION +#undef JSON_HEDLEY_CRAY_VERSION_CHECK +#undef JSON_HEDLEY_C_DECL +#undef JSON_HEDLEY_DEPRECATED +#undef JSON_HEDLEY_DEPRECATED_FOR +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#undef JSON_HEDLEY_DIAGNOSTIC_POP +#undef JSON_HEDLEY_DIAGNOSTIC_PUSH +#undef JSON_HEDLEY_DMC_VERSION +#undef JSON_HEDLEY_DMC_VERSION_CHECK +#undef JSON_HEDLEY_EMPTY_BASES +#undef JSON_HEDLEY_EMSCRIPTEN_VERSION +#undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK +#undef JSON_HEDLEY_END_C_DECLS +#undef JSON_HEDLEY_FLAGS +#undef JSON_HEDLEY_FLAGS_CAST +#undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE +#undef JSON_HEDLEY_GCC_HAS_BUILTIN +#undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE +#undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE +#undef JSON_HEDLEY_GCC_HAS_EXTENSION +#undef JSON_HEDLEY_GCC_HAS_FEATURE +#undef JSON_HEDLEY_GCC_HAS_WARNING +#undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK +#undef JSON_HEDLEY_GCC_VERSION +#undef JSON_HEDLEY_GCC_VERSION_CHECK +#undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE +#undef JSON_HEDLEY_GNUC_HAS_BUILTIN +#undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE +#undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE +#undef JSON_HEDLEY_GNUC_HAS_EXTENSION +#undef JSON_HEDLEY_GNUC_HAS_FEATURE +#undef JSON_HEDLEY_GNUC_HAS_WARNING +#undef JSON_HEDLEY_GNUC_VERSION +#undef JSON_HEDLEY_GNUC_VERSION_CHECK +#undef JSON_HEDLEY_HAS_ATTRIBUTE +#undef JSON_HEDLEY_HAS_BUILTIN +#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE +#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS +#undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE +#undef JSON_HEDLEY_HAS_EXTENSION +#undef JSON_HEDLEY_HAS_FEATURE +#undef JSON_HEDLEY_HAS_WARNING +#undef JSON_HEDLEY_IAR_VERSION +#undef JSON_HEDLEY_IAR_VERSION_CHECK +#undef JSON_HEDLEY_IBM_VERSION +#undef JSON_HEDLEY_IBM_VERSION_CHECK +#undef JSON_HEDLEY_IMPORT +#undef JSON_HEDLEY_INLINE +#undef JSON_HEDLEY_INTEL_CL_VERSION +#undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK +#undef JSON_HEDLEY_INTEL_VERSION +#undef JSON_HEDLEY_INTEL_VERSION_CHECK +#undef JSON_HEDLEY_IS_CONSTANT +#undef JSON_HEDLEY_IS_CONSTEXPR_ +#undef JSON_HEDLEY_LIKELY +#undef JSON_HEDLEY_MALLOC +#undef JSON_HEDLEY_MCST_LCC_VERSION +#undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK +#undef JSON_HEDLEY_MESSAGE +#undef JSON_HEDLEY_MSVC_VERSION +#undef JSON_HEDLEY_MSVC_VERSION_CHECK +#undef JSON_HEDLEY_NEVER_INLINE +#undef JSON_HEDLEY_NON_NULL +#undef JSON_HEDLEY_NO_ESCAPE +#undef JSON_HEDLEY_NO_RETURN +#undef JSON_HEDLEY_NO_THROW +#undef JSON_HEDLEY_NULL +#undef JSON_HEDLEY_PELLES_VERSION +#undef JSON_HEDLEY_PELLES_VERSION_CHECK +#undef JSON_HEDLEY_PGI_VERSION +#undef JSON_HEDLEY_PGI_VERSION_CHECK +#undef JSON_HEDLEY_PREDICT +#undef JSON_HEDLEY_PRINTF_FORMAT +#undef JSON_HEDLEY_PRIVATE +#undef JSON_HEDLEY_PUBLIC +#undef JSON_HEDLEY_PURE +#undef JSON_HEDLEY_REINTERPRET_CAST +#undef JSON_HEDLEY_REQUIRE +#undef JSON_HEDLEY_REQUIRE_CONSTEXPR +#undef JSON_HEDLEY_REQUIRE_MSG +#undef JSON_HEDLEY_RESTRICT +#undef JSON_HEDLEY_RETURNS_NON_NULL +#undef JSON_HEDLEY_SENTINEL +#undef JSON_HEDLEY_STATIC_ASSERT +#undef JSON_HEDLEY_STATIC_CAST +#undef JSON_HEDLEY_STRINGIFY +#undef JSON_HEDLEY_STRINGIFY_EX +#undef JSON_HEDLEY_SUNPRO_VERSION +#undef JSON_HEDLEY_SUNPRO_VERSION_CHECK +#undef JSON_HEDLEY_TINYC_VERSION +#undef JSON_HEDLEY_TINYC_VERSION_CHECK +#undef JSON_HEDLEY_TI_ARMCL_VERSION +#undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK +#undef JSON_HEDLEY_TI_CL2000_VERSION +#undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK +#undef JSON_HEDLEY_TI_CL430_VERSION +#undef JSON_HEDLEY_TI_CL430_VERSION_CHECK +#undef JSON_HEDLEY_TI_CL6X_VERSION +#undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK +#undef JSON_HEDLEY_TI_CL7X_VERSION +#undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK +#undef JSON_HEDLEY_TI_CLPRU_VERSION +#undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK +#undef JSON_HEDLEY_TI_VERSION +#undef JSON_HEDLEY_TI_VERSION_CHECK +#undef JSON_HEDLEY_UNAVAILABLE +#undef JSON_HEDLEY_UNLIKELY +#undef JSON_HEDLEY_UNPREDICTABLE +#undef JSON_HEDLEY_UNREACHABLE +#undef JSON_HEDLEY_UNREACHABLE_RETURN +#undef JSON_HEDLEY_VERSION +#undef JSON_HEDLEY_VERSION_DECODE_MAJOR +#undef JSON_HEDLEY_VERSION_DECODE_MINOR +#undef JSON_HEDLEY_VERSION_DECODE_REVISION +#undef JSON_HEDLEY_VERSION_ENCODE +#undef JSON_HEDLEY_WARNING +#undef JSON_HEDLEY_WARN_UNUSED_RESULT +#undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG +#undef JSON_HEDLEY_FALL_THROUGH + + + +#endif // INCLUDE_NLOHMANN_JSON_HPP_ diff --git a/lib/srell3_009/history_en.txt b/lib/srell3_009/history_en.txt new file mode 100644 index 000000000..edc391c4b --- /dev/null +++ b/lib/srell3_009/history_en.txt @@ -0,0 +1,484 @@ +20220511; version 3.009: + * Fixed an optimisation bug that caused /abcd|ab/ not to match "abc". + +20220504; version 3.008: + * Fixed the behaviour of [^\P{...}] when the icase flag is set, as it + behaved similarly to the one in v-mode that has been proposed in + TC39. + +20220429; version 3.007: + * Further modification to the counter mechanism. + +20220428; version 3.006: + * Modified the mechanism of the counter used for repetition. + * Re-removed the implementation of linear search for small character + classes. + +20220424; version 3.005: + * Fixed a bug that caused /(?<=$.*)/ not to match the end of "a" when + the multiline flag is set + * Preparations for \A, \z, (?m:) that have been proposed in TC39. + +20220420; version 3.004: + * Added a new optimisation for /A*B/ and /A+B/ where a character class + A overlaps a character or character class B, such as /[A-Za-z]+ing/, + /".*"/. + +20220416; version 3.003: + * Combined two optimisation functions into one. + * Reduced the amount of code for lookaround (lookahead and lookbehind) + assertions. + +20220416; version 3.002: + * Fixed a bug that caused regex_match or regex_search with the + match_continuous flag being set to fail when the entry point + selector introduced in version 3.000 was used internally. + +20211025; version 3.001: + * Removed the code for splitting counter as it seemed to be no effect + or to make performance a bit worse. + * Fixed potential bugs. + * Minor improvements. + +20211023; version 3.000: + * Updated srell_ucfdata2.hpp and srell_updata.hpp to support Unicode + 14.0.0. + * Updated unicode/updataout.cpp to support Unicode 14. (Support in + advance new script names that are expected to be available in RegExp + of ECMAScript 2022). + * Changed the type used to store a Unicode value when char32_t is not + available, from an "unsigned integer type with width of at least 21 + bits" to a "one of at least 32 bits". + * Changed the type used to store a repetition count or character class + number when char32_t is not available, from "unsigned int" to + "unsigned integer type of at least 32-bit width". + * Added overflow check in the function that translates digits into a + numeric value. For example, while up to the previous version + /a{0,4294967297}/ was treated as /a{0,1}/ because of overflow when + the unsigned int type is 32-bit width, SRELL now throws error_brace + in cases like this. + * Fixed a bug that caused /[^;]*^;?/ not to match the beginning of an + input string when the multiline flag is not set. + * Implemented a very simple and limited entry point selector. + +20211004; version 2.930: + * Added new typedefs whose prefix is u1632w- and support UTF-16 or + UTF-32 depending on the value of WCHAR_MAX. (When 0xFFFF <= + WCHAR_MAX < 0x10FFFF, u1632w- types are aliases of u16w- types. + When 0x10FFFF <= WCHAR_MAX, u1632w- types are aliases of u32w- + types). + * Reduced the amount of memory used for Eytzinger layout search. + * Various improvements. (Some of them are based on suggestions to NIRE + by Marko Njezic). + +20210624; version 2.920: + * Added a new optimisation for the quantifier '?' (I.e., {0,1}). + * Changed the version number of the ECMAScript specification + referenced in misc/sample01.cpp to 2021. + +20210429; version 2.912: + * Fixed another bug in the optimisation introduced in version 2.900, + which caused /aa|a|aa/ not to match "a" (Thanks to Jan Schrötter for + the report). + Incidentally, this optimisation can be disabled by defining + SRELLDBG_NO_BRANCH_OPT2 prior to including srell.hpp. + +20210424; version 2.911: + * Fixed a bug in the optimisation introduced in version 2.900, which + caused /abc|ab|ac/ not to match "ac". (Thanks for the bug report [As + my email to the reporter was rejected by the email server and + returned, it is unclear whether mentioning the name here is okay + with the reporter. So, I refrain]). + +20210407; version 2.910: + * Fixed a potential memory leak in move assignment operators used by + the pattern compiler since 2.900. (Thanks to Michal Švec for the + report). + +20210214; version 2.901: + * Removed redundant template specialisations. + +20210214; version 2.900: + * Added a new optimisation for the alternative expression that consist + of string literals, such as /abc|abd|acde/. + * Fixed the problem that brought u(8|16)[cs]regex_(token_)?iterator + (i.e., regex (token) iterators specialised for char8_t or char16_t) + to a compile error. + * Minor improvements. + +20210131; version 2.810: + * Improved internal UTF-8 iterators. + +20200724; version 2.800: + * Introduced the Eytzinger layout for binary search in the character + class. + * Reimplemented linear search for small character classes. + * Modified handling of the property data used for parsing the name for + a named capturing group. Now they are loaded only when needed + instead of being loaded into an instance of basic_regex always. + +20200714; version 2.730: + * Added code to prevent redundant save and restore operations when + nested capturing round brackets are processed. + * Improved regex_iterator. + +20200703; version 2.720: + * Improved case-insensitive (icase) search using the + Boyer-Moore-Horspool algorithm for UTF-8 string that includes + non-ASCII characters or UTF-16 string that includes non-BMP + characters. + * Fixed a bug that caused regex_iterator->prefix().first to point to + the beginning of the subject string instead of the end of the + previous match (regression introduced in version 2.650, when + three-iterators overloads were added to regex_search()). + * In accordance with the fix above, when a three-iterators version of + regex_search() is called, now match_results.position() returns a + distance from the position passed to as the lookbehind limit (3rd + param of regex_search) and match_results.prefix().first points to + the position passed to as the beginning of the subject string (1st + param of regex_search). + * Fixed a bug that could cause a valid UTF-8 sequence being adjacent + to an invalid UTF-8 sequence to be skipped when the BMH algorithm + was used (regression introduced in version 2.630, when UTF-8 + handling was modified). + +20200701; version 2.710: + * Minor modifications to Boyer-Moore-Horspool search. + +20200630; version 2.700: + * Optimisation adjustments. + +20200620: version 2.651: + * Move the group name validity check to after parsing the \u escape. + * Updated misc/sample01.cpp to version 1.103. Changed the version + number of the ECMAScript specification referenced by to 2020 (ES11). + +20200618: version 2.650: + * To element access functions in match_results, added overload + functions for specifying the group name by a pointer. + * When a three-iterators version of regex_search() is used, SRELL now + sets match_results::prefix::first to the position passed to as the + lookbehind limit (third param) instead of the position passed to as + the beginning of the subject (first param). + * Removed some operations that seem to be redundant. + +20200601: version 2.643: + * Added "inline" to operators in syntax_option_type and + match_flag_type types, based on a report that it is needed not to + cause the multiple definition error. + * Minor improvements. + +20200530: version 2.642: + * Reduced the size of memory allocated by the basic_regex instance. + +20200528: version 2.641: + * The fix in 2.640 was incomplete. Fixed the optimisation bug 1 again. + * Optimisation adjustments. + +20200516: version 2.640: + * Fixed an optimisation bug 1: It was possible for regex_match to pass + the end of a subject string under certain conditions. + * Fixed an optimisation bug 2: ^ and $ were not given a chance to + match an appropriate position in some cases when the multiline flag + is set to true. + * Updated srell_ucfdata2.hpp and srell_updata.hpp. + +20200509: version 2.630: + * SRELL's pattern compiler no longer permits invalid UTF-8 sequences + in regular expressions. It throws regex_utf8. (Invalid UTF-8 + sequences in the subject string are not treated as an error.) + * Fixed BMH search functions not to include extra (invalid) UTF-8 + trailing bytes following the real matched substring, in a returned + result. + * Fixed minor issues: 1) basic_regex.flags() did not return the + correct value in some cases, 2) match_results.format() did not + replace $ with an empty string when any capturing group whose + name is NAME did not exist. + +20200502: version 2.620: + * Removed methods used for match_continuous and regex_match in the + class for the Boyer-Moore-Horspool algorithm. Now SRELL always uses + the automaton like earlier versions when they are processed. + * Some clean-ups. + +20200428: version 2.611: + * Fixed a bug that caused /\d*/ not to match the head of "abc" but to + match the end of it. (regression introduced in version 2.210.) + +20200426: version 2.610: + * Fixed a bug that caused case-insensitive (icase) BMH search to skip + a matched sequence at the beginning of the entire text, when 1) + search is done against UTF-8 or UTF-16 text, and 2) the searched + pattern ends with a character that consists of multiple code units + in that encoding. + * Now SRELL parses a capturing group name according to the ECMA + specification and strictly checks its validity. Group names like + /(?<,>...)/ cause regex_error. + +20200418: version 2.600: + * To pass to regex_search() directly the limit of a sequence until + where the automaton can lookbehind, added three-iterators versions + of regex_search(). + * [Breaking Change] Removed the match_lblim_avail flag from + match_flag_type and the lookbehind_limit member from match_results + which were added in version 2.300. + * Updated srell_ucfdata2.hpp and srell_updata.hpp to support Unicode + 13.0.0. + * Updated unicode/updataout.cpp to support Unicode 13. (Support in + advance new script names that will be available in RegExp of + ECMAScript 2020). + +20191118: version 2.500: + * Modified basic_regex to hold precomputed tables for icase matching, + instead of creating them from case folding data when its instance is + first created. + * In accordance with the change above, srell_ucfdata.hpp and + ucfdataout.cpp that outputs the former were replaced with + srell_ucfdata2.hpp that holds precomputed tables and ucfdataout2.cpp + that outputs the former. + * Changed the method of character class matching from linear search to + binary search. + * Changed the timing of optimisation of a character class from "when a + closing bracket ']' is found" to "every time a character or + character range is pushed to its character class array". + * Removed all asserts. + * Modified the pattern compiler to interpret sequential \uHHHH escapes + as a Unicode code point value if they represent a valid surrogate + pair. (By this change, incompatibilities with the ECMAScript + specification disappeared.) + * Fixed the position of an endif directive that caused a compiler + error when -DSRELL_NO_NAMEDCAPTURE is specified. + * Updated updataout.cpp to version 1.101. + * Added a standalone version of SRELL in the single-header directory. + +20190914: version 2.401: + * Reduced the size of basic_regex. (It was bloated by my carelessness + when support for Unicode property escapes was added). + * Improved basic_regex::swap(). + +20190907: version 2.400: + * Improved the performance of character class matching. + * Modified the pattern compiler to interpret the \u escape sequence in + the group name in accordance with the ECMAScript specification. + * Updated ucfdataout.cpp to version 1.200. A new member has been added + to the unicode_casefolding class in srell_ucfdata.hpp that + ucfdataout.cpp generates. + Because SRELL 2.400 and later need this added member, they cannot be + used with srell_ucfdata.hpp output by ucfdataout.cpp version 1.101 + or earlier. (No problem in using an older version of SRELL with a + newer version of srell_ucfdata.hpp). + * Some clean-ups and improvements. + +20190902: version 2.304: + * Fixed regex_iterator that had been broken by the code clean-up in + version 2.303. + +20190810: version 2.303: + * Refixed the problem that was fixed in version 2.302 as the fix was + incomplete. + * Cleaned up code. + +20190809: version 2.302: + * Bug fix: When (?...) has a quantifier, strings captured by round + brackets inside it were not cleared in each repetition but carried + over to the next loop. For example, + /(?:(ab)|(cd))+/.exec("abcd") returned ["abcd", "ab", "cd"], instead + of ["abcd", undefined, "cd"]. (The latter is correct). + * Updated misc/sample01.cpp to version 1.102. Rewrote the chapter + numbers in accordance with ECMAScript 2019 (ES10). + +20190724: version 2.301: + * In accordance with the ECMAScript spec, restricted the characters + which can be escaped by '\', to the following fifteen characters: + ^$\.*+?()[]{}|/ + Only in the character class, i.e., inside [], '-' also becomes a + member of the group. + +20190717: version 2.300: + * Added a feature for specifying the limit until where the automaton + can lookbehind, separated from the beginning of a target sequence. + (Addition of the match_lblim_avail flag to match_flag_type and the + lookbehind_limit member to match_results). + And, lookbehind_limit of match_results being private and used + internally in regex_iterator is also set in its constructor. + * Removed order restriction of capturing parentheses and + backreferences, in accordance with the ECMAScript spec. Now /\1(.)/, + /(?<=(.)\1)/, and /\k(?.)/ are all okay. + * Updated misc/sample01.cpp to version 1.101. Added one compliance + test from misc.js. + +20190714: version 2.230: + * Improved the performance of searching when regular expressions begin + with a character or character class followed by a '*' or '+'. (E.g., + /[A-Za-z]+ing/). + +20190707: version 2.221: + * Changed the feature test macro used for checking availability of + std::u8string, from __cpp_char8_t to __cpp_lib_char8_t. + * When icase specified, if all characters in a character class become + the same character as a result of case-folding, the pattern compiler + has been changed to convert the character class to the character + literal (e.g., /r[Ss\u017F]t/i -> /rst/i). + * Fixed a minor issue. + +20190617: version 2.220: + * Changed the internal representation of repetition in the case that + it becomes more compact by not using the counter. + * Fixed an optimisation bug that caused searching for /a{1,2}?b/ + against "aab" to return "ab" instead of "aab". (Condition: a + character or character class with a non-greedy quantifier is + followed by its exclusive character or character class). + +20190613: version 2.210: + * Improved a method of matching for expressions like /ab|cd|ef/ (where + string literals separaterd by '|' begin with a character exclusive + to each other). + +20190603: version 2.202: + * Fixed a bug that caused regex_match to behave like regex_search in + the situation where the BMH algorithm is used. + +20190531: version 2.200: + * For searching with a ordinary (non-regex) string, added an + implementation based on the Boyer-Moore-Horspool algorithm. + * Improved UTF-8 iterators. + * Fixed behaviours of \b and \B when icase specified, to match /.\B./i + against "s\u017F". + * Fixed minor issues. + +20190508: version 2.100: + * Fixed a bug that caused failure of capturing when 1) a pair of + capturing brackets exists in a lookbehind assertion, and 2) variable + length expressions exist in both the left side of and the inside of + the pair of brackets. E.g., given "1053" =~ /(?<=(\d+)(\d+))$/, no + appropriate string was set for $2. + * Updated srell_ucfdata.hpp and srell_updata.hpp to support Unicode + 12.1.0. + * Updated unicode/updataout.cpp to support Unicode 12. (Support in + advance a new binary property and new script names that will be + available in RegExp of ECMAScript 2019 and new script names that are + anticipated to be available in RegExp of ECMAScript 2020). + * Changed the newline character in srell.hpp from CR+LF to LF. + * Modified unicode/*.cpp to output LF as a newline instead of CR+LF. + * Updated misc/sample01.cpp to version 1.100: + 1. Rewrote the chapter numbers in subtitles of compliance tests, in + accordance with ECMAScript 2018 Language Specification (ES9). + (The old chapter numbers were based on ECMAScript specifications + up to version 5.1). + 2. Added one compliance test from ECMAScript 2018 Language + Specification 21.2.2.3, NOTE. + * Modified the macros for detecting C++11 features. + * Changed the method of the character class. + * For all the constructors and assign functions of basic_regex to have + a default argument for flag_type, reimplemented syntax_option_type + and match_flag_type (missed changes between TR1 -> C++11). + * Experimental support for the char8_t type. If a compiler supports + char8_t (detected by the __cpp_char8_t macro), classes whose names + have the "u8-" prefix accept a sequence of char8_t and handle it as + a UTF-8 string. If char8_t is not supported, the classes handle a + sequence of char as a UTF-8 string, as before. + * As classes that always handle a sequence of char as a UTF-8 string, + new classes whose names have the "u8c-" prefix were added. They + correspond to the classes having the "u8-" prefix in their names up + to version 2.002: + * u8cregex; u8ccmatch, u8csmatch; u8ccsub_match, u8cssub_match; + u8ccregex_iterator, u8csregex_iterator; u8ccregex_token_iterator, + u8csregex_token_iterator. + +20180717: version 2.002: + * Changed the maximum number of hexdigits in \u{h...} from six to + 'unlimited' in accordance with the ECMAScript specification. ("one + to six hexadecimal digits" of the old implementation was based on + the proposal document). + * Updated updataout.cpp to version 1.001. Encounting unknown + (newly-encoded) script names is no longer treated as an error. + * Updated srell_ucfdata.hpp and srell_updata.hpp to support Unicode + 11.0.0. + +20180204: version 2.001: + * When icase is specified, [\W] (a character class containing \W) no + longer matches any of [KkSs\u017F\u212A] (ecma262 issue #512). + +20180127: version 2.000: + * Added the following features that are to be included into RegExp of + ECMAScript 2018: + * New syntax option flag for '.' to match every code point, dotall, + was added to srell::regex_constants as a value of + syntax_option_type and to srell::basic_regex as a value of + flag_type. + * New expressions to support the Unicode property, \p{...} and + \P{...}. + * Named capture groups (?...) and the new expression for + backreference to a named capture group, \k. + * The behaviors of lookbehind assertions changed. Now both (?<=...) + and (?" to compile() in basic_regex::assign(). + 2. Implemented operator=() functions explicitly instead of using + default ones generated automatically. + * unicode/ucfdataout.cpp revised and updated to version 1.001. + +20140622; version 1.101: + Updated srell_ucfdata.hpp to support Unicode 7.0.0. + +20121118; version 1.100: + The first released version. + diff --git a/lib/srell3_009/history_ja.txt b/lib/srell3_009/history_ja.txt new file mode 100644 index 000000000..1267b42af --- /dev/null +++ b/lib/srell3_009/history_ja.txt @@ -0,0 +1,421 @@ +20220511; version 3.009: + ・最適化バグにより /abcd|ab/ が "abc" にマッチしなかった問題を修正。 + +20220504; version 3.008: + ・icase指定時の[^\P{...}]の振る舞いが、TC39で提案中のv-modeのそれに近 + いものになっていた問題を修正。 + +20220429; version 3.007: + ・カウンタの仕組みをさらに変更。 + +20220428; version 3.006: + ・繰り返し処理用のカウンタを調整。 + ・小さな文字クラス用の線形探索を再削除。 + +20220424; version 3.005: + ・multiline指定時に /(?<=$.*)/ が "a" の終わりにマッチしなかった問題を + 修正。 + ・TC39で提案中の\A, \z, (?m:)の準備。 + +20220420; version 3.004: + ・'*' または '+' 付きの文字クラスが後続する文字または文字クラスと排他 + 的になっていない表現用の最適化処理を追加。例:/[A-Za-z]+ing/, + /".*"/ など。 + +20220416; version 3.003: + ・2つの最適化函数を1つに統合。 + ・先読み (lookahead)・戻り読み (lookbehind) 用のコード量を削減。 + +20220416; version 3.002: + ・3.000で導入した簡易エントリーポイント選択の使用時に、regex_matchや + match_continuousフラグが指定されたregex_searchが機能しない場合があっ + た問題を修正。 + +20211025; version 3.001: + ・カウンタ分割を廃止。効果がないかむしろ若干速度が低下しているように見 + えるため。 + ・潜在的なバグを修正。 + ・その他細かな改良など。 + +20211023; version 3.000: + ・srell_ucfdata2.hppとsrell_updata.hppとをUnicode 14.0.0対応に更新。 + ・unicode/updataout.cppをUnicode 14対応に更新(ECMAScript 2022で対応さ + れる見込みのスクリプト名の先行対応)。 + ・char32_t未対応のコンパイラでUnicode値を保持するため内部で使用する型 + を「21ビット以上あるunsigned整数型」から「32ビット以上あるunsigned整 + 数型」に変更。 + ・char32_t未対応のコンパイラで繰り返し回数や文字クラス番号を保持するの + に使う型を「unsigned int」から「32ビット以上あるunsigned整数型」に変 + 更。 + ・数値用パーザにoverflowチェックを追加。例:unsigned int型が32ビットの + 幅の時、前の版まで /a{0,4294967297}/ は /a{0,1}/ 相当になってしまっ + ていましたが、前記のチェックを入れたことによりこのような場合には + error_braceがthrowされるようになっています。 + ・非multilineモード時に /[^;]*^;?/ が入力文字列の先頭にマッチしなかっ + たバグを修正。 + ・ごく簡易なエントリーポイント選択を実装。 + +20211004; version 2.930: + ・WCHAR_MAXの値に基づいてUTF-16/UTF-32対応が切り替わるu1632w-型を新規 + に追加(WCHAR_MAXが0xFFFF以上・0x10FFFF未満ならu1632w-型はu16w-型の + 別名となり、WCHAR_MAXが0x10FFFF以上ならu1632w-型はu32w-型の別名とな + ります)。 + ・Eytzinger layout検索時に使われるメモリ使用量を削減。 + ・その他細かな改良など(いくつかはNIREに対するMarko Njezic氏の改善案に + 基づきます)。 + +20210624; version 2.920: + ・?({0,1}相当)用の最適化処理を追加。 + ・misc/sample01.cpp内で参照しているECMAScript仕様書の版を2021に変更。 + +20210429; version 2.912: + ・2.900で導入した最適化処理のバグにより /aa|a|aa/ が "a" にマッチしな + くなっていた問題を修正(報告してくださったJan Schrötter氏に感謝しま + す)。 + ちなみにこの最適化処理は、srell.hppをincludeする前に + SRELLDBG_NO_BRANCH_OPT2マクロを定義しておくと無効化できます。 + +20210424; version 2.911: + ・2.900で導入した最適化処理内の不用意な行削除が原因で、/abc|ab|ac/ が + "ac" に対してマッチしなくなっていた問題を修正(バグ報告に感謝します)。 + +20210407; version 2.910: + ・2.900以降、パターンコンパイラ内部でmove代入演算子が使われる時にメモ + リリークしていた問題を修正(報告してくださったMichal Švec氏に感謝し + ます)。 + +20210214; version 2.901: + ・不要なテンプレートの特殊化を削除。 + +20210214; version 2.900: + ・文字列のみからなる選択(例:/abc|abd|acde/)用の最適化処理を新規に追 + 加。 + ・u(8|16)[cs]regex_(token_)?iteratorがコンパイルエラーとなり使用できな + かった問題を修正。 + ・その他細かな改良など。 + +20210131; version 2.810: + ・UTF-8用内部iteratorの改良。 + +20200724; version 2.800: + ・文字クラスの二分探索にEytzinger layoutを導入。 + ・小さな文字クラス用に線形探索を再実装。 + ・名前付き括弧の名前部分をパーズするためのプロパティーデータの扱いを変 + 更。basic_regex型インスタンス内に読み込むのを止めて、必要な時のみ読 + み込むように。 + +20200714; version 2.730: + ・入れ子になった捕獲括弧で冗長な退避・復元処理をせぬように変更。 + ・regex_iteratorの改良。 + +20200703; version 2.720: + ・非ASCII文字を含むUTF-8文字列または非BMPの文字を含むUTF-16文字列を、 + Boyer-Moore-Horspoolアルゴリズムを用いて、大文字小文字の区別無しで + (icase/case-insensitiveで) 検索する場合の処理の改良。 + ・Version 2.650での変更により、regex_iterator->prefix().firstが前回マ + ッチした位置の終端ではなく文字列全体の最初を指すようにになってしまっ + ていたのを修正。 + ・上記修正に合わせて3イテレータ版のregex_search()が呼ばれる場合、 + match_results.position()は戻り読みの逆行限界として渡された位置 + (regex_searchの第3引数)を起点とした位置を返し、 + match_results.prefix().firstは検索開始位置(同第1引数)を指すように + 変更。 + ・BMH検索時に、不正なUTF-8シークウェンスの前後にある有効なシークウェン + スが読み飛ばされてしまう問題を修正(2.630でUTF-8の処理方法を変えた時 + に混入したバグ)。 + +20200701; version 2.710: + ・Boyer-Moore-Horspool検索の調整。 + +20200630; version 2.700: + ・最適化処理の調整。 + +20200620: version 2.651: + ・グループ名のチェックを行う位置を\uエスケープの解釈後に移動。 + ・misc/sample01.cppをversion 1.103に更新。参照しているECMAScript仕様書 + の版を2020(ES11)に変更。 + +20200618: version 2.650: + ・名前付き括弧に捕獲された文字列へのアクセス用函数に、グループ名をポイ + ンタで指定するoverloadをmatch_resultsに追加。 + ・3イテレータ版のregex_search()使用時には、検索の開始位置ではなく戻り + 読み (lookbehind) の逆行限界として渡された位置のほうを + match_results::prefix::firstにセットするよう変更。 + ・不要と思われる処理をいくつか削除。 + +20200601: version 2.643: + ・syntax_option_typeおよびmatch_flag_typeのoperator函数にinline指定を + 追加(これがないとリンク時に多重定義エラーが出ることがあるとのご指摘 + がありました)。 + ・その他細かな改良など。 + +20200530: version 2.642: + ・basic_regex型インスタンスが確保するメモリのサイズを削減。 + +20200528: version 2.641: + ・2.640での修正1が不完全であったため再修正。 + ・最適化処理の調整。 + +20200516: version 2.640: + ・最適化バグの修正1: regex_matchが入力文字列の終端を通り過ぎてしまうこ + とがあった問題を修正。 + ・最適化バグの修正2: multilineフラグ指定時に ^ や $ が適切な位置でのマ + ッチングをさせてもらえなくなってしまっていた問題を修正。 + ・srell_ucfdata2.hppとsrell_updata.hppとを更新。 + +20200509: version 2.630: + ・正規表現中に不正なUTF-8のシークウェンスがあった場合、パターンコンパ + イラがregex_utf8をthrowするように仕様変更(検索対象文字列中に不正な + UTF-8の並びがあってもエラー扱いされません)。 + ・UTF-8でBMH検索が行われる際、マッチした箇所の直後に余分な後続 + (trailing) バイトが続いていた場合にその部分もマッチング結果に含めて + しまう問題を修正。 + ・basic_regex.flags() が正しい値を返さないことがあったのを修正。 + ・正規表現中で実際には使われていないグループ名 (NAME) を + match_results.format()に渡す書式文字列の中で$のようにして指定 + すると、その部分が空文字に置換されずそのまま残ってしまう問題を修正。 + +20200502: version 2.620: + ・Boyer-Moore-Horspoolアルゴリズム用クラスからmatch_continuous指定時用 + およびregex_match用の函数を削除。これらの処理時は以前のようにオート + マトンを使うように変更。 + ・その他クリーンナップ。 + +20200428: version 2.611: + ・/\d*/ が "abc" の冒頭にマッチせず末尾にマッチする問題を修正(Version + 2.210で混入したバグ)。 + +20200426: version 2.610: + ・Case-insensitive (icase) なBMH検索が行われる際、探している文字列が検 + 索対象テキスト全体の先頭にあった場合に読み飛ばされてしまうことがある + バグを修正(UTF-8またはUTF-16で、検索文字列の末尾が複数のコードユニ + ットからなる文字である場合に発生)。 + ・キャプチャグループ名のパーズをECMAScriptの仕様書通りきっちり行うよう + に変更。これにより、前の版までは受理されていた /(?<,>...)/ のような + グループ名はregex_errorがthrowされるように。 + +20200418: version 2.600: + ・戻り読み (lookbehind) の逆行限界を直接regex_search()に渡せるように + 3イテレータ版のregex_search()を追加。 + ・[非互換変更] 2.300で導入したmatch_flag_typeのmatch_lblim_availフラグ + と、match_resultsのlookbehind_limitメンバとを廃止。 + ・srell_ucfdata2.hppとsrell_updata.hppとをUnicode 13.0.0対応に更新。 + ・unicode/updataout.cppをUnicode 13対応に更新(ECMAScript 2020で対応さ + れる見込みのスクリプト名の先行対応)。 + +20191118: version 2.500: + ・初めてbasic_regex型インスタンスが作られた時にcase foldingデータから + icaseマッチング用テーブルを展開するのに代えて、最初から計算済みテー + ブルを保持しているように仕様変更。 + ・上記変更に併せてsrell_ucfdata.hppおよびそれを出力するucfdataout.cpp + はお役御免とし、代わりに展開済みicase用テーブルを保持する + srell_ucfdata2.hppとそれを出力するucfdataout2.cppとを追加。 + ・文字クラスの照合方法を線形探索から二分探索に変更。 + ・文字クラスの最適化処理のタイミングを「']' が見つかった時にまとめて一 + 括」から「文字または文字コードの範囲をpushするたびごと逐次」に変更。 + ・assertをすべて削除。 + ・連続する\uHHHHがサロゲートペアをなしている場合はUnicode値として解釈 + するように変更(これによりECMAScript仕様との相違はなくなりました)。 + ・SRELL_NO_NAMEDCAPTUREマクロ使用時にコンパイルエラーが出ていたのを修 + 正。 + ・updataout.cppを1.101にヴァージョンアップ。 + ・単体版のsrellを追加(single-headerディレクトリ内)。 + +20190914: version 2.401: + ・basic_regex型インスタンスのサイズを削減(Unicode property escapes対 + 応時にうっかり膨張させてしまっていました)。 + ・basic_regex::swap()の改良。 + +20190907: version 2.400: + ・文字クラスの照合速度を改善。 + ・パターンコンパイル時にグループ名中の\uエスケープを解釈するように変更 + (ECMAScriptの仕様に準拠)。 + ・ucfdataout.cppを1.200にヴァージョンアップ。このプログラムが出力する + srell_ucfdata.hpp中のunicode_casefoldingクラスに、新たにメンバ変数が + 追加されました。 + SRELL 2.400以降はこの追加されたメンバ変数をコンパイル時に必要とする + ため、ucfdataout.cpp 1.101以前によって出力されたsrell_ucfdata.hppを + SRELL 2.400以降で使うことはできません(古いSRELLで新しい + srell_ucfdata.hppを使うことは可)。 + ・その他コードの整理や改良など。 + +20190902: version 2.304: + ・Version 2.303のコード整理で壊れてしまっていたregex_iteratorを修復。 + +20190810: version 2.303: + ・2.302の修正が不完全であったため再修正。 + ・その他コードの整理。 + +20190809: version 2.302: + ・(?...) に繰り返し指定がついている時、内側の括弧によって捕獲された文 + 字列がループごとにクリアされず持ち越されていたバグを修正。 + 例:/(?:(ab)|(cd))+/.exec("abcd") → 1番括弧はundefinedになるはずが + "ab"になってしまっていた。 + ・misc/sample01.cppをversion 1.102に更新。テスト名中の章番号を + ECMAScript 2019 (ES10) 準拠に変更 + +20190724: version 2.301: + ・ECMAScriptの仕様に準じて、\でエスケープ可能な文字の種類を次の15字に + 限定。^$\.*+?()[]{}|/ + 文字クラス内([]内)ではこの15字に加えて '-' も対象に。 + +20190717: version 2.300: + ・検索対象範囲とは別に、戻り読み (lookbehind) の逆行限界を指定できる機 + 能を追加(match_flag_typeへのmatch_lblim_availフラグの追加と + match_resultsへのlookbehind_limitメンバの追加)。 + これに併せてregex_iteratorのコンストラクタ内でも、内部で使うprivate + なmatch_results型インスタンスのlookbehind_limitメンバに値を設定する + ように変更。 + ・ECMAScriptの仕様に合わせて、後方参照が対応する捕獲括弧より先に出現し + てもエラー扱いせぬように変更。/\1(.)/, /(?<=(.)\1)/, /\k(?.)/ + などすべてOKに。 + ・misc/sample01.cppをversion 1.101に更新。misc.jsより準拠テストを1つ追 + 加。 + +20190714: version 2.230: + ・正規表現が '*' か '+' かを伴う文字または文字クラスで始まる場合の検索 + 速度を改善(例:/[A-Za-z]+ing/)。 + +20190707: version 2.221: + ・std::u8stringの利用可否は__cpp_char8_tではなく__cpp_lib_char8_tを用 + いて判断するように変更。 + ・icase指定時にcase-folding処理をした結果、文字クラス内の文字がすべて + 同じ文字になった場合には、文字クラスを解消して文字リテラルとして処理 + するように変更。例:/r[Ss\u017F]t/i → /rst/i。 + ・その他問題を修正。 + +20190617: version 2.220: + ・カウンタを使わぬほうが内部表現がコンパクトになる繰り返しはカウンタを + 使わぬように変更。 + ・最適化バグにより、/a{1,2}?b/.exec("aab") が "aab" ではなく "ab" を返 + していたのを修正(発生条件:最短一致優先の回数指定が付いている文字ま + たは文字クラスの後ろに、その文字集合と排他的な文字または文字クラスが + 続いている場合)。 + +20190613: version 2.210: + ・/ab|cd|ef/ のような表現('|' で区切られている文字列の先頭文字が互い + に排他的な場合)の照合方法を改良。 + +20190603: version 2.202: + ・BMHアルゴリズムが使われる状況で、regex_matchがregex_search相当の処理 + をしてしまうバグを修正。 + +20190531: version 2.200: + ・通常の(正規表現ではない)テキスト検索用に、Boyer-Moore-Horspoolアル + ゴリズムに基づく実装を追加。 + ・UTF-8用iteratorの改良。 + ・icase指定時の\b/\Bの挙動を修正。/.\B./i が "s\u017F" にマッチするよ + うに。 + ・その他問題を修正。 + +20190508: version 2.100: + ・Lookbehind中に文字列のキャプチャがあり、かつその中および左方に可変長 + の正規表現があった場合、文字列の捕獲に失敗することがあったのを修正。 + 例:"1053" =~ /(?<=(\d+)(\d+))$/ で$2に適切な文字列がセットされず。 + ・srell_ucfdata.hppとsrell_updata.hppとをUnicode 12.1.0対応に更新。 + ・unicode/updataout.cppをUnicode 12対応に更新(ECMAScript 2020で対応さ + れる見込みのスクリプト名の先行対応)。 + ・srell.hpp中の改行コードをCR+LFからLFに変更。 + ・unicode/*.cppが出力するファイルの改行コードをCR+LFからLFに変更。 + ・misc/sample01.cppをversion 1.010に更新。 + 1. テスト名中の章番号をECMAScript 2018 (ES9) 準拠に変更(前版までは + ECMAScript 5.1までの章番号準拠でした)。 + 2. ECMAScript 2018規格の2.2.2.3 NOTEから準拠テストを1つ追加。 + ・C++11の機能の使用可否を判定するマクロを変更。 + ・文字クラスの処理方法を変更。 + ・basic_regexの全コンストラクタと全assign函数とでflag_typeのdefault引 + 数を指定できるように、syntax_option_typeとmatch_flag_typeとを再実装 + (TR1→C++11間の変更の見落とし)。 + ・char8_t型に試験対応。コンパイラがchar8_tに対応している場合 + (__cpp_char8_tマクロ定義の有無で判断)、"u8-"というprefixの付いた + クラスは「char8_t型文字列を受け取り、それをUTF-8として扱う」ように。 + char8_tに未対応の場合は従来通り、char型文字列をUTF-8として処理。 + ・常に「char型文字列をUTF-8として扱う」クラスとして新規に"u8c-"という + prefixに付いたクラスを追加。2.002までの"u8-"付きクラス相当。 + ・u8cregex; u8ccmatch, u8csmatch; u8ccsub_match, u8cssub_match; + u8ccregex_iterator, u8csregex_iterator; u8ccregex_token_iterator, + u8csregex_token_iterator. + +20180717: version 2.002: + ・ECMAScriptの仕様に合わせて \u{h...} の h... 部分の最大桁数を6から無 + 制限に変更(変更前の1~6桁というのは提案書に基づく実装でした)。 + ・updataout.cppを1.001に更新。新規に追加されたスクリプト名をエラー扱い + せぬように修整。 + ・srell_ucfdata.hppとsrell_updata.hppとをUnicode 11.0.0対応に更新。 + +20180204: version 2.001: + ・icase指定時に、[\W](\Wを含む文字class)が [KkSs\u017F\u212A] のいず + れにもマッチせぬよう変更(関連:ecma262 issue #512)。 + +20180127; version 2.000: + ・ECMAScript 2018のRegExpに追加されることになった次の機能を実装: + ・'.' があらゆるコードポイントにマッチするようにするための指定 + "dotall" フラグを、srell::regex_constants内の syntax_option_type + および srell::basic_regex内の flag_type に追加。 + ・Unicode property用の表現、\p{...} と \P{...} とを追加。 + ・名前付きキャプチャ (?...) と、名前付きキャプチャによって捕獲 + された文字列を後方参照するための正規表現、\k とを追加。 + ・戻り読み (lookbehind) の振る舞いを変更。(?<=...), (?" を追加。 + 2. operator=() 函数を明示的に実装。 + ・unicode/ucfdataout.cppをversion 1.001 に。 + +20140622; version 1.101: + srell_ucfdata.hppをUnicode 7.0.0対応に。 + +20121118; version 1.100: + 最初のリリース版。 + diff --git a/lib/srell3_009/license.txt b/lib/srell3_009/license.txt new file mode 100644 index 000000000..7f754a995 --- /dev/null +++ b/lib/srell3_009/license.txt @@ -0,0 +1,32 @@ +/***************************************************************************** +** +** SRELL (std::regex-like library) version 3.009 +** +** Copyright (c) 2012-2022, Nozomu Katoo. All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS +** IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +** THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +****************************************************************************** +**/ + diff --git a/lib/srell3_009/misc/sample01.cpp b/lib/srell3_009/misc/sample01.cpp new file mode 100644 index 000000000..71859e61c --- /dev/null +++ b/lib/srell3_009/misc/sample01.cpp @@ -0,0 +1,379 @@ +// +// A sample program for SRELL (tests and benchmarks). +// 2021/06/24; version 1.104 +// +// Macro Options: +// -DSTD_REGEX: std::regex used. +// -DBOOST_REGEX: boost::regex used. +// -DBOOST_XPRESSIVE: boost::xpressive used. +// unspecified or others: SRELL used. +// + +#include +#include +#include +#include +#include + +#if defined(STD_REGEX) + #include + #define RE_PREFIX std + #pragma message("std::regex selected.") +#elif defined(BOOST_REGEX) + #include + #define RE_PREFIX boost + #pragma message("boost::regex selected.") +#elif defined(BOOST_XPRESSIVE) + #include + #define RE_PREFIX boost::xpressive + #pragma message("boost::xpressive selected.") +#else + #include "../srell.hpp" + #define RE_PREFIX srell + #pragma message("srell selected.") +#endif + +bool test(const std::string &str, const std::string &exp, const unsigned int max, const std::vector *const expected = NULL) +{ +#if !defined(BOOST_XPRESSIVE) + RE_PREFIX::regex re; +#else + boost::xpressive::cregex re; +#endif + RE_PREFIX::cmatch mr; + bool b = false; + unsigned int num_of_failures = 0; + + try + { + std::string matched; + std::string msg; + +#if !defined(BOOST_XPRESSIVE) + re.assign(exp, RE_PREFIX::regex::ECMAScript); +#else + re = boost::xpressive::cregex::compile(exp, boost::xpressive::cregex::ECMAScript | boost::xpressive::cregex::not_dot_newline); +#endif + + const clock_t st = std::clock(); + + for (unsigned int i = 0; i < max; i++) +#if !defined(BOOST_REGEX) + b = RE_PREFIX::regex_search(str.c_str(), str.c_str() + str.size(), mr, re); +#else + b = RE_PREFIX::regex_search(str.c_str(), str.c_str() + str.size(), mr, re, boost::regex_constants::match_not_dot_newline); +#endif + + const clock_t ed = std::clock(); + +// std::fprintf(stdout, "\t\"%s\" =~ /%s/\n", str.c_str(), exp.c_str()); // Perl 5 style. + std::fprintf(stdout, "\t/%s/.exec(\"%s\");\n", exp.c_str(), str.c_str()); // ECMAScript style. + if (max > 1) + std::fprintf(stdout, "\t%u times\n", max); + std::fprintf(stdout, "\t%s (%ld msec)\n", b ? "Found" : "Not Found", static_cast(static_cast(ed - st) * 1000 / CLOCKS_PER_SEC)); + + for (RE_PREFIX::cmatch::size_type i = 0; i < mr.size(); ++i) + { + if (i) + std::fprintf(stdout, "\t$%u = ", i); + else + std::fputs("\t$& = ", stdout); + if (mr[i].matched) + { + matched = mr[i].str(); + msg = '"' + matched + '"' + " (%u+%u)"; + } + else + msg = matched = "(undefined)"; + + if (expected) + { + if (i < expected->size()) + { + if (matched == expected->operator[](i)) + msg += "; passed!"; + else + { + msg += "; failed... (expected: \"" + expected->operator[](i) + "\")"; + ++num_of_failures; + } + } + else + { + msg += "; failed..."; // should not exist. + ++num_of_failures; + } + } + msg += '\n'; + std::fprintf(stdout, msg.c_str(), mr.position(i), mr.length(i)); + } + + if (!num_of_failures && expected->size() != mr.size()) + ++num_of_failures; + + std::fprintf(stdout, "Result: %s.\n\n", num_of_failures ? "failed" : "passed"); + return num_of_failures == 0; + } + catch (const RE_PREFIX::regex_error &e) + { + std::fprintf(stdout, "Error (regex_error): %d \"%s\"\n\n", e.code(), e.what()); + } + catch (const std::exception &e) + { + std::fprintf(stdout, "Error (std::exception): \"%s\"\n\n", e.what()); + } + return false; +} + + +int main() +{ + const unsigned int count = 100000; + std::string exp; + std::string str; + std::vector expected; + unsigned int num_of_tests = 0; + unsigned int num_of_tests_passed = 0; + unsigned int num_of_benches = 0; + unsigned int num_of_benches_passed = 0; + + std::fputs("Test 1 (ECMAScript 2021 Language Specification 22.2.2.3, NOTE)\n", stdout); + str = "abc"; + exp = "((a)|(ab))((c)|(bc))"; + expected.resize(7); + expected[0] = "abc"; + expected[1] = "a"; + expected[2] = "a"; + expected[3] = "(undefined)"; + expected[4] = "bc"; + expected[5] = "(undefined)"; + expected[6] = "bc"; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + + std::fputs("Test 2a (ECMAScript 2021 Language Specification 22.2.2.5.1, NOTE 2)\n", stdout); + str = "abcdefghi"; + exp = "a[a-z]{2,4}"; + expected.resize(1); + expected[0] = "abcde"; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + + std::fputs("Test 2b (ECMAScript 2021 Language Specification 22.2.2.5.1, NOTE 2)\n", stdout); + str = "abcdefghi"; + exp = "a[a-z]{2,4}?"; + expected[0] = "abc"; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + + std::fputs("Test 3 (ECMAScript 2021 Language Specification 22.2.2.5.1, NOTE 2)\n", stdout); + str = "aabaac"; + exp = "(aa|aabaac|ba|b|c)*"; + expected.resize(2); + expected[0] = "aaba"; + expected[1] = "ba"; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + + std::fputs("Test 4 (ECMAScript 2021 Language Specification 22.2.2.5.1, NOTE 3)\n", stdout); + str = "zaacbbbcac"; + exp = "(z)((a+)?(b+)?(c))*"; + expected.resize(6); + expected[0] = "zaacbbbcac"; + expected[1] = "z"; + expected[2] = "ac"; + expected[3] = "a"; + expected[4] = "(undefined)"; + expected[5] = "c"; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + + std::fputs("Test 5a (ECMAScript 2021 Language Specification 22.2.2.5.1, NOTE 4)\n", stdout); + str = "b"; + exp = "(a*)*"; + expected.resize(2); + expected[0] = ""; + expected[1] = ""; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + + std::fputs("Test 5b (ECMAScript 2021 Language Specification 22.2.2.5.1, NOTE 4)\n", stdout); + str = "baaaac"; + exp = "(a*)b\\1+"; + expected[0] = "b"; + expected[1] = ""; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + + std::fputs("Test 6a (ECMAScript 2021 Language Specification 22.2.2.8.2, NOTE 2)\n", stdout); + str = "baaabac"; + exp = "(?=(a+))"; + expected[0] = ""; + expected[1] = "aaa"; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + + std::fputs("Test 6b (ECMAScript 2021 Language Specification 22.2.2.8.2, NOTE 2)\n", stdout); + str = "baaabac"; + exp = "(?=(a+))a*b\\1"; + expected[0] = "aba"; + expected[1] = "a"; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + + std::fputs("Test 7 (ECMAScript 2021 Language Specification 22.2.2.8.2, NOTE 3)\n", stdout); + str = "baaabaac"; + exp = "(.*?)a(?!(a+)b\\2c)\\2(.*)"; + expected.resize(4); + expected[0] = "baaabaac"; + expected[1] = "ba"; + expected[2] = "(undefined)"; + expected[3] = "abaac"; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + + std::fputs("Test 8 (from https://github.com/tc39/test262/tree/master/test/built-ins/RegExp/lookBehind/misc.js)\n", stdout); + str = "abc"; + exp = "(abc\\1)"; + expected.resize(2); + expected[0] = "abc"; + expected[1] = "abc"; + if (test(str, exp, 1, &expected)) + ++num_of_tests_passed; + ++num_of_tests; + +#ifndef SKIP_BENCHMARK + + std::fputs("Benchmark 01\n", stdout); + //0123456 + str = "aaaabaa"; + exp = "^(.*)*b\\1$"; + expected.resize(2); + expected[0] = "aaaabaa"; + expected[1] = "aa"; + if (test(str, exp, count, &expected)) + ++num_of_benches_passed; + ++num_of_benches; + + std::fputs("Benchmark 02\n", stdout); + //012345678 + str = "aaaabaaaa"; + exp = "^(.*)*b\\1\\1$"; + expected[0] = "aaaabaaaa"; + expected[1] = "aa"; + if (test(str, exp, count, &expected)) + ++num_of_benches_passed; + ++num_of_benches; + + std::fputs("Benchmark 03\n", stdout); + //01 + str = "ab"; + exp = "(.*?)*b\\1"; + expected[0] = "b"; + expected[1] = ""; + if (test(str, exp, count * 10, &expected)) + ++num_of_benches_passed; + ++num_of_benches; + + std::fputs("Benchmark 04\n", stdout); + //01234567 + str = "acaaabbb"; + exp = "(a(.)a|\\2(.)b){2}"; + expected.resize(4); + expected[0] = "aaabb"; + expected[1] = "bb"; + expected[2] = "(undefined)"; + expected[3] = "b"; + if (test(str, exp, count * 10, &expected)) + ++num_of_benches_passed; + ++num_of_benches; + + std::fputs("Benchmark 05\n", stdout); + str = "aabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaa"; + exp = "(a*)(b)*\\1\\1\\1"; + expected.resize(3); + expected[0] = "aabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaa"; + expected[1] = "aa"; + expected[2] = "b"; + if (test(str, exp, count, &expected)) + ++num_of_benches_passed; + ++num_of_benches; + + std::fputs("Benchmark 06a\n", stdout); + str = "aaaaaaaaaab"; + exp = "(.*)*b"; + expected.resize(2); + expected[0] = "aaaaaaaaaab"; + expected[1] = "aaaaaaaaaa"; + if (test(str, exp, count * 10, &expected)) + ++num_of_benches_passed; + ++num_of_benches; + + std::fputs("Benchmark 06b\n", stdout); + str = "aaaaaaaaaab"; + exp = "(.*)+b"; + if (test(str, exp, count * 10, &expected)) // the same results expected. + ++num_of_benches_passed; + ++num_of_benches; + + std::fputs("Benchmark 06c\n", stdout); + str = "aaaaaaaaaab"; + exp = "(.*){2,}b"; + expected[1] = ""; + if (test(str, exp, count * 10, &expected)) + ++num_of_benches_passed; + ++num_of_benches; + + std::fputs("Benchmark 07\n", stdout); + str = "aaaaaaaaaabc"; + exp = "(?=(a+))(abc)"; + expected.resize(3); + expected[0] = "abc"; + expected[1] = "a"; + expected[2] = "abc"; + if (test(str, exp, count, &expected)) + ++num_of_benches_passed; + ++num_of_benches; + + std::fputs("Benchmark 08\n", stdout); + str = "1234-5678-1234-456"; + exp = "(\\d{4}[-]){3}\\d{3,4}"; + expected.resize(2); + expected[0] = "1234-5678-1234-456"; + expected[1] = "1234-"; + if (test(str, exp, count * 5, &expected)) + ++num_of_benches_passed; + ++num_of_benches; + + std::fputs("Benchmark 09\n", stdout); + str = "aaaaaaaaaaaaaaaaaaaaa"; + exp = "(.*)*b"; + expected.resize(0); + if (test(str, exp, 1, &expected)) + ++num_of_benches_passed; + ++num_of_benches; + +#endif // !defined(SKIP_BENCHMARK) + + std::fprintf(stdout, "Results of tests: %u/%u passed.\n", num_of_tests_passed, num_of_tests); + std::fprintf(stdout, "Results of benchmarks: %u/%u passed.\n", num_of_benches_passed, num_of_benches); + +return 0; + + std::fputs("Benchmark 10\n", stdout); + str = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz"; + exp = "(x+y*)+a"; + test(str, exp, 1); + + return 0; +} diff --git a/lib/srell3_009/readme_en.txt b/lib/srell3_009/readme_en.txt new file mode 100644 index 000000000..2416aca56 --- /dev/null +++ b/lib/srell3_009/readme_en.txt @@ -0,0 +1,21 @@ +How to Use + + Put the following three files in one directory, and include srell.hpp. + 1. srell.hpp + 2. srell_ucfdata2.hpp (data for case folding) + 3. srell_updata.hpp (data for Unicode properties) + +The files in the following directories are supplements. As SRELL does not use +them, it is safe to remove them. + +* misc + Contains a source code file for a simple test and benchmark program. + +* single-header + Contains a standalone version of srell.hpp into which srell_ucfdata2.hpp + and srell_updata.hpp have been merged. + +* unicode + Contains source code files for programs that generate srell_ucfdata.hpp and + srell_update.hpp from latest Unicode data text files. + diff --git a/lib/srell3_009/readme_ja.txt b/lib/srell3_009/readme_ja.txt new file mode 100644 index 000000000..f71040a57 --- /dev/null +++ b/lib/srell3_009/readme_ja.txt @@ -0,0 +1,23 @@ +■使用法 + +次のファイルを同じディレクトリに置き、srell.hppをincludeするだけです。 +・srell.hpp +・srell_ucfdata2.hpp(case folding用データ) +・srell_updata.hpp(Unicode property用データ) + +■付属物 +以下のディレクトリ内にあるものはおまけのようなものです。 +SRELL側からは参照していませんので、削除してしまってもライブラリの動作に +影響はありません。 + +・misc + 簡単なテスト及びベンチマークプログラムのソースが入っています。 + +・single-header + srell.hppの中にsrell_ucfdata2.hppとsrell_updata.hppとを統合してしまい、 + これ単体で使用できるようにしたstandalone版が入っています。 + +・unicode + 最新のUnicodeデータからsrell_ucfdata.hpp及びsrell_updata.hppを作るため + のプログラムのソースが入っています。 + diff --git a/lib/srell3_009/single-header/srell.hpp b/lib/srell3_009/single-header/srell.hpp new file mode 100644 index 000000000..2816c44e2 --- /dev/null +++ b/lib/srell3_009/single-header/srell.hpp @@ -0,0 +1,18361 @@ +/***************************************************************************** +** +** SRELL (std::regex-like library) version 3.009 +** +** Copyright (c) 2012-2022, Nozomu Katoo. All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS +** IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +** THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +****************************************************************************** +**/ + +#ifndef SRELL_REGEX_TEMPLATE_LIBRARY +#define SRELL_REGEX_TEMPLATE_LIBRARY + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cpp_unicode_characters + #ifndef SRELL_CPP11_CHAR1632_ENABLED + #define SRELL_CPP11_CHAR1632_ENABLED + #endif +#endif +#ifdef __cpp_initializer_lists +#include + #ifndef SRELL_CPP11_INITIALIZER_LIST_ENABLED + #define SRELL_CPP11_INITIALIZER_LIST_ENABLED + #endif +#endif +#ifdef __cpp_rvalue_references + #ifndef SRELL_CPP11_MOVE_ENABLED + #define SRELL_CPP11_MOVE_ENABLED + #endif +#endif +#ifdef SRELL_CPP11_MOVE_ENABLED + #if defined(_MSC_VER) && _MSC_VER < 1900 + #define SRELL_NOEXCEPT + #else + #define SRELL_NOEXCEPT noexcept + #endif +#endif +#ifdef __cpp_char8_t + #ifndef SRELL_CPP20_CHAR8_ENABLED + #ifdef __cpp_lib_char8_t + #define SRELL_CPP20_CHAR8_ENABLED 2 + #else + #define SRELL_CPP20_CHAR8_ENABLED 1 + #endif + #endif +#endif + +// The following SRELL_NO_* macros would be useful when wanting to +// reduce the size of a binary by turning off some feature(s). + +#ifdef SRELL_NO_UNICODE_DATA + +// Prevents Unicode data used for icase (case-insensitive) matching +// from being output into a resulting binary. In this case only the +// ASCII characters are case-folded when icase matching is performed +// (i.e., [A-Z] -> [a-z] only). +#define SRELL_NO_UNICODE_ICASE + +// Disables the Unicode property (\p{...} and \P{...}) and prevents +// Unicode property data from being output into a resulting binary. +#define SRELL_NO_UNICODE_PROPERTY +#endif + +// Prevents icase matching specific functions into a resulting binary. +// In this case the icase flag is ignored and icase matching becomes +// unavailable. +#ifdef SRELL_NO_ICASE +#ifndef SRELL_NO_UNICODE_ICASE +#define SRELL_NO_UNICODE_ICASE +#endif +#endif + +// This macro might be removed in the future. +#ifdef SRELL_V1_COMPATIBLE +#ifndef SRELL_NO_UNICODE_PROPERTY +#define SRELL_NO_UNICODE_PROPERTY +#endif +#define SRELL_NO_NAMEDCAPTURE +#define SRELL_NO_SINGLELINE +#define SRELL_FIXEDWIDTHLOOKBEHIND +#endif + +namespace srell +{ +// ["regex_constants.h" ... + + namespace regex_constants + { + enum syntax_option_type + { + icase = 1 << 0, + nosubs = 1 << 1, + optimize = 1 << 2, + collate = 1 << 3, + ECMAScript = 1 << 4, + basic = 1 << 5, + extended = 1 << 6, + awk = 1 << 7, + grep = 1 << 8, + egrep = 1 << 9, + multiline = 1 << 10, + + // SRELL's extension. + dotall = 1 << 11 // singleline. + }; + + inline syntax_option_type operator&(const syntax_option_type left, const syntax_option_type right) + { + return static_cast(static_cast(left) & static_cast(right)); + } + inline syntax_option_type operator|(const syntax_option_type left, const syntax_option_type right) + { + return static_cast(static_cast(left) | static_cast(right)); + } + inline syntax_option_type operator^(const syntax_option_type left, const syntax_option_type right) + { + return static_cast(static_cast(left) ^ static_cast(right)); + } + inline syntax_option_type operator~(const syntax_option_type b) + { + return static_cast(~static_cast(b)); + } + inline syntax_option_type &operator&=(syntax_option_type &left, const syntax_option_type right) + { + left = left & right; + return left; + } + inline syntax_option_type &operator|=(syntax_option_type &left, const syntax_option_type right) + { + left = left | right; + return left; + } + inline syntax_option_type &operator^=(syntax_option_type &left, const syntax_option_type right) + { + left = left ^ right; + return left; + } + } + // namespace regex_constants + + namespace regex_constants + { + enum match_flag_type + { + match_default = 0, + match_not_bol = 1 << 0, + match_not_eol = 1 << 1, + match_not_bow = 1 << 2, + match_not_eow = 1 << 3, + match_any = 1 << 4, + match_not_null = 1 << 5, + match_continuous = 1 << 6, + match_prev_avail = 1 << 7, + + format_default = 0, + format_sed = 1 << 8, + format_no_copy = 1 << 9, + format_first_only = 1 << 10, + + // For internal use. + match_match_ = 1 << 11 + }; + + inline match_flag_type operator&(const match_flag_type left, const match_flag_type right) + { + return static_cast(static_cast(left) & static_cast(right)); + } + inline match_flag_type operator|(const match_flag_type left, const match_flag_type right) + { + return static_cast(static_cast(left) | static_cast(right)); + } + inline match_flag_type operator^(const match_flag_type left, const match_flag_type right) + { + return static_cast(static_cast(left) ^ static_cast(right)); + } + inline match_flag_type operator~(const match_flag_type b) + { + return static_cast(~static_cast(b)); + } + inline match_flag_type &operator&=(match_flag_type &left, const match_flag_type right) + { + left = left & right; + return left; + } + inline match_flag_type &operator|=(match_flag_type &left, const match_flag_type right) + { + left = left | right; + return left; + } + inline match_flag_type &operator^=(match_flag_type &left, const match_flag_type right) + { + left = left ^ right; + return left; + } + } + // namespace regex_constants + + // 28.5, regex constants: + namespace regex_constants + { + typedef int error_type; + + static const error_type error_collate = 100; + static const error_type error_ctype = 101; + static const error_type error_escape = 102; + static const error_type error_backref = 103; + static const error_type error_brack = 104; + static const error_type error_paren = 105; + static const error_type error_brace = 106; + static const error_type error_badbrace = 107; + static const error_type error_range = 108; + static const error_type error_space = 109; + static const error_type error_badrepeat = 110; + static const error_type error_complexity = 111; + static const error_type error_stack = 112; + + // SRELL's extension. + static const error_type error_utf8 = 113; + +#if defined(SRELL_FIXEDWIDTHLOOKBEHIND) + static const error_type error_lookbehind = 200; +#endif + static const error_type error_internal = 999; + } + // namespace regex_constants + +// ... "regex_constants.h"] +// ["regex_error.hpp" ... + +// 28.6, class regex_error: +class regex_error : public std::runtime_error +{ +public: + + explicit regex_error(const regex_constants::error_type ecode) + : std::runtime_error("regex_error") // added for error C2512. + , ecode_(ecode) + { + } + + regex_constants::error_type code() const + { + return ecode_; + } + +private: + + regex_constants::error_type ecode_; +}; + +// ... "regex_error.hpp"] +// ["rei_type.h" ... + + namespace regex_internal + { + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + + typedef char32_t uchar32; + +#elif defined(UINT_MAX) && UINT_MAX >= 0xFFFFFFFF + + typedef unsigned int uchar32; + +#elif defined(ULONG_MAX) && ULONG_MAX >= 0xFFFFFFFF + + typedef unsigned long uchar32; + +#else +#error could not find a suitable type for 32-bit Unicode integer values. +#endif // defined(SRELL_CPP11_CHAR1632_ENABLED) + + typedef uchar32 uint_l32; // uint_least32. + + } // regex_internal + +// ... "rei_type.h"] +// ["rei_constants.h" ... + + namespace regex_internal + { + enum re_state_type + { + st_character, // 0x00 + st_character_class, // 0x01 + + st_epsilon, // 0x02 + + st_check_counter, // 0x03 +// st_increment_counter, // 0x04 + st_decrement_counter, // 0x04 + st_save_and_reset_counter, // 0x05 + st_restore_counter, // 0x06 + + st_roundbracket_open, // 0x07 + st_roundbracket_pop, // 0x08 + st_roundbracket_close, // 0x09 + + st_repeat_in_push, // 0x0a + st_repeat_in_pop, // 0x0b + st_check_0_width_repeat, // 0x0c + + st_backreference, // 0x0d + + st_lookaround_open, // 0x0e + +// st_lookaround_pop, // 0x10 + + st_bol, // 0x0f + st_eol, // 0x10 + st_boundary, // 0x11 + + st_success, // 0x12 + +#if !defined(SRELLDBG_NO_NEXTPOS_OPT) + st_move_nextpos, // 0x13 +#endif + + st_lookaround_close = st_success, + st_zero_width_boundary = st_lookaround_open, + }; + // re_state_type + + namespace constants + { + static const uchar32 unicode_max_codepoint = 0x10ffff; + static const uchar32 invalid_u32value = static_cast(-1); + static const uchar32 max_u32value = static_cast(-2); + static const uchar32 asc_icase = 0x20; + static const uchar32 ccstr_empty = static_cast(-3); + } + // constants + + namespace meta_char + { + static const uchar32 mc_exclam = 0x21; // '!' + static const uchar32 mc_dollar = 0x24; // '$' + static const uchar32 mc_rbraop = 0x28; // '(' + static const uchar32 mc_rbracl = 0x29; // ')' + static const uchar32 mc_astrsk = 0x2a; // '*' + static const uchar32 mc_plus = 0x2b; // '+' + static const uchar32 mc_comma = 0x2c; // ',' + static const uchar32 mc_minus = 0x2d; // '-' + static const uchar32 mc_period = 0x2e; // '.' + static const uchar32 mc_colon = 0x3a; // ':' + static const uchar32 mc_lt = 0x3c; // '<' + static const uchar32 mc_eq = 0x3d; // '=' + static const uchar32 mc_gt = 0x3e; // '>' + static const uchar32 mc_query = 0x3f; // '?' + static const uchar32 mc_sbraop = 0x5b; // '[' + static const uchar32 mc_escape = 0x5c; // '\\' + static const uchar32 mc_sbracl = 0x5d; // ']' + static const uchar32 mc_caret = 0x5e; // '^' + static const uchar32 mc_cbraop = 0x7b; // '{' + static const uchar32 mc_bar = 0x7c; // '|' + static const uchar32 mc_cbracl = 0x7d; // '}' + } + // meta_char + + namespace char_ctrl + { + static const uchar32 cc_nul = 0x00; // '\0' //0x00:NUL + static const uchar32 cc_bs = 0x08; // '\b' //0x08:BS + static const uchar32 cc_htab = 0x09; // '\t' //0x09:HT + static const uchar32 cc_nl = 0x0a; // '\n' //0x0a:LF + static const uchar32 cc_vtab = 0x0b; // '\v' //0x0b:VT + static const uchar32 cc_ff = 0x0c; // '\f' //0x0c:FF + static const uchar32 cc_cr = 0x0d; // '\r' //0x0d:CR + } + // char_ctrl + + namespace char_alnum + { + static const uchar32 ch_0 = 0x30; // '0' + static const uchar32 ch_1 = 0x31; // '1' + static const uchar32 ch_7 = 0x37; // '7' + static const uchar32 ch_8 = 0x38; // '8' + static const uchar32 ch_9 = 0x39; // '9' + static const uchar32 ch_A = 0x41; // 'A' + static const uchar32 ch_B = 0x42; // 'B' + static const uchar32 ch_D = 0x44; // 'D' + static const uchar32 ch_F = 0x46; // 'F' + static const uchar32 ch_P = 0x50; // 'P' + static const uchar32 ch_S = 0x53; // 'S' + static const uchar32 ch_W = 0x57; // 'W' + static const uchar32 ch_Z = 0x5a; // 'Z' + static const uchar32 ch_a = 0x61; // 'a' + static const uchar32 ch_b = 0x62; // 'b' + static const uchar32 ch_c = 0x63; // 'c' + static const uchar32 ch_d = 0x64; // 'd' + static const uchar32 ch_f = 0x66; // 'f' + static const uchar32 ch_k = 0x6b; // 'k' + static const uchar32 ch_n = 0x6e; // 'n' + static const uchar32 ch_p = 0x70; // 'p' + static const uchar32 ch_r = 0x72; // 'r' + static const uchar32 ch_s = 0x73; // 's' + static const uchar32 ch_t = 0x74; // 't' + static const uchar32 ch_u = 0x75; // 'u' + static const uchar32 ch_v = 0x76; // 'v' + static const uchar32 ch_w = 0x77; // 'w' + static const uchar32 ch_x = 0x78; // 'x' + static const uchar32 ch_z = 0x7a; // 'z' + } + // char_alnum + + namespace char_other + { + static const uchar32 co_sp = 0x20; // ' ' + static const uchar32 co_amp = 0x26; // '&' + static const uchar32 co_apos = 0x27; // '\'' + static const uchar32 co_slash = 0x2f; // '/' + static const uchar32 co_ll = 0x5f; // '_' + static const uchar32 co_grav = 0x60; // '`' + } + // char_other + } + // namespace regex_internal + +// ... "rei_constants.h"] +// ["rei_utf_traits.hpp" ... + + namespace regex_internal + { + +template +struct utf_traits_core +{ +public: + + static const std::size_t maxseqlen = 1; + static const int utftype = 0; + + static const std::size_t bitsetsize = 0x100; + static const uchar32 bitsetmask = 0xff; + static const uchar32 cumask = 0xff; + + // *iter + template + static uchar32 codepoint(ForwardIterator begin, const ForwardIterator /* end */) + { + return static_cast(*begin); + // Caller is responsible for begin != end. + } + + // *iter++ + template + static uchar32 codepoint_inc(ForwardIterator &begin, const ForwardIterator /* end */) + { + return static_cast(*begin++); + // Caller is responsible for begin != end. + } + + // iter2 = iter; return *--iter2; + template + static uchar32 prevcodepoint(BidirectionalIterator cur, const BidirectionalIterator /* begin */) + { + return static_cast(*--cur); + } + + // *--iter + template + static uchar32 dec_codepoint(BidirectionalIterator &cur, const BidirectionalIterator /* begin */) + { + return static_cast(*--cur); + // Caller is responsible for cur != begin. + } + +#if !defined(SRELLDBG_NO_BMH) + + template + static bool is_trailing(const charT2 /* cu */) + { + return false; + } + +#endif // !defined(SRELLDBG_NO_BMH) + + static uchar32 to_codeunits(charT out[maxseqlen], uchar32 cp) + { + out[0] = static_cast(cp); + return 1; + } + + static uchar32 firstcodeunit(const uchar32 cp) + { + return cp; + } + + template + static bool seek_charboundary(ForwardIterator &begin, const ForwardIterator end) + { + return begin != end; + } +}; // utf_traits_core + +// common and utf-32. +template +struct utf_traits : public utf_traits_core +{ + static const int utftype = 32; + + static const std::size_t bitsetsize = 0x10000; + static const uchar32 bitsetmask = 0xffff; + static const uchar32 cumask = 0x1fffff; +}; // utf_traits + +// utf-8 specific. +template +struct utf8_traits : public utf_traits_core +{ +public: + + // utf-8 specific. + static const std::size_t maxseqlen = 4; + static const int utftype = 8; + + template + static uchar32 codepoint(ForwardIterator begin, const ForwardIterator end) + { +// return codepoint_inc(begin, end); + + uchar32 codepoint = static_cast(*begin & 0xff); + + if ((codepoint & 0x80) == 0) // 1 octet. + return codepoint; + + if (++begin != end && (codepoint >= 0xc0 && codepoint <= 0xf7) && (*begin & 0xc0) == 0x80) + { + codepoint = static_cast((codepoint << 6) | (*begin & 0x3f)); + + if ((codepoint & 0x800) == 0) // 2 octets. + return static_cast(codepoint & 0x7ff); + + if (++begin != end && (*begin & 0xc0) == 0x80) + { + codepoint = static_cast((codepoint << 6) | (*begin & 0x3f)); + + if ((codepoint & 0x10000) == 0) // 3 octets. + return static_cast(codepoint & 0xffff); + + if (++begin != end && (*begin & 0xc0) == 0x80) // 4 octets. + { + codepoint = static_cast((codepoint << 6) | (*begin & 0x3f)); + + return static_cast(codepoint & 0x1fffff); + } + } + } +// else // 80-bf, f8-ff: invalid. + + return regex_internal::constants::invalid_u32value; + } + + template + static uchar32 codepoint_inc(ForwardIterator &begin, const ForwardIterator end) + { + uchar32 codepoint = static_cast(*begin++ & 0xff); + + if ((codepoint & 0x80) == 0) // 1 octet. + return codepoint; + + // Expects transformation to (codepoint - 0xc0) <= 0x37 by optimisation. + // 0xF7 instead of 0xF4 is for consistency with reverse iterators. + if (begin != end && (codepoint >= 0xc0 && codepoint <= 0xf7) && (*begin & 0xc0) == 0x80) +// if (begin != end && (0x7f00 & (1 << ((codepoint >> 3) & 0xf))) && (*begin & 0xc0) == 0x80) // c0, c8, d0, d8, e0, e8, f0. + { + codepoint = static_cast((codepoint << 6) | (*begin++ & 0x3f)); + + // 11 ?aaa aabb bbbb + if ((codepoint & 0x800) == 0) // 2 octets. + return static_cast(codepoint & 0x7ff); + // c080-c1bf: invalid. 00-7F. + // c280-dfbf: valid. 080-7FF. + + // 11 1aaa aabb bbbb + if (begin != end && (*begin & 0xc0) == 0x80) + { + codepoint = static_cast((codepoint << 6) | (*begin++ & 0x3f)); + + // 111? aaaa bbbb bbcc cccc + if ((codepoint & 0x10000) == 0) // 3 octets. + return static_cast(codepoint & 0xffff); + // e08080-e09fbf: invalid. 000-7FF. + // e0a080-efbfbf: valid. 0800-FFFF. + + // 1111 0aaa bbbb bbcc cccc + if (begin != end && (*begin & 0xc0) == 0x80) // 4 octets. + { + codepoint = static_cast((codepoint << 6) | (*begin++ & 0x3f)); + // f0808080-f08fbfbf: invalid. 0000-FFFF. + // f0908080-f3bfbfbf: valid. 10000-FFFFF. + // f4808080-f48fbfbf: valid. 100000-10FFFF. + // f4908080-f4bfbfbf: invalid. 110000-13FFFF. + // f5808080-f7bfbfbf: invalid. 140000-1FFFFF. + + // 11 110a aabb bbbb cccc ccdd dddd + return static_cast(codepoint & 0x1fffff); + } + } + } +// else // 80-bf, f8-ff: invalid. + + return regex_internal::constants::invalid_u32value; + } + + template + static uchar32 prevcodepoint(BidirectionalIterator cur, const BidirectionalIterator begin) + { + uchar32 codepoint = static_cast(*--cur); + + if ((codepoint & 0x80) == 0) + return static_cast(codepoint & 0xff); + + if ((codepoint & 0x40) == 0 && cur != begin) + { + codepoint = static_cast((codepoint & 0x3f) | (*--cur << 6)); + + if ((codepoint & 0x3800) == 0x3000) // 2 octets. + return static_cast(codepoint & 0x7ff); + + if ((codepoint & 0x3000) == 0x2000 && cur != begin) + { + codepoint = static_cast((codepoint & 0xfff) | (*--cur << 12)); + + if ((codepoint & 0xf0000) == 0xe0000) // 3 octets. + return static_cast(codepoint & 0xffff); + + if ((codepoint & 0xc0000) == 0x80000 && cur != begin) + { + if ((*--cur & 0xf8) == 0xf0) // 4 octets. + return static_cast((codepoint & 0x3ffff) | ((*cur & 7) << 18)); + } + } + } + return regex_internal::constants::invalid_u32value; + } + + template + static uchar32 dec_codepoint(BidirectionalIterator &cur, const BidirectionalIterator begin) + { + uchar32 codepoint = static_cast(*--cur); + + if ((codepoint & 0x80) == 0) + return static_cast(codepoint & 0xff); + + if ((codepoint & 0x40) == 0 && cur != begin) + { + codepoint = static_cast((codepoint & 0x3f) | (*--cur << 6)); + + // 11 0bbb bbaa aaaa? + if ((codepoint & 0x3800) == 0x3000) // 2 octets. +// if ((*cur & 0xe0) == 0xc0) + return static_cast(codepoint & 0x7ff); + + // 10 bbbb bbaa aaaa? + if ((codepoint & 0x3000) == 0x2000 && cur != begin) // [\x80-\xbf]{2}. +// if ((*cur & 0xc0) == 0x80 && cur != begin) + { + codepoint = static_cast((codepoint & 0xfff) | (*--cur << 12)); + + // 1110 cccc bbbb bbaa aaaa? + if ((codepoint & 0xf0000) == 0xe0000) // 3 octets. +// if ((*cur & 0xf0) == 0xe0) + return static_cast(codepoint & 0xffff); + + // 10cc cccc bbbb bbaa aaaa? + if ((codepoint & 0xc0000) == 0x80000 && cur != begin) // [\x80-\xbf]{3}. +// if ((*cur & 0xc0) == 0x80 && cur != begin) + { + if ((*--cur & 0xf8) == 0xf0) // 4 octets. + return static_cast((codepoint & 0x3ffff) | ((*cur & 7) << 18)); + // d ddcc cccc bbbb bbaa aaaa + //else // [\0-\xef\xf8-\xff][\x80-\xbf]{3}. + + // Sequences [\xc0-\xdf][\x80-\xbf] and [\xe0-\xef][\x80-\xbf]{2} are valid. + // To give a chance to them, rewinds cur. + ++cur; + } + //else // [\0-\x7f\xc0-\xdf\xf0-\xff][\x80-\xbf]{2}. + ++cur; // Sequence [\xc0-\xdf][\x80-\xbf] is valid. Rewinds to give a chance to it. + } + //else // [\0-\x7f\xe0-\xff][\x80-\xbf]. + ++cur; // Rewinds to give a chance to [\0-\x7f]. + } + //else // [\xc0-\xff]. + + return regex_internal::constants::invalid_u32value; + } + +#if !defined(SRELLDBG_NO_BMH) + + template + static bool is_trailing(const charT2 cu) + { + return (cu & 0xc0) == 0x80; + } + +#endif // !defined(SRELLDBG_NO_BMH) + + static uchar32 to_codeunits(charT out[maxseqlen], uchar32 cp) + { + if (cp < 0x80) + { + out[0] = static_cast(cp); + return 1; + } + else if (cp < 0x800) + { + out[0] = static_cast(((cp >> 6) & 0x1f) | 0xc0); + out[1] = static_cast((cp & 0x3f) | 0x80); + return 2; + } + else if (cp < 0x10000) + { + out[0] = static_cast(((cp >> 12) & 0x0f) | 0xe0); + out[1] = static_cast(((cp >> 6) & 0x3f) | 0x80); + out[2] = static_cast((cp & 0x3f) | 0x80); + return 3; + } +// else // if (cp < 0x110000) + { + out[0] = static_cast(((cp >> 18) & 0x07) | 0xf0); + out[1] = static_cast(((cp >> 12) & 0x3f) | 0x80); + out[2] = static_cast(((cp >> 6) & 0x3f) | 0x80); + out[3] = static_cast((cp & 0x3f) | 0x80); + return 4; + } + } + + static uchar32 firstcodeunit(const uchar32 cp) + { + if (cp < 0x80) + return cp; + + if (cp < 0x800) + return static_cast(((cp >> 6) & 0x1f) | 0xc0); + + if (cp < 0x10000) + return static_cast(((cp >> 12) & 0x0f) | 0xe0); + + return static_cast(((cp >> 18) & 0x07) | 0xf0); + } + + template + static bool seek_charboundary(ForwardIterator &begin, const ForwardIterator end) + { + for (; begin != end; ++begin) + { +// if ((*begin & 0xc0) != 0x80 && (*begin & 0xf8) != 0xf8) // 00-7f, c0-f7. + if ((*begin & 0xc0) != 0x80) // 00-7f, c0-ff. + return true; + } + return false; + } +}; // utf8_traits + +// utf-16 specific. +template +struct utf16_traits : public utf_traits_core +{ +public: + + // utf-16 specific. + static const std::size_t maxseqlen = 2; + static const int utftype = 16; + + static const std::size_t bitsetsize = 0x10000; + static const uchar32 bitsetmask = 0xffff; + static const uchar32 cumask = 0xffff; + + template + static uchar32 codepoint(ForwardIterator begin, const ForwardIterator end) + { + const uchar32 codeunit = *begin; + + if ((codeunit & 0xdc00) != 0xd800) + return static_cast(codeunit & 0xffff); + + if (++begin != end && (*begin & 0xdc00) == 0xdc00) + return static_cast((((codeunit & 0x3ff) << 10) | (*begin & 0x3ff)) + 0x10000); + + return static_cast(codeunit & 0xffff); + } + + template + static uchar32 codepoint_inc(ForwardIterator &begin, const ForwardIterator end) + { + const uchar32 codeunit = *begin++; + + if ((codeunit & 0xdc00) != 0xd800) + return static_cast(codeunit & 0xffff); + + if (begin != end && (*begin & 0xdc00) == 0xdc00) + return static_cast((((codeunit & 0x3ff) << 10) | (*begin++ & 0x3ff)) + 0x10000); + + return static_cast(codeunit & 0xffff); + } + + template + static uchar32 prevcodepoint(BidirectionalIterator cur, const BidirectionalIterator begin) + { + const uchar32 codeunit = *--cur; + + if ((codeunit & 0xdc00) != 0xdc00 || cur == begin) + return static_cast(codeunit & 0xffff); + + if ((*--cur & 0xdc00) == 0xd800) + return static_cast((((*cur & 0x3ff) << 10) | (codeunit & 0x3ff)) + 0x10000); + + return static_cast(codeunit & 0xffff); + } + + template + static uchar32 dec_codepoint(BidirectionalIterator &cur, const BidirectionalIterator begin) + { + const uchar32 codeunit = *--cur; + + if ((codeunit & 0xdc00) != 0xdc00 || cur == begin) + return static_cast(codeunit & 0xffff); + + if ((*--cur & 0xdc00) == 0xd800) + return static_cast((((*cur & 0x3ff) << 10) | (codeunit & 0x3ff)) + 0x10000); + //else // (codeunit & 0xdc00) == 0xdc00 && (*cur & 0xdc00) != 0xd800 + + ++cur; + + return static_cast(codeunit & 0xffff); + } + +#if !defined(SRELLDBG_NO_BMH) + + template + static bool is_trailing(const charT2 cu) + { + return (cu & 0xdc00) == 0xdc00; + } + +#endif // !defined(SRELLDBG_NO_BMH) + + static uchar32 to_codeunits(charT out[maxseqlen], uchar32 cp) + { + if (cp < 0x10000) + { + out[0] = static_cast(cp); + return 1; + } +// else // if (cp < 0x110000) + { + cp -= 0x10000; + out[0] = static_cast(((cp >> 10) & 0x3ff) | 0xd800); + out[1] = static_cast((cp & 0x3ff) | 0xdc00); + return 2; + } + } + + static uchar32 firstcodeunit(const uchar32 cp) + { + if (cp < 0x10000) + return cp; + + return static_cast((cp >> 10) + 0xd7c0); + // aaaaa bbbbcccc ddddeeee -> AA AAbb bbcc/cc dddd eeee where AAAA = aaaaa - 1. + } + + template + static bool seek_charboundary(ForwardIterator &begin, const ForwardIterator end) + { + for (; begin != end; ++begin) + { + if ((*begin & 0xdc00) != 0xdc00) + return true; + } + return false; + } +}; // utf16_traits + +// specialisation for char. +template <> +struct utf_traits : public utf_traits_core +{ +public: + + template + static uchar32 codepoint(ForwardIterator begin, const ForwardIterator /* end */) + { + return static_cast(static_cast(*begin)); + } + + template + static uchar32 codepoint_inc(ForwardIterator &begin, const ForwardIterator /* end */) + { + return static_cast(static_cast(*begin++)); + } + + template + static uchar32 prevcodepoint(BidirectionalIterator cur, const BidirectionalIterator /* begin */) + { + return static_cast(static_cast(*--cur)); + } + + template + static uchar32 dec_codepoint(BidirectionalIterator &cur, const BidirectionalIterator /* begin */) + { + return static_cast(static_cast(*--cur)); + } + +#if !defined(SRELLDBG_NO_BMH) +#endif // !defined(SRELLDBG_NO_BMH) +}; // utf_traits + +// specialisation for signed char. +template <> +struct utf_traits : public utf_traits +{ +}; + +// (signed) short, (signed) int, (signed) long, (signed) long long, ... + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) +template <> +struct utf_traits : public utf16_traits +{ +}; +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) +template <> +struct utf_traits : public utf8_traits +{ +}; +#endif + + } // regex_internal + +// ... "rei_utf_traits.hpp"] +// ["regex_traits.hpp" ... + +// 28.7, class template regex_traits: +template +struct regex_traits +{ +public: + + typedef charT char_type; + typedef std::basic_string string_type; + typedef std::locale locale_type; +// typedef bitmask_type char_class_type; + typedef int char_class_type; + + typedef regex_internal::utf_traits utf_traits; + +public: + +// regex_traits(); + + static std::size_t length(const char_type *p) + { + return std::char_traits::length(p); + } + + charT translate(const charT c) const + { + return c; + } + + charT translate_nocase(const charT c) const + { + return c; + } + + template + string_type transform(ForwardIterator first, ForwardIterator last) const + { + return string_type(first, last); + } + + template + string_type transform_primary(ForwardIterator first, ForwardIterator last) const + { + return string_type(first, last); + } + + template + string_type lookup_collatename(ForwardIterator first, ForwardIterator last) const + { + return string_type(first, last); + } + + template + char_class_type lookup_classname(ForwardIterator /* first */, ForwardIterator /* last */, bool /* icase */ = false) const + { + return static_cast(0); + } + + bool isctype(const charT /* c */, const char_class_type /* f */) const + { + return false; + } + + int value(const charT /* ch */, const int /* radix */) const + { + return -1; + } + + locale_type imbue(const locale_type /* l */) + { + return locale_type(); + } + + locale_type getloc() const + { + return locale_type(); + } +}; // regex_traits + +template +struct u8regex_traits : public regex_traits +{ + typedef regex_internal::utf8_traits utf_traits; +}; + +template +struct u16regex_traits : public regex_traits +{ + typedef regex_internal::utf16_traits utf_traits; +}; + +// ... "regex_traits.hpp"] +// ["rei_memory.hpp" ... + + namespace regex_internal + { +/* + * Similar to std::basic_string, except for: + * a. only allocates memory, does not initialise it. + * b. uses realloc() to avoid moving data as much as possible when + * resizing an allocated buffer. + */ +template +class simple_array +{ +public: + + typedef ElemT value_type; + typedef std::size_t size_type; + typedef ElemT &reference; + typedef const ElemT &const_reference; + typedef ElemT *pointer; + typedef const ElemT *const_pointer; + + static const size_type npos = static_cast(-1); + +public: + + simple_array() + : buffer_(NULL) + , size_(0) + , capacity_(0) + { + } + + simple_array(const size_type initsize) + : buffer_(NULL) + , size_(0) + , capacity_(0) + { + if (initsize) + { + buffer_ = static_cast(std::malloc(initsize * sizeof (ElemT))); + + if (buffer_ != NULL) + size_ = capacity_ = initsize; + else + throw std::bad_alloc(); + } + } + + simple_array(const simple_array &right, size_type pos, size_type len = npos) + : buffer_(NULL) + , size_(0) + , capacity_(0) + { + if (pos > right.size_) + pos = right.size_; + + { + const size_type len2 = right.size_ - pos; + if (len > len2) + len = len2; + } + + if (len) + { + buffer_ = static_cast(std::malloc(len * sizeof (ElemT))); + + if (buffer_ != NULL) + { + for (capacity_ = len; size_ < capacity_;) + buffer_[size_++] = right[pos++]; + } + else + { + throw std::bad_alloc(); + } + } + } + + simple_array(const simple_array &right) + : buffer_(NULL) + , size_(0) + , capacity_(0) + { + operator=(right); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + simple_array(simple_array &&right) SRELL_NOEXCEPT + : buffer_(right.buffer_) + , size_(right.size_) + , capacity_(right.capacity_) + { + right.size_ = 0; + right.capacity_ = 0; + right.buffer_ = NULL; + } +#endif + + simple_array &operator=(const simple_array &right) + { + if (this != &right) + { + resize(right.size_); + for (size_type i = 0; i < right.size_; ++i) + buffer_[i] = right.buffer_[i]; + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + simple_array &operator=(simple_array &&right) SRELL_NOEXCEPT + { + if (this != &right) + { + if (this->buffer_ != NULL) + std::free(this->buffer_); + + this->size_ = right.size_; + this->capacity_ = right.capacity_; + this->buffer_ = right.buffer_; + + right.size_ = 0; + right.capacity_ = 0; + right.buffer_ = NULL; + } + return *this; + } +#endif + + ~simple_array() + { + if (buffer_ != NULL) + std::free(buffer_); + } + + size_type size() const + { + return size_; + } + + void clear() + { + size_ = 0; + } + + void resize(const size_type newsize) + { + if (newsize > capacity_) + reserve(newsize); + + size_ = newsize; + } + + void resize(const size_type newsize, const ElemT &type) + { + size_type oldsize = size_; + + resize(newsize); + for (; oldsize < size_; ++oldsize) + buffer_[oldsize] = type; + } + + reference operator[](const size_type pos) + { + return buffer_[pos]; + } + + const_reference operator[](const size_type pos) const + { + return buffer_[pos]; + } + + void push_back(const_reference n) + { + const size_type oldsize = size_; + + if (++size_ > capacity_) + reserve(size_); + + buffer_[oldsize] = n; + } + + const_reference back() const + { + return buffer_[size_ - 1]; + } + + reference back() + { + return buffer_[size_ - 1]; + } + + void pop_back() + { + --size_; + } + + simple_array &operator+=(const simple_array &right) + { + return append(right); + } + + simple_array &append(const size_type size, const ElemT &type) + { + resize(size_ + size, type); + return *this; + } + + simple_array &append(const simple_array &right) + { + size_type oldsize = size_; + + resize(size_ + right.size_); + for (size_type i = 0; i < right.size_; ++i, ++oldsize) + buffer_[oldsize] = right.buffer_[i]; + + return *this; + } + + simple_array &append(const simple_array &right, size_type pos, size_type len /* = npos */) + { + { + const size_type len2 = right.size_ - pos; + if (len > len2) + len = len2; + } + + size_type oldsize = size_; + + resize(size_ + len); + len += pos; // end. + for (; pos < len; ++oldsize, ++pos) + buffer_[oldsize] = right.buffer_[pos]; + + return *this; + } + + // For rei_char_class class. + void erase(const size_type pos) + { + if (pos < size_) + { + std::memmove(buffer_ + pos, buffer_ + pos + 1, (size_ - pos - 1) * sizeof (ElemT)); + --size_; + } + } + + // For rei_compiler class. + void insert(const size_type pos, const ElemT &type) + { + move_forward(pos, 1); + buffer_[pos] = type; + } + + void insert(size_type pos, const simple_array &right) + { + move_forward(pos, right.size_); + for (size_type i = 0; i < right.size_; ++i, ++pos) + buffer_[pos] = right.buffer_[i]; + } + + void insert(size_type destpos, const simple_array &right, size_type srcpos, size_type srclen = npos) + { + { + const size_type len2 = right.size_ - srcpos; + if (srclen > len2) + srclen = len2; + } + + move_forward(destpos, srclen); + srclen += srcpos; // srcend. + for (; srcpos < srclen; ++destpos, ++srcpos) + buffer_[destpos] = right.buffer_[srcpos]; + } + + simple_array &replace(size_type pos, size_type count, const simple_array &right) + { + if (count < right.size_) + move_forward(pos + count, right.size_ - count); + else if (count > right.size_) + { + const pointer base = buffer_ + pos; + + std::memmove(base + right.size_, base + count, (size_ - pos - count) * sizeof (ElemT)); + size_ -= count - right.size_; + } + + for (size_type i = 0; i < right.size_; ++pos, ++i) + buffer_[pos] = right[i]; + + return *this; + } + + size_type find(const value_type c, size_type pos = 0) const + { + for (; pos <= size_; ++pos) + if (buffer_[pos] == c) + return pos; + + return npos; + } + + const_pointer data() const + { + return buffer_; + } + + int compare(size_type pos, const size_type count1, const_pointer p, const size_type count2) const + { + size_type count = count1 <= count2 ? count1 : count2; + + for (; count; ++pos, ++p, --count) + { + const value_type &v = buffer_[pos]; + if (v != *p) + return v < *p ? -1 : 1; + } + return count1 == count2 ? 0 : (count1 < count2 ? -1 : 1); + } + + size_type max_size() const + { + return maxsize_; + } + + void swap(simple_array &right) + { + if (this != &right) + { + const pointer tmpbuffer = this->buffer_; + const size_type tmpsize = this->size_; + const size_type tmpcapacity = this->capacity_; + + this->buffer_ = right.buffer_; + this->size_ = right.size_; + this->capacity_ = right.capacity_; + + right.buffer_ = tmpbuffer; + right.size_ = tmpsize; + right.capacity_ = tmpcapacity; + } + } + +private: + + void reserve(const size_type newsize) + { +// if (newsize > capacity_) + { + if (newsize <= maxsize_) + { +// capacity_ = newsize + (newsize >> 1); // newsize * 1.5. + capacity_ = ((newsize >> 8) + 1) << 8; // Round up to a multiple of 256. + + if (capacity_ > maxsize_) + capacity_ = maxsize_; + + const size_type newsize_in_byte = capacity_ * sizeof (ElemT); + const pointer oldbuffer = buffer_; + + buffer_ = static_cast(std::realloc(buffer_, newsize_in_byte)); + if (buffer_ != NULL) + return; + + // Even if realloc() failed, already-existing buffer remains valid. + std::free(oldbuffer); +// buffer_ = NULL; + size_ = capacity_ = 0; + } + throw std::bad_alloc(); + } + } + + void move_forward(const size_type pos, const size_type count) + { + const size_type oldsize = size_; + + resize(size_ + count); + + if (pos < oldsize) + { + const pointer base = buffer_ + pos; + + std::memmove(base + count, base, (oldsize - pos) * sizeof (ElemT)); + } + } + +private: + + pointer buffer_; + size_type size_; + size_type capacity_; + +// static const size_type maxsize_ = (npos - sizeof (simple_array)) / sizeof (ElemT); + static const size_type maxsize_ = (npos - sizeof (pointer) - sizeof (size_type) * 2) / sizeof (ElemT) / 2; +}; +// simple_array + + } // namespace regex_internal + +// ... "rei_memory.hpp"] +// ["rei_bitset.hpp" ... + + namespace regex_internal + { + +// Always uses a heap instead of the stack. +template +class bitset +{ +private: + + typedef unsigned long array_type; + +public: + + bitset() + : buffer_(static_cast(std::malloc(size_in_byte_))) + { + if (buffer_ != NULL) + { + reset(); + return; + } + throw std::bad_alloc(); + } + + bitset(const bitset &right) + : buffer_(static_cast(std::malloc(size_in_byte_))) + { + if (buffer_ != NULL) + { + operator=(right); + return; + } + throw std::bad_alloc(); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + bitset(bitset &&right) SRELL_NOEXCEPT + : buffer_(right.buffer_) + { + right.buffer_ = NULL; + } +#endif + + bitset &operator=(const bitset &right) + { + if (this != &right) + { +// for (std::size_t i = 0; i < arraylength_; ++i) +// buffer_[i] = right.buffer_[i]; + std::memcpy(buffer_, right.buffer_, size_in_byte_); + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + bitset &operator=(bitset &&right) SRELL_NOEXCEPT + { + if (this != &right) + { + if (this->buffer_ != NULL) + std::free(this->buffer_); + + this->buffer_ = right.buffer_; + right.buffer_ = NULL; + } + return *this; + } +#endif + + ~bitset() + { + if (buffer_ != NULL) + std::free(buffer_); + } + + bitset &reset() + { + std::memset(buffer_, 0, size_in_byte_); + return *this; + } + + bitset &reset(const std::size_t bit) + { + buffer_[bit / bits_per_elem_] &= ~(1 << (bit & bitmask_)); + return *this; + } + + bitset &set(const std::size_t bit) + { + buffer_[bit / bits_per_elem_] |= (1 << (bit & bitmask_)); + return *this; + } + +#if 0 + void set_range(const std::size_t firstbit, const std::size_t lastbit) + { + const std::size_t lastelemidx = lastbit / bits_per_elem_; + std::size_t firstelemidx = firstbit / bits_per_elem_; + const array_type lastelemmask = ~(allbits1_ << ((lastbit & bitmask_) + 1)); + array_type ormask = allbits1_ << (firstbit & bitmask_); + + if (firstelemidx < lastelemidx) + { + buffer_[firstelemidx] |= ormask; + ormask = allbits1_; + + for (++firstelemidx; firstelemidx < lastelemidx; ++firstelemidx) + buffer_[firstelemidx] |= ormask; + } + ormask &= lastelemmask; + buffer_[lastelemidx] |= ormask; + + } +#endif + + bool test(const std::size_t bit) const + { + return (buffer_[bit / bits_per_elem_] & (1 << (bit & bitmask_))) != 0; + } + + bool operator[](const std::size_t bit) const + { + return (buffer_[bit / bits_per_elem_] & (1 << (bit & bitmask_))) != 0; + } + + bitset &flip() + { + for (std::size_t i = 0; i < arraylength_; ++i) + buffer_[i] = ~buffer_[i]; + return *this; + } + + void swap(bitset &right) + { + if (this != &right) + { + array_type *const tmpbuffer = this->buffer_; + this->buffer_ = right.buffer_; + right.buffer_ = tmpbuffer; + } + } + +private: + +#if defined(__cpp_constexpr) + static constexpr std::size_t pow2leN(const std::size_t n, const std::size_t p2) + { + return ((p2 << 1) == 0 || (p2 << 1) > n) ? p2 : pow2leN(n, p2 << 1); + } + static const std::size_t bits_per_elem_ = pow2leN(CHAR_BIT * sizeof (array_type), 8); +#else + static const std::size_t bpe_tmp_ = CHAR_BIT * sizeof (array_type); + static const std::size_t bits_per_elem_ = bpe_tmp_ >= 64 ? 64 : (bpe_tmp_ >= 32 ? 32 : (bpe_tmp_ >= 16 ? 16 : 8)); +#endif + static const std::size_t bitmask_ = bits_per_elem_ - 1; + static const std::size_t arraylength_ = (Bits + bitmask_) / bits_per_elem_; + static const std::size_t size_in_byte_ = arraylength_ * sizeof (array_type); + static const array_type allbits1_ = ~static_cast(0); + + array_type *buffer_; +}; + + } // namespace regex_internal + +// ... "rei_bitset.hpp"] +// ["rei_ucf.hpp" ... + + namespace regex_internal + { + +#if !defined(SRELL_NO_UNICODE_ICASE) +// ["srell_ucfdata2.hpp" ... +// CaseFolding-14.0.0.txt +// Date: 2021-03-08, 19:35:41 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html + +template +struct unicode_casefolding +{ + static const T2 ucf_maxcodepoint = 0x1E921; + static const T3 ucf_deltatablesize = 0x1900; + static const T2 rev_maxcodepoint = 0x1E943; + static const T3 rev_indextablesize = 0x1B00; + static const T3 rev_charsettablesize = 4303; // 1 + 1424 * 2 + 1454 + static const T3 rev_maxset = 4; + static const T2 eos = 0; + + static const T2 ucf_deltatable[]; + static const T3 ucf_segmenttable[]; + static const T3 rev_indextable[]; + static const T3 rev_segmenttable[]; + static const T2 rev_charsettable[]; + + static const T2 *ucf_deltatable_ptr() + { + return ucf_deltatable; + } + static const T3 *ucf_segmenttable_ptr() + { + return ucf_segmenttable; + } + static const T3 *rev_indextable_ptr() + { + return rev_indextable; + } + static const T3 *rev_segmenttable_ptr() + { + return rev_segmenttable; + } + static const T2 *rev_charsettable_ptr() + { + return rev_charsettable; + } +}; + +template +const T2 unicode_casefolding::ucf_deltatable[] = +{ + // For common (0) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+00xx (256) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 775, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 0, 32, 32, 32, 32, 32, 32, 32, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+01xx (512) + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, static_cast(-121), 1, 0, 1, 0, 1, 0, static_cast(-268), + 0, 210, 1, 0, 1, 0, 206, 1, 0, 205, 205, 1, 0, 0, 79, 202, + 203, 1, 0, 205, 207, 0, 211, 209, 1, 0, 0, 0, 211, 213, 0, 214, + 1, 0, 1, 0, 1, 0, 218, 1, 0, 218, 0, 0, 1, 0, 218, 1, + 0, 217, 217, 1, 0, 1, 0, 219, 1, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 2, 1, 0, 1, 0, static_cast(-97), static_cast(-56), 1, 0, 1, 0, 1, 0, 1, 0, + + // For u+02xx (768) + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + static_cast(-130), 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 10795, 1, 0, static_cast(-163), 10792, 0, + 0, 1, 0, static_cast(-195), 69, 71, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+03xx (1024) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 116, + 0, 0, 0, 0, 0, 0, 38, 0, 37, 37, 37, 0, 64, 0, 63, 63, + 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, + static_cast(-30), static_cast(-25), 0, 0, 0, static_cast(-15), static_cast(-22), 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + static_cast(-54), static_cast(-48), 0, 0, static_cast(-60), static_cast(-64), 0, 1, 0, static_cast(-7), 1, 0, 0, static_cast(-130), static_cast(-130), static_cast(-130), + + // For u+04xx (1280) + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 15, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + + // For u+05xx (1536) + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+10xx (1792) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, + 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, + 7264, 7264, 7264, 7264, 7264, 7264, 0, 7264, 0, 0, 0, 0, 0, 7264, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+13xx (2048) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), 0, 0, + + // For u+1Cxx (2304) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + static_cast(-6222), static_cast(-6221), static_cast(-6212), static_cast(-6210), static_cast(-6210), static_cast(-6211), static_cast(-6204), static_cast(-6180), 35267, 0, 0, 0, 0, 0, 0, 0, + static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), + static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), + static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), 0, 0, static_cast(-3008), static_cast(-3008), static_cast(-3008), + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1Exx (2560) + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, static_cast(-58), 0, 0, static_cast(-7615), 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + + // For u+1Fxx (2816) + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), 0, static_cast(-8), 0, static_cast(-8), 0, static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-74), static_cast(-74), static_cast(-9), 0, static_cast(-7173), 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-86), static_cast(-86), static_cast(-86), static_cast(-86), static_cast(-9), 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-100), static_cast(-100), 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-112), static_cast(-112), static_cast(-7), 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-128), static_cast(-128), static_cast(-126), static_cast(-126), static_cast(-9), 0, 0, 0, + + // For u+21xx (3072) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, static_cast(-7517), 0, 0, 0, static_cast(-8383), static_cast(-8262), 0, 0, 0, 0, + 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+24xx (3328) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+2Cxx (3584) + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, static_cast(-10743), static_cast(-3814), static_cast(-10727), 0, 0, 1, 0, 1, 0, 1, 0, static_cast(-10780), static_cast(-10749), static_cast(-10783), + static_cast(-10782), 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-10815), static_cast(-10815), + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+A6xx (3840) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+A7xx (4096) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, static_cast(-35332), 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, static_cast(-42280), 0, 0, + 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, static_cast(-42308), static_cast(-42319), static_cast(-42315), static_cast(-42305), static_cast(-42308), 0, + static_cast(-42258), static_cast(-42282), static_cast(-42261), 928, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, static_cast(-48), static_cast(-42307), static_cast(-35384), 1, 0, 1, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+ABxx (4352) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), + static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), + static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), + static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), + static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+FFxx (4608) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+104xx (4864) + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+105xx (5120) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 0, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 0, 39, 39, 39, 39, + 39, 39, 39, 0, 39, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+10Cxx (5376) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+118xx (5632) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+16Exx (5888) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1E9xx (6144) + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +template +const T3 unicode_casefolding::ucf_segmenttable[] = +{ + 256, 512, 768, 1024, 1280, 1536, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1792, 0, 0, 2048, 0, 0, 0, 0, 0, 0, 0, 0, 2304, 0, 2560, 2816, + 0, 3072, 0, 0, 3328, 0, 0, 0, 0, 0, 0, 0, 3584, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3840, 4096, 0, 0, 0, 4352, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4608, + 0, 0, 0, 0, 4864, 5120, 0, 0, 0, 0, 0, 0, 5376, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 5632, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5888, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6144 +}; + +template +const T3 unicode_casefolding::rev_indextable[] = +{ + // For common (0) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+00xx (256) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 35, 38, 41, 44, + 47, 50, 53, 56, 60, 63, 66, 69, 72, 75, 78, 0, 0, 0, 0, 0, + 0, 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 35, 38, 41, 44, + 47, 50, 53, 56, 60, 63, 66, 69, 72, 75, 78, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 85, 88, 91, 94, 97, 100, 104, 107, 110, 113, 116, 119, 122, 125, 128, 131, + 134, 137, 140, 143, 146, 149, 152, 0, 155, 158, 161, 164, 167, 170, 173, 1924, + 85, 88, 91, 94, 97, 100, 104, 107, 110, 113, 116, 119, 122, 125, 128, 131, + 134, 137, 140, 143, 146, 149, 152, 0, 155, 158, 161, 164, 167, 170, 173, 350, + + // For u+21xx (512) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 785, 0, 0, 0, 31, 100, 0, 0, 0, 0, + 0, 0, 2359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2359, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2362, 2365, 2368, 2371, 2374, 2377, 2380, 2383, 2386, 2389, 2392, 2395, 2398, 2401, 2404, 2407, + 2362, 2365, 2368, 2371, 2374, 2377, 2380, 2383, 2386, 2389, 2392, 2395, 2398, 2401, 2404, 2407, + 0, 0, 0, 2410, 2410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+01xx (768) + 176, 176, 179, 179, 182, 182, 185, 185, 188, 188, 191, 191, 194, 194, 197, 197, + 200, 200, 203, 203, 206, 206, 209, 209, 212, 212, 215, 215, 218, 218, 221, 221, + 224, 224, 227, 227, 230, 230, 233, 233, 236, 236, 239, 239, 242, 242, 245, 245, + 0, 0, 248, 248, 251, 251, 254, 254, 0, 257, 257, 260, 260, 263, 263, 266, + 266, 269, 269, 272, 272, 275, 275, 278, 278, 0, 281, 281, 284, 284, 287, 287, + 290, 290, 293, 293, 296, 296, 299, 299, 302, 302, 305, 305, 308, 308, 311, 311, + 314, 314, 317, 317, 320, 320, 323, 323, 326, 326, 329, 329, 332, 332, 335, 335, + 338, 338, 341, 341, 344, 344, 347, 347, 350, 353, 353, 356, 356, 359, 359, 56, + 651, 362, 365, 365, 368, 368, 371, 374, 374, 377, 380, 383, 383, 0, 386, 389, + 392, 395, 395, 398, 401, 540, 404, 407, 410, 410, 642, 0, 413, 416, 606, 419, + 422, 422, 425, 425, 428, 428, 431, 434, 434, 437, 0, 0, 440, 440, 443, 446, + 446, 449, 452, 455, 455, 458, 458, 461, 464, 464, 0, 0, 467, 467, 0, 543, + 0, 0, 0, 0, 470, 470, 470, 474, 474, 474, 478, 478, 478, 482, 482, 485, + 485, 488, 488, 491, 491, 494, 494, 497, 497, 500, 500, 503, 503, 386, 506, 506, + 509, 509, 512, 512, 515, 515, 518, 518, 521, 521, 524, 524, 527, 527, 530, 530, + 0, 533, 533, 533, 537, 537, 540, 543, 546, 546, 549, 549, 552, 552, 555, 555, + + // For u+03xx (1024) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 675, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 680, 680, 683, 683, 0, 0, 686, 686, 0, 0, 0, 843, 846, 849, 0, 689, + 0, 0, 0, 0, 0, 0, 692, 0, 695, 698, 701, 0, 704, 0, 707, 710, + 0, 713, 716, 720, 723, 726, 730, 733, 736, 675, 741, 745, 81, 748, 751, 754, + 757, 761, 0, 765, 769, 772, 775, 779, 782, 785, 789, 792, 692, 695, 698, 701, + 0, 713, 716, 720, 723, 726, 730, 733, 736, 675, 741, 745, 81, 748, 751, 754, + 757, 761, 765, 765, 769, 772, 775, 779, 782, 785, 789, 792, 704, 707, 710, 795, + 716, 736, 0, 0, 0, 775, 757, 795, 798, 798, 801, 801, 804, 804, 807, 807, + 810, 810, 813, 813, 816, 816, 819, 819, 822, 822, 825, 825, 828, 828, 831, 831, + 741, 761, 837, 689, 736, 726, 0, 834, 834, 837, 840, 840, 0, 843, 846, 849, + + // For u+02xx (1280) + 558, 558, 561, 561, 564, 564, 567, 567, 570, 570, 573, 573, 576, 576, 579, 579, + 582, 582, 585, 585, 588, 588, 591, 591, 594, 594, 597, 597, 600, 600, 603, 603, + 606, 0, 609, 609, 612, 612, 615, 615, 618, 618, 621, 621, 624, 624, 627, 627, + 630, 630, 633, 633, 0, 0, 0, 0, 0, 0, 636, 639, 639, 642, 645, 2674, + 2677, 648, 648, 651, 654, 657, 660, 660, 663, 663, 666, 666, 669, 669, 672, 672, + 2662, 2656, 2665, 362, 371, 0, 377, 380, 0, 389, 0, 392, 3130, 0, 0, 0, + 398, 3133, 0, 401, 0, 3088, 3127, 0, 407, 404, 3139, 2638, 3136, 0, 0, 413, + 0, 2659, 416, 0, 0, 419, 0, 0, 0, 0, 0, 0, 0, 2644, 0, 0, + 431, 0, 3181, 437, 0, 0, 0, 3145, 443, 654, 449, 452, 657, 0, 0, 0, + 0, 0, 461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3148, 3142, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+2Cxx (1536) + 2491, 2494, 2497, 2500, 2503, 2506, 2509, 2512, 2515, 2518, 2521, 2524, 2527, 2530, 2533, 2536, + 2539, 2542, 2545, 2548, 2551, 2554, 2557, 2560, 2563, 2566, 2569, 2572, 2575, 2578, 2581, 2584, + 2587, 2590, 2593, 2596, 2599, 2602, 2605, 2608, 2611, 2614, 2617, 2620, 2623, 2626, 2629, 2632, + 2491, 2494, 2497, 2500, 2503, 2506, 2509, 2512, 2515, 2518, 2521, 2524, 2527, 2530, 2533, 2536, + 2539, 2542, 2545, 2548, 2551, 2554, 2557, 2560, 2563, 2566, 2569, 2572, 2575, 2578, 2581, 2584, + 2587, 2590, 2593, 2596, 2599, 2602, 2605, 2608, 2611, 2614, 2617, 2620, 2623, 2626, 2629, 2632, + 2635, 2635, 2638, 2641, 2644, 636, 645, 2647, 2647, 2650, 2650, 2653, 2653, 2656, 2659, 2662, + 2665, 0, 2668, 2668, 0, 2671, 2671, 0, 0, 0, 0, 0, 0, 0, 2674, 2677, + 2680, 2680, 2683, 2683, 2686, 2686, 2689, 2689, 2692, 2692, 2695, 2695, 2698, 2698, 2701, 2701, + 2704, 2704, 2707, 2707, 2710, 2710, 2713, 2713, 2716, 2716, 2719, 2719, 2722, 2722, 2725, 2725, + 2728, 2728, 2731, 2731, 2734, 2734, 2737, 2737, 2740, 2740, 2743, 2743, 2746, 2746, 2749, 2749, + 2752, 2752, 2755, 2755, 2758, 2758, 2761, 2761, 2764, 2764, 2767, 2767, 2770, 2770, 2773, 2773, + 2776, 2776, 2779, 2779, 2782, 2782, 2785, 2785, 2788, 2788, 2791, 2791, 2794, 2794, 2797, 2797, + 2800, 2800, 2803, 2803, 2806, 2806, 2809, 2809, 2812, 2812, 2815, 2815, 2818, 2818, 2821, 2821, + 2824, 2824, 2827, 2827, 0, 0, 0, 0, 0, 0, 0, 2830, 2830, 2833, 2833, 0, + 0, 0, 2836, 2836, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1Fxx (1792) + 2071, 2074, 2077, 2080, 2083, 2086, 2089, 2092, 2071, 2074, 2077, 2080, 2083, 2086, 2089, 2092, + 2095, 2098, 2101, 2104, 2107, 2110, 0, 0, 2095, 2098, 2101, 2104, 2107, 2110, 0, 0, + 2113, 2116, 2119, 2122, 2125, 2128, 2131, 2134, 2113, 2116, 2119, 2122, 2125, 2128, 2131, 2134, + 2137, 2140, 2143, 2146, 2149, 2152, 2155, 2158, 2137, 2140, 2143, 2146, 2149, 2152, 2155, 2158, + 2161, 2164, 2167, 2170, 2173, 2176, 0, 0, 2161, 2164, 2167, 2170, 2173, 2176, 0, 0, + 0, 2179, 0, 2182, 0, 2185, 0, 2188, 0, 2179, 0, 2182, 0, 2185, 0, 2188, + 2191, 2194, 2197, 2200, 2203, 2206, 2209, 2212, 2191, 2194, 2197, 2200, 2203, 2206, 2209, 2212, + 2293, 2296, 2302, 2305, 2308, 2311, 2323, 2326, 2344, 2347, 2335, 2338, 2350, 2353, 0, 0, + 2215, 2218, 2221, 2224, 2227, 2230, 2233, 2236, 2215, 2218, 2221, 2224, 2227, 2230, 2233, 2236, + 2239, 2242, 2245, 2248, 2251, 2254, 2257, 2260, 2239, 2242, 2245, 2248, 2251, 2254, 2257, 2260, + 2263, 2266, 2269, 2272, 2275, 2278, 2281, 2284, 2263, 2266, 2269, 2272, 2275, 2278, 2281, 2284, + 2287, 2290, 0, 2299, 0, 0, 0, 0, 2287, 2290, 2293, 2296, 2299, 0, 675, 0, + 0, 0, 0, 2314, 0, 0, 0, 0, 2302, 2305, 2308, 2311, 2314, 0, 0, 0, + 2317, 2320, 0, 0, 0, 0, 0, 0, 2317, 2320, 2323, 2326, 0, 0, 0, 0, + 2329, 2332, 0, 0, 0, 2341, 0, 0, 2329, 2332, 2335, 2338, 2341, 0, 0, 0, + 0, 0, 0, 2356, 0, 0, 0, 0, 2344, 2347, 2350, 2353, 2356, 0, 0, 0, + + // For u+04xx (2048) + 852, 855, 858, 861, 864, 867, 870, 873, 876, 879, 882, 885, 888, 891, 894, 897, + 900, 903, 906, 910, 913, 917, 920, 923, 926, 929, 932, 935, 938, 941, 944, 948, + 951, 954, 958, 963, 966, 969, 972, 975, 978, 981, 984, 988, 991, 994, 997, 1000, + 900, 903, 906, 910, 913, 917, 920, 923, 926, 929, 932, 935, 938, 941, 944, 948, + 951, 954, 958, 963, 966, 969, 972, 975, 978, 981, 984, 988, 991, 994, 997, 1000, + 852, 855, 858, 861, 864, 867, 870, 873, 876, 879, 882, 885, 888, 891, 894, 897, + 1003, 1003, 1006, 1006, 1010, 1010, 1013, 1013, 1016, 1016, 1019, 1019, 1022, 1022, 1025, 1025, + 1028, 1028, 1031, 1031, 1034, 1034, 1037, 1037, 1040, 1040, 1043, 1043, 1046, 1046, 1049, 1049, + 1052, 1052, 0, 0, 0, 0, 0, 0, 0, 0, 1055, 1055, 1058, 1058, 1061, 1061, + 1064, 1064, 1067, 1067, 1070, 1070, 1073, 1073, 1076, 1076, 1079, 1079, 1082, 1082, 1085, 1085, + 1088, 1088, 1091, 1091, 1094, 1094, 1097, 1097, 1100, 1100, 1103, 1103, 1106, 1106, 1109, 1109, + 1112, 1112, 1115, 1115, 1118, 1118, 1121, 1121, 1124, 1124, 1127, 1127, 1130, 1130, 1133, 1133, + 1136, 1139, 1139, 1142, 1142, 1145, 1145, 1148, 1148, 1151, 1151, 1154, 1154, 1157, 1157, 1136, + 1160, 1160, 1163, 1163, 1166, 1166, 1169, 1169, 1172, 1172, 1175, 1175, 1178, 1178, 1181, 1181, + 1184, 1184, 1187, 1187, 1190, 1190, 1193, 1193, 1196, 1196, 1199, 1199, 1202, 1202, 1205, 1205, + 1208, 1208, 1211, 1211, 1214, 1214, 1217, 1217, 1220, 1220, 1223, 1223, 1226, 1226, 1229, 1229, + + // For u+1Cxx (2304) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 906, 913, 944, 954, 958, 958, 984, 1006, 1556, 0, 0, 0, 0, 0, 0, 0, + 1560, 1563, 1566, 1569, 1572, 1575, 1578, 1581, 1584, 1587, 1590, 1593, 1596, 1599, 1602, 1605, + 1608, 1611, 1614, 1617, 1620, 1623, 1626, 1629, 1632, 1635, 1638, 1641, 1644, 1647, 1650, 1653, + 1656, 1659, 1662, 1665, 1668, 1671, 1674, 1677, 1680, 1683, 1686, 0, 0, 1689, 1692, 1695, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+05xx (2560) + 1232, 1232, 1235, 1235, 1238, 1238, 1241, 1241, 1244, 1244, 1247, 1247, 1250, 1250, 1253, 1253, + 1256, 1256, 1259, 1259, 1262, 1262, 1265, 1265, 1268, 1268, 1271, 1271, 1274, 1274, 1277, 1277, + 1280, 1280, 1283, 1283, 1286, 1286, 1289, 1289, 1292, 1292, 1295, 1295, 1298, 1298, 1301, 1301, + 0, 1304, 1307, 1310, 1313, 1316, 1319, 1322, 1325, 1328, 1331, 1334, 1337, 1340, 1343, 1346, + 1349, 1352, 1355, 1358, 1361, 1364, 1367, 1370, 1373, 1376, 1379, 1382, 1385, 1388, 1391, 1394, + 1397, 1400, 1403, 1406, 1409, 1412, 1415, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1304, 1307, 1310, 1313, 1316, 1319, 1322, 1325, 1328, 1331, 1334, 1337, 1340, 1343, 1346, + 1349, 1352, 1355, 1358, 1361, 1364, 1367, 1370, 1373, 1376, 1379, 1382, 1385, 1388, 1391, 1394, + 1397, 1400, 1403, 1406, 1409, 1412, 1415, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+2Dxx (2816) + 1418, 1421, 1424, 1427, 1430, 1433, 1436, 1439, 1442, 1445, 1448, 1451, 1454, 1457, 1460, 1463, + 1466, 1469, 1472, 1475, 1478, 1481, 1484, 1487, 1490, 1493, 1496, 1499, 1502, 1505, 1508, 1511, + 1514, 1517, 1520, 1523, 1526, 1529, 0, 1532, 0, 0, 0, 0, 0, 1535, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+10xx (3072) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1418, 1421, 1424, 1427, 1430, 1433, 1436, 1439, 1442, 1445, 1448, 1451, 1454, 1457, 1460, 1463, + 1466, 1469, 1472, 1475, 1478, 1481, 1484, 1487, 1490, 1493, 1496, 1499, 1502, 1505, 1508, 1511, + 1514, 1517, 1520, 1523, 1526, 1529, 0, 1532, 0, 0, 0, 0, 0, 1535, 0, 0, + 1560, 1563, 1566, 1569, 1572, 1575, 1578, 1581, 1584, 1587, 1590, 1593, 1596, 1599, 1602, 1605, + 1608, 1611, 1614, 1617, 1620, 1623, 1626, 1629, 1632, 1635, 1638, 1641, 1644, 1647, 1650, 1653, + 1656, 1659, 1662, 1665, 1668, 1671, 1674, 1677, 1680, 1683, 1686, 0, 0, 1689, 1692, 1695, + + // For u+13xx (3328) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3205, 3208, 3211, 3214, 3217, 3220, 3223, 3226, 3229, 3232, 3235, 3238, 3241, 3244, 3247, 3250, + 3253, 3256, 3259, 3262, 3265, 3268, 3271, 3274, 3277, 3280, 3283, 3286, 3289, 3292, 3295, 3298, + 3301, 3304, 3307, 3310, 3313, 3316, 3319, 3322, 3325, 3328, 3331, 3334, 3337, 3340, 3343, 3346, + 3349, 3352, 3355, 3358, 3361, 3364, 3367, 3370, 3373, 3376, 3379, 3382, 3385, 3388, 3391, 3394, + 3397, 3400, 3403, 3406, 3409, 3412, 3415, 3418, 3421, 3424, 3427, 3430, 3433, 3436, 3439, 3442, + 1538, 1541, 1544, 1547, 1550, 1553, 0, 0, 1538, 1541, 1544, 1547, 1550, 1553, 0, 0, + + // For u+A6xx (3584) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2839, 2839, 2842, 2842, 2845, 2845, 2848, 2848, 2851, 2851, 1556, 1556, 2854, 2854, 2857, 2857, + 2860, 2860, 2863, 2863, 2866, 2866, 2869, 2869, 2872, 2872, 2875, 2875, 2878, 2878, 2881, 2881, + 2884, 2884, 2887, 2887, 2890, 2890, 2893, 2893, 2896, 2896, 2899, 2899, 2902, 2902, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2905, 2905, 2908, 2908, 2911, 2911, 2914, 2914, 2917, 2917, 2920, 2920, 2923, 2923, 2926, 2926, + 2929, 2929, 2932, 2932, 2935, 2935, 2938, 2938, 2941, 2941, 2944, 2944, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1Exx (3840) + 1698, 1698, 1701, 1701, 1704, 1704, 1707, 1707, 1710, 1710, 1713, 1713, 1716, 1716, 1719, 1719, + 1722, 1722, 1725, 1725, 1728, 1728, 1731, 1731, 1734, 1734, 1737, 1737, 1740, 1740, 1743, 1743, + 1746, 1746, 1749, 1749, 1752, 1752, 1755, 1755, 1758, 1758, 1761, 1761, 1764, 1764, 1767, 1767, + 1770, 1770, 1773, 1773, 1776, 1776, 1779, 1779, 1782, 1782, 1785, 1785, 1788, 1788, 1791, 1791, + 1794, 1794, 1797, 1797, 1800, 1800, 1803, 1803, 1806, 1806, 1809, 1809, 1812, 1812, 1815, 1815, + 1818, 1818, 1821, 1821, 1824, 1824, 1827, 1827, 1830, 1830, 1833, 1833, 1836, 1836, 1839, 1839, + 1842, 1842, 1846, 1846, 1849, 1849, 1852, 1852, 1855, 1855, 1858, 1858, 1861, 1861, 1864, 1864, + 1867, 1867, 1870, 1870, 1873, 1873, 1876, 1876, 1879, 1879, 1882, 1882, 1885, 1885, 1888, 1888, + 1891, 1891, 1894, 1894, 1897, 1897, 1900, 1900, 1903, 1903, 1906, 1906, 1909, 1909, 1912, 1912, + 1915, 1915, 1918, 1918, 1921, 1921, 0, 0, 0, 0, 0, 1842, 0, 0, 1924, 0, + 1927, 1927, 1930, 1930, 1933, 1933, 1936, 1936, 1939, 1939, 1942, 1942, 1945, 1945, 1948, 1948, + 1951, 1951, 1954, 1954, 1957, 1957, 1960, 1960, 1963, 1963, 1966, 1966, 1969, 1969, 1972, 1972, + 1975, 1975, 1978, 1978, 1981, 1981, 1984, 1984, 1987, 1987, 1990, 1990, 1993, 1993, 1996, 1996, + 1999, 1999, 2002, 2002, 2005, 2005, 2008, 2008, 2011, 2011, 2014, 2014, 2017, 2017, 2020, 2020, + 2023, 2023, 2026, 2026, 2029, 2029, 2032, 2032, 2035, 2035, 2038, 2038, 2041, 2041, 2044, 2044, + 2047, 2047, 2050, 2050, 2053, 2053, 2056, 2056, 2059, 2059, 2062, 2062, 2065, 2065, 2068, 2068, + + // For u+24xx (4096) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2413, 2416, 2419, 2422, 2425, 2428, 2431, 2434, 2437, 2440, + 2443, 2446, 2449, 2452, 2455, 2458, 2461, 2464, 2467, 2470, 2473, 2476, 2479, 2482, 2485, 2488, + 2413, 2416, 2419, 2422, 2425, 2428, 2431, 2434, 2437, 2440, 2443, 2446, 2449, 2452, 2455, 2458, + 2461, 2464, 2467, 2470, 2473, 2476, 2479, 2482, 2485, 2488, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1Dxx (4352) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3067, 0, 0, 0, 2641, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3184, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+A7xx (4608) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2947, 2947, 2950, 2950, 2953, 2953, 2956, 2956, 2959, 2959, 2962, 2962, 2965, 2965, + 0, 0, 2968, 2968, 2971, 2971, 2974, 2974, 2977, 2977, 2980, 2980, 2983, 2983, 2986, 2986, + 2989, 2989, 2992, 2992, 2995, 2995, 2998, 2998, 3001, 3001, 3004, 3004, 3007, 3007, 3010, 3010, + 3013, 3013, 3016, 3016, 3019, 3019, 3022, 3022, 3025, 3025, 3028, 3028, 3031, 3031, 3034, 3034, + 3037, 3037, 3040, 3040, 3043, 3043, 3046, 3046, 3049, 3049, 3052, 3052, 3055, 3055, 3058, 3058, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3061, 3061, 3064, 3064, 3067, 3070, 3070, + 3073, 3073, 3076, 3076, 3079, 3079, 3082, 3082, 0, 0, 0, 3085, 3085, 3088, 0, 0, + 3091, 3091, 3094, 3094, 3178, 0, 3097, 3097, 3100, 3100, 3103, 3103, 3106, 3106, 3109, 3109, + 3112, 3112, 3115, 3115, 3118, 3118, 3121, 3121, 3124, 3124, 3127, 3130, 3133, 3136, 3139, 0, + 3142, 3145, 3148, 3151, 3154, 3154, 3157, 3157, 3160, 3160, 3163, 3163, 3166, 3166, 3169, 3169, + 3172, 3172, 3175, 3175, 3178, 3181, 3184, 3187, 3187, 3190, 3190, 0, 0, 0, 0, 0, + 3193, 3193, 0, 0, 0, 0, 3196, 3196, 3199, 3199, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3202, 3202, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+ABxx (4864) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3205, 3208, 3211, 3214, 3217, 3220, 3223, 3226, 3229, 3232, 3235, 3238, 3241, 3244, 3247, 3250, + 3253, 3256, 3259, 3262, 3265, 3268, 3271, 3274, 3277, 3280, 3283, 3286, 3289, 3292, 3295, 3298, + 3301, 3304, 3307, 3310, 3313, 3316, 3319, 3322, 3325, 3328, 3331, 3334, 3337, 3340, 3343, 3346, + 3349, 3352, 3355, 3358, 3361, 3364, 3367, 3370, 3373, 3376, 3379, 3382, 3385, 3388, 3391, 3394, + 3397, 3400, 3403, 3406, 3409, 3412, 3415, 3418, 3421, 3424, 3427, 3430, 3433, 3436, 3439, 3442, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+FFxx (5120) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3445, 3448, 3451, 3454, 3457, 3460, 3463, 3466, 3469, 3472, 3475, 3478, 3481, 3484, 3487, + 3490, 3493, 3496, 3499, 3502, 3505, 3508, 3511, 3514, 3517, 3520, 0, 0, 0, 0, 0, + 0, 3445, 3448, 3451, 3454, 3457, 3460, 3463, 3466, 3469, 3472, 3475, 3478, 3481, 3484, 3487, + 3490, 3493, 3496, 3499, 3502, 3505, 3508, 3511, 3514, 3517, 3520, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+104xx (5376) + 3523, 3526, 3529, 3532, 3535, 3538, 3541, 3544, 3547, 3550, 3553, 3556, 3559, 3562, 3565, 3568, + 3571, 3574, 3577, 3580, 3583, 3586, 3589, 3592, 3595, 3598, 3601, 3604, 3607, 3610, 3613, 3616, + 3619, 3622, 3625, 3628, 3631, 3634, 3637, 3640, 3523, 3526, 3529, 3532, 3535, 3538, 3541, 3544, + 3547, 3550, 3553, 3556, 3559, 3562, 3565, 3568, 3571, 3574, 3577, 3580, 3583, 3586, 3589, 3592, + 3595, 3598, 3601, 3604, 3607, 3610, 3613, 3616, 3619, 3622, 3625, 3628, 3631, 3634, 3637, 3640, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3643, 3646, 3649, 3652, 3655, 3658, 3661, 3664, 3667, 3670, 3673, 3676, 3679, 3682, 3685, 3688, + 3691, 3694, 3697, 3700, 3703, 3706, 3709, 3712, 3715, 3718, 3721, 3724, 3727, 3730, 3733, 3736, + 3739, 3742, 3745, 3748, 0, 0, 0, 0, 3643, 3646, 3649, 3652, 3655, 3658, 3661, 3664, + 3667, 3670, 3673, 3676, 3679, 3682, 3685, 3688, 3691, 3694, 3697, 3700, 3703, 3706, 3709, 3712, + 3715, 3718, 3721, 3724, 3727, 3730, 3733, 3736, 3739, 3742, 3745, 3748, 0, 0, 0, 0, + + // For u+105xx (5632) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3751, 3754, 3757, 3760, 3763, 3766, 3769, 3772, 3775, 3778, 3781, 0, 3784, 3787, 3790, 3793, + 3796, 3799, 3802, 3805, 3808, 3811, 3814, 3817, 3820, 3823, 3826, 0, 3829, 3832, 3835, 3838, + 3841, 3844, 3847, 0, 3850, 3853, 0, 3751, 3754, 3757, 3760, 3763, 3766, 3769, 3772, 3775, + 3778, 3781, 0, 3784, 3787, 3790, 3793, 3796, 3799, 3802, 3805, 3808, 3811, 3814, 3817, 3820, + 3823, 3826, 0, 3829, 3832, 3835, 3838, 3841, 3844, 3847, 0, 3850, 3853, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+10Cxx (5888) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3856, 3859, 3862, 3865, 3868, 3871, 3874, 3877, 3880, 3883, 3886, 3889, 3892, 3895, 3898, 3901, + 3904, 3907, 3910, 3913, 3916, 3919, 3922, 3925, 3928, 3931, 3934, 3937, 3940, 3943, 3946, 3949, + 3952, 3955, 3958, 3961, 3964, 3967, 3970, 3973, 3976, 3979, 3982, 3985, 3988, 3991, 3994, 3997, + 4000, 4003, 4006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3856, 3859, 3862, 3865, 3868, 3871, 3874, 3877, 3880, 3883, 3886, 3889, 3892, 3895, 3898, 3901, + 3904, 3907, 3910, 3913, 3916, 3919, 3922, 3925, 3928, 3931, 3934, 3937, 3940, 3943, 3946, 3949, + 3952, 3955, 3958, 3961, 3964, 3967, 3970, 3973, 3976, 3979, 3982, 3985, 3988, 3991, 3994, 3997, + 4000, 4003, 4006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+118xx (6144) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4009, 4012, 4015, 4018, 4021, 4024, 4027, 4030, 4033, 4036, 4039, 4042, 4045, 4048, 4051, 4054, + 4057, 4060, 4063, 4066, 4069, 4072, 4075, 4078, 4081, 4084, 4087, 4090, 4093, 4096, 4099, 4102, + 4009, 4012, 4015, 4018, 4021, 4024, 4027, 4030, 4033, 4036, 4039, 4042, 4045, 4048, 4051, 4054, + 4057, 4060, 4063, 4066, 4069, 4072, 4075, 4078, 4081, 4084, 4087, 4090, 4093, 4096, 4099, 4102, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+16Exx (6400) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4105, 4108, 4111, 4114, 4117, 4120, 4123, 4126, 4129, 4132, 4135, 4138, 4141, 4144, 4147, 4150, + 4153, 4156, 4159, 4162, 4165, 4168, 4171, 4174, 4177, 4180, 4183, 4186, 4189, 4192, 4195, 4198, + 4105, 4108, 4111, 4114, 4117, 4120, 4123, 4126, 4129, 4132, 4135, 4138, 4141, 4144, 4147, 4150, + 4153, 4156, 4159, 4162, 4165, 4168, 4171, 4174, 4177, 4180, 4183, 4186, 4189, 4192, 4195, 4198, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1E9xx (6656) + 4201, 4204, 4207, 4210, 4213, 4216, 4219, 4222, 4225, 4228, 4231, 4234, 4237, 4240, 4243, 4246, + 4249, 4252, 4255, 4258, 4261, 4264, 4267, 4270, 4273, 4276, 4279, 4282, 4285, 4288, 4291, 4294, + 4297, 4300, 4201, 4204, 4207, 4210, 4213, 4216, 4219, 4222, 4225, 4228, 4231, 4234, 4237, 4240, + 4243, 4246, 4249, 4252, 4255, 4258, 4261, 4264, 4267, 4270, 4273, 4276, 4279, 4282, 4285, 4288, + 4291, 4294, 4297, 4300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +template +const T3 unicode_casefolding::rev_segmenttable[] = +{ + 256, 768, 1280, 1024, 2048, 2560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3072, 0, 0, 3328, 0, 0, 0, 0, 0, 0, 0, 0, 2304, 4352, 3840, 1792, + 0, 512, 0, 0, 4096, 0, 0, 0, 0, 0, 0, 0, 1536, 2816, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3584, 4608, 0, 0, 0, 4864, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5120, + 0, 0, 0, 0, 5376, 5632, 0, 0, 0, 0, 0, 0, 5888, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6144, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6400, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6656 +}; + +template +const T2 unicode_casefolding::rev_charsettable[] = +{ + eos, // 0 + 0x0061, 0x0041, eos, + 0x0062, 0x0042, eos, + 0x0063, 0x0043, eos, + 0x0064, 0x0044, eos, // 10 + 0x0065, 0x0045, eos, + 0x0066, 0x0046, eos, + 0x0067, 0x0047, eos, + 0x0068, 0x0048, eos, // 22 + 0x0069, 0x0049, eos, + 0x006A, 0x004A, eos, + 0x006B, 0x004B, 0x212A, eos, // 31 + 0x006C, 0x004C, eos, + 0x006D, 0x004D, eos, + 0x006E, 0x004E, eos, // 41 + 0x006F, 0x004F, eos, + 0x0070, 0x0050, eos, + 0x0071, 0x0051, eos, // 50 + 0x0072, 0x0052, eos, + 0x0073, 0x0053, 0x017F, eos, + 0x0074, 0x0054, eos, // 60 + 0x0075, 0x0055, eos, + 0x0076, 0x0056, eos, + 0x0077, 0x0057, eos, + 0x0078, 0x0058, eos, // 72 + 0x0079, 0x0059, eos, + 0x007A, 0x005A, eos, + 0x03BC, 0x00B5, 0x039C, eos, // 81 + 0x00E0, 0x00C0, eos, + 0x00E1, 0x00C1, eos, + 0x00E2, 0x00C2, eos, // 91 + 0x00E3, 0x00C3, eos, + 0x00E4, 0x00C4, eos, + 0x00E5, 0x00C5, 0x212B, eos, // 100 + 0x00E6, 0x00C6, eos, + 0x00E7, 0x00C7, eos, + 0x00E8, 0x00C8, eos, // 110 + 0x00E9, 0x00C9, eos, + 0x00EA, 0x00CA, eos, + 0x00EB, 0x00CB, eos, + 0x00EC, 0x00CC, eos, // 122 + 0x00ED, 0x00CD, eos, + 0x00EE, 0x00CE, eos, + 0x00EF, 0x00CF, eos, // 131 + 0x00F0, 0x00D0, eos, + 0x00F1, 0x00D1, eos, + 0x00F2, 0x00D2, eos, // 140 + 0x00F3, 0x00D3, eos, + 0x00F4, 0x00D4, eos, + 0x00F5, 0x00D5, eos, + 0x00F6, 0x00D6, eos, // 152 + 0x00F8, 0x00D8, eos, + 0x00F9, 0x00D9, eos, + 0x00FA, 0x00DA, eos, // 161 + 0x00FB, 0x00DB, eos, + 0x00FC, 0x00DC, eos, + 0x00FD, 0x00DD, eos, // 170 + 0x00FE, 0x00DE, eos, + 0x0101, 0x0100, eos, + 0x0103, 0x0102, eos, + 0x0105, 0x0104, eos, // 182 + 0x0107, 0x0106, eos, + 0x0109, 0x0108, eos, + 0x010B, 0x010A, eos, // 191 + 0x010D, 0x010C, eos, + 0x010F, 0x010E, eos, + 0x0111, 0x0110, eos, // 200 + 0x0113, 0x0112, eos, + 0x0115, 0x0114, eos, + 0x0117, 0x0116, eos, + 0x0119, 0x0118, eos, // 212 + 0x011B, 0x011A, eos, + 0x011D, 0x011C, eos, + 0x011F, 0x011E, eos, // 221 + 0x0121, 0x0120, eos, + 0x0123, 0x0122, eos, + 0x0125, 0x0124, eos, // 230 + 0x0127, 0x0126, eos, + 0x0129, 0x0128, eos, + 0x012B, 0x012A, eos, + 0x012D, 0x012C, eos, // 242 + 0x012F, 0x012E, eos, + 0x0133, 0x0132, eos, + 0x0135, 0x0134, eos, // 251 + 0x0137, 0x0136, eos, + 0x013A, 0x0139, eos, + 0x013C, 0x013B, eos, // 260 + 0x013E, 0x013D, eos, + 0x0140, 0x013F, eos, + 0x0142, 0x0141, eos, + 0x0144, 0x0143, eos, // 272 + 0x0146, 0x0145, eos, + 0x0148, 0x0147, eos, + 0x014B, 0x014A, eos, // 281 + 0x014D, 0x014C, eos, + 0x014F, 0x014E, eos, + 0x0151, 0x0150, eos, // 290 + 0x0153, 0x0152, eos, + 0x0155, 0x0154, eos, + 0x0157, 0x0156, eos, + 0x0159, 0x0158, eos, // 302 + 0x015B, 0x015A, eos, + 0x015D, 0x015C, eos, + 0x015F, 0x015E, eos, // 311 + 0x0161, 0x0160, eos, + 0x0163, 0x0162, eos, + 0x0165, 0x0164, eos, // 320 + 0x0167, 0x0166, eos, + 0x0169, 0x0168, eos, + 0x016B, 0x016A, eos, + 0x016D, 0x016C, eos, // 332 + 0x016F, 0x016E, eos, + 0x0171, 0x0170, eos, + 0x0173, 0x0172, eos, // 341 + 0x0175, 0x0174, eos, + 0x0177, 0x0176, eos, + 0x00FF, 0x0178, eos, // 350 + 0x017A, 0x0179, eos, + 0x017C, 0x017B, eos, + 0x017E, 0x017D, eos, + 0x0253, 0x0181, eos, // 362 + 0x0183, 0x0182, eos, + 0x0185, 0x0184, eos, + 0x0254, 0x0186, eos, // 371 + 0x0188, 0x0187, eos, + 0x0256, 0x0189, eos, + 0x0257, 0x018A, eos, // 380 + 0x018C, 0x018B, eos, + 0x01DD, 0x018E, eos, + 0x0259, 0x018F, eos, + 0x025B, 0x0190, eos, // 392 + 0x0192, 0x0191, eos, + 0x0260, 0x0193, eos, + 0x0263, 0x0194, eos, // 401 + 0x0269, 0x0196, eos, + 0x0268, 0x0197, eos, + 0x0199, 0x0198, eos, // 410 + 0x026F, 0x019C, eos, + 0x0272, 0x019D, eos, + 0x0275, 0x019F, eos, + 0x01A1, 0x01A0, eos, // 422 + 0x01A3, 0x01A2, eos, + 0x01A5, 0x01A4, eos, + 0x0280, 0x01A6, eos, // 431 + 0x01A8, 0x01A7, eos, + 0x0283, 0x01A9, eos, + 0x01AD, 0x01AC, eos, // 440 + 0x0288, 0x01AE, eos, + 0x01B0, 0x01AF, eos, + 0x028A, 0x01B1, eos, + 0x028B, 0x01B2, eos, // 452 + 0x01B4, 0x01B3, eos, + 0x01B6, 0x01B5, eos, + 0x0292, 0x01B7, eos, // 461 + 0x01B9, 0x01B8, eos, + 0x01BD, 0x01BC, eos, + 0x01C6, 0x01C4, 0x01C5, eos, // 470 + 0x01C9, 0x01C7, 0x01C8, eos, + 0x01CC, 0x01CA, 0x01CB, eos, + 0x01CE, 0x01CD, eos, // 482 + 0x01D0, 0x01CF, eos, + 0x01D2, 0x01D1, eos, + 0x01D4, 0x01D3, eos, // 491 + 0x01D6, 0x01D5, eos, + 0x01D8, 0x01D7, eos, + 0x01DA, 0x01D9, eos, // 500 + 0x01DC, 0x01DB, eos, + 0x01DF, 0x01DE, eos, + 0x01E1, 0x01E0, eos, + 0x01E3, 0x01E2, eos, // 512 + 0x01E5, 0x01E4, eos, + 0x01E7, 0x01E6, eos, + 0x01E9, 0x01E8, eos, // 521 + 0x01EB, 0x01EA, eos, + 0x01ED, 0x01EC, eos, + 0x01EF, 0x01EE, eos, // 530 + 0x01F3, 0x01F1, 0x01F2, eos, + 0x01F5, 0x01F4, eos, + 0x0195, 0x01F6, eos, // 540 + 0x01BF, 0x01F7, eos, + 0x01F9, 0x01F8, eos, + 0x01FB, 0x01FA, eos, + 0x01FD, 0x01FC, eos, // 552 + 0x01FF, 0x01FE, eos, + 0x0201, 0x0200, eos, + 0x0203, 0x0202, eos, // 561 + 0x0205, 0x0204, eos, + 0x0207, 0x0206, eos, + 0x0209, 0x0208, eos, // 570 + 0x020B, 0x020A, eos, + 0x020D, 0x020C, eos, + 0x020F, 0x020E, eos, + 0x0211, 0x0210, eos, // 582 + 0x0213, 0x0212, eos, + 0x0215, 0x0214, eos, + 0x0217, 0x0216, eos, // 591 + 0x0219, 0x0218, eos, + 0x021B, 0x021A, eos, + 0x021D, 0x021C, eos, // 600 + 0x021F, 0x021E, eos, + 0x019E, 0x0220, eos, + 0x0223, 0x0222, eos, + 0x0225, 0x0224, eos, // 612 + 0x0227, 0x0226, eos, + 0x0229, 0x0228, eos, + 0x022B, 0x022A, eos, // 621 + 0x022D, 0x022C, eos, + 0x022F, 0x022E, eos, + 0x0231, 0x0230, eos, // 630 + 0x0233, 0x0232, eos, + 0x2C65, 0x023A, eos, + 0x023C, 0x023B, eos, + 0x019A, 0x023D, eos, // 642 + 0x2C66, 0x023E, eos, + 0x0242, 0x0241, eos, + 0x0180, 0x0243, eos, // 651 + 0x0289, 0x0244, eos, + 0x028C, 0x0245, eos, + 0x0247, 0x0246, eos, // 660 + 0x0249, 0x0248, eos, + 0x024B, 0x024A, eos, + 0x024D, 0x024C, eos, + 0x024F, 0x024E, eos, // 672 + 0x03B9, 0x0345, 0x0399, 0x1FBE, eos, + 0x0371, 0x0370, eos, // 680 + 0x0373, 0x0372, eos, + 0x0377, 0x0376, eos, + 0x03F3, 0x037F, eos, + 0x03AC, 0x0386, eos, // 692 + 0x03AD, 0x0388, eos, + 0x03AE, 0x0389, eos, + 0x03AF, 0x038A, eos, // 701 + 0x03CC, 0x038C, eos, + 0x03CD, 0x038E, eos, + 0x03CE, 0x038F, eos, // 710 + 0x03B1, 0x0391, eos, + 0x03B2, 0x0392, 0x03D0, eos, + 0x03B3, 0x0393, eos, // 720 + 0x03B4, 0x0394, eos, + 0x03B5, 0x0395, 0x03F5, eos, + 0x03B6, 0x0396, eos, // 730 + 0x03B7, 0x0397, eos, + 0x03B8, 0x0398, 0x03D1, 0x03F4, eos, + 0x03BA, 0x039A, 0x03F0, eos, // 741 + 0x03BB, 0x039B, eos, + 0x03BD, 0x039D, eos, + 0x03BE, 0x039E, eos, // 751 + 0x03BF, 0x039F, eos, + 0x03C0, 0x03A0, 0x03D6, eos, + 0x03C1, 0x03A1, 0x03F1, eos, // 761 + 0x03C3, 0x03A3, 0x03C2, eos, + 0x03C4, 0x03A4, eos, + 0x03C5, 0x03A5, eos, // 772 + 0x03C6, 0x03A6, 0x03D5, eos, + 0x03C7, 0x03A7, eos, + 0x03C8, 0x03A8, eos, // 782 + 0x03C9, 0x03A9, 0x2126, eos, + 0x03CA, 0x03AA, eos, + 0x03CB, 0x03AB, eos, // 792 + 0x03D7, 0x03CF, eos, + 0x03D9, 0x03D8, eos, + 0x03DB, 0x03DA, eos, // 801 + 0x03DD, 0x03DC, eos, + 0x03DF, 0x03DE, eos, + 0x03E1, 0x03E0, eos, // 810 + 0x03E3, 0x03E2, eos, + 0x03E5, 0x03E4, eos, + 0x03E7, 0x03E6, eos, + 0x03E9, 0x03E8, eos, // 822 + 0x03EB, 0x03EA, eos, + 0x03ED, 0x03EC, eos, + 0x03EF, 0x03EE, eos, // 831 + 0x03F8, 0x03F7, eos, + 0x03F2, 0x03F9, eos, + 0x03FB, 0x03FA, eos, // 840 + 0x037B, 0x03FD, eos, + 0x037C, 0x03FE, eos, + 0x037D, 0x03FF, eos, + 0x0450, 0x0400, eos, // 852 + 0x0451, 0x0401, eos, + 0x0452, 0x0402, eos, + 0x0453, 0x0403, eos, // 861 + 0x0454, 0x0404, eos, + 0x0455, 0x0405, eos, + 0x0456, 0x0406, eos, // 870 + 0x0457, 0x0407, eos, + 0x0458, 0x0408, eos, + 0x0459, 0x0409, eos, + 0x045A, 0x040A, eos, // 882 + 0x045B, 0x040B, eos, + 0x045C, 0x040C, eos, + 0x045D, 0x040D, eos, // 891 + 0x045E, 0x040E, eos, + 0x045F, 0x040F, eos, + 0x0430, 0x0410, eos, // 900 + 0x0431, 0x0411, eos, + 0x0432, 0x0412, 0x1C80, eos, + 0x0433, 0x0413, eos, // 910 + 0x0434, 0x0414, 0x1C81, eos, + 0x0435, 0x0415, eos, + 0x0436, 0x0416, eos, // 920 + 0x0437, 0x0417, eos, + 0x0438, 0x0418, eos, + 0x0439, 0x0419, eos, + 0x043A, 0x041A, eos, // 932 + 0x043B, 0x041B, eos, + 0x043C, 0x041C, eos, + 0x043D, 0x041D, eos, // 941 + 0x043E, 0x041E, 0x1C82, eos, + 0x043F, 0x041F, eos, + 0x0440, 0x0420, eos, // 951 + 0x0441, 0x0421, 0x1C83, eos, + 0x0442, 0x0422, 0x1C84, 0x1C85, eos, + 0x0443, 0x0423, eos, // 963 + 0x0444, 0x0424, eos, + 0x0445, 0x0425, eos, + 0x0446, 0x0426, eos, // 972 + 0x0447, 0x0427, eos, + 0x0448, 0x0428, eos, + 0x0449, 0x0429, eos, // 981 + 0x044A, 0x042A, 0x1C86, eos, + 0x044B, 0x042B, eos, + 0x044C, 0x042C, eos, // 991 + 0x044D, 0x042D, eos, + 0x044E, 0x042E, eos, + 0x044F, 0x042F, eos, // 1000 + 0x0461, 0x0460, eos, + 0x0463, 0x0462, 0x1C87, eos, + 0x0465, 0x0464, eos, // 1010 + 0x0467, 0x0466, eos, + 0x0469, 0x0468, eos, + 0x046B, 0x046A, eos, + 0x046D, 0x046C, eos, // 1022 + 0x046F, 0x046E, eos, + 0x0471, 0x0470, eos, + 0x0473, 0x0472, eos, // 1031 + 0x0475, 0x0474, eos, + 0x0477, 0x0476, eos, + 0x0479, 0x0478, eos, // 1040 + 0x047B, 0x047A, eos, + 0x047D, 0x047C, eos, + 0x047F, 0x047E, eos, + 0x0481, 0x0480, eos, // 1052 + 0x048B, 0x048A, eos, + 0x048D, 0x048C, eos, + 0x048F, 0x048E, eos, // 1061 + 0x0491, 0x0490, eos, + 0x0493, 0x0492, eos, + 0x0495, 0x0494, eos, // 1070 + 0x0497, 0x0496, eos, + 0x0499, 0x0498, eos, + 0x049B, 0x049A, eos, + 0x049D, 0x049C, eos, // 1082 + 0x049F, 0x049E, eos, + 0x04A1, 0x04A0, eos, + 0x04A3, 0x04A2, eos, // 1091 + 0x04A5, 0x04A4, eos, + 0x04A7, 0x04A6, eos, + 0x04A9, 0x04A8, eos, // 1100 + 0x04AB, 0x04AA, eos, + 0x04AD, 0x04AC, eos, + 0x04AF, 0x04AE, eos, + 0x04B1, 0x04B0, eos, // 1112 + 0x04B3, 0x04B2, eos, + 0x04B5, 0x04B4, eos, + 0x04B7, 0x04B6, eos, // 1121 + 0x04B9, 0x04B8, eos, + 0x04BB, 0x04BA, eos, + 0x04BD, 0x04BC, eos, // 1130 + 0x04BF, 0x04BE, eos, + 0x04CF, 0x04C0, eos, + 0x04C2, 0x04C1, eos, + 0x04C4, 0x04C3, eos, // 1142 + 0x04C6, 0x04C5, eos, + 0x04C8, 0x04C7, eos, + 0x04CA, 0x04C9, eos, // 1151 + 0x04CC, 0x04CB, eos, + 0x04CE, 0x04CD, eos, + 0x04D1, 0x04D0, eos, // 1160 + 0x04D3, 0x04D2, eos, + 0x04D5, 0x04D4, eos, + 0x04D7, 0x04D6, eos, + 0x04D9, 0x04D8, eos, // 1172 + 0x04DB, 0x04DA, eos, + 0x04DD, 0x04DC, eos, + 0x04DF, 0x04DE, eos, // 1181 + 0x04E1, 0x04E0, eos, + 0x04E3, 0x04E2, eos, + 0x04E5, 0x04E4, eos, // 1190 + 0x04E7, 0x04E6, eos, + 0x04E9, 0x04E8, eos, + 0x04EB, 0x04EA, eos, + 0x04ED, 0x04EC, eos, // 1202 + 0x04EF, 0x04EE, eos, + 0x04F1, 0x04F0, eos, + 0x04F3, 0x04F2, eos, // 1211 + 0x04F5, 0x04F4, eos, + 0x04F7, 0x04F6, eos, + 0x04F9, 0x04F8, eos, // 1220 + 0x04FB, 0x04FA, eos, + 0x04FD, 0x04FC, eos, + 0x04FF, 0x04FE, eos, + 0x0501, 0x0500, eos, // 1232 + 0x0503, 0x0502, eos, + 0x0505, 0x0504, eos, + 0x0507, 0x0506, eos, // 1241 + 0x0509, 0x0508, eos, + 0x050B, 0x050A, eos, + 0x050D, 0x050C, eos, // 1250 + 0x050F, 0x050E, eos, + 0x0511, 0x0510, eos, + 0x0513, 0x0512, eos, + 0x0515, 0x0514, eos, // 1262 + 0x0517, 0x0516, eos, + 0x0519, 0x0518, eos, + 0x051B, 0x051A, eos, // 1271 + 0x051D, 0x051C, eos, + 0x051F, 0x051E, eos, + 0x0521, 0x0520, eos, // 1280 + 0x0523, 0x0522, eos, + 0x0525, 0x0524, eos, + 0x0527, 0x0526, eos, + 0x0529, 0x0528, eos, // 1292 + 0x052B, 0x052A, eos, + 0x052D, 0x052C, eos, + 0x052F, 0x052E, eos, // 1301 + 0x0561, 0x0531, eos, + 0x0562, 0x0532, eos, + 0x0563, 0x0533, eos, // 1310 + 0x0564, 0x0534, eos, + 0x0565, 0x0535, eos, + 0x0566, 0x0536, eos, + 0x0567, 0x0537, eos, // 1322 + 0x0568, 0x0538, eos, + 0x0569, 0x0539, eos, + 0x056A, 0x053A, eos, // 1331 + 0x056B, 0x053B, eos, + 0x056C, 0x053C, eos, + 0x056D, 0x053D, eos, // 1340 + 0x056E, 0x053E, eos, + 0x056F, 0x053F, eos, + 0x0570, 0x0540, eos, + 0x0571, 0x0541, eos, // 1352 + 0x0572, 0x0542, eos, + 0x0573, 0x0543, eos, + 0x0574, 0x0544, eos, // 1361 + 0x0575, 0x0545, eos, + 0x0576, 0x0546, eos, + 0x0577, 0x0547, eos, // 1370 + 0x0578, 0x0548, eos, + 0x0579, 0x0549, eos, + 0x057A, 0x054A, eos, + 0x057B, 0x054B, eos, // 1382 + 0x057C, 0x054C, eos, + 0x057D, 0x054D, eos, + 0x057E, 0x054E, eos, // 1391 + 0x057F, 0x054F, eos, + 0x0580, 0x0550, eos, + 0x0581, 0x0551, eos, // 1400 + 0x0582, 0x0552, eos, + 0x0583, 0x0553, eos, + 0x0584, 0x0554, eos, + 0x0585, 0x0555, eos, // 1412 + 0x0586, 0x0556, eos, + 0x2D00, 0x10A0, eos, + 0x2D01, 0x10A1, eos, // 1421 + 0x2D02, 0x10A2, eos, + 0x2D03, 0x10A3, eos, + 0x2D04, 0x10A4, eos, // 1430 + 0x2D05, 0x10A5, eos, + 0x2D06, 0x10A6, eos, + 0x2D07, 0x10A7, eos, + 0x2D08, 0x10A8, eos, // 1442 + 0x2D09, 0x10A9, eos, + 0x2D0A, 0x10AA, eos, + 0x2D0B, 0x10AB, eos, // 1451 + 0x2D0C, 0x10AC, eos, + 0x2D0D, 0x10AD, eos, + 0x2D0E, 0x10AE, eos, // 1460 + 0x2D0F, 0x10AF, eos, + 0x2D10, 0x10B0, eos, + 0x2D11, 0x10B1, eos, + 0x2D12, 0x10B2, eos, // 1472 + 0x2D13, 0x10B3, eos, + 0x2D14, 0x10B4, eos, + 0x2D15, 0x10B5, eos, // 1481 + 0x2D16, 0x10B6, eos, + 0x2D17, 0x10B7, eos, + 0x2D18, 0x10B8, eos, // 1490 + 0x2D19, 0x10B9, eos, + 0x2D1A, 0x10BA, eos, + 0x2D1B, 0x10BB, eos, + 0x2D1C, 0x10BC, eos, // 1502 + 0x2D1D, 0x10BD, eos, + 0x2D1E, 0x10BE, eos, + 0x2D1F, 0x10BF, eos, // 1511 + 0x2D20, 0x10C0, eos, + 0x2D21, 0x10C1, eos, + 0x2D22, 0x10C2, eos, // 1520 + 0x2D23, 0x10C3, eos, + 0x2D24, 0x10C4, eos, + 0x2D25, 0x10C5, eos, + 0x2D27, 0x10C7, eos, // 1532 + 0x2D2D, 0x10CD, eos, + 0x13F0, 0x13F8, eos, + 0x13F1, 0x13F9, eos, // 1541 + 0x13F2, 0x13FA, eos, + 0x13F3, 0x13FB, eos, + 0x13F4, 0x13FC, eos, // 1550 + 0x13F5, 0x13FD, eos, + 0xA64B, 0x1C88, 0xA64A, eos, + 0x10D0, 0x1C90, eos, // 1560 + 0x10D1, 0x1C91, eos, + 0x10D2, 0x1C92, eos, + 0x10D3, 0x1C93, eos, + 0x10D4, 0x1C94, eos, // 1572 + 0x10D5, 0x1C95, eos, + 0x10D6, 0x1C96, eos, + 0x10D7, 0x1C97, eos, // 1581 + 0x10D8, 0x1C98, eos, + 0x10D9, 0x1C99, eos, + 0x10DA, 0x1C9A, eos, // 1590 + 0x10DB, 0x1C9B, eos, + 0x10DC, 0x1C9C, eos, + 0x10DD, 0x1C9D, eos, + 0x10DE, 0x1C9E, eos, // 1602 + 0x10DF, 0x1C9F, eos, + 0x10E0, 0x1CA0, eos, + 0x10E1, 0x1CA1, eos, // 1611 + 0x10E2, 0x1CA2, eos, + 0x10E3, 0x1CA3, eos, + 0x10E4, 0x1CA4, eos, // 1620 + 0x10E5, 0x1CA5, eos, + 0x10E6, 0x1CA6, eos, + 0x10E7, 0x1CA7, eos, + 0x10E8, 0x1CA8, eos, // 1632 + 0x10E9, 0x1CA9, eos, + 0x10EA, 0x1CAA, eos, + 0x10EB, 0x1CAB, eos, // 1641 + 0x10EC, 0x1CAC, eos, + 0x10ED, 0x1CAD, eos, + 0x10EE, 0x1CAE, eos, // 1650 + 0x10EF, 0x1CAF, eos, + 0x10F0, 0x1CB0, eos, + 0x10F1, 0x1CB1, eos, + 0x10F2, 0x1CB2, eos, // 1662 + 0x10F3, 0x1CB3, eos, + 0x10F4, 0x1CB4, eos, + 0x10F5, 0x1CB5, eos, // 1671 + 0x10F6, 0x1CB6, eos, + 0x10F7, 0x1CB7, eos, + 0x10F8, 0x1CB8, eos, // 1680 + 0x10F9, 0x1CB9, eos, + 0x10FA, 0x1CBA, eos, + 0x10FD, 0x1CBD, eos, + 0x10FE, 0x1CBE, eos, // 1692 + 0x10FF, 0x1CBF, eos, + 0x1E01, 0x1E00, eos, + 0x1E03, 0x1E02, eos, // 1701 + 0x1E05, 0x1E04, eos, + 0x1E07, 0x1E06, eos, + 0x1E09, 0x1E08, eos, // 1710 + 0x1E0B, 0x1E0A, eos, + 0x1E0D, 0x1E0C, eos, + 0x1E0F, 0x1E0E, eos, + 0x1E11, 0x1E10, eos, // 1722 + 0x1E13, 0x1E12, eos, + 0x1E15, 0x1E14, eos, + 0x1E17, 0x1E16, eos, // 1731 + 0x1E19, 0x1E18, eos, + 0x1E1B, 0x1E1A, eos, + 0x1E1D, 0x1E1C, eos, // 1740 + 0x1E1F, 0x1E1E, eos, + 0x1E21, 0x1E20, eos, + 0x1E23, 0x1E22, eos, + 0x1E25, 0x1E24, eos, // 1752 + 0x1E27, 0x1E26, eos, + 0x1E29, 0x1E28, eos, + 0x1E2B, 0x1E2A, eos, // 1761 + 0x1E2D, 0x1E2C, eos, + 0x1E2F, 0x1E2E, eos, + 0x1E31, 0x1E30, eos, // 1770 + 0x1E33, 0x1E32, eos, + 0x1E35, 0x1E34, eos, + 0x1E37, 0x1E36, eos, + 0x1E39, 0x1E38, eos, // 1782 + 0x1E3B, 0x1E3A, eos, + 0x1E3D, 0x1E3C, eos, + 0x1E3F, 0x1E3E, eos, // 1791 + 0x1E41, 0x1E40, eos, + 0x1E43, 0x1E42, eos, + 0x1E45, 0x1E44, eos, // 1800 + 0x1E47, 0x1E46, eos, + 0x1E49, 0x1E48, eos, + 0x1E4B, 0x1E4A, eos, + 0x1E4D, 0x1E4C, eos, // 1812 + 0x1E4F, 0x1E4E, eos, + 0x1E51, 0x1E50, eos, + 0x1E53, 0x1E52, eos, // 1821 + 0x1E55, 0x1E54, eos, + 0x1E57, 0x1E56, eos, + 0x1E59, 0x1E58, eos, // 1830 + 0x1E5B, 0x1E5A, eos, + 0x1E5D, 0x1E5C, eos, + 0x1E5F, 0x1E5E, eos, + 0x1E61, 0x1E60, 0x1E9B, eos, // 1842 + 0x1E63, 0x1E62, eos, + 0x1E65, 0x1E64, eos, + 0x1E67, 0x1E66, eos, // 1852 + 0x1E69, 0x1E68, eos, + 0x1E6B, 0x1E6A, eos, + 0x1E6D, 0x1E6C, eos, // 1861 + 0x1E6F, 0x1E6E, eos, + 0x1E71, 0x1E70, eos, + 0x1E73, 0x1E72, eos, // 1870 + 0x1E75, 0x1E74, eos, + 0x1E77, 0x1E76, eos, + 0x1E79, 0x1E78, eos, + 0x1E7B, 0x1E7A, eos, // 1882 + 0x1E7D, 0x1E7C, eos, + 0x1E7F, 0x1E7E, eos, + 0x1E81, 0x1E80, eos, // 1891 + 0x1E83, 0x1E82, eos, + 0x1E85, 0x1E84, eos, + 0x1E87, 0x1E86, eos, // 1900 + 0x1E89, 0x1E88, eos, + 0x1E8B, 0x1E8A, eos, + 0x1E8D, 0x1E8C, eos, + 0x1E8F, 0x1E8E, eos, // 1912 + 0x1E91, 0x1E90, eos, + 0x1E93, 0x1E92, eos, + 0x1E95, 0x1E94, eos, // 1921 + 0x00DF, 0x1E9E, eos, + 0x1EA1, 0x1EA0, eos, + 0x1EA3, 0x1EA2, eos, // 1930 + 0x1EA5, 0x1EA4, eos, + 0x1EA7, 0x1EA6, eos, + 0x1EA9, 0x1EA8, eos, + 0x1EAB, 0x1EAA, eos, // 1942 + 0x1EAD, 0x1EAC, eos, + 0x1EAF, 0x1EAE, eos, + 0x1EB1, 0x1EB0, eos, // 1951 + 0x1EB3, 0x1EB2, eos, + 0x1EB5, 0x1EB4, eos, + 0x1EB7, 0x1EB6, eos, // 1960 + 0x1EB9, 0x1EB8, eos, + 0x1EBB, 0x1EBA, eos, + 0x1EBD, 0x1EBC, eos, + 0x1EBF, 0x1EBE, eos, // 1972 + 0x1EC1, 0x1EC0, eos, + 0x1EC3, 0x1EC2, eos, + 0x1EC5, 0x1EC4, eos, // 1981 + 0x1EC7, 0x1EC6, eos, + 0x1EC9, 0x1EC8, eos, + 0x1ECB, 0x1ECA, eos, // 1990 + 0x1ECD, 0x1ECC, eos, + 0x1ECF, 0x1ECE, eos, + 0x1ED1, 0x1ED0, eos, + 0x1ED3, 0x1ED2, eos, // 2002 + 0x1ED5, 0x1ED4, eos, + 0x1ED7, 0x1ED6, eos, + 0x1ED9, 0x1ED8, eos, // 2011 + 0x1EDB, 0x1EDA, eos, + 0x1EDD, 0x1EDC, eos, + 0x1EDF, 0x1EDE, eos, // 2020 + 0x1EE1, 0x1EE0, eos, + 0x1EE3, 0x1EE2, eos, + 0x1EE5, 0x1EE4, eos, + 0x1EE7, 0x1EE6, eos, // 2032 + 0x1EE9, 0x1EE8, eos, + 0x1EEB, 0x1EEA, eos, + 0x1EED, 0x1EEC, eos, // 2041 + 0x1EEF, 0x1EEE, eos, + 0x1EF1, 0x1EF0, eos, + 0x1EF3, 0x1EF2, eos, // 2050 + 0x1EF5, 0x1EF4, eos, + 0x1EF7, 0x1EF6, eos, + 0x1EF9, 0x1EF8, eos, + 0x1EFB, 0x1EFA, eos, // 2062 + 0x1EFD, 0x1EFC, eos, + 0x1EFF, 0x1EFE, eos, + 0x1F00, 0x1F08, eos, // 2071 + 0x1F01, 0x1F09, eos, + 0x1F02, 0x1F0A, eos, + 0x1F03, 0x1F0B, eos, // 2080 + 0x1F04, 0x1F0C, eos, + 0x1F05, 0x1F0D, eos, + 0x1F06, 0x1F0E, eos, + 0x1F07, 0x1F0F, eos, // 2092 + 0x1F10, 0x1F18, eos, + 0x1F11, 0x1F19, eos, + 0x1F12, 0x1F1A, eos, // 2101 + 0x1F13, 0x1F1B, eos, + 0x1F14, 0x1F1C, eos, + 0x1F15, 0x1F1D, eos, // 2110 + 0x1F20, 0x1F28, eos, + 0x1F21, 0x1F29, eos, + 0x1F22, 0x1F2A, eos, + 0x1F23, 0x1F2B, eos, // 2122 + 0x1F24, 0x1F2C, eos, + 0x1F25, 0x1F2D, eos, + 0x1F26, 0x1F2E, eos, // 2131 + 0x1F27, 0x1F2F, eos, + 0x1F30, 0x1F38, eos, + 0x1F31, 0x1F39, eos, // 2140 + 0x1F32, 0x1F3A, eos, + 0x1F33, 0x1F3B, eos, + 0x1F34, 0x1F3C, eos, + 0x1F35, 0x1F3D, eos, // 2152 + 0x1F36, 0x1F3E, eos, + 0x1F37, 0x1F3F, eos, + 0x1F40, 0x1F48, eos, // 2161 + 0x1F41, 0x1F49, eos, + 0x1F42, 0x1F4A, eos, + 0x1F43, 0x1F4B, eos, // 2170 + 0x1F44, 0x1F4C, eos, + 0x1F45, 0x1F4D, eos, + 0x1F51, 0x1F59, eos, + 0x1F53, 0x1F5B, eos, // 2182 + 0x1F55, 0x1F5D, eos, + 0x1F57, 0x1F5F, eos, + 0x1F60, 0x1F68, eos, // 2191 + 0x1F61, 0x1F69, eos, + 0x1F62, 0x1F6A, eos, + 0x1F63, 0x1F6B, eos, // 2200 + 0x1F64, 0x1F6C, eos, + 0x1F65, 0x1F6D, eos, + 0x1F66, 0x1F6E, eos, + 0x1F67, 0x1F6F, eos, // 2212 + 0x1F80, 0x1F88, eos, + 0x1F81, 0x1F89, eos, + 0x1F82, 0x1F8A, eos, // 2221 + 0x1F83, 0x1F8B, eos, + 0x1F84, 0x1F8C, eos, + 0x1F85, 0x1F8D, eos, // 2230 + 0x1F86, 0x1F8E, eos, + 0x1F87, 0x1F8F, eos, + 0x1F90, 0x1F98, eos, + 0x1F91, 0x1F99, eos, // 2242 + 0x1F92, 0x1F9A, eos, + 0x1F93, 0x1F9B, eos, + 0x1F94, 0x1F9C, eos, // 2251 + 0x1F95, 0x1F9D, eos, + 0x1F96, 0x1F9E, eos, + 0x1F97, 0x1F9F, eos, // 2260 + 0x1FA0, 0x1FA8, eos, + 0x1FA1, 0x1FA9, eos, + 0x1FA2, 0x1FAA, eos, + 0x1FA3, 0x1FAB, eos, // 2272 + 0x1FA4, 0x1FAC, eos, + 0x1FA5, 0x1FAD, eos, + 0x1FA6, 0x1FAE, eos, // 2281 + 0x1FA7, 0x1FAF, eos, + 0x1FB0, 0x1FB8, eos, + 0x1FB1, 0x1FB9, eos, // 2290 + 0x1F70, 0x1FBA, eos, + 0x1F71, 0x1FBB, eos, + 0x1FB3, 0x1FBC, eos, + 0x1F72, 0x1FC8, eos, // 2302 + 0x1F73, 0x1FC9, eos, + 0x1F74, 0x1FCA, eos, + 0x1F75, 0x1FCB, eos, // 2311 + 0x1FC3, 0x1FCC, eos, + 0x1FD0, 0x1FD8, eos, + 0x1FD1, 0x1FD9, eos, // 2320 + 0x1F76, 0x1FDA, eos, + 0x1F77, 0x1FDB, eos, + 0x1FE0, 0x1FE8, eos, + 0x1FE1, 0x1FE9, eos, // 2332 + 0x1F7A, 0x1FEA, eos, + 0x1F7B, 0x1FEB, eos, + 0x1FE5, 0x1FEC, eos, // 2341 + 0x1F78, 0x1FF8, eos, + 0x1F79, 0x1FF9, eos, + 0x1F7C, 0x1FFA, eos, // 2350 + 0x1F7D, 0x1FFB, eos, + 0x1FF3, 0x1FFC, eos, + 0x214E, 0x2132, eos, + 0x2170, 0x2160, eos, // 2362 + 0x2171, 0x2161, eos, + 0x2172, 0x2162, eos, + 0x2173, 0x2163, eos, // 2371 + 0x2174, 0x2164, eos, + 0x2175, 0x2165, eos, + 0x2176, 0x2166, eos, // 2380 + 0x2177, 0x2167, eos, + 0x2178, 0x2168, eos, + 0x2179, 0x2169, eos, + 0x217A, 0x216A, eos, // 2392 + 0x217B, 0x216B, eos, + 0x217C, 0x216C, eos, + 0x217D, 0x216D, eos, // 2401 + 0x217E, 0x216E, eos, + 0x217F, 0x216F, eos, + 0x2184, 0x2183, eos, // 2410 + 0x24D0, 0x24B6, eos, + 0x24D1, 0x24B7, eos, + 0x24D2, 0x24B8, eos, + 0x24D3, 0x24B9, eos, // 2422 + 0x24D4, 0x24BA, eos, + 0x24D5, 0x24BB, eos, + 0x24D6, 0x24BC, eos, // 2431 + 0x24D7, 0x24BD, eos, + 0x24D8, 0x24BE, eos, + 0x24D9, 0x24BF, eos, // 2440 + 0x24DA, 0x24C0, eos, + 0x24DB, 0x24C1, eos, + 0x24DC, 0x24C2, eos, + 0x24DD, 0x24C3, eos, // 2452 + 0x24DE, 0x24C4, eos, + 0x24DF, 0x24C5, eos, + 0x24E0, 0x24C6, eos, // 2461 + 0x24E1, 0x24C7, eos, + 0x24E2, 0x24C8, eos, + 0x24E3, 0x24C9, eos, // 2470 + 0x24E4, 0x24CA, eos, + 0x24E5, 0x24CB, eos, + 0x24E6, 0x24CC, eos, + 0x24E7, 0x24CD, eos, // 2482 + 0x24E8, 0x24CE, eos, + 0x24E9, 0x24CF, eos, + 0x2C30, 0x2C00, eos, // 2491 + 0x2C31, 0x2C01, eos, + 0x2C32, 0x2C02, eos, + 0x2C33, 0x2C03, eos, // 2500 + 0x2C34, 0x2C04, eos, + 0x2C35, 0x2C05, eos, + 0x2C36, 0x2C06, eos, + 0x2C37, 0x2C07, eos, // 2512 + 0x2C38, 0x2C08, eos, + 0x2C39, 0x2C09, eos, + 0x2C3A, 0x2C0A, eos, // 2521 + 0x2C3B, 0x2C0B, eos, + 0x2C3C, 0x2C0C, eos, + 0x2C3D, 0x2C0D, eos, // 2530 + 0x2C3E, 0x2C0E, eos, + 0x2C3F, 0x2C0F, eos, + 0x2C40, 0x2C10, eos, + 0x2C41, 0x2C11, eos, // 2542 + 0x2C42, 0x2C12, eos, + 0x2C43, 0x2C13, eos, + 0x2C44, 0x2C14, eos, // 2551 + 0x2C45, 0x2C15, eos, + 0x2C46, 0x2C16, eos, + 0x2C47, 0x2C17, eos, // 2560 + 0x2C48, 0x2C18, eos, + 0x2C49, 0x2C19, eos, + 0x2C4A, 0x2C1A, eos, + 0x2C4B, 0x2C1B, eos, // 2572 + 0x2C4C, 0x2C1C, eos, + 0x2C4D, 0x2C1D, eos, + 0x2C4E, 0x2C1E, eos, // 2581 + 0x2C4F, 0x2C1F, eos, + 0x2C50, 0x2C20, eos, + 0x2C51, 0x2C21, eos, // 2590 + 0x2C52, 0x2C22, eos, + 0x2C53, 0x2C23, eos, + 0x2C54, 0x2C24, eos, + 0x2C55, 0x2C25, eos, // 2602 + 0x2C56, 0x2C26, eos, + 0x2C57, 0x2C27, eos, + 0x2C58, 0x2C28, eos, // 2611 + 0x2C59, 0x2C29, eos, + 0x2C5A, 0x2C2A, eos, + 0x2C5B, 0x2C2B, eos, // 2620 + 0x2C5C, 0x2C2C, eos, + 0x2C5D, 0x2C2D, eos, + 0x2C5E, 0x2C2E, eos, + 0x2C5F, 0x2C2F, eos, // 2632 + 0x2C61, 0x2C60, eos, + 0x026B, 0x2C62, eos, + 0x1D7D, 0x2C63, eos, // 2641 + 0x027D, 0x2C64, eos, + 0x2C68, 0x2C67, eos, + 0x2C6A, 0x2C69, eos, // 2650 + 0x2C6C, 0x2C6B, eos, + 0x0251, 0x2C6D, eos, + 0x0271, 0x2C6E, eos, + 0x0250, 0x2C6F, eos, // 2662 + 0x0252, 0x2C70, eos, + 0x2C73, 0x2C72, eos, + 0x2C76, 0x2C75, eos, // 2671 + 0x023F, 0x2C7E, eos, + 0x0240, 0x2C7F, eos, + 0x2C81, 0x2C80, eos, // 2680 + 0x2C83, 0x2C82, eos, + 0x2C85, 0x2C84, eos, + 0x2C87, 0x2C86, eos, + 0x2C89, 0x2C88, eos, // 2692 + 0x2C8B, 0x2C8A, eos, + 0x2C8D, 0x2C8C, eos, + 0x2C8F, 0x2C8E, eos, // 2701 + 0x2C91, 0x2C90, eos, + 0x2C93, 0x2C92, eos, + 0x2C95, 0x2C94, eos, // 2710 + 0x2C97, 0x2C96, eos, + 0x2C99, 0x2C98, eos, + 0x2C9B, 0x2C9A, eos, + 0x2C9D, 0x2C9C, eos, // 2722 + 0x2C9F, 0x2C9E, eos, + 0x2CA1, 0x2CA0, eos, + 0x2CA3, 0x2CA2, eos, // 2731 + 0x2CA5, 0x2CA4, eos, + 0x2CA7, 0x2CA6, eos, + 0x2CA9, 0x2CA8, eos, // 2740 + 0x2CAB, 0x2CAA, eos, + 0x2CAD, 0x2CAC, eos, + 0x2CAF, 0x2CAE, eos, + 0x2CB1, 0x2CB0, eos, // 2752 + 0x2CB3, 0x2CB2, eos, + 0x2CB5, 0x2CB4, eos, + 0x2CB7, 0x2CB6, eos, // 2761 + 0x2CB9, 0x2CB8, eos, + 0x2CBB, 0x2CBA, eos, + 0x2CBD, 0x2CBC, eos, // 2770 + 0x2CBF, 0x2CBE, eos, + 0x2CC1, 0x2CC0, eos, + 0x2CC3, 0x2CC2, eos, + 0x2CC5, 0x2CC4, eos, // 2782 + 0x2CC7, 0x2CC6, eos, + 0x2CC9, 0x2CC8, eos, + 0x2CCB, 0x2CCA, eos, // 2791 + 0x2CCD, 0x2CCC, eos, + 0x2CCF, 0x2CCE, eos, + 0x2CD1, 0x2CD0, eos, // 2800 + 0x2CD3, 0x2CD2, eos, + 0x2CD5, 0x2CD4, eos, + 0x2CD7, 0x2CD6, eos, + 0x2CD9, 0x2CD8, eos, // 2812 + 0x2CDB, 0x2CDA, eos, + 0x2CDD, 0x2CDC, eos, + 0x2CDF, 0x2CDE, eos, // 2821 + 0x2CE1, 0x2CE0, eos, + 0x2CE3, 0x2CE2, eos, + 0x2CEC, 0x2CEB, eos, // 2830 + 0x2CEE, 0x2CED, eos, + 0x2CF3, 0x2CF2, eos, + 0xA641, 0xA640, eos, + 0xA643, 0xA642, eos, // 2842 + 0xA645, 0xA644, eos, + 0xA647, 0xA646, eos, + 0xA649, 0xA648, eos, // 2851 + 0xA64D, 0xA64C, eos, + 0xA64F, 0xA64E, eos, + 0xA651, 0xA650, eos, // 2860 + 0xA653, 0xA652, eos, + 0xA655, 0xA654, eos, + 0xA657, 0xA656, eos, + 0xA659, 0xA658, eos, // 2872 + 0xA65B, 0xA65A, eos, + 0xA65D, 0xA65C, eos, + 0xA65F, 0xA65E, eos, // 2881 + 0xA661, 0xA660, eos, + 0xA663, 0xA662, eos, + 0xA665, 0xA664, eos, // 2890 + 0xA667, 0xA666, eos, + 0xA669, 0xA668, eos, + 0xA66B, 0xA66A, eos, + 0xA66D, 0xA66C, eos, // 2902 + 0xA681, 0xA680, eos, + 0xA683, 0xA682, eos, + 0xA685, 0xA684, eos, // 2911 + 0xA687, 0xA686, eos, + 0xA689, 0xA688, eos, + 0xA68B, 0xA68A, eos, // 2920 + 0xA68D, 0xA68C, eos, + 0xA68F, 0xA68E, eos, + 0xA691, 0xA690, eos, + 0xA693, 0xA692, eos, // 2932 + 0xA695, 0xA694, eos, + 0xA697, 0xA696, eos, + 0xA699, 0xA698, eos, // 2941 + 0xA69B, 0xA69A, eos, + 0xA723, 0xA722, eos, + 0xA725, 0xA724, eos, // 2950 + 0xA727, 0xA726, eos, + 0xA729, 0xA728, eos, + 0xA72B, 0xA72A, eos, + 0xA72D, 0xA72C, eos, // 2962 + 0xA72F, 0xA72E, eos, + 0xA733, 0xA732, eos, + 0xA735, 0xA734, eos, // 2971 + 0xA737, 0xA736, eos, + 0xA739, 0xA738, eos, + 0xA73B, 0xA73A, eos, // 2980 + 0xA73D, 0xA73C, eos, + 0xA73F, 0xA73E, eos, + 0xA741, 0xA740, eos, + 0xA743, 0xA742, eos, // 2992 + 0xA745, 0xA744, eos, + 0xA747, 0xA746, eos, + 0xA749, 0xA748, eos, // 3001 + 0xA74B, 0xA74A, eos, + 0xA74D, 0xA74C, eos, + 0xA74F, 0xA74E, eos, // 3010 + 0xA751, 0xA750, eos, + 0xA753, 0xA752, eos, + 0xA755, 0xA754, eos, + 0xA757, 0xA756, eos, // 3022 + 0xA759, 0xA758, eos, + 0xA75B, 0xA75A, eos, + 0xA75D, 0xA75C, eos, // 3031 + 0xA75F, 0xA75E, eos, + 0xA761, 0xA760, eos, + 0xA763, 0xA762, eos, // 3040 + 0xA765, 0xA764, eos, + 0xA767, 0xA766, eos, + 0xA769, 0xA768, eos, + 0xA76B, 0xA76A, eos, // 3052 + 0xA76D, 0xA76C, eos, + 0xA76F, 0xA76E, eos, + 0xA77A, 0xA779, eos, // 3061 + 0xA77C, 0xA77B, eos, + 0x1D79, 0xA77D, eos, + 0xA77F, 0xA77E, eos, // 3070 + 0xA781, 0xA780, eos, + 0xA783, 0xA782, eos, + 0xA785, 0xA784, eos, + 0xA787, 0xA786, eos, // 3082 + 0xA78C, 0xA78B, eos, + 0x0265, 0xA78D, eos, + 0xA791, 0xA790, eos, // 3091 + 0xA793, 0xA792, eos, + 0xA797, 0xA796, eos, + 0xA799, 0xA798, eos, // 3100 + 0xA79B, 0xA79A, eos, + 0xA79D, 0xA79C, eos, + 0xA79F, 0xA79E, eos, + 0xA7A1, 0xA7A0, eos, // 3112 + 0xA7A3, 0xA7A2, eos, + 0xA7A5, 0xA7A4, eos, + 0xA7A7, 0xA7A6, eos, // 3121 + 0xA7A9, 0xA7A8, eos, + 0x0266, 0xA7AA, eos, + 0x025C, 0xA7AB, eos, // 3130 + 0x0261, 0xA7AC, eos, + 0x026C, 0xA7AD, eos, + 0x026A, 0xA7AE, eos, + 0x029E, 0xA7B0, eos, // 3142 + 0x0287, 0xA7B1, eos, + 0x029D, 0xA7B2, eos, + 0xAB53, 0xA7B3, eos, // 3151 + 0xA7B5, 0xA7B4, eos, + 0xA7B7, 0xA7B6, eos, + 0xA7B9, 0xA7B8, eos, // 3160 + 0xA7BB, 0xA7BA, eos, + 0xA7BD, 0xA7BC, eos, + 0xA7BF, 0xA7BE, eos, + 0xA7C1, 0xA7C0, eos, // 3172 + 0xA7C3, 0xA7C2, eos, + 0xA794, 0xA7C4, eos, + 0x0282, 0xA7C5, eos, // 3181 + 0x1D8E, 0xA7C6, eos, + 0xA7C8, 0xA7C7, eos, + 0xA7CA, 0xA7C9, eos, // 3190 + 0xA7D1, 0xA7D0, eos, + 0xA7D7, 0xA7D6, eos, + 0xA7D9, 0xA7D8, eos, + 0xA7F6, 0xA7F5, eos, // 3202 + 0x13A0, 0xAB70, eos, + 0x13A1, 0xAB71, eos, + 0x13A2, 0xAB72, eos, // 3211 + 0x13A3, 0xAB73, eos, + 0x13A4, 0xAB74, eos, + 0x13A5, 0xAB75, eos, // 3220 + 0x13A6, 0xAB76, eos, + 0x13A7, 0xAB77, eos, + 0x13A8, 0xAB78, eos, + 0x13A9, 0xAB79, eos, // 3232 + 0x13AA, 0xAB7A, eos, + 0x13AB, 0xAB7B, eos, + 0x13AC, 0xAB7C, eos, // 3241 + 0x13AD, 0xAB7D, eos, + 0x13AE, 0xAB7E, eos, + 0x13AF, 0xAB7F, eos, // 3250 + 0x13B0, 0xAB80, eos, + 0x13B1, 0xAB81, eos, + 0x13B2, 0xAB82, eos, + 0x13B3, 0xAB83, eos, // 3262 + 0x13B4, 0xAB84, eos, + 0x13B5, 0xAB85, eos, + 0x13B6, 0xAB86, eos, // 3271 + 0x13B7, 0xAB87, eos, + 0x13B8, 0xAB88, eos, + 0x13B9, 0xAB89, eos, // 3280 + 0x13BA, 0xAB8A, eos, + 0x13BB, 0xAB8B, eos, + 0x13BC, 0xAB8C, eos, + 0x13BD, 0xAB8D, eos, // 3292 + 0x13BE, 0xAB8E, eos, + 0x13BF, 0xAB8F, eos, + 0x13C0, 0xAB90, eos, // 3301 + 0x13C1, 0xAB91, eos, + 0x13C2, 0xAB92, eos, + 0x13C3, 0xAB93, eos, // 3310 + 0x13C4, 0xAB94, eos, + 0x13C5, 0xAB95, eos, + 0x13C6, 0xAB96, eos, + 0x13C7, 0xAB97, eos, // 3322 + 0x13C8, 0xAB98, eos, + 0x13C9, 0xAB99, eos, + 0x13CA, 0xAB9A, eos, // 3331 + 0x13CB, 0xAB9B, eos, + 0x13CC, 0xAB9C, eos, + 0x13CD, 0xAB9D, eos, // 3340 + 0x13CE, 0xAB9E, eos, + 0x13CF, 0xAB9F, eos, + 0x13D0, 0xABA0, eos, + 0x13D1, 0xABA1, eos, // 3352 + 0x13D2, 0xABA2, eos, + 0x13D3, 0xABA3, eos, + 0x13D4, 0xABA4, eos, // 3361 + 0x13D5, 0xABA5, eos, + 0x13D6, 0xABA6, eos, + 0x13D7, 0xABA7, eos, // 3370 + 0x13D8, 0xABA8, eos, + 0x13D9, 0xABA9, eos, + 0x13DA, 0xABAA, eos, + 0x13DB, 0xABAB, eos, // 3382 + 0x13DC, 0xABAC, eos, + 0x13DD, 0xABAD, eos, + 0x13DE, 0xABAE, eos, // 3391 + 0x13DF, 0xABAF, eos, + 0x13E0, 0xABB0, eos, + 0x13E1, 0xABB1, eos, // 3400 + 0x13E2, 0xABB2, eos, + 0x13E3, 0xABB3, eos, + 0x13E4, 0xABB4, eos, + 0x13E5, 0xABB5, eos, // 3412 + 0x13E6, 0xABB6, eos, + 0x13E7, 0xABB7, eos, + 0x13E8, 0xABB8, eos, // 3421 + 0x13E9, 0xABB9, eos, + 0x13EA, 0xABBA, eos, + 0x13EB, 0xABBB, eos, // 3430 + 0x13EC, 0xABBC, eos, + 0x13ED, 0xABBD, eos, + 0x13EE, 0xABBE, eos, + 0x13EF, 0xABBF, eos, // 3442 + 0xFF41, 0xFF21, eos, + 0xFF42, 0xFF22, eos, + 0xFF43, 0xFF23, eos, // 3451 + 0xFF44, 0xFF24, eos, + 0xFF45, 0xFF25, eos, + 0xFF46, 0xFF26, eos, // 3460 + 0xFF47, 0xFF27, eos, + 0xFF48, 0xFF28, eos, + 0xFF49, 0xFF29, eos, + 0xFF4A, 0xFF2A, eos, // 3472 + 0xFF4B, 0xFF2B, eos, + 0xFF4C, 0xFF2C, eos, + 0xFF4D, 0xFF2D, eos, // 3481 + 0xFF4E, 0xFF2E, eos, + 0xFF4F, 0xFF2F, eos, + 0xFF50, 0xFF30, eos, // 3490 + 0xFF51, 0xFF31, eos, + 0xFF52, 0xFF32, eos, + 0xFF53, 0xFF33, eos, + 0xFF54, 0xFF34, eos, // 3502 + 0xFF55, 0xFF35, eos, + 0xFF56, 0xFF36, eos, + 0xFF57, 0xFF37, eos, // 3511 + 0xFF58, 0xFF38, eos, + 0xFF59, 0xFF39, eos, + 0xFF5A, 0xFF3A, eos, // 3520 + 0x10428, 0x10400, eos, + 0x10429, 0x10401, eos, + 0x1042A, 0x10402, eos, + 0x1042B, 0x10403, eos, // 3532 + 0x1042C, 0x10404, eos, + 0x1042D, 0x10405, eos, + 0x1042E, 0x10406, eos, // 3541 + 0x1042F, 0x10407, eos, + 0x10430, 0x10408, eos, + 0x10431, 0x10409, eos, // 3550 + 0x10432, 0x1040A, eos, + 0x10433, 0x1040B, eos, + 0x10434, 0x1040C, eos, + 0x10435, 0x1040D, eos, // 3562 + 0x10436, 0x1040E, eos, + 0x10437, 0x1040F, eos, + 0x10438, 0x10410, eos, // 3571 + 0x10439, 0x10411, eos, + 0x1043A, 0x10412, eos, + 0x1043B, 0x10413, eos, // 3580 + 0x1043C, 0x10414, eos, + 0x1043D, 0x10415, eos, + 0x1043E, 0x10416, eos, + 0x1043F, 0x10417, eos, // 3592 + 0x10440, 0x10418, eos, + 0x10441, 0x10419, eos, + 0x10442, 0x1041A, eos, // 3601 + 0x10443, 0x1041B, eos, + 0x10444, 0x1041C, eos, + 0x10445, 0x1041D, eos, // 3610 + 0x10446, 0x1041E, eos, + 0x10447, 0x1041F, eos, + 0x10448, 0x10420, eos, + 0x10449, 0x10421, eos, // 3622 + 0x1044A, 0x10422, eos, + 0x1044B, 0x10423, eos, + 0x1044C, 0x10424, eos, // 3631 + 0x1044D, 0x10425, eos, + 0x1044E, 0x10426, eos, + 0x1044F, 0x10427, eos, // 3640 + 0x104D8, 0x104B0, eos, + 0x104D9, 0x104B1, eos, + 0x104DA, 0x104B2, eos, + 0x104DB, 0x104B3, eos, // 3652 + 0x104DC, 0x104B4, eos, + 0x104DD, 0x104B5, eos, + 0x104DE, 0x104B6, eos, // 3661 + 0x104DF, 0x104B7, eos, + 0x104E0, 0x104B8, eos, + 0x104E1, 0x104B9, eos, // 3670 + 0x104E2, 0x104BA, eos, + 0x104E3, 0x104BB, eos, + 0x104E4, 0x104BC, eos, + 0x104E5, 0x104BD, eos, // 3682 + 0x104E6, 0x104BE, eos, + 0x104E7, 0x104BF, eos, + 0x104E8, 0x104C0, eos, // 3691 + 0x104E9, 0x104C1, eos, + 0x104EA, 0x104C2, eos, + 0x104EB, 0x104C3, eos, // 3700 + 0x104EC, 0x104C4, eos, + 0x104ED, 0x104C5, eos, + 0x104EE, 0x104C6, eos, + 0x104EF, 0x104C7, eos, // 3712 + 0x104F0, 0x104C8, eos, + 0x104F1, 0x104C9, eos, + 0x104F2, 0x104CA, eos, // 3721 + 0x104F3, 0x104CB, eos, + 0x104F4, 0x104CC, eos, + 0x104F5, 0x104CD, eos, // 3730 + 0x104F6, 0x104CE, eos, + 0x104F7, 0x104CF, eos, + 0x104F8, 0x104D0, eos, + 0x104F9, 0x104D1, eos, // 3742 + 0x104FA, 0x104D2, eos, + 0x104FB, 0x104D3, eos, + 0x10597, 0x10570, eos, // 3751 + 0x10598, 0x10571, eos, + 0x10599, 0x10572, eos, + 0x1059A, 0x10573, eos, // 3760 + 0x1059B, 0x10574, eos, + 0x1059C, 0x10575, eos, + 0x1059D, 0x10576, eos, + 0x1059E, 0x10577, eos, // 3772 + 0x1059F, 0x10578, eos, + 0x105A0, 0x10579, eos, + 0x105A1, 0x1057A, eos, // 3781 + 0x105A3, 0x1057C, eos, + 0x105A4, 0x1057D, eos, + 0x105A5, 0x1057E, eos, // 3790 + 0x105A6, 0x1057F, eos, + 0x105A7, 0x10580, eos, + 0x105A8, 0x10581, eos, + 0x105A9, 0x10582, eos, // 3802 + 0x105AA, 0x10583, eos, + 0x105AB, 0x10584, eos, + 0x105AC, 0x10585, eos, // 3811 + 0x105AD, 0x10586, eos, + 0x105AE, 0x10587, eos, + 0x105AF, 0x10588, eos, // 3820 + 0x105B0, 0x10589, eos, + 0x105B1, 0x1058A, eos, + 0x105B3, 0x1058C, eos, + 0x105B4, 0x1058D, eos, // 3832 + 0x105B5, 0x1058E, eos, + 0x105B6, 0x1058F, eos, + 0x105B7, 0x10590, eos, // 3841 + 0x105B8, 0x10591, eos, + 0x105B9, 0x10592, eos, + 0x105BB, 0x10594, eos, // 3850 + 0x105BC, 0x10595, eos, + 0x10CC0, 0x10C80, eos, + 0x10CC1, 0x10C81, eos, + 0x10CC2, 0x10C82, eos, // 3862 + 0x10CC3, 0x10C83, eos, + 0x10CC4, 0x10C84, eos, + 0x10CC5, 0x10C85, eos, // 3871 + 0x10CC6, 0x10C86, eos, + 0x10CC7, 0x10C87, eos, + 0x10CC8, 0x10C88, eos, // 3880 + 0x10CC9, 0x10C89, eos, + 0x10CCA, 0x10C8A, eos, + 0x10CCB, 0x10C8B, eos, + 0x10CCC, 0x10C8C, eos, // 3892 + 0x10CCD, 0x10C8D, eos, + 0x10CCE, 0x10C8E, eos, + 0x10CCF, 0x10C8F, eos, // 3901 + 0x10CD0, 0x10C90, eos, + 0x10CD1, 0x10C91, eos, + 0x10CD2, 0x10C92, eos, // 3910 + 0x10CD3, 0x10C93, eos, + 0x10CD4, 0x10C94, eos, + 0x10CD5, 0x10C95, eos, + 0x10CD6, 0x10C96, eos, // 3922 + 0x10CD7, 0x10C97, eos, + 0x10CD8, 0x10C98, eos, + 0x10CD9, 0x10C99, eos, // 3931 + 0x10CDA, 0x10C9A, eos, + 0x10CDB, 0x10C9B, eos, + 0x10CDC, 0x10C9C, eos, // 3940 + 0x10CDD, 0x10C9D, eos, + 0x10CDE, 0x10C9E, eos, + 0x10CDF, 0x10C9F, eos, + 0x10CE0, 0x10CA0, eos, // 3952 + 0x10CE1, 0x10CA1, eos, + 0x10CE2, 0x10CA2, eos, + 0x10CE3, 0x10CA3, eos, // 3961 + 0x10CE4, 0x10CA4, eos, + 0x10CE5, 0x10CA5, eos, + 0x10CE6, 0x10CA6, eos, // 3970 + 0x10CE7, 0x10CA7, eos, + 0x10CE8, 0x10CA8, eos, + 0x10CE9, 0x10CA9, eos, + 0x10CEA, 0x10CAA, eos, // 3982 + 0x10CEB, 0x10CAB, eos, + 0x10CEC, 0x10CAC, eos, + 0x10CED, 0x10CAD, eos, // 3991 + 0x10CEE, 0x10CAE, eos, + 0x10CEF, 0x10CAF, eos, + 0x10CF0, 0x10CB0, eos, // 4000 + 0x10CF1, 0x10CB1, eos, + 0x10CF2, 0x10CB2, eos, + 0x118C0, 0x118A0, eos, + 0x118C1, 0x118A1, eos, // 4012 + 0x118C2, 0x118A2, eos, + 0x118C3, 0x118A3, eos, + 0x118C4, 0x118A4, eos, // 4021 + 0x118C5, 0x118A5, eos, + 0x118C6, 0x118A6, eos, + 0x118C7, 0x118A7, eos, // 4030 + 0x118C8, 0x118A8, eos, + 0x118C9, 0x118A9, eos, + 0x118CA, 0x118AA, eos, + 0x118CB, 0x118AB, eos, // 4042 + 0x118CC, 0x118AC, eos, + 0x118CD, 0x118AD, eos, + 0x118CE, 0x118AE, eos, // 4051 + 0x118CF, 0x118AF, eos, + 0x118D0, 0x118B0, eos, + 0x118D1, 0x118B1, eos, // 4060 + 0x118D2, 0x118B2, eos, + 0x118D3, 0x118B3, eos, + 0x118D4, 0x118B4, eos, + 0x118D5, 0x118B5, eos, // 4072 + 0x118D6, 0x118B6, eos, + 0x118D7, 0x118B7, eos, + 0x118D8, 0x118B8, eos, // 4081 + 0x118D9, 0x118B9, eos, + 0x118DA, 0x118BA, eos, + 0x118DB, 0x118BB, eos, // 4090 + 0x118DC, 0x118BC, eos, + 0x118DD, 0x118BD, eos, + 0x118DE, 0x118BE, eos, + 0x118DF, 0x118BF, eos, // 4102 + 0x16E60, 0x16E40, eos, + 0x16E61, 0x16E41, eos, + 0x16E62, 0x16E42, eos, // 4111 + 0x16E63, 0x16E43, eos, + 0x16E64, 0x16E44, eos, + 0x16E65, 0x16E45, eos, // 4120 + 0x16E66, 0x16E46, eos, + 0x16E67, 0x16E47, eos, + 0x16E68, 0x16E48, eos, + 0x16E69, 0x16E49, eos, // 4132 + 0x16E6A, 0x16E4A, eos, + 0x16E6B, 0x16E4B, eos, + 0x16E6C, 0x16E4C, eos, // 4141 + 0x16E6D, 0x16E4D, eos, + 0x16E6E, 0x16E4E, eos, + 0x16E6F, 0x16E4F, eos, // 4150 + 0x16E70, 0x16E50, eos, + 0x16E71, 0x16E51, eos, + 0x16E72, 0x16E52, eos, + 0x16E73, 0x16E53, eos, // 4162 + 0x16E74, 0x16E54, eos, + 0x16E75, 0x16E55, eos, + 0x16E76, 0x16E56, eos, // 4171 + 0x16E77, 0x16E57, eos, + 0x16E78, 0x16E58, eos, + 0x16E79, 0x16E59, eos, // 4180 + 0x16E7A, 0x16E5A, eos, + 0x16E7B, 0x16E5B, eos, + 0x16E7C, 0x16E5C, eos, + 0x16E7D, 0x16E5D, eos, // 4192 + 0x16E7E, 0x16E5E, eos, + 0x16E7F, 0x16E5F, eos, + 0x1E922, 0x1E900, eos, // 4201 + 0x1E923, 0x1E901, eos, + 0x1E924, 0x1E902, eos, + 0x1E925, 0x1E903, eos, // 4210 + 0x1E926, 0x1E904, eos, + 0x1E927, 0x1E905, eos, + 0x1E928, 0x1E906, eos, + 0x1E929, 0x1E907, eos, // 4222 + 0x1E92A, 0x1E908, eos, + 0x1E92B, 0x1E909, eos, + 0x1E92C, 0x1E90A, eos, // 4231 + 0x1E92D, 0x1E90B, eos, + 0x1E92E, 0x1E90C, eos, + 0x1E92F, 0x1E90D, eos, // 4240 + 0x1E930, 0x1E90E, eos, + 0x1E931, 0x1E90F, eos, + 0x1E932, 0x1E910, eos, + 0x1E933, 0x1E911, eos, // 4252 + 0x1E934, 0x1E912, eos, + 0x1E935, 0x1E913, eos, + 0x1E936, 0x1E914, eos, // 4261 + 0x1E937, 0x1E915, eos, + 0x1E938, 0x1E916, eos, + 0x1E939, 0x1E917, eos, // 4270 + 0x1E93A, 0x1E918, eos, + 0x1E93B, 0x1E919, eos, + 0x1E93C, 0x1E91A, eos, + 0x1E93D, 0x1E91B, eos, // 4282 + 0x1E93E, 0x1E91C, eos, + 0x1E93F, 0x1E91D, eos, + 0x1E940, 0x1E91E, eos, // 4291 + 0x1E941, 0x1E91F, eos, + 0x1E942, 0x1E920, eos, + 0x1E943, 0x1E921, eos // 4300 +}; +#define SRELL_UCFDATA_VERSION 200 +// ... "srell_ucfdata2.hpp"] + + namespace ucf_internal + { + +typedef unicode_casefolding ucf_data; + + } // namespace ucf_internal +#endif // !defined(SRELL_NO_UNICODE_ICASE) + +class unicode_case_folding +{ +public: + +#if !defined(SRELL_NO_UNICODE_ICASE) + static const uchar32 rev_maxset = ucf_internal::ucf_data::rev_maxset; +#else + static const uchar32 rev_maxset = 2; +#endif + + static uchar32 do_casefolding(const uchar32 cp) + { +#if !defined(SRELL_NO_UNICODE_ICASE) + if (cp <= ucf_internal::ucf_data::ucf_maxcodepoint) + return cp + ucf_internal::ucf_data::ucf_deltatable[ucf_internal::ucf_data::ucf_segmenttable[cp >> 8] + (cp & 0xff)]; +#else + if (cp >= char_alnum::ch_A && cp <= char_alnum::ch_Z) // 'A' && 'Z' + return static_cast(cp - char_alnum::ch_A + char_alnum::ch_a); // - 'A' + 'a' +#endif + return cp; + } + + static uchar32 casefoldedcharset(uchar32 out[rev_maxset], const uchar32 cp) + { +#if !defined(SRELL_NO_UNICODE_ICASE) + uchar32 count = 0; + + if (cp <= ucf_internal::ucf_data::rev_maxcodepoint) + { + const uchar32 offset_of_charset = ucf_internal::ucf_data::rev_indextable[ucf_internal::ucf_data::rev_segmenttable[cp >> 8] + (cp & 0xff)]; + const uchar32 *ptr = &ucf_internal::ucf_data::rev_charsettable[offset_of_charset]; + + for (; *ptr != cfcharset_eos_ && count < rev_maxset; ++ptr, ++count) + out[count] = *ptr; + } + if (count == 0) + out[count++] = cp; + + return count; +#else +// const uchar32 nocase = static_cast(cp & ~0x20); + const uchar32 nocase = static_cast(cp | constants::asc_icase); + + out[0] = cp; +// if (nocase >= char_alnum::ch_A && nocase <= char_alnum::ch_Z) + if (nocase >= char_alnum::ch_a && nocase <= char_alnum::ch_z) + { + out[1] = static_cast(cp ^ constants::asc_icase); + return 2; + } + return 1; +#endif + } + + unicode_case_folding &operator=(const unicode_case_folding &) + { + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + unicode_case_folding &operator=(unicode_case_folding &&) SRELL_NOEXCEPT + { + return *this; + } +#endif + + void swap(unicode_case_folding & /* right */) + { + } + +private: + +#if !defined(SRELL_NO_UNICODE_ICASE) + static const uchar32 cfcharset_eos_ = ucf_internal::ucf_data::eos; +#endif + +public: // For debug. + + void print_tables() const; +}; +// unicode_case_folding + + } // namespace regex_internal + +// ... "rei_ucf.hpp"] +// ["rei_up.hpp" ... + + namespace regex_internal + { + +#if !defined(SRELL_NO_UNICODE_PROPERTY) +// ["srell_updata.hpp" ... +// UnicodeData.txt +// +// PropList-14.0.0.txt +// Date: 2021-08-12, 23:13:05 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// +// DerivedCoreProperties-14.0.0.txt +// Date: 2021-08-12, 23:12:53 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// +// emoji-data-14.0.0.txt +// Date: 2021-08-26, 17:22:22 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// +// DerivedNormalizationProps-14.0.0.txt +// Date: 2021-06-04, 02:19:20 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// +// Scripts-14.0.0.txt +// Date: 2021-07-10, 00:35:31 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// +// ScriptExtensions-14.0.0.txt +// Date: 2021-06-04, 02:19:38 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// + +template +struct unicode_property_data +{ + static const T1 unknown = 0; + static const T1 gc_Other = 1; // #1 + static const T1 gc_Control = 2; // #2 + static const T1 gc_Format = 3; // #3 + static const T1 gc_Unassigned = 4; // #4 + static const T1 gc_Private_Use = 5; // #5 + static const T1 gc_Surrogate = 6; // #6 + static const T1 gc_Letter = 7; // #7 + static const T1 gc_Cased_Letter = 8; // #8 + static const T1 gc_Lowercase_Letter = 9; // #9 + static const T1 gc_Titlecase_Letter = 10; // #10 + static const T1 gc_Uppercase_Letter = 11; // #11 + static const T1 gc_Modifier_Letter = 12; // #12 + static const T1 gc_Other_Letter = 13; // #13 + static const T1 gc_Mark = 14; // #14 + static const T1 gc_Spacing_Mark = 15; // #15 + static const T1 gc_Enclosing_Mark = 16; // #16 + static const T1 gc_Nonspacing_Mark = 17; // #17 + static const T1 gc_Number = 18; // #18 + static const T1 gc_Decimal_Number = 19; // #19 + static const T1 gc_Letter_Number = 20; // #20 + static const T1 gc_Other_Number = 21; // #21 + static const T1 gc_Punctuation = 22; // #22 + static const T1 gc_Connector_Punctuation = 23; // #23 + static const T1 gc_Dash_Punctuation = 24; // #24 + static const T1 gc_Close_Punctuation = 25; // #25 + static const T1 gc_Final_Punctuation = 26; // #26 + static const T1 gc_Initial_Punctuation = 27; // #27 + static const T1 gc_Other_Punctuation = 28; // #28 + static const T1 gc_Open_Punctuation = 29; // #29 + static const T1 gc_Symbol = 30; // #30 + static const T1 gc_Currency_Symbol = 31; // #31 + static const T1 gc_Modifier_Symbol = 32; // #32 + static const T1 gc_Math_Symbol = 33; // #33 + static const T1 gc_Other_Symbol = 34; // #34 + static const T1 gc_Separator = 35; // #35 + static const T1 gc_Line_Separator = 36; // #36 + static const T1 gc_Paragraph_Separator = 37; // #37 + static const T1 gc_Space_Separator = 38; // #38 + static const T1 bp_ASCII = 39; // #39 + static const T1 bp_ASCII_Hex_Digit = 40; // #40 + static const T1 bp_Alphabetic = 41; // #41 + static const T1 bp_Any = 42; // #42 + static const T1 bp_Assigned = 43; // #43 + static const T1 bp_Bidi_Control = 44; // #44 + static const T1 bp_Bidi_Mirrored = 45; // #45 + static const T1 bp_Case_Ignorable = 46; // #46 + static const T1 bp_Cased = 47; // #47 + static const T1 bp_Changes_When_Casefolded = 48; // #48 + static const T1 bp_Changes_When_Casemapped = 49; // #49 + static const T1 bp_Changes_When_Lowercased = 50; // #50 + static const T1 bp_Changes_When_NFKC_Casefolded = 51; // #51 + static const T1 bp_Changes_When_Titlecased = 52; // #52 + static const T1 bp_Changes_When_Uppercased = 53; // #53 + static const T1 bp_Dash = 54; // #54 + static const T1 bp_Default_Ignorable_Code_Point = 55; // #55 + static const T1 bp_Deprecated = 56; // #56 + static const T1 bp_Diacritic = 57; // #57 + static const T1 bp_Emoji = 58; // #58 + static const T1 bp_Emoji_Component = 59; // #59 + static const T1 bp_Emoji_Modifier = 60; // #60 + static const T1 bp_Emoji_Modifier_Base = 61; // #61 + static const T1 bp_Emoji_Presentation = 62; // #62 + static const T1 bp_Extended_Pictographic = 63; // #63 + static const T1 bp_Extender = 64; // #64 + static const T1 bp_Grapheme_Base = 65; // #65 + static const T1 bp_Grapheme_Extend = 66; // #66 + static const T1 bp_Hex_Digit = 67; // #67 + static const T1 bp_IDS_Binary_Operator = 68; // #68 + static const T1 bp_IDS_Trinary_Operator = 69; // #69 + static const T1 bp_ID_Continue = 70; // #70 + static const T1 bp_ID_Start = 71; // #71 + static const T1 bp_Ideographic = 72; // #72 + static const T1 bp_Join_Control = 73; // #73 + static const T1 bp_Logical_Order_Exception = 74; // #74 + static const T1 bp_Lowercase = 75; // #75 + static const T1 bp_Math = 76; // #76 + static const T1 bp_Noncharacter_Code_Point = 77; // #77 + static const T1 bp_Pattern_Syntax = 78; // #78 + static const T1 bp_Pattern_White_Space = 79; // #79 + static const T1 bp_Quotation_Mark = 80; // #80 + static const T1 bp_Radical = 81; // #81 + static const T1 bp_Regional_Indicator = 82; // #82 + static const T1 bp_Sentence_Terminal = 83; // #83 + static const T1 bp_Soft_Dotted = 84; // #84 + static const T1 bp_Terminal_Punctuation = 85; // #85 + static const T1 bp_Unified_Ideograph = 86; // #86 + static const T1 bp_Uppercase = 87; // #87 + static const T1 bp_Variation_Selector = 88; // #88 + static const T1 bp_White_Space = 89; // #89 + static const T1 bp_XID_Continue = 90; // #90 + static const T1 bp_XID_Start = 91; // #91 + static const T1 sc_Adlam = 92; // #92 + static const T1 sc_Ahom = 93; // #93 + static const T1 sc_Anatolian_Hieroglyphs = 94; // #94 + static const T1 sc_Arabic = 95; // #95 + static const T1 sc_Armenian = 96; // #96 + static const T1 sc_Avestan = 97; // #97 + static const T1 sc_Balinese = 98; // #98 + static const T1 sc_Bamum = 99; // #99 + static const T1 sc_Bassa_Vah = 100; // #100 + static const T1 sc_Batak = 101; // #101 + static const T1 sc_Bengali = 102; // #102 + static const T1 sc_Bhaiksuki = 103; // #103 + static const T1 sc_Bopomofo = 104; // #104 + static const T1 sc_Brahmi = 105; // #105 + static const T1 sc_Braille = 106; // #106 + static const T1 sc_Buginese = 107; // #107 + static const T1 sc_Buhid = 108; // #108 + static const T1 sc_Canadian_Aboriginal = 109; // #109 + static const T1 sc_Carian = 110; // #110 + static const T1 sc_Caucasian_Albanian = 111; // #111 + static const T1 sc_Chakma = 112; // #112 + static const T1 sc_Cham = 113; // #113 + static const T1 sc_Cherokee = 114; // #114 + static const T1 sc_Chorasmian = 115; // #115 + static const T1 sc_Common = 116; // #116 + static const T1 sc_Coptic = 117; // #117 + static const T1 sc_Cypro_Minoan = 118; // #118 + static const T1 sc_Cuneiform = 119; // #119 + static const T1 sc_Cypriot = 120; // #120 + static const T1 sc_Cyrillic = 121; // #121 + static const T1 sc_Deseret = 122; // #122 + static const T1 sc_Devanagari = 123; // #123 + static const T1 sc_Dives_Akuru = 124; // #124 + static const T1 sc_Dogra = 125; // #125 + static const T1 sc_Duployan = 126; // #126 + static const T1 sc_Egyptian_Hieroglyphs = 127; // #127 + static const T1 sc_Elbasan = 128; // #128 + static const T1 sc_Elymaic = 129; // #129 + static const T1 sc_Ethiopic = 130; // #130 + static const T1 sc_Georgian = 131; // #131 + static const T1 sc_Glagolitic = 132; // #132 + static const T1 sc_Gothic = 133; // #133 + static const T1 sc_Grantha = 134; // #134 + static const T1 sc_Greek = 135; // #135 + static const T1 sc_Gujarati = 136; // #136 + static const T1 sc_Gunjala_Gondi = 137; // #137 + static const T1 sc_Gurmukhi = 138; // #138 + static const T1 sc_Han = 139; // #139 + static const T1 sc_Hangul = 140; // #140 + static const T1 sc_Hanifi_Rohingya = 141; // #141 + static const T1 sc_Hanunoo = 142; // #142 + static const T1 sc_Hatran = 143; // #143 + static const T1 sc_Hebrew = 144; // #144 + static const T1 sc_Hiragana = 145; // #145 + static const T1 sc_Imperial_Aramaic = 146; // #146 + static const T1 sc_Inherited = 147; // #147 + static const T1 sc_Inscriptional_Pahlavi = 148; // #148 + static const T1 sc_Inscriptional_Parthian = 149; // #149 + static const T1 sc_Javanese = 150; // #150 + static const T1 sc_Kaithi = 151; // #151 + static const T1 sc_Kannada = 152; // #152 + static const T1 sc_Katakana = 153; // #153 + static const T1 sc_Kayah_Li = 154; // #154 + static const T1 sc_Kharoshthi = 155; // #155 + static const T1 sc_Khitan_Small_Script = 156; // #156 + static const T1 sc_Khmer = 157; // #157 + static const T1 sc_Khojki = 158; // #158 + static const T1 sc_Khudawadi = 159; // #159 + static const T1 sc_Lao = 160; // #160 + static const T1 sc_Latin = 161; // #161 + static const T1 sc_Lepcha = 162; // #162 + static const T1 sc_Limbu = 163; // #163 + static const T1 sc_Linear_A = 164; // #164 + static const T1 sc_Linear_B = 165; // #165 + static const T1 sc_Lisu = 166; // #166 + static const T1 sc_Lycian = 167; // #167 + static const T1 sc_Lydian = 168; // #168 + static const T1 sc_Mahajani = 169; // #169 + static const T1 sc_Makasar = 170; // #170 + static const T1 sc_Malayalam = 171; // #171 + static const T1 sc_Mandaic = 172; // #172 + static const T1 sc_Manichaean = 173; // #173 + static const T1 sc_Marchen = 174; // #174 + static const T1 sc_Masaram_Gondi = 175; // #175 + static const T1 sc_Medefaidrin = 176; // #176 + static const T1 sc_Meetei_Mayek = 177; // #177 + static const T1 sc_Mende_Kikakui = 178; // #178 + static const T1 sc_Meroitic_Cursive = 179; // #179 + static const T1 sc_Meroitic_Hieroglyphs = 180; // #180 + static const T1 sc_Miao = 181; // #181 + static const T1 sc_Modi = 182; // #182 + static const T1 sc_Mongolian = 183; // #183 + static const T1 sc_Mro = 184; // #184 + static const T1 sc_Multani = 185; // #185 + static const T1 sc_Myanmar = 186; // #186 + static const T1 sc_Nabataean = 187; // #187 + static const T1 sc_Nandinagari = 188; // #188 + static const T1 sc_New_Tai_Lue = 189; // #189 + static const T1 sc_Newa = 190; // #190 + static const T1 sc_Nko = 191; // #191 + static const T1 sc_Nushu = 192; // #192 + static const T1 sc_Nyiakeng_Puachue_Hmong = 193; // #193 + static const T1 sc_Ogham = 194; // #194 + static const T1 sc_Ol_Chiki = 195; // #195 + static const T1 sc_Old_Hungarian = 196; // #196 + static const T1 sc_Old_Italic = 197; // #197 + static const T1 sc_Old_North_Arabian = 198; // #198 + static const T1 sc_Old_Permic = 199; // #199 + static const T1 sc_Old_Persian = 200; // #200 + static const T1 sc_Old_Sogdian = 201; // #201 + static const T1 sc_Old_South_Arabian = 202; // #202 + static const T1 sc_Old_Turkic = 203; // #203 + static const T1 sc_Old_Uyghur = 204; // #204 + static const T1 sc_Oriya = 205; // #205 + static const T1 sc_Osage = 206; // #206 + static const T1 sc_Osmanya = 207; // #207 + static const T1 sc_Pahawh_Hmong = 208; // #208 + static const T1 sc_Palmyrene = 209; // #209 + static const T1 sc_Pau_Cin_Hau = 210; // #210 + static const T1 sc_Phags_Pa = 211; // #211 + static const T1 sc_Phoenician = 212; // #212 + static const T1 sc_Psalter_Pahlavi = 213; // #213 + static const T1 sc_Rejang = 214; // #214 + static const T1 sc_Runic = 215; // #215 + static const T1 sc_Samaritan = 216; // #216 + static const T1 sc_Saurashtra = 217; // #217 + static const T1 sc_Sharada = 218; // #218 + static const T1 sc_Shavian = 219; // #219 + static const T1 sc_Siddham = 220; // #220 + static const T1 sc_SignWriting = 221; // #221 + static const T1 sc_Sinhala = 222; // #222 + static const T1 sc_Sogdian = 223; // #223 + static const T1 sc_Sora_Sompeng = 224; // #224 + static const T1 sc_Soyombo = 225; // #225 + static const T1 sc_Sundanese = 226; // #226 + static const T1 sc_Syloti_Nagri = 227; // #227 + static const T1 sc_Syriac = 228; // #228 + static const T1 sc_Tagalog = 229; // #229 + static const T1 sc_Tagbanwa = 230; // #230 + static const T1 sc_Tai_Le = 231; // #231 + static const T1 sc_Tai_Tham = 232; // #232 + static const T1 sc_Tai_Viet = 233; // #233 + static const T1 sc_Takri = 234; // #234 + static const T1 sc_Tamil = 235; // #235 + static const T1 sc_Tangsa = 236; // #236 + static const T1 sc_Tangut = 237; // #237 + static const T1 sc_Telugu = 238; // #238 + static const T1 sc_Thaana = 239; // #239 + static const T1 sc_Thai = 240; // #240 + static const T1 sc_Tibetan = 241; // #241 + static const T1 sc_Tifinagh = 242; // #242 + static const T1 sc_Tirhuta = 243; // #243 + static const T1 sc_Toto = 244; // #244 + static const T1 sc_Ugaritic = 245; // #245 + static const T1 sc_Vai = 246; // #246 + static const T1 sc_Vithkuqi = 247; // #247 + static const T1 sc_Wancho = 248; // #248 + static const T1 sc_Warang_Citi = 249; // #249 + static const T1 sc_Yezidi = 250; // #250 + static const T1 sc_Yi = 251; // #251 + static const T1 sc_Zanabazar_Square = 252; // #252 + static const T1 scx_Adlam = 253; // #253 + static const T1 scx_Ahom = 254; // #93 + static const T1 scx_Anatolian_Hieroglyphs = 255; // #94 + static const T1 scx_Arabic = 256; // #254 + static const T1 scx_Armenian = 257; // #96 + static const T1 scx_Avestan = 258; // #97 + static const T1 scx_Balinese = 259; // #98 + static const T1 scx_Bamum = 260; // #99 + static const T1 scx_Bassa_Vah = 261; // #100 + static const T1 scx_Batak = 262; // #101 + static const T1 scx_Bengali = 263; // #255 + static const T1 scx_Bhaiksuki = 264; // #103 + static const T1 scx_Bopomofo = 265; // #256 + static const T1 scx_Brahmi = 266; // #105 + static const T1 scx_Braille = 267; // #106 + static const T1 scx_Buginese = 268; // #257 + static const T1 scx_Buhid = 269; // #258 + static const T1 scx_Canadian_Aboriginal = 270; // #109 + static const T1 scx_Carian = 271; // #110 + static const T1 scx_Caucasian_Albanian = 272; // #111 + static const T1 scx_Chakma = 273; // #259 + static const T1 scx_Cham = 274; // #113 + static const T1 scx_Cherokee = 275; // #114 + static const T1 scx_Chorasmian = 276; // #115 + static const T1 scx_Common = 277; // #260 + static const T1 scx_Coptic = 278; // #261 + static const T1 scx_Cypro_Minoan = 279; // #262 + static const T1 scx_Cuneiform = 280; // #119 + static const T1 scx_Cypriot = 281; // #263 + static const T1 scx_Cyrillic = 282; // #264 + static const T1 scx_Deseret = 283; // #122 + static const T1 scx_Devanagari = 284; // #265 + static const T1 scx_Dives_Akuru = 285; // #124 + static const T1 scx_Dogra = 286; // #266 + static const T1 scx_Duployan = 287; // #267 + static const T1 scx_Egyptian_Hieroglyphs = 288; // #127 + static const T1 scx_Elbasan = 289; // #128 + static const T1 scx_Elymaic = 290; // #129 + static const T1 scx_Ethiopic = 291; // #130 + static const T1 scx_Georgian = 292; // #268 + static const T1 scx_Glagolitic = 293; // #269 + static const T1 scx_Gothic = 294; // #133 + static const T1 scx_Grantha = 295; // #270 + static const T1 scx_Greek = 296; // #271 + static const T1 scx_Gujarati = 297; // #272 + static const T1 scx_Gunjala_Gondi = 298; // #273 + static const T1 scx_Gurmukhi = 299; // #274 + static const T1 scx_Han = 300; // #275 + static const T1 scx_Hangul = 301; // #276 + static const T1 scx_Hanifi_Rohingya = 302; // #277 + static const T1 scx_Hanunoo = 303; // #278 + static const T1 scx_Hatran = 304; // #143 + static const T1 scx_Hebrew = 305; // #144 + static const T1 scx_Hiragana = 306; // #279 + static const T1 scx_Imperial_Aramaic = 307; // #146 + static const T1 scx_Inherited = 308; // #280 + static const T1 scx_Inscriptional_Pahlavi = 309; // #148 + static const T1 scx_Inscriptional_Parthian = 310; // #149 + static const T1 scx_Javanese = 311; // #281 + static const T1 scx_Kaithi = 312; // #282 + static const T1 scx_Kannada = 313; // #283 + static const T1 scx_Katakana = 314; // #284 + static const T1 scx_Kayah_Li = 315; // #285 + static const T1 scx_Kharoshthi = 316; // #155 + static const T1 scx_Khitan_Small_Script = 317; // #156 + static const T1 scx_Khmer = 318; // #157 + static const T1 scx_Khojki = 319; // #286 + static const T1 scx_Khudawadi = 320; // #287 + static const T1 scx_Lao = 321; // #160 + static const T1 scx_Latin = 322; // #288 + static const T1 scx_Lepcha = 323; // #162 + static const T1 scx_Limbu = 324; // #289 + static const T1 scx_Linear_A = 325; // #290 + static const T1 scx_Linear_B = 326; // #291 + static const T1 scx_Lisu = 327; // #166 + static const T1 scx_Lycian = 328; // #167 + static const T1 scx_Lydian = 329; // #168 + static const T1 scx_Mahajani = 330; // #292 + static const T1 scx_Makasar = 331; // #170 + static const T1 scx_Malayalam = 332; // #293 + static const T1 scx_Mandaic = 333; // #294 + static const T1 scx_Manichaean = 334; // #295 + static const T1 scx_Marchen = 335; // #174 + static const T1 scx_Masaram_Gondi = 336; // #296 + static const T1 scx_Medefaidrin = 337; // #176 + static const T1 scx_Meetei_Mayek = 338; // #177 + static const T1 scx_Mende_Kikakui = 339; // #178 + static const T1 scx_Meroitic_Cursive = 340; // #179 + static const T1 scx_Meroitic_Hieroglyphs = 341; // #180 + static const T1 scx_Miao = 342; // #181 + static const T1 scx_Modi = 343; // #297 + static const T1 scx_Mongolian = 344; // #298 + static const T1 scx_Mro = 345; // #184 + static const T1 scx_Multani = 346; // #299 + static const T1 scx_Myanmar = 347; // #300 + static const T1 scx_Nabataean = 348; // #187 + static const T1 scx_Nandinagari = 349; // #301 + static const T1 scx_New_Tai_Lue = 350; // #189 + static const T1 scx_Newa = 351; // #190 + static const T1 scx_Nko = 352; // #302 + static const T1 scx_Nushu = 353; // #192 + static const T1 scx_Nyiakeng_Puachue_Hmong = 354; // #193 + static const T1 scx_Ogham = 355; // #194 + static const T1 scx_Ol_Chiki = 356; // #195 + static const T1 scx_Old_Hungarian = 357; // #196 + static const T1 scx_Old_Italic = 358; // #197 + static const T1 scx_Old_North_Arabian = 359; // #198 + static const T1 scx_Old_Permic = 360; // #303 + static const T1 scx_Old_Persian = 361; // #200 + static const T1 scx_Old_Sogdian = 362; // #201 + static const T1 scx_Old_South_Arabian = 363; // #202 + static const T1 scx_Old_Turkic = 364; // #203 + static const T1 scx_Old_Uyghur = 365; // #304 + static const T1 scx_Oriya = 366; // #305 + static const T1 scx_Osage = 367; // #206 + static const T1 scx_Osmanya = 368; // #207 + static const T1 scx_Pahawh_Hmong = 369; // #208 + static const T1 scx_Palmyrene = 370; // #209 + static const T1 scx_Pau_Cin_Hau = 371; // #210 + static const T1 scx_Phags_Pa = 372; // #306 + static const T1 scx_Phoenician = 373; // #212 + static const T1 scx_Psalter_Pahlavi = 374; // #307 + static const T1 scx_Rejang = 375; // #214 + static const T1 scx_Runic = 376; // #215 + static const T1 scx_Samaritan = 377; // #216 + static const T1 scx_Saurashtra = 378; // #217 + static const T1 scx_Sharada = 379; // #308 + static const T1 scx_Shavian = 380; // #219 + static const T1 scx_Siddham = 381; // #220 + static const T1 scx_SignWriting = 382; // #221 + static const T1 scx_Sinhala = 383; // #309 + static const T1 scx_Sogdian = 384; // #310 + static const T1 scx_Sora_Sompeng = 385; // #224 + static const T1 scx_Soyombo = 386; // #225 + static const T1 scx_Sundanese = 387; // #226 + static const T1 scx_Syloti_Nagri = 388; // #311 + static const T1 scx_Syriac = 389; // #312 + static const T1 scx_Tagalog = 390; // #313 + static const T1 scx_Tagbanwa = 391; // #314 + static const T1 scx_Tai_Le = 392; // #315 + static const T1 scx_Tai_Tham = 393; // #232 + static const T1 scx_Tai_Viet = 394; // #233 + static const T1 scx_Takri = 395; // #316 + static const T1 scx_Tamil = 396; // #317 + static const T1 scx_Tangsa = 397; // #236 + static const T1 scx_Tangut = 398; // #237 + static const T1 scx_Telugu = 399; // #318 + static const T1 scx_Thaana = 400; // #319 + static const T1 scx_Thai = 401; // #240 + static const T1 scx_Tibetan = 402; // #241 + static const T1 scx_Tifinagh = 403; // #242 + static const T1 scx_Tirhuta = 404; // #320 + static const T1 scx_Toto = 405; // #244 + static const T1 scx_Ugaritic = 406; // #245 + static const T1 scx_Vai = 407; // #246 + static const T1 scx_Vithkuqi = 408; // #247 + static const T1 scx_Wancho = 409; // #248 + static const T1 scx_Warang_Citi = 410; // #249 + static const T1 scx_Yezidi = 411; // #321 + static const T1 scx_Yi = 412; // #322 + static const T1 scx_Zanabazar_Square = 413; // #252 + static const T1 last_property_number = 322; + struct ptype + { + static const T2 unknown = 0; + static const T2 binary = 1; + static const T2 general_category = 2; + static const T2 script = 3; + static const T2 script_extensions = 4; + }; + static const T3 propertynametable[]; + static const T4 rangetable[]; + static const T5 rangenumbertable[]; + static const T6 positiontable[]; + + static const T3 *propertyname_table() + { + return propertynametable; + } + static const T4 *ranges() + { + return rangetable; + } + static const T5 *rangenumber_table() + { + return rangenumbertable; + } + static const T6 *position_table() + { + return positiontable; + } +}; + +template +const T3 unicode_property_data::propertynametable[] = +{ + "*", // #0:unknown + "*", // #1:binary + "General_Category:gc", // #2 + "Script:sc", // #3 + "Script_Extensions:scx", // #4 + "" +}; + +template +const T4 unicode_property_data::rangetable[] = +{ + // #1 (0+725): gc=Other:C + // Cc:2 + Cf:21 + Cn:698 + Co:3 + Cs:1 + // #2 (0+2): gc=Control:Cc:cntrl + 0x0000, 0x001F, 0x007F, 0x009F, + // #3 (2+21): gc=Format:Cf + 0x00AD, 0x00AD, 0x0600, 0x0605, 0x061C, 0x061C, 0x06DD, 0x06DD, + 0x070F, 0x070F, 0x0890, 0x0891, 0x08E2, 0x08E2, 0x180E, 0x180E, + 0x200B, 0x200F, 0x202A, 0x202E, 0x2060, 0x2064, 0x2066, 0x206F, + 0xFEFF, 0xFEFF, 0xFFF9, 0xFFFB, 0x110BD, 0x110BD, 0x110CD, 0x110CD, + 0x13430, 0x13438, 0x1BCA0, 0x1BCA3, 0x1D173, 0x1D17A, 0xE0001, 0xE0001, + 0xE0020, 0xE007F, + // #4 (23+698): gc=Unassigned:Cn + 0x0378, 0x0379, 0x0380, 0x0383, 0x038B, 0x038B, 0x038D, 0x038D, + 0x03A2, 0x03A2, 0x0530, 0x0530, 0x0557, 0x0558, 0x058B, 0x058C, + 0x0590, 0x0590, 0x05C8, 0x05CF, 0x05EB, 0x05EE, 0x05F5, 0x05FF, + 0x070E, 0x070E, 0x074B, 0x074C, 0x07B2, 0x07BF, 0x07FB, 0x07FC, + 0x082E, 0x082F, 0x083F, 0x083F, 0x085C, 0x085D, 0x085F, 0x085F, + 0x086B, 0x086F, 0x088F, 0x088F, 0x0892, 0x0897, 0x0984, 0x0984, + 0x098D, 0x098E, 0x0991, 0x0992, 0x09A9, 0x09A9, 0x09B1, 0x09B1, + 0x09B3, 0x09B5, 0x09BA, 0x09BB, 0x09C5, 0x09C6, 0x09C9, 0x09CA, + 0x09CF, 0x09D6, 0x09D8, 0x09DB, 0x09DE, 0x09DE, 0x09E4, 0x09E5, + 0x09FF, 0x0A00, 0x0A04, 0x0A04, 0x0A0B, 0x0A0E, 0x0A11, 0x0A12, + 0x0A29, 0x0A29, 0x0A31, 0x0A31, 0x0A34, 0x0A34, 0x0A37, 0x0A37, + 0x0A3A, 0x0A3B, 0x0A3D, 0x0A3D, 0x0A43, 0x0A46, 0x0A49, 0x0A4A, + 0x0A4E, 0x0A50, 0x0A52, 0x0A58, 0x0A5D, 0x0A5D, 0x0A5F, 0x0A65, + 0x0A77, 0x0A80, 0x0A84, 0x0A84, 0x0A8E, 0x0A8E, 0x0A92, 0x0A92, + 0x0AA9, 0x0AA9, 0x0AB1, 0x0AB1, 0x0AB4, 0x0AB4, 0x0ABA, 0x0ABB, + 0x0AC6, 0x0AC6, 0x0ACA, 0x0ACA, 0x0ACE, 0x0ACF, 0x0AD1, 0x0ADF, + 0x0AE4, 0x0AE5, 0x0AF2, 0x0AF8, 0x0B00, 0x0B00, 0x0B04, 0x0B04, + 0x0B0D, 0x0B0E, 0x0B11, 0x0B12, 0x0B29, 0x0B29, 0x0B31, 0x0B31, + 0x0B34, 0x0B34, 0x0B3A, 0x0B3B, 0x0B45, 0x0B46, 0x0B49, 0x0B4A, + 0x0B4E, 0x0B54, 0x0B58, 0x0B5B, 0x0B5E, 0x0B5E, 0x0B64, 0x0B65, + 0x0B78, 0x0B81, 0x0B84, 0x0B84, 0x0B8B, 0x0B8D, 0x0B91, 0x0B91, + 0x0B96, 0x0B98, 0x0B9B, 0x0B9B, 0x0B9D, 0x0B9D, 0x0BA0, 0x0BA2, + 0x0BA5, 0x0BA7, 0x0BAB, 0x0BAD, 0x0BBA, 0x0BBD, 0x0BC3, 0x0BC5, + 0x0BC9, 0x0BC9, 0x0BCE, 0x0BCF, 0x0BD1, 0x0BD6, 0x0BD8, 0x0BE5, + 0x0BFB, 0x0BFF, 0x0C0D, 0x0C0D, 0x0C11, 0x0C11, 0x0C29, 0x0C29, + 0x0C3A, 0x0C3B, 0x0C45, 0x0C45, 0x0C49, 0x0C49, 0x0C4E, 0x0C54, + 0x0C57, 0x0C57, 0x0C5B, 0x0C5C, 0x0C5E, 0x0C5F, 0x0C64, 0x0C65, + 0x0C70, 0x0C76, 0x0C8D, 0x0C8D, 0x0C91, 0x0C91, 0x0CA9, 0x0CA9, + 0x0CB4, 0x0CB4, 0x0CBA, 0x0CBB, 0x0CC5, 0x0CC5, 0x0CC9, 0x0CC9, + 0x0CCE, 0x0CD4, 0x0CD7, 0x0CDC, 0x0CDF, 0x0CDF, 0x0CE4, 0x0CE5, + 0x0CF0, 0x0CF0, 0x0CF3, 0x0CFF, 0x0D0D, 0x0D0D, 0x0D11, 0x0D11, + 0x0D45, 0x0D45, 0x0D49, 0x0D49, 0x0D50, 0x0D53, 0x0D64, 0x0D65, + 0x0D80, 0x0D80, 0x0D84, 0x0D84, 0x0D97, 0x0D99, 0x0DB2, 0x0DB2, + 0x0DBC, 0x0DBC, 0x0DBE, 0x0DBF, 0x0DC7, 0x0DC9, 0x0DCB, 0x0DCE, + 0x0DD5, 0x0DD5, 0x0DD7, 0x0DD7, 0x0DE0, 0x0DE5, 0x0DF0, 0x0DF1, + 0x0DF5, 0x0E00, 0x0E3B, 0x0E3E, 0x0E5C, 0x0E80, 0x0E83, 0x0E83, + 0x0E85, 0x0E85, 0x0E8B, 0x0E8B, 0x0EA4, 0x0EA4, 0x0EA6, 0x0EA6, + 0x0EBE, 0x0EBF, 0x0EC5, 0x0EC5, 0x0EC7, 0x0EC7, 0x0ECE, 0x0ECF, + 0x0EDA, 0x0EDB, 0x0EE0, 0x0EFF, 0x0F48, 0x0F48, 0x0F6D, 0x0F70, + 0x0F98, 0x0F98, 0x0FBD, 0x0FBD, 0x0FCD, 0x0FCD, 0x0FDB, 0x0FFF, + 0x10C6, 0x10C6, 0x10C8, 0x10CC, 0x10CE, 0x10CF, 0x1249, 0x1249, + 0x124E, 0x124F, 0x1257, 0x1257, 0x1259, 0x1259, 0x125E, 0x125F, + 0x1289, 0x1289, 0x128E, 0x128F, 0x12B1, 0x12B1, 0x12B6, 0x12B7, + 0x12BF, 0x12BF, 0x12C1, 0x12C1, 0x12C6, 0x12C7, 0x12D7, 0x12D7, + 0x1311, 0x1311, 0x1316, 0x1317, 0x135B, 0x135C, 0x137D, 0x137F, + 0x139A, 0x139F, 0x13F6, 0x13F7, 0x13FE, 0x13FF, 0x169D, 0x169F, + 0x16F9, 0x16FF, 0x1716, 0x171E, 0x1737, 0x173F, 0x1754, 0x175F, + 0x176D, 0x176D, 0x1771, 0x1771, 0x1774, 0x177F, 0x17DE, 0x17DF, + 0x17EA, 0x17EF, 0x17FA, 0x17FF, 0x181A, 0x181F, 0x1879, 0x187F, + 0x18AB, 0x18AF, 0x18F6, 0x18FF, 0x191F, 0x191F, 0x192C, 0x192F, + 0x193C, 0x193F, 0x1941, 0x1943, 0x196E, 0x196F, 0x1975, 0x197F, + 0x19AC, 0x19AF, 0x19CA, 0x19CF, 0x19DB, 0x19DD, 0x1A1C, 0x1A1D, + 0x1A5F, 0x1A5F, 0x1A7D, 0x1A7E, 0x1A8A, 0x1A8F, 0x1A9A, 0x1A9F, + 0x1AAE, 0x1AAF, 0x1ACF, 0x1AFF, 0x1B4D, 0x1B4F, 0x1B7F, 0x1B7F, + 0x1BF4, 0x1BFB, 0x1C38, 0x1C3A, 0x1C4A, 0x1C4C, 0x1C89, 0x1C8F, + 0x1CBB, 0x1CBC, 0x1CC8, 0x1CCF, 0x1CFB, 0x1CFF, 0x1F16, 0x1F17, + 0x1F1E, 0x1F1F, 0x1F46, 0x1F47, 0x1F4E, 0x1F4F, 0x1F58, 0x1F58, + 0x1F5A, 0x1F5A, 0x1F5C, 0x1F5C, 0x1F5E, 0x1F5E, 0x1F7E, 0x1F7F, + 0x1FB5, 0x1FB5, 0x1FC5, 0x1FC5, 0x1FD4, 0x1FD5, 0x1FDC, 0x1FDC, + 0x1FF0, 0x1FF1, 0x1FF5, 0x1FF5, 0x1FFF, 0x1FFF, 0x2065, 0x2065, + 0x2072, 0x2073, 0x208F, 0x208F, 0x209D, 0x209F, 0x20C1, 0x20CF, + 0x20F1, 0x20FF, 0x218C, 0x218F, 0x2427, 0x243F, 0x244B, 0x245F, + 0x2B74, 0x2B75, 0x2B96, 0x2B96, 0x2CF4, 0x2CF8, 0x2D26, 0x2D26, + 0x2D28, 0x2D2C, 0x2D2E, 0x2D2F, 0x2D68, 0x2D6E, 0x2D71, 0x2D7E, + 0x2D97, 0x2D9F, 0x2DA7, 0x2DA7, 0x2DAF, 0x2DAF, 0x2DB7, 0x2DB7, + 0x2DBF, 0x2DBF, 0x2DC7, 0x2DC7, 0x2DCF, 0x2DCF, 0x2DD7, 0x2DD7, + 0x2DDF, 0x2DDF, 0x2E5E, 0x2E7F, 0x2E9A, 0x2E9A, 0x2EF4, 0x2EFF, + 0x2FD6, 0x2FEF, 0x2FFC, 0x2FFF, 0x3040, 0x3040, 0x3097, 0x3098, + 0x3100, 0x3104, 0x3130, 0x3130, 0x318F, 0x318F, 0x31E4, 0x31EF, + 0x321F, 0x321F, 0xA48D, 0xA48F, 0xA4C7, 0xA4CF, 0xA62C, 0xA63F, + 0xA6F8, 0xA6FF, 0xA7CB, 0xA7CF, 0xA7D2, 0xA7D2, 0xA7D4, 0xA7D4, + 0xA7DA, 0xA7F1, 0xA82D, 0xA82F, 0xA83A, 0xA83F, 0xA878, 0xA87F, + 0xA8C6, 0xA8CD, 0xA8DA, 0xA8DF, 0xA954, 0xA95E, 0xA97D, 0xA97F, + 0xA9CE, 0xA9CE, 0xA9DA, 0xA9DD, 0xA9FF, 0xA9FF, 0xAA37, 0xAA3F, + 0xAA4E, 0xAA4F, 0xAA5A, 0xAA5B, 0xAAC3, 0xAADA, 0xAAF7, 0xAB00, + 0xAB07, 0xAB08, 0xAB0F, 0xAB10, 0xAB17, 0xAB1F, 0xAB27, 0xAB27, + 0xAB2F, 0xAB2F, 0xAB6C, 0xAB6F, 0xABEE, 0xABEF, 0xABFA, 0xABFF, + 0xD7A4, 0xD7AF, 0xD7C7, 0xD7CA, 0xD7FC, 0xD7FF, 0xFA6E, 0xFA6F, + 0xFADA, 0xFAFF, 0xFB07, 0xFB12, 0xFB18, 0xFB1C, 0xFB37, 0xFB37, + 0xFB3D, 0xFB3D, 0xFB3F, 0xFB3F, 0xFB42, 0xFB42, 0xFB45, 0xFB45, + 0xFBC3, 0xFBD2, 0xFD90, 0xFD91, 0xFDC8, 0xFDCE, 0xFDD0, 0xFDEF, + 0xFE1A, 0xFE1F, 0xFE53, 0xFE53, 0xFE67, 0xFE67, 0xFE6C, 0xFE6F, + 0xFE75, 0xFE75, 0xFEFD, 0xFEFE, 0xFF00, 0xFF00, 0xFFBF, 0xFFC1, + 0xFFC8, 0xFFC9, 0xFFD0, 0xFFD1, 0xFFD8, 0xFFD9, 0xFFDD, 0xFFDF, + 0xFFE7, 0xFFE7, 0xFFEF, 0xFFF8, 0xFFFE, 0xFFFF, 0x1000C, 0x1000C, + 0x10027, 0x10027, 0x1003B, 0x1003B, 0x1003E, 0x1003E, 0x1004E, 0x1004F, + 0x1005E, 0x1007F, 0x100FB, 0x100FF, 0x10103, 0x10106, 0x10134, 0x10136, + 0x1018F, 0x1018F, 0x1019D, 0x1019F, 0x101A1, 0x101CF, 0x101FE, 0x1027F, + 0x1029D, 0x1029F, 0x102D1, 0x102DF, 0x102FC, 0x102FF, 0x10324, 0x1032C, + 0x1034B, 0x1034F, 0x1037B, 0x1037F, 0x1039E, 0x1039E, 0x103C4, 0x103C7, + 0x103D6, 0x103FF, 0x1049E, 0x1049F, 0x104AA, 0x104AF, 0x104D4, 0x104D7, + 0x104FC, 0x104FF, 0x10528, 0x1052F, 0x10564, 0x1056E, 0x1057B, 0x1057B, + 0x1058B, 0x1058B, 0x10593, 0x10593, 0x10596, 0x10596, 0x105A2, 0x105A2, + 0x105B2, 0x105B2, 0x105BA, 0x105BA, 0x105BD, 0x105FF, 0x10737, 0x1073F, + 0x10756, 0x1075F, 0x10768, 0x1077F, 0x10786, 0x10786, 0x107B1, 0x107B1, + 0x107BB, 0x107FF, 0x10806, 0x10807, 0x10809, 0x10809, 0x10836, 0x10836, + 0x10839, 0x1083B, 0x1083D, 0x1083E, 0x10856, 0x10856, 0x1089F, 0x108A6, + 0x108B0, 0x108DF, 0x108F3, 0x108F3, 0x108F6, 0x108FA, 0x1091C, 0x1091E, + 0x1093A, 0x1093E, 0x10940, 0x1097F, 0x109B8, 0x109BB, 0x109D0, 0x109D1, + 0x10A04, 0x10A04, 0x10A07, 0x10A0B, 0x10A14, 0x10A14, 0x10A18, 0x10A18, + 0x10A36, 0x10A37, 0x10A3B, 0x10A3E, 0x10A49, 0x10A4F, 0x10A59, 0x10A5F, + 0x10AA0, 0x10ABF, 0x10AE7, 0x10AEA, 0x10AF7, 0x10AFF, 0x10B36, 0x10B38, + 0x10B56, 0x10B57, 0x10B73, 0x10B77, 0x10B92, 0x10B98, 0x10B9D, 0x10BA8, + 0x10BB0, 0x10BFF, 0x10C49, 0x10C7F, 0x10CB3, 0x10CBF, 0x10CF3, 0x10CF9, + 0x10D28, 0x10D2F, 0x10D3A, 0x10E5F, 0x10E7F, 0x10E7F, 0x10EAA, 0x10EAA, + 0x10EAE, 0x10EAF, 0x10EB2, 0x10EFF, 0x10F28, 0x10F2F, 0x10F5A, 0x10F6F, + 0x10F8A, 0x10FAF, 0x10FCC, 0x10FDF, 0x10FF7, 0x10FFF, 0x1104E, 0x11051, + 0x11076, 0x1107E, 0x110C3, 0x110CC, 0x110CE, 0x110CF, 0x110E9, 0x110EF, + 0x110FA, 0x110FF, 0x11135, 0x11135, 0x11148, 0x1114F, 0x11177, 0x1117F, + 0x111E0, 0x111E0, 0x111F5, 0x111FF, 0x11212, 0x11212, 0x1123F, 0x1127F, + 0x11287, 0x11287, 0x11289, 0x11289, 0x1128E, 0x1128E, 0x1129E, 0x1129E, + 0x112AA, 0x112AF, 0x112EB, 0x112EF, 0x112FA, 0x112FF, 0x11304, 0x11304, + 0x1130D, 0x1130E, 0x11311, 0x11312, 0x11329, 0x11329, 0x11331, 0x11331, + 0x11334, 0x11334, 0x1133A, 0x1133A, 0x11345, 0x11346, 0x11349, 0x1134A, + 0x1134E, 0x1134F, 0x11351, 0x11356, 0x11358, 0x1135C, 0x11364, 0x11365, + 0x1136D, 0x1136F, 0x11375, 0x113FF, 0x1145C, 0x1145C, 0x11462, 0x1147F, + 0x114C8, 0x114CF, 0x114DA, 0x1157F, 0x115B6, 0x115B7, 0x115DE, 0x115FF, + 0x11645, 0x1164F, 0x1165A, 0x1165F, 0x1166D, 0x1167F, 0x116BA, 0x116BF, + 0x116CA, 0x116FF, 0x1171B, 0x1171C, 0x1172C, 0x1172F, 0x11747, 0x117FF, + 0x1183C, 0x1189F, 0x118F3, 0x118FE, 0x11907, 0x11908, 0x1190A, 0x1190B, + 0x11914, 0x11914, 0x11917, 0x11917, 0x11936, 0x11936, 0x11939, 0x1193A, + 0x11947, 0x1194F, 0x1195A, 0x1199F, 0x119A8, 0x119A9, 0x119D8, 0x119D9, + 0x119E5, 0x119FF, 0x11A48, 0x11A4F, 0x11AA3, 0x11AAF, 0x11AF9, 0x11BFF, + 0x11C09, 0x11C09, 0x11C37, 0x11C37, 0x11C46, 0x11C4F, 0x11C6D, 0x11C6F, + 0x11C90, 0x11C91, 0x11CA8, 0x11CA8, 0x11CB7, 0x11CFF, 0x11D07, 0x11D07, + 0x11D0A, 0x11D0A, 0x11D37, 0x11D39, 0x11D3B, 0x11D3B, 0x11D3E, 0x11D3E, + 0x11D48, 0x11D4F, 0x11D5A, 0x11D5F, 0x11D66, 0x11D66, 0x11D69, 0x11D69, + 0x11D8F, 0x11D8F, 0x11D92, 0x11D92, 0x11D99, 0x11D9F, 0x11DAA, 0x11EDF, + 0x11EF9, 0x11FAF, 0x11FB1, 0x11FBF, 0x11FF2, 0x11FFE, 0x1239A, 0x123FF, + 0x1246F, 0x1246F, 0x12475, 0x1247F, 0x12544, 0x12F8F, 0x12FF3, 0x12FFF, + 0x1342F, 0x1342F, 0x13439, 0x143FF, 0x14647, 0x167FF, 0x16A39, 0x16A3F, + 0x16A5F, 0x16A5F, 0x16A6A, 0x16A6D, 0x16ABF, 0x16ABF, 0x16ACA, 0x16ACF, + 0x16AEE, 0x16AEF, 0x16AF6, 0x16AFF, 0x16B46, 0x16B4F, 0x16B5A, 0x16B5A, + 0x16B62, 0x16B62, 0x16B78, 0x16B7C, 0x16B90, 0x16E3F, 0x16E9B, 0x16EFF, + 0x16F4B, 0x16F4E, 0x16F88, 0x16F8E, 0x16FA0, 0x16FDF, 0x16FE5, 0x16FEF, + 0x16FF2, 0x16FFF, 0x187F8, 0x187FF, 0x18CD6, 0x18CFF, 0x18D09, 0x1AFEF, + 0x1AFF4, 0x1AFF4, 0x1AFFC, 0x1AFFC, 0x1AFFF, 0x1AFFF, 0x1B123, 0x1B14F, + 0x1B153, 0x1B163, 0x1B168, 0x1B16F, 0x1B2FC, 0x1BBFF, 0x1BC6B, 0x1BC6F, + 0x1BC7D, 0x1BC7F, 0x1BC89, 0x1BC8F, 0x1BC9A, 0x1BC9B, 0x1BCA4, 0x1CEFF, + 0x1CF2E, 0x1CF2F, 0x1CF47, 0x1CF4F, 0x1CFC4, 0x1CFFF, 0x1D0F6, 0x1D0FF, + 0x1D127, 0x1D128, 0x1D1EB, 0x1D1FF, 0x1D246, 0x1D2DF, 0x1D2F4, 0x1D2FF, + 0x1D357, 0x1D35F, 0x1D379, 0x1D3FF, 0x1D455, 0x1D455, 0x1D49D, 0x1D49D, + 0x1D4A0, 0x1D4A1, 0x1D4A3, 0x1D4A4, 0x1D4A7, 0x1D4A8, 0x1D4AD, 0x1D4AD, + 0x1D4BA, 0x1D4BA, 0x1D4BC, 0x1D4BC, 0x1D4C4, 0x1D4C4, 0x1D506, 0x1D506, + 0x1D50B, 0x1D50C, 0x1D515, 0x1D515, 0x1D51D, 0x1D51D, 0x1D53A, 0x1D53A, + 0x1D53F, 0x1D53F, 0x1D545, 0x1D545, 0x1D547, 0x1D549, 0x1D551, 0x1D551, + 0x1D6A6, 0x1D6A7, 0x1D7CC, 0x1D7CD, 0x1DA8C, 0x1DA9A, 0x1DAA0, 0x1DAA0, + 0x1DAB0, 0x1DEFF, 0x1DF1F, 0x1DFFF, 0x1E007, 0x1E007, 0x1E019, 0x1E01A, + 0x1E022, 0x1E022, 0x1E025, 0x1E025, 0x1E02B, 0x1E0FF, 0x1E12D, 0x1E12F, + 0x1E13E, 0x1E13F, 0x1E14A, 0x1E14D, 0x1E150, 0x1E28F, 0x1E2AF, 0x1E2BF, + 0x1E2FA, 0x1E2FE, 0x1E300, 0x1E7DF, 0x1E7E7, 0x1E7E7, 0x1E7EC, 0x1E7EC, + 0x1E7EF, 0x1E7EF, 0x1E7FF, 0x1E7FF, 0x1E8C5, 0x1E8C6, 0x1E8D7, 0x1E8FF, + 0x1E94C, 0x1E94F, 0x1E95A, 0x1E95D, 0x1E960, 0x1EC70, 0x1ECB5, 0x1ED00, + 0x1ED3E, 0x1EDFF, 0x1EE04, 0x1EE04, 0x1EE20, 0x1EE20, 0x1EE23, 0x1EE23, + 0x1EE25, 0x1EE26, 0x1EE28, 0x1EE28, 0x1EE33, 0x1EE33, 0x1EE38, 0x1EE38, + 0x1EE3A, 0x1EE3A, 0x1EE3C, 0x1EE41, 0x1EE43, 0x1EE46, 0x1EE48, 0x1EE48, + 0x1EE4A, 0x1EE4A, 0x1EE4C, 0x1EE4C, 0x1EE50, 0x1EE50, 0x1EE53, 0x1EE53, + 0x1EE55, 0x1EE56, 0x1EE58, 0x1EE58, 0x1EE5A, 0x1EE5A, 0x1EE5C, 0x1EE5C, + 0x1EE5E, 0x1EE5E, 0x1EE60, 0x1EE60, 0x1EE63, 0x1EE63, 0x1EE65, 0x1EE66, + 0x1EE6B, 0x1EE6B, 0x1EE73, 0x1EE73, 0x1EE78, 0x1EE78, 0x1EE7D, 0x1EE7D, + 0x1EE7F, 0x1EE7F, 0x1EE8A, 0x1EE8A, 0x1EE9C, 0x1EEA0, 0x1EEA4, 0x1EEA4, + 0x1EEAA, 0x1EEAA, 0x1EEBC, 0x1EEEF, 0x1EEF2, 0x1EFFF, 0x1F02C, 0x1F02F, + 0x1F094, 0x1F09F, 0x1F0AF, 0x1F0B0, 0x1F0C0, 0x1F0C0, 0x1F0D0, 0x1F0D0, + 0x1F0F6, 0x1F0FF, 0x1F1AE, 0x1F1E5, 0x1F203, 0x1F20F, 0x1F23C, 0x1F23F, + 0x1F249, 0x1F24F, 0x1F252, 0x1F25F, 0x1F266, 0x1F2FF, 0x1F6D8, 0x1F6DC, + 0x1F6ED, 0x1F6EF, 0x1F6FD, 0x1F6FF, 0x1F774, 0x1F77F, 0x1F7D9, 0x1F7DF, + 0x1F7EC, 0x1F7EF, 0x1F7F1, 0x1F7FF, 0x1F80C, 0x1F80F, 0x1F848, 0x1F84F, + 0x1F85A, 0x1F85F, 0x1F888, 0x1F88F, 0x1F8AE, 0x1F8AF, 0x1F8B2, 0x1F8FF, + 0x1FA54, 0x1FA5F, 0x1FA6E, 0x1FA6F, 0x1FA75, 0x1FA77, 0x1FA7D, 0x1FA7F, + 0x1FA87, 0x1FA8F, 0x1FAAD, 0x1FAAF, 0x1FABB, 0x1FABF, 0x1FAC6, 0x1FACF, + 0x1FADA, 0x1FADF, 0x1FAE8, 0x1FAEF, 0x1FAF7, 0x1FAFF, 0x1FB93, 0x1FB93, + 0x1FBCB, 0x1FBEF, 0x1FBFA, 0x1FFFF, 0x2A6E0, 0x2A6FF, 0x2B739, 0x2B73F, + 0x2B81E, 0x2B81F, 0x2CEA2, 0x2CEAF, 0x2EBE1, 0x2F7FF, 0x2FA1E, 0x2FFFF, + 0x3134B, 0xE0000, 0xE0002, 0xE001F, 0xE0080, 0xE00FF, 0xE01F0, 0xEFFFF, + 0xFFFFE, 0xFFFFF, 0x10FFFE, 0x10FFFF, + // #5 (721+3): gc=Private_Use:Co + 0xE000, 0xF8FF, 0xF0000, 0xFFFFD, 0x100000, 0x10FFFD, + // #6 (724+1): gc=Surrogate:Cs + 0xD800, 0xDFFF, + // #7 (725+1883): gc=Letter:L + // Ll:657 + Lt:10 + Lu:646 + Lm:69 + Lo:501 + // #8 (725+1313): gc=Cased_Letter:LC + // Ll:657 + Lt:10 + Lu:646 + // #9 (725+657): gc=Lowercase_Letter:Ll + 0x0061, 0x007A, 0x00B5, 0x00B5, 0x00DF, 0x00F6, 0x00F8, 0x00FF, + 0x0101, 0x0101, 0x0103, 0x0103, 0x0105, 0x0105, 0x0107, 0x0107, + 0x0109, 0x0109, 0x010B, 0x010B, 0x010D, 0x010D, 0x010F, 0x010F, + 0x0111, 0x0111, 0x0113, 0x0113, 0x0115, 0x0115, 0x0117, 0x0117, + 0x0119, 0x0119, 0x011B, 0x011B, 0x011D, 0x011D, 0x011F, 0x011F, + 0x0121, 0x0121, 0x0123, 0x0123, 0x0125, 0x0125, 0x0127, 0x0127, + 0x0129, 0x0129, 0x012B, 0x012B, 0x012D, 0x012D, 0x012F, 0x012F, + 0x0131, 0x0131, 0x0133, 0x0133, 0x0135, 0x0135, 0x0137, 0x0138, + 0x013A, 0x013A, 0x013C, 0x013C, 0x013E, 0x013E, 0x0140, 0x0140, + 0x0142, 0x0142, 0x0144, 0x0144, 0x0146, 0x0146, 0x0148, 0x0149, + 0x014B, 0x014B, 0x014D, 0x014D, 0x014F, 0x014F, 0x0151, 0x0151, + 0x0153, 0x0153, 0x0155, 0x0155, 0x0157, 0x0157, 0x0159, 0x0159, + 0x015B, 0x015B, 0x015D, 0x015D, 0x015F, 0x015F, 0x0161, 0x0161, + 0x0163, 0x0163, 0x0165, 0x0165, 0x0167, 0x0167, 0x0169, 0x0169, + 0x016B, 0x016B, 0x016D, 0x016D, 0x016F, 0x016F, 0x0171, 0x0171, + 0x0173, 0x0173, 0x0175, 0x0175, 0x0177, 0x0177, 0x017A, 0x017A, + 0x017C, 0x017C, 0x017E, 0x0180, 0x0183, 0x0183, 0x0185, 0x0185, + 0x0188, 0x0188, 0x018C, 0x018D, 0x0192, 0x0192, 0x0195, 0x0195, + 0x0199, 0x019B, 0x019E, 0x019E, 0x01A1, 0x01A1, 0x01A3, 0x01A3, + 0x01A5, 0x01A5, 0x01A8, 0x01A8, 0x01AA, 0x01AB, 0x01AD, 0x01AD, + 0x01B0, 0x01B0, 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x01B9, 0x01BA, + 0x01BD, 0x01BF, 0x01C6, 0x01C6, 0x01C9, 0x01C9, 0x01CC, 0x01CC, + 0x01CE, 0x01CE, 0x01D0, 0x01D0, 0x01D2, 0x01D2, 0x01D4, 0x01D4, + 0x01D6, 0x01D6, 0x01D8, 0x01D8, 0x01DA, 0x01DA, 0x01DC, 0x01DD, + 0x01DF, 0x01DF, 0x01E1, 0x01E1, 0x01E3, 0x01E3, 0x01E5, 0x01E5, + 0x01E7, 0x01E7, 0x01E9, 0x01E9, 0x01EB, 0x01EB, 0x01ED, 0x01ED, + 0x01EF, 0x01F0, 0x01F3, 0x01F3, 0x01F5, 0x01F5, 0x01F9, 0x01F9, + 0x01FB, 0x01FB, 0x01FD, 0x01FD, 0x01FF, 0x01FF, 0x0201, 0x0201, + 0x0203, 0x0203, 0x0205, 0x0205, 0x0207, 0x0207, 0x0209, 0x0209, + 0x020B, 0x020B, 0x020D, 0x020D, 0x020F, 0x020F, 0x0211, 0x0211, + 0x0213, 0x0213, 0x0215, 0x0215, 0x0217, 0x0217, 0x0219, 0x0219, + 0x021B, 0x021B, 0x021D, 0x021D, 0x021F, 0x021F, 0x0221, 0x0221, + 0x0223, 0x0223, 0x0225, 0x0225, 0x0227, 0x0227, 0x0229, 0x0229, + 0x022B, 0x022B, 0x022D, 0x022D, 0x022F, 0x022F, 0x0231, 0x0231, + 0x0233, 0x0239, 0x023C, 0x023C, 0x023F, 0x0240, 0x0242, 0x0242, + 0x0247, 0x0247, 0x0249, 0x0249, 0x024B, 0x024B, 0x024D, 0x024D, + 0x024F, 0x0293, 0x0295, 0x02AF, 0x0371, 0x0371, 0x0373, 0x0373, + 0x0377, 0x0377, 0x037B, 0x037D, 0x0390, 0x0390, 0x03AC, 0x03CE, + 0x03D0, 0x03D1, 0x03D5, 0x03D7, 0x03D9, 0x03D9, 0x03DB, 0x03DB, + 0x03DD, 0x03DD, 0x03DF, 0x03DF, 0x03E1, 0x03E1, 0x03E3, 0x03E3, + 0x03E5, 0x03E5, 0x03E7, 0x03E7, 0x03E9, 0x03E9, 0x03EB, 0x03EB, + 0x03ED, 0x03ED, 0x03EF, 0x03F3, 0x03F5, 0x03F5, 0x03F8, 0x03F8, + 0x03FB, 0x03FC, 0x0430, 0x045F, 0x0461, 0x0461, 0x0463, 0x0463, + 0x0465, 0x0465, 0x0467, 0x0467, 0x0469, 0x0469, 0x046B, 0x046B, + 0x046D, 0x046D, 0x046F, 0x046F, 0x0471, 0x0471, 0x0473, 0x0473, + 0x0475, 0x0475, 0x0477, 0x0477, 0x0479, 0x0479, 0x047B, 0x047B, + 0x047D, 0x047D, 0x047F, 0x047F, 0x0481, 0x0481, 0x048B, 0x048B, + 0x048D, 0x048D, 0x048F, 0x048F, 0x0491, 0x0491, 0x0493, 0x0493, + 0x0495, 0x0495, 0x0497, 0x0497, 0x0499, 0x0499, 0x049B, 0x049B, + 0x049D, 0x049D, 0x049F, 0x049F, 0x04A1, 0x04A1, 0x04A3, 0x04A3, + 0x04A5, 0x04A5, 0x04A7, 0x04A7, 0x04A9, 0x04A9, 0x04AB, 0x04AB, + 0x04AD, 0x04AD, 0x04AF, 0x04AF, 0x04B1, 0x04B1, 0x04B3, 0x04B3, + 0x04B5, 0x04B5, 0x04B7, 0x04B7, 0x04B9, 0x04B9, 0x04BB, 0x04BB, + 0x04BD, 0x04BD, 0x04BF, 0x04BF, 0x04C2, 0x04C2, 0x04C4, 0x04C4, + 0x04C6, 0x04C6, 0x04C8, 0x04C8, 0x04CA, 0x04CA, 0x04CC, 0x04CC, + 0x04CE, 0x04CF, 0x04D1, 0x04D1, 0x04D3, 0x04D3, 0x04D5, 0x04D5, + 0x04D7, 0x04D7, 0x04D9, 0x04D9, 0x04DB, 0x04DB, 0x04DD, 0x04DD, + 0x04DF, 0x04DF, 0x04E1, 0x04E1, 0x04E3, 0x04E3, 0x04E5, 0x04E5, + 0x04E7, 0x04E7, 0x04E9, 0x04E9, 0x04EB, 0x04EB, 0x04ED, 0x04ED, + 0x04EF, 0x04EF, 0x04F1, 0x04F1, 0x04F3, 0x04F3, 0x04F5, 0x04F5, + 0x04F7, 0x04F7, 0x04F9, 0x04F9, 0x04FB, 0x04FB, 0x04FD, 0x04FD, + 0x04FF, 0x04FF, 0x0501, 0x0501, 0x0503, 0x0503, 0x0505, 0x0505, + 0x0507, 0x0507, 0x0509, 0x0509, 0x050B, 0x050B, 0x050D, 0x050D, + 0x050F, 0x050F, 0x0511, 0x0511, 0x0513, 0x0513, 0x0515, 0x0515, + 0x0517, 0x0517, 0x0519, 0x0519, 0x051B, 0x051B, 0x051D, 0x051D, + 0x051F, 0x051F, 0x0521, 0x0521, 0x0523, 0x0523, 0x0525, 0x0525, + 0x0527, 0x0527, 0x0529, 0x0529, 0x052B, 0x052B, 0x052D, 0x052D, + 0x052F, 0x052F, 0x0560, 0x0588, 0x10D0, 0x10FA, 0x10FD, 0x10FF, + 0x13F8, 0x13FD, 0x1C80, 0x1C88, 0x1D00, 0x1D2B, 0x1D6B, 0x1D77, + 0x1D79, 0x1D9A, 0x1E01, 0x1E01, 0x1E03, 0x1E03, 0x1E05, 0x1E05, + 0x1E07, 0x1E07, 0x1E09, 0x1E09, 0x1E0B, 0x1E0B, 0x1E0D, 0x1E0D, + 0x1E0F, 0x1E0F, 0x1E11, 0x1E11, 0x1E13, 0x1E13, 0x1E15, 0x1E15, + 0x1E17, 0x1E17, 0x1E19, 0x1E19, 0x1E1B, 0x1E1B, 0x1E1D, 0x1E1D, + 0x1E1F, 0x1E1F, 0x1E21, 0x1E21, 0x1E23, 0x1E23, 0x1E25, 0x1E25, + 0x1E27, 0x1E27, 0x1E29, 0x1E29, 0x1E2B, 0x1E2B, 0x1E2D, 0x1E2D, + 0x1E2F, 0x1E2F, 0x1E31, 0x1E31, 0x1E33, 0x1E33, 0x1E35, 0x1E35, + 0x1E37, 0x1E37, 0x1E39, 0x1E39, 0x1E3B, 0x1E3B, 0x1E3D, 0x1E3D, + 0x1E3F, 0x1E3F, 0x1E41, 0x1E41, 0x1E43, 0x1E43, 0x1E45, 0x1E45, + 0x1E47, 0x1E47, 0x1E49, 0x1E49, 0x1E4B, 0x1E4B, 0x1E4D, 0x1E4D, + 0x1E4F, 0x1E4F, 0x1E51, 0x1E51, 0x1E53, 0x1E53, 0x1E55, 0x1E55, + 0x1E57, 0x1E57, 0x1E59, 0x1E59, 0x1E5B, 0x1E5B, 0x1E5D, 0x1E5D, + 0x1E5F, 0x1E5F, 0x1E61, 0x1E61, 0x1E63, 0x1E63, 0x1E65, 0x1E65, + 0x1E67, 0x1E67, 0x1E69, 0x1E69, 0x1E6B, 0x1E6B, 0x1E6D, 0x1E6D, + 0x1E6F, 0x1E6F, 0x1E71, 0x1E71, 0x1E73, 0x1E73, 0x1E75, 0x1E75, + 0x1E77, 0x1E77, 0x1E79, 0x1E79, 0x1E7B, 0x1E7B, 0x1E7D, 0x1E7D, + 0x1E7F, 0x1E7F, 0x1E81, 0x1E81, 0x1E83, 0x1E83, 0x1E85, 0x1E85, + 0x1E87, 0x1E87, 0x1E89, 0x1E89, 0x1E8B, 0x1E8B, 0x1E8D, 0x1E8D, + 0x1E8F, 0x1E8F, 0x1E91, 0x1E91, 0x1E93, 0x1E93, 0x1E95, 0x1E9D, + 0x1E9F, 0x1E9F, 0x1EA1, 0x1EA1, 0x1EA3, 0x1EA3, 0x1EA5, 0x1EA5, + 0x1EA7, 0x1EA7, 0x1EA9, 0x1EA9, 0x1EAB, 0x1EAB, 0x1EAD, 0x1EAD, + 0x1EAF, 0x1EAF, 0x1EB1, 0x1EB1, 0x1EB3, 0x1EB3, 0x1EB5, 0x1EB5, + 0x1EB7, 0x1EB7, 0x1EB9, 0x1EB9, 0x1EBB, 0x1EBB, 0x1EBD, 0x1EBD, + 0x1EBF, 0x1EBF, 0x1EC1, 0x1EC1, 0x1EC3, 0x1EC3, 0x1EC5, 0x1EC5, + 0x1EC7, 0x1EC7, 0x1EC9, 0x1EC9, 0x1ECB, 0x1ECB, 0x1ECD, 0x1ECD, + 0x1ECF, 0x1ECF, 0x1ED1, 0x1ED1, 0x1ED3, 0x1ED3, 0x1ED5, 0x1ED5, + 0x1ED7, 0x1ED7, 0x1ED9, 0x1ED9, 0x1EDB, 0x1EDB, 0x1EDD, 0x1EDD, + 0x1EDF, 0x1EDF, 0x1EE1, 0x1EE1, 0x1EE3, 0x1EE3, 0x1EE5, 0x1EE5, + 0x1EE7, 0x1EE7, 0x1EE9, 0x1EE9, 0x1EEB, 0x1EEB, 0x1EED, 0x1EED, + 0x1EEF, 0x1EEF, 0x1EF1, 0x1EF1, 0x1EF3, 0x1EF3, 0x1EF5, 0x1EF5, + 0x1EF7, 0x1EF7, 0x1EF9, 0x1EF9, 0x1EFB, 0x1EFB, 0x1EFD, 0x1EFD, + 0x1EFF, 0x1F07, 0x1F10, 0x1F15, 0x1F20, 0x1F27, 0x1F30, 0x1F37, + 0x1F40, 0x1F45, 0x1F50, 0x1F57, 0x1F60, 0x1F67, 0x1F70, 0x1F7D, + 0x1F80, 0x1F87, 0x1F90, 0x1F97, 0x1FA0, 0x1FA7, 0x1FB0, 0x1FB4, + 0x1FB6, 0x1FB7, 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FC7, + 0x1FD0, 0x1FD3, 0x1FD6, 0x1FD7, 0x1FE0, 0x1FE7, 0x1FF2, 0x1FF4, + 0x1FF6, 0x1FF7, 0x210A, 0x210A, 0x210E, 0x210F, 0x2113, 0x2113, + 0x212F, 0x212F, 0x2134, 0x2134, 0x2139, 0x2139, 0x213C, 0x213D, + 0x2146, 0x2149, 0x214E, 0x214E, 0x2184, 0x2184, 0x2C30, 0x2C5F, + 0x2C61, 0x2C61, 0x2C65, 0x2C66, 0x2C68, 0x2C68, 0x2C6A, 0x2C6A, + 0x2C6C, 0x2C6C, 0x2C71, 0x2C71, 0x2C73, 0x2C74, 0x2C76, 0x2C7B, + 0x2C81, 0x2C81, 0x2C83, 0x2C83, 0x2C85, 0x2C85, 0x2C87, 0x2C87, + 0x2C89, 0x2C89, 0x2C8B, 0x2C8B, 0x2C8D, 0x2C8D, 0x2C8F, 0x2C8F, + 0x2C91, 0x2C91, 0x2C93, 0x2C93, 0x2C95, 0x2C95, 0x2C97, 0x2C97, + 0x2C99, 0x2C99, 0x2C9B, 0x2C9B, 0x2C9D, 0x2C9D, 0x2C9F, 0x2C9F, + 0x2CA1, 0x2CA1, 0x2CA3, 0x2CA3, 0x2CA5, 0x2CA5, 0x2CA7, 0x2CA7, + 0x2CA9, 0x2CA9, 0x2CAB, 0x2CAB, 0x2CAD, 0x2CAD, 0x2CAF, 0x2CAF, + 0x2CB1, 0x2CB1, 0x2CB3, 0x2CB3, 0x2CB5, 0x2CB5, 0x2CB7, 0x2CB7, + 0x2CB9, 0x2CB9, 0x2CBB, 0x2CBB, 0x2CBD, 0x2CBD, 0x2CBF, 0x2CBF, + 0x2CC1, 0x2CC1, 0x2CC3, 0x2CC3, 0x2CC5, 0x2CC5, 0x2CC7, 0x2CC7, + 0x2CC9, 0x2CC9, 0x2CCB, 0x2CCB, 0x2CCD, 0x2CCD, 0x2CCF, 0x2CCF, + 0x2CD1, 0x2CD1, 0x2CD3, 0x2CD3, 0x2CD5, 0x2CD5, 0x2CD7, 0x2CD7, + 0x2CD9, 0x2CD9, 0x2CDB, 0x2CDB, 0x2CDD, 0x2CDD, 0x2CDF, 0x2CDF, + 0x2CE1, 0x2CE1, 0x2CE3, 0x2CE4, 0x2CEC, 0x2CEC, 0x2CEE, 0x2CEE, + 0x2CF3, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, + 0xA641, 0xA641, 0xA643, 0xA643, 0xA645, 0xA645, 0xA647, 0xA647, + 0xA649, 0xA649, 0xA64B, 0xA64B, 0xA64D, 0xA64D, 0xA64F, 0xA64F, + 0xA651, 0xA651, 0xA653, 0xA653, 0xA655, 0xA655, 0xA657, 0xA657, + 0xA659, 0xA659, 0xA65B, 0xA65B, 0xA65D, 0xA65D, 0xA65F, 0xA65F, + 0xA661, 0xA661, 0xA663, 0xA663, 0xA665, 0xA665, 0xA667, 0xA667, + 0xA669, 0xA669, 0xA66B, 0xA66B, 0xA66D, 0xA66D, 0xA681, 0xA681, + 0xA683, 0xA683, 0xA685, 0xA685, 0xA687, 0xA687, 0xA689, 0xA689, + 0xA68B, 0xA68B, 0xA68D, 0xA68D, 0xA68F, 0xA68F, 0xA691, 0xA691, + 0xA693, 0xA693, 0xA695, 0xA695, 0xA697, 0xA697, 0xA699, 0xA699, + 0xA69B, 0xA69B, 0xA723, 0xA723, 0xA725, 0xA725, 0xA727, 0xA727, + 0xA729, 0xA729, 0xA72B, 0xA72B, 0xA72D, 0xA72D, 0xA72F, 0xA731, + 0xA733, 0xA733, 0xA735, 0xA735, 0xA737, 0xA737, 0xA739, 0xA739, + 0xA73B, 0xA73B, 0xA73D, 0xA73D, 0xA73F, 0xA73F, 0xA741, 0xA741, + 0xA743, 0xA743, 0xA745, 0xA745, 0xA747, 0xA747, 0xA749, 0xA749, + 0xA74B, 0xA74B, 0xA74D, 0xA74D, 0xA74F, 0xA74F, 0xA751, 0xA751, + 0xA753, 0xA753, 0xA755, 0xA755, 0xA757, 0xA757, 0xA759, 0xA759, + 0xA75B, 0xA75B, 0xA75D, 0xA75D, 0xA75F, 0xA75F, 0xA761, 0xA761, + 0xA763, 0xA763, 0xA765, 0xA765, 0xA767, 0xA767, 0xA769, 0xA769, + 0xA76B, 0xA76B, 0xA76D, 0xA76D, 0xA76F, 0xA76F, 0xA771, 0xA778, + 0xA77A, 0xA77A, 0xA77C, 0xA77C, 0xA77F, 0xA77F, 0xA781, 0xA781, + 0xA783, 0xA783, 0xA785, 0xA785, 0xA787, 0xA787, 0xA78C, 0xA78C, + 0xA78E, 0xA78E, 0xA791, 0xA791, 0xA793, 0xA795, 0xA797, 0xA797, + 0xA799, 0xA799, 0xA79B, 0xA79B, 0xA79D, 0xA79D, 0xA79F, 0xA79F, + 0xA7A1, 0xA7A1, 0xA7A3, 0xA7A3, 0xA7A5, 0xA7A5, 0xA7A7, 0xA7A7, + 0xA7A9, 0xA7A9, 0xA7AF, 0xA7AF, 0xA7B5, 0xA7B5, 0xA7B7, 0xA7B7, + 0xA7B9, 0xA7B9, 0xA7BB, 0xA7BB, 0xA7BD, 0xA7BD, 0xA7BF, 0xA7BF, + 0xA7C1, 0xA7C1, 0xA7C3, 0xA7C3, 0xA7C8, 0xA7C8, 0xA7CA, 0xA7CA, + 0xA7D1, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D5, 0xA7D7, 0xA7D7, + 0xA7D9, 0xA7D9, 0xA7F6, 0xA7F6, 0xA7FA, 0xA7FA, 0xAB30, 0xAB5A, + 0xAB60, 0xAB68, 0xAB70, 0xABBF, 0xFB00, 0xFB06, 0xFB13, 0xFB17, + 0xFF41, 0xFF5A, 0x10428, 0x1044F, 0x104D8, 0x104FB, 0x10597, 0x105A1, + 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10CC0, 0x10CF2, + 0x118C0, 0x118DF, 0x16E60, 0x16E7F, 0x1D41A, 0x1D433, 0x1D44E, 0x1D454, + 0x1D456, 0x1D467, 0x1D482, 0x1D49B, 0x1D4B6, 0x1D4B9, 0x1D4BB, 0x1D4BB, + 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D4CF, 0x1D4EA, 0x1D503, 0x1D51E, 0x1D537, + 0x1D552, 0x1D56B, 0x1D586, 0x1D59F, 0x1D5BA, 0x1D5D3, 0x1D5EE, 0x1D607, + 0x1D622, 0x1D63B, 0x1D656, 0x1D66F, 0x1D68A, 0x1D6A5, 0x1D6C2, 0x1D6DA, + 0x1D6DC, 0x1D6E1, 0x1D6FC, 0x1D714, 0x1D716, 0x1D71B, 0x1D736, 0x1D74E, + 0x1D750, 0x1D755, 0x1D770, 0x1D788, 0x1D78A, 0x1D78F, 0x1D7AA, 0x1D7C2, + 0x1D7C4, 0x1D7C9, 0x1D7CB, 0x1D7CB, 0x1DF00, 0x1DF09, 0x1DF0B, 0x1DF1E, + 0x1E922, 0x1E943, + // #10 (1382+10): gc=Titlecase_Letter:Lt + 0x01C5, 0x01C5, 0x01C8, 0x01C8, 0x01CB, 0x01CB, 0x01F2, 0x01F2, + 0x1F88, 0x1F8F, 0x1F98, 0x1F9F, 0x1FA8, 0x1FAF, 0x1FBC, 0x1FBC, + 0x1FCC, 0x1FCC, 0x1FFC, 0x1FFC, + // #11 (1392+646): gc=Uppercase_Letter:Lu + 0x0041, 0x005A, 0x00C0, 0x00D6, 0x00D8, 0x00DE, 0x0100, 0x0100, + 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106, 0x0108, 0x0108, + 0x010A, 0x010A, 0x010C, 0x010C, 0x010E, 0x010E, 0x0110, 0x0110, + 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116, 0x0118, 0x0118, + 0x011A, 0x011A, 0x011C, 0x011C, 0x011E, 0x011E, 0x0120, 0x0120, + 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126, 0x0128, 0x0128, + 0x012A, 0x012A, 0x012C, 0x012C, 0x012E, 0x012E, 0x0130, 0x0130, + 0x0132, 0x0132, 0x0134, 0x0134, 0x0136, 0x0136, 0x0139, 0x0139, + 0x013B, 0x013B, 0x013D, 0x013D, 0x013F, 0x013F, 0x0141, 0x0141, + 0x0143, 0x0143, 0x0145, 0x0145, 0x0147, 0x0147, 0x014A, 0x014A, + 0x014C, 0x014C, 0x014E, 0x014E, 0x0150, 0x0150, 0x0152, 0x0152, + 0x0154, 0x0154, 0x0156, 0x0156, 0x0158, 0x0158, 0x015A, 0x015A, + 0x015C, 0x015C, 0x015E, 0x015E, 0x0160, 0x0160, 0x0162, 0x0162, + 0x0164, 0x0164, 0x0166, 0x0166, 0x0168, 0x0168, 0x016A, 0x016A, + 0x016C, 0x016C, 0x016E, 0x016E, 0x0170, 0x0170, 0x0172, 0x0172, + 0x0174, 0x0174, 0x0176, 0x0176, 0x0178, 0x0179, 0x017B, 0x017B, + 0x017D, 0x017D, 0x0181, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187, + 0x0189, 0x018B, 0x018E, 0x0191, 0x0193, 0x0194, 0x0196, 0x0198, + 0x019C, 0x019D, 0x019F, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, + 0x01A6, 0x01A7, 0x01A9, 0x01A9, 0x01AC, 0x01AC, 0x01AE, 0x01AF, + 0x01B1, 0x01B3, 0x01B5, 0x01B5, 0x01B7, 0x01B8, 0x01BC, 0x01BC, + 0x01C4, 0x01C4, 0x01C7, 0x01C7, 0x01CA, 0x01CA, 0x01CD, 0x01CD, + 0x01CF, 0x01CF, 0x01D1, 0x01D1, 0x01D3, 0x01D3, 0x01D5, 0x01D5, + 0x01D7, 0x01D7, 0x01D9, 0x01D9, 0x01DB, 0x01DB, 0x01DE, 0x01DE, + 0x01E0, 0x01E0, 0x01E2, 0x01E2, 0x01E4, 0x01E4, 0x01E6, 0x01E6, + 0x01E8, 0x01E8, 0x01EA, 0x01EA, 0x01EC, 0x01EC, 0x01EE, 0x01EE, + 0x01F1, 0x01F1, 0x01F4, 0x01F4, 0x01F6, 0x01F8, 0x01FA, 0x01FA, + 0x01FC, 0x01FC, 0x01FE, 0x01FE, 0x0200, 0x0200, 0x0202, 0x0202, + 0x0204, 0x0204, 0x0206, 0x0206, 0x0208, 0x0208, 0x020A, 0x020A, + 0x020C, 0x020C, 0x020E, 0x020E, 0x0210, 0x0210, 0x0212, 0x0212, + 0x0214, 0x0214, 0x0216, 0x0216, 0x0218, 0x0218, 0x021A, 0x021A, + 0x021C, 0x021C, 0x021E, 0x021E, 0x0220, 0x0220, 0x0222, 0x0222, + 0x0224, 0x0224, 0x0226, 0x0226, 0x0228, 0x0228, 0x022A, 0x022A, + 0x022C, 0x022C, 0x022E, 0x022E, 0x0230, 0x0230, 0x0232, 0x0232, + 0x023A, 0x023B, 0x023D, 0x023E, 0x0241, 0x0241, 0x0243, 0x0246, + 0x0248, 0x0248, 0x024A, 0x024A, 0x024C, 0x024C, 0x024E, 0x024E, + 0x0370, 0x0370, 0x0372, 0x0372, 0x0376, 0x0376, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x038F, + 0x0391, 0x03A1, 0x03A3, 0x03AB, 0x03CF, 0x03CF, 0x03D2, 0x03D4, + 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, + 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, + 0x03E8, 0x03E8, 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, + 0x03F4, 0x03F4, 0x03F7, 0x03F7, 0x03F9, 0x03FA, 0x03FD, 0x042F, + 0x0460, 0x0460, 0x0462, 0x0462, 0x0464, 0x0464, 0x0466, 0x0466, + 0x0468, 0x0468, 0x046A, 0x046A, 0x046C, 0x046C, 0x046E, 0x046E, + 0x0470, 0x0470, 0x0472, 0x0472, 0x0474, 0x0474, 0x0476, 0x0476, + 0x0478, 0x0478, 0x047A, 0x047A, 0x047C, 0x047C, 0x047E, 0x047E, + 0x0480, 0x0480, 0x048A, 0x048A, 0x048C, 0x048C, 0x048E, 0x048E, + 0x0490, 0x0490, 0x0492, 0x0492, 0x0494, 0x0494, 0x0496, 0x0496, + 0x0498, 0x0498, 0x049A, 0x049A, 0x049C, 0x049C, 0x049E, 0x049E, + 0x04A0, 0x04A0, 0x04A2, 0x04A2, 0x04A4, 0x04A4, 0x04A6, 0x04A6, + 0x04A8, 0x04A8, 0x04AA, 0x04AA, 0x04AC, 0x04AC, 0x04AE, 0x04AE, + 0x04B0, 0x04B0, 0x04B2, 0x04B2, 0x04B4, 0x04B4, 0x04B6, 0x04B6, + 0x04B8, 0x04B8, 0x04BA, 0x04BA, 0x04BC, 0x04BC, 0x04BE, 0x04BE, + 0x04C0, 0x04C1, 0x04C3, 0x04C3, 0x04C5, 0x04C5, 0x04C7, 0x04C7, + 0x04C9, 0x04C9, 0x04CB, 0x04CB, 0x04CD, 0x04CD, 0x04D0, 0x04D0, + 0x04D2, 0x04D2, 0x04D4, 0x04D4, 0x04D6, 0x04D6, 0x04D8, 0x04D8, + 0x04DA, 0x04DA, 0x04DC, 0x04DC, 0x04DE, 0x04DE, 0x04E0, 0x04E0, + 0x04E2, 0x04E2, 0x04E4, 0x04E4, 0x04E6, 0x04E6, 0x04E8, 0x04E8, + 0x04EA, 0x04EA, 0x04EC, 0x04EC, 0x04EE, 0x04EE, 0x04F0, 0x04F0, + 0x04F2, 0x04F2, 0x04F4, 0x04F4, 0x04F6, 0x04F6, 0x04F8, 0x04F8, + 0x04FA, 0x04FA, 0x04FC, 0x04FC, 0x04FE, 0x04FE, 0x0500, 0x0500, + 0x0502, 0x0502, 0x0504, 0x0504, 0x0506, 0x0506, 0x0508, 0x0508, + 0x050A, 0x050A, 0x050C, 0x050C, 0x050E, 0x050E, 0x0510, 0x0510, + 0x0512, 0x0512, 0x0514, 0x0514, 0x0516, 0x0516, 0x0518, 0x0518, + 0x051A, 0x051A, 0x051C, 0x051C, 0x051E, 0x051E, 0x0520, 0x0520, + 0x0522, 0x0522, 0x0524, 0x0524, 0x0526, 0x0526, 0x0528, 0x0528, + 0x052A, 0x052A, 0x052C, 0x052C, 0x052E, 0x052E, 0x0531, 0x0556, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x13A0, 0x13F5, + 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1E00, 0x1E00, 0x1E02, 0x1E02, + 0x1E04, 0x1E04, 0x1E06, 0x1E06, 0x1E08, 0x1E08, 0x1E0A, 0x1E0A, + 0x1E0C, 0x1E0C, 0x1E0E, 0x1E0E, 0x1E10, 0x1E10, 0x1E12, 0x1E12, + 0x1E14, 0x1E14, 0x1E16, 0x1E16, 0x1E18, 0x1E18, 0x1E1A, 0x1E1A, + 0x1E1C, 0x1E1C, 0x1E1E, 0x1E1E, 0x1E20, 0x1E20, 0x1E22, 0x1E22, + 0x1E24, 0x1E24, 0x1E26, 0x1E26, 0x1E28, 0x1E28, 0x1E2A, 0x1E2A, + 0x1E2C, 0x1E2C, 0x1E2E, 0x1E2E, 0x1E30, 0x1E30, 0x1E32, 0x1E32, + 0x1E34, 0x1E34, 0x1E36, 0x1E36, 0x1E38, 0x1E38, 0x1E3A, 0x1E3A, + 0x1E3C, 0x1E3C, 0x1E3E, 0x1E3E, 0x1E40, 0x1E40, 0x1E42, 0x1E42, + 0x1E44, 0x1E44, 0x1E46, 0x1E46, 0x1E48, 0x1E48, 0x1E4A, 0x1E4A, + 0x1E4C, 0x1E4C, 0x1E4E, 0x1E4E, 0x1E50, 0x1E50, 0x1E52, 0x1E52, + 0x1E54, 0x1E54, 0x1E56, 0x1E56, 0x1E58, 0x1E58, 0x1E5A, 0x1E5A, + 0x1E5C, 0x1E5C, 0x1E5E, 0x1E5E, 0x1E60, 0x1E60, 0x1E62, 0x1E62, + 0x1E64, 0x1E64, 0x1E66, 0x1E66, 0x1E68, 0x1E68, 0x1E6A, 0x1E6A, + 0x1E6C, 0x1E6C, 0x1E6E, 0x1E6E, 0x1E70, 0x1E70, 0x1E72, 0x1E72, + 0x1E74, 0x1E74, 0x1E76, 0x1E76, 0x1E78, 0x1E78, 0x1E7A, 0x1E7A, + 0x1E7C, 0x1E7C, 0x1E7E, 0x1E7E, 0x1E80, 0x1E80, 0x1E82, 0x1E82, + 0x1E84, 0x1E84, 0x1E86, 0x1E86, 0x1E88, 0x1E88, 0x1E8A, 0x1E8A, + 0x1E8C, 0x1E8C, 0x1E8E, 0x1E8E, 0x1E90, 0x1E90, 0x1E92, 0x1E92, + 0x1E94, 0x1E94, 0x1E9E, 0x1E9E, 0x1EA0, 0x1EA0, 0x1EA2, 0x1EA2, + 0x1EA4, 0x1EA4, 0x1EA6, 0x1EA6, 0x1EA8, 0x1EA8, 0x1EAA, 0x1EAA, + 0x1EAC, 0x1EAC, 0x1EAE, 0x1EAE, 0x1EB0, 0x1EB0, 0x1EB2, 0x1EB2, + 0x1EB4, 0x1EB4, 0x1EB6, 0x1EB6, 0x1EB8, 0x1EB8, 0x1EBA, 0x1EBA, + 0x1EBC, 0x1EBC, 0x1EBE, 0x1EBE, 0x1EC0, 0x1EC0, 0x1EC2, 0x1EC2, + 0x1EC4, 0x1EC4, 0x1EC6, 0x1EC6, 0x1EC8, 0x1EC8, 0x1ECA, 0x1ECA, + 0x1ECC, 0x1ECC, 0x1ECE, 0x1ECE, 0x1ED0, 0x1ED0, 0x1ED2, 0x1ED2, + 0x1ED4, 0x1ED4, 0x1ED6, 0x1ED6, 0x1ED8, 0x1ED8, 0x1EDA, 0x1EDA, + 0x1EDC, 0x1EDC, 0x1EDE, 0x1EDE, 0x1EE0, 0x1EE0, 0x1EE2, 0x1EE2, + 0x1EE4, 0x1EE4, 0x1EE6, 0x1EE6, 0x1EE8, 0x1EE8, 0x1EEA, 0x1EEA, + 0x1EEC, 0x1EEC, 0x1EEE, 0x1EEE, 0x1EF0, 0x1EF0, 0x1EF2, 0x1EF2, + 0x1EF4, 0x1EF4, 0x1EF6, 0x1EF6, 0x1EF8, 0x1EF8, 0x1EFA, 0x1EFA, + 0x1EFC, 0x1EFC, 0x1EFE, 0x1EFE, 0x1F08, 0x1F0F, 0x1F18, 0x1F1D, + 0x1F28, 0x1F2F, 0x1F38, 0x1F3F, 0x1F48, 0x1F4D, 0x1F59, 0x1F59, + 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F5F, 0x1F68, 0x1F6F, + 0x1FB8, 0x1FBB, 0x1FC8, 0x1FCB, 0x1FD8, 0x1FDB, 0x1FE8, 0x1FEC, + 0x1FF8, 0x1FFB, 0x2102, 0x2102, 0x2107, 0x2107, 0x210B, 0x210D, + 0x2110, 0x2112, 0x2115, 0x2115, 0x2119, 0x211D, 0x2124, 0x2124, + 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x212D, 0x2130, 0x2133, + 0x213E, 0x213F, 0x2145, 0x2145, 0x2183, 0x2183, 0x2C00, 0x2C2F, + 0x2C60, 0x2C60, 0x2C62, 0x2C64, 0x2C67, 0x2C67, 0x2C69, 0x2C69, + 0x2C6B, 0x2C6B, 0x2C6D, 0x2C70, 0x2C72, 0x2C72, 0x2C75, 0x2C75, + 0x2C7E, 0x2C80, 0x2C82, 0x2C82, 0x2C84, 0x2C84, 0x2C86, 0x2C86, + 0x2C88, 0x2C88, 0x2C8A, 0x2C8A, 0x2C8C, 0x2C8C, 0x2C8E, 0x2C8E, + 0x2C90, 0x2C90, 0x2C92, 0x2C92, 0x2C94, 0x2C94, 0x2C96, 0x2C96, + 0x2C98, 0x2C98, 0x2C9A, 0x2C9A, 0x2C9C, 0x2C9C, 0x2C9E, 0x2C9E, + 0x2CA0, 0x2CA0, 0x2CA2, 0x2CA2, 0x2CA4, 0x2CA4, 0x2CA6, 0x2CA6, + 0x2CA8, 0x2CA8, 0x2CAA, 0x2CAA, 0x2CAC, 0x2CAC, 0x2CAE, 0x2CAE, + 0x2CB0, 0x2CB0, 0x2CB2, 0x2CB2, 0x2CB4, 0x2CB4, 0x2CB6, 0x2CB6, + 0x2CB8, 0x2CB8, 0x2CBA, 0x2CBA, 0x2CBC, 0x2CBC, 0x2CBE, 0x2CBE, + 0x2CC0, 0x2CC0, 0x2CC2, 0x2CC2, 0x2CC4, 0x2CC4, 0x2CC6, 0x2CC6, + 0x2CC8, 0x2CC8, 0x2CCA, 0x2CCA, 0x2CCC, 0x2CCC, 0x2CCE, 0x2CCE, + 0x2CD0, 0x2CD0, 0x2CD2, 0x2CD2, 0x2CD4, 0x2CD4, 0x2CD6, 0x2CD6, + 0x2CD8, 0x2CD8, 0x2CDA, 0x2CDA, 0x2CDC, 0x2CDC, 0x2CDE, 0x2CDE, + 0x2CE0, 0x2CE0, 0x2CE2, 0x2CE2, 0x2CEB, 0x2CEB, 0x2CED, 0x2CED, + 0x2CF2, 0x2CF2, 0xA640, 0xA640, 0xA642, 0xA642, 0xA644, 0xA644, + 0xA646, 0xA646, 0xA648, 0xA648, 0xA64A, 0xA64A, 0xA64C, 0xA64C, + 0xA64E, 0xA64E, 0xA650, 0xA650, 0xA652, 0xA652, 0xA654, 0xA654, + 0xA656, 0xA656, 0xA658, 0xA658, 0xA65A, 0xA65A, 0xA65C, 0xA65C, + 0xA65E, 0xA65E, 0xA660, 0xA660, 0xA662, 0xA662, 0xA664, 0xA664, + 0xA666, 0xA666, 0xA668, 0xA668, 0xA66A, 0xA66A, 0xA66C, 0xA66C, + 0xA680, 0xA680, 0xA682, 0xA682, 0xA684, 0xA684, 0xA686, 0xA686, + 0xA688, 0xA688, 0xA68A, 0xA68A, 0xA68C, 0xA68C, 0xA68E, 0xA68E, + 0xA690, 0xA690, 0xA692, 0xA692, 0xA694, 0xA694, 0xA696, 0xA696, + 0xA698, 0xA698, 0xA69A, 0xA69A, 0xA722, 0xA722, 0xA724, 0xA724, + 0xA726, 0xA726, 0xA728, 0xA728, 0xA72A, 0xA72A, 0xA72C, 0xA72C, + 0xA72E, 0xA72E, 0xA732, 0xA732, 0xA734, 0xA734, 0xA736, 0xA736, + 0xA738, 0xA738, 0xA73A, 0xA73A, 0xA73C, 0xA73C, 0xA73E, 0xA73E, + 0xA740, 0xA740, 0xA742, 0xA742, 0xA744, 0xA744, 0xA746, 0xA746, + 0xA748, 0xA748, 0xA74A, 0xA74A, 0xA74C, 0xA74C, 0xA74E, 0xA74E, + 0xA750, 0xA750, 0xA752, 0xA752, 0xA754, 0xA754, 0xA756, 0xA756, + 0xA758, 0xA758, 0xA75A, 0xA75A, 0xA75C, 0xA75C, 0xA75E, 0xA75E, + 0xA760, 0xA760, 0xA762, 0xA762, 0xA764, 0xA764, 0xA766, 0xA766, + 0xA768, 0xA768, 0xA76A, 0xA76A, 0xA76C, 0xA76C, 0xA76E, 0xA76E, + 0xA779, 0xA779, 0xA77B, 0xA77B, 0xA77D, 0xA77E, 0xA780, 0xA780, + 0xA782, 0xA782, 0xA784, 0xA784, 0xA786, 0xA786, 0xA78B, 0xA78B, + 0xA78D, 0xA78D, 0xA790, 0xA790, 0xA792, 0xA792, 0xA796, 0xA796, + 0xA798, 0xA798, 0xA79A, 0xA79A, 0xA79C, 0xA79C, 0xA79E, 0xA79E, + 0xA7A0, 0xA7A0, 0xA7A2, 0xA7A2, 0xA7A4, 0xA7A4, 0xA7A6, 0xA7A6, + 0xA7A8, 0xA7A8, 0xA7AA, 0xA7AE, 0xA7B0, 0xA7B4, 0xA7B6, 0xA7B6, + 0xA7B8, 0xA7B8, 0xA7BA, 0xA7BA, 0xA7BC, 0xA7BC, 0xA7BE, 0xA7BE, + 0xA7C0, 0xA7C0, 0xA7C2, 0xA7C2, 0xA7C4, 0xA7C7, 0xA7C9, 0xA7C9, + 0xA7D0, 0xA7D0, 0xA7D6, 0xA7D6, 0xA7D8, 0xA7D8, 0xA7F5, 0xA7F5, + 0xFF21, 0xFF3A, 0x10400, 0x10427, 0x104B0, 0x104D3, 0x10570, 0x1057A, + 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, 0x10C80, 0x10CB2, + 0x118A0, 0x118BF, 0x16E40, 0x16E5F, 0x1D400, 0x1D419, 0x1D434, 0x1D44D, + 0x1D468, 0x1D481, 0x1D49C, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, + 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B5, 0x1D4D0, 0x1D4E9, + 0x1D504, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, + 0x1D538, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, + 0x1D54A, 0x1D550, 0x1D56C, 0x1D585, 0x1D5A0, 0x1D5B9, 0x1D5D4, 0x1D5ED, + 0x1D608, 0x1D621, 0x1D63C, 0x1D655, 0x1D670, 0x1D689, 0x1D6A8, 0x1D6C0, + 0x1D6E2, 0x1D6FA, 0x1D71C, 0x1D734, 0x1D756, 0x1D76E, 0x1D790, 0x1D7A8, + 0x1D7CA, 0x1D7CA, 0x1E900, 0x1E921, + // #12 (2038+69): gc=Modifier_Letter:Lm + 0x02B0, 0x02C1, 0x02C6, 0x02D1, 0x02E0, 0x02E4, 0x02EC, 0x02EC, + 0x02EE, 0x02EE, 0x0374, 0x0374, 0x037A, 0x037A, 0x0559, 0x0559, + 0x0640, 0x0640, 0x06E5, 0x06E6, 0x07F4, 0x07F5, 0x07FA, 0x07FA, + 0x081A, 0x081A, 0x0824, 0x0824, 0x0828, 0x0828, 0x08C9, 0x08C9, + 0x0971, 0x0971, 0x0E46, 0x0E46, 0x0EC6, 0x0EC6, 0x10FC, 0x10FC, + 0x17D7, 0x17D7, 0x1843, 0x1843, 0x1AA7, 0x1AA7, 0x1C78, 0x1C7D, + 0x1D2C, 0x1D6A, 0x1D78, 0x1D78, 0x1D9B, 0x1DBF, 0x2071, 0x2071, + 0x207F, 0x207F, 0x2090, 0x209C, 0x2C7C, 0x2C7D, 0x2D6F, 0x2D6F, + 0x2E2F, 0x2E2F, 0x3005, 0x3005, 0x3031, 0x3035, 0x303B, 0x303B, + 0x309D, 0x309E, 0x30FC, 0x30FE, 0xA015, 0xA015, 0xA4F8, 0xA4FD, + 0xA60C, 0xA60C, 0xA67F, 0xA67F, 0xA69C, 0xA69D, 0xA717, 0xA71F, + 0xA770, 0xA770, 0xA788, 0xA788, 0xA7F2, 0xA7F4, 0xA7F8, 0xA7F9, + 0xA9CF, 0xA9CF, 0xA9E6, 0xA9E6, 0xAA70, 0xAA70, 0xAADD, 0xAADD, + 0xAAF3, 0xAAF4, 0xAB5C, 0xAB5F, 0xAB69, 0xAB69, 0xFF70, 0xFF70, + 0xFF9E, 0xFF9F, 0x10780, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, + 0x16B40, 0x16B43, 0x16F93, 0x16F9F, 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE3, + 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1E137, 0x1E13D, + 0x1E94B, 0x1E94B, + // #13 (2107+501): gc=Other_Letter:Lo + 0x00AA, 0x00AA, 0x00BA, 0x00BA, 0x01BB, 0x01BB, 0x01C0, 0x01C3, + 0x0294, 0x0294, 0x05D0, 0x05EA, 0x05EF, 0x05F2, 0x0620, 0x063F, + 0x0641, 0x064A, 0x066E, 0x066F, 0x0671, 0x06D3, 0x06D5, 0x06D5, + 0x06EE, 0x06EF, 0x06FA, 0x06FC, 0x06FF, 0x06FF, 0x0710, 0x0710, + 0x0712, 0x072F, 0x074D, 0x07A5, 0x07B1, 0x07B1, 0x07CA, 0x07EA, + 0x0800, 0x0815, 0x0840, 0x0858, 0x0860, 0x086A, 0x0870, 0x0887, + 0x0889, 0x088E, 0x08A0, 0x08C8, 0x0904, 0x0939, 0x093D, 0x093D, + 0x0950, 0x0950, 0x0958, 0x0961, 0x0972, 0x0980, 0x0985, 0x098C, + 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B2, 0x09B2, + 0x09B6, 0x09B9, 0x09BD, 0x09BD, 0x09CE, 0x09CE, 0x09DC, 0x09DD, + 0x09DF, 0x09E1, 0x09F0, 0x09F1, 0x09FC, 0x09FC, 0x0A05, 0x0A0A, + 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, + 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, + 0x0A72, 0x0A74, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABD, 0x0ABD, + 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE1, 0x0AF9, 0x0AF9, 0x0B05, 0x0B0C, + 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, + 0x0B35, 0x0B39, 0x0B3D, 0x0B3D, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, + 0x0B71, 0x0B71, 0x0B83, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, + 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, + 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BD0, 0x0BD0, + 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C39, + 0x0C3D, 0x0C3D, 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, 0x0C60, 0x0C61, + 0x0C80, 0x0C80, 0x0C85, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, + 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBD, 0x0CBD, 0x0CDD, 0x0CDE, + 0x0CE0, 0x0CE1, 0x0CF1, 0x0CF2, 0x0D04, 0x0D0C, 0x0D0E, 0x0D10, + 0x0D12, 0x0D3A, 0x0D3D, 0x0D3D, 0x0D4E, 0x0D4E, 0x0D54, 0x0D56, + 0x0D5F, 0x0D61, 0x0D7A, 0x0D7F, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, + 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0E01, 0x0E30, + 0x0E32, 0x0E33, 0x0E40, 0x0E45, 0x0E81, 0x0E82, 0x0E84, 0x0E84, + 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, 0x0EA7, 0x0EB0, + 0x0EB2, 0x0EB3, 0x0EBD, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EDC, 0x0EDF, + 0x0F00, 0x0F00, 0x0F40, 0x0F47, 0x0F49, 0x0F6C, 0x0F88, 0x0F8C, + 0x1000, 0x102A, 0x103F, 0x103F, 0x1050, 0x1055, 0x105A, 0x105D, + 0x1061, 0x1061, 0x1065, 0x1066, 0x106E, 0x1070, 0x1075, 0x1081, + 0x108E, 0x108E, 0x1100, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, + 0x1258, 0x1258, 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, + 0x1290, 0x12B0, 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, + 0x12C2, 0x12C5, 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, + 0x1318, 0x135A, 0x1380, 0x138F, 0x1401, 0x166C, 0x166F, 0x167F, + 0x1681, 0x169A, 0x16A0, 0x16EA, 0x16F1, 0x16F8, 0x1700, 0x1711, + 0x171F, 0x1731, 0x1740, 0x1751, 0x1760, 0x176C, 0x176E, 0x1770, + 0x1780, 0x17B3, 0x17DC, 0x17DC, 0x1820, 0x1842, 0x1844, 0x1878, + 0x1880, 0x1884, 0x1887, 0x18A8, 0x18AA, 0x18AA, 0x18B0, 0x18F5, + 0x1900, 0x191E, 0x1950, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, + 0x19B0, 0x19C9, 0x1A00, 0x1A16, 0x1A20, 0x1A54, 0x1B05, 0x1B33, + 0x1B45, 0x1B4C, 0x1B83, 0x1BA0, 0x1BAE, 0x1BAF, 0x1BBA, 0x1BE5, + 0x1C00, 0x1C23, 0x1C4D, 0x1C4F, 0x1C5A, 0x1C77, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF6, 0x1CFA, 0x1CFA, 0x2135, 0x2138, + 0x2D30, 0x2D67, 0x2D80, 0x2D96, 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, + 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, + 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, 0x3006, 0x3006, 0x303C, 0x303C, + 0x3041, 0x3096, 0x309F, 0x309F, 0x30A1, 0x30FA, 0x30FF, 0x30FF, + 0x3105, 0x312F, 0x3131, 0x318E, 0x31A0, 0x31BF, 0x31F0, 0x31FF, + 0x3400, 0x4DBF, 0x4E00, 0xA014, 0xA016, 0xA48C, 0xA4D0, 0xA4F7, + 0xA500, 0xA60B, 0xA610, 0xA61F, 0xA62A, 0xA62B, 0xA66E, 0xA66E, + 0xA6A0, 0xA6E5, 0xA78F, 0xA78F, 0xA7F7, 0xA7F7, 0xA7FB, 0xA801, + 0xA803, 0xA805, 0xA807, 0xA80A, 0xA80C, 0xA822, 0xA840, 0xA873, + 0xA882, 0xA8B3, 0xA8F2, 0xA8F7, 0xA8FB, 0xA8FB, 0xA8FD, 0xA8FE, + 0xA90A, 0xA925, 0xA930, 0xA946, 0xA960, 0xA97C, 0xA984, 0xA9B2, + 0xA9E0, 0xA9E4, 0xA9E7, 0xA9EF, 0xA9FA, 0xA9FE, 0xAA00, 0xAA28, + 0xAA40, 0xAA42, 0xAA44, 0xAA4B, 0xAA60, 0xAA6F, 0xAA71, 0xAA76, + 0xAA7A, 0xAA7A, 0xAA7E, 0xAAAF, 0xAAB1, 0xAAB1, 0xAAB5, 0xAAB6, + 0xAAB9, 0xAABD, 0xAAC0, 0xAAC0, 0xAAC2, 0xAAC2, 0xAADB, 0xAADC, + 0xAAE0, 0xAAEA, 0xAAF2, 0xAAF2, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, + 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xABC0, 0xABE2, + 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, + 0xFA70, 0xFAD9, 0xFB1D, 0xFB1D, 0xFB1F, 0xFB28, 0xFB2A, 0xFB36, + 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, + 0xFB46, 0xFBB1, 0xFBD3, 0xFD3D, 0xFD50, 0xFD8F, 0xFD92, 0xFDC7, + 0xFDF0, 0xFDFB, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0xFF66, 0xFF6F, + 0xFF71, 0xFF9D, 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, + 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, 0x10000, 0x1000B, 0x1000D, 0x10026, + 0x10028, 0x1003A, 0x1003C, 0x1003D, 0x1003F, 0x1004D, 0x10050, 0x1005D, + 0x10080, 0x100FA, 0x10280, 0x1029C, 0x102A0, 0x102D0, 0x10300, 0x1031F, + 0x1032D, 0x10340, 0x10342, 0x10349, 0x10350, 0x10375, 0x10380, 0x1039D, + 0x103A0, 0x103C3, 0x103C8, 0x103CF, 0x10450, 0x1049D, 0x10500, 0x10527, + 0x10530, 0x10563, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10800, 0x10805, 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, + 0x1083C, 0x1083C, 0x1083F, 0x10855, 0x10860, 0x10876, 0x10880, 0x1089E, + 0x108E0, 0x108F2, 0x108F4, 0x108F5, 0x10900, 0x10915, 0x10920, 0x10939, + 0x10980, 0x109B7, 0x109BE, 0x109BF, 0x10A00, 0x10A00, 0x10A10, 0x10A13, + 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A60, 0x10A7C, 0x10A80, 0x10A9C, + 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE4, 0x10B00, 0x10B35, 0x10B40, 0x10B55, + 0x10B60, 0x10B72, 0x10B80, 0x10B91, 0x10C00, 0x10C48, 0x10D00, 0x10D23, + 0x10E80, 0x10EA9, 0x10EB0, 0x10EB1, 0x10F00, 0x10F1C, 0x10F27, 0x10F27, + 0x10F30, 0x10F45, 0x10F70, 0x10F81, 0x10FB0, 0x10FC4, 0x10FE0, 0x10FF6, + 0x11003, 0x11037, 0x11071, 0x11072, 0x11075, 0x11075, 0x11083, 0x110AF, + 0x110D0, 0x110E8, 0x11103, 0x11126, 0x11144, 0x11144, 0x11147, 0x11147, + 0x11150, 0x11172, 0x11176, 0x11176, 0x11183, 0x111B2, 0x111C1, 0x111C4, + 0x111DA, 0x111DA, 0x111DC, 0x111DC, 0x11200, 0x11211, 0x11213, 0x1122B, + 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, + 0x1129F, 0x112A8, 0x112B0, 0x112DE, 0x11305, 0x1130C, 0x1130F, 0x11310, + 0x11313, 0x11328, 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, + 0x1133D, 0x1133D, 0x11350, 0x11350, 0x1135D, 0x11361, 0x11400, 0x11434, + 0x11447, 0x1144A, 0x1145F, 0x11461, 0x11480, 0x114AF, 0x114C4, 0x114C5, + 0x114C7, 0x114C7, 0x11580, 0x115AE, 0x115D8, 0x115DB, 0x11600, 0x1162F, + 0x11644, 0x11644, 0x11680, 0x116AA, 0x116B8, 0x116B8, 0x11700, 0x1171A, + 0x11740, 0x11746, 0x11800, 0x1182B, 0x118FF, 0x11906, 0x11909, 0x11909, + 0x1190C, 0x11913, 0x11915, 0x11916, 0x11918, 0x1192F, 0x1193F, 0x1193F, + 0x11941, 0x11941, 0x119A0, 0x119A7, 0x119AA, 0x119D0, 0x119E1, 0x119E1, + 0x119E3, 0x119E3, 0x11A00, 0x11A00, 0x11A0B, 0x11A32, 0x11A3A, 0x11A3A, + 0x11A50, 0x11A50, 0x11A5C, 0x11A89, 0x11A9D, 0x11A9D, 0x11AB0, 0x11AF8, + 0x11C00, 0x11C08, 0x11C0A, 0x11C2E, 0x11C40, 0x11C40, 0x11C72, 0x11C8F, + 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D30, 0x11D46, 0x11D46, + 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D89, 0x11D98, 0x11D98, + 0x11EE0, 0x11EF2, 0x11FB0, 0x11FB0, 0x12000, 0x12399, 0x12480, 0x12543, + 0x12F90, 0x12FF0, 0x13000, 0x1342E, 0x14400, 0x14646, 0x16800, 0x16A38, + 0x16A40, 0x16A5E, 0x16A70, 0x16ABE, 0x16AD0, 0x16AED, 0x16B00, 0x16B2F, + 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, 0x16F00, 0x16F4A, 0x16F50, 0x16F50, + 0x17000, 0x187F7, 0x18800, 0x18CD5, 0x18D00, 0x18D08, 0x1B000, 0x1B122, + 0x1B150, 0x1B152, 0x1B164, 0x1B167, 0x1B170, 0x1B2FB, 0x1BC00, 0x1BC6A, + 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, 0x1DF0A, 0x1DF0A, + 0x1E100, 0x1E12C, 0x1E14E, 0x1E14E, 0x1E290, 0x1E2AD, 0x1E2C0, 0x1E2EB, + 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, + 0x1E800, 0x1E8C4, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, + 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, + 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, + 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, + 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, + 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, + 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, + 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, + 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, + 0x30000, 0x3134A, + // #14 (2608+518): gc=Mark:M:Combining_Mark + // Mc:177 + Me:5 + Mn:336 + // #15 (2608+177): gc=Spacing_Mark:Mc + 0x0903, 0x0903, 0x093B, 0x093B, 0x093E, 0x0940, 0x0949, 0x094C, + 0x094E, 0x094F, 0x0982, 0x0983, 0x09BE, 0x09C0, 0x09C7, 0x09C8, + 0x09CB, 0x09CC, 0x09D7, 0x09D7, 0x0A03, 0x0A03, 0x0A3E, 0x0A40, + 0x0A83, 0x0A83, 0x0ABE, 0x0AC0, 0x0AC9, 0x0AC9, 0x0ACB, 0x0ACC, + 0x0B02, 0x0B03, 0x0B3E, 0x0B3E, 0x0B40, 0x0B40, 0x0B47, 0x0B48, + 0x0B4B, 0x0B4C, 0x0B57, 0x0B57, 0x0BBE, 0x0BBF, 0x0BC1, 0x0BC2, + 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCC, 0x0BD7, 0x0BD7, 0x0C01, 0x0C03, + 0x0C41, 0x0C44, 0x0C82, 0x0C83, 0x0CBE, 0x0CBE, 0x0CC0, 0x0CC4, + 0x0CC7, 0x0CC8, 0x0CCA, 0x0CCB, 0x0CD5, 0x0CD6, 0x0D02, 0x0D03, + 0x0D3E, 0x0D40, 0x0D46, 0x0D48, 0x0D4A, 0x0D4C, 0x0D57, 0x0D57, + 0x0D82, 0x0D83, 0x0DCF, 0x0DD1, 0x0DD8, 0x0DDF, 0x0DF2, 0x0DF3, + 0x0F3E, 0x0F3F, 0x0F7F, 0x0F7F, 0x102B, 0x102C, 0x1031, 0x1031, + 0x1038, 0x1038, 0x103B, 0x103C, 0x1056, 0x1057, 0x1062, 0x1064, + 0x1067, 0x106D, 0x1083, 0x1084, 0x1087, 0x108C, 0x108F, 0x108F, + 0x109A, 0x109C, 0x1715, 0x1715, 0x1734, 0x1734, 0x17B6, 0x17B6, + 0x17BE, 0x17C5, 0x17C7, 0x17C8, 0x1923, 0x1926, 0x1929, 0x192B, + 0x1930, 0x1931, 0x1933, 0x1938, 0x1A19, 0x1A1A, 0x1A55, 0x1A55, + 0x1A57, 0x1A57, 0x1A61, 0x1A61, 0x1A63, 0x1A64, 0x1A6D, 0x1A72, + 0x1B04, 0x1B04, 0x1B35, 0x1B35, 0x1B3B, 0x1B3B, 0x1B3D, 0x1B41, + 0x1B43, 0x1B44, 0x1B82, 0x1B82, 0x1BA1, 0x1BA1, 0x1BA6, 0x1BA7, + 0x1BAA, 0x1BAA, 0x1BE7, 0x1BE7, 0x1BEA, 0x1BEC, 0x1BEE, 0x1BEE, + 0x1BF2, 0x1BF3, 0x1C24, 0x1C2B, 0x1C34, 0x1C35, 0x1CE1, 0x1CE1, + 0x1CF7, 0x1CF7, 0x302E, 0x302F, 0xA823, 0xA824, 0xA827, 0xA827, + 0xA880, 0xA881, 0xA8B4, 0xA8C3, 0xA952, 0xA953, 0xA983, 0xA983, + 0xA9B4, 0xA9B5, 0xA9BA, 0xA9BB, 0xA9BE, 0xA9C0, 0xAA2F, 0xAA30, + 0xAA33, 0xAA34, 0xAA4D, 0xAA4D, 0xAA7B, 0xAA7B, 0xAA7D, 0xAA7D, + 0xAAEB, 0xAAEB, 0xAAEE, 0xAAEF, 0xAAF5, 0xAAF5, 0xABE3, 0xABE4, + 0xABE6, 0xABE7, 0xABE9, 0xABEA, 0xABEC, 0xABEC, 0x11000, 0x11000, + 0x11002, 0x11002, 0x11082, 0x11082, 0x110B0, 0x110B2, 0x110B7, 0x110B8, + 0x1112C, 0x1112C, 0x11145, 0x11146, 0x11182, 0x11182, 0x111B3, 0x111B5, + 0x111BF, 0x111C0, 0x111CE, 0x111CE, 0x1122C, 0x1122E, 0x11232, 0x11233, + 0x11235, 0x11235, 0x112E0, 0x112E2, 0x11302, 0x11303, 0x1133E, 0x1133F, + 0x11341, 0x11344, 0x11347, 0x11348, 0x1134B, 0x1134D, 0x11357, 0x11357, + 0x11362, 0x11363, 0x11435, 0x11437, 0x11440, 0x11441, 0x11445, 0x11445, + 0x114B0, 0x114B2, 0x114B9, 0x114B9, 0x114BB, 0x114BE, 0x114C1, 0x114C1, + 0x115AF, 0x115B1, 0x115B8, 0x115BB, 0x115BE, 0x115BE, 0x11630, 0x11632, + 0x1163B, 0x1163C, 0x1163E, 0x1163E, 0x116AC, 0x116AC, 0x116AE, 0x116AF, + 0x116B6, 0x116B6, 0x11720, 0x11721, 0x11726, 0x11726, 0x1182C, 0x1182E, + 0x11838, 0x11838, 0x11930, 0x11935, 0x11937, 0x11938, 0x1193D, 0x1193D, + 0x11940, 0x11940, 0x11942, 0x11942, 0x119D1, 0x119D3, 0x119DC, 0x119DF, + 0x119E4, 0x119E4, 0x11A39, 0x11A39, 0x11A57, 0x11A58, 0x11A97, 0x11A97, + 0x11C2F, 0x11C2F, 0x11C3E, 0x11C3E, 0x11CA9, 0x11CA9, 0x11CB1, 0x11CB1, + 0x11CB4, 0x11CB4, 0x11D8A, 0x11D8E, 0x11D93, 0x11D94, 0x11D96, 0x11D96, + 0x11EF5, 0x11EF6, 0x16F51, 0x16F87, 0x16FF0, 0x16FF1, 0x1D165, 0x1D166, + 0x1D16D, 0x1D172, + // #16 (2785+5): gc=Enclosing_Mark:Me + 0x0488, 0x0489, 0x1ABE, 0x1ABE, 0x20DD, 0x20E0, 0x20E2, 0x20E4, + 0xA670, 0xA672, + // #17 (2790+336): gc=Nonspacing_Mark:Mn + 0x0300, 0x036F, 0x0483, 0x0487, 0x0591, 0x05BD, 0x05BF, 0x05BF, + 0x05C1, 0x05C2, 0x05C4, 0x05C5, 0x05C7, 0x05C7, 0x0610, 0x061A, + 0x064B, 0x065F, 0x0670, 0x0670, 0x06D6, 0x06DC, 0x06DF, 0x06E4, + 0x06E7, 0x06E8, 0x06EA, 0x06ED, 0x0711, 0x0711, 0x0730, 0x074A, + 0x07A6, 0x07B0, 0x07EB, 0x07F3, 0x07FD, 0x07FD, 0x0816, 0x0819, + 0x081B, 0x0823, 0x0825, 0x0827, 0x0829, 0x082D, 0x0859, 0x085B, + 0x0898, 0x089F, 0x08CA, 0x08E1, 0x08E3, 0x0902, 0x093A, 0x093A, + 0x093C, 0x093C, 0x0941, 0x0948, 0x094D, 0x094D, 0x0951, 0x0957, + 0x0962, 0x0963, 0x0981, 0x0981, 0x09BC, 0x09BC, 0x09C1, 0x09C4, + 0x09CD, 0x09CD, 0x09E2, 0x09E3, 0x09FE, 0x09FE, 0x0A01, 0x0A02, + 0x0A3C, 0x0A3C, 0x0A41, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, + 0x0A51, 0x0A51, 0x0A70, 0x0A71, 0x0A75, 0x0A75, 0x0A81, 0x0A82, + 0x0ABC, 0x0ABC, 0x0AC1, 0x0AC5, 0x0AC7, 0x0AC8, 0x0ACD, 0x0ACD, + 0x0AE2, 0x0AE3, 0x0AFA, 0x0AFF, 0x0B01, 0x0B01, 0x0B3C, 0x0B3C, + 0x0B3F, 0x0B3F, 0x0B41, 0x0B44, 0x0B4D, 0x0B4D, 0x0B55, 0x0B56, + 0x0B62, 0x0B63, 0x0B82, 0x0B82, 0x0BC0, 0x0BC0, 0x0BCD, 0x0BCD, + 0x0C00, 0x0C00, 0x0C04, 0x0C04, 0x0C3C, 0x0C3C, 0x0C3E, 0x0C40, + 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C62, 0x0C63, + 0x0C81, 0x0C81, 0x0CBC, 0x0CBC, 0x0CBF, 0x0CBF, 0x0CC6, 0x0CC6, + 0x0CCC, 0x0CCD, 0x0CE2, 0x0CE3, 0x0D00, 0x0D01, 0x0D3B, 0x0D3C, + 0x0D41, 0x0D44, 0x0D4D, 0x0D4D, 0x0D62, 0x0D63, 0x0D81, 0x0D81, + 0x0DCA, 0x0DCA, 0x0DD2, 0x0DD4, 0x0DD6, 0x0DD6, 0x0E31, 0x0E31, + 0x0E34, 0x0E3A, 0x0E47, 0x0E4E, 0x0EB1, 0x0EB1, 0x0EB4, 0x0EBC, + 0x0EC8, 0x0ECD, 0x0F18, 0x0F19, 0x0F35, 0x0F35, 0x0F37, 0x0F37, + 0x0F39, 0x0F39, 0x0F71, 0x0F7E, 0x0F80, 0x0F84, 0x0F86, 0x0F87, + 0x0F8D, 0x0F97, 0x0F99, 0x0FBC, 0x0FC6, 0x0FC6, 0x102D, 0x1030, + 0x1032, 0x1037, 0x1039, 0x103A, 0x103D, 0x103E, 0x1058, 0x1059, + 0x105E, 0x1060, 0x1071, 0x1074, 0x1082, 0x1082, 0x1085, 0x1086, + 0x108D, 0x108D, 0x109D, 0x109D, 0x135D, 0x135F, 0x1712, 0x1714, + 0x1732, 0x1733, 0x1752, 0x1753, 0x1772, 0x1773, 0x17B4, 0x17B5, + 0x17B7, 0x17BD, 0x17C6, 0x17C6, 0x17C9, 0x17D3, 0x17DD, 0x17DD, + 0x180B, 0x180D, 0x180F, 0x180F, 0x1885, 0x1886, 0x18A9, 0x18A9, + 0x1920, 0x1922, 0x1927, 0x1928, 0x1932, 0x1932, 0x1939, 0x193B, + 0x1A17, 0x1A18, 0x1A1B, 0x1A1B, 0x1A56, 0x1A56, 0x1A58, 0x1A5E, + 0x1A60, 0x1A60, 0x1A62, 0x1A62, 0x1A65, 0x1A6C, 0x1A73, 0x1A7C, + 0x1A7F, 0x1A7F, 0x1AB0, 0x1ABD, 0x1ABF, 0x1ACE, 0x1B00, 0x1B03, + 0x1B34, 0x1B34, 0x1B36, 0x1B3A, 0x1B3C, 0x1B3C, 0x1B42, 0x1B42, + 0x1B6B, 0x1B73, 0x1B80, 0x1B81, 0x1BA2, 0x1BA5, 0x1BA8, 0x1BA9, + 0x1BAB, 0x1BAD, 0x1BE6, 0x1BE6, 0x1BE8, 0x1BE9, 0x1BED, 0x1BED, + 0x1BEF, 0x1BF1, 0x1C2C, 0x1C33, 0x1C36, 0x1C37, 0x1CD0, 0x1CD2, + 0x1CD4, 0x1CE0, 0x1CE2, 0x1CE8, 0x1CED, 0x1CED, 0x1CF4, 0x1CF4, + 0x1CF8, 0x1CF9, 0x1DC0, 0x1DFF, 0x20D0, 0x20DC, 0x20E1, 0x20E1, + 0x20E5, 0x20F0, 0x2CEF, 0x2CF1, 0x2D7F, 0x2D7F, 0x2DE0, 0x2DFF, + 0x302A, 0x302D, 0x3099, 0x309A, 0xA66F, 0xA66F, 0xA674, 0xA67D, + 0xA69E, 0xA69F, 0xA6F0, 0xA6F1, 0xA802, 0xA802, 0xA806, 0xA806, + 0xA80B, 0xA80B, 0xA825, 0xA826, 0xA82C, 0xA82C, 0xA8C4, 0xA8C5, + 0xA8E0, 0xA8F1, 0xA8FF, 0xA8FF, 0xA926, 0xA92D, 0xA947, 0xA951, + 0xA980, 0xA982, 0xA9B3, 0xA9B3, 0xA9B6, 0xA9B9, 0xA9BC, 0xA9BD, + 0xA9E5, 0xA9E5, 0xAA29, 0xAA2E, 0xAA31, 0xAA32, 0xAA35, 0xAA36, + 0xAA43, 0xAA43, 0xAA4C, 0xAA4C, 0xAA7C, 0xAA7C, 0xAAB0, 0xAAB0, + 0xAAB2, 0xAAB4, 0xAAB7, 0xAAB8, 0xAABE, 0xAABF, 0xAAC1, 0xAAC1, + 0xAAEC, 0xAAED, 0xAAF6, 0xAAF6, 0xABE5, 0xABE5, 0xABE8, 0xABE8, + 0xABED, 0xABED, 0xFB1E, 0xFB1E, 0xFE00, 0xFE0F, 0xFE20, 0xFE2F, + 0x101FD, 0x101FD, 0x102E0, 0x102E0, 0x10376, 0x1037A, 0x10A01, 0x10A03, + 0x10A05, 0x10A06, 0x10A0C, 0x10A0F, 0x10A38, 0x10A3A, 0x10A3F, 0x10A3F, + 0x10AE5, 0x10AE6, 0x10D24, 0x10D27, 0x10EAB, 0x10EAC, 0x10F46, 0x10F50, + 0x10F82, 0x10F85, 0x11001, 0x11001, 0x11038, 0x11046, 0x11070, 0x11070, + 0x11073, 0x11074, 0x1107F, 0x11081, 0x110B3, 0x110B6, 0x110B9, 0x110BA, + 0x110C2, 0x110C2, 0x11100, 0x11102, 0x11127, 0x1112B, 0x1112D, 0x11134, + 0x11173, 0x11173, 0x11180, 0x11181, 0x111B6, 0x111BE, 0x111C9, 0x111CC, + 0x111CF, 0x111CF, 0x1122F, 0x11231, 0x11234, 0x11234, 0x11236, 0x11237, + 0x1123E, 0x1123E, 0x112DF, 0x112DF, 0x112E3, 0x112EA, 0x11300, 0x11301, + 0x1133B, 0x1133C, 0x11340, 0x11340, 0x11366, 0x1136C, 0x11370, 0x11374, + 0x11438, 0x1143F, 0x11442, 0x11444, 0x11446, 0x11446, 0x1145E, 0x1145E, + 0x114B3, 0x114B8, 0x114BA, 0x114BA, 0x114BF, 0x114C0, 0x114C2, 0x114C3, + 0x115B2, 0x115B5, 0x115BC, 0x115BD, 0x115BF, 0x115C0, 0x115DC, 0x115DD, + 0x11633, 0x1163A, 0x1163D, 0x1163D, 0x1163F, 0x11640, 0x116AB, 0x116AB, + 0x116AD, 0x116AD, 0x116B0, 0x116B5, 0x116B7, 0x116B7, 0x1171D, 0x1171F, + 0x11722, 0x11725, 0x11727, 0x1172B, 0x1182F, 0x11837, 0x11839, 0x1183A, + 0x1193B, 0x1193C, 0x1193E, 0x1193E, 0x11943, 0x11943, 0x119D4, 0x119D7, + 0x119DA, 0x119DB, 0x119E0, 0x119E0, 0x11A01, 0x11A0A, 0x11A33, 0x11A38, + 0x11A3B, 0x11A3E, 0x11A47, 0x11A47, 0x11A51, 0x11A56, 0x11A59, 0x11A5B, + 0x11A8A, 0x11A96, 0x11A98, 0x11A99, 0x11C30, 0x11C36, 0x11C38, 0x11C3D, + 0x11C3F, 0x11C3F, 0x11C92, 0x11CA7, 0x11CAA, 0x11CB0, 0x11CB2, 0x11CB3, + 0x11CB5, 0x11CB6, 0x11D31, 0x11D36, 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, + 0x11D3F, 0x11D45, 0x11D47, 0x11D47, 0x11D90, 0x11D91, 0x11D95, 0x11D95, + 0x11D97, 0x11D97, 0x11EF3, 0x11EF4, 0x16AF0, 0x16AF4, 0x16B30, 0x16B36, + 0x16F4F, 0x16F4F, 0x16F8F, 0x16F92, 0x16FE4, 0x16FE4, 0x1BC9D, 0x1BC9E, + 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1D167, 0x1D169, 0x1D17B, 0x1D182, + 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0x1D242, 0x1D244, 0x1DA00, 0x1DA36, + 0x1DA3B, 0x1DA6C, 0x1DA75, 0x1DA75, 0x1DA84, 0x1DA84, 0x1DA9B, 0x1DA9F, + 0x1DAA1, 0x1DAAF, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, 0x1E130, 0x1E136, 0x1E2AE, 0x1E2AE, + 0x1E2EC, 0x1E2EF, 0x1E8D0, 0x1E8D6, 0x1E944, 0x1E94A, 0xE0100, 0xE01EF, + // #18 (3126+145): gc=Number:N + // Nd:62 + Nl:12 + No:71 + // #19 (3126+62): gc=Decimal_Number:Nd:digit + 0x0030, 0x0039, 0x0660, 0x0669, 0x06F0, 0x06F9, 0x07C0, 0x07C9, + 0x0966, 0x096F, 0x09E6, 0x09EF, 0x0A66, 0x0A6F, 0x0AE6, 0x0AEF, + 0x0B66, 0x0B6F, 0x0BE6, 0x0BEF, 0x0C66, 0x0C6F, 0x0CE6, 0x0CEF, + 0x0D66, 0x0D6F, 0x0DE6, 0x0DEF, 0x0E50, 0x0E59, 0x0ED0, 0x0ED9, + 0x0F20, 0x0F29, 0x1040, 0x1049, 0x1090, 0x1099, 0x17E0, 0x17E9, + 0x1810, 0x1819, 0x1946, 0x194F, 0x19D0, 0x19D9, 0x1A80, 0x1A89, + 0x1A90, 0x1A99, 0x1B50, 0x1B59, 0x1BB0, 0x1BB9, 0x1C40, 0x1C49, + 0x1C50, 0x1C59, 0xA620, 0xA629, 0xA8D0, 0xA8D9, 0xA900, 0xA909, + 0xA9D0, 0xA9D9, 0xA9F0, 0xA9F9, 0xAA50, 0xAA59, 0xABF0, 0xABF9, + 0xFF10, 0xFF19, 0x104A0, 0x104A9, 0x10D30, 0x10D39, 0x11066, 0x1106F, + 0x110F0, 0x110F9, 0x11136, 0x1113F, 0x111D0, 0x111D9, 0x112F0, 0x112F9, + 0x11450, 0x11459, 0x114D0, 0x114D9, 0x11650, 0x11659, 0x116C0, 0x116C9, + 0x11730, 0x11739, 0x118E0, 0x118E9, 0x11950, 0x11959, 0x11C50, 0x11C59, + 0x11D50, 0x11D59, 0x11DA0, 0x11DA9, 0x16A60, 0x16A69, 0x16AC0, 0x16AC9, + 0x16B50, 0x16B59, 0x1D7CE, 0x1D7FF, 0x1E140, 0x1E149, 0x1E2F0, 0x1E2F9, + 0x1E950, 0x1E959, 0x1FBF0, 0x1FBF9, + // #20 (3188+12): gc=Letter_Number:Nl + 0x16EE, 0x16F0, 0x2160, 0x2182, 0x2185, 0x2188, 0x3007, 0x3007, + 0x3021, 0x3029, 0x3038, 0x303A, 0xA6E6, 0xA6EF, 0x10140, 0x10174, + 0x10341, 0x10341, 0x1034A, 0x1034A, 0x103D1, 0x103D5, 0x12400, 0x1246E, + // #21 (3200+71): gc=Other_Number:No + 0x00B2, 0x00B3, 0x00B9, 0x00B9, 0x00BC, 0x00BE, 0x09F4, 0x09F9, + 0x0B72, 0x0B77, 0x0BF0, 0x0BF2, 0x0C78, 0x0C7E, 0x0D58, 0x0D5E, + 0x0D70, 0x0D78, 0x0F2A, 0x0F33, 0x1369, 0x137C, 0x17F0, 0x17F9, + 0x19DA, 0x19DA, 0x2070, 0x2070, 0x2074, 0x2079, 0x2080, 0x2089, + 0x2150, 0x215F, 0x2189, 0x2189, 0x2460, 0x249B, 0x24EA, 0x24FF, + 0x2776, 0x2793, 0x2CFD, 0x2CFD, 0x3192, 0x3195, 0x3220, 0x3229, + 0x3248, 0x324F, 0x3251, 0x325F, 0x3280, 0x3289, 0x32B1, 0x32BF, + 0xA830, 0xA835, 0x10107, 0x10133, 0x10175, 0x10178, 0x1018A, 0x1018B, + 0x102E1, 0x102FB, 0x10320, 0x10323, 0x10858, 0x1085F, 0x10879, 0x1087F, + 0x108A7, 0x108AF, 0x108FB, 0x108FF, 0x10916, 0x1091B, 0x109BC, 0x109BD, + 0x109C0, 0x109CF, 0x109D2, 0x109FF, 0x10A40, 0x10A48, 0x10A7D, 0x10A7E, + 0x10A9D, 0x10A9F, 0x10AEB, 0x10AEF, 0x10B58, 0x10B5F, 0x10B78, 0x10B7F, + 0x10BA9, 0x10BAF, 0x10CFA, 0x10CFF, 0x10E60, 0x10E7E, 0x10F1D, 0x10F26, + 0x10F51, 0x10F54, 0x10FC5, 0x10FCB, 0x11052, 0x11065, 0x111E1, 0x111F4, + 0x1173A, 0x1173B, 0x118EA, 0x118F2, 0x11C5A, 0x11C6C, 0x11FC0, 0x11FD4, + 0x16B5B, 0x16B61, 0x16E80, 0x16E96, 0x1D2E0, 0x1D2F3, 0x1D360, 0x1D378, + 0x1E8C7, 0x1E8CF, 0x1EC71, 0x1ECAB, 0x1ECAD, 0x1ECAF, 0x1ECB1, 0x1ECB4, + 0x1ED01, 0x1ED2D, 0x1ED2F, 0x1ED3D, 0x1F100, 0x1F10C, + // #22 (3271+386): gc=Punctuation:P:punct + // Pc:6 + Pd:19 + Pe:76 + Pf:10 + Pi:11 + Po:185 + Ps:79 + // #23 (3271+6): gc=Connector_Punctuation:Pc + 0x005F, 0x005F, 0x203F, 0x2040, 0x2054, 0x2054, 0xFE33, 0xFE34, + 0xFE4D, 0xFE4F, 0xFF3F, 0xFF3F, + // #24 (3277+19): gc=Dash_Punctuation:Pd + 0x002D, 0x002D, 0x058A, 0x058A, 0x05BE, 0x05BE, 0x1400, 0x1400, + 0x1806, 0x1806, 0x2010, 0x2015, 0x2E17, 0x2E17, 0x2E1A, 0x2E1A, + 0x2E3A, 0x2E3B, 0x2E40, 0x2E40, 0x2E5D, 0x2E5D, 0x301C, 0x301C, + 0x3030, 0x3030, 0x30A0, 0x30A0, 0xFE31, 0xFE32, 0xFE58, 0xFE58, + 0xFE63, 0xFE63, 0xFF0D, 0xFF0D, 0x10EAD, 0x10EAD, + // #25 (3296+76): gc=Close_Punctuation:Pe + 0x0029, 0x0029, 0x005D, 0x005D, 0x007D, 0x007D, 0x0F3B, 0x0F3B, + 0x0F3D, 0x0F3D, 0x169C, 0x169C, 0x2046, 0x2046, 0x207E, 0x207E, + 0x208E, 0x208E, 0x2309, 0x2309, 0x230B, 0x230B, 0x232A, 0x232A, + 0x2769, 0x2769, 0x276B, 0x276B, 0x276D, 0x276D, 0x276F, 0x276F, + 0x2771, 0x2771, 0x2773, 0x2773, 0x2775, 0x2775, 0x27C6, 0x27C6, + 0x27E7, 0x27E7, 0x27E9, 0x27E9, 0x27EB, 0x27EB, 0x27ED, 0x27ED, + 0x27EF, 0x27EF, 0x2984, 0x2984, 0x2986, 0x2986, 0x2988, 0x2988, + 0x298A, 0x298A, 0x298C, 0x298C, 0x298E, 0x298E, 0x2990, 0x2990, + 0x2992, 0x2992, 0x2994, 0x2994, 0x2996, 0x2996, 0x2998, 0x2998, + 0x29D9, 0x29D9, 0x29DB, 0x29DB, 0x29FD, 0x29FD, 0x2E23, 0x2E23, + 0x2E25, 0x2E25, 0x2E27, 0x2E27, 0x2E29, 0x2E29, 0x2E56, 0x2E56, + 0x2E58, 0x2E58, 0x2E5A, 0x2E5A, 0x2E5C, 0x2E5C, 0x3009, 0x3009, + 0x300B, 0x300B, 0x300D, 0x300D, 0x300F, 0x300F, 0x3011, 0x3011, + 0x3015, 0x3015, 0x3017, 0x3017, 0x3019, 0x3019, 0x301B, 0x301B, + 0x301E, 0x301F, 0xFD3E, 0xFD3E, 0xFE18, 0xFE18, 0xFE36, 0xFE36, + 0xFE38, 0xFE38, 0xFE3A, 0xFE3A, 0xFE3C, 0xFE3C, 0xFE3E, 0xFE3E, + 0xFE40, 0xFE40, 0xFE42, 0xFE42, 0xFE44, 0xFE44, 0xFE48, 0xFE48, + 0xFE5A, 0xFE5A, 0xFE5C, 0xFE5C, 0xFE5E, 0xFE5E, 0xFF09, 0xFF09, + 0xFF3D, 0xFF3D, 0xFF5D, 0xFF5D, 0xFF60, 0xFF60, 0xFF63, 0xFF63, + // #26 (3372+10): gc=Final_Punctuation:Pf + 0x00BB, 0x00BB, 0x2019, 0x2019, 0x201D, 0x201D, 0x203A, 0x203A, + 0x2E03, 0x2E03, 0x2E05, 0x2E05, 0x2E0A, 0x2E0A, 0x2E0D, 0x2E0D, + 0x2E1D, 0x2E1D, 0x2E21, 0x2E21, + // #27 (3382+11): gc=Initial_Punctuation:Pi + 0x00AB, 0x00AB, 0x2018, 0x2018, 0x201B, 0x201C, 0x201F, 0x201F, + 0x2039, 0x2039, 0x2E02, 0x2E02, 0x2E04, 0x2E04, 0x2E09, 0x2E09, + 0x2E0C, 0x2E0C, 0x2E1C, 0x2E1C, 0x2E20, 0x2E20, + // #28 (3393+185): gc=Other_Punctuation:Po + 0x0021, 0x0023, 0x0025, 0x0027, 0x002A, 0x002A, 0x002C, 0x002C, + 0x002E, 0x002F, 0x003A, 0x003B, 0x003F, 0x0040, 0x005C, 0x005C, + 0x00A1, 0x00A1, 0x00A7, 0x00A7, 0x00B6, 0x00B7, 0x00BF, 0x00BF, + 0x037E, 0x037E, 0x0387, 0x0387, 0x055A, 0x055F, 0x0589, 0x0589, + 0x05C0, 0x05C0, 0x05C3, 0x05C3, 0x05C6, 0x05C6, 0x05F3, 0x05F4, + 0x0609, 0x060A, 0x060C, 0x060D, 0x061B, 0x061B, 0x061D, 0x061F, + 0x066A, 0x066D, 0x06D4, 0x06D4, 0x0700, 0x070D, 0x07F7, 0x07F9, + 0x0830, 0x083E, 0x085E, 0x085E, 0x0964, 0x0965, 0x0970, 0x0970, + 0x09FD, 0x09FD, 0x0A76, 0x0A76, 0x0AF0, 0x0AF0, 0x0C77, 0x0C77, + 0x0C84, 0x0C84, 0x0DF4, 0x0DF4, 0x0E4F, 0x0E4F, 0x0E5A, 0x0E5B, + 0x0F04, 0x0F12, 0x0F14, 0x0F14, 0x0F85, 0x0F85, 0x0FD0, 0x0FD4, + 0x0FD9, 0x0FDA, 0x104A, 0x104F, 0x10FB, 0x10FB, 0x1360, 0x1368, + 0x166E, 0x166E, 0x16EB, 0x16ED, 0x1735, 0x1736, 0x17D4, 0x17D6, + 0x17D8, 0x17DA, 0x1800, 0x1805, 0x1807, 0x180A, 0x1944, 0x1945, + 0x1A1E, 0x1A1F, 0x1AA0, 0x1AA6, 0x1AA8, 0x1AAD, 0x1B5A, 0x1B60, + 0x1B7D, 0x1B7E, 0x1BFC, 0x1BFF, 0x1C3B, 0x1C3F, 0x1C7E, 0x1C7F, + 0x1CC0, 0x1CC7, 0x1CD3, 0x1CD3, 0x2016, 0x2017, 0x2020, 0x2027, + 0x2030, 0x2038, 0x203B, 0x203E, 0x2041, 0x2043, 0x2047, 0x2051, + 0x2053, 0x2053, 0x2055, 0x205E, 0x2CF9, 0x2CFC, 0x2CFE, 0x2CFF, + 0x2D70, 0x2D70, 0x2E00, 0x2E01, 0x2E06, 0x2E08, 0x2E0B, 0x2E0B, + 0x2E0E, 0x2E16, 0x2E18, 0x2E19, 0x2E1B, 0x2E1B, 0x2E1E, 0x2E1F, + 0x2E2A, 0x2E2E, 0x2E30, 0x2E39, 0x2E3C, 0x2E3F, 0x2E41, 0x2E41, + 0x2E43, 0x2E4F, 0x2E52, 0x2E54, 0x3001, 0x3003, 0x303D, 0x303D, + 0x30FB, 0x30FB, 0xA4FE, 0xA4FF, 0xA60D, 0xA60F, 0xA673, 0xA673, + 0xA67E, 0xA67E, 0xA6F2, 0xA6F7, 0xA874, 0xA877, 0xA8CE, 0xA8CF, + 0xA8F8, 0xA8FA, 0xA8FC, 0xA8FC, 0xA92E, 0xA92F, 0xA95F, 0xA95F, + 0xA9C1, 0xA9CD, 0xA9DE, 0xA9DF, 0xAA5C, 0xAA5F, 0xAADE, 0xAADF, + 0xAAF0, 0xAAF1, 0xABEB, 0xABEB, 0xFE10, 0xFE16, 0xFE19, 0xFE19, + 0xFE30, 0xFE30, 0xFE45, 0xFE46, 0xFE49, 0xFE4C, 0xFE50, 0xFE52, + 0xFE54, 0xFE57, 0xFE5F, 0xFE61, 0xFE68, 0xFE68, 0xFE6A, 0xFE6B, + 0xFF01, 0xFF03, 0xFF05, 0xFF07, 0xFF0A, 0xFF0A, 0xFF0C, 0xFF0C, + 0xFF0E, 0xFF0F, 0xFF1A, 0xFF1B, 0xFF1F, 0xFF20, 0xFF3C, 0xFF3C, + 0xFF61, 0xFF61, 0xFF64, 0xFF65, 0x10100, 0x10102, 0x1039F, 0x1039F, + 0x103D0, 0x103D0, 0x1056F, 0x1056F, 0x10857, 0x10857, 0x1091F, 0x1091F, + 0x1093F, 0x1093F, 0x10A50, 0x10A58, 0x10A7F, 0x10A7F, 0x10AF0, 0x10AF6, + 0x10B39, 0x10B3F, 0x10B99, 0x10B9C, 0x10F55, 0x10F59, 0x10F86, 0x10F89, + 0x11047, 0x1104D, 0x110BB, 0x110BC, 0x110BE, 0x110C1, 0x11140, 0x11143, + 0x11174, 0x11175, 0x111C5, 0x111C8, 0x111CD, 0x111CD, 0x111DB, 0x111DB, + 0x111DD, 0x111DF, 0x11238, 0x1123D, 0x112A9, 0x112A9, 0x1144B, 0x1144F, + 0x1145A, 0x1145B, 0x1145D, 0x1145D, 0x114C6, 0x114C6, 0x115C1, 0x115D7, + 0x11641, 0x11643, 0x11660, 0x1166C, 0x116B9, 0x116B9, 0x1173C, 0x1173E, + 0x1183B, 0x1183B, 0x11944, 0x11946, 0x119E2, 0x119E2, 0x11A3F, 0x11A46, + 0x11A9A, 0x11A9C, 0x11A9E, 0x11AA2, 0x11C41, 0x11C45, 0x11C70, 0x11C71, + 0x11EF7, 0x11EF8, 0x11FFF, 0x11FFF, 0x12470, 0x12474, 0x12FF1, 0x12FF2, + 0x16A6E, 0x16A6F, 0x16AF5, 0x16AF5, 0x16B37, 0x16B3B, 0x16B44, 0x16B44, + 0x16E97, 0x16E9A, 0x16FE2, 0x16FE2, 0x1BC9F, 0x1BC9F, 0x1DA87, 0x1DA8B, + 0x1E95E, 0x1E95F, + // #29 (3578+79): gc=Open_Punctuation:Ps + 0x0028, 0x0028, 0x005B, 0x005B, 0x007B, 0x007B, 0x0F3A, 0x0F3A, + 0x0F3C, 0x0F3C, 0x169B, 0x169B, 0x201A, 0x201A, 0x201E, 0x201E, + 0x2045, 0x2045, 0x207D, 0x207D, 0x208D, 0x208D, 0x2308, 0x2308, + 0x230A, 0x230A, 0x2329, 0x2329, 0x2768, 0x2768, 0x276A, 0x276A, + 0x276C, 0x276C, 0x276E, 0x276E, 0x2770, 0x2770, 0x2772, 0x2772, + 0x2774, 0x2774, 0x27C5, 0x27C5, 0x27E6, 0x27E6, 0x27E8, 0x27E8, + 0x27EA, 0x27EA, 0x27EC, 0x27EC, 0x27EE, 0x27EE, 0x2983, 0x2983, + 0x2985, 0x2985, 0x2987, 0x2987, 0x2989, 0x2989, 0x298B, 0x298B, + 0x298D, 0x298D, 0x298F, 0x298F, 0x2991, 0x2991, 0x2993, 0x2993, + 0x2995, 0x2995, 0x2997, 0x2997, 0x29D8, 0x29D8, 0x29DA, 0x29DA, + 0x29FC, 0x29FC, 0x2E22, 0x2E22, 0x2E24, 0x2E24, 0x2E26, 0x2E26, + 0x2E28, 0x2E28, 0x2E42, 0x2E42, 0x2E55, 0x2E55, 0x2E57, 0x2E57, + 0x2E59, 0x2E59, 0x2E5B, 0x2E5B, 0x3008, 0x3008, 0x300A, 0x300A, + 0x300C, 0x300C, 0x300E, 0x300E, 0x3010, 0x3010, 0x3014, 0x3014, + 0x3016, 0x3016, 0x3018, 0x3018, 0x301A, 0x301A, 0x301D, 0x301D, + 0xFD3F, 0xFD3F, 0xFE17, 0xFE17, 0xFE35, 0xFE35, 0xFE37, 0xFE37, + 0xFE39, 0xFE39, 0xFE3B, 0xFE3B, 0xFE3D, 0xFE3D, 0xFE3F, 0xFE3F, + 0xFE41, 0xFE41, 0xFE43, 0xFE43, 0xFE47, 0xFE47, 0xFE59, 0xFE59, + 0xFE5B, 0xFE5B, 0xFE5D, 0xFE5D, 0xFF08, 0xFF08, 0xFF3B, 0xFF3B, + 0xFF5B, 0xFF5B, 0xFF5F, 0xFF5F, 0xFF62, 0xFF62, + // #30 (3657+302): gc=Symbol:S + // Sc:21 + Sk:31 + Sm:64 + So:186 + // #31 (3657+21): gc=Currency_Symbol:Sc + 0x0024, 0x0024, 0x00A2, 0x00A5, 0x058F, 0x058F, 0x060B, 0x060B, + 0x07FE, 0x07FF, 0x09F2, 0x09F3, 0x09FB, 0x09FB, 0x0AF1, 0x0AF1, + 0x0BF9, 0x0BF9, 0x0E3F, 0x0E3F, 0x17DB, 0x17DB, 0x20A0, 0x20C0, + 0xA838, 0xA838, 0xFDFC, 0xFDFC, 0xFE69, 0xFE69, 0xFF04, 0xFF04, + 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE6, 0x11FDD, 0x11FE0, 0x1E2FF, 0x1E2FF, + 0x1ECB0, 0x1ECB0, + // #32 (3678+31): gc=Modifier_Symbol:Sk + 0x005E, 0x005E, 0x0060, 0x0060, 0x00A8, 0x00A8, 0x00AF, 0x00AF, + 0x00B4, 0x00B4, 0x00B8, 0x00B8, 0x02C2, 0x02C5, 0x02D2, 0x02DF, + 0x02E5, 0x02EB, 0x02ED, 0x02ED, 0x02EF, 0x02FF, 0x0375, 0x0375, + 0x0384, 0x0385, 0x0888, 0x0888, 0x1FBD, 0x1FBD, 0x1FBF, 0x1FC1, + 0x1FCD, 0x1FCF, 0x1FDD, 0x1FDF, 0x1FED, 0x1FEF, 0x1FFD, 0x1FFE, + 0x309B, 0x309C, 0xA700, 0xA716, 0xA720, 0xA721, 0xA789, 0xA78A, + 0xAB5B, 0xAB5B, 0xAB6A, 0xAB6B, 0xFBB2, 0xFBC2, 0xFF3E, 0xFF3E, + 0xFF40, 0xFF40, 0xFFE3, 0xFFE3, 0x1F3FB, 0x1F3FF, + // #33 (3709+64): gc=Math_Symbol:Sm + 0x002B, 0x002B, 0x003C, 0x003E, 0x007C, 0x007C, 0x007E, 0x007E, + 0x00AC, 0x00AC, 0x00B1, 0x00B1, 0x00D7, 0x00D7, 0x00F7, 0x00F7, + 0x03F6, 0x03F6, 0x0606, 0x0608, 0x2044, 0x2044, 0x2052, 0x2052, + 0x207A, 0x207C, 0x208A, 0x208C, 0x2118, 0x2118, 0x2140, 0x2144, + 0x214B, 0x214B, 0x2190, 0x2194, 0x219A, 0x219B, 0x21A0, 0x21A0, + 0x21A3, 0x21A3, 0x21A6, 0x21A6, 0x21AE, 0x21AE, 0x21CE, 0x21CF, + 0x21D2, 0x21D2, 0x21D4, 0x21D4, 0x21F4, 0x22FF, 0x2320, 0x2321, + 0x237C, 0x237C, 0x239B, 0x23B3, 0x23DC, 0x23E1, 0x25B7, 0x25B7, + 0x25C1, 0x25C1, 0x25F8, 0x25FF, 0x266F, 0x266F, 0x27C0, 0x27C4, + 0x27C7, 0x27E5, 0x27F0, 0x27FF, 0x2900, 0x2982, 0x2999, 0x29D7, + 0x29DC, 0x29FB, 0x29FE, 0x2AFF, 0x2B30, 0x2B44, 0x2B47, 0x2B4C, + 0xFB29, 0xFB29, 0xFE62, 0xFE62, 0xFE64, 0xFE66, 0xFF0B, 0xFF0B, + 0xFF1C, 0xFF1E, 0xFF5C, 0xFF5C, 0xFF5E, 0xFF5E, 0xFFE2, 0xFFE2, + 0xFFE9, 0xFFEC, 0x1D6C1, 0x1D6C1, 0x1D6DB, 0x1D6DB, 0x1D6FB, 0x1D6FB, + 0x1D715, 0x1D715, 0x1D735, 0x1D735, 0x1D74F, 0x1D74F, 0x1D76F, 0x1D76F, + 0x1D789, 0x1D789, 0x1D7A9, 0x1D7A9, 0x1D7C3, 0x1D7C3, 0x1EEF0, 0x1EEF1, + // #34 (3773+186): gc=Other_Symbol:So + 0x00A6, 0x00A6, 0x00A9, 0x00A9, 0x00AE, 0x00AE, 0x00B0, 0x00B0, + 0x0482, 0x0482, 0x058D, 0x058E, 0x060E, 0x060F, 0x06DE, 0x06DE, + 0x06E9, 0x06E9, 0x06FD, 0x06FE, 0x07F6, 0x07F6, 0x09FA, 0x09FA, + 0x0B70, 0x0B70, 0x0BF3, 0x0BF8, 0x0BFA, 0x0BFA, 0x0C7F, 0x0C7F, + 0x0D4F, 0x0D4F, 0x0D79, 0x0D79, 0x0F01, 0x0F03, 0x0F13, 0x0F13, + 0x0F15, 0x0F17, 0x0F1A, 0x0F1F, 0x0F34, 0x0F34, 0x0F36, 0x0F36, + 0x0F38, 0x0F38, 0x0FBE, 0x0FC5, 0x0FC7, 0x0FCC, 0x0FCE, 0x0FCF, + 0x0FD5, 0x0FD8, 0x109E, 0x109F, 0x1390, 0x1399, 0x166D, 0x166D, + 0x1940, 0x1940, 0x19DE, 0x19FF, 0x1B61, 0x1B6A, 0x1B74, 0x1B7C, + 0x2100, 0x2101, 0x2103, 0x2106, 0x2108, 0x2109, 0x2114, 0x2114, + 0x2116, 0x2117, 0x211E, 0x2123, 0x2125, 0x2125, 0x2127, 0x2127, + 0x2129, 0x2129, 0x212E, 0x212E, 0x213A, 0x213B, 0x214A, 0x214A, + 0x214C, 0x214D, 0x214F, 0x214F, 0x218A, 0x218B, 0x2195, 0x2199, + 0x219C, 0x219F, 0x21A1, 0x21A2, 0x21A4, 0x21A5, 0x21A7, 0x21AD, + 0x21AF, 0x21CD, 0x21D0, 0x21D1, 0x21D3, 0x21D3, 0x21D5, 0x21F3, + 0x2300, 0x2307, 0x230C, 0x231F, 0x2322, 0x2328, 0x232B, 0x237B, + 0x237D, 0x239A, 0x23B4, 0x23DB, 0x23E2, 0x2426, 0x2440, 0x244A, + 0x249C, 0x24E9, 0x2500, 0x25B6, 0x25B8, 0x25C0, 0x25C2, 0x25F7, + 0x2600, 0x266E, 0x2670, 0x2767, 0x2794, 0x27BF, 0x2800, 0x28FF, + 0x2B00, 0x2B2F, 0x2B45, 0x2B46, 0x2B4D, 0x2B73, 0x2B76, 0x2B95, + 0x2B97, 0x2BFF, 0x2CE5, 0x2CEA, 0x2E50, 0x2E51, 0x2E80, 0x2E99, + 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, 0x2FF0, 0x2FFB, 0x3004, 0x3004, + 0x3012, 0x3013, 0x3020, 0x3020, 0x3036, 0x3037, 0x303E, 0x303F, + 0x3190, 0x3191, 0x3196, 0x319F, 0x31C0, 0x31E3, 0x3200, 0x321E, + 0x322A, 0x3247, 0x3250, 0x3250, 0x3260, 0x327F, 0x328A, 0x32B0, + 0x32C0, 0x33FF, 0x4DC0, 0x4DFF, 0xA490, 0xA4C6, 0xA828, 0xA82B, + 0xA836, 0xA837, 0xA839, 0xA839, 0xAA77, 0xAA79, 0xFD40, 0xFD4F, + 0xFDCF, 0xFDCF, 0xFDFD, 0xFDFF, 0xFFE4, 0xFFE4, 0xFFE8, 0xFFE8, + 0xFFED, 0xFFEE, 0xFFFC, 0xFFFD, 0x10137, 0x1013F, 0x10179, 0x10189, + 0x1018C, 0x1018E, 0x10190, 0x1019C, 0x101A0, 0x101A0, 0x101D0, 0x101FC, + 0x10877, 0x10878, 0x10AC8, 0x10AC8, 0x1173F, 0x1173F, 0x11FD5, 0x11FDC, + 0x11FE1, 0x11FF1, 0x16B3C, 0x16B3F, 0x16B45, 0x16B45, 0x1BC9C, 0x1BC9C, + 0x1CF50, 0x1CFC3, 0x1D000, 0x1D0F5, 0x1D100, 0x1D126, 0x1D129, 0x1D164, + 0x1D16A, 0x1D16C, 0x1D183, 0x1D184, 0x1D18C, 0x1D1A9, 0x1D1AE, 0x1D1EA, + 0x1D200, 0x1D241, 0x1D245, 0x1D245, 0x1D300, 0x1D356, 0x1D800, 0x1D9FF, + 0x1DA37, 0x1DA3A, 0x1DA6D, 0x1DA74, 0x1DA76, 0x1DA83, 0x1DA85, 0x1DA86, + 0x1E14F, 0x1E14F, 0x1ECAC, 0x1ECAC, 0x1ED2E, 0x1ED2E, 0x1F000, 0x1F02B, + 0x1F030, 0x1F093, 0x1F0A0, 0x1F0AE, 0x1F0B1, 0x1F0BF, 0x1F0C1, 0x1F0CF, + 0x1F0D1, 0x1F0F5, 0x1F10D, 0x1F1AD, 0x1F1E6, 0x1F202, 0x1F210, 0x1F23B, + 0x1F240, 0x1F248, 0x1F250, 0x1F251, 0x1F260, 0x1F265, 0x1F300, 0x1F3FA, + 0x1F400, 0x1F6D7, 0x1F6DD, 0x1F6EC, 0x1F6F0, 0x1F6FC, 0x1F700, 0x1F773, + 0x1F780, 0x1F7D8, 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, 0x1F800, 0x1F80B, + 0x1F810, 0x1F847, 0x1F850, 0x1F859, 0x1F860, 0x1F887, 0x1F890, 0x1F8AD, + 0x1F8B0, 0x1F8B1, 0x1F900, 0x1FA53, 0x1FA60, 0x1FA6D, 0x1FA70, 0x1FA74, + 0x1FA78, 0x1FA7C, 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, 0x1FAB0, 0x1FABA, + 0x1FAC0, 0x1FAC5, 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, 0x1FAF0, 0x1FAF6, + 0x1FB00, 0x1FB92, 0x1FB94, 0x1FBCA, + // #35 (3959+9): gc=Separator:Z + // Zl:1 + Zp:1 + Zs:7 + // #36 (3959+1): gc=Line_Separator:Zl + 0x2028, 0x2028, + // #37 (3960+1): gc=Paragraph_Separator:Zp + 0x2029, 0x2029, + // #38 (3961+7): gc=Space_Separator:Zs + 0x0020, 0x0020, 0x00A0, 0x00A0, 0x1680, 0x1680, 0x2000, 0x200A, + 0x202F, 0x202F, 0x205F, 0x205F, 0x3000, 0x3000, + // #39 (3968+1): bp=ASCII + 0x0000, 0x007F, + // #40 (3969+3): bp=ASCII_Hex_Digit:AHex + 0x0030, 0x0039, 0x0041, 0x0046, 0x0061, 0x0066, + // #41 (3972+722): bp=Alphabetic:Alpha + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00B5, 0x00B5, + 0x00BA, 0x00BA, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02C1, + 0x02C6, 0x02D1, 0x02E0, 0x02E4, 0x02EC, 0x02EC, 0x02EE, 0x02EE, + 0x0345, 0x0345, 0x0370, 0x0374, 0x0376, 0x0377, 0x037A, 0x037D, + 0x037F, 0x037F, 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, + 0x038E, 0x03A1, 0x03A3, 0x03F5, 0x03F7, 0x0481, 0x048A, 0x052F, + 0x0531, 0x0556, 0x0559, 0x0559, 0x0560, 0x0588, 0x05B0, 0x05BD, + 0x05BF, 0x05BF, 0x05C1, 0x05C2, 0x05C4, 0x05C5, 0x05C7, 0x05C7, + 0x05D0, 0x05EA, 0x05EF, 0x05F2, 0x0610, 0x061A, 0x0620, 0x0657, + 0x0659, 0x065F, 0x066E, 0x06D3, 0x06D5, 0x06DC, 0x06E1, 0x06E8, + 0x06ED, 0x06EF, 0x06FA, 0x06FC, 0x06FF, 0x06FF, 0x0710, 0x073F, + 0x074D, 0x07B1, 0x07CA, 0x07EA, 0x07F4, 0x07F5, 0x07FA, 0x07FA, + 0x0800, 0x0817, 0x081A, 0x082C, 0x0840, 0x0858, 0x0860, 0x086A, + 0x0870, 0x0887, 0x0889, 0x088E, 0x08A0, 0x08C9, 0x08D4, 0x08DF, + 0x08E3, 0x08E9, 0x08F0, 0x093B, 0x093D, 0x094C, 0x094E, 0x0950, + 0x0955, 0x0963, 0x0971, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, + 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, + 0x09BD, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CC, 0x09CE, 0x09CE, + 0x09D7, 0x09D7, 0x09DC, 0x09DD, 0x09DF, 0x09E3, 0x09F0, 0x09F1, + 0x09FC, 0x09FC, 0x0A01, 0x0A03, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, + 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, + 0x0A38, 0x0A39, 0x0A3E, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4C, + 0x0A51, 0x0A51, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A70, 0x0A75, + 0x0A81, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABD, 0x0AC5, + 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACC, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, + 0x0AF9, 0x0AFC, 0x0B01, 0x0B03, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, + 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B35, 0x0B39, + 0x0B3D, 0x0B44, 0x0B47, 0x0B48, 0x0B4B, 0x0B4C, 0x0B56, 0x0B57, + 0x0B5C, 0x0B5D, 0x0B5F, 0x0B63, 0x0B71, 0x0B71, 0x0B82, 0x0B83, + 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, + 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, + 0x0BAE, 0x0BB9, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCC, + 0x0BD0, 0x0BD0, 0x0BD7, 0x0BD7, 0x0C00, 0x0C03, 0x0C05, 0x0C0C, + 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C39, 0x0C3D, 0x0C44, + 0x0C46, 0x0C48, 0x0C4A, 0x0C4C, 0x0C55, 0x0C56, 0x0C58, 0x0C5A, + 0x0C5D, 0x0C5D, 0x0C60, 0x0C63, 0x0C80, 0x0C83, 0x0C85, 0x0C8C, + 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, + 0x0CBD, 0x0CC4, 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCC, 0x0CD5, 0x0CD6, + 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE3, 0x0CF1, 0x0CF2, 0x0D00, 0x0D0C, + 0x0D0E, 0x0D10, 0x0D12, 0x0D3A, 0x0D3D, 0x0D44, 0x0D46, 0x0D48, + 0x0D4A, 0x0D4C, 0x0D4E, 0x0D4E, 0x0D54, 0x0D57, 0x0D5F, 0x0D63, + 0x0D7A, 0x0D7F, 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, + 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCF, 0x0DD4, + 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DF2, 0x0DF3, 0x0E01, 0x0E3A, + 0x0E40, 0x0E46, 0x0E4D, 0x0E4D, 0x0E81, 0x0E82, 0x0E84, 0x0E84, + 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, 0x0EA7, 0x0EB9, + 0x0EBB, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0ECD, 0x0ECD, + 0x0EDC, 0x0EDF, 0x0F00, 0x0F00, 0x0F40, 0x0F47, 0x0F49, 0x0F6C, + 0x0F71, 0x0F81, 0x0F88, 0x0F97, 0x0F99, 0x0FBC, 0x1000, 0x1036, + 0x1038, 0x1038, 0x103B, 0x103F, 0x1050, 0x108F, 0x109A, 0x109D, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x1380, 0x138F, 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0x1401, 0x166C, + 0x166F, 0x167F, 0x1681, 0x169A, 0x16A0, 0x16EA, 0x16EE, 0x16F8, + 0x1700, 0x1713, 0x171F, 0x1733, 0x1740, 0x1753, 0x1760, 0x176C, + 0x176E, 0x1770, 0x1772, 0x1773, 0x1780, 0x17B3, 0x17B6, 0x17C8, + 0x17D7, 0x17D7, 0x17DC, 0x17DC, 0x1820, 0x1878, 0x1880, 0x18AA, + 0x18B0, 0x18F5, 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x1938, + 0x1950, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, 0x19B0, 0x19C9, + 0x1A00, 0x1A1B, 0x1A20, 0x1A5E, 0x1A61, 0x1A74, 0x1AA7, 0x1AA7, + 0x1ABF, 0x1AC0, 0x1ACC, 0x1ACE, 0x1B00, 0x1B33, 0x1B35, 0x1B43, + 0x1B45, 0x1B4C, 0x1B80, 0x1BA9, 0x1BAC, 0x1BAF, 0x1BBA, 0x1BE5, + 0x1BE7, 0x1BF1, 0x1C00, 0x1C36, 0x1C4D, 0x1C4F, 0x1C5A, 0x1C7D, + 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF6, 0x1CFA, 0x1CFA, 0x1D00, 0x1DBF, + 0x1DE7, 0x1DF4, 0x1E00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, + 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, + 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, + 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, + 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, + 0x2071, 0x2071, 0x207F, 0x207F, 0x2090, 0x209C, 0x2102, 0x2102, + 0x2107, 0x2107, 0x210A, 0x2113, 0x2115, 0x2115, 0x2119, 0x211D, + 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x212D, + 0x212F, 0x2139, 0x213C, 0x213F, 0x2145, 0x2149, 0x214E, 0x214E, + 0x2160, 0x2188, 0x24B6, 0x24E9, 0x2C00, 0x2CE4, 0x2CEB, 0x2CEE, + 0x2CF2, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, + 0x2D30, 0x2D67, 0x2D6F, 0x2D6F, 0x2D80, 0x2D96, 0x2DA0, 0x2DA6, + 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, + 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, 0x2DE0, 0x2DFF, + 0x2E2F, 0x2E2F, 0x3005, 0x3007, 0x3021, 0x3029, 0x3031, 0x3035, + 0x3038, 0x303C, 0x3041, 0x3096, 0x309D, 0x309F, 0x30A1, 0x30FA, + 0x30FC, 0x30FF, 0x3105, 0x312F, 0x3131, 0x318E, 0x31A0, 0x31BF, + 0x31F0, 0x31FF, 0x3400, 0x4DBF, 0x4E00, 0xA48C, 0xA4D0, 0xA4FD, + 0xA500, 0xA60C, 0xA610, 0xA61F, 0xA62A, 0xA62B, 0xA640, 0xA66E, + 0xA674, 0xA67B, 0xA67F, 0xA6EF, 0xA717, 0xA71F, 0xA722, 0xA788, + 0xA78B, 0xA7CA, 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, + 0xA7F2, 0xA805, 0xA807, 0xA827, 0xA840, 0xA873, 0xA880, 0xA8C3, + 0xA8C5, 0xA8C5, 0xA8F2, 0xA8F7, 0xA8FB, 0xA8FB, 0xA8FD, 0xA8FF, + 0xA90A, 0xA92A, 0xA930, 0xA952, 0xA960, 0xA97C, 0xA980, 0xA9B2, + 0xA9B4, 0xA9BF, 0xA9CF, 0xA9CF, 0xA9E0, 0xA9EF, 0xA9FA, 0xA9FE, + 0xAA00, 0xAA36, 0xAA40, 0xAA4D, 0xAA60, 0xAA76, 0xAA7A, 0xAABE, + 0xAAC0, 0xAAC0, 0xAAC2, 0xAAC2, 0xAADB, 0xAADD, 0xAAE0, 0xAAEF, + 0xAAF2, 0xAAF5, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, 0xAB11, 0xAB16, + 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB5A, 0xAB5C, 0xAB69, + 0xAB70, 0xABEA, 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, + 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0xFB00, 0xFB06, 0xFB13, 0xFB17, + 0xFB1D, 0xFB28, 0xFB2A, 0xFB36, 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, + 0xFB40, 0xFB41, 0xFB43, 0xFB44, 0xFB46, 0xFBB1, 0xFBD3, 0xFD3D, + 0xFD50, 0xFD8F, 0xFD92, 0xFDC7, 0xFDF0, 0xFDFB, 0xFE70, 0xFE74, + 0xFE76, 0xFEFC, 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0xFF66, 0xFFBE, + 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, + 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, + 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, 0x10140, 0x10174, + 0x10280, 0x1029C, 0x102A0, 0x102D0, 0x10300, 0x1031F, 0x1032D, 0x1034A, + 0x10350, 0x1037A, 0x10380, 0x1039D, 0x103A0, 0x103C3, 0x103C8, 0x103CF, + 0x103D1, 0x103D5, 0x10400, 0x1049D, 0x104B0, 0x104D3, 0x104D8, 0x104FB, + 0x10500, 0x10527, 0x10530, 0x10563, 0x10570, 0x1057A, 0x1057C, 0x1058A, + 0x1058C, 0x10592, 0x10594, 0x10595, 0x10597, 0x105A1, 0x105A3, 0x105B1, + 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10600, 0x10736, 0x10740, 0x10755, + 0x10760, 0x10767, 0x10780, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, + 0x10800, 0x10805, 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, + 0x1083C, 0x1083C, 0x1083F, 0x10855, 0x10860, 0x10876, 0x10880, 0x1089E, + 0x108E0, 0x108F2, 0x108F4, 0x108F5, 0x10900, 0x10915, 0x10920, 0x10939, + 0x10980, 0x109B7, 0x109BE, 0x109BF, 0x10A00, 0x10A03, 0x10A05, 0x10A06, + 0x10A0C, 0x10A13, 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A60, 0x10A7C, + 0x10A80, 0x10A9C, 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE4, 0x10B00, 0x10B35, + 0x10B40, 0x10B55, 0x10B60, 0x10B72, 0x10B80, 0x10B91, 0x10C00, 0x10C48, + 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10D00, 0x10D27, 0x10E80, 0x10EA9, + 0x10EAB, 0x10EAC, 0x10EB0, 0x10EB1, 0x10F00, 0x10F1C, 0x10F27, 0x10F27, + 0x10F30, 0x10F45, 0x10F70, 0x10F81, 0x10FB0, 0x10FC4, 0x10FE0, 0x10FF6, + 0x11000, 0x11045, 0x11071, 0x11075, 0x11082, 0x110B8, 0x110C2, 0x110C2, + 0x110D0, 0x110E8, 0x11100, 0x11132, 0x11144, 0x11147, 0x11150, 0x11172, + 0x11176, 0x11176, 0x11180, 0x111BF, 0x111C1, 0x111C4, 0x111CE, 0x111CF, + 0x111DA, 0x111DA, 0x111DC, 0x111DC, 0x11200, 0x11211, 0x11213, 0x11234, + 0x11237, 0x11237, 0x1123E, 0x1123E, 0x11280, 0x11286, 0x11288, 0x11288, + 0x1128A, 0x1128D, 0x1128F, 0x1129D, 0x1129F, 0x112A8, 0x112B0, 0x112E8, + 0x11300, 0x11303, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, + 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133D, 0x11344, + 0x11347, 0x11348, 0x1134B, 0x1134C, 0x11350, 0x11350, 0x11357, 0x11357, + 0x1135D, 0x11363, 0x11400, 0x11441, 0x11443, 0x11445, 0x11447, 0x1144A, + 0x1145F, 0x11461, 0x11480, 0x114C1, 0x114C4, 0x114C5, 0x114C7, 0x114C7, + 0x11580, 0x115B5, 0x115B8, 0x115BE, 0x115D8, 0x115DD, 0x11600, 0x1163E, + 0x11640, 0x11640, 0x11644, 0x11644, 0x11680, 0x116B5, 0x116B8, 0x116B8, + 0x11700, 0x1171A, 0x1171D, 0x1172A, 0x11740, 0x11746, 0x11800, 0x11838, + 0x118A0, 0x118DF, 0x118FF, 0x11906, 0x11909, 0x11909, 0x1190C, 0x11913, + 0x11915, 0x11916, 0x11918, 0x11935, 0x11937, 0x11938, 0x1193B, 0x1193C, + 0x1193F, 0x11942, 0x119A0, 0x119A7, 0x119AA, 0x119D7, 0x119DA, 0x119DF, + 0x119E1, 0x119E1, 0x119E3, 0x119E4, 0x11A00, 0x11A32, 0x11A35, 0x11A3E, + 0x11A50, 0x11A97, 0x11A9D, 0x11A9D, 0x11AB0, 0x11AF8, 0x11C00, 0x11C08, + 0x11C0A, 0x11C36, 0x11C38, 0x11C3E, 0x11C40, 0x11C40, 0x11C72, 0x11C8F, + 0x11C92, 0x11CA7, 0x11CA9, 0x11CB6, 0x11D00, 0x11D06, 0x11D08, 0x11D09, + 0x11D0B, 0x11D36, 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D41, + 0x11D43, 0x11D43, 0x11D46, 0x11D47, 0x11D60, 0x11D65, 0x11D67, 0x11D68, + 0x11D6A, 0x11D8E, 0x11D90, 0x11D91, 0x11D93, 0x11D96, 0x11D98, 0x11D98, + 0x11EE0, 0x11EF6, 0x11FB0, 0x11FB0, 0x12000, 0x12399, 0x12400, 0x1246E, + 0x12480, 0x12543, 0x12F90, 0x12FF0, 0x13000, 0x1342E, 0x14400, 0x14646, + 0x16800, 0x16A38, 0x16A40, 0x16A5E, 0x16A70, 0x16ABE, 0x16AD0, 0x16AED, + 0x16B00, 0x16B2F, 0x16B40, 0x16B43, 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, + 0x16E40, 0x16E7F, 0x16F00, 0x16F4A, 0x16F4F, 0x16F87, 0x16F8F, 0x16F9F, + 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE3, 0x16FF0, 0x16FF1, 0x17000, 0x187F7, + 0x18800, 0x18CD5, 0x18D00, 0x18D08, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, + 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B122, 0x1B150, 0x1B152, 0x1B164, 0x1B167, + 0x1B170, 0x1B2FB, 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, + 0x1BC90, 0x1BC99, 0x1BC9E, 0x1BC9E, 0x1D400, 0x1D454, 0x1D456, 0x1D49C, + 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, + 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, + 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, + 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, + 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D6C0, 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6FA, + 0x1D6FC, 0x1D714, 0x1D716, 0x1D734, 0x1D736, 0x1D74E, 0x1D750, 0x1D76E, + 0x1D770, 0x1D788, 0x1D78A, 0x1D7A8, 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7CB, + 0x1DF00, 0x1DF1E, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, 0x1E100, 0x1E12C, 0x1E137, 0x1E13D, + 0x1E14E, 0x1E14E, 0x1E290, 0x1E2AD, 0x1E2C0, 0x1E2EB, 0x1E7E0, 0x1E7E6, + 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, 0x1E800, 0x1E8C4, + 0x1E900, 0x1E943, 0x1E947, 0x1E947, 0x1E94B, 0x1E94B, 0x1EE00, 0x1EE03, + 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, + 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, + 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, + 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, + 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, + 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, + 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, + 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, + 0x1F130, 0x1F149, 0x1F150, 0x1F169, 0x1F170, 0x1F189, 0x20000, 0x2A6DF, + 0x2A700, 0x2B738, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, + 0x2F800, 0x2FA1D, 0x30000, 0x3134A, + // #42 (4694+1): bp=Any + 0x0000, 0x10FFFF, + // #43 (4695+0): bp=Assigned + + // #44 (4695+4): bp=Bidi_Control:Bidi_C + 0x061C, 0x061C, 0x200E, 0x200F, 0x202A, 0x202E, 0x2066, 0x2069, + // #45 (4699+114): bp=Bidi_Mirrored:Bidi_M + 0x0028, 0x0029, 0x003C, 0x003C, 0x003E, 0x003E, 0x005B, 0x005B, + 0x005D, 0x005D, 0x007B, 0x007B, 0x007D, 0x007D, 0x00AB, 0x00AB, + 0x00BB, 0x00BB, 0x0F3A, 0x0F3D, 0x169B, 0x169C, 0x2039, 0x203A, + 0x2045, 0x2046, 0x207D, 0x207E, 0x208D, 0x208E, 0x2140, 0x2140, + 0x2201, 0x2204, 0x2208, 0x220D, 0x2211, 0x2211, 0x2215, 0x2216, + 0x221A, 0x221D, 0x221F, 0x2222, 0x2224, 0x2224, 0x2226, 0x2226, + 0x222B, 0x2233, 0x2239, 0x2239, 0x223B, 0x224C, 0x2252, 0x2255, + 0x225F, 0x2260, 0x2262, 0x2262, 0x2264, 0x226B, 0x226E, 0x228C, + 0x228F, 0x2292, 0x2298, 0x2298, 0x22A2, 0x22A3, 0x22A6, 0x22B8, + 0x22BE, 0x22BF, 0x22C9, 0x22CD, 0x22D0, 0x22D1, 0x22D6, 0x22ED, + 0x22F0, 0x22FF, 0x2308, 0x230B, 0x2320, 0x2321, 0x2329, 0x232A, + 0x2768, 0x2775, 0x27C0, 0x27C0, 0x27C3, 0x27C6, 0x27C8, 0x27C9, + 0x27CB, 0x27CD, 0x27D3, 0x27D6, 0x27DC, 0x27DE, 0x27E2, 0x27EF, + 0x2983, 0x2998, 0x299B, 0x29A0, 0x29A2, 0x29AF, 0x29B8, 0x29B8, + 0x29C0, 0x29C5, 0x29C9, 0x29C9, 0x29CE, 0x29D2, 0x29D4, 0x29D5, + 0x29D8, 0x29DC, 0x29E1, 0x29E1, 0x29E3, 0x29E5, 0x29E8, 0x29E9, + 0x29F4, 0x29F9, 0x29FC, 0x29FD, 0x2A0A, 0x2A1C, 0x2A1E, 0x2A21, + 0x2A24, 0x2A24, 0x2A26, 0x2A26, 0x2A29, 0x2A29, 0x2A2B, 0x2A2E, + 0x2A34, 0x2A35, 0x2A3C, 0x2A3E, 0x2A57, 0x2A58, 0x2A64, 0x2A65, + 0x2A6A, 0x2A6D, 0x2A6F, 0x2A70, 0x2A73, 0x2A74, 0x2A79, 0x2AA3, + 0x2AA6, 0x2AAD, 0x2AAF, 0x2AD6, 0x2ADC, 0x2ADC, 0x2ADE, 0x2ADE, + 0x2AE2, 0x2AE6, 0x2AEC, 0x2AEE, 0x2AF3, 0x2AF3, 0x2AF7, 0x2AFB, + 0x2AFD, 0x2AFD, 0x2BFE, 0x2BFE, 0x2E02, 0x2E05, 0x2E09, 0x2E0A, + 0x2E0C, 0x2E0D, 0x2E1C, 0x2E1D, 0x2E20, 0x2E29, 0x2E55, 0x2E5C, + 0x3008, 0x3011, 0x3014, 0x301B, 0xFE59, 0xFE5E, 0xFE64, 0xFE65, + 0xFF08, 0xFF09, 0xFF1C, 0xFF1C, 0xFF1E, 0xFF1E, 0xFF3B, 0xFF3B, + 0xFF3D, 0xFF3D, 0xFF5B, 0xFF5B, 0xFF5D, 0xFF5D, 0xFF5F, 0xFF60, + 0xFF62, 0xFF63, 0x1D6DB, 0x1D6DB, 0x1D715, 0x1D715, 0x1D74F, 0x1D74F, + 0x1D789, 0x1D789, 0x1D7C3, 0x1D7C3, + // #46 (4813+427): bp=Case_Ignorable:CI + 0x0027, 0x0027, 0x002E, 0x002E, 0x003A, 0x003A, 0x005E, 0x005E, + 0x0060, 0x0060, 0x00A8, 0x00A8, 0x00AD, 0x00AD, 0x00AF, 0x00AF, + 0x00B4, 0x00B4, 0x00B7, 0x00B8, 0x02B0, 0x036F, 0x0374, 0x0375, + 0x037A, 0x037A, 0x0384, 0x0385, 0x0387, 0x0387, 0x0483, 0x0489, + 0x0559, 0x0559, 0x055F, 0x055F, 0x0591, 0x05BD, 0x05BF, 0x05BF, + 0x05C1, 0x05C2, 0x05C4, 0x05C5, 0x05C7, 0x05C7, 0x05F4, 0x05F4, + 0x0600, 0x0605, 0x0610, 0x061A, 0x061C, 0x061C, 0x0640, 0x0640, + 0x064B, 0x065F, 0x0670, 0x0670, 0x06D6, 0x06DD, 0x06DF, 0x06E8, + 0x06EA, 0x06ED, 0x070F, 0x070F, 0x0711, 0x0711, 0x0730, 0x074A, + 0x07A6, 0x07B0, 0x07EB, 0x07F5, 0x07FA, 0x07FA, 0x07FD, 0x07FD, + 0x0816, 0x082D, 0x0859, 0x085B, 0x0888, 0x0888, 0x0890, 0x0891, + 0x0898, 0x089F, 0x08C9, 0x0902, 0x093A, 0x093A, 0x093C, 0x093C, + 0x0941, 0x0948, 0x094D, 0x094D, 0x0951, 0x0957, 0x0962, 0x0963, + 0x0971, 0x0971, 0x0981, 0x0981, 0x09BC, 0x09BC, 0x09C1, 0x09C4, + 0x09CD, 0x09CD, 0x09E2, 0x09E3, 0x09FE, 0x09FE, 0x0A01, 0x0A02, + 0x0A3C, 0x0A3C, 0x0A41, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, + 0x0A51, 0x0A51, 0x0A70, 0x0A71, 0x0A75, 0x0A75, 0x0A81, 0x0A82, + 0x0ABC, 0x0ABC, 0x0AC1, 0x0AC5, 0x0AC7, 0x0AC8, 0x0ACD, 0x0ACD, + 0x0AE2, 0x0AE3, 0x0AFA, 0x0AFF, 0x0B01, 0x0B01, 0x0B3C, 0x0B3C, + 0x0B3F, 0x0B3F, 0x0B41, 0x0B44, 0x0B4D, 0x0B4D, 0x0B55, 0x0B56, + 0x0B62, 0x0B63, 0x0B82, 0x0B82, 0x0BC0, 0x0BC0, 0x0BCD, 0x0BCD, + 0x0C00, 0x0C00, 0x0C04, 0x0C04, 0x0C3C, 0x0C3C, 0x0C3E, 0x0C40, + 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C62, 0x0C63, + 0x0C81, 0x0C81, 0x0CBC, 0x0CBC, 0x0CBF, 0x0CBF, 0x0CC6, 0x0CC6, + 0x0CCC, 0x0CCD, 0x0CE2, 0x0CE3, 0x0D00, 0x0D01, 0x0D3B, 0x0D3C, + 0x0D41, 0x0D44, 0x0D4D, 0x0D4D, 0x0D62, 0x0D63, 0x0D81, 0x0D81, + 0x0DCA, 0x0DCA, 0x0DD2, 0x0DD4, 0x0DD6, 0x0DD6, 0x0E31, 0x0E31, + 0x0E34, 0x0E3A, 0x0E46, 0x0E4E, 0x0EB1, 0x0EB1, 0x0EB4, 0x0EBC, + 0x0EC6, 0x0EC6, 0x0EC8, 0x0ECD, 0x0F18, 0x0F19, 0x0F35, 0x0F35, + 0x0F37, 0x0F37, 0x0F39, 0x0F39, 0x0F71, 0x0F7E, 0x0F80, 0x0F84, + 0x0F86, 0x0F87, 0x0F8D, 0x0F97, 0x0F99, 0x0FBC, 0x0FC6, 0x0FC6, + 0x102D, 0x1030, 0x1032, 0x1037, 0x1039, 0x103A, 0x103D, 0x103E, + 0x1058, 0x1059, 0x105E, 0x1060, 0x1071, 0x1074, 0x1082, 0x1082, + 0x1085, 0x1086, 0x108D, 0x108D, 0x109D, 0x109D, 0x10FC, 0x10FC, + 0x135D, 0x135F, 0x1712, 0x1714, 0x1732, 0x1733, 0x1752, 0x1753, + 0x1772, 0x1773, 0x17B4, 0x17B5, 0x17B7, 0x17BD, 0x17C6, 0x17C6, + 0x17C9, 0x17D3, 0x17D7, 0x17D7, 0x17DD, 0x17DD, 0x180B, 0x180F, + 0x1843, 0x1843, 0x1885, 0x1886, 0x18A9, 0x18A9, 0x1920, 0x1922, + 0x1927, 0x1928, 0x1932, 0x1932, 0x1939, 0x193B, 0x1A17, 0x1A18, + 0x1A1B, 0x1A1B, 0x1A56, 0x1A56, 0x1A58, 0x1A5E, 0x1A60, 0x1A60, + 0x1A62, 0x1A62, 0x1A65, 0x1A6C, 0x1A73, 0x1A7C, 0x1A7F, 0x1A7F, + 0x1AA7, 0x1AA7, 0x1AB0, 0x1ACE, 0x1B00, 0x1B03, 0x1B34, 0x1B34, + 0x1B36, 0x1B3A, 0x1B3C, 0x1B3C, 0x1B42, 0x1B42, 0x1B6B, 0x1B73, + 0x1B80, 0x1B81, 0x1BA2, 0x1BA5, 0x1BA8, 0x1BA9, 0x1BAB, 0x1BAD, + 0x1BE6, 0x1BE6, 0x1BE8, 0x1BE9, 0x1BED, 0x1BED, 0x1BEF, 0x1BF1, + 0x1C2C, 0x1C33, 0x1C36, 0x1C37, 0x1C78, 0x1C7D, 0x1CD0, 0x1CD2, + 0x1CD4, 0x1CE0, 0x1CE2, 0x1CE8, 0x1CED, 0x1CED, 0x1CF4, 0x1CF4, + 0x1CF8, 0x1CF9, 0x1D2C, 0x1D6A, 0x1D78, 0x1D78, 0x1D9B, 0x1DFF, + 0x1FBD, 0x1FBD, 0x1FBF, 0x1FC1, 0x1FCD, 0x1FCF, 0x1FDD, 0x1FDF, + 0x1FED, 0x1FEF, 0x1FFD, 0x1FFE, 0x200B, 0x200F, 0x2018, 0x2019, + 0x2024, 0x2024, 0x2027, 0x2027, 0x202A, 0x202E, 0x2060, 0x2064, + 0x2066, 0x206F, 0x2071, 0x2071, 0x207F, 0x207F, 0x2090, 0x209C, + 0x20D0, 0x20F0, 0x2C7C, 0x2C7D, 0x2CEF, 0x2CF1, 0x2D6F, 0x2D6F, + 0x2D7F, 0x2D7F, 0x2DE0, 0x2DFF, 0x2E2F, 0x2E2F, 0x3005, 0x3005, + 0x302A, 0x302D, 0x3031, 0x3035, 0x303B, 0x303B, 0x3099, 0x309E, + 0x30FC, 0x30FE, 0xA015, 0xA015, 0xA4F8, 0xA4FD, 0xA60C, 0xA60C, + 0xA66F, 0xA672, 0xA674, 0xA67D, 0xA67F, 0xA67F, 0xA69C, 0xA69F, + 0xA6F0, 0xA6F1, 0xA700, 0xA721, 0xA770, 0xA770, 0xA788, 0xA78A, + 0xA7F2, 0xA7F4, 0xA7F8, 0xA7F9, 0xA802, 0xA802, 0xA806, 0xA806, + 0xA80B, 0xA80B, 0xA825, 0xA826, 0xA82C, 0xA82C, 0xA8C4, 0xA8C5, + 0xA8E0, 0xA8F1, 0xA8FF, 0xA8FF, 0xA926, 0xA92D, 0xA947, 0xA951, + 0xA980, 0xA982, 0xA9B3, 0xA9B3, 0xA9B6, 0xA9B9, 0xA9BC, 0xA9BD, + 0xA9CF, 0xA9CF, 0xA9E5, 0xA9E6, 0xAA29, 0xAA2E, 0xAA31, 0xAA32, + 0xAA35, 0xAA36, 0xAA43, 0xAA43, 0xAA4C, 0xAA4C, 0xAA70, 0xAA70, + 0xAA7C, 0xAA7C, 0xAAB0, 0xAAB0, 0xAAB2, 0xAAB4, 0xAAB7, 0xAAB8, + 0xAABE, 0xAABF, 0xAAC1, 0xAAC1, 0xAADD, 0xAADD, 0xAAEC, 0xAAED, + 0xAAF3, 0xAAF4, 0xAAF6, 0xAAF6, 0xAB5B, 0xAB5F, 0xAB69, 0xAB6B, + 0xABE5, 0xABE5, 0xABE8, 0xABE8, 0xABED, 0xABED, 0xFB1E, 0xFB1E, + 0xFBB2, 0xFBC2, 0xFE00, 0xFE0F, 0xFE13, 0xFE13, 0xFE20, 0xFE2F, + 0xFE52, 0xFE52, 0xFE55, 0xFE55, 0xFEFF, 0xFEFF, 0xFF07, 0xFF07, + 0xFF0E, 0xFF0E, 0xFF1A, 0xFF1A, 0xFF3E, 0xFF3E, 0xFF40, 0xFF40, + 0xFF70, 0xFF70, 0xFF9E, 0xFF9F, 0xFFE3, 0xFFE3, 0xFFF9, 0xFFFB, + 0x101FD, 0x101FD, 0x102E0, 0x102E0, 0x10376, 0x1037A, 0x10780, 0x10785, + 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10A01, 0x10A03, 0x10A05, 0x10A06, + 0x10A0C, 0x10A0F, 0x10A38, 0x10A3A, 0x10A3F, 0x10A3F, 0x10AE5, 0x10AE6, + 0x10D24, 0x10D27, 0x10EAB, 0x10EAC, 0x10F46, 0x10F50, 0x10F82, 0x10F85, + 0x11001, 0x11001, 0x11038, 0x11046, 0x11070, 0x11070, 0x11073, 0x11074, + 0x1107F, 0x11081, 0x110B3, 0x110B6, 0x110B9, 0x110BA, 0x110BD, 0x110BD, + 0x110C2, 0x110C2, 0x110CD, 0x110CD, 0x11100, 0x11102, 0x11127, 0x1112B, + 0x1112D, 0x11134, 0x11173, 0x11173, 0x11180, 0x11181, 0x111B6, 0x111BE, + 0x111C9, 0x111CC, 0x111CF, 0x111CF, 0x1122F, 0x11231, 0x11234, 0x11234, + 0x11236, 0x11237, 0x1123E, 0x1123E, 0x112DF, 0x112DF, 0x112E3, 0x112EA, + 0x11300, 0x11301, 0x1133B, 0x1133C, 0x11340, 0x11340, 0x11366, 0x1136C, + 0x11370, 0x11374, 0x11438, 0x1143F, 0x11442, 0x11444, 0x11446, 0x11446, + 0x1145E, 0x1145E, 0x114B3, 0x114B8, 0x114BA, 0x114BA, 0x114BF, 0x114C0, + 0x114C2, 0x114C3, 0x115B2, 0x115B5, 0x115BC, 0x115BD, 0x115BF, 0x115C0, + 0x115DC, 0x115DD, 0x11633, 0x1163A, 0x1163D, 0x1163D, 0x1163F, 0x11640, + 0x116AB, 0x116AB, 0x116AD, 0x116AD, 0x116B0, 0x116B5, 0x116B7, 0x116B7, + 0x1171D, 0x1171F, 0x11722, 0x11725, 0x11727, 0x1172B, 0x1182F, 0x11837, + 0x11839, 0x1183A, 0x1193B, 0x1193C, 0x1193E, 0x1193E, 0x11943, 0x11943, + 0x119D4, 0x119D7, 0x119DA, 0x119DB, 0x119E0, 0x119E0, 0x11A01, 0x11A0A, + 0x11A33, 0x11A38, 0x11A3B, 0x11A3E, 0x11A47, 0x11A47, 0x11A51, 0x11A56, + 0x11A59, 0x11A5B, 0x11A8A, 0x11A96, 0x11A98, 0x11A99, 0x11C30, 0x11C36, + 0x11C38, 0x11C3D, 0x11C3F, 0x11C3F, 0x11C92, 0x11CA7, 0x11CAA, 0x11CB0, + 0x11CB2, 0x11CB3, 0x11CB5, 0x11CB6, 0x11D31, 0x11D36, 0x11D3A, 0x11D3A, + 0x11D3C, 0x11D3D, 0x11D3F, 0x11D45, 0x11D47, 0x11D47, 0x11D90, 0x11D91, + 0x11D95, 0x11D95, 0x11D97, 0x11D97, 0x11EF3, 0x11EF4, 0x13430, 0x13438, + 0x16AF0, 0x16AF4, 0x16B30, 0x16B36, 0x16B40, 0x16B43, 0x16F4F, 0x16F4F, + 0x16F8F, 0x16F9F, 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE4, 0x1AFF0, 0x1AFF3, + 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1BC9D, 0x1BC9E, 0x1BCA0, 0x1BCA3, + 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1D167, 0x1D169, 0x1D173, 0x1D182, + 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0x1D242, 0x1D244, 0x1DA00, 0x1DA36, + 0x1DA3B, 0x1DA6C, 0x1DA75, 0x1DA75, 0x1DA84, 0x1DA84, 0x1DA9B, 0x1DA9F, + 0x1DAA1, 0x1DAAF, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, 0x1E130, 0x1E13D, 0x1E2AE, 0x1E2AE, + 0x1E2EC, 0x1E2EF, 0x1E8D0, 0x1E8D6, 0x1E944, 0x1E94B, 0x1F3FB, 0x1F3FF, + 0xE0001, 0xE0001, 0xE0020, 0xE007F, 0xE0100, 0xE01EF, + // #47 (5240+155): bp=Cased + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00B5, 0x00B5, + 0x00BA, 0x00BA, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x01BA, + 0x01BC, 0x01BF, 0x01C4, 0x0293, 0x0295, 0x02B8, 0x02C0, 0x02C1, + 0x02E0, 0x02E4, 0x0345, 0x0345, 0x0370, 0x0373, 0x0376, 0x0377, + 0x037A, 0x037D, 0x037F, 0x037F, 0x0386, 0x0386, 0x0388, 0x038A, + 0x038C, 0x038C, 0x038E, 0x03A1, 0x03A3, 0x03F5, 0x03F7, 0x0481, + 0x048A, 0x052F, 0x0531, 0x0556, 0x0560, 0x0588, 0x10A0, 0x10C5, + 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, 0x10FD, 0x10FF, + 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0x1C80, 0x1C88, 0x1C90, 0x1CBA, + 0x1CBD, 0x1CBF, 0x1D00, 0x1DBF, 0x1E00, 0x1F15, 0x1F18, 0x1F1D, + 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, + 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, + 0x1FB6, 0x1FBC, 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, + 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, + 0x1FF6, 0x1FFC, 0x2071, 0x2071, 0x207F, 0x207F, 0x2090, 0x209C, + 0x2102, 0x2102, 0x2107, 0x2107, 0x210A, 0x2113, 0x2115, 0x2115, + 0x2119, 0x211D, 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, + 0x212A, 0x212D, 0x212F, 0x2134, 0x2139, 0x2139, 0x213C, 0x213F, + 0x2145, 0x2149, 0x214E, 0x214E, 0x2160, 0x217F, 0x2183, 0x2184, + 0x24B6, 0x24E9, 0x2C00, 0x2CE4, 0x2CEB, 0x2CEE, 0x2CF2, 0x2CF3, + 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, 0xA640, 0xA66D, + 0xA680, 0xA69D, 0xA722, 0xA787, 0xA78B, 0xA78E, 0xA790, 0xA7CA, + 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, 0xA7F5, 0xA7F6, + 0xA7F8, 0xA7FA, 0xAB30, 0xAB5A, 0xAB5C, 0xAB68, 0xAB70, 0xABBF, + 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, + 0x10400, 0x1044F, 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10570, 0x1057A, + 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, 0x10597, 0x105A1, + 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10780, 0x10780, + 0x10783, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10C80, 0x10CB2, + 0x10CC0, 0x10CF2, 0x118A0, 0x118DF, 0x16E40, 0x16E7F, 0x1D400, 0x1D454, + 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, + 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, + 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, + 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, + 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D6C0, 0x1D6C2, 0x1D6DA, + 0x1D6DC, 0x1D6FA, 0x1D6FC, 0x1D714, 0x1D716, 0x1D734, 0x1D736, 0x1D74E, + 0x1D750, 0x1D76E, 0x1D770, 0x1D788, 0x1D78A, 0x1D7A8, 0x1D7AA, 0x1D7C2, + 0x1D7C4, 0x1D7CB, 0x1DF00, 0x1DF09, 0x1DF0B, 0x1DF1E, 0x1E900, 0x1E943, + 0x1F130, 0x1F149, 0x1F150, 0x1F169, 0x1F170, 0x1F189, + // #48 (5395+622): bp=Changes_When_Casefolded:CWCF + 0x0041, 0x005A, 0x00B5, 0x00B5, 0x00C0, 0x00D6, 0x00D8, 0x00DF, + 0x0100, 0x0100, 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106, + 0x0108, 0x0108, 0x010A, 0x010A, 0x010C, 0x010C, 0x010E, 0x010E, + 0x0110, 0x0110, 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116, + 0x0118, 0x0118, 0x011A, 0x011A, 0x011C, 0x011C, 0x011E, 0x011E, + 0x0120, 0x0120, 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126, + 0x0128, 0x0128, 0x012A, 0x012A, 0x012C, 0x012C, 0x012E, 0x012E, + 0x0130, 0x0130, 0x0132, 0x0132, 0x0134, 0x0134, 0x0136, 0x0136, + 0x0139, 0x0139, 0x013B, 0x013B, 0x013D, 0x013D, 0x013F, 0x013F, + 0x0141, 0x0141, 0x0143, 0x0143, 0x0145, 0x0145, 0x0147, 0x0147, + 0x0149, 0x014A, 0x014C, 0x014C, 0x014E, 0x014E, 0x0150, 0x0150, + 0x0152, 0x0152, 0x0154, 0x0154, 0x0156, 0x0156, 0x0158, 0x0158, + 0x015A, 0x015A, 0x015C, 0x015C, 0x015E, 0x015E, 0x0160, 0x0160, + 0x0162, 0x0162, 0x0164, 0x0164, 0x0166, 0x0166, 0x0168, 0x0168, + 0x016A, 0x016A, 0x016C, 0x016C, 0x016E, 0x016E, 0x0170, 0x0170, + 0x0172, 0x0172, 0x0174, 0x0174, 0x0176, 0x0176, 0x0178, 0x0179, + 0x017B, 0x017B, 0x017D, 0x017D, 0x017F, 0x017F, 0x0181, 0x0182, + 0x0184, 0x0184, 0x0186, 0x0187, 0x0189, 0x018B, 0x018E, 0x0191, + 0x0193, 0x0194, 0x0196, 0x0198, 0x019C, 0x019D, 0x019F, 0x01A0, + 0x01A2, 0x01A2, 0x01A4, 0x01A4, 0x01A6, 0x01A7, 0x01A9, 0x01A9, + 0x01AC, 0x01AC, 0x01AE, 0x01AF, 0x01B1, 0x01B3, 0x01B5, 0x01B5, + 0x01B7, 0x01B8, 0x01BC, 0x01BC, 0x01C4, 0x01C5, 0x01C7, 0x01C8, + 0x01CA, 0x01CB, 0x01CD, 0x01CD, 0x01CF, 0x01CF, 0x01D1, 0x01D1, + 0x01D3, 0x01D3, 0x01D5, 0x01D5, 0x01D7, 0x01D7, 0x01D9, 0x01D9, + 0x01DB, 0x01DB, 0x01DE, 0x01DE, 0x01E0, 0x01E0, 0x01E2, 0x01E2, + 0x01E4, 0x01E4, 0x01E6, 0x01E6, 0x01E8, 0x01E8, 0x01EA, 0x01EA, + 0x01EC, 0x01EC, 0x01EE, 0x01EE, 0x01F1, 0x01F2, 0x01F4, 0x01F4, + 0x01F6, 0x01F8, 0x01FA, 0x01FA, 0x01FC, 0x01FC, 0x01FE, 0x01FE, + 0x0200, 0x0200, 0x0202, 0x0202, 0x0204, 0x0204, 0x0206, 0x0206, + 0x0208, 0x0208, 0x020A, 0x020A, 0x020C, 0x020C, 0x020E, 0x020E, + 0x0210, 0x0210, 0x0212, 0x0212, 0x0214, 0x0214, 0x0216, 0x0216, + 0x0218, 0x0218, 0x021A, 0x021A, 0x021C, 0x021C, 0x021E, 0x021E, + 0x0220, 0x0220, 0x0222, 0x0222, 0x0224, 0x0224, 0x0226, 0x0226, + 0x0228, 0x0228, 0x022A, 0x022A, 0x022C, 0x022C, 0x022E, 0x022E, + 0x0230, 0x0230, 0x0232, 0x0232, 0x023A, 0x023B, 0x023D, 0x023E, + 0x0241, 0x0241, 0x0243, 0x0246, 0x0248, 0x0248, 0x024A, 0x024A, + 0x024C, 0x024C, 0x024E, 0x024E, 0x0345, 0x0345, 0x0370, 0x0370, + 0x0372, 0x0372, 0x0376, 0x0376, 0x037F, 0x037F, 0x0386, 0x0386, + 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x038F, 0x0391, 0x03A1, + 0x03A3, 0x03AB, 0x03C2, 0x03C2, 0x03CF, 0x03D1, 0x03D5, 0x03D6, + 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, + 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, + 0x03E8, 0x03E8, 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, + 0x03F0, 0x03F1, 0x03F4, 0x03F5, 0x03F7, 0x03F7, 0x03F9, 0x03FA, + 0x03FD, 0x042F, 0x0460, 0x0460, 0x0462, 0x0462, 0x0464, 0x0464, + 0x0466, 0x0466, 0x0468, 0x0468, 0x046A, 0x046A, 0x046C, 0x046C, + 0x046E, 0x046E, 0x0470, 0x0470, 0x0472, 0x0472, 0x0474, 0x0474, + 0x0476, 0x0476, 0x0478, 0x0478, 0x047A, 0x047A, 0x047C, 0x047C, + 0x047E, 0x047E, 0x0480, 0x0480, 0x048A, 0x048A, 0x048C, 0x048C, + 0x048E, 0x048E, 0x0490, 0x0490, 0x0492, 0x0492, 0x0494, 0x0494, + 0x0496, 0x0496, 0x0498, 0x0498, 0x049A, 0x049A, 0x049C, 0x049C, + 0x049E, 0x049E, 0x04A0, 0x04A0, 0x04A2, 0x04A2, 0x04A4, 0x04A4, + 0x04A6, 0x04A6, 0x04A8, 0x04A8, 0x04AA, 0x04AA, 0x04AC, 0x04AC, + 0x04AE, 0x04AE, 0x04B0, 0x04B0, 0x04B2, 0x04B2, 0x04B4, 0x04B4, + 0x04B6, 0x04B6, 0x04B8, 0x04B8, 0x04BA, 0x04BA, 0x04BC, 0x04BC, + 0x04BE, 0x04BE, 0x04C0, 0x04C1, 0x04C3, 0x04C3, 0x04C5, 0x04C5, + 0x04C7, 0x04C7, 0x04C9, 0x04C9, 0x04CB, 0x04CB, 0x04CD, 0x04CD, + 0x04D0, 0x04D0, 0x04D2, 0x04D2, 0x04D4, 0x04D4, 0x04D6, 0x04D6, + 0x04D8, 0x04D8, 0x04DA, 0x04DA, 0x04DC, 0x04DC, 0x04DE, 0x04DE, + 0x04E0, 0x04E0, 0x04E2, 0x04E2, 0x04E4, 0x04E4, 0x04E6, 0x04E6, + 0x04E8, 0x04E8, 0x04EA, 0x04EA, 0x04EC, 0x04EC, 0x04EE, 0x04EE, + 0x04F0, 0x04F0, 0x04F2, 0x04F2, 0x04F4, 0x04F4, 0x04F6, 0x04F6, + 0x04F8, 0x04F8, 0x04FA, 0x04FA, 0x04FC, 0x04FC, 0x04FE, 0x04FE, + 0x0500, 0x0500, 0x0502, 0x0502, 0x0504, 0x0504, 0x0506, 0x0506, + 0x0508, 0x0508, 0x050A, 0x050A, 0x050C, 0x050C, 0x050E, 0x050E, + 0x0510, 0x0510, 0x0512, 0x0512, 0x0514, 0x0514, 0x0516, 0x0516, + 0x0518, 0x0518, 0x051A, 0x051A, 0x051C, 0x051C, 0x051E, 0x051E, + 0x0520, 0x0520, 0x0522, 0x0522, 0x0524, 0x0524, 0x0526, 0x0526, + 0x0528, 0x0528, 0x052A, 0x052A, 0x052C, 0x052C, 0x052E, 0x052E, + 0x0531, 0x0556, 0x0587, 0x0587, 0x10A0, 0x10C5, 0x10C7, 0x10C7, + 0x10CD, 0x10CD, 0x13F8, 0x13FD, 0x1C80, 0x1C88, 0x1C90, 0x1CBA, + 0x1CBD, 0x1CBF, 0x1E00, 0x1E00, 0x1E02, 0x1E02, 0x1E04, 0x1E04, + 0x1E06, 0x1E06, 0x1E08, 0x1E08, 0x1E0A, 0x1E0A, 0x1E0C, 0x1E0C, + 0x1E0E, 0x1E0E, 0x1E10, 0x1E10, 0x1E12, 0x1E12, 0x1E14, 0x1E14, + 0x1E16, 0x1E16, 0x1E18, 0x1E18, 0x1E1A, 0x1E1A, 0x1E1C, 0x1E1C, + 0x1E1E, 0x1E1E, 0x1E20, 0x1E20, 0x1E22, 0x1E22, 0x1E24, 0x1E24, + 0x1E26, 0x1E26, 0x1E28, 0x1E28, 0x1E2A, 0x1E2A, 0x1E2C, 0x1E2C, + 0x1E2E, 0x1E2E, 0x1E30, 0x1E30, 0x1E32, 0x1E32, 0x1E34, 0x1E34, + 0x1E36, 0x1E36, 0x1E38, 0x1E38, 0x1E3A, 0x1E3A, 0x1E3C, 0x1E3C, + 0x1E3E, 0x1E3E, 0x1E40, 0x1E40, 0x1E42, 0x1E42, 0x1E44, 0x1E44, + 0x1E46, 0x1E46, 0x1E48, 0x1E48, 0x1E4A, 0x1E4A, 0x1E4C, 0x1E4C, + 0x1E4E, 0x1E4E, 0x1E50, 0x1E50, 0x1E52, 0x1E52, 0x1E54, 0x1E54, + 0x1E56, 0x1E56, 0x1E58, 0x1E58, 0x1E5A, 0x1E5A, 0x1E5C, 0x1E5C, + 0x1E5E, 0x1E5E, 0x1E60, 0x1E60, 0x1E62, 0x1E62, 0x1E64, 0x1E64, + 0x1E66, 0x1E66, 0x1E68, 0x1E68, 0x1E6A, 0x1E6A, 0x1E6C, 0x1E6C, + 0x1E6E, 0x1E6E, 0x1E70, 0x1E70, 0x1E72, 0x1E72, 0x1E74, 0x1E74, + 0x1E76, 0x1E76, 0x1E78, 0x1E78, 0x1E7A, 0x1E7A, 0x1E7C, 0x1E7C, + 0x1E7E, 0x1E7E, 0x1E80, 0x1E80, 0x1E82, 0x1E82, 0x1E84, 0x1E84, + 0x1E86, 0x1E86, 0x1E88, 0x1E88, 0x1E8A, 0x1E8A, 0x1E8C, 0x1E8C, + 0x1E8E, 0x1E8E, 0x1E90, 0x1E90, 0x1E92, 0x1E92, 0x1E94, 0x1E94, + 0x1E9A, 0x1E9B, 0x1E9E, 0x1E9E, 0x1EA0, 0x1EA0, 0x1EA2, 0x1EA2, + 0x1EA4, 0x1EA4, 0x1EA6, 0x1EA6, 0x1EA8, 0x1EA8, 0x1EAA, 0x1EAA, + 0x1EAC, 0x1EAC, 0x1EAE, 0x1EAE, 0x1EB0, 0x1EB0, 0x1EB2, 0x1EB2, + 0x1EB4, 0x1EB4, 0x1EB6, 0x1EB6, 0x1EB8, 0x1EB8, 0x1EBA, 0x1EBA, + 0x1EBC, 0x1EBC, 0x1EBE, 0x1EBE, 0x1EC0, 0x1EC0, 0x1EC2, 0x1EC2, + 0x1EC4, 0x1EC4, 0x1EC6, 0x1EC6, 0x1EC8, 0x1EC8, 0x1ECA, 0x1ECA, + 0x1ECC, 0x1ECC, 0x1ECE, 0x1ECE, 0x1ED0, 0x1ED0, 0x1ED2, 0x1ED2, + 0x1ED4, 0x1ED4, 0x1ED6, 0x1ED6, 0x1ED8, 0x1ED8, 0x1EDA, 0x1EDA, + 0x1EDC, 0x1EDC, 0x1EDE, 0x1EDE, 0x1EE0, 0x1EE0, 0x1EE2, 0x1EE2, + 0x1EE4, 0x1EE4, 0x1EE6, 0x1EE6, 0x1EE8, 0x1EE8, 0x1EEA, 0x1EEA, + 0x1EEC, 0x1EEC, 0x1EEE, 0x1EEE, 0x1EF0, 0x1EF0, 0x1EF2, 0x1EF2, + 0x1EF4, 0x1EF4, 0x1EF6, 0x1EF6, 0x1EF8, 0x1EF8, 0x1EFA, 0x1EFA, + 0x1EFC, 0x1EFC, 0x1EFE, 0x1EFE, 0x1F08, 0x1F0F, 0x1F18, 0x1F1D, + 0x1F28, 0x1F2F, 0x1F38, 0x1F3F, 0x1F48, 0x1F4D, 0x1F59, 0x1F59, + 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F5F, 0x1F68, 0x1F6F, + 0x1F80, 0x1FAF, 0x1FB2, 0x1FB4, 0x1FB7, 0x1FBC, 0x1FC2, 0x1FC4, + 0x1FC7, 0x1FCC, 0x1FD8, 0x1FDB, 0x1FE8, 0x1FEC, 0x1FF2, 0x1FF4, + 0x1FF7, 0x1FFC, 0x2126, 0x2126, 0x212A, 0x212B, 0x2132, 0x2132, + 0x2160, 0x216F, 0x2183, 0x2183, 0x24B6, 0x24CF, 0x2C00, 0x2C2F, + 0x2C60, 0x2C60, 0x2C62, 0x2C64, 0x2C67, 0x2C67, 0x2C69, 0x2C69, + 0x2C6B, 0x2C6B, 0x2C6D, 0x2C70, 0x2C72, 0x2C72, 0x2C75, 0x2C75, + 0x2C7E, 0x2C80, 0x2C82, 0x2C82, 0x2C84, 0x2C84, 0x2C86, 0x2C86, + 0x2C88, 0x2C88, 0x2C8A, 0x2C8A, 0x2C8C, 0x2C8C, 0x2C8E, 0x2C8E, + 0x2C90, 0x2C90, 0x2C92, 0x2C92, 0x2C94, 0x2C94, 0x2C96, 0x2C96, + 0x2C98, 0x2C98, 0x2C9A, 0x2C9A, 0x2C9C, 0x2C9C, 0x2C9E, 0x2C9E, + 0x2CA0, 0x2CA0, 0x2CA2, 0x2CA2, 0x2CA4, 0x2CA4, 0x2CA6, 0x2CA6, + 0x2CA8, 0x2CA8, 0x2CAA, 0x2CAA, 0x2CAC, 0x2CAC, 0x2CAE, 0x2CAE, + 0x2CB0, 0x2CB0, 0x2CB2, 0x2CB2, 0x2CB4, 0x2CB4, 0x2CB6, 0x2CB6, + 0x2CB8, 0x2CB8, 0x2CBA, 0x2CBA, 0x2CBC, 0x2CBC, 0x2CBE, 0x2CBE, + 0x2CC0, 0x2CC0, 0x2CC2, 0x2CC2, 0x2CC4, 0x2CC4, 0x2CC6, 0x2CC6, + 0x2CC8, 0x2CC8, 0x2CCA, 0x2CCA, 0x2CCC, 0x2CCC, 0x2CCE, 0x2CCE, + 0x2CD0, 0x2CD0, 0x2CD2, 0x2CD2, 0x2CD4, 0x2CD4, 0x2CD6, 0x2CD6, + 0x2CD8, 0x2CD8, 0x2CDA, 0x2CDA, 0x2CDC, 0x2CDC, 0x2CDE, 0x2CDE, + 0x2CE0, 0x2CE0, 0x2CE2, 0x2CE2, 0x2CEB, 0x2CEB, 0x2CED, 0x2CED, + 0x2CF2, 0x2CF2, 0xA640, 0xA640, 0xA642, 0xA642, 0xA644, 0xA644, + 0xA646, 0xA646, 0xA648, 0xA648, 0xA64A, 0xA64A, 0xA64C, 0xA64C, + 0xA64E, 0xA64E, 0xA650, 0xA650, 0xA652, 0xA652, 0xA654, 0xA654, + 0xA656, 0xA656, 0xA658, 0xA658, 0xA65A, 0xA65A, 0xA65C, 0xA65C, + 0xA65E, 0xA65E, 0xA660, 0xA660, 0xA662, 0xA662, 0xA664, 0xA664, + 0xA666, 0xA666, 0xA668, 0xA668, 0xA66A, 0xA66A, 0xA66C, 0xA66C, + 0xA680, 0xA680, 0xA682, 0xA682, 0xA684, 0xA684, 0xA686, 0xA686, + 0xA688, 0xA688, 0xA68A, 0xA68A, 0xA68C, 0xA68C, 0xA68E, 0xA68E, + 0xA690, 0xA690, 0xA692, 0xA692, 0xA694, 0xA694, 0xA696, 0xA696, + 0xA698, 0xA698, 0xA69A, 0xA69A, 0xA722, 0xA722, 0xA724, 0xA724, + 0xA726, 0xA726, 0xA728, 0xA728, 0xA72A, 0xA72A, 0xA72C, 0xA72C, + 0xA72E, 0xA72E, 0xA732, 0xA732, 0xA734, 0xA734, 0xA736, 0xA736, + 0xA738, 0xA738, 0xA73A, 0xA73A, 0xA73C, 0xA73C, 0xA73E, 0xA73E, + 0xA740, 0xA740, 0xA742, 0xA742, 0xA744, 0xA744, 0xA746, 0xA746, + 0xA748, 0xA748, 0xA74A, 0xA74A, 0xA74C, 0xA74C, 0xA74E, 0xA74E, + 0xA750, 0xA750, 0xA752, 0xA752, 0xA754, 0xA754, 0xA756, 0xA756, + 0xA758, 0xA758, 0xA75A, 0xA75A, 0xA75C, 0xA75C, 0xA75E, 0xA75E, + 0xA760, 0xA760, 0xA762, 0xA762, 0xA764, 0xA764, 0xA766, 0xA766, + 0xA768, 0xA768, 0xA76A, 0xA76A, 0xA76C, 0xA76C, 0xA76E, 0xA76E, + 0xA779, 0xA779, 0xA77B, 0xA77B, 0xA77D, 0xA77E, 0xA780, 0xA780, + 0xA782, 0xA782, 0xA784, 0xA784, 0xA786, 0xA786, 0xA78B, 0xA78B, + 0xA78D, 0xA78D, 0xA790, 0xA790, 0xA792, 0xA792, 0xA796, 0xA796, + 0xA798, 0xA798, 0xA79A, 0xA79A, 0xA79C, 0xA79C, 0xA79E, 0xA79E, + 0xA7A0, 0xA7A0, 0xA7A2, 0xA7A2, 0xA7A4, 0xA7A4, 0xA7A6, 0xA7A6, + 0xA7A8, 0xA7A8, 0xA7AA, 0xA7AE, 0xA7B0, 0xA7B4, 0xA7B6, 0xA7B6, + 0xA7B8, 0xA7B8, 0xA7BA, 0xA7BA, 0xA7BC, 0xA7BC, 0xA7BE, 0xA7BE, + 0xA7C0, 0xA7C0, 0xA7C2, 0xA7C2, 0xA7C4, 0xA7C7, 0xA7C9, 0xA7C9, + 0xA7D0, 0xA7D0, 0xA7D6, 0xA7D6, 0xA7D8, 0xA7D8, 0xA7F5, 0xA7F5, + 0xAB70, 0xABBF, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFF21, 0xFF3A, + 0x10400, 0x10427, 0x104B0, 0x104D3, 0x10570, 0x1057A, 0x1057C, 0x1058A, + 0x1058C, 0x10592, 0x10594, 0x10595, 0x10C80, 0x10CB2, 0x118A0, 0x118BF, + 0x16E40, 0x16E5F, 0x1E900, 0x1E921, + // #49 (6017+131): bp=Changes_When_Casemapped:CWCM + 0x0041, 0x005A, 0x0061, 0x007A, 0x00B5, 0x00B5, 0x00C0, 0x00D6, + 0x00D8, 0x00F6, 0x00F8, 0x0137, 0x0139, 0x018C, 0x018E, 0x019A, + 0x019C, 0x01A9, 0x01AC, 0x01B9, 0x01BC, 0x01BD, 0x01BF, 0x01BF, + 0x01C4, 0x0220, 0x0222, 0x0233, 0x023A, 0x0254, 0x0256, 0x0257, + 0x0259, 0x0259, 0x025B, 0x025C, 0x0260, 0x0261, 0x0263, 0x0263, + 0x0265, 0x0266, 0x0268, 0x026C, 0x026F, 0x026F, 0x0271, 0x0272, + 0x0275, 0x0275, 0x027D, 0x027D, 0x0280, 0x0280, 0x0282, 0x0283, + 0x0287, 0x028C, 0x0292, 0x0292, 0x029D, 0x029E, 0x0345, 0x0345, + 0x0370, 0x0373, 0x0376, 0x0377, 0x037B, 0x037D, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, + 0x03A3, 0x03D1, 0x03D5, 0x03F5, 0x03F7, 0x03FB, 0x03FD, 0x0481, + 0x048A, 0x052F, 0x0531, 0x0556, 0x0561, 0x0587, 0x10A0, 0x10C5, + 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, 0x10FD, 0x10FF, + 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0x1C80, 0x1C88, 0x1C90, 0x1CBA, + 0x1CBD, 0x1CBF, 0x1D79, 0x1D79, 0x1D7D, 0x1D7D, 0x1D8E, 0x1D8E, + 0x1E00, 0x1E9B, 0x1E9E, 0x1E9E, 0x1EA0, 0x1F15, 0x1F18, 0x1F1D, + 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, + 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, + 0x1FB6, 0x1FBC, 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, + 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, + 0x1FF6, 0x1FFC, 0x2126, 0x2126, 0x212A, 0x212B, 0x2132, 0x2132, + 0x214E, 0x214E, 0x2160, 0x217F, 0x2183, 0x2184, 0x24B6, 0x24E9, + 0x2C00, 0x2C70, 0x2C72, 0x2C73, 0x2C75, 0x2C76, 0x2C7E, 0x2CE3, + 0x2CEB, 0x2CEE, 0x2CF2, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, + 0x2D2D, 0x2D2D, 0xA640, 0xA66D, 0xA680, 0xA69B, 0xA722, 0xA72F, + 0xA732, 0xA76F, 0xA779, 0xA787, 0xA78B, 0xA78D, 0xA790, 0xA794, + 0xA796, 0xA7AE, 0xA7B0, 0xA7CA, 0xA7D0, 0xA7D1, 0xA7D6, 0xA7D9, + 0xA7F5, 0xA7F6, 0xAB53, 0xAB53, 0xAB70, 0xABBF, 0xFB00, 0xFB06, + 0xFB13, 0xFB17, 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0x10400, 0x1044F, + 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10570, 0x1057A, 0x1057C, 0x1058A, + 0x1058C, 0x10592, 0x10594, 0x10595, 0x10597, 0x105A1, 0x105A3, 0x105B1, + 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, + 0x118A0, 0x118DF, 0x16E40, 0x16E7F, 0x1E900, 0x1E943, + // #50 (6148+609): bp=Changes_When_Lowercased:CWL + 0x0041, 0x005A, 0x00C0, 0x00D6, 0x00D8, 0x00DE, 0x0100, 0x0100, + 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106, 0x0108, 0x0108, + 0x010A, 0x010A, 0x010C, 0x010C, 0x010E, 0x010E, 0x0110, 0x0110, + 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116, 0x0118, 0x0118, + 0x011A, 0x011A, 0x011C, 0x011C, 0x011E, 0x011E, 0x0120, 0x0120, + 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126, 0x0128, 0x0128, + 0x012A, 0x012A, 0x012C, 0x012C, 0x012E, 0x012E, 0x0130, 0x0130, + 0x0132, 0x0132, 0x0134, 0x0134, 0x0136, 0x0136, 0x0139, 0x0139, + 0x013B, 0x013B, 0x013D, 0x013D, 0x013F, 0x013F, 0x0141, 0x0141, + 0x0143, 0x0143, 0x0145, 0x0145, 0x0147, 0x0147, 0x014A, 0x014A, + 0x014C, 0x014C, 0x014E, 0x014E, 0x0150, 0x0150, 0x0152, 0x0152, + 0x0154, 0x0154, 0x0156, 0x0156, 0x0158, 0x0158, 0x015A, 0x015A, + 0x015C, 0x015C, 0x015E, 0x015E, 0x0160, 0x0160, 0x0162, 0x0162, + 0x0164, 0x0164, 0x0166, 0x0166, 0x0168, 0x0168, 0x016A, 0x016A, + 0x016C, 0x016C, 0x016E, 0x016E, 0x0170, 0x0170, 0x0172, 0x0172, + 0x0174, 0x0174, 0x0176, 0x0176, 0x0178, 0x0179, 0x017B, 0x017B, + 0x017D, 0x017D, 0x0181, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187, + 0x0189, 0x018B, 0x018E, 0x0191, 0x0193, 0x0194, 0x0196, 0x0198, + 0x019C, 0x019D, 0x019F, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, + 0x01A6, 0x01A7, 0x01A9, 0x01A9, 0x01AC, 0x01AC, 0x01AE, 0x01AF, + 0x01B1, 0x01B3, 0x01B5, 0x01B5, 0x01B7, 0x01B8, 0x01BC, 0x01BC, + 0x01C4, 0x01C5, 0x01C7, 0x01C8, 0x01CA, 0x01CB, 0x01CD, 0x01CD, + 0x01CF, 0x01CF, 0x01D1, 0x01D1, 0x01D3, 0x01D3, 0x01D5, 0x01D5, + 0x01D7, 0x01D7, 0x01D9, 0x01D9, 0x01DB, 0x01DB, 0x01DE, 0x01DE, + 0x01E0, 0x01E0, 0x01E2, 0x01E2, 0x01E4, 0x01E4, 0x01E6, 0x01E6, + 0x01E8, 0x01E8, 0x01EA, 0x01EA, 0x01EC, 0x01EC, 0x01EE, 0x01EE, + 0x01F1, 0x01F2, 0x01F4, 0x01F4, 0x01F6, 0x01F8, 0x01FA, 0x01FA, + 0x01FC, 0x01FC, 0x01FE, 0x01FE, 0x0200, 0x0200, 0x0202, 0x0202, + 0x0204, 0x0204, 0x0206, 0x0206, 0x0208, 0x0208, 0x020A, 0x020A, + 0x020C, 0x020C, 0x020E, 0x020E, 0x0210, 0x0210, 0x0212, 0x0212, + 0x0214, 0x0214, 0x0216, 0x0216, 0x0218, 0x0218, 0x021A, 0x021A, + 0x021C, 0x021C, 0x021E, 0x021E, 0x0220, 0x0220, 0x0222, 0x0222, + 0x0224, 0x0224, 0x0226, 0x0226, 0x0228, 0x0228, 0x022A, 0x022A, + 0x022C, 0x022C, 0x022E, 0x022E, 0x0230, 0x0230, 0x0232, 0x0232, + 0x023A, 0x023B, 0x023D, 0x023E, 0x0241, 0x0241, 0x0243, 0x0246, + 0x0248, 0x0248, 0x024A, 0x024A, 0x024C, 0x024C, 0x024E, 0x024E, + 0x0370, 0x0370, 0x0372, 0x0372, 0x0376, 0x0376, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x038F, + 0x0391, 0x03A1, 0x03A3, 0x03AB, 0x03CF, 0x03CF, 0x03D8, 0x03D8, + 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, 0x03E0, 0x03E0, + 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, 0x03E8, 0x03E8, + 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, 0x03F4, 0x03F4, + 0x03F7, 0x03F7, 0x03F9, 0x03FA, 0x03FD, 0x042F, 0x0460, 0x0460, + 0x0462, 0x0462, 0x0464, 0x0464, 0x0466, 0x0466, 0x0468, 0x0468, + 0x046A, 0x046A, 0x046C, 0x046C, 0x046E, 0x046E, 0x0470, 0x0470, + 0x0472, 0x0472, 0x0474, 0x0474, 0x0476, 0x0476, 0x0478, 0x0478, + 0x047A, 0x047A, 0x047C, 0x047C, 0x047E, 0x047E, 0x0480, 0x0480, + 0x048A, 0x048A, 0x048C, 0x048C, 0x048E, 0x048E, 0x0490, 0x0490, + 0x0492, 0x0492, 0x0494, 0x0494, 0x0496, 0x0496, 0x0498, 0x0498, + 0x049A, 0x049A, 0x049C, 0x049C, 0x049E, 0x049E, 0x04A0, 0x04A0, + 0x04A2, 0x04A2, 0x04A4, 0x04A4, 0x04A6, 0x04A6, 0x04A8, 0x04A8, + 0x04AA, 0x04AA, 0x04AC, 0x04AC, 0x04AE, 0x04AE, 0x04B0, 0x04B0, + 0x04B2, 0x04B2, 0x04B4, 0x04B4, 0x04B6, 0x04B6, 0x04B8, 0x04B8, + 0x04BA, 0x04BA, 0x04BC, 0x04BC, 0x04BE, 0x04BE, 0x04C0, 0x04C1, + 0x04C3, 0x04C3, 0x04C5, 0x04C5, 0x04C7, 0x04C7, 0x04C9, 0x04C9, + 0x04CB, 0x04CB, 0x04CD, 0x04CD, 0x04D0, 0x04D0, 0x04D2, 0x04D2, + 0x04D4, 0x04D4, 0x04D6, 0x04D6, 0x04D8, 0x04D8, 0x04DA, 0x04DA, + 0x04DC, 0x04DC, 0x04DE, 0x04DE, 0x04E0, 0x04E0, 0x04E2, 0x04E2, + 0x04E4, 0x04E4, 0x04E6, 0x04E6, 0x04E8, 0x04E8, 0x04EA, 0x04EA, + 0x04EC, 0x04EC, 0x04EE, 0x04EE, 0x04F0, 0x04F0, 0x04F2, 0x04F2, + 0x04F4, 0x04F4, 0x04F6, 0x04F6, 0x04F8, 0x04F8, 0x04FA, 0x04FA, + 0x04FC, 0x04FC, 0x04FE, 0x04FE, 0x0500, 0x0500, 0x0502, 0x0502, + 0x0504, 0x0504, 0x0506, 0x0506, 0x0508, 0x0508, 0x050A, 0x050A, + 0x050C, 0x050C, 0x050E, 0x050E, 0x0510, 0x0510, 0x0512, 0x0512, + 0x0514, 0x0514, 0x0516, 0x0516, 0x0518, 0x0518, 0x051A, 0x051A, + 0x051C, 0x051C, 0x051E, 0x051E, 0x0520, 0x0520, 0x0522, 0x0522, + 0x0524, 0x0524, 0x0526, 0x0526, 0x0528, 0x0528, 0x052A, 0x052A, + 0x052C, 0x052C, 0x052E, 0x052E, 0x0531, 0x0556, 0x10A0, 0x10C5, + 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x13A0, 0x13F5, 0x1C90, 0x1CBA, + 0x1CBD, 0x1CBF, 0x1E00, 0x1E00, 0x1E02, 0x1E02, 0x1E04, 0x1E04, + 0x1E06, 0x1E06, 0x1E08, 0x1E08, 0x1E0A, 0x1E0A, 0x1E0C, 0x1E0C, + 0x1E0E, 0x1E0E, 0x1E10, 0x1E10, 0x1E12, 0x1E12, 0x1E14, 0x1E14, + 0x1E16, 0x1E16, 0x1E18, 0x1E18, 0x1E1A, 0x1E1A, 0x1E1C, 0x1E1C, + 0x1E1E, 0x1E1E, 0x1E20, 0x1E20, 0x1E22, 0x1E22, 0x1E24, 0x1E24, + 0x1E26, 0x1E26, 0x1E28, 0x1E28, 0x1E2A, 0x1E2A, 0x1E2C, 0x1E2C, + 0x1E2E, 0x1E2E, 0x1E30, 0x1E30, 0x1E32, 0x1E32, 0x1E34, 0x1E34, + 0x1E36, 0x1E36, 0x1E38, 0x1E38, 0x1E3A, 0x1E3A, 0x1E3C, 0x1E3C, + 0x1E3E, 0x1E3E, 0x1E40, 0x1E40, 0x1E42, 0x1E42, 0x1E44, 0x1E44, + 0x1E46, 0x1E46, 0x1E48, 0x1E48, 0x1E4A, 0x1E4A, 0x1E4C, 0x1E4C, + 0x1E4E, 0x1E4E, 0x1E50, 0x1E50, 0x1E52, 0x1E52, 0x1E54, 0x1E54, + 0x1E56, 0x1E56, 0x1E58, 0x1E58, 0x1E5A, 0x1E5A, 0x1E5C, 0x1E5C, + 0x1E5E, 0x1E5E, 0x1E60, 0x1E60, 0x1E62, 0x1E62, 0x1E64, 0x1E64, + 0x1E66, 0x1E66, 0x1E68, 0x1E68, 0x1E6A, 0x1E6A, 0x1E6C, 0x1E6C, + 0x1E6E, 0x1E6E, 0x1E70, 0x1E70, 0x1E72, 0x1E72, 0x1E74, 0x1E74, + 0x1E76, 0x1E76, 0x1E78, 0x1E78, 0x1E7A, 0x1E7A, 0x1E7C, 0x1E7C, + 0x1E7E, 0x1E7E, 0x1E80, 0x1E80, 0x1E82, 0x1E82, 0x1E84, 0x1E84, + 0x1E86, 0x1E86, 0x1E88, 0x1E88, 0x1E8A, 0x1E8A, 0x1E8C, 0x1E8C, + 0x1E8E, 0x1E8E, 0x1E90, 0x1E90, 0x1E92, 0x1E92, 0x1E94, 0x1E94, + 0x1E9E, 0x1E9E, 0x1EA0, 0x1EA0, 0x1EA2, 0x1EA2, 0x1EA4, 0x1EA4, + 0x1EA6, 0x1EA6, 0x1EA8, 0x1EA8, 0x1EAA, 0x1EAA, 0x1EAC, 0x1EAC, + 0x1EAE, 0x1EAE, 0x1EB0, 0x1EB0, 0x1EB2, 0x1EB2, 0x1EB4, 0x1EB4, + 0x1EB6, 0x1EB6, 0x1EB8, 0x1EB8, 0x1EBA, 0x1EBA, 0x1EBC, 0x1EBC, + 0x1EBE, 0x1EBE, 0x1EC0, 0x1EC0, 0x1EC2, 0x1EC2, 0x1EC4, 0x1EC4, + 0x1EC6, 0x1EC6, 0x1EC8, 0x1EC8, 0x1ECA, 0x1ECA, 0x1ECC, 0x1ECC, + 0x1ECE, 0x1ECE, 0x1ED0, 0x1ED0, 0x1ED2, 0x1ED2, 0x1ED4, 0x1ED4, + 0x1ED6, 0x1ED6, 0x1ED8, 0x1ED8, 0x1EDA, 0x1EDA, 0x1EDC, 0x1EDC, + 0x1EDE, 0x1EDE, 0x1EE0, 0x1EE0, 0x1EE2, 0x1EE2, 0x1EE4, 0x1EE4, + 0x1EE6, 0x1EE6, 0x1EE8, 0x1EE8, 0x1EEA, 0x1EEA, 0x1EEC, 0x1EEC, + 0x1EEE, 0x1EEE, 0x1EF0, 0x1EF0, 0x1EF2, 0x1EF2, 0x1EF4, 0x1EF4, + 0x1EF6, 0x1EF6, 0x1EF8, 0x1EF8, 0x1EFA, 0x1EFA, 0x1EFC, 0x1EFC, + 0x1EFE, 0x1EFE, 0x1F08, 0x1F0F, 0x1F18, 0x1F1D, 0x1F28, 0x1F2F, + 0x1F38, 0x1F3F, 0x1F48, 0x1F4D, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, + 0x1F5D, 0x1F5D, 0x1F5F, 0x1F5F, 0x1F68, 0x1F6F, 0x1F88, 0x1F8F, + 0x1F98, 0x1F9F, 0x1FA8, 0x1FAF, 0x1FB8, 0x1FBC, 0x1FC8, 0x1FCC, + 0x1FD8, 0x1FDB, 0x1FE8, 0x1FEC, 0x1FF8, 0x1FFC, 0x2126, 0x2126, + 0x212A, 0x212B, 0x2132, 0x2132, 0x2160, 0x216F, 0x2183, 0x2183, + 0x24B6, 0x24CF, 0x2C00, 0x2C2F, 0x2C60, 0x2C60, 0x2C62, 0x2C64, + 0x2C67, 0x2C67, 0x2C69, 0x2C69, 0x2C6B, 0x2C6B, 0x2C6D, 0x2C70, + 0x2C72, 0x2C72, 0x2C75, 0x2C75, 0x2C7E, 0x2C80, 0x2C82, 0x2C82, + 0x2C84, 0x2C84, 0x2C86, 0x2C86, 0x2C88, 0x2C88, 0x2C8A, 0x2C8A, + 0x2C8C, 0x2C8C, 0x2C8E, 0x2C8E, 0x2C90, 0x2C90, 0x2C92, 0x2C92, + 0x2C94, 0x2C94, 0x2C96, 0x2C96, 0x2C98, 0x2C98, 0x2C9A, 0x2C9A, + 0x2C9C, 0x2C9C, 0x2C9E, 0x2C9E, 0x2CA0, 0x2CA0, 0x2CA2, 0x2CA2, + 0x2CA4, 0x2CA4, 0x2CA6, 0x2CA6, 0x2CA8, 0x2CA8, 0x2CAA, 0x2CAA, + 0x2CAC, 0x2CAC, 0x2CAE, 0x2CAE, 0x2CB0, 0x2CB0, 0x2CB2, 0x2CB2, + 0x2CB4, 0x2CB4, 0x2CB6, 0x2CB6, 0x2CB8, 0x2CB8, 0x2CBA, 0x2CBA, + 0x2CBC, 0x2CBC, 0x2CBE, 0x2CBE, 0x2CC0, 0x2CC0, 0x2CC2, 0x2CC2, + 0x2CC4, 0x2CC4, 0x2CC6, 0x2CC6, 0x2CC8, 0x2CC8, 0x2CCA, 0x2CCA, + 0x2CCC, 0x2CCC, 0x2CCE, 0x2CCE, 0x2CD0, 0x2CD0, 0x2CD2, 0x2CD2, + 0x2CD4, 0x2CD4, 0x2CD6, 0x2CD6, 0x2CD8, 0x2CD8, 0x2CDA, 0x2CDA, + 0x2CDC, 0x2CDC, 0x2CDE, 0x2CDE, 0x2CE0, 0x2CE0, 0x2CE2, 0x2CE2, + 0x2CEB, 0x2CEB, 0x2CED, 0x2CED, 0x2CF2, 0x2CF2, 0xA640, 0xA640, + 0xA642, 0xA642, 0xA644, 0xA644, 0xA646, 0xA646, 0xA648, 0xA648, + 0xA64A, 0xA64A, 0xA64C, 0xA64C, 0xA64E, 0xA64E, 0xA650, 0xA650, + 0xA652, 0xA652, 0xA654, 0xA654, 0xA656, 0xA656, 0xA658, 0xA658, + 0xA65A, 0xA65A, 0xA65C, 0xA65C, 0xA65E, 0xA65E, 0xA660, 0xA660, + 0xA662, 0xA662, 0xA664, 0xA664, 0xA666, 0xA666, 0xA668, 0xA668, + 0xA66A, 0xA66A, 0xA66C, 0xA66C, 0xA680, 0xA680, 0xA682, 0xA682, + 0xA684, 0xA684, 0xA686, 0xA686, 0xA688, 0xA688, 0xA68A, 0xA68A, + 0xA68C, 0xA68C, 0xA68E, 0xA68E, 0xA690, 0xA690, 0xA692, 0xA692, + 0xA694, 0xA694, 0xA696, 0xA696, 0xA698, 0xA698, 0xA69A, 0xA69A, + 0xA722, 0xA722, 0xA724, 0xA724, 0xA726, 0xA726, 0xA728, 0xA728, + 0xA72A, 0xA72A, 0xA72C, 0xA72C, 0xA72E, 0xA72E, 0xA732, 0xA732, + 0xA734, 0xA734, 0xA736, 0xA736, 0xA738, 0xA738, 0xA73A, 0xA73A, + 0xA73C, 0xA73C, 0xA73E, 0xA73E, 0xA740, 0xA740, 0xA742, 0xA742, + 0xA744, 0xA744, 0xA746, 0xA746, 0xA748, 0xA748, 0xA74A, 0xA74A, + 0xA74C, 0xA74C, 0xA74E, 0xA74E, 0xA750, 0xA750, 0xA752, 0xA752, + 0xA754, 0xA754, 0xA756, 0xA756, 0xA758, 0xA758, 0xA75A, 0xA75A, + 0xA75C, 0xA75C, 0xA75E, 0xA75E, 0xA760, 0xA760, 0xA762, 0xA762, + 0xA764, 0xA764, 0xA766, 0xA766, 0xA768, 0xA768, 0xA76A, 0xA76A, + 0xA76C, 0xA76C, 0xA76E, 0xA76E, 0xA779, 0xA779, 0xA77B, 0xA77B, + 0xA77D, 0xA77E, 0xA780, 0xA780, 0xA782, 0xA782, 0xA784, 0xA784, + 0xA786, 0xA786, 0xA78B, 0xA78B, 0xA78D, 0xA78D, 0xA790, 0xA790, + 0xA792, 0xA792, 0xA796, 0xA796, 0xA798, 0xA798, 0xA79A, 0xA79A, + 0xA79C, 0xA79C, 0xA79E, 0xA79E, 0xA7A0, 0xA7A0, 0xA7A2, 0xA7A2, + 0xA7A4, 0xA7A4, 0xA7A6, 0xA7A6, 0xA7A8, 0xA7A8, 0xA7AA, 0xA7AE, + 0xA7B0, 0xA7B4, 0xA7B6, 0xA7B6, 0xA7B8, 0xA7B8, 0xA7BA, 0xA7BA, + 0xA7BC, 0xA7BC, 0xA7BE, 0xA7BE, 0xA7C0, 0xA7C0, 0xA7C2, 0xA7C2, + 0xA7C4, 0xA7C7, 0xA7C9, 0xA7C9, 0xA7D0, 0xA7D0, 0xA7D6, 0xA7D6, + 0xA7D8, 0xA7D8, 0xA7F5, 0xA7F5, 0xFF21, 0xFF3A, 0x10400, 0x10427, + 0x104B0, 0x104D3, 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, + 0x10594, 0x10595, 0x10C80, 0x10CB2, 0x118A0, 0x118BF, 0x16E40, 0x16E5F, + 0x1E900, 0x1E921, + // #51 (6757+838): bp=Changes_When_NFKC_Casefolded:CWKCF + 0x0041, 0x005A, 0x00A0, 0x00A0, 0x00A8, 0x00A8, 0x00AA, 0x00AA, + 0x00AD, 0x00AD, 0x00AF, 0x00AF, 0x00B2, 0x00B5, 0x00B8, 0x00BA, + 0x00BC, 0x00BE, 0x00C0, 0x00D6, 0x00D8, 0x00DF, 0x0100, 0x0100, + 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106, 0x0108, 0x0108, + 0x010A, 0x010A, 0x010C, 0x010C, 0x010E, 0x010E, 0x0110, 0x0110, + 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116, 0x0118, 0x0118, + 0x011A, 0x011A, 0x011C, 0x011C, 0x011E, 0x011E, 0x0120, 0x0120, + 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126, 0x0128, 0x0128, + 0x012A, 0x012A, 0x012C, 0x012C, 0x012E, 0x012E, 0x0130, 0x0130, + 0x0132, 0x0134, 0x0136, 0x0136, 0x0139, 0x0139, 0x013B, 0x013B, + 0x013D, 0x013D, 0x013F, 0x0141, 0x0143, 0x0143, 0x0145, 0x0145, + 0x0147, 0x0147, 0x0149, 0x014A, 0x014C, 0x014C, 0x014E, 0x014E, + 0x0150, 0x0150, 0x0152, 0x0152, 0x0154, 0x0154, 0x0156, 0x0156, + 0x0158, 0x0158, 0x015A, 0x015A, 0x015C, 0x015C, 0x015E, 0x015E, + 0x0160, 0x0160, 0x0162, 0x0162, 0x0164, 0x0164, 0x0166, 0x0166, + 0x0168, 0x0168, 0x016A, 0x016A, 0x016C, 0x016C, 0x016E, 0x016E, + 0x0170, 0x0170, 0x0172, 0x0172, 0x0174, 0x0174, 0x0176, 0x0176, + 0x0178, 0x0179, 0x017B, 0x017B, 0x017D, 0x017D, 0x017F, 0x017F, + 0x0181, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187, 0x0189, 0x018B, + 0x018E, 0x0191, 0x0193, 0x0194, 0x0196, 0x0198, 0x019C, 0x019D, + 0x019F, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, 0x01A6, 0x01A7, + 0x01A9, 0x01A9, 0x01AC, 0x01AC, 0x01AE, 0x01AF, 0x01B1, 0x01B3, + 0x01B5, 0x01B5, 0x01B7, 0x01B8, 0x01BC, 0x01BC, 0x01C4, 0x01CD, + 0x01CF, 0x01CF, 0x01D1, 0x01D1, 0x01D3, 0x01D3, 0x01D5, 0x01D5, + 0x01D7, 0x01D7, 0x01D9, 0x01D9, 0x01DB, 0x01DB, 0x01DE, 0x01DE, + 0x01E0, 0x01E0, 0x01E2, 0x01E2, 0x01E4, 0x01E4, 0x01E6, 0x01E6, + 0x01E8, 0x01E8, 0x01EA, 0x01EA, 0x01EC, 0x01EC, 0x01EE, 0x01EE, + 0x01F1, 0x01F4, 0x01F6, 0x01F8, 0x01FA, 0x01FA, 0x01FC, 0x01FC, + 0x01FE, 0x01FE, 0x0200, 0x0200, 0x0202, 0x0202, 0x0204, 0x0204, + 0x0206, 0x0206, 0x0208, 0x0208, 0x020A, 0x020A, 0x020C, 0x020C, + 0x020E, 0x020E, 0x0210, 0x0210, 0x0212, 0x0212, 0x0214, 0x0214, + 0x0216, 0x0216, 0x0218, 0x0218, 0x021A, 0x021A, 0x021C, 0x021C, + 0x021E, 0x021E, 0x0220, 0x0220, 0x0222, 0x0222, 0x0224, 0x0224, + 0x0226, 0x0226, 0x0228, 0x0228, 0x022A, 0x022A, 0x022C, 0x022C, + 0x022E, 0x022E, 0x0230, 0x0230, 0x0232, 0x0232, 0x023A, 0x023B, + 0x023D, 0x023E, 0x0241, 0x0241, 0x0243, 0x0246, 0x0248, 0x0248, + 0x024A, 0x024A, 0x024C, 0x024C, 0x024E, 0x024E, 0x02B0, 0x02B8, + 0x02D8, 0x02DD, 0x02E0, 0x02E4, 0x0340, 0x0341, 0x0343, 0x0345, + 0x034F, 0x034F, 0x0370, 0x0370, 0x0372, 0x0372, 0x0374, 0x0374, + 0x0376, 0x0376, 0x037A, 0x037A, 0x037E, 0x037F, 0x0384, 0x038A, + 0x038C, 0x038C, 0x038E, 0x038F, 0x0391, 0x03A1, 0x03A3, 0x03AB, + 0x03C2, 0x03C2, 0x03CF, 0x03D6, 0x03D8, 0x03D8, 0x03DA, 0x03DA, + 0x03DC, 0x03DC, 0x03DE, 0x03DE, 0x03E0, 0x03E0, 0x03E2, 0x03E2, + 0x03E4, 0x03E4, 0x03E6, 0x03E6, 0x03E8, 0x03E8, 0x03EA, 0x03EA, + 0x03EC, 0x03EC, 0x03EE, 0x03EE, 0x03F0, 0x03F2, 0x03F4, 0x03F5, + 0x03F7, 0x03F7, 0x03F9, 0x03FA, 0x03FD, 0x042F, 0x0460, 0x0460, + 0x0462, 0x0462, 0x0464, 0x0464, 0x0466, 0x0466, 0x0468, 0x0468, + 0x046A, 0x046A, 0x046C, 0x046C, 0x046E, 0x046E, 0x0470, 0x0470, + 0x0472, 0x0472, 0x0474, 0x0474, 0x0476, 0x0476, 0x0478, 0x0478, + 0x047A, 0x047A, 0x047C, 0x047C, 0x047E, 0x047E, 0x0480, 0x0480, + 0x048A, 0x048A, 0x048C, 0x048C, 0x048E, 0x048E, 0x0490, 0x0490, + 0x0492, 0x0492, 0x0494, 0x0494, 0x0496, 0x0496, 0x0498, 0x0498, + 0x049A, 0x049A, 0x049C, 0x049C, 0x049E, 0x049E, 0x04A0, 0x04A0, + 0x04A2, 0x04A2, 0x04A4, 0x04A4, 0x04A6, 0x04A6, 0x04A8, 0x04A8, + 0x04AA, 0x04AA, 0x04AC, 0x04AC, 0x04AE, 0x04AE, 0x04B0, 0x04B0, + 0x04B2, 0x04B2, 0x04B4, 0x04B4, 0x04B6, 0x04B6, 0x04B8, 0x04B8, + 0x04BA, 0x04BA, 0x04BC, 0x04BC, 0x04BE, 0x04BE, 0x04C0, 0x04C1, + 0x04C3, 0x04C3, 0x04C5, 0x04C5, 0x04C7, 0x04C7, 0x04C9, 0x04C9, + 0x04CB, 0x04CB, 0x04CD, 0x04CD, 0x04D0, 0x04D0, 0x04D2, 0x04D2, + 0x04D4, 0x04D4, 0x04D6, 0x04D6, 0x04D8, 0x04D8, 0x04DA, 0x04DA, + 0x04DC, 0x04DC, 0x04DE, 0x04DE, 0x04E0, 0x04E0, 0x04E2, 0x04E2, + 0x04E4, 0x04E4, 0x04E6, 0x04E6, 0x04E8, 0x04E8, 0x04EA, 0x04EA, + 0x04EC, 0x04EC, 0x04EE, 0x04EE, 0x04F0, 0x04F0, 0x04F2, 0x04F2, + 0x04F4, 0x04F4, 0x04F6, 0x04F6, 0x04F8, 0x04F8, 0x04FA, 0x04FA, + 0x04FC, 0x04FC, 0x04FE, 0x04FE, 0x0500, 0x0500, 0x0502, 0x0502, + 0x0504, 0x0504, 0x0506, 0x0506, 0x0508, 0x0508, 0x050A, 0x050A, + 0x050C, 0x050C, 0x050E, 0x050E, 0x0510, 0x0510, 0x0512, 0x0512, + 0x0514, 0x0514, 0x0516, 0x0516, 0x0518, 0x0518, 0x051A, 0x051A, + 0x051C, 0x051C, 0x051E, 0x051E, 0x0520, 0x0520, 0x0522, 0x0522, + 0x0524, 0x0524, 0x0526, 0x0526, 0x0528, 0x0528, 0x052A, 0x052A, + 0x052C, 0x052C, 0x052E, 0x052E, 0x0531, 0x0556, 0x0587, 0x0587, + 0x061C, 0x061C, 0x0675, 0x0678, 0x0958, 0x095F, 0x09DC, 0x09DD, + 0x09DF, 0x09DF, 0x0A33, 0x0A33, 0x0A36, 0x0A36, 0x0A59, 0x0A5B, + 0x0A5E, 0x0A5E, 0x0B5C, 0x0B5D, 0x0E33, 0x0E33, 0x0EB3, 0x0EB3, + 0x0EDC, 0x0EDD, 0x0F0C, 0x0F0C, 0x0F43, 0x0F43, 0x0F4D, 0x0F4D, + 0x0F52, 0x0F52, 0x0F57, 0x0F57, 0x0F5C, 0x0F5C, 0x0F69, 0x0F69, + 0x0F73, 0x0F73, 0x0F75, 0x0F79, 0x0F81, 0x0F81, 0x0F93, 0x0F93, + 0x0F9D, 0x0F9D, 0x0FA2, 0x0FA2, 0x0FA7, 0x0FA7, 0x0FAC, 0x0FAC, + 0x0FB9, 0x0FB9, 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, + 0x10FC, 0x10FC, 0x115F, 0x1160, 0x13F8, 0x13FD, 0x17B4, 0x17B5, + 0x180B, 0x180F, 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, + 0x1D2C, 0x1D2E, 0x1D30, 0x1D3A, 0x1D3C, 0x1D4D, 0x1D4F, 0x1D6A, + 0x1D78, 0x1D78, 0x1D9B, 0x1DBF, 0x1E00, 0x1E00, 0x1E02, 0x1E02, + 0x1E04, 0x1E04, 0x1E06, 0x1E06, 0x1E08, 0x1E08, 0x1E0A, 0x1E0A, + 0x1E0C, 0x1E0C, 0x1E0E, 0x1E0E, 0x1E10, 0x1E10, 0x1E12, 0x1E12, + 0x1E14, 0x1E14, 0x1E16, 0x1E16, 0x1E18, 0x1E18, 0x1E1A, 0x1E1A, + 0x1E1C, 0x1E1C, 0x1E1E, 0x1E1E, 0x1E20, 0x1E20, 0x1E22, 0x1E22, + 0x1E24, 0x1E24, 0x1E26, 0x1E26, 0x1E28, 0x1E28, 0x1E2A, 0x1E2A, + 0x1E2C, 0x1E2C, 0x1E2E, 0x1E2E, 0x1E30, 0x1E30, 0x1E32, 0x1E32, + 0x1E34, 0x1E34, 0x1E36, 0x1E36, 0x1E38, 0x1E38, 0x1E3A, 0x1E3A, + 0x1E3C, 0x1E3C, 0x1E3E, 0x1E3E, 0x1E40, 0x1E40, 0x1E42, 0x1E42, + 0x1E44, 0x1E44, 0x1E46, 0x1E46, 0x1E48, 0x1E48, 0x1E4A, 0x1E4A, + 0x1E4C, 0x1E4C, 0x1E4E, 0x1E4E, 0x1E50, 0x1E50, 0x1E52, 0x1E52, + 0x1E54, 0x1E54, 0x1E56, 0x1E56, 0x1E58, 0x1E58, 0x1E5A, 0x1E5A, + 0x1E5C, 0x1E5C, 0x1E5E, 0x1E5E, 0x1E60, 0x1E60, 0x1E62, 0x1E62, + 0x1E64, 0x1E64, 0x1E66, 0x1E66, 0x1E68, 0x1E68, 0x1E6A, 0x1E6A, + 0x1E6C, 0x1E6C, 0x1E6E, 0x1E6E, 0x1E70, 0x1E70, 0x1E72, 0x1E72, + 0x1E74, 0x1E74, 0x1E76, 0x1E76, 0x1E78, 0x1E78, 0x1E7A, 0x1E7A, + 0x1E7C, 0x1E7C, 0x1E7E, 0x1E7E, 0x1E80, 0x1E80, 0x1E82, 0x1E82, + 0x1E84, 0x1E84, 0x1E86, 0x1E86, 0x1E88, 0x1E88, 0x1E8A, 0x1E8A, + 0x1E8C, 0x1E8C, 0x1E8E, 0x1E8E, 0x1E90, 0x1E90, 0x1E92, 0x1E92, + 0x1E94, 0x1E94, 0x1E9A, 0x1E9B, 0x1E9E, 0x1E9E, 0x1EA0, 0x1EA0, + 0x1EA2, 0x1EA2, 0x1EA4, 0x1EA4, 0x1EA6, 0x1EA6, 0x1EA8, 0x1EA8, + 0x1EAA, 0x1EAA, 0x1EAC, 0x1EAC, 0x1EAE, 0x1EAE, 0x1EB0, 0x1EB0, + 0x1EB2, 0x1EB2, 0x1EB4, 0x1EB4, 0x1EB6, 0x1EB6, 0x1EB8, 0x1EB8, + 0x1EBA, 0x1EBA, 0x1EBC, 0x1EBC, 0x1EBE, 0x1EBE, 0x1EC0, 0x1EC0, + 0x1EC2, 0x1EC2, 0x1EC4, 0x1EC4, 0x1EC6, 0x1EC6, 0x1EC8, 0x1EC8, + 0x1ECA, 0x1ECA, 0x1ECC, 0x1ECC, 0x1ECE, 0x1ECE, 0x1ED0, 0x1ED0, + 0x1ED2, 0x1ED2, 0x1ED4, 0x1ED4, 0x1ED6, 0x1ED6, 0x1ED8, 0x1ED8, + 0x1EDA, 0x1EDA, 0x1EDC, 0x1EDC, 0x1EDE, 0x1EDE, 0x1EE0, 0x1EE0, + 0x1EE2, 0x1EE2, 0x1EE4, 0x1EE4, 0x1EE6, 0x1EE6, 0x1EE8, 0x1EE8, + 0x1EEA, 0x1EEA, 0x1EEC, 0x1EEC, 0x1EEE, 0x1EEE, 0x1EF0, 0x1EF0, + 0x1EF2, 0x1EF2, 0x1EF4, 0x1EF4, 0x1EF6, 0x1EF6, 0x1EF8, 0x1EF8, + 0x1EFA, 0x1EFA, 0x1EFC, 0x1EFC, 0x1EFE, 0x1EFE, 0x1F08, 0x1F0F, + 0x1F18, 0x1F1D, 0x1F28, 0x1F2F, 0x1F38, 0x1F3F, 0x1F48, 0x1F4D, + 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F5F, + 0x1F68, 0x1F6F, 0x1F71, 0x1F71, 0x1F73, 0x1F73, 0x1F75, 0x1F75, + 0x1F77, 0x1F77, 0x1F79, 0x1F79, 0x1F7B, 0x1F7B, 0x1F7D, 0x1F7D, + 0x1F80, 0x1FAF, 0x1FB2, 0x1FB4, 0x1FB7, 0x1FC4, 0x1FC7, 0x1FCF, + 0x1FD3, 0x1FD3, 0x1FD8, 0x1FDB, 0x1FDD, 0x1FDF, 0x1FE3, 0x1FE3, + 0x1FE8, 0x1FEF, 0x1FF2, 0x1FF4, 0x1FF7, 0x1FFE, 0x2000, 0x200F, + 0x2011, 0x2011, 0x2017, 0x2017, 0x2024, 0x2026, 0x202A, 0x202F, + 0x2033, 0x2034, 0x2036, 0x2037, 0x203C, 0x203C, 0x203E, 0x203E, + 0x2047, 0x2049, 0x2057, 0x2057, 0x205F, 0x2071, 0x2074, 0x208E, + 0x2090, 0x209C, 0x20A8, 0x20A8, 0x2100, 0x2103, 0x2105, 0x2107, + 0x2109, 0x2113, 0x2115, 0x2116, 0x2119, 0x211D, 0x2120, 0x2122, + 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x212D, + 0x212F, 0x2139, 0x213B, 0x2140, 0x2145, 0x2149, 0x2150, 0x217F, + 0x2183, 0x2183, 0x2189, 0x2189, 0x222C, 0x222D, 0x222F, 0x2230, + 0x2329, 0x232A, 0x2460, 0x24EA, 0x2A0C, 0x2A0C, 0x2A74, 0x2A76, + 0x2ADC, 0x2ADC, 0x2C00, 0x2C2F, 0x2C60, 0x2C60, 0x2C62, 0x2C64, + 0x2C67, 0x2C67, 0x2C69, 0x2C69, 0x2C6B, 0x2C6B, 0x2C6D, 0x2C70, + 0x2C72, 0x2C72, 0x2C75, 0x2C75, 0x2C7C, 0x2C80, 0x2C82, 0x2C82, + 0x2C84, 0x2C84, 0x2C86, 0x2C86, 0x2C88, 0x2C88, 0x2C8A, 0x2C8A, + 0x2C8C, 0x2C8C, 0x2C8E, 0x2C8E, 0x2C90, 0x2C90, 0x2C92, 0x2C92, + 0x2C94, 0x2C94, 0x2C96, 0x2C96, 0x2C98, 0x2C98, 0x2C9A, 0x2C9A, + 0x2C9C, 0x2C9C, 0x2C9E, 0x2C9E, 0x2CA0, 0x2CA0, 0x2CA2, 0x2CA2, + 0x2CA4, 0x2CA4, 0x2CA6, 0x2CA6, 0x2CA8, 0x2CA8, 0x2CAA, 0x2CAA, + 0x2CAC, 0x2CAC, 0x2CAE, 0x2CAE, 0x2CB0, 0x2CB0, 0x2CB2, 0x2CB2, + 0x2CB4, 0x2CB4, 0x2CB6, 0x2CB6, 0x2CB8, 0x2CB8, 0x2CBA, 0x2CBA, + 0x2CBC, 0x2CBC, 0x2CBE, 0x2CBE, 0x2CC0, 0x2CC0, 0x2CC2, 0x2CC2, + 0x2CC4, 0x2CC4, 0x2CC6, 0x2CC6, 0x2CC8, 0x2CC8, 0x2CCA, 0x2CCA, + 0x2CCC, 0x2CCC, 0x2CCE, 0x2CCE, 0x2CD0, 0x2CD0, 0x2CD2, 0x2CD2, + 0x2CD4, 0x2CD4, 0x2CD6, 0x2CD6, 0x2CD8, 0x2CD8, 0x2CDA, 0x2CDA, + 0x2CDC, 0x2CDC, 0x2CDE, 0x2CDE, 0x2CE0, 0x2CE0, 0x2CE2, 0x2CE2, + 0x2CEB, 0x2CEB, 0x2CED, 0x2CED, 0x2CF2, 0x2CF2, 0x2D6F, 0x2D6F, + 0x2E9F, 0x2E9F, 0x2EF3, 0x2EF3, 0x2F00, 0x2FD5, 0x3000, 0x3000, + 0x3036, 0x3036, 0x3038, 0x303A, 0x309B, 0x309C, 0x309F, 0x309F, + 0x30FF, 0x30FF, 0x3131, 0x318E, 0x3192, 0x319F, 0x3200, 0x321E, + 0x3220, 0x3247, 0x3250, 0x327E, 0x3280, 0x33FF, 0xA640, 0xA640, + 0xA642, 0xA642, 0xA644, 0xA644, 0xA646, 0xA646, 0xA648, 0xA648, + 0xA64A, 0xA64A, 0xA64C, 0xA64C, 0xA64E, 0xA64E, 0xA650, 0xA650, + 0xA652, 0xA652, 0xA654, 0xA654, 0xA656, 0xA656, 0xA658, 0xA658, + 0xA65A, 0xA65A, 0xA65C, 0xA65C, 0xA65E, 0xA65E, 0xA660, 0xA660, + 0xA662, 0xA662, 0xA664, 0xA664, 0xA666, 0xA666, 0xA668, 0xA668, + 0xA66A, 0xA66A, 0xA66C, 0xA66C, 0xA680, 0xA680, 0xA682, 0xA682, + 0xA684, 0xA684, 0xA686, 0xA686, 0xA688, 0xA688, 0xA68A, 0xA68A, + 0xA68C, 0xA68C, 0xA68E, 0xA68E, 0xA690, 0xA690, 0xA692, 0xA692, + 0xA694, 0xA694, 0xA696, 0xA696, 0xA698, 0xA698, 0xA69A, 0xA69A, + 0xA69C, 0xA69D, 0xA722, 0xA722, 0xA724, 0xA724, 0xA726, 0xA726, + 0xA728, 0xA728, 0xA72A, 0xA72A, 0xA72C, 0xA72C, 0xA72E, 0xA72E, + 0xA732, 0xA732, 0xA734, 0xA734, 0xA736, 0xA736, 0xA738, 0xA738, + 0xA73A, 0xA73A, 0xA73C, 0xA73C, 0xA73E, 0xA73E, 0xA740, 0xA740, + 0xA742, 0xA742, 0xA744, 0xA744, 0xA746, 0xA746, 0xA748, 0xA748, + 0xA74A, 0xA74A, 0xA74C, 0xA74C, 0xA74E, 0xA74E, 0xA750, 0xA750, + 0xA752, 0xA752, 0xA754, 0xA754, 0xA756, 0xA756, 0xA758, 0xA758, + 0xA75A, 0xA75A, 0xA75C, 0xA75C, 0xA75E, 0xA75E, 0xA760, 0xA760, + 0xA762, 0xA762, 0xA764, 0xA764, 0xA766, 0xA766, 0xA768, 0xA768, + 0xA76A, 0xA76A, 0xA76C, 0xA76C, 0xA76E, 0xA76E, 0xA770, 0xA770, + 0xA779, 0xA779, 0xA77B, 0xA77B, 0xA77D, 0xA77E, 0xA780, 0xA780, + 0xA782, 0xA782, 0xA784, 0xA784, 0xA786, 0xA786, 0xA78B, 0xA78B, + 0xA78D, 0xA78D, 0xA790, 0xA790, 0xA792, 0xA792, 0xA796, 0xA796, + 0xA798, 0xA798, 0xA79A, 0xA79A, 0xA79C, 0xA79C, 0xA79E, 0xA79E, + 0xA7A0, 0xA7A0, 0xA7A2, 0xA7A2, 0xA7A4, 0xA7A4, 0xA7A6, 0xA7A6, + 0xA7A8, 0xA7A8, 0xA7AA, 0xA7AE, 0xA7B0, 0xA7B4, 0xA7B6, 0xA7B6, + 0xA7B8, 0xA7B8, 0xA7BA, 0xA7BA, 0xA7BC, 0xA7BC, 0xA7BE, 0xA7BE, + 0xA7C0, 0xA7C0, 0xA7C2, 0xA7C2, 0xA7C4, 0xA7C7, 0xA7C9, 0xA7C9, + 0xA7D0, 0xA7D0, 0xA7D6, 0xA7D6, 0xA7D8, 0xA7D8, 0xA7F2, 0xA7F5, + 0xA7F8, 0xA7F9, 0xAB5C, 0xAB5F, 0xAB69, 0xAB69, 0xAB70, 0xABBF, + 0xF900, 0xFA0D, 0xFA10, 0xFA10, 0xFA12, 0xFA12, 0xFA15, 0xFA1E, + 0xFA20, 0xFA20, 0xFA22, 0xFA22, 0xFA25, 0xFA26, 0xFA2A, 0xFA6D, + 0xFA70, 0xFAD9, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFB1D, 0xFB1D, + 0xFB1F, 0xFB36, 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, + 0xFB43, 0xFB44, 0xFB46, 0xFBB1, 0xFBD3, 0xFD3D, 0xFD50, 0xFD8F, + 0xFD92, 0xFDC7, 0xFDF0, 0xFDFC, 0xFE00, 0xFE19, 0xFE30, 0xFE44, + 0xFE47, 0xFE52, 0xFE54, 0xFE66, 0xFE68, 0xFE6B, 0xFE70, 0xFE72, + 0xFE74, 0xFE74, 0xFE76, 0xFEFC, 0xFEFF, 0xFEFF, 0xFF01, 0xFFBE, + 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, + 0xFFE0, 0xFFE6, 0xFFE8, 0xFFEE, 0xFFF0, 0xFFF8, 0x10400, 0x10427, + 0x104B0, 0x104D3, 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, + 0x10594, 0x10595, 0x10781, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, + 0x10C80, 0x10CB2, 0x118A0, 0x118BF, 0x16E40, 0x16E5F, 0x1BCA0, 0x1BCA3, + 0x1D15E, 0x1D164, 0x1D173, 0x1D17A, 0x1D1BB, 0x1D1C0, 0x1D400, 0x1D454, + 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, + 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, + 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, + 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, + 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D7CB, 0x1D7CE, 0x1D7FF, + 0x1E900, 0x1E921, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, + 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, + 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, + 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, + 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, + 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, + 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, + 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1F100, 0x1F10A, 0x1F110, 0x1F12E, + 0x1F130, 0x1F14F, 0x1F16A, 0x1F16C, 0x1F190, 0x1F190, 0x1F200, 0x1F202, + 0x1F210, 0x1F23B, 0x1F240, 0x1F248, 0x1F250, 0x1F251, 0x1FBF0, 0x1FBF9, + 0x2F800, 0x2FA1D, 0xE0000, 0xE0FFF, + // #52 (7595+626): bp=Changes_When_Titlecased:CWT + 0x0061, 0x007A, 0x00B5, 0x00B5, 0x00DF, 0x00F6, 0x00F8, 0x00FF, + 0x0101, 0x0101, 0x0103, 0x0103, 0x0105, 0x0105, 0x0107, 0x0107, + 0x0109, 0x0109, 0x010B, 0x010B, 0x010D, 0x010D, 0x010F, 0x010F, + 0x0111, 0x0111, 0x0113, 0x0113, 0x0115, 0x0115, 0x0117, 0x0117, + 0x0119, 0x0119, 0x011B, 0x011B, 0x011D, 0x011D, 0x011F, 0x011F, + 0x0121, 0x0121, 0x0123, 0x0123, 0x0125, 0x0125, 0x0127, 0x0127, + 0x0129, 0x0129, 0x012B, 0x012B, 0x012D, 0x012D, 0x012F, 0x012F, + 0x0131, 0x0131, 0x0133, 0x0133, 0x0135, 0x0135, 0x0137, 0x0137, + 0x013A, 0x013A, 0x013C, 0x013C, 0x013E, 0x013E, 0x0140, 0x0140, + 0x0142, 0x0142, 0x0144, 0x0144, 0x0146, 0x0146, 0x0148, 0x0149, + 0x014B, 0x014B, 0x014D, 0x014D, 0x014F, 0x014F, 0x0151, 0x0151, + 0x0153, 0x0153, 0x0155, 0x0155, 0x0157, 0x0157, 0x0159, 0x0159, + 0x015B, 0x015B, 0x015D, 0x015D, 0x015F, 0x015F, 0x0161, 0x0161, + 0x0163, 0x0163, 0x0165, 0x0165, 0x0167, 0x0167, 0x0169, 0x0169, + 0x016B, 0x016B, 0x016D, 0x016D, 0x016F, 0x016F, 0x0171, 0x0171, + 0x0173, 0x0173, 0x0175, 0x0175, 0x0177, 0x0177, 0x017A, 0x017A, + 0x017C, 0x017C, 0x017E, 0x0180, 0x0183, 0x0183, 0x0185, 0x0185, + 0x0188, 0x0188, 0x018C, 0x018C, 0x0192, 0x0192, 0x0195, 0x0195, + 0x0199, 0x019A, 0x019E, 0x019E, 0x01A1, 0x01A1, 0x01A3, 0x01A3, + 0x01A5, 0x01A5, 0x01A8, 0x01A8, 0x01AD, 0x01AD, 0x01B0, 0x01B0, + 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x01B9, 0x01B9, 0x01BD, 0x01BD, + 0x01BF, 0x01BF, 0x01C4, 0x01C4, 0x01C6, 0x01C7, 0x01C9, 0x01CA, + 0x01CC, 0x01CC, 0x01CE, 0x01CE, 0x01D0, 0x01D0, 0x01D2, 0x01D2, + 0x01D4, 0x01D4, 0x01D6, 0x01D6, 0x01D8, 0x01D8, 0x01DA, 0x01DA, + 0x01DC, 0x01DD, 0x01DF, 0x01DF, 0x01E1, 0x01E1, 0x01E3, 0x01E3, + 0x01E5, 0x01E5, 0x01E7, 0x01E7, 0x01E9, 0x01E9, 0x01EB, 0x01EB, + 0x01ED, 0x01ED, 0x01EF, 0x01F1, 0x01F3, 0x01F3, 0x01F5, 0x01F5, + 0x01F9, 0x01F9, 0x01FB, 0x01FB, 0x01FD, 0x01FD, 0x01FF, 0x01FF, + 0x0201, 0x0201, 0x0203, 0x0203, 0x0205, 0x0205, 0x0207, 0x0207, + 0x0209, 0x0209, 0x020B, 0x020B, 0x020D, 0x020D, 0x020F, 0x020F, + 0x0211, 0x0211, 0x0213, 0x0213, 0x0215, 0x0215, 0x0217, 0x0217, + 0x0219, 0x0219, 0x021B, 0x021B, 0x021D, 0x021D, 0x021F, 0x021F, + 0x0223, 0x0223, 0x0225, 0x0225, 0x0227, 0x0227, 0x0229, 0x0229, + 0x022B, 0x022B, 0x022D, 0x022D, 0x022F, 0x022F, 0x0231, 0x0231, + 0x0233, 0x0233, 0x023C, 0x023C, 0x023F, 0x0240, 0x0242, 0x0242, + 0x0247, 0x0247, 0x0249, 0x0249, 0x024B, 0x024B, 0x024D, 0x024D, + 0x024F, 0x0254, 0x0256, 0x0257, 0x0259, 0x0259, 0x025B, 0x025C, + 0x0260, 0x0261, 0x0263, 0x0263, 0x0265, 0x0266, 0x0268, 0x026C, + 0x026F, 0x026F, 0x0271, 0x0272, 0x0275, 0x0275, 0x027D, 0x027D, + 0x0280, 0x0280, 0x0282, 0x0283, 0x0287, 0x028C, 0x0292, 0x0292, + 0x029D, 0x029E, 0x0345, 0x0345, 0x0371, 0x0371, 0x0373, 0x0373, + 0x0377, 0x0377, 0x037B, 0x037D, 0x0390, 0x0390, 0x03AC, 0x03CE, + 0x03D0, 0x03D1, 0x03D5, 0x03D7, 0x03D9, 0x03D9, 0x03DB, 0x03DB, + 0x03DD, 0x03DD, 0x03DF, 0x03DF, 0x03E1, 0x03E1, 0x03E3, 0x03E3, + 0x03E5, 0x03E5, 0x03E7, 0x03E7, 0x03E9, 0x03E9, 0x03EB, 0x03EB, + 0x03ED, 0x03ED, 0x03EF, 0x03F3, 0x03F5, 0x03F5, 0x03F8, 0x03F8, + 0x03FB, 0x03FB, 0x0430, 0x045F, 0x0461, 0x0461, 0x0463, 0x0463, + 0x0465, 0x0465, 0x0467, 0x0467, 0x0469, 0x0469, 0x046B, 0x046B, + 0x046D, 0x046D, 0x046F, 0x046F, 0x0471, 0x0471, 0x0473, 0x0473, + 0x0475, 0x0475, 0x0477, 0x0477, 0x0479, 0x0479, 0x047B, 0x047B, + 0x047D, 0x047D, 0x047F, 0x047F, 0x0481, 0x0481, 0x048B, 0x048B, + 0x048D, 0x048D, 0x048F, 0x048F, 0x0491, 0x0491, 0x0493, 0x0493, + 0x0495, 0x0495, 0x0497, 0x0497, 0x0499, 0x0499, 0x049B, 0x049B, + 0x049D, 0x049D, 0x049F, 0x049F, 0x04A1, 0x04A1, 0x04A3, 0x04A3, + 0x04A5, 0x04A5, 0x04A7, 0x04A7, 0x04A9, 0x04A9, 0x04AB, 0x04AB, + 0x04AD, 0x04AD, 0x04AF, 0x04AF, 0x04B1, 0x04B1, 0x04B3, 0x04B3, + 0x04B5, 0x04B5, 0x04B7, 0x04B7, 0x04B9, 0x04B9, 0x04BB, 0x04BB, + 0x04BD, 0x04BD, 0x04BF, 0x04BF, 0x04C2, 0x04C2, 0x04C4, 0x04C4, + 0x04C6, 0x04C6, 0x04C8, 0x04C8, 0x04CA, 0x04CA, 0x04CC, 0x04CC, + 0x04CE, 0x04CF, 0x04D1, 0x04D1, 0x04D3, 0x04D3, 0x04D5, 0x04D5, + 0x04D7, 0x04D7, 0x04D9, 0x04D9, 0x04DB, 0x04DB, 0x04DD, 0x04DD, + 0x04DF, 0x04DF, 0x04E1, 0x04E1, 0x04E3, 0x04E3, 0x04E5, 0x04E5, + 0x04E7, 0x04E7, 0x04E9, 0x04E9, 0x04EB, 0x04EB, 0x04ED, 0x04ED, + 0x04EF, 0x04EF, 0x04F1, 0x04F1, 0x04F3, 0x04F3, 0x04F5, 0x04F5, + 0x04F7, 0x04F7, 0x04F9, 0x04F9, 0x04FB, 0x04FB, 0x04FD, 0x04FD, + 0x04FF, 0x04FF, 0x0501, 0x0501, 0x0503, 0x0503, 0x0505, 0x0505, + 0x0507, 0x0507, 0x0509, 0x0509, 0x050B, 0x050B, 0x050D, 0x050D, + 0x050F, 0x050F, 0x0511, 0x0511, 0x0513, 0x0513, 0x0515, 0x0515, + 0x0517, 0x0517, 0x0519, 0x0519, 0x051B, 0x051B, 0x051D, 0x051D, + 0x051F, 0x051F, 0x0521, 0x0521, 0x0523, 0x0523, 0x0525, 0x0525, + 0x0527, 0x0527, 0x0529, 0x0529, 0x052B, 0x052B, 0x052D, 0x052D, + 0x052F, 0x052F, 0x0561, 0x0587, 0x13F8, 0x13FD, 0x1C80, 0x1C88, + 0x1D79, 0x1D79, 0x1D7D, 0x1D7D, 0x1D8E, 0x1D8E, 0x1E01, 0x1E01, + 0x1E03, 0x1E03, 0x1E05, 0x1E05, 0x1E07, 0x1E07, 0x1E09, 0x1E09, + 0x1E0B, 0x1E0B, 0x1E0D, 0x1E0D, 0x1E0F, 0x1E0F, 0x1E11, 0x1E11, + 0x1E13, 0x1E13, 0x1E15, 0x1E15, 0x1E17, 0x1E17, 0x1E19, 0x1E19, + 0x1E1B, 0x1E1B, 0x1E1D, 0x1E1D, 0x1E1F, 0x1E1F, 0x1E21, 0x1E21, + 0x1E23, 0x1E23, 0x1E25, 0x1E25, 0x1E27, 0x1E27, 0x1E29, 0x1E29, + 0x1E2B, 0x1E2B, 0x1E2D, 0x1E2D, 0x1E2F, 0x1E2F, 0x1E31, 0x1E31, + 0x1E33, 0x1E33, 0x1E35, 0x1E35, 0x1E37, 0x1E37, 0x1E39, 0x1E39, + 0x1E3B, 0x1E3B, 0x1E3D, 0x1E3D, 0x1E3F, 0x1E3F, 0x1E41, 0x1E41, + 0x1E43, 0x1E43, 0x1E45, 0x1E45, 0x1E47, 0x1E47, 0x1E49, 0x1E49, + 0x1E4B, 0x1E4B, 0x1E4D, 0x1E4D, 0x1E4F, 0x1E4F, 0x1E51, 0x1E51, + 0x1E53, 0x1E53, 0x1E55, 0x1E55, 0x1E57, 0x1E57, 0x1E59, 0x1E59, + 0x1E5B, 0x1E5B, 0x1E5D, 0x1E5D, 0x1E5F, 0x1E5F, 0x1E61, 0x1E61, + 0x1E63, 0x1E63, 0x1E65, 0x1E65, 0x1E67, 0x1E67, 0x1E69, 0x1E69, + 0x1E6B, 0x1E6B, 0x1E6D, 0x1E6D, 0x1E6F, 0x1E6F, 0x1E71, 0x1E71, + 0x1E73, 0x1E73, 0x1E75, 0x1E75, 0x1E77, 0x1E77, 0x1E79, 0x1E79, + 0x1E7B, 0x1E7B, 0x1E7D, 0x1E7D, 0x1E7F, 0x1E7F, 0x1E81, 0x1E81, + 0x1E83, 0x1E83, 0x1E85, 0x1E85, 0x1E87, 0x1E87, 0x1E89, 0x1E89, + 0x1E8B, 0x1E8B, 0x1E8D, 0x1E8D, 0x1E8F, 0x1E8F, 0x1E91, 0x1E91, + 0x1E93, 0x1E93, 0x1E95, 0x1E9B, 0x1EA1, 0x1EA1, 0x1EA3, 0x1EA3, + 0x1EA5, 0x1EA5, 0x1EA7, 0x1EA7, 0x1EA9, 0x1EA9, 0x1EAB, 0x1EAB, + 0x1EAD, 0x1EAD, 0x1EAF, 0x1EAF, 0x1EB1, 0x1EB1, 0x1EB3, 0x1EB3, + 0x1EB5, 0x1EB5, 0x1EB7, 0x1EB7, 0x1EB9, 0x1EB9, 0x1EBB, 0x1EBB, + 0x1EBD, 0x1EBD, 0x1EBF, 0x1EBF, 0x1EC1, 0x1EC1, 0x1EC3, 0x1EC3, + 0x1EC5, 0x1EC5, 0x1EC7, 0x1EC7, 0x1EC9, 0x1EC9, 0x1ECB, 0x1ECB, + 0x1ECD, 0x1ECD, 0x1ECF, 0x1ECF, 0x1ED1, 0x1ED1, 0x1ED3, 0x1ED3, + 0x1ED5, 0x1ED5, 0x1ED7, 0x1ED7, 0x1ED9, 0x1ED9, 0x1EDB, 0x1EDB, + 0x1EDD, 0x1EDD, 0x1EDF, 0x1EDF, 0x1EE1, 0x1EE1, 0x1EE3, 0x1EE3, + 0x1EE5, 0x1EE5, 0x1EE7, 0x1EE7, 0x1EE9, 0x1EE9, 0x1EEB, 0x1EEB, + 0x1EED, 0x1EED, 0x1EEF, 0x1EEF, 0x1EF1, 0x1EF1, 0x1EF3, 0x1EF3, + 0x1EF5, 0x1EF5, 0x1EF7, 0x1EF7, 0x1EF9, 0x1EF9, 0x1EFB, 0x1EFB, + 0x1EFD, 0x1EFD, 0x1EFF, 0x1F07, 0x1F10, 0x1F15, 0x1F20, 0x1F27, + 0x1F30, 0x1F37, 0x1F40, 0x1F45, 0x1F50, 0x1F57, 0x1F60, 0x1F67, + 0x1F70, 0x1F7D, 0x1F80, 0x1F87, 0x1F90, 0x1F97, 0x1FA0, 0x1FA7, + 0x1FB0, 0x1FB4, 0x1FB6, 0x1FB7, 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, + 0x1FC6, 0x1FC7, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FD7, 0x1FE0, 0x1FE7, + 0x1FF2, 0x1FF4, 0x1FF6, 0x1FF7, 0x214E, 0x214E, 0x2170, 0x217F, + 0x2184, 0x2184, 0x24D0, 0x24E9, 0x2C30, 0x2C5F, 0x2C61, 0x2C61, + 0x2C65, 0x2C66, 0x2C68, 0x2C68, 0x2C6A, 0x2C6A, 0x2C6C, 0x2C6C, + 0x2C73, 0x2C73, 0x2C76, 0x2C76, 0x2C81, 0x2C81, 0x2C83, 0x2C83, + 0x2C85, 0x2C85, 0x2C87, 0x2C87, 0x2C89, 0x2C89, 0x2C8B, 0x2C8B, + 0x2C8D, 0x2C8D, 0x2C8F, 0x2C8F, 0x2C91, 0x2C91, 0x2C93, 0x2C93, + 0x2C95, 0x2C95, 0x2C97, 0x2C97, 0x2C99, 0x2C99, 0x2C9B, 0x2C9B, + 0x2C9D, 0x2C9D, 0x2C9F, 0x2C9F, 0x2CA1, 0x2CA1, 0x2CA3, 0x2CA3, + 0x2CA5, 0x2CA5, 0x2CA7, 0x2CA7, 0x2CA9, 0x2CA9, 0x2CAB, 0x2CAB, + 0x2CAD, 0x2CAD, 0x2CAF, 0x2CAF, 0x2CB1, 0x2CB1, 0x2CB3, 0x2CB3, + 0x2CB5, 0x2CB5, 0x2CB7, 0x2CB7, 0x2CB9, 0x2CB9, 0x2CBB, 0x2CBB, + 0x2CBD, 0x2CBD, 0x2CBF, 0x2CBF, 0x2CC1, 0x2CC1, 0x2CC3, 0x2CC3, + 0x2CC5, 0x2CC5, 0x2CC7, 0x2CC7, 0x2CC9, 0x2CC9, 0x2CCB, 0x2CCB, + 0x2CCD, 0x2CCD, 0x2CCF, 0x2CCF, 0x2CD1, 0x2CD1, 0x2CD3, 0x2CD3, + 0x2CD5, 0x2CD5, 0x2CD7, 0x2CD7, 0x2CD9, 0x2CD9, 0x2CDB, 0x2CDB, + 0x2CDD, 0x2CDD, 0x2CDF, 0x2CDF, 0x2CE1, 0x2CE1, 0x2CE3, 0x2CE3, + 0x2CEC, 0x2CEC, 0x2CEE, 0x2CEE, 0x2CF3, 0x2CF3, 0x2D00, 0x2D25, + 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, 0xA641, 0xA641, 0xA643, 0xA643, + 0xA645, 0xA645, 0xA647, 0xA647, 0xA649, 0xA649, 0xA64B, 0xA64B, + 0xA64D, 0xA64D, 0xA64F, 0xA64F, 0xA651, 0xA651, 0xA653, 0xA653, + 0xA655, 0xA655, 0xA657, 0xA657, 0xA659, 0xA659, 0xA65B, 0xA65B, + 0xA65D, 0xA65D, 0xA65F, 0xA65F, 0xA661, 0xA661, 0xA663, 0xA663, + 0xA665, 0xA665, 0xA667, 0xA667, 0xA669, 0xA669, 0xA66B, 0xA66B, + 0xA66D, 0xA66D, 0xA681, 0xA681, 0xA683, 0xA683, 0xA685, 0xA685, + 0xA687, 0xA687, 0xA689, 0xA689, 0xA68B, 0xA68B, 0xA68D, 0xA68D, + 0xA68F, 0xA68F, 0xA691, 0xA691, 0xA693, 0xA693, 0xA695, 0xA695, + 0xA697, 0xA697, 0xA699, 0xA699, 0xA69B, 0xA69B, 0xA723, 0xA723, + 0xA725, 0xA725, 0xA727, 0xA727, 0xA729, 0xA729, 0xA72B, 0xA72B, + 0xA72D, 0xA72D, 0xA72F, 0xA72F, 0xA733, 0xA733, 0xA735, 0xA735, + 0xA737, 0xA737, 0xA739, 0xA739, 0xA73B, 0xA73B, 0xA73D, 0xA73D, + 0xA73F, 0xA73F, 0xA741, 0xA741, 0xA743, 0xA743, 0xA745, 0xA745, + 0xA747, 0xA747, 0xA749, 0xA749, 0xA74B, 0xA74B, 0xA74D, 0xA74D, + 0xA74F, 0xA74F, 0xA751, 0xA751, 0xA753, 0xA753, 0xA755, 0xA755, + 0xA757, 0xA757, 0xA759, 0xA759, 0xA75B, 0xA75B, 0xA75D, 0xA75D, + 0xA75F, 0xA75F, 0xA761, 0xA761, 0xA763, 0xA763, 0xA765, 0xA765, + 0xA767, 0xA767, 0xA769, 0xA769, 0xA76B, 0xA76B, 0xA76D, 0xA76D, + 0xA76F, 0xA76F, 0xA77A, 0xA77A, 0xA77C, 0xA77C, 0xA77F, 0xA77F, + 0xA781, 0xA781, 0xA783, 0xA783, 0xA785, 0xA785, 0xA787, 0xA787, + 0xA78C, 0xA78C, 0xA791, 0xA791, 0xA793, 0xA794, 0xA797, 0xA797, + 0xA799, 0xA799, 0xA79B, 0xA79B, 0xA79D, 0xA79D, 0xA79F, 0xA79F, + 0xA7A1, 0xA7A1, 0xA7A3, 0xA7A3, 0xA7A5, 0xA7A5, 0xA7A7, 0xA7A7, + 0xA7A9, 0xA7A9, 0xA7B5, 0xA7B5, 0xA7B7, 0xA7B7, 0xA7B9, 0xA7B9, + 0xA7BB, 0xA7BB, 0xA7BD, 0xA7BD, 0xA7BF, 0xA7BF, 0xA7C1, 0xA7C1, + 0xA7C3, 0xA7C3, 0xA7C8, 0xA7C8, 0xA7CA, 0xA7CA, 0xA7D1, 0xA7D1, + 0xA7D7, 0xA7D7, 0xA7D9, 0xA7D9, 0xA7F6, 0xA7F6, 0xAB53, 0xAB53, + 0xAB70, 0xABBF, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFF41, 0xFF5A, + 0x10428, 0x1044F, 0x104D8, 0x104FB, 0x10597, 0x105A1, 0x105A3, 0x105B1, + 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10CC0, 0x10CF2, 0x118C0, 0x118DF, + 0x16E60, 0x16E7F, 0x1E922, 0x1E943, + // #53 (8221+627): bp=Changes_When_Uppercased:CWU + 0x0061, 0x007A, 0x00B5, 0x00B5, 0x00DF, 0x00F6, 0x00F8, 0x00FF, + 0x0101, 0x0101, 0x0103, 0x0103, 0x0105, 0x0105, 0x0107, 0x0107, + 0x0109, 0x0109, 0x010B, 0x010B, 0x010D, 0x010D, 0x010F, 0x010F, + 0x0111, 0x0111, 0x0113, 0x0113, 0x0115, 0x0115, 0x0117, 0x0117, + 0x0119, 0x0119, 0x011B, 0x011B, 0x011D, 0x011D, 0x011F, 0x011F, + 0x0121, 0x0121, 0x0123, 0x0123, 0x0125, 0x0125, 0x0127, 0x0127, + 0x0129, 0x0129, 0x012B, 0x012B, 0x012D, 0x012D, 0x012F, 0x012F, + 0x0131, 0x0131, 0x0133, 0x0133, 0x0135, 0x0135, 0x0137, 0x0137, + 0x013A, 0x013A, 0x013C, 0x013C, 0x013E, 0x013E, 0x0140, 0x0140, + 0x0142, 0x0142, 0x0144, 0x0144, 0x0146, 0x0146, 0x0148, 0x0149, + 0x014B, 0x014B, 0x014D, 0x014D, 0x014F, 0x014F, 0x0151, 0x0151, + 0x0153, 0x0153, 0x0155, 0x0155, 0x0157, 0x0157, 0x0159, 0x0159, + 0x015B, 0x015B, 0x015D, 0x015D, 0x015F, 0x015F, 0x0161, 0x0161, + 0x0163, 0x0163, 0x0165, 0x0165, 0x0167, 0x0167, 0x0169, 0x0169, + 0x016B, 0x016B, 0x016D, 0x016D, 0x016F, 0x016F, 0x0171, 0x0171, + 0x0173, 0x0173, 0x0175, 0x0175, 0x0177, 0x0177, 0x017A, 0x017A, + 0x017C, 0x017C, 0x017E, 0x0180, 0x0183, 0x0183, 0x0185, 0x0185, + 0x0188, 0x0188, 0x018C, 0x018C, 0x0192, 0x0192, 0x0195, 0x0195, + 0x0199, 0x019A, 0x019E, 0x019E, 0x01A1, 0x01A1, 0x01A3, 0x01A3, + 0x01A5, 0x01A5, 0x01A8, 0x01A8, 0x01AD, 0x01AD, 0x01B0, 0x01B0, + 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x01B9, 0x01B9, 0x01BD, 0x01BD, + 0x01BF, 0x01BF, 0x01C5, 0x01C6, 0x01C8, 0x01C9, 0x01CB, 0x01CC, + 0x01CE, 0x01CE, 0x01D0, 0x01D0, 0x01D2, 0x01D2, 0x01D4, 0x01D4, + 0x01D6, 0x01D6, 0x01D8, 0x01D8, 0x01DA, 0x01DA, 0x01DC, 0x01DD, + 0x01DF, 0x01DF, 0x01E1, 0x01E1, 0x01E3, 0x01E3, 0x01E5, 0x01E5, + 0x01E7, 0x01E7, 0x01E9, 0x01E9, 0x01EB, 0x01EB, 0x01ED, 0x01ED, + 0x01EF, 0x01F0, 0x01F2, 0x01F3, 0x01F5, 0x01F5, 0x01F9, 0x01F9, + 0x01FB, 0x01FB, 0x01FD, 0x01FD, 0x01FF, 0x01FF, 0x0201, 0x0201, + 0x0203, 0x0203, 0x0205, 0x0205, 0x0207, 0x0207, 0x0209, 0x0209, + 0x020B, 0x020B, 0x020D, 0x020D, 0x020F, 0x020F, 0x0211, 0x0211, + 0x0213, 0x0213, 0x0215, 0x0215, 0x0217, 0x0217, 0x0219, 0x0219, + 0x021B, 0x021B, 0x021D, 0x021D, 0x021F, 0x021F, 0x0223, 0x0223, + 0x0225, 0x0225, 0x0227, 0x0227, 0x0229, 0x0229, 0x022B, 0x022B, + 0x022D, 0x022D, 0x022F, 0x022F, 0x0231, 0x0231, 0x0233, 0x0233, + 0x023C, 0x023C, 0x023F, 0x0240, 0x0242, 0x0242, 0x0247, 0x0247, + 0x0249, 0x0249, 0x024B, 0x024B, 0x024D, 0x024D, 0x024F, 0x0254, + 0x0256, 0x0257, 0x0259, 0x0259, 0x025B, 0x025C, 0x0260, 0x0261, + 0x0263, 0x0263, 0x0265, 0x0266, 0x0268, 0x026C, 0x026F, 0x026F, + 0x0271, 0x0272, 0x0275, 0x0275, 0x027D, 0x027D, 0x0280, 0x0280, + 0x0282, 0x0283, 0x0287, 0x028C, 0x0292, 0x0292, 0x029D, 0x029E, + 0x0345, 0x0345, 0x0371, 0x0371, 0x0373, 0x0373, 0x0377, 0x0377, + 0x037B, 0x037D, 0x0390, 0x0390, 0x03AC, 0x03CE, 0x03D0, 0x03D1, + 0x03D5, 0x03D7, 0x03D9, 0x03D9, 0x03DB, 0x03DB, 0x03DD, 0x03DD, + 0x03DF, 0x03DF, 0x03E1, 0x03E1, 0x03E3, 0x03E3, 0x03E5, 0x03E5, + 0x03E7, 0x03E7, 0x03E9, 0x03E9, 0x03EB, 0x03EB, 0x03ED, 0x03ED, + 0x03EF, 0x03F3, 0x03F5, 0x03F5, 0x03F8, 0x03F8, 0x03FB, 0x03FB, + 0x0430, 0x045F, 0x0461, 0x0461, 0x0463, 0x0463, 0x0465, 0x0465, + 0x0467, 0x0467, 0x0469, 0x0469, 0x046B, 0x046B, 0x046D, 0x046D, + 0x046F, 0x046F, 0x0471, 0x0471, 0x0473, 0x0473, 0x0475, 0x0475, + 0x0477, 0x0477, 0x0479, 0x0479, 0x047B, 0x047B, 0x047D, 0x047D, + 0x047F, 0x047F, 0x0481, 0x0481, 0x048B, 0x048B, 0x048D, 0x048D, + 0x048F, 0x048F, 0x0491, 0x0491, 0x0493, 0x0493, 0x0495, 0x0495, + 0x0497, 0x0497, 0x0499, 0x0499, 0x049B, 0x049B, 0x049D, 0x049D, + 0x049F, 0x049F, 0x04A1, 0x04A1, 0x04A3, 0x04A3, 0x04A5, 0x04A5, + 0x04A7, 0x04A7, 0x04A9, 0x04A9, 0x04AB, 0x04AB, 0x04AD, 0x04AD, + 0x04AF, 0x04AF, 0x04B1, 0x04B1, 0x04B3, 0x04B3, 0x04B5, 0x04B5, + 0x04B7, 0x04B7, 0x04B9, 0x04B9, 0x04BB, 0x04BB, 0x04BD, 0x04BD, + 0x04BF, 0x04BF, 0x04C2, 0x04C2, 0x04C4, 0x04C4, 0x04C6, 0x04C6, + 0x04C8, 0x04C8, 0x04CA, 0x04CA, 0x04CC, 0x04CC, 0x04CE, 0x04CF, + 0x04D1, 0x04D1, 0x04D3, 0x04D3, 0x04D5, 0x04D5, 0x04D7, 0x04D7, + 0x04D9, 0x04D9, 0x04DB, 0x04DB, 0x04DD, 0x04DD, 0x04DF, 0x04DF, + 0x04E1, 0x04E1, 0x04E3, 0x04E3, 0x04E5, 0x04E5, 0x04E7, 0x04E7, + 0x04E9, 0x04E9, 0x04EB, 0x04EB, 0x04ED, 0x04ED, 0x04EF, 0x04EF, + 0x04F1, 0x04F1, 0x04F3, 0x04F3, 0x04F5, 0x04F5, 0x04F7, 0x04F7, + 0x04F9, 0x04F9, 0x04FB, 0x04FB, 0x04FD, 0x04FD, 0x04FF, 0x04FF, + 0x0501, 0x0501, 0x0503, 0x0503, 0x0505, 0x0505, 0x0507, 0x0507, + 0x0509, 0x0509, 0x050B, 0x050B, 0x050D, 0x050D, 0x050F, 0x050F, + 0x0511, 0x0511, 0x0513, 0x0513, 0x0515, 0x0515, 0x0517, 0x0517, + 0x0519, 0x0519, 0x051B, 0x051B, 0x051D, 0x051D, 0x051F, 0x051F, + 0x0521, 0x0521, 0x0523, 0x0523, 0x0525, 0x0525, 0x0527, 0x0527, + 0x0529, 0x0529, 0x052B, 0x052B, 0x052D, 0x052D, 0x052F, 0x052F, + 0x0561, 0x0587, 0x10D0, 0x10FA, 0x10FD, 0x10FF, 0x13F8, 0x13FD, + 0x1C80, 0x1C88, 0x1D79, 0x1D79, 0x1D7D, 0x1D7D, 0x1D8E, 0x1D8E, + 0x1E01, 0x1E01, 0x1E03, 0x1E03, 0x1E05, 0x1E05, 0x1E07, 0x1E07, + 0x1E09, 0x1E09, 0x1E0B, 0x1E0B, 0x1E0D, 0x1E0D, 0x1E0F, 0x1E0F, + 0x1E11, 0x1E11, 0x1E13, 0x1E13, 0x1E15, 0x1E15, 0x1E17, 0x1E17, + 0x1E19, 0x1E19, 0x1E1B, 0x1E1B, 0x1E1D, 0x1E1D, 0x1E1F, 0x1E1F, + 0x1E21, 0x1E21, 0x1E23, 0x1E23, 0x1E25, 0x1E25, 0x1E27, 0x1E27, + 0x1E29, 0x1E29, 0x1E2B, 0x1E2B, 0x1E2D, 0x1E2D, 0x1E2F, 0x1E2F, + 0x1E31, 0x1E31, 0x1E33, 0x1E33, 0x1E35, 0x1E35, 0x1E37, 0x1E37, + 0x1E39, 0x1E39, 0x1E3B, 0x1E3B, 0x1E3D, 0x1E3D, 0x1E3F, 0x1E3F, + 0x1E41, 0x1E41, 0x1E43, 0x1E43, 0x1E45, 0x1E45, 0x1E47, 0x1E47, + 0x1E49, 0x1E49, 0x1E4B, 0x1E4B, 0x1E4D, 0x1E4D, 0x1E4F, 0x1E4F, + 0x1E51, 0x1E51, 0x1E53, 0x1E53, 0x1E55, 0x1E55, 0x1E57, 0x1E57, + 0x1E59, 0x1E59, 0x1E5B, 0x1E5B, 0x1E5D, 0x1E5D, 0x1E5F, 0x1E5F, + 0x1E61, 0x1E61, 0x1E63, 0x1E63, 0x1E65, 0x1E65, 0x1E67, 0x1E67, + 0x1E69, 0x1E69, 0x1E6B, 0x1E6B, 0x1E6D, 0x1E6D, 0x1E6F, 0x1E6F, + 0x1E71, 0x1E71, 0x1E73, 0x1E73, 0x1E75, 0x1E75, 0x1E77, 0x1E77, + 0x1E79, 0x1E79, 0x1E7B, 0x1E7B, 0x1E7D, 0x1E7D, 0x1E7F, 0x1E7F, + 0x1E81, 0x1E81, 0x1E83, 0x1E83, 0x1E85, 0x1E85, 0x1E87, 0x1E87, + 0x1E89, 0x1E89, 0x1E8B, 0x1E8B, 0x1E8D, 0x1E8D, 0x1E8F, 0x1E8F, + 0x1E91, 0x1E91, 0x1E93, 0x1E93, 0x1E95, 0x1E9B, 0x1EA1, 0x1EA1, + 0x1EA3, 0x1EA3, 0x1EA5, 0x1EA5, 0x1EA7, 0x1EA7, 0x1EA9, 0x1EA9, + 0x1EAB, 0x1EAB, 0x1EAD, 0x1EAD, 0x1EAF, 0x1EAF, 0x1EB1, 0x1EB1, + 0x1EB3, 0x1EB3, 0x1EB5, 0x1EB5, 0x1EB7, 0x1EB7, 0x1EB9, 0x1EB9, + 0x1EBB, 0x1EBB, 0x1EBD, 0x1EBD, 0x1EBF, 0x1EBF, 0x1EC1, 0x1EC1, + 0x1EC3, 0x1EC3, 0x1EC5, 0x1EC5, 0x1EC7, 0x1EC7, 0x1EC9, 0x1EC9, + 0x1ECB, 0x1ECB, 0x1ECD, 0x1ECD, 0x1ECF, 0x1ECF, 0x1ED1, 0x1ED1, + 0x1ED3, 0x1ED3, 0x1ED5, 0x1ED5, 0x1ED7, 0x1ED7, 0x1ED9, 0x1ED9, + 0x1EDB, 0x1EDB, 0x1EDD, 0x1EDD, 0x1EDF, 0x1EDF, 0x1EE1, 0x1EE1, + 0x1EE3, 0x1EE3, 0x1EE5, 0x1EE5, 0x1EE7, 0x1EE7, 0x1EE9, 0x1EE9, + 0x1EEB, 0x1EEB, 0x1EED, 0x1EED, 0x1EEF, 0x1EEF, 0x1EF1, 0x1EF1, + 0x1EF3, 0x1EF3, 0x1EF5, 0x1EF5, 0x1EF7, 0x1EF7, 0x1EF9, 0x1EF9, + 0x1EFB, 0x1EFB, 0x1EFD, 0x1EFD, 0x1EFF, 0x1F07, 0x1F10, 0x1F15, + 0x1F20, 0x1F27, 0x1F30, 0x1F37, 0x1F40, 0x1F45, 0x1F50, 0x1F57, + 0x1F60, 0x1F67, 0x1F70, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FB7, + 0x1FBC, 0x1FBC, 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FC7, + 0x1FCC, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FD7, 0x1FE0, 0x1FE7, + 0x1FF2, 0x1FF4, 0x1FF6, 0x1FF7, 0x1FFC, 0x1FFC, 0x214E, 0x214E, + 0x2170, 0x217F, 0x2184, 0x2184, 0x24D0, 0x24E9, 0x2C30, 0x2C5F, + 0x2C61, 0x2C61, 0x2C65, 0x2C66, 0x2C68, 0x2C68, 0x2C6A, 0x2C6A, + 0x2C6C, 0x2C6C, 0x2C73, 0x2C73, 0x2C76, 0x2C76, 0x2C81, 0x2C81, + 0x2C83, 0x2C83, 0x2C85, 0x2C85, 0x2C87, 0x2C87, 0x2C89, 0x2C89, + 0x2C8B, 0x2C8B, 0x2C8D, 0x2C8D, 0x2C8F, 0x2C8F, 0x2C91, 0x2C91, + 0x2C93, 0x2C93, 0x2C95, 0x2C95, 0x2C97, 0x2C97, 0x2C99, 0x2C99, + 0x2C9B, 0x2C9B, 0x2C9D, 0x2C9D, 0x2C9F, 0x2C9F, 0x2CA1, 0x2CA1, + 0x2CA3, 0x2CA3, 0x2CA5, 0x2CA5, 0x2CA7, 0x2CA7, 0x2CA9, 0x2CA9, + 0x2CAB, 0x2CAB, 0x2CAD, 0x2CAD, 0x2CAF, 0x2CAF, 0x2CB1, 0x2CB1, + 0x2CB3, 0x2CB3, 0x2CB5, 0x2CB5, 0x2CB7, 0x2CB7, 0x2CB9, 0x2CB9, + 0x2CBB, 0x2CBB, 0x2CBD, 0x2CBD, 0x2CBF, 0x2CBF, 0x2CC1, 0x2CC1, + 0x2CC3, 0x2CC3, 0x2CC5, 0x2CC5, 0x2CC7, 0x2CC7, 0x2CC9, 0x2CC9, + 0x2CCB, 0x2CCB, 0x2CCD, 0x2CCD, 0x2CCF, 0x2CCF, 0x2CD1, 0x2CD1, + 0x2CD3, 0x2CD3, 0x2CD5, 0x2CD5, 0x2CD7, 0x2CD7, 0x2CD9, 0x2CD9, + 0x2CDB, 0x2CDB, 0x2CDD, 0x2CDD, 0x2CDF, 0x2CDF, 0x2CE1, 0x2CE1, + 0x2CE3, 0x2CE3, 0x2CEC, 0x2CEC, 0x2CEE, 0x2CEE, 0x2CF3, 0x2CF3, + 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, 0xA641, 0xA641, + 0xA643, 0xA643, 0xA645, 0xA645, 0xA647, 0xA647, 0xA649, 0xA649, + 0xA64B, 0xA64B, 0xA64D, 0xA64D, 0xA64F, 0xA64F, 0xA651, 0xA651, + 0xA653, 0xA653, 0xA655, 0xA655, 0xA657, 0xA657, 0xA659, 0xA659, + 0xA65B, 0xA65B, 0xA65D, 0xA65D, 0xA65F, 0xA65F, 0xA661, 0xA661, + 0xA663, 0xA663, 0xA665, 0xA665, 0xA667, 0xA667, 0xA669, 0xA669, + 0xA66B, 0xA66B, 0xA66D, 0xA66D, 0xA681, 0xA681, 0xA683, 0xA683, + 0xA685, 0xA685, 0xA687, 0xA687, 0xA689, 0xA689, 0xA68B, 0xA68B, + 0xA68D, 0xA68D, 0xA68F, 0xA68F, 0xA691, 0xA691, 0xA693, 0xA693, + 0xA695, 0xA695, 0xA697, 0xA697, 0xA699, 0xA699, 0xA69B, 0xA69B, + 0xA723, 0xA723, 0xA725, 0xA725, 0xA727, 0xA727, 0xA729, 0xA729, + 0xA72B, 0xA72B, 0xA72D, 0xA72D, 0xA72F, 0xA72F, 0xA733, 0xA733, + 0xA735, 0xA735, 0xA737, 0xA737, 0xA739, 0xA739, 0xA73B, 0xA73B, + 0xA73D, 0xA73D, 0xA73F, 0xA73F, 0xA741, 0xA741, 0xA743, 0xA743, + 0xA745, 0xA745, 0xA747, 0xA747, 0xA749, 0xA749, 0xA74B, 0xA74B, + 0xA74D, 0xA74D, 0xA74F, 0xA74F, 0xA751, 0xA751, 0xA753, 0xA753, + 0xA755, 0xA755, 0xA757, 0xA757, 0xA759, 0xA759, 0xA75B, 0xA75B, + 0xA75D, 0xA75D, 0xA75F, 0xA75F, 0xA761, 0xA761, 0xA763, 0xA763, + 0xA765, 0xA765, 0xA767, 0xA767, 0xA769, 0xA769, 0xA76B, 0xA76B, + 0xA76D, 0xA76D, 0xA76F, 0xA76F, 0xA77A, 0xA77A, 0xA77C, 0xA77C, + 0xA77F, 0xA77F, 0xA781, 0xA781, 0xA783, 0xA783, 0xA785, 0xA785, + 0xA787, 0xA787, 0xA78C, 0xA78C, 0xA791, 0xA791, 0xA793, 0xA794, + 0xA797, 0xA797, 0xA799, 0xA799, 0xA79B, 0xA79B, 0xA79D, 0xA79D, + 0xA79F, 0xA79F, 0xA7A1, 0xA7A1, 0xA7A3, 0xA7A3, 0xA7A5, 0xA7A5, + 0xA7A7, 0xA7A7, 0xA7A9, 0xA7A9, 0xA7B5, 0xA7B5, 0xA7B7, 0xA7B7, + 0xA7B9, 0xA7B9, 0xA7BB, 0xA7BB, 0xA7BD, 0xA7BD, 0xA7BF, 0xA7BF, + 0xA7C1, 0xA7C1, 0xA7C3, 0xA7C3, 0xA7C8, 0xA7C8, 0xA7CA, 0xA7CA, + 0xA7D1, 0xA7D1, 0xA7D7, 0xA7D7, 0xA7D9, 0xA7D9, 0xA7F6, 0xA7F6, + 0xAB53, 0xAB53, 0xAB70, 0xABBF, 0xFB00, 0xFB06, 0xFB13, 0xFB17, + 0xFF41, 0xFF5A, 0x10428, 0x1044F, 0x104D8, 0x104FB, 0x10597, 0x105A1, + 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10CC0, 0x10CF2, + 0x118C0, 0x118DF, 0x16E60, 0x16E7F, 0x1E922, 0x1E943, + // #54 (8848+23): bp=Dash + 0x002D, 0x002D, 0x058A, 0x058A, 0x05BE, 0x05BE, 0x1400, 0x1400, + 0x1806, 0x1806, 0x2010, 0x2015, 0x2053, 0x2053, 0x207B, 0x207B, + 0x208B, 0x208B, 0x2212, 0x2212, 0x2E17, 0x2E17, 0x2E1A, 0x2E1A, + 0x2E3A, 0x2E3B, 0x2E40, 0x2E40, 0x2E5D, 0x2E5D, 0x301C, 0x301C, + 0x3030, 0x3030, 0x30A0, 0x30A0, 0xFE31, 0xFE32, 0xFE58, 0xFE58, + 0xFE63, 0xFE63, 0xFF0D, 0xFF0D, 0x10EAD, 0x10EAD, + // #55 (8871+17): bp=Default_Ignorable_Code_Point:DI + 0x00AD, 0x00AD, 0x034F, 0x034F, 0x061C, 0x061C, 0x115F, 0x1160, + 0x17B4, 0x17B5, 0x180B, 0x180F, 0x200B, 0x200F, 0x202A, 0x202E, + 0x2060, 0x206F, 0x3164, 0x3164, 0xFE00, 0xFE0F, 0xFEFF, 0xFEFF, + 0xFFA0, 0xFFA0, 0xFFF0, 0xFFF8, 0x1BCA0, 0x1BCA3, 0x1D173, 0x1D17A, + 0xE0000, 0xE0FFF, + // #56 (8888+8): bp=Deprecated:Dep + 0x0149, 0x0149, 0x0673, 0x0673, 0x0F77, 0x0F77, 0x0F79, 0x0F79, + 0x17A3, 0x17A4, 0x206A, 0x206F, 0x2329, 0x232A, 0xE0001, 0xE0001, + // #57 (8896+192): bp=Diacritic:Dia + 0x005E, 0x005E, 0x0060, 0x0060, 0x00A8, 0x00A8, 0x00AF, 0x00AF, + 0x00B4, 0x00B4, 0x00B7, 0x00B8, 0x02B0, 0x034E, 0x0350, 0x0357, + 0x035D, 0x0362, 0x0374, 0x0375, 0x037A, 0x037A, 0x0384, 0x0385, + 0x0483, 0x0487, 0x0559, 0x0559, 0x0591, 0x05A1, 0x05A3, 0x05BD, + 0x05BF, 0x05BF, 0x05C1, 0x05C2, 0x05C4, 0x05C4, 0x064B, 0x0652, + 0x0657, 0x0658, 0x06DF, 0x06E0, 0x06E5, 0x06E6, 0x06EA, 0x06EC, + 0x0730, 0x074A, 0x07A6, 0x07B0, 0x07EB, 0x07F5, 0x0818, 0x0819, + 0x0898, 0x089F, 0x08C9, 0x08D2, 0x08E3, 0x08FE, 0x093C, 0x093C, + 0x094D, 0x094D, 0x0951, 0x0954, 0x0971, 0x0971, 0x09BC, 0x09BC, + 0x09CD, 0x09CD, 0x0A3C, 0x0A3C, 0x0A4D, 0x0A4D, 0x0ABC, 0x0ABC, + 0x0ACD, 0x0ACD, 0x0AFD, 0x0AFF, 0x0B3C, 0x0B3C, 0x0B4D, 0x0B4D, + 0x0B55, 0x0B55, 0x0BCD, 0x0BCD, 0x0C3C, 0x0C3C, 0x0C4D, 0x0C4D, + 0x0CBC, 0x0CBC, 0x0CCD, 0x0CCD, 0x0D3B, 0x0D3C, 0x0D4D, 0x0D4D, + 0x0DCA, 0x0DCA, 0x0E47, 0x0E4C, 0x0E4E, 0x0E4E, 0x0EBA, 0x0EBA, + 0x0EC8, 0x0ECC, 0x0F18, 0x0F19, 0x0F35, 0x0F35, 0x0F37, 0x0F37, + 0x0F39, 0x0F39, 0x0F3E, 0x0F3F, 0x0F82, 0x0F84, 0x0F86, 0x0F87, + 0x0FC6, 0x0FC6, 0x1037, 0x1037, 0x1039, 0x103A, 0x1063, 0x1064, + 0x1069, 0x106D, 0x1087, 0x108D, 0x108F, 0x108F, 0x109A, 0x109B, + 0x135D, 0x135F, 0x1714, 0x1715, 0x17C9, 0x17D3, 0x17DD, 0x17DD, + 0x1939, 0x193B, 0x1A75, 0x1A7C, 0x1A7F, 0x1A7F, 0x1AB0, 0x1ABE, + 0x1AC1, 0x1ACB, 0x1B34, 0x1B34, 0x1B44, 0x1B44, 0x1B6B, 0x1B73, + 0x1BAA, 0x1BAB, 0x1C36, 0x1C37, 0x1C78, 0x1C7D, 0x1CD0, 0x1CE8, + 0x1CED, 0x1CED, 0x1CF4, 0x1CF4, 0x1CF7, 0x1CF9, 0x1D2C, 0x1D6A, + 0x1DC4, 0x1DCF, 0x1DF5, 0x1DFF, 0x1FBD, 0x1FBD, 0x1FBF, 0x1FC1, + 0x1FCD, 0x1FCF, 0x1FDD, 0x1FDF, 0x1FED, 0x1FEF, 0x1FFD, 0x1FFE, + 0x2CEF, 0x2CF1, 0x2E2F, 0x2E2F, 0x302A, 0x302F, 0x3099, 0x309C, + 0x30FC, 0x30FC, 0xA66F, 0xA66F, 0xA67C, 0xA67D, 0xA67F, 0xA67F, + 0xA69C, 0xA69D, 0xA6F0, 0xA6F1, 0xA700, 0xA721, 0xA788, 0xA78A, + 0xA7F8, 0xA7F9, 0xA8C4, 0xA8C4, 0xA8E0, 0xA8F1, 0xA92B, 0xA92E, + 0xA953, 0xA953, 0xA9B3, 0xA9B3, 0xA9C0, 0xA9C0, 0xA9E5, 0xA9E5, + 0xAA7B, 0xAA7D, 0xAABF, 0xAAC2, 0xAAF6, 0xAAF6, 0xAB5B, 0xAB5F, + 0xAB69, 0xAB6B, 0xABEC, 0xABED, 0xFB1E, 0xFB1E, 0xFE20, 0xFE2F, + 0xFF3E, 0xFF3E, 0xFF40, 0xFF40, 0xFF70, 0xFF70, 0xFF9E, 0xFF9F, + 0xFFE3, 0xFFE3, 0x102E0, 0x102E0, 0x10780, 0x10785, 0x10787, 0x107B0, + 0x107B2, 0x107BA, 0x10AE5, 0x10AE6, 0x10D22, 0x10D27, 0x10F46, 0x10F50, + 0x10F82, 0x10F85, 0x11046, 0x11046, 0x11070, 0x11070, 0x110B9, 0x110BA, + 0x11133, 0x11134, 0x11173, 0x11173, 0x111C0, 0x111C0, 0x111CA, 0x111CC, + 0x11235, 0x11236, 0x112E9, 0x112EA, 0x1133C, 0x1133C, 0x1134D, 0x1134D, + 0x11366, 0x1136C, 0x11370, 0x11374, 0x11442, 0x11442, 0x11446, 0x11446, + 0x114C2, 0x114C3, 0x115BF, 0x115C0, 0x1163F, 0x1163F, 0x116B6, 0x116B7, + 0x1172B, 0x1172B, 0x11839, 0x1183A, 0x1193D, 0x1193E, 0x11943, 0x11943, + 0x119E0, 0x119E0, 0x11A34, 0x11A34, 0x11A47, 0x11A47, 0x11A99, 0x11A99, + 0x11C3F, 0x11C3F, 0x11D42, 0x11D42, 0x11D44, 0x11D45, 0x11D97, 0x11D97, + 0x16AF0, 0x16AF4, 0x16B30, 0x16B36, 0x16F8F, 0x16F9F, 0x16FF0, 0x16FF1, + 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1CF00, 0x1CF2D, + 0x1CF30, 0x1CF46, 0x1D167, 0x1D169, 0x1D16D, 0x1D172, 0x1D17B, 0x1D182, + 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0x1E130, 0x1E136, 0x1E2AE, 0x1E2AE, + 0x1E2EC, 0x1E2EF, 0x1E8D0, 0x1E8D6, 0x1E944, 0x1E946, 0x1E948, 0x1E94A, + // #58 (9088+153): bp=Emoji + 0x0023, 0x0023, 0x002A, 0x002A, 0x0030, 0x0039, 0x00A9, 0x00A9, + 0x00AE, 0x00AE, 0x203C, 0x203C, 0x2049, 0x2049, 0x2122, 0x2122, + 0x2139, 0x2139, 0x2194, 0x2199, 0x21A9, 0x21AA, 0x231A, 0x231B, + 0x2328, 0x2328, 0x23CF, 0x23CF, 0x23E9, 0x23F3, 0x23F8, 0x23FA, + 0x24C2, 0x24C2, 0x25AA, 0x25AB, 0x25B6, 0x25B6, 0x25C0, 0x25C0, + 0x25FB, 0x25FE, 0x2600, 0x2604, 0x260E, 0x260E, 0x2611, 0x2611, + 0x2614, 0x2615, 0x2618, 0x2618, 0x261D, 0x261D, 0x2620, 0x2620, + 0x2622, 0x2623, 0x2626, 0x2626, 0x262A, 0x262A, 0x262E, 0x262F, + 0x2638, 0x263A, 0x2640, 0x2640, 0x2642, 0x2642, 0x2648, 0x2653, + 0x265F, 0x2660, 0x2663, 0x2663, 0x2665, 0x2666, 0x2668, 0x2668, + 0x267B, 0x267B, 0x267E, 0x267F, 0x2692, 0x2697, 0x2699, 0x2699, + 0x269B, 0x269C, 0x26A0, 0x26A1, 0x26A7, 0x26A7, 0x26AA, 0x26AB, + 0x26B0, 0x26B1, 0x26BD, 0x26BE, 0x26C4, 0x26C5, 0x26C8, 0x26C8, + 0x26CE, 0x26CF, 0x26D1, 0x26D1, 0x26D3, 0x26D4, 0x26E9, 0x26EA, + 0x26F0, 0x26F5, 0x26F7, 0x26FA, 0x26FD, 0x26FD, 0x2702, 0x2702, + 0x2705, 0x2705, 0x2708, 0x270D, 0x270F, 0x270F, 0x2712, 0x2712, + 0x2714, 0x2714, 0x2716, 0x2716, 0x271D, 0x271D, 0x2721, 0x2721, + 0x2728, 0x2728, 0x2733, 0x2734, 0x2744, 0x2744, 0x2747, 0x2747, + 0x274C, 0x274C, 0x274E, 0x274E, 0x2753, 0x2755, 0x2757, 0x2757, + 0x2763, 0x2764, 0x2795, 0x2797, 0x27A1, 0x27A1, 0x27B0, 0x27B0, + 0x27BF, 0x27BF, 0x2934, 0x2935, 0x2B05, 0x2B07, 0x2B1B, 0x2B1C, + 0x2B50, 0x2B50, 0x2B55, 0x2B55, 0x3030, 0x3030, 0x303D, 0x303D, + 0x3297, 0x3297, 0x3299, 0x3299, 0x1F004, 0x1F004, 0x1F0CF, 0x1F0CF, + 0x1F170, 0x1F171, 0x1F17E, 0x1F17F, 0x1F18E, 0x1F18E, 0x1F191, 0x1F19A, + 0x1F1E6, 0x1F1FF, 0x1F201, 0x1F202, 0x1F21A, 0x1F21A, 0x1F22F, 0x1F22F, + 0x1F232, 0x1F23A, 0x1F250, 0x1F251, 0x1F300, 0x1F321, 0x1F324, 0x1F393, + 0x1F396, 0x1F397, 0x1F399, 0x1F39B, 0x1F39E, 0x1F3F0, 0x1F3F3, 0x1F3F5, + 0x1F3F7, 0x1F4FD, 0x1F4FF, 0x1F53D, 0x1F549, 0x1F54E, 0x1F550, 0x1F567, + 0x1F56F, 0x1F570, 0x1F573, 0x1F57A, 0x1F587, 0x1F587, 0x1F58A, 0x1F58D, + 0x1F590, 0x1F590, 0x1F595, 0x1F596, 0x1F5A4, 0x1F5A5, 0x1F5A8, 0x1F5A8, + 0x1F5B1, 0x1F5B2, 0x1F5BC, 0x1F5BC, 0x1F5C2, 0x1F5C4, 0x1F5D1, 0x1F5D3, + 0x1F5DC, 0x1F5DE, 0x1F5E1, 0x1F5E1, 0x1F5E3, 0x1F5E3, 0x1F5E8, 0x1F5E8, + 0x1F5EF, 0x1F5EF, 0x1F5F3, 0x1F5F3, 0x1F5FA, 0x1F64F, 0x1F680, 0x1F6C5, + 0x1F6CB, 0x1F6D2, 0x1F6D5, 0x1F6D7, 0x1F6DD, 0x1F6E5, 0x1F6E9, 0x1F6E9, + 0x1F6EB, 0x1F6EC, 0x1F6F0, 0x1F6F0, 0x1F6F3, 0x1F6FC, 0x1F7E0, 0x1F7EB, + 0x1F7F0, 0x1F7F0, 0x1F90C, 0x1F93A, 0x1F93C, 0x1F945, 0x1F947, 0x1F9FF, + 0x1FA70, 0x1FA74, 0x1FA78, 0x1FA7C, 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, + 0x1FAB0, 0x1FABA, 0x1FAC0, 0x1FAC5, 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, + 0x1FAF0, 0x1FAF6, + // #59 (9241+10): bp=Emoji_Component:EComp + 0x0023, 0x0023, 0x002A, 0x002A, 0x0030, 0x0039, 0x200D, 0x200D, + 0x20E3, 0x20E3, 0xFE0F, 0xFE0F, 0x1F1E6, 0x1F1FF, 0x1F3FB, 0x1F3FF, + 0x1F9B0, 0x1F9B3, 0xE0020, 0xE007F, + // #60 (9251+1): bp=Emoji_Modifier:EMod + 0x1F3FB, 0x1F3FF, + // #61 (9252+40): bp=Emoji_Modifier_Base:EBase + 0x261D, 0x261D, 0x26F9, 0x26F9, 0x270A, 0x270D, 0x1F385, 0x1F385, + 0x1F3C2, 0x1F3C4, 0x1F3C7, 0x1F3C7, 0x1F3CA, 0x1F3CC, 0x1F442, 0x1F443, + 0x1F446, 0x1F450, 0x1F466, 0x1F478, 0x1F47C, 0x1F47C, 0x1F481, 0x1F483, + 0x1F485, 0x1F487, 0x1F48F, 0x1F48F, 0x1F491, 0x1F491, 0x1F4AA, 0x1F4AA, + 0x1F574, 0x1F575, 0x1F57A, 0x1F57A, 0x1F590, 0x1F590, 0x1F595, 0x1F596, + 0x1F645, 0x1F647, 0x1F64B, 0x1F64F, 0x1F6A3, 0x1F6A3, 0x1F6B4, 0x1F6B6, + 0x1F6C0, 0x1F6C0, 0x1F6CC, 0x1F6CC, 0x1F90C, 0x1F90C, 0x1F90F, 0x1F90F, + 0x1F918, 0x1F91F, 0x1F926, 0x1F926, 0x1F930, 0x1F939, 0x1F93C, 0x1F93E, + 0x1F977, 0x1F977, 0x1F9B5, 0x1F9B6, 0x1F9B8, 0x1F9B9, 0x1F9BB, 0x1F9BB, + 0x1F9CD, 0x1F9CF, 0x1F9D1, 0x1F9DD, 0x1FAC3, 0x1FAC5, 0x1FAF0, 0x1FAF6, + // #62 (9292+83): bp=Emoji_Presentation:EPres + 0x231A, 0x231B, 0x23E9, 0x23EC, 0x23F0, 0x23F0, 0x23F3, 0x23F3, + 0x25FD, 0x25FE, 0x2614, 0x2615, 0x2648, 0x2653, 0x267F, 0x267F, + 0x2693, 0x2693, 0x26A1, 0x26A1, 0x26AA, 0x26AB, 0x26BD, 0x26BE, + 0x26C4, 0x26C5, 0x26CE, 0x26CE, 0x26D4, 0x26D4, 0x26EA, 0x26EA, + 0x26F2, 0x26F3, 0x26F5, 0x26F5, 0x26FA, 0x26FA, 0x26FD, 0x26FD, + 0x2705, 0x2705, 0x270A, 0x270B, 0x2728, 0x2728, 0x274C, 0x274C, + 0x274E, 0x274E, 0x2753, 0x2755, 0x2757, 0x2757, 0x2795, 0x2797, + 0x27B0, 0x27B0, 0x27BF, 0x27BF, 0x2B1B, 0x2B1C, 0x2B50, 0x2B50, + 0x2B55, 0x2B55, 0x1F004, 0x1F004, 0x1F0CF, 0x1F0CF, 0x1F18E, 0x1F18E, + 0x1F191, 0x1F19A, 0x1F1E6, 0x1F1FF, 0x1F201, 0x1F201, 0x1F21A, 0x1F21A, + 0x1F22F, 0x1F22F, 0x1F232, 0x1F236, 0x1F238, 0x1F23A, 0x1F250, 0x1F251, + 0x1F300, 0x1F320, 0x1F32D, 0x1F335, 0x1F337, 0x1F37C, 0x1F37E, 0x1F393, + 0x1F3A0, 0x1F3CA, 0x1F3CF, 0x1F3D3, 0x1F3E0, 0x1F3F0, 0x1F3F4, 0x1F3F4, + 0x1F3F8, 0x1F43E, 0x1F440, 0x1F440, 0x1F442, 0x1F4FC, 0x1F4FF, 0x1F53D, + 0x1F54B, 0x1F54E, 0x1F550, 0x1F567, 0x1F57A, 0x1F57A, 0x1F595, 0x1F596, + 0x1F5A4, 0x1F5A4, 0x1F5FB, 0x1F64F, 0x1F680, 0x1F6C5, 0x1F6CC, 0x1F6CC, + 0x1F6D0, 0x1F6D2, 0x1F6D5, 0x1F6D7, 0x1F6DD, 0x1F6DF, 0x1F6EB, 0x1F6EC, + 0x1F6F4, 0x1F6FC, 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, 0x1F90C, 0x1F93A, + 0x1F93C, 0x1F945, 0x1F947, 0x1F9FF, 0x1FA70, 0x1FA74, 0x1FA78, 0x1FA7C, + 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, 0x1FAB0, 0x1FABA, 0x1FAC0, 0x1FAC5, + 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, 0x1FAF0, 0x1FAF6, + // #63 (9375+78): bp=Extended_Pictographic:ExtPict + 0x00A9, 0x00A9, 0x00AE, 0x00AE, 0x203C, 0x203C, 0x2049, 0x2049, + 0x2122, 0x2122, 0x2139, 0x2139, 0x2194, 0x2199, 0x21A9, 0x21AA, + 0x231A, 0x231B, 0x2328, 0x2328, 0x2388, 0x2388, 0x23CF, 0x23CF, + 0x23E9, 0x23F3, 0x23F8, 0x23FA, 0x24C2, 0x24C2, 0x25AA, 0x25AB, + 0x25B6, 0x25B6, 0x25C0, 0x25C0, 0x25FB, 0x25FE, 0x2600, 0x2605, + 0x2607, 0x2612, 0x2614, 0x2685, 0x2690, 0x2705, 0x2708, 0x2712, + 0x2714, 0x2714, 0x2716, 0x2716, 0x271D, 0x271D, 0x2721, 0x2721, + 0x2728, 0x2728, 0x2733, 0x2734, 0x2744, 0x2744, 0x2747, 0x2747, + 0x274C, 0x274C, 0x274E, 0x274E, 0x2753, 0x2755, 0x2757, 0x2757, + 0x2763, 0x2767, 0x2795, 0x2797, 0x27A1, 0x27A1, 0x27B0, 0x27B0, + 0x27BF, 0x27BF, 0x2934, 0x2935, 0x2B05, 0x2B07, 0x2B1B, 0x2B1C, + 0x2B50, 0x2B50, 0x2B55, 0x2B55, 0x3030, 0x3030, 0x303D, 0x303D, + 0x3297, 0x3297, 0x3299, 0x3299, 0x1F000, 0x1F0FF, 0x1F10D, 0x1F10F, + 0x1F12F, 0x1F12F, 0x1F16C, 0x1F171, 0x1F17E, 0x1F17F, 0x1F18E, 0x1F18E, + 0x1F191, 0x1F19A, 0x1F1AD, 0x1F1E5, 0x1F201, 0x1F20F, 0x1F21A, 0x1F21A, + 0x1F22F, 0x1F22F, 0x1F232, 0x1F23A, 0x1F23C, 0x1F23F, 0x1F249, 0x1F3FA, + 0x1F400, 0x1F53D, 0x1F546, 0x1F64F, 0x1F680, 0x1F6FF, 0x1F774, 0x1F77F, + 0x1F7D5, 0x1F7FF, 0x1F80C, 0x1F80F, 0x1F848, 0x1F84F, 0x1F85A, 0x1F85F, + 0x1F888, 0x1F88F, 0x1F8AE, 0x1F8FF, 0x1F90C, 0x1F93A, 0x1F93C, 0x1F945, + 0x1F947, 0x1FAFF, 0x1FC00, 0x1FFFD, + // #64 (9453+33): bp=Extender:Ext + 0x00B7, 0x00B7, 0x02D0, 0x02D1, 0x0640, 0x0640, 0x07FA, 0x07FA, + 0x0B55, 0x0B55, 0x0E46, 0x0E46, 0x0EC6, 0x0EC6, 0x180A, 0x180A, + 0x1843, 0x1843, 0x1AA7, 0x1AA7, 0x1C36, 0x1C36, 0x1C7B, 0x1C7B, + 0x3005, 0x3005, 0x3031, 0x3035, 0x309D, 0x309E, 0x30FC, 0x30FE, + 0xA015, 0xA015, 0xA60C, 0xA60C, 0xA9CF, 0xA9CF, 0xA9E6, 0xA9E6, + 0xAA70, 0xAA70, 0xAADD, 0xAADD, 0xAAF3, 0xAAF4, 0xFF70, 0xFF70, + 0x10781, 0x10782, 0x1135D, 0x1135D, 0x115C6, 0x115C8, 0x11A98, 0x11A98, + 0x16B42, 0x16B43, 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE3, 0x1E13C, 0x1E13D, + 0x1E944, 0x1E946, + // #65 (9486+861): bp=Grapheme_Base:Gr_Base + 0x0020, 0x007E, 0x00A0, 0x00AC, 0x00AE, 0x02FF, 0x0370, 0x0377, + 0x037A, 0x037F, 0x0384, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, + 0x03A3, 0x0482, 0x048A, 0x052F, 0x0531, 0x0556, 0x0559, 0x058A, + 0x058D, 0x058F, 0x05BE, 0x05BE, 0x05C0, 0x05C0, 0x05C3, 0x05C3, + 0x05C6, 0x05C6, 0x05D0, 0x05EA, 0x05EF, 0x05F4, 0x0606, 0x060F, + 0x061B, 0x061B, 0x061D, 0x064A, 0x0660, 0x066F, 0x0671, 0x06D5, + 0x06DE, 0x06DE, 0x06E5, 0x06E6, 0x06E9, 0x06E9, 0x06EE, 0x070D, + 0x0710, 0x0710, 0x0712, 0x072F, 0x074D, 0x07A5, 0x07B1, 0x07B1, + 0x07C0, 0x07EA, 0x07F4, 0x07FA, 0x07FE, 0x0815, 0x081A, 0x081A, + 0x0824, 0x0824, 0x0828, 0x0828, 0x0830, 0x083E, 0x0840, 0x0858, + 0x085E, 0x085E, 0x0860, 0x086A, 0x0870, 0x088E, 0x08A0, 0x08C9, + 0x0903, 0x0939, 0x093B, 0x093B, 0x093D, 0x0940, 0x0949, 0x094C, + 0x094E, 0x0950, 0x0958, 0x0961, 0x0964, 0x0980, 0x0982, 0x0983, + 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, + 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BD, 0x09BD, 0x09BF, 0x09C0, + 0x09C7, 0x09C8, 0x09CB, 0x09CC, 0x09CE, 0x09CE, 0x09DC, 0x09DD, + 0x09DF, 0x09E1, 0x09E6, 0x09FD, 0x0A03, 0x0A03, 0x0A05, 0x0A0A, + 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, + 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A3E, 0x0A40, 0x0A59, 0x0A5C, + 0x0A5E, 0x0A5E, 0x0A66, 0x0A6F, 0x0A72, 0x0A74, 0x0A76, 0x0A76, + 0x0A83, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABD, 0x0AC0, + 0x0AC9, 0x0AC9, 0x0ACB, 0x0ACC, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE1, + 0x0AE6, 0x0AF1, 0x0AF9, 0x0AF9, 0x0B02, 0x0B03, 0x0B05, 0x0B0C, + 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, + 0x0B35, 0x0B39, 0x0B3D, 0x0B3D, 0x0B40, 0x0B40, 0x0B47, 0x0B48, + 0x0B4B, 0x0B4C, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, 0x0B66, 0x0B77, + 0x0B83, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, + 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, + 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BBF, 0x0BBF, 0x0BC1, 0x0BC2, + 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCC, 0x0BD0, 0x0BD0, 0x0BE6, 0x0BFA, + 0x0C01, 0x0C03, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, + 0x0C2A, 0x0C39, 0x0C3D, 0x0C3D, 0x0C41, 0x0C44, 0x0C58, 0x0C5A, + 0x0C5D, 0x0C5D, 0x0C60, 0x0C61, 0x0C66, 0x0C6F, 0x0C77, 0x0C80, + 0x0C82, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, + 0x0CB5, 0x0CB9, 0x0CBD, 0x0CBE, 0x0CC0, 0x0CC1, 0x0CC3, 0x0CC4, + 0x0CC7, 0x0CC8, 0x0CCA, 0x0CCB, 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE1, + 0x0CE6, 0x0CEF, 0x0CF1, 0x0CF2, 0x0D02, 0x0D0C, 0x0D0E, 0x0D10, + 0x0D12, 0x0D3A, 0x0D3D, 0x0D3D, 0x0D3F, 0x0D40, 0x0D46, 0x0D48, + 0x0D4A, 0x0D4C, 0x0D4E, 0x0D4F, 0x0D54, 0x0D56, 0x0D58, 0x0D61, + 0x0D66, 0x0D7F, 0x0D82, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, + 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DD0, 0x0DD1, + 0x0DD8, 0x0DDE, 0x0DE6, 0x0DEF, 0x0DF2, 0x0DF4, 0x0E01, 0x0E30, + 0x0E32, 0x0E33, 0x0E3F, 0x0E46, 0x0E4F, 0x0E5B, 0x0E81, 0x0E82, + 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, + 0x0EA7, 0x0EB0, 0x0EB2, 0x0EB3, 0x0EBD, 0x0EBD, 0x0EC0, 0x0EC4, + 0x0EC6, 0x0EC6, 0x0ED0, 0x0ED9, 0x0EDC, 0x0EDF, 0x0F00, 0x0F17, + 0x0F1A, 0x0F34, 0x0F36, 0x0F36, 0x0F38, 0x0F38, 0x0F3A, 0x0F47, + 0x0F49, 0x0F6C, 0x0F7F, 0x0F7F, 0x0F85, 0x0F85, 0x0F88, 0x0F8C, + 0x0FBE, 0x0FC5, 0x0FC7, 0x0FCC, 0x0FCE, 0x0FDA, 0x1000, 0x102C, + 0x1031, 0x1031, 0x1038, 0x1038, 0x103B, 0x103C, 0x103F, 0x1057, + 0x105A, 0x105D, 0x1061, 0x1070, 0x1075, 0x1081, 0x1083, 0x1084, + 0x1087, 0x108C, 0x108E, 0x109C, 0x109E, 0x10C5, 0x10C7, 0x10C7, + 0x10CD, 0x10CD, 0x10D0, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, + 0x1258, 0x1258, 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, + 0x1290, 0x12B0, 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, + 0x12C2, 0x12C5, 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, + 0x1318, 0x135A, 0x1360, 0x137C, 0x1380, 0x1399, 0x13A0, 0x13F5, + 0x13F8, 0x13FD, 0x1400, 0x169C, 0x16A0, 0x16F8, 0x1700, 0x1711, + 0x1715, 0x1715, 0x171F, 0x1731, 0x1734, 0x1736, 0x1740, 0x1751, + 0x1760, 0x176C, 0x176E, 0x1770, 0x1780, 0x17B3, 0x17B6, 0x17B6, + 0x17BE, 0x17C5, 0x17C7, 0x17C8, 0x17D4, 0x17DC, 0x17E0, 0x17E9, + 0x17F0, 0x17F9, 0x1800, 0x180A, 0x1810, 0x1819, 0x1820, 0x1878, + 0x1880, 0x1884, 0x1887, 0x18A8, 0x18AA, 0x18AA, 0x18B0, 0x18F5, + 0x1900, 0x191E, 0x1923, 0x1926, 0x1929, 0x192B, 0x1930, 0x1931, + 0x1933, 0x1938, 0x1940, 0x1940, 0x1944, 0x196D, 0x1970, 0x1974, + 0x1980, 0x19AB, 0x19B0, 0x19C9, 0x19D0, 0x19DA, 0x19DE, 0x1A16, + 0x1A19, 0x1A1A, 0x1A1E, 0x1A55, 0x1A57, 0x1A57, 0x1A61, 0x1A61, + 0x1A63, 0x1A64, 0x1A6D, 0x1A72, 0x1A80, 0x1A89, 0x1A90, 0x1A99, + 0x1AA0, 0x1AAD, 0x1B04, 0x1B33, 0x1B3B, 0x1B3B, 0x1B3D, 0x1B41, + 0x1B43, 0x1B4C, 0x1B50, 0x1B6A, 0x1B74, 0x1B7E, 0x1B82, 0x1BA1, + 0x1BA6, 0x1BA7, 0x1BAA, 0x1BAA, 0x1BAE, 0x1BE5, 0x1BE7, 0x1BE7, + 0x1BEA, 0x1BEC, 0x1BEE, 0x1BEE, 0x1BF2, 0x1BF3, 0x1BFC, 0x1C2B, + 0x1C34, 0x1C35, 0x1C3B, 0x1C49, 0x1C4D, 0x1C88, 0x1C90, 0x1CBA, + 0x1CBD, 0x1CC7, 0x1CD3, 0x1CD3, 0x1CE1, 0x1CE1, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF7, 0x1CFA, 0x1CFA, 0x1D00, 0x1DBF, + 0x1E00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, + 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, + 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FC4, 0x1FC6, 0x1FD3, + 0x1FD6, 0x1FDB, 0x1FDD, 0x1FEF, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFE, + 0x2000, 0x200A, 0x2010, 0x2027, 0x202F, 0x205F, 0x2070, 0x2071, + 0x2074, 0x208E, 0x2090, 0x209C, 0x20A0, 0x20C0, 0x2100, 0x218B, + 0x2190, 0x2426, 0x2440, 0x244A, 0x2460, 0x2B73, 0x2B76, 0x2B95, + 0x2B97, 0x2CEE, 0x2CF2, 0x2CF3, 0x2CF9, 0x2D25, 0x2D27, 0x2D27, + 0x2D2D, 0x2D2D, 0x2D30, 0x2D67, 0x2D6F, 0x2D70, 0x2D80, 0x2D96, + 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, + 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, + 0x2E00, 0x2E5D, 0x2E80, 0x2E99, 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, + 0x2FF0, 0x2FFB, 0x3000, 0x3029, 0x3030, 0x303F, 0x3041, 0x3096, + 0x309B, 0x30FF, 0x3105, 0x312F, 0x3131, 0x318E, 0x3190, 0x31E3, + 0x31F0, 0x321E, 0x3220, 0xA48C, 0xA490, 0xA4C6, 0xA4D0, 0xA62B, + 0xA640, 0xA66E, 0xA673, 0xA673, 0xA67E, 0xA69D, 0xA6A0, 0xA6EF, + 0xA6F2, 0xA6F7, 0xA700, 0xA7CA, 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, + 0xA7D5, 0xA7D9, 0xA7F2, 0xA801, 0xA803, 0xA805, 0xA807, 0xA80A, + 0xA80C, 0xA824, 0xA827, 0xA82B, 0xA830, 0xA839, 0xA840, 0xA877, + 0xA880, 0xA8C3, 0xA8CE, 0xA8D9, 0xA8F2, 0xA8FE, 0xA900, 0xA925, + 0xA92E, 0xA946, 0xA952, 0xA953, 0xA95F, 0xA97C, 0xA983, 0xA9B2, + 0xA9B4, 0xA9B5, 0xA9BA, 0xA9BB, 0xA9BE, 0xA9CD, 0xA9CF, 0xA9D9, + 0xA9DE, 0xA9E4, 0xA9E6, 0xA9FE, 0xAA00, 0xAA28, 0xAA2F, 0xAA30, + 0xAA33, 0xAA34, 0xAA40, 0xAA42, 0xAA44, 0xAA4B, 0xAA4D, 0xAA4D, + 0xAA50, 0xAA59, 0xAA5C, 0xAA7B, 0xAA7D, 0xAAAF, 0xAAB1, 0xAAB1, + 0xAAB5, 0xAAB6, 0xAAB9, 0xAABD, 0xAAC0, 0xAAC0, 0xAAC2, 0xAAC2, + 0xAADB, 0xAAEB, 0xAAEE, 0xAAF5, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, + 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB6B, + 0xAB70, 0xABE4, 0xABE6, 0xABE7, 0xABE9, 0xABEC, 0xABF0, 0xABF9, + 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, + 0xFA70, 0xFAD9, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFB1D, 0xFB1D, + 0xFB1F, 0xFB36, 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, + 0xFB43, 0xFB44, 0xFB46, 0xFBC2, 0xFBD3, 0xFD8F, 0xFD92, 0xFDC7, + 0xFDCF, 0xFDCF, 0xFDF0, 0xFDFF, 0xFE10, 0xFE19, 0xFE30, 0xFE52, + 0xFE54, 0xFE66, 0xFE68, 0xFE6B, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, + 0xFF01, 0xFF9D, 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, + 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, 0xFFE0, 0xFFE6, 0xFFE8, 0xFFEE, + 0xFFFC, 0xFFFD, 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, + 0x1003C, 0x1003D, 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, + 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1018E, 0x10190, 0x1019C, + 0x101A0, 0x101A0, 0x101D0, 0x101FC, 0x10280, 0x1029C, 0x102A0, 0x102D0, + 0x102E1, 0x102FB, 0x10300, 0x10323, 0x1032D, 0x1034A, 0x10350, 0x10375, + 0x10380, 0x1039D, 0x1039F, 0x103C3, 0x103C8, 0x103D5, 0x10400, 0x1049D, + 0x104A0, 0x104A9, 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10500, 0x10527, + 0x10530, 0x10563, 0x1056F, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, + 0x10594, 0x10595, 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, + 0x105BB, 0x105BC, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10800, 0x10805, + 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, + 0x1083F, 0x10855, 0x10857, 0x1089E, 0x108A7, 0x108AF, 0x108E0, 0x108F2, + 0x108F4, 0x108F5, 0x108FB, 0x1091B, 0x1091F, 0x10939, 0x1093F, 0x1093F, + 0x10980, 0x109B7, 0x109BC, 0x109CF, 0x109D2, 0x10A00, 0x10A10, 0x10A13, + 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A40, 0x10A48, 0x10A50, 0x10A58, + 0x10A60, 0x10A9F, 0x10AC0, 0x10AE4, 0x10AEB, 0x10AF6, 0x10B00, 0x10B35, + 0x10B39, 0x10B55, 0x10B58, 0x10B72, 0x10B78, 0x10B91, 0x10B99, 0x10B9C, + 0x10BA9, 0x10BAF, 0x10C00, 0x10C48, 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, + 0x10CFA, 0x10D23, 0x10D30, 0x10D39, 0x10E60, 0x10E7E, 0x10E80, 0x10EA9, + 0x10EAD, 0x10EAD, 0x10EB0, 0x10EB1, 0x10F00, 0x10F27, 0x10F30, 0x10F45, + 0x10F51, 0x10F59, 0x10F70, 0x10F81, 0x10F86, 0x10F89, 0x10FB0, 0x10FCB, + 0x10FE0, 0x10FF6, 0x11000, 0x11000, 0x11002, 0x11037, 0x11047, 0x1104D, + 0x11052, 0x1106F, 0x11071, 0x11072, 0x11075, 0x11075, 0x11082, 0x110B2, + 0x110B7, 0x110B8, 0x110BB, 0x110BC, 0x110BE, 0x110C1, 0x110D0, 0x110E8, + 0x110F0, 0x110F9, 0x11103, 0x11126, 0x1112C, 0x1112C, 0x11136, 0x11147, + 0x11150, 0x11172, 0x11174, 0x11176, 0x11182, 0x111B5, 0x111BF, 0x111C8, + 0x111CD, 0x111CE, 0x111D0, 0x111DF, 0x111E1, 0x111F4, 0x11200, 0x11211, + 0x11213, 0x1122E, 0x11232, 0x11233, 0x11235, 0x11235, 0x11238, 0x1123D, + 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, + 0x1129F, 0x112A9, 0x112B0, 0x112DE, 0x112E0, 0x112E2, 0x112F0, 0x112F9, + 0x11302, 0x11303, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, + 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133D, 0x1133D, + 0x1133F, 0x1133F, 0x11341, 0x11344, 0x11347, 0x11348, 0x1134B, 0x1134D, + 0x11350, 0x11350, 0x1135D, 0x11363, 0x11400, 0x11437, 0x11440, 0x11441, + 0x11445, 0x11445, 0x11447, 0x1145B, 0x1145D, 0x1145D, 0x1145F, 0x11461, + 0x11480, 0x114AF, 0x114B1, 0x114B2, 0x114B9, 0x114B9, 0x114BB, 0x114BC, + 0x114BE, 0x114BE, 0x114C1, 0x114C1, 0x114C4, 0x114C7, 0x114D0, 0x114D9, + 0x11580, 0x115AE, 0x115B0, 0x115B1, 0x115B8, 0x115BB, 0x115BE, 0x115BE, + 0x115C1, 0x115DB, 0x11600, 0x11632, 0x1163B, 0x1163C, 0x1163E, 0x1163E, + 0x11641, 0x11644, 0x11650, 0x11659, 0x11660, 0x1166C, 0x11680, 0x116AA, + 0x116AC, 0x116AC, 0x116AE, 0x116AF, 0x116B6, 0x116B6, 0x116B8, 0x116B9, + 0x116C0, 0x116C9, 0x11700, 0x1171A, 0x11720, 0x11721, 0x11726, 0x11726, + 0x11730, 0x11746, 0x11800, 0x1182E, 0x11838, 0x11838, 0x1183B, 0x1183B, + 0x118A0, 0x118F2, 0x118FF, 0x11906, 0x11909, 0x11909, 0x1190C, 0x11913, + 0x11915, 0x11916, 0x11918, 0x1192F, 0x11931, 0x11935, 0x11937, 0x11938, + 0x1193D, 0x1193D, 0x1193F, 0x11942, 0x11944, 0x11946, 0x11950, 0x11959, + 0x119A0, 0x119A7, 0x119AA, 0x119D3, 0x119DC, 0x119DF, 0x119E1, 0x119E4, + 0x11A00, 0x11A00, 0x11A0B, 0x11A32, 0x11A39, 0x11A3A, 0x11A3F, 0x11A46, + 0x11A50, 0x11A50, 0x11A57, 0x11A58, 0x11A5C, 0x11A89, 0x11A97, 0x11A97, + 0x11A9A, 0x11AA2, 0x11AB0, 0x11AF8, 0x11C00, 0x11C08, 0x11C0A, 0x11C2F, + 0x11C3E, 0x11C3E, 0x11C40, 0x11C45, 0x11C50, 0x11C6C, 0x11C70, 0x11C8F, + 0x11CA9, 0x11CA9, 0x11CB1, 0x11CB1, 0x11CB4, 0x11CB4, 0x11D00, 0x11D06, + 0x11D08, 0x11D09, 0x11D0B, 0x11D30, 0x11D46, 0x11D46, 0x11D50, 0x11D59, + 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, 0x11D93, 0x11D94, + 0x11D96, 0x11D96, 0x11D98, 0x11D98, 0x11DA0, 0x11DA9, 0x11EE0, 0x11EF2, + 0x11EF5, 0x11EF8, 0x11FB0, 0x11FB0, 0x11FC0, 0x11FF1, 0x11FFF, 0x12399, + 0x12400, 0x1246E, 0x12470, 0x12474, 0x12480, 0x12543, 0x12F90, 0x12FF2, + 0x13000, 0x1342E, 0x14400, 0x14646, 0x16800, 0x16A38, 0x16A40, 0x16A5E, + 0x16A60, 0x16A69, 0x16A6E, 0x16ABE, 0x16AC0, 0x16AC9, 0x16AD0, 0x16AED, + 0x16AF5, 0x16AF5, 0x16B00, 0x16B2F, 0x16B37, 0x16B45, 0x16B50, 0x16B59, + 0x16B5B, 0x16B61, 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, 0x16E40, 0x16E9A, + 0x16F00, 0x16F4A, 0x16F50, 0x16F87, 0x16F93, 0x16F9F, 0x16FE0, 0x16FE3, + 0x16FF0, 0x16FF1, 0x17000, 0x187F7, 0x18800, 0x18CD5, 0x18D00, 0x18D08, + 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B122, + 0x1B150, 0x1B152, 0x1B164, 0x1B167, 0x1B170, 0x1B2FB, 0x1BC00, 0x1BC6A, + 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, 0x1BC9C, 0x1BC9C, + 0x1BC9F, 0x1BC9F, 0x1CF50, 0x1CFC3, 0x1D000, 0x1D0F5, 0x1D100, 0x1D126, + 0x1D129, 0x1D164, 0x1D166, 0x1D166, 0x1D16A, 0x1D16D, 0x1D183, 0x1D184, + 0x1D18C, 0x1D1A9, 0x1D1AE, 0x1D1EA, 0x1D200, 0x1D241, 0x1D245, 0x1D245, + 0x1D2E0, 0x1D2F3, 0x1D300, 0x1D356, 0x1D360, 0x1D378, 0x1D400, 0x1D454, + 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, + 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, + 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, + 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, + 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D7CB, 0x1D7CE, 0x1D9FF, + 0x1DA37, 0x1DA3A, 0x1DA6D, 0x1DA74, 0x1DA76, 0x1DA83, 0x1DA85, 0x1DA8B, + 0x1DF00, 0x1DF1E, 0x1E100, 0x1E12C, 0x1E137, 0x1E13D, 0x1E140, 0x1E149, + 0x1E14E, 0x1E14F, 0x1E290, 0x1E2AD, 0x1E2C0, 0x1E2EB, 0x1E2F0, 0x1E2F9, + 0x1E2FF, 0x1E2FF, 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, + 0x1E7F0, 0x1E7FE, 0x1E800, 0x1E8C4, 0x1E8C7, 0x1E8CF, 0x1E900, 0x1E943, + 0x1E94B, 0x1E94B, 0x1E950, 0x1E959, 0x1E95E, 0x1E95F, 0x1EC71, 0x1ECB4, + 0x1ED01, 0x1ED3D, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, + 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, + 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, + 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, + 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, + 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, + 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, + 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1EEF0, 0x1EEF1, 0x1F000, 0x1F02B, + 0x1F030, 0x1F093, 0x1F0A0, 0x1F0AE, 0x1F0B1, 0x1F0BF, 0x1F0C1, 0x1F0CF, + 0x1F0D1, 0x1F0F5, 0x1F100, 0x1F1AD, 0x1F1E6, 0x1F202, 0x1F210, 0x1F23B, + 0x1F240, 0x1F248, 0x1F250, 0x1F251, 0x1F260, 0x1F265, 0x1F300, 0x1F6D7, + 0x1F6DD, 0x1F6EC, 0x1F6F0, 0x1F6FC, 0x1F700, 0x1F773, 0x1F780, 0x1F7D8, + 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, 0x1F800, 0x1F80B, 0x1F810, 0x1F847, + 0x1F850, 0x1F859, 0x1F860, 0x1F887, 0x1F890, 0x1F8AD, 0x1F8B0, 0x1F8B1, + 0x1F900, 0x1FA53, 0x1FA60, 0x1FA6D, 0x1FA70, 0x1FA74, 0x1FA78, 0x1FA7C, + 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, 0x1FAB0, 0x1FABA, 0x1FAC0, 0x1FAC5, + 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, 0x1FAF0, 0x1FAF6, 0x1FB00, 0x1FB92, + 0x1FB94, 0x1FBCA, 0x1FBF0, 0x1FBF9, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, + 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, + 0x30000, 0x3134A, + // #66 (10347+353): bp=Grapheme_Extend:Gr_Ext + 0x0300, 0x036F, 0x0483, 0x0489, 0x0591, 0x05BD, 0x05BF, 0x05BF, + 0x05C1, 0x05C2, 0x05C4, 0x05C5, 0x05C7, 0x05C7, 0x0610, 0x061A, + 0x064B, 0x065F, 0x0670, 0x0670, 0x06D6, 0x06DC, 0x06DF, 0x06E4, + 0x06E7, 0x06E8, 0x06EA, 0x06ED, 0x0711, 0x0711, 0x0730, 0x074A, + 0x07A6, 0x07B0, 0x07EB, 0x07F3, 0x07FD, 0x07FD, 0x0816, 0x0819, + 0x081B, 0x0823, 0x0825, 0x0827, 0x0829, 0x082D, 0x0859, 0x085B, + 0x0898, 0x089F, 0x08CA, 0x08E1, 0x08E3, 0x0902, 0x093A, 0x093A, + 0x093C, 0x093C, 0x0941, 0x0948, 0x094D, 0x094D, 0x0951, 0x0957, + 0x0962, 0x0963, 0x0981, 0x0981, 0x09BC, 0x09BC, 0x09BE, 0x09BE, + 0x09C1, 0x09C4, 0x09CD, 0x09CD, 0x09D7, 0x09D7, 0x09E2, 0x09E3, + 0x09FE, 0x09FE, 0x0A01, 0x0A02, 0x0A3C, 0x0A3C, 0x0A41, 0x0A42, + 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A51, 0x0A51, 0x0A70, 0x0A71, + 0x0A75, 0x0A75, 0x0A81, 0x0A82, 0x0ABC, 0x0ABC, 0x0AC1, 0x0AC5, + 0x0AC7, 0x0AC8, 0x0ACD, 0x0ACD, 0x0AE2, 0x0AE3, 0x0AFA, 0x0AFF, + 0x0B01, 0x0B01, 0x0B3C, 0x0B3C, 0x0B3E, 0x0B3F, 0x0B41, 0x0B44, + 0x0B4D, 0x0B4D, 0x0B55, 0x0B57, 0x0B62, 0x0B63, 0x0B82, 0x0B82, + 0x0BBE, 0x0BBE, 0x0BC0, 0x0BC0, 0x0BCD, 0x0BCD, 0x0BD7, 0x0BD7, + 0x0C00, 0x0C00, 0x0C04, 0x0C04, 0x0C3C, 0x0C3C, 0x0C3E, 0x0C40, + 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C62, 0x0C63, + 0x0C81, 0x0C81, 0x0CBC, 0x0CBC, 0x0CBF, 0x0CBF, 0x0CC2, 0x0CC2, + 0x0CC6, 0x0CC6, 0x0CCC, 0x0CCD, 0x0CD5, 0x0CD6, 0x0CE2, 0x0CE3, + 0x0D00, 0x0D01, 0x0D3B, 0x0D3C, 0x0D3E, 0x0D3E, 0x0D41, 0x0D44, + 0x0D4D, 0x0D4D, 0x0D57, 0x0D57, 0x0D62, 0x0D63, 0x0D81, 0x0D81, + 0x0DCA, 0x0DCA, 0x0DCF, 0x0DCF, 0x0DD2, 0x0DD4, 0x0DD6, 0x0DD6, + 0x0DDF, 0x0DDF, 0x0E31, 0x0E31, 0x0E34, 0x0E3A, 0x0E47, 0x0E4E, + 0x0EB1, 0x0EB1, 0x0EB4, 0x0EBC, 0x0EC8, 0x0ECD, 0x0F18, 0x0F19, + 0x0F35, 0x0F35, 0x0F37, 0x0F37, 0x0F39, 0x0F39, 0x0F71, 0x0F7E, + 0x0F80, 0x0F84, 0x0F86, 0x0F87, 0x0F8D, 0x0F97, 0x0F99, 0x0FBC, + 0x0FC6, 0x0FC6, 0x102D, 0x1030, 0x1032, 0x1037, 0x1039, 0x103A, + 0x103D, 0x103E, 0x1058, 0x1059, 0x105E, 0x1060, 0x1071, 0x1074, + 0x1082, 0x1082, 0x1085, 0x1086, 0x108D, 0x108D, 0x109D, 0x109D, + 0x135D, 0x135F, 0x1712, 0x1714, 0x1732, 0x1733, 0x1752, 0x1753, + 0x1772, 0x1773, 0x17B4, 0x17B5, 0x17B7, 0x17BD, 0x17C6, 0x17C6, + 0x17C9, 0x17D3, 0x17DD, 0x17DD, 0x180B, 0x180D, 0x180F, 0x180F, + 0x1885, 0x1886, 0x18A9, 0x18A9, 0x1920, 0x1922, 0x1927, 0x1928, + 0x1932, 0x1932, 0x1939, 0x193B, 0x1A17, 0x1A18, 0x1A1B, 0x1A1B, + 0x1A56, 0x1A56, 0x1A58, 0x1A5E, 0x1A60, 0x1A60, 0x1A62, 0x1A62, + 0x1A65, 0x1A6C, 0x1A73, 0x1A7C, 0x1A7F, 0x1A7F, 0x1AB0, 0x1ACE, + 0x1B00, 0x1B03, 0x1B34, 0x1B3A, 0x1B3C, 0x1B3C, 0x1B42, 0x1B42, + 0x1B6B, 0x1B73, 0x1B80, 0x1B81, 0x1BA2, 0x1BA5, 0x1BA8, 0x1BA9, + 0x1BAB, 0x1BAD, 0x1BE6, 0x1BE6, 0x1BE8, 0x1BE9, 0x1BED, 0x1BED, + 0x1BEF, 0x1BF1, 0x1C2C, 0x1C33, 0x1C36, 0x1C37, 0x1CD0, 0x1CD2, + 0x1CD4, 0x1CE0, 0x1CE2, 0x1CE8, 0x1CED, 0x1CED, 0x1CF4, 0x1CF4, + 0x1CF8, 0x1CF9, 0x1DC0, 0x1DFF, 0x200C, 0x200C, 0x20D0, 0x20F0, + 0x2CEF, 0x2CF1, 0x2D7F, 0x2D7F, 0x2DE0, 0x2DFF, 0x302A, 0x302F, + 0x3099, 0x309A, 0xA66F, 0xA672, 0xA674, 0xA67D, 0xA69E, 0xA69F, + 0xA6F0, 0xA6F1, 0xA802, 0xA802, 0xA806, 0xA806, 0xA80B, 0xA80B, + 0xA825, 0xA826, 0xA82C, 0xA82C, 0xA8C4, 0xA8C5, 0xA8E0, 0xA8F1, + 0xA8FF, 0xA8FF, 0xA926, 0xA92D, 0xA947, 0xA951, 0xA980, 0xA982, + 0xA9B3, 0xA9B3, 0xA9B6, 0xA9B9, 0xA9BC, 0xA9BD, 0xA9E5, 0xA9E5, + 0xAA29, 0xAA2E, 0xAA31, 0xAA32, 0xAA35, 0xAA36, 0xAA43, 0xAA43, + 0xAA4C, 0xAA4C, 0xAA7C, 0xAA7C, 0xAAB0, 0xAAB0, 0xAAB2, 0xAAB4, + 0xAAB7, 0xAAB8, 0xAABE, 0xAABF, 0xAAC1, 0xAAC1, 0xAAEC, 0xAAED, + 0xAAF6, 0xAAF6, 0xABE5, 0xABE5, 0xABE8, 0xABE8, 0xABED, 0xABED, + 0xFB1E, 0xFB1E, 0xFE00, 0xFE0F, 0xFE20, 0xFE2F, 0xFF9E, 0xFF9F, + 0x101FD, 0x101FD, 0x102E0, 0x102E0, 0x10376, 0x1037A, 0x10A01, 0x10A03, + 0x10A05, 0x10A06, 0x10A0C, 0x10A0F, 0x10A38, 0x10A3A, 0x10A3F, 0x10A3F, + 0x10AE5, 0x10AE6, 0x10D24, 0x10D27, 0x10EAB, 0x10EAC, 0x10F46, 0x10F50, + 0x10F82, 0x10F85, 0x11001, 0x11001, 0x11038, 0x11046, 0x11070, 0x11070, + 0x11073, 0x11074, 0x1107F, 0x11081, 0x110B3, 0x110B6, 0x110B9, 0x110BA, + 0x110C2, 0x110C2, 0x11100, 0x11102, 0x11127, 0x1112B, 0x1112D, 0x11134, + 0x11173, 0x11173, 0x11180, 0x11181, 0x111B6, 0x111BE, 0x111C9, 0x111CC, + 0x111CF, 0x111CF, 0x1122F, 0x11231, 0x11234, 0x11234, 0x11236, 0x11237, + 0x1123E, 0x1123E, 0x112DF, 0x112DF, 0x112E3, 0x112EA, 0x11300, 0x11301, + 0x1133B, 0x1133C, 0x1133E, 0x1133E, 0x11340, 0x11340, 0x11357, 0x11357, + 0x11366, 0x1136C, 0x11370, 0x11374, 0x11438, 0x1143F, 0x11442, 0x11444, + 0x11446, 0x11446, 0x1145E, 0x1145E, 0x114B0, 0x114B0, 0x114B3, 0x114B8, + 0x114BA, 0x114BA, 0x114BD, 0x114BD, 0x114BF, 0x114C0, 0x114C2, 0x114C3, + 0x115AF, 0x115AF, 0x115B2, 0x115B5, 0x115BC, 0x115BD, 0x115BF, 0x115C0, + 0x115DC, 0x115DD, 0x11633, 0x1163A, 0x1163D, 0x1163D, 0x1163F, 0x11640, + 0x116AB, 0x116AB, 0x116AD, 0x116AD, 0x116B0, 0x116B5, 0x116B7, 0x116B7, + 0x1171D, 0x1171F, 0x11722, 0x11725, 0x11727, 0x1172B, 0x1182F, 0x11837, + 0x11839, 0x1183A, 0x11930, 0x11930, 0x1193B, 0x1193C, 0x1193E, 0x1193E, + 0x11943, 0x11943, 0x119D4, 0x119D7, 0x119DA, 0x119DB, 0x119E0, 0x119E0, + 0x11A01, 0x11A0A, 0x11A33, 0x11A38, 0x11A3B, 0x11A3E, 0x11A47, 0x11A47, + 0x11A51, 0x11A56, 0x11A59, 0x11A5B, 0x11A8A, 0x11A96, 0x11A98, 0x11A99, + 0x11C30, 0x11C36, 0x11C38, 0x11C3D, 0x11C3F, 0x11C3F, 0x11C92, 0x11CA7, + 0x11CAA, 0x11CB0, 0x11CB2, 0x11CB3, 0x11CB5, 0x11CB6, 0x11D31, 0x11D36, + 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D45, 0x11D47, 0x11D47, + 0x11D90, 0x11D91, 0x11D95, 0x11D95, 0x11D97, 0x11D97, 0x11EF3, 0x11EF4, + 0x16AF0, 0x16AF4, 0x16B30, 0x16B36, 0x16F4F, 0x16F4F, 0x16F8F, 0x16F92, + 0x16FE4, 0x16FE4, 0x1BC9D, 0x1BC9E, 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, + 0x1D165, 0x1D165, 0x1D167, 0x1D169, 0x1D16E, 0x1D172, 0x1D17B, 0x1D182, + 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0x1D242, 0x1D244, 0x1DA00, 0x1DA36, + 0x1DA3B, 0x1DA6C, 0x1DA75, 0x1DA75, 0x1DA84, 0x1DA84, 0x1DA9B, 0x1DA9F, + 0x1DAA1, 0x1DAAF, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, 0x1E130, 0x1E136, 0x1E2AE, 0x1E2AE, + 0x1E2EC, 0x1E2EF, 0x1E8D0, 0x1E8D6, 0x1E944, 0x1E94A, 0xE0020, 0xE007F, + 0xE0100, 0xE01EF, + // #67 (10700+6): bp=Hex_Digit:Hex + 0x0030, 0x0039, 0x0041, 0x0046, 0x0061, 0x0066, 0xFF10, 0xFF19, + 0xFF21, 0xFF26, 0xFF41, 0xFF46, + // #68 (10706+2): bp=IDS_Binary_Operator:IDSB + 0x2FF0, 0x2FF1, 0x2FF4, 0x2FFB, + // #69 (10708+1): bp=IDS_Trinary_Operator:IDST + 0x2FF2, 0x2FF3, + // #70 (10709+756): bp=ID_Continue:IDC + 0x0030, 0x0039, 0x0041, 0x005A, 0x005F, 0x005F, 0x0061, 0x007A, + 0x00AA, 0x00AA, 0x00B5, 0x00B5, 0x00B7, 0x00B7, 0x00BA, 0x00BA, + 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02C1, 0x02C6, 0x02D1, + 0x02E0, 0x02E4, 0x02EC, 0x02EC, 0x02EE, 0x02EE, 0x0300, 0x0374, + 0x0376, 0x0377, 0x037A, 0x037D, 0x037F, 0x037F, 0x0386, 0x038A, + 0x038C, 0x038C, 0x038E, 0x03A1, 0x03A3, 0x03F5, 0x03F7, 0x0481, + 0x0483, 0x0487, 0x048A, 0x052F, 0x0531, 0x0556, 0x0559, 0x0559, + 0x0560, 0x0588, 0x0591, 0x05BD, 0x05BF, 0x05BF, 0x05C1, 0x05C2, + 0x05C4, 0x05C5, 0x05C7, 0x05C7, 0x05D0, 0x05EA, 0x05EF, 0x05F2, + 0x0610, 0x061A, 0x0620, 0x0669, 0x066E, 0x06D3, 0x06D5, 0x06DC, + 0x06DF, 0x06E8, 0x06EA, 0x06FC, 0x06FF, 0x06FF, 0x0710, 0x074A, + 0x074D, 0x07B1, 0x07C0, 0x07F5, 0x07FA, 0x07FA, 0x07FD, 0x07FD, + 0x0800, 0x082D, 0x0840, 0x085B, 0x0860, 0x086A, 0x0870, 0x0887, + 0x0889, 0x088E, 0x0898, 0x08E1, 0x08E3, 0x0963, 0x0966, 0x096F, + 0x0971, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, + 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BC, 0x09C4, + 0x09C7, 0x09C8, 0x09CB, 0x09CE, 0x09D7, 0x09D7, 0x09DC, 0x09DD, + 0x09DF, 0x09E3, 0x09E6, 0x09F1, 0x09FC, 0x09FC, 0x09FE, 0x09FE, + 0x0A01, 0x0A03, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, + 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, + 0x0A3C, 0x0A3C, 0x0A3E, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, + 0x0A51, 0x0A51, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A66, 0x0A75, + 0x0A81, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABC, 0x0AC5, + 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, + 0x0AE6, 0x0AEF, 0x0AF9, 0x0AFF, 0x0B01, 0x0B03, 0x0B05, 0x0B0C, + 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, + 0x0B35, 0x0B39, 0x0B3C, 0x0B44, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, + 0x0B55, 0x0B57, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B63, 0x0B66, 0x0B6F, + 0x0B71, 0x0B71, 0x0B82, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, + 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, + 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BBE, 0x0BC2, + 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0BD0, 0x0BD0, 0x0BD7, 0x0BD7, + 0x0BE6, 0x0BEF, 0x0C00, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, + 0x0C2A, 0x0C39, 0x0C3C, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, + 0x0C55, 0x0C56, 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, 0x0C60, 0x0C63, + 0x0C66, 0x0C6F, 0x0C80, 0x0C83, 0x0C85, 0x0C8C, 0x0C8E, 0x0C90, + 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBC, 0x0CC4, + 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0CDD, 0x0CDE, + 0x0CE0, 0x0CE3, 0x0CE6, 0x0CEF, 0x0CF1, 0x0CF2, 0x0D00, 0x0D0C, + 0x0D0E, 0x0D10, 0x0D12, 0x0D44, 0x0D46, 0x0D48, 0x0D4A, 0x0D4E, + 0x0D54, 0x0D57, 0x0D5F, 0x0D63, 0x0D66, 0x0D6F, 0x0D7A, 0x0D7F, + 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, + 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCA, 0x0DCA, 0x0DCF, 0x0DD4, + 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DE6, 0x0DEF, 0x0DF2, 0x0DF3, + 0x0E01, 0x0E3A, 0x0E40, 0x0E4E, 0x0E50, 0x0E59, 0x0E81, 0x0E82, + 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, + 0x0EA7, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0EC8, 0x0ECD, + 0x0ED0, 0x0ED9, 0x0EDC, 0x0EDF, 0x0F00, 0x0F00, 0x0F18, 0x0F19, + 0x0F20, 0x0F29, 0x0F35, 0x0F35, 0x0F37, 0x0F37, 0x0F39, 0x0F39, + 0x0F3E, 0x0F47, 0x0F49, 0x0F6C, 0x0F71, 0x0F84, 0x0F86, 0x0F97, + 0x0F99, 0x0FBC, 0x0FC6, 0x0FC6, 0x1000, 0x1049, 0x1050, 0x109D, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x135D, 0x135F, 0x1369, 0x1371, 0x1380, 0x138F, 0x13A0, 0x13F5, + 0x13F8, 0x13FD, 0x1401, 0x166C, 0x166F, 0x167F, 0x1681, 0x169A, + 0x16A0, 0x16EA, 0x16EE, 0x16F8, 0x1700, 0x1715, 0x171F, 0x1734, + 0x1740, 0x1753, 0x1760, 0x176C, 0x176E, 0x1770, 0x1772, 0x1773, + 0x1780, 0x17D3, 0x17D7, 0x17D7, 0x17DC, 0x17DD, 0x17E0, 0x17E9, + 0x180B, 0x180D, 0x180F, 0x1819, 0x1820, 0x1878, 0x1880, 0x18AA, + 0x18B0, 0x18F5, 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x193B, + 0x1946, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, 0x19B0, 0x19C9, + 0x19D0, 0x19DA, 0x1A00, 0x1A1B, 0x1A20, 0x1A5E, 0x1A60, 0x1A7C, + 0x1A7F, 0x1A89, 0x1A90, 0x1A99, 0x1AA7, 0x1AA7, 0x1AB0, 0x1ABD, + 0x1ABF, 0x1ACE, 0x1B00, 0x1B4C, 0x1B50, 0x1B59, 0x1B6B, 0x1B73, + 0x1B80, 0x1BF3, 0x1C00, 0x1C37, 0x1C40, 0x1C49, 0x1C4D, 0x1C7D, + 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1CD0, 0x1CD2, + 0x1CD4, 0x1CFA, 0x1D00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, + 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, + 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, + 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, + 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, + 0x203F, 0x2040, 0x2054, 0x2054, 0x2071, 0x2071, 0x207F, 0x207F, + 0x2090, 0x209C, 0x20D0, 0x20DC, 0x20E1, 0x20E1, 0x20E5, 0x20F0, + 0x2102, 0x2102, 0x2107, 0x2107, 0x210A, 0x2113, 0x2115, 0x2115, + 0x2118, 0x211D, 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, + 0x212A, 0x2139, 0x213C, 0x213F, 0x2145, 0x2149, 0x214E, 0x214E, + 0x2160, 0x2188, 0x2C00, 0x2CE4, 0x2CEB, 0x2CF3, 0x2D00, 0x2D25, + 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, 0x2D30, 0x2D67, 0x2D6F, 0x2D6F, + 0x2D7F, 0x2D96, 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, + 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, + 0x2DD8, 0x2DDE, 0x2DE0, 0x2DFF, 0x3005, 0x3007, 0x3021, 0x302F, + 0x3031, 0x3035, 0x3038, 0x303C, 0x3041, 0x3096, 0x3099, 0x309F, + 0x30A1, 0x30FA, 0x30FC, 0x30FF, 0x3105, 0x312F, 0x3131, 0x318E, + 0x31A0, 0x31BF, 0x31F0, 0x31FF, 0x3400, 0x4DBF, 0x4E00, 0xA48C, + 0xA4D0, 0xA4FD, 0xA500, 0xA60C, 0xA610, 0xA62B, 0xA640, 0xA66F, + 0xA674, 0xA67D, 0xA67F, 0xA6F1, 0xA717, 0xA71F, 0xA722, 0xA788, + 0xA78B, 0xA7CA, 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, + 0xA7F2, 0xA827, 0xA82C, 0xA82C, 0xA840, 0xA873, 0xA880, 0xA8C5, + 0xA8D0, 0xA8D9, 0xA8E0, 0xA8F7, 0xA8FB, 0xA8FB, 0xA8FD, 0xA92D, + 0xA930, 0xA953, 0xA960, 0xA97C, 0xA980, 0xA9C0, 0xA9CF, 0xA9D9, + 0xA9E0, 0xA9FE, 0xAA00, 0xAA36, 0xAA40, 0xAA4D, 0xAA50, 0xAA59, + 0xAA60, 0xAA76, 0xAA7A, 0xAAC2, 0xAADB, 0xAADD, 0xAAE0, 0xAAEF, + 0xAAF2, 0xAAF6, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, 0xAB11, 0xAB16, + 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB5A, 0xAB5C, 0xAB69, + 0xAB70, 0xABEA, 0xABEC, 0xABED, 0xABF0, 0xABF9, 0xAC00, 0xD7A3, + 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, + 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFB1D, 0xFB28, 0xFB2A, 0xFB36, + 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, + 0xFB46, 0xFBB1, 0xFBD3, 0xFD3D, 0xFD50, 0xFD8F, 0xFD92, 0xFDC7, + 0xFDF0, 0xFDFB, 0xFE00, 0xFE0F, 0xFE20, 0xFE2F, 0xFE33, 0xFE34, + 0xFE4D, 0xFE4F, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0xFF10, 0xFF19, + 0xFF21, 0xFF3A, 0xFF3F, 0xFF3F, 0xFF41, 0xFF5A, 0xFF66, 0xFFBE, + 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, + 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, + 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, 0x10140, 0x10174, + 0x101FD, 0x101FD, 0x10280, 0x1029C, 0x102A0, 0x102D0, 0x102E0, 0x102E0, + 0x10300, 0x1031F, 0x1032D, 0x1034A, 0x10350, 0x1037A, 0x10380, 0x1039D, + 0x103A0, 0x103C3, 0x103C8, 0x103CF, 0x103D1, 0x103D5, 0x10400, 0x1049D, + 0x104A0, 0x104A9, 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10500, 0x10527, + 0x10530, 0x10563, 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, + 0x10594, 0x10595, 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, + 0x105BB, 0x105BC, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10800, 0x10805, + 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, + 0x1083F, 0x10855, 0x10860, 0x10876, 0x10880, 0x1089E, 0x108E0, 0x108F2, + 0x108F4, 0x108F5, 0x10900, 0x10915, 0x10920, 0x10939, 0x10980, 0x109B7, + 0x109BE, 0x109BF, 0x10A00, 0x10A03, 0x10A05, 0x10A06, 0x10A0C, 0x10A13, + 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A38, 0x10A3A, 0x10A3F, 0x10A3F, + 0x10A60, 0x10A7C, 0x10A80, 0x10A9C, 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE6, + 0x10B00, 0x10B35, 0x10B40, 0x10B55, 0x10B60, 0x10B72, 0x10B80, 0x10B91, + 0x10C00, 0x10C48, 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10D00, 0x10D27, + 0x10D30, 0x10D39, 0x10E80, 0x10EA9, 0x10EAB, 0x10EAC, 0x10EB0, 0x10EB1, + 0x10F00, 0x10F1C, 0x10F27, 0x10F27, 0x10F30, 0x10F50, 0x10F70, 0x10F85, + 0x10FB0, 0x10FC4, 0x10FE0, 0x10FF6, 0x11000, 0x11046, 0x11066, 0x11075, + 0x1107F, 0x110BA, 0x110C2, 0x110C2, 0x110D0, 0x110E8, 0x110F0, 0x110F9, + 0x11100, 0x11134, 0x11136, 0x1113F, 0x11144, 0x11147, 0x11150, 0x11173, + 0x11176, 0x11176, 0x11180, 0x111C4, 0x111C9, 0x111CC, 0x111CE, 0x111DA, + 0x111DC, 0x111DC, 0x11200, 0x11211, 0x11213, 0x11237, 0x1123E, 0x1123E, + 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, + 0x1129F, 0x112A8, 0x112B0, 0x112EA, 0x112F0, 0x112F9, 0x11300, 0x11303, + 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, 0x1132A, 0x11330, + 0x11332, 0x11333, 0x11335, 0x11339, 0x1133B, 0x11344, 0x11347, 0x11348, + 0x1134B, 0x1134D, 0x11350, 0x11350, 0x11357, 0x11357, 0x1135D, 0x11363, + 0x11366, 0x1136C, 0x11370, 0x11374, 0x11400, 0x1144A, 0x11450, 0x11459, + 0x1145E, 0x11461, 0x11480, 0x114C5, 0x114C7, 0x114C7, 0x114D0, 0x114D9, + 0x11580, 0x115B5, 0x115B8, 0x115C0, 0x115D8, 0x115DD, 0x11600, 0x11640, + 0x11644, 0x11644, 0x11650, 0x11659, 0x11680, 0x116B8, 0x116C0, 0x116C9, + 0x11700, 0x1171A, 0x1171D, 0x1172B, 0x11730, 0x11739, 0x11740, 0x11746, + 0x11800, 0x1183A, 0x118A0, 0x118E9, 0x118FF, 0x11906, 0x11909, 0x11909, + 0x1190C, 0x11913, 0x11915, 0x11916, 0x11918, 0x11935, 0x11937, 0x11938, + 0x1193B, 0x11943, 0x11950, 0x11959, 0x119A0, 0x119A7, 0x119AA, 0x119D7, + 0x119DA, 0x119E1, 0x119E3, 0x119E4, 0x11A00, 0x11A3E, 0x11A47, 0x11A47, + 0x11A50, 0x11A99, 0x11A9D, 0x11A9D, 0x11AB0, 0x11AF8, 0x11C00, 0x11C08, + 0x11C0A, 0x11C36, 0x11C38, 0x11C40, 0x11C50, 0x11C59, 0x11C72, 0x11C8F, + 0x11C92, 0x11CA7, 0x11CA9, 0x11CB6, 0x11D00, 0x11D06, 0x11D08, 0x11D09, + 0x11D0B, 0x11D36, 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D47, + 0x11D50, 0x11D59, 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, + 0x11D90, 0x11D91, 0x11D93, 0x11D98, 0x11DA0, 0x11DA9, 0x11EE0, 0x11EF6, + 0x11FB0, 0x11FB0, 0x12000, 0x12399, 0x12400, 0x1246E, 0x12480, 0x12543, + 0x12F90, 0x12FF0, 0x13000, 0x1342E, 0x14400, 0x14646, 0x16800, 0x16A38, + 0x16A40, 0x16A5E, 0x16A60, 0x16A69, 0x16A70, 0x16ABE, 0x16AC0, 0x16AC9, + 0x16AD0, 0x16AED, 0x16AF0, 0x16AF4, 0x16B00, 0x16B36, 0x16B40, 0x16B43, + 0x16B50, 0x16B59, 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, 0x16E40, 0x16E7F, + 0x16F00, 0x16F4A, 0x16F4F, 0x16F87, 0x16F8F, 0x16F9F, 0x16FE0, 0x16FE1, + 0x16FE3, 0x16FE4, 0x16FF0, 0x16FF1, 0x17000, 0x187F7, 0x18800, 0x18CD5, + 0x18D00, 0x18D08, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, + 0x1B000, 0x1B122, 0x1B150, 0x1B152, 0x1B164, 0x1B167, 0x1B170, 0x1B2FB, + 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, + 0x1BC9D, 0x1BC9E, 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1D165, 0x1D169, + 0x1D16D, 0x1D172, 0x1D17B, 0x1D182, 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, + 0x1D242, 0x1D244, 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, + 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, + 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, + 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, + 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, + 0x1D6A8, 0x1D6C0, 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6FA, 0x1D6FC, 0x1D714, + 0x1D716, 0x1D734, 0x1D736, 0x1D74E, 0x1D750, 0x1D76E, 0x1D770, 0x1D788, + 0x1D78A, 0x1D7A8, 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7CB, 0x1D7CE, 0x1D7FF, + 0x1DA00, 0x1DA36, 0x1DA3B, 0x1DA6C, 0x1DA75, 0x1DA75, 0x1DA84, 0x1DA84, + 0x1DA9B, 0x1DA9F, 0x1DAA1, 0x1DAAF, 0x1DF00, 0x1DF1E, 0x1E000, 0x1E006, + 0x1E008, 0x1E018, 0x1E01B, 0x1E021, 0x1E023, 0x1E024, 0x1E026, 0x1E02A, + 0x1E100, 0x1E12C, 0x1E130, 0x1E13D, 0x1E140, 0x1E149, 0x1E14E, 0x1E14E, + 0x1E290, 0x1E2AE, 0x1E2C0, 0x1E2F9, 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, + 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, 0x1E800, 0x1E8C4, 0x1E8D0, 0x1E8D6, + 0x1E900, 0x1E94B, 0x1E950, 0x1E959, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, + 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, + 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, + 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, + 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, + 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, + 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, + 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, + 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1FBF0, 0x1FBF9, + 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, + 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, 0xE0100, 0xE01EF, + // #71 (11465+648): bp=ID_Start:IDS + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00B5, 0x00B5, + 0x00BA, 0x00BA, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02C1, + 0x02C6, 0x02D1, 0x02E0, 0x02E4, 0x02EC, 0x02EC, 0x02EE, 0x02EE, + 0x0370, 0x0374, 0x0376, 0x0377, 0x037A, 0x037D, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, + 0x03A3, 0x03F5, 0x03F7, 0x0481, 0x048A, 0x052F, 0x0531, 0x0556, + 0x0559, 0x0559, 0x0560, 0x0588, 0x05D0, 0x05EA, 0x05EF, 0x05F2, + 0x0620, 0x064A, 0x066E, 0x066F, 0x0671, 0x06D3, 0x06D5, 0x06D5, + 0x06E5, 0x06E6, 0x06EE, 0x06EF, 0x06FA, 0x06FC, 0x06FF, 0x06FF, + 0x0710, 0x0710, 0x0712, 0x072F, 0x074D, 0x07A5, 0x07B1, 0x07B1, + 0x07CA, 0x07EA, 0x07F4, 0x07F5, 0x07FA, 0x07FA, 0x0800, 0x0815, + 0x081A, 0x081A, 0x0824, 0x0824, 0x0828, 0x0828, 0x0840, 0x0858, + 0x0860, 0x086A, 0x0870, 0x0887, 0x0889, 0x088E, 0x08A0, 0x08C9, + 0x0904, 0x0939, 0x093D, 0x093D, 0x0950, 0x0950, 0x0958, 0x0961, + 0x0971, 0x0980, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, + 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BD, 0x09BD, + 0x09CE, 0x09CE, 0x09DC, 0x09DD, 0x09DF, 0x09E1, 0x09F0, 0x09F1, + 0x09FC, 0x09FC, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, + 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, + 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A72, 0x0A74, 0x0A85, 0x0A8D, + 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, + 0x0AB5, 0x0AB9, 0x0ABD, 0x0ABD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE1, + 0x0AF9, 0x0AF9, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, + 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B35, 0x0B39, 0x0B3D, 0x0B3D, + 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, 0x0B71, 0x0B71, 0x0B83, 0x0B83, + 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, + 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, + 0x0BAE, 0x0BB9, 0x0BD0, 0x0BD0, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, + 0x0C12, 0x0C28, 0x0C2A, 0x0C39, 0x0C3D, 0x0C3D, 0x0C58, 0x0C5A, + 0x0C5D, 0x0C5D, 0x0C60, 0x0C61, 0x0C80, 0x0C80, 0x0C85, 0x0C8C, + 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, + 0x0CBD, 0x0CBD, 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE1, 0x0CF1, 0x0CF2, + 0x0D04, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D3A, 0x0D3D, 0x0D3D, + 0x0D4E, 0x0D4E, 0x0D54, 0x0D56, 0x0D5F, 0x0D61, 0x0D7A, 0x0D7F, + 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, + 0x0DC0, 0x0DC6, 0x0E01, 0x0E30, 0x0E32, 0x0E33, 0x0E40, 0x0E46, + 0x0E81, 0x0E82, 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, + 0x0EA5, 0x0EA5, 0x0EA7, 0x0EB0, 0x0EB2, 0x0EB3, 0x0EBD, 0x0EBD, + 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0EDC, 0x0EDF, 0x0F00, 0x0F00, + 0x0F40, 0x0F47, 0x0F49, 0x0F6C, 0x0F88, 0x0F8C, 0x1000, 0x102A, + 0x103F, 0x103F, 0x1050, 0x1055, 0x105A, 0x105D, 0x1061, 0x1061, + 0x1065, 0x1066, 0x106E, 0x1070, 0x1075, 0x1081, 0x108E, 0x108E, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x1380, 0x138F, 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0x1401, 0x166C, + 0x166F, 0x167F, 0x1681, 0x169A, 0x16A0, 0x16EA, 0x16EE, 0x16F8, + 0x1700, 0x1711, 0x171F, 0x1731, 0x1740, 0x1751, 0x1760, 0x176C, + 0x176E, 0x1770, 0x1780, 0x17B3, 0x17D7, 0x17D7, 0x17DC, 0x17DC, + 0x1820, 0x1878, 0x1880, 0x18A8, 0x18AA, 0x18AA, 0x18B0, 0x18F5, + 0x1900, 0x191E, 0x1950, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, + 0x19B0, 0x19C9, 0x1A00, 0x1A16, 0x1A20, 0x1A54, 0x1AA7, 0x1AA7, + 0x1B05, 0x1B33, 0x1B45, 0x1B4C, 0x1B83, 0x1BA0, 0x1BAE, 0x1BAF, + 0x1BBA, 0x1BE5, 0x1C00, 0x1C23, 0x1C4D, 0x1C4F, 0x1C5A, 0x1C7D, + 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF6, 0x1CFA, 0x1CFA, 0x1D00, 0x1DBF, + 0x1E00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, + 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, + 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, 0x1FBE, 0x1FBE, + 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, + 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, 0x2071, 0x2071, + 0x207F, 0x207F, 0x2090, 0x209C, 0x2102, 0x2102, 0x2107, 0x2107, + 0x210A, 0x2113, 0x2115, 0x2115, 0x2118, 0x211D, 0x2124, 0x2124, + 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x2139, 0x213C, 0x213F, + 0x2145, 0x2149, 0x214E, 0x214E, 0x2160, 0x2188, 0x2C00, 0x2CE4, + 0x2CEB, 0x2CEE, 0x2CF2, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, + 0x2D2D, 0x2D2D, 0x2D30, 0x2D67, 0x2D6F, 0x2D6F, 0x2D80, 0x2D96, + 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, + 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, + 0x3005, 0x3007, 0x3021, 0x3029, 0x3031, 0x3035, 0x3038, 0x303C, + 0x3041, 0x3096, 0x309B, 0x309F, 0x30A1, 0x30FA, 0x30FC, 0x30FF, + 0x3105, 0x312F, 0x3131, 0x318E, 0x31A0, 0x31BF, 0x31F0, 0x31FF, + 0x3400, 0x4DBF, 0x4E00, 0xA48C, 0xA4D0, 0xA4FD, 0xA500, 0xA60C, + 0xA610, 0xA61F, 0xA62A, 0xA62B, 0xA640, 0xA66E, 0xA67F, 0xA69D, + 0xA6A0, 0xA6EF, 0xA717, 0xA71F, 0xA722, 0xA788, 0xA78B, 0xA7CA, + 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, 0xA7F2, 0xA801, + 0xA803, 0xA805, 0xA807, 0xA80A, 0xA80C, 0xA822, 0xA840, 0xA873, + 0xA882, 0xA8B3, 0xA8F2, 0xA8F7, 0xA8FB, 0xA8FB, 0xA8FD, 0xA8FE, + 0xA90A, 0xA925, 0xA930, 0xA946, 0xA960, 0xA97C, 0xA984, 0xA9B2, + 0xA9CF, 0xA9CF, 0xA9E0, 0xA9E4, 0xA9E6, 0xA9EF, 0xA9FA, 0xA9FE, + 0xAA00, 0xAA28, 0xAA40, 0xAA42, 0xAA44, 0xAA4B, 0xAA60, 0xAA76, + 0xAA7A, 0xAA7A, 0xAA7E, 0xAAAF, 0xAAB1, 0xAAB1, 0xAAB5, 0xAAB6, + 0xAAB9, 0xAABD, 0xAAC0, 0xAAC0, 0xAAC2, 0xAAC2, 0xAADB, 0xAADD, + 0xAAE0, 0xAAEA, 0xAAF2, 0xAAF4, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, + 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB5A, + 0xAB5C, 0xAB69, 0xAB70, 0xABE2, 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, + 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0xFB00, 0xFB06, + 0xFB13, 0xFB17, 0xFB1D, 0xFB1D, 0xFB1F, 0xFB28, 0xFB2A, 0xFB36, + 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, + 0xFB46, 0xFBB1, 0xFBD3, 0xFD3D, 0xFD50, 0xFD8F, 0xFD92, 0xFDC7, + 0xFDF0, 0xFDFB, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0xFF21, 0xFF3A, + 0xFF41, 0xFF5A, 0xFF66, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, + 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, 0x10000, 0x1000B, 0x1000D, 0x10026, + 0x10028, 0x1003A, 0x1003C, 0x1003D, 0x1003F, 0x1004D, 0x10050, 0x1005D, + 0x10080, 0x100FA, 0x10140, 0x10174, 0x10280, 0x1029C, 0x102A0, 0x102D0, + 0x10300, 0x1031F, 0x1032D, 0x1034A, 0x10350, 0x10375, 0x10380, 0x1039D, + 0x103A0, 0x103C3, 0x103C8, 0x103CF, 0x103D1, 0x103D5, 0x10400, 0x1049D, + 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, + 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, + 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, 0x10780, 0x10785, + 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10800, 0x10805, 0x10808, 0x10808, + 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, 0x1083F, 0x10855, + 0x10860, 0x10876, 0x10880, 0x1089E, 0x108E0, 0x108F2, 0x108F4, 0x108F5, + 0x10900, 0x10915, 0x10920, 0x10939, 0x10980, 0x109B7, 0x109BE, 0x109BF, + 0x10A00, 0x10A00, 0x10A10, 0x10A13, 0x10A15, 0x10A17, 0x10A19, 0x10A35, + 0x10A60, 0x10A7C, 0x10A80, 0x10A9C, 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE4, + 0x10B00, 0x10B35, 0x10B40, 0x10B55, 0x10B60, 0x10B72, 0x10B80, 0x10B91, + 0x10C00, 0x10C48, 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10D00, 0x10D23, + 0x10E80, 0x10EA9, 0x10EB0, 0x10EB1, 0x10F00, 0x10F1C, 0x10F27, 0x10F27, + 0x10F30, 0x10F45, 0x10F70, 0x10F81, 0x10FB0, 0x10FC4, 0x10FE0, 0x10FF6, + 0x11003, 0x11037, 0x11071, 0x11072, 0x11075, 0x11075, 0x11083, 0x110AF, + 0x110D0, 0x110E8, 0x11103, 0x11126, 0x11144, 0x11144, 0x11147, 0x11147, + 0x11150, 0x11172, 0x11176, 0x11176, 0x11183, 0x111B2, 0x111C1, 0x111C4, + 0x111DA, 0x111DA, 0x111DC, 0x111DC, 0x11200, 0x11211, 0x11213, 0x1122B, + 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, + 0x1129F, 0x112A8, 0x112B0, 0x112DE, 0x11305, 0x1130C, 0x1130F, 0x11310, + 0x11313, 0x11328, 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, + 0x1133D, 0x1133D, 0x11350, 0x11350, 0x1135D, 0x11361, 0x11400, 0x11434, + 0x11447, 0x1144A, 0x1145F, 0x11461, 0x11480, 0x114AF, 0x114C4, 0x114C5, + 0x114C7, 0x114C7, 0x11580, 0x115AE, 0x115D8, 0x115DB, 0x11600, 0x1162F, + 0x11644, 0x11644, 0x11680, 0x116AA, 0x116B8, 0x116B8, 0x11700, 0x1171A, + 0x11740, 0x11746, 0x11800, 0x1182B, 0x118A0, 0x118DF, 0x118FF, 0x11906, + 0x11909, 0x11909, 0x1190C, 0x11913, 0x11915, 0x11916, 0x11918, 0x1192F, + 0x1193F, 0x1193F, 0x11941, 0x11941, 0x119A0, 0x119A7, 0x119AA, 0x119D0, + 0x119E1, 0x119E1, 0x119E3, 0x119E3, 0x11A00, 0x11A00, 0x11A0B, 0x11A32, + 0x11A3A, 0x11A3A, 0x11A50, 0x11A50, 0x11A5C, 0x11A89, 0x11A9D, 0x11A9D, + 0x11AB0, 0x11AF8, 0x11C00, 0x11C08, 0x11C0A, 0x11C2E, 0x11C40, 0x11C40, + 0x11C72, 0x11C8F, 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D30, + 0x11D46, 0x11D46, 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D89, + 0x11D98, 0x11D98, 0x11EE0, 0x11EF2, 0x11FB0, 0x11FB0, 0x12000, 0x12399, + 0x12400, 0x1246E, 0x12480, 0x12543, 0x12F90, 0x12FF0, 0x13000, 0x1342E, + 0x14400, 0x14646, 0x16800, 0x16A38, 0x16A40, 0x16A5E, 0x16A70, 0x16ABE, + 0x16AD0, 0x16AED, 0x16B00, 0x16B2F, 0x16B40, 0x16B43, 0x16B63, 0x16B77, + 0x16B7D, 0x16B8F, 0x16E40, 0x16E7F, 0x16F00, 0x16F4A, 0x16F50, 0x16F50, + 0x16F93, 0x16F9F, 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE3, 0x17000, 0x187F7, + 0x18800, 0x18CD5, 0x18D00, 0x18D08, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, + 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B122, 0x1B150, 0x1B152, 0x1B164, 0x1B167, + 0x1B170, 0x1B2FB, 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, + 0x1BC90, 0x1BC99, 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, + 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, + 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, + 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, + 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, + 0x1D6A8, 0x1D6C0, 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6FA, 0x1D6FC, 0x1D714, + 0x1D716, 0x1D734, 0x1D736, 0x1D74E, 0x1D750, 0x1D76E, 0x1D770, 0x1D788, + 0x1D78A, 0x1D7A8, 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7CB, 0x1DF00, 0x1DF1E, + 0x1E100, 0x1E12C, 0x1E137, 0x1E13D, 0x1E14E, 0x1E14E, 0x1E290, 0x1E2AD, + 0x1E2C0, 0x1E2EB, 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, + 0x1E7F0, 0x1E7FE, 0x1E800, 0x1E8C4, 0x1E900, 0x1E943, 0x1E94B, 0x1E94B, + 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, + 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, + 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, + 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, + 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, + 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, + 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, + 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, + 0x1EEAB, 0x1EEBB, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, + 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, + // #72 (12113+19): bp=Ideographic:Ideo + 0x3006, 0x3007, 0x3021, 0x3029, 0x3038, 0x303A, 0x3400, 0x4DBF, + 0x4E00, 0x9FFF, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0x16FE4, 0x16FE4, + 0x17000, 0x187F7, 0x18800, 0x18CD5, 0x18D00, 0x18D08, 0x1B170, 0x1B2FB, + 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, + 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, + // #73 (12132+1): bp=Join_Control:Join_C + 0x200C, 0x200D, + // #74 (12133+7): bp=Logical_Order_Exception:LOE + 0x0E40, 0x0E44, 0x0EC0, 0x0EC4, 0x19B5, 0x19B7, 0x19BA, 0x19BA, + 0xAAB5, 0xAAB6, 0xAAB9, 0xAAB9, 0xAABB, 0xAABC, + // #75 (12140+668): bp=Lowercase:Lower + 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00B5, 0x00B5, 0x00BA, 0x00BA, + 0x00DF, 0x00F6, 0x00F8, 0x00FF, 0x0101, 0x0101, 0x0103, 0x0103, + 0x0105, 0x0105, 0x0107, 0x0107, 0x0109, 0x0109, 0x010B, 0x010B, + 0x010D, 0x010D, 0x010F, 0x010F, 0x0111, 0x0111, 0x0113, 0x0113, + 0x0115, 0x0115, 0x0117, 0x0117, 0x0119, 0x0119, 0x011B, 0x011B, + 0x011D, 0x011D, 0x011F, 0x011F, 0x0121, 0x0121, 0x0123, 0x0123, + 0x0125, 0x0125, 0x0127, 0x0127, 0x0129, 0x0129, 0x012B, 0x012B, + 0x012D, 0x012D, 0x012F, 0x012F, 0x0131, 0x0131, 0x0133, 0x0133, + 0x0135, 0x0135, 0x0137, 0x0138, 0x013A, 0x013A, 0x013C, 0x013C, + 0x013E, 0x013E, 0x0140, 0x0140, 0x0142, 0x0142, 0x0144, 0x0144, + 0x0146, 0x0146, 0x0148, 0x0149, 0x014B, 0x014B, 0x014D, 0x014D, + 0x014F, 0x014F, 0x0151, 0x0151, 0x0153, 0x0153, 0x0155, 0x0155, + 0x0157, 0x0157, 0x0159, 0x0159, 0x015B, 0x015B, 0x015D, 0x015D, + 0x015F, 0x015F, 0x0161, 0x0161, 0x0163, 0x0163, 0x0165, 0x0165, + 0x0167, 0x0167, 0x0169, 0x0169, 0x016B, 0x016B, 0x016D, 0x016D, + 0x016F, 0x016F, 0x0171, 0x0171, 0x0173, 0x0173, 0x0175, 0x0175, + 0x0177, 0x0177, 0x017A, 0x017A, 0x017C, 0x017C, 0x017E, 0x0180, + 0x0183, 0x0183, 0x0185, 0x0185, 0x0188, 0x0188, 0x018C, 0x018D, + 0x0192, 0x0192, 0x0195, 0x0195, 0x0199, 0x019B, 0x019E, 0x019E, + 0x01A1, 0x01A1, 0x01A3, 0x01A3, 0x01A5, 0x01A5, 0x01A8, 0x01A8, + 0x01AA, 0x01AB, 0x01AD, 0x01AD, 0x01B0, 0x01B0, 0x01B4, 0x01B4, + 0x01B6, 0x01B6, 0x01B9, 0x01BA, 0x01BD, 0x01BF, 0x01C6, 0x01C6, + 0x01C9, 0x01C9, 0x01CC, 0x01CC, 0x01CE, 0x01CE, 0x01D0, 0x01D0, + 0x01D2, 0x01D2, 0x01D4, 0x01D4, 0x01D6, 0x01D6, 0x01D8, 0x01D8, + 0x01DA, 0x01DA, 0x01DC, 0x01DD, 0x01DF, 0x01DF, 0x01E1, 0x01E1, + 0x01E3, 0x01E3, 0x01E5, 0x01E5, 0x01E7, 0x01E7, 0x01E9, 0x01E9, + 0x01EB, 0x01EB, 0x01ED, 0x01ED, 0x01EF, 0x01F0, 0x01F3, 0x01F3, + 0x01F5, 0x01F5, 0x01F9, 0x01F9, 0x01FB, 0x01FB, 0x01FD, 0x01FD, + 0x01FF, 0x01FF, 0x0201, 0x0201, 0x0203, 0x0203, 0x0205, 0x0205, + 0x0207, 0x0207, 0x0209, 0x0209, 0x020B, 0x020B, 0x020D, 0x020D, + 0x020F, 0x020F, 0x0211, 0x0211, 0x0213, 0x0213, 0x0215, 0x0215, + 0x0217, 0x0217, 0x0219, 0x0219, 0x021B, 0x021B, 0x021D, 0x021D, + 0x021F, 0x021F, 0x0221, 0x0221, 0x0223, 0x0223, 0x0225, 0x0225, + 0x0227, 0x0227, 0x0229, 0x0229, 0x022B, 0x022B, 0x022D, 0x022D, + 0x022F, 0x022F, 0x0231, 0x0231, 0x0233, 0x0239, 0x023C, 0x023C, + 0x023F, 0x0240, 0x0242, 0x0242, 0x0247, 0x0247, 0x0249, 0x0249, + 0x024B, 0x024B, 0x024D, 0x024D, 0x024F, 0x0293, 0x0295, 0x02B8, + 0x02C0, 0x02C1, 0x02E0, 0x02E4, 0x0345, 0x0345, 0x0371, 0x0371, + 0x0373, 0x0373, 0x0377, 0x0377, 0x037A, 0x037D, 0x0390, 0x0390, + 0x03AC, 0x03CE, 0x03D0, 0x03D1, 0x03D5, 0x03D7, 0x03D9, 0x03D9, + 0x03DB, 0x03DB, 0x03DD, 0x03DD, 0x03DF, 0x03DF, 0x03E1, 0x03E1, + 0x03E3, 0x03E3, 0x03E5, 0x03E5, 0x03E7, 0x03E7, 0x03E9, 0x03E9, + 0x03EB, 0x03EB, 0x03ED, 0x03ED, 0x03EF, 0x03F3, 0x03F5, 0x03F5, + 0x03F8, 0x03F8, 0x03FB, 0x03FC, 0x0430, 0x045F, 0x0461, 0x0461, + 0x0463, 0x0463, 0x0465, 0x0465, 0x0467, 0x0467, 0x0469, 0x0469, + 0x046B, 0x046B, 0x046D, 0x046D, 0x046F, 0x046F, 0x0471, 0x0471, + 0x0473, 0x0473, 0x0475, 0x0475, 0x0477, 0x0477, 0x0479, 0x0479, + 0x047B, 0x047B, 0x047D, 0x047D, 0x047F, 0x047F, 0x0481, 0x0481, + 0x048B, 0x048B, 0x048D, 0x048D, 0x048F, 0x048F, 0x0491, 0x0491, + 0x0493, 0x0493, 0x0495, 0x0495, 0x0497, 0x0497, 0x0499, 0x0499, + 0x049B, 0x049B, 0x049D, 0x049D, 0x049F, 0x049F, 0x04A1, 0x04A1, + 0x04A3, 0x04A3, 0x04A5, 0x04A5, 0x04A7, 0x04A7, 0x04A9, 0x04A9, + 0x04AB, 0x04AB, 0x04AD, 0x04AD, 0x04AF, 0x04AF, 0x04B1, 0x04B1, + 0x04B3, 0x04B3, 0x04B5, 0x04B5, 0x04B7, 0x04B7, 0x04B9, 0x04B9, + 0x04BB, 0x04BB, 0x04BD, 0x04BD, 0x04BF, 0x04BF, 0x04C2, 0x04C2, + 0x04C4, 0x04C4, 0x04C6, 0x04C6, 0x04C8, 0x04C8, 0x04CA, 0x04CA, + 0x04CC, 0x04CC, 0x04CE, 0x04CF, 0x04D1, 0x04D1, 0x04D3, 0x04D3, + 0x04D5, 0x04D5, 0x04D7, 0x04D7, 0x04D9, 0x04D9, 0x04DB, 0x04DB, + 0x04DD, 0x04DD, 0x04DF, 0x04DF, 0x04E1, 0x04E1, 0x04E3, 0x04E3, + 0x04E5, 0x04E5, 0x04E7, 0x04E7, 0x04E9, 0x04E9, 0x04EB, 0x04EB, + 0x04ED, 0x04ED, 0x04EF, 0x04EF, 0x04F1, 0x04F1, 0x04F3, 0x04F3, + 0x04F5, 0x04F5, 0x04F7, 0x04F7, 0x04F9, 0x04F9, 0x04FB, 0x04FB, + 0x04FD, 0x04FD, 0x04FF, 0x04FF, 0x0501, 0x0501, 0x0503, 0x0503, + 0x0505, 0x0505, 0x0507, 0x0507, 0x0509, 0x0509, 0x050B, 0x050B, + 0x050D, 0x050D, 0x050F, 0x050F, 0x0511, 0x0511, 0x0513, 0x0513, + 0x0515, 0x0515, 0x0517, 0x0517, 0x0519, 0x0519, 0x051B, 0x051B, + 0x051D, 0x051D, 0x051F, 0x051F, 0x0521, 0x0521, 0x0523, 0x0523, + 0x0525, 0x0525, 0x0527, 0x0527, 0x0529, 0x0529, 0x052B, 0x052B, + 0x052D, 0x052D, 0x052F, 0x052F, 0x0560, 0x0588, 0x10D0, 0x10FA, + 0x10FD, 0x10FF, 0x13F8, 0x13FD, 0x1C80, 0x1C88, 0x1D00, 0x1DBF, + 0x1E01, 0x1E01, 0x1E03, 0x1E03, 0x1E05, 0x1E05, 0x1E07, 0x1E07, + 0x1E09, 0x1E09, 0x1E0B, 0x1E0B, 0x1E0D, 0x1E0D, 0x1E0F, 0x1E0F, + 0x1E11, 0x1E11, 0x1E13, 0x1E13, 0x1E15, 0x1E15, 0x1E17, 0x1E17, + 0x1E19, 0x1E19, 0x1E1B, 0x1E1B, 0x1E1D, 0x1E1D, 0x1E1F, 0x1E1F, + 0x1E21, 0x1E21, 0x1E23, 0x1E23, 0x1E25, 0x1E25, 0x1E27, 0x1E27, + 0x1E29, 0x1E29, 0x1E2B, 0x1E2B, 0x1E2D, 0x1E2D, 0x1E2F, 0x1E2F, + 0x1E31, 0x1E31, 0x1E33, 0x1E33, 0x1E35, 0x1E35, 0x1E37, 0x1E37, + 0x1E39, 0x1E39, 0x1E3B, 0x1E3B, 0x1E3D, 0x1E3D, 0x1E3F, 0x1E3F, + 0x1E41, 0x1E41, 0x1E43, 0x1E43, 0x1E45, 0x1E45, 0x1E47, 0x1E47, + 0x1E49, 0x1E49, 0x1E4B, 0x1E4B, 0x1E4D, 0x1E4D, 0x1E4F, 0x1E4F, + 0x1E51, 0x1E51, 0x1E53, 0x1E53, 0x1E55, 0x1E55, 0x1E57, 0x1E57, + 0x1E59, 0x1E59, 0x1E5B, 0x1E5B, 0x1E5D, 0x1E5D, 0x1E5F, 0x1E5F, + 0x1E61, 0x1E61, 0x1E63, 0x1E63, 0x1E65, 0x1E65, 0x1E67, 0x1E67, + 0x1E69, 0x1E69, 0x1E6B, 0x1E6B, 0x1E6D, 0x1E6D, 0x1E6F, 0x1E6F, + 0x1E71, 0x1E71, 0x1E73, 0x1E73, 0x1E75, 0x1E75, 0x1E77, 0x1E77, + 0x1E79, 0x1E79, 0x1E7B, 0x1E7B, 0x1E7D, 0x1E7D, 0x1E7F, 0x1E7F, + 0x1E81, 0x1E81, 0x1E83, 0x1E83, 0x1E85, 0x1E85, 0x1E87, 0x1E87, + 0x1E89, 0x1E89, 0x1E8B, 0x1E8B, 0x1E8D, 0x1E8D, 0x1E8F, 0x1E8F, + 0x1E91, 0x1E91, 0x1E93, 0x1E93, 0x1E95, 0x1E9D, 0x1E9F, 0x1E9F, + 0x1EA1, 0x1EA1, 0x1EA3, 0x1EA3, 0x1EA5, 0x1EA5, 0x1EA7, 0x1EA7, + 0x1EA9, 0x1EA9, 0x1EAB, 0x1EAB, 0x1EAD, 0x1EAD, 0x1EAF, 0x1EAF, + 0x1EB1, 0x1EB1, 0x1EB3, 0x1EB3, 0x1EB5, 0x1EB5, 0x1EB7, 0x1EB7, + 0x1EB9, 0x1EB9, 0x1EBB, 0x1EBB, 0x1EBD, 0x1EBD, 0x1EBF, 0x1EBF, + 0x1EC1, 0x1EC1, 0x1EC3, 0x1EC3, 0x1EC5, 0x1EC5, 0x1EC7, 0x1EC7, + 0x1EC9, 0x1EC9, 0x1ECB, 0x1ECB, 0x1ECD, 0x1ECD, 0x1ECF, 0x1ECF, + 0x1ED1, 0x1ED1, 0x1ED3, 0x1ED3, 0x1ED5, 0x1ED5, 0x1ED7, 0x1ED7, + 0x1ED9, 0x1ED9, 0x1EDB, 0x1EDB, 0x1EDD, 0x1EDD, 0x1EDF, 0x1EDF, + 0x1EE1, 0x1EE1, 0x1EE3, 0x1EE3, 0x1EE5, 0x1EE5, 0x1EE7, 0x1EE7, + 0x1EE9, 0x1EE9, 0x1EEB, 0x1EEB, 0x1EED, 0x1EED, 0x1EEF, 0x1EEF, + 0x1EF1, 0x1EF1, 0x1EF3, 0x1EF3, 0x1EF5, 0x1EF5, 0x1EF7, 0x1EF7, + 0x1EF9, 0x1EF9, 0x1EFB, 0x1EFB, 0x1EFD, 0x1EFD, 0x1EFF, 0x1F07, + 0x1F10, 0x1F15, 0x1F20, 0x1F27, 0x1F30, 0x1F37, 0x1F40, 0x1F45, + 0x1F50, 0x1F57, 0x1F60, 0x1F67, 0x1F70, 0x1F7D, 0x1F80, 0x1F87, + 0x1F90, 0x1F97, 0x1FA0, 0x1FA7, 0x1FB0, 0x1FB4, 0x1FB6, 0x1FB7, + 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FC7, 0x1FD0, 0x1FD3, + 0x1FD6, 0x1FD7, 0x1FE0, 0x1FE7, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FF7, + 0x2071, 0x2071, 0x207F, 0x207F, 0x2090, 0x209C, 0x210A, 0x210A, + 0x210E, 0x210F, 0x2113, 0x2113, 0x212F, 0x212F, 0x2134, 0x2134, + 0x2139, 0x2139, 0x213C, 0x213D, 0x2146, 0x2149, 0x214E, 0x214E, + 0x2170, 0x217F, 0x2184, 0x2184, 0x24D0, 0x24E9, 0x2C30, 0x2C5F, + 0x2C61, 0x2C61, 0x2C65, 0x2C66, 0x2C68, 0x2C68, 0x2C6A, 0x2C6A, + 0x2C6C, 0x2C6C, 0x2C71, 0x2C71, 0x2C73, 0x2C74, 0x2C76, 0x2C7D, + 0x2C81, 0x2C81, 0x2C83, 0x2C83, 0x2C85, 0x2C85, 0x2C87, 0x2C87, + 0x2C89, 0x2C89, 0x2C8B, 0x2C8B, 0x2C8D, 0x2C8D, 0x2C8F, 0x2C8F, + 0x2C91, 0x2C91, 0x2C93, 0x2C93, 0x2C95, 0x2C95, 0x2C97, 0x2C97, + 0x2C99, 0x2C99, 0x2C9B, 0x2C9B, 0x2C9D, 0x2C9D, 0x2C9F, 0x2C9F, + 0x2CA1, 0x2CA1, 0x2CA3, 0x2CA3, 0x2CA5, 0x2CA5, 0x2CA7, 0x2CA7, + 0x2CA9, 0x2CA9, 0x2CAB, 0x2CAB, 0x2CAD, 0x2CAD, 0x2CAF, 0x2CAF, + 0x2CB1, 0x2CB1, 0x2CB3, 0x2CB3, 0x2CB5, 0x2CB5, 0x2CB7, 0x2CB7, + 0x2CB9, 0x2CB9, 0x2CBB, 0x2CBB, 0x2CBD, 0x2CBD, 0x2CBF, 0x2CBF, + 0x2CC1, 0x2CC1, 0x2CC3, 0x2CC3, 0x2CC5, 0x2CC5, 0x2CC7, 0x2CC7, + 0x2CC9, 0x2CC9, 0x2CCB, 0x2CCB, 0x2CCD, 0x2CCD, 0x2CCF, 0x2CCF, + 0x2CD1, 0x2CD1, 0x2CD3, 0x2CD3, 0x2CD5, 0x2CD5, 0x2CD7, 0x2CD7, + 0x2CD9, 0x2CD9, 0x2CDB, 0x2CDB, 0x2CDD, 0x2CDD, 0x2CDF, 0x2CDF, + 0x2CE1, 0x2CE1, 0x2CE3, 0x2CE4, 0x2CEC, 0x2CEC, 0x2CEE, 0x2CEE, + 0x2CF3, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, + 0xA641, 0xA641, 0xA643, 0xA643, 0xA645, 0xA645, 0xA647, 0xA647, + 0xA649, 0xA649, 0xA64B, 0xA64B, 0xA64D, 0xA64D, 0xA64F, 0xA64F, + 0xA651, 0xA651, 0xA653, 0xA653, 0xA655, 0xA655, 0xA657, 0xA657, + 0xA659, 0xA659, 0xA65B, 0xA65B, 0xA65D, 0xA65D, 0xA65F, 0xA65F, + 0xA661, 0xA661, 0xA663, 0xA663, 0xA665, 0xA665, 0xA667, 0xA667, + 0xA669, 0xA669, 0xA66B, 0xA66B, 0xA66D, 0xA66D, 0xA681, 0xA681, + 0xA683, 0xA683, 0xA685, 0xA685, 0xA687, 0xA687, 0xA689, 0xA689, + 0xA68B, 0xA68B, 0xA68D, 0xA68D, 0xA68F, 0xA68F, 0xA691, 0xA691, + 0xA693, 0xA693, 0xA695, 0xA695, 0xA697, 0xA697, 0xA699, 0xA699, + 0xA69B, 0xA69D, 0xA723, 0xA723, 0xA725, 0xA725, 0xA727, 0xA727, + 0xA729, 0xA729, 0xA72B, 0xA72B, 0xA72D, 0xA72D, 0xA72F, 0xA731, + 0xA733, 0xA733, 0xA735, 0xA735, 0xA737, 0xA737, 0xA739, 0xA739, + 0xA73B, 0xA73B, 0xA73D, 0xA73D, 0xA73F, 0xA73F, 0xA741, 0xA741, + 0xA743, 0xA743, 0xA745, 0xA745, 0xA747, 0xA747, 0xA749, 0xA749, + 0xA74B, 0xA74B, 0xA74D, 0xA74D, 0xA74F, 0xA74F, 0xA751, 0xA751, + 0xA753, 0xA753, 0xA755, 0xA755, 0xA757, 0xA757, 0xA759, 0xA759, + 0xA75B, 0xA75B, 0xA75D, 0xA75D, 0xA75F, 0xA75F, 0xA761, 0xA761, + 0xA763, 0xA763, 0xA765, 0xA765, 0xA767, 0xA767, 0xA769, 0xA769, + 0xA76B, 0xA76B, 0xA76D, 0xA76D, 0xA76F, 0xA778, 0xA77A, 0xA77A, + 0xA77C, 0xA77C, 0xA77F, 0xA77F, 0xA781, 0xA781, 0xA783, 0xA783, + 0xA785, 0xA785, 0xA787, 0xA787, 0xA78C, 0xA78C, 0xA78E, 0xA78E, + 0xA791, 0xA791, 0xA793, 0xA795, 0xA797, 0xA797, 0xA799, 0xA799, + 0xA79B, 0xA79B, 0xA79D, 0xA79D, 0xA79F, 0xA79F, 0xA7A1, 0xA7A1, + 0xA7A3, 0xA7A3, 0xA7A5, 0xA7A5, 0xA7A7, 0xA7A7, 0xA7A9, 0xA7A9, + 0xA7AF, 0xA7AF, 0xA7B5, 0xA7B5, 0xA7B7, 0xA7B7, 0xA7B9, 0xA7B9, + 0xA7BB, 0xA7BB, 0xA7BD, 0xA7BD, 0xA7BF, 0xA7BF, 0xA7C1, 0xA7C1, + 0xA7C3, 0xA7C3, 0xA7C8, 0xA7C8, 0xA7CA, 0xA7CA, 0xA7D1, 0xA7D1, + 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D5, 0xA7D7, 0xA7D7, 0xA7D9, 0xA7D9, + 0xA7F6, 0xA7F6, 0xA7F8, 0xA7FA, 0xAB30, 0xAB5A, 0xAB5C, 0xAB68, + 0xAB70, 0xABBF, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFF41, 0xFF5A, + 0x10428, 0x1044F, 0x104D8, 0x104FB, 0x10597, 0x105A1, 0x105A3, 0x105B1, + 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10780, 0x10780, 0x10783, 0x10785, + 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10CC0, 0x10CF2, 0x118C0, 0x118DF, + 0x16E60, 0x16E7F, 0x1D41A, 0x1D433, 0x1D44E, 0x1D454, 0x1D456, 0x1D467, + 0x1D482, 0x1D49B, 0x1D4B6, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, + 0x1D4C5, 0x1D4CF, 0x1D4EA, 0x1D503, 0x1D51E, 0x1D537, 0x1D552, 0x1D56B, + 0x1D586, 0x1D59F, 0x1D5BA, 0x1D5D3, 0x1D5EE, 0x1D607, 0x1D622, 0x1D63B, + 0x1D656, 0x1D66F, 0x1D68A, 0x1D6A5, 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6E1, + 0x1D6FC, 0x1D714, 0x1D716, 0x1D71B, 0x1D736, 0x1D74E, 0x1D750, 0x1D755, + 0x1D770, 0x1D788, 0x1D78A, 0x1D78F, 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7C9, + 0x1D7CB, 0x1D7CB, 0x1DF00, 0x1DF09, 0x1DF0B, 0x1DF1E, 0x1E922, 0x1E943, + // #76 (12808+138): bp=Math + 0x002B, 0x002B, 0x003C, 0x003E, 0x005E, 0x005E, 0x007C, 0x007C, + 0x007E, 0x007E, 0x00AC, 0x00AC, 0x00B1, 0x00B1, 0x00D7, 0x00D7, + 0x00F7, 0x00F7, 0x03D0, 0x03D2, 0x03D5, 0x03D5, 0x03F0, 0x03F1, + 0x03F4, 0x03F6, 0x0606, 0x0608, 0x2016, 0x2016, 0x2032, 0x2034, + 0x2040, 0x2040, 0x2044, 0x2044, 0x2052, 0x2052, 0x2061, 0x2064, + 0x207A, 0x207E, 0x208A, 0x208E, 0x20D0, 0x20DC, 0x20E1, 0x20E1, + 0x20E5, 0x20E6, 0x20EB, 0x20EF, 0x2102, 0x2102, 0x2107, 0x2107, + 0x210A, 0x2113, 0x2115, 0x2115, 0x2118, 0x211D, 0x2124, 0x2124, + 0x2128, 0x2129, 0x212C, 0x212D, 0x212F, 0x2131, 0x2133, 0x2138, + 0x213C, 0x2149, 0x214B, 0x214B, 0x2190, 0x21A7, 0x21A9, 0x21AE, + 0x21B0, 0x21B1, 0x21B6, 0x21B7, 0x21BC, 0x21DB, 0x21DD, 0x21DD, + 0x21E4, 0x21E5, 0x21F4, 0x22FF, 0x2308, 0x230B, 0x2320, 0x2321, + 0x237C, 0x237C, 0x239B, 0x23B5, 0x23B7, 0x23B7, 0x23D0, 0x23D0, + 0x23DC, 0x23E2, 0x25A0, 0x25A1, 0x25AE, 0x25B7, 0x25BC, 0x25C1, + 0x25C6, 0x25C7, 0x25CA, 0x25CB, 0x25CF, 0x25D3, 0x25E2, 0x25E2, + 0x25E4, 0x25E4, 0x25E7, 0x25EC, 0x25F8, 0x25FF, 0x2605, 0x2606, + 0x2640, 0x2640, 0x2642, 0x2642, 0x2660, 0x2663, 0x266D, 0x266F, + 0x27C0, 0x27FF, 0x2900, 0x2AFF, 0x2B30, 0x2B44, 0x2B47, 0x2B4C, + 0xFB29, 0xFB29, 0xFE61, 0xFE66, 0xFE68, 0xFE68, 0xFF0B, 0xFF0B, + 0xFF1C, 0xFF1E, 0xFF3C, 0xFF3C, 0xFF3E, 0xFF3E, 0xFF5C, 0xFF5C, + 0xFF5E, 0xFF5E, 0xFFE2, 0xFFE2, 0xFFE9, 0xFFEC, 0x1D400, 0x1D454, + 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, + 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, + 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, + 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, + 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D7CB, 0x1D7CE, 0x1D7FF, + 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, + 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, + 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, + 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, + 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, + 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, + 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, + 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, + 0x1EEAB, 0x1EEBB, 0x1EEF0, 0x1EEF1, + // #77 (12946+18): bp=Noncharacter_Code_Point:NChar + 0xFDD0, 0xFDEF, 0xFFFE, 0xFFFF, 0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, + 0x3FFFE, 0x3FFFF, 0x4FFFE, 0x4FFFF, 0x5FFFE, 0x5FFFF, 0x6FFFE, 0x6FFFF, + 0x7FFFE, 0x7FFFF, 0x8FFFE, 0x8FFFF, 0x9FFFE, 0x9FFFF, 0xAFFFE, 0xAFFFF, + 0xBFFFE, 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE, 0xDFFFF, 0xEFFFE, 0xEFFFF, + 0xFFFFE, 0xFFFFF, 0x10FFFE, 0x10FFFF, + // #78 (12964+28): bp=Pattern_Syntax:Pat_Syn + 0x0021, 0x002F, 0x003A, 0x0040, 0x005B, 0x005E, 0x0060, 0x0060, + 0x007B, 0x007E, 0x00A1, 0x00A7, 0x00A9, 0x00A9, 0x00AB, 0x00AC, + 0x00AE, 0x00AE, 0x00B0, 0x00B1, 0x00B6, 0x00B6, 0x00BB, 0x00BB, + 0x00BF, 0x00BF, 0x00D7, 0x00D7, 0x00F7, 0x00F7, 0x2010, 0x2027, + 0x2030, 0x203E, 0x2041, 0x2053, 0x2055, 0x205E, 0x2190, 0x245F, + 0x2500, 0x2775, 0x2794, 0x2BFF, 0x2E00, 0x2E7F, 0x3001, 0x3003, + 0x3008, 0x3020, 0x3030, 0x3030, 0xFD3E, 0xFD3F, 0xFE45, 0xFE46, + // #79 (12992+5): bp=Pattern_White_Space:Pat_WS + 0x0009, 0x000D, 0x0020, 0x0020, 0x0085, 0x0085, 0x200E, 0x200F, + 0x2028, 0x2029, + // #80 (12997+13): bp=Quotation_Mark:QMark + 0x0022, 0x0022, 0x0027, 0x0027, 0x00AB, 0x00AB, 0x00BB, 0x00BB, + 0x2018, 0x201F, 0x2039, 0x203A, 0x2E42, 0x2E42, 0x300C, 0x300F, + 0x301D, 0x301F, 0xFE41, 0xFE44, 0xFF02, 0xFF02, 0xFF07, 0xFF07, + 0xFF62, 0xFF63, + // #81 (13010+3): bp=Radical + 0x2E80, 0x2E99, 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, + // #82 (13013+1): bp=Regional_Indicator:RI + 0x1F1E6, 0x1F1FF, + // #83 (13014+79): bp=Sentence_Terminal:STerm + 0x0021, 0x0021, 0x002E, 0x002E, 0x003F, 0x003F, 0x0589, 0x0589, + 0x061D, 0x061F, 0x06D4, 0x06D4, 0x0700, 0x0702, 0x07F9, 0x07F9, + 0x0837, 0x0837, 0x0839, 0x0839, 0x083D, 0x083E, 0x0964, 0x0965, + 0x104A, 0x104B, 0x1362, 0x1362, 0x1367, 0x1368, 0x166E, 0x166E, + 0x1735, 0x1736, 0x1803, 0x1803, 0x1809, 0x1809, 0x1944, 0x1945, + 0x1AA8, 0x1AAB, 0x1B5A, 0x1B5B, 0x1B5E, 0x1B5F, 0x1B7D, 0x1B7E, + 0x1C3B, 0x1C3C, 0x1C7E, 0x1C7F, 0x203C, 0x203D, 0x2047, 0x2049, + 0x2E2E, 0x2E2E, 0x2E3C, 0x2E3C, 0x2E53, 0x2E54, 0x3002, 0x3002, + 0xA4FF, 0xA4FF, 0xA60E, 0xA60F, 0xA6F3, 0xA6F3, 0xA6F7, 0xA6F7, + 0xA876, 0xA877, 0xA8CE, 0xA8CF, 0xA92F, 0xA92F, 0xA9C8, 0xA9C9, + 0xAA5D, 0xAA5F, 0xAAF0, 0xAAF1, 0xABEB, 0xABEB, 0xFE52, 0xFE52, + 0xFE56, 0xFE57, 0xFF01, 0xFF01, 0xFF0E, 0xFF0E, 0xFF1F, 0xFF1F, + 0xFF61, 0xFF61, 0x10A56, 0x10A57, 0x10F55, 0x10F59, 0x10F86, 0x10F89, + 0x11047, 0x11048, 0x110BE, 0x110C1, 0x11141, 0x11143, 0x111C5, 0x111C6, + 0x111CD, 0x111CD, 0x111DE, 0x111DF, 0x11238, 0x11239, 0x1123B, 0x1123C, + 0x112A9, 0x112A9, 0x1144B, 0x1144C, 0x115C2, 0x115C3, 0x115C9, 0x115D7, + 0x11641, 0x11642, 0x1173C, 0x1173E, 0x11944, 0x11944, 0x11946, 0x11946, + 0x11A42, 0x11A43, 0x11A9B, 0x11A9C, 0x11C41, 0x11C42, 0x11EF7, 0x11EF8, + 0x16A6E, 0x16A6F, 0x16AF5, 0x16AF5, 0x16B37, 0x16B38, 0x16B44, 0x16B44, + 0x16E98, 0x16E98, 0x1BC9F, 0x1BC9F, 0x1DA88, 0x1DA88, + // #84 (13093+32): bp=Soft_Dotted:SD + 0x0069, 0x006A, 0x012F, 0x012F, 0x0249, 0x0249, 0x0268, 0x0268, + 0x029D, 0x029D, 0x02B2, 0x02B2, 0x03F3, 0x03F3, 0x0456, 0x0456, + 0x0458, 0x0458, 0x1D62, 0x1D62, 0x1D96, 0x1D96, 0x1DA4, 0x1DA4, + 0x1DA8, 0x1DA8, 0x1E2D, 0x1E2D, 0x1ECB, 0x1ECB, 0x2071, 0x2071, + 0x2148, 0x2149, 0x2C7C, 0x2C7C, 0x1D422, 0x1D423, 0x1D456, 0x1D457, + 0x1D48A, 0x1D48B, 0x1D4BE, 0x1D4BF, 0x1D4F2, 0x1D4F3, 0x1D526, 0x1D527, + 0x1D55A, 0x1D55B, 0x1D58E, 0x1D58F, 0x1D5C2, 0x1D5C3, 0x1D5F6, 0x1D5F7, + 0x1D62A, 0x1D62B, 0x1D65E, 0x1D65F, 0x1D692, 0x1D693, 0x1DF1A, 0x1DF1A, + // #85 (13125+107): bp=Terminal_Punctuation:Term + 0x0021, 0x0021, 0x002C, 0x002C, 0x002E, 0x002E, 0x003A, 0x003B, + 0x003F, 0x003F, 0x037E, 0x037E, 0x0387, 0x0387, 0x0589, 0x0589, + 0x05C3, 0x05C3, 0x060C, 0x060C, 0x061B, 0x061B, 0x061D, 0x061F, + 0x06D4, 0x06D4, 0x0700, 0x070A, 0x070C, 0x070C, 0x07F8, 0x07F9, + 0x0830, 0x083E, 0x085E, 0x085E, 0x0964, 0x0965, 0x0E5A, 0x0E5B, + 0x0F08, 0x0F08, 0x0F0D, 0x0F12, 0x104A, 0x104B, 0x1361, 0x1368, + 0x166E, 0x166E, 0x16EB, 0x16ED, 0x1735, 0x1736, 0x17D4, 0x17D6, + 0x17DA, 0x17DA, 0x1802, 0x1805, 0x1808, 0x1809, 0x1944, 0x1945, + 0x1AA8, 0x1AAB, 0x1B5A, 0x1B5B, 0x1B5D, 0x1B5F, 0x1B7D, 0x1B7E, + 0x1C3B, 0x1C3F, 0x1C7E, 0x1C7F, 0x203C, 0x203D, 0x2047, 0x2049, + 0x2E2E, 0x2E2E, 0x2E3C, 0x2E3C, 0x2E41, 0x2E41, 0x2E4C, 0x2E4C, + 0x2E4E, 0x2E4F, 0x2E53, 0x2E54, 0x3001, 0x3002, 0xA4FE, 0xA4FF, + 0xA60D, 0xA60F, 0xA6F3, 0xA6F7, 0xA876, 0xA877, 0xA8CE, 0xA8CF, + 0xA92F, 0xA92F, 0xA9C7, 0xA9C9, 0xAA5D, 0xAA5F, 0xAADF, 0xAADF, + 0xAAF0, 0xAAF1, 0xABEB, 0xABEB, 0xFE50, 0xFE52, 0xFE54, 0xFE57, + 0xFF01, 0xFF01, 0xFF0C, 0xFF0C, 0xFF0E, 0xFF0E, 0xFF1A, 0xFF1B, + 0xFF1F, 0xFF1F, 0xFF61, 0xFF61, 0xFF64, 0xFF64, 0x1039F, 0x1039F, + 0x103D0, 0x103D0, 0x10857, 0x10857, 0x1091F, 0x1091F, 0x10A56, 0x10A57, + 0x10AF0, 0x10AF5, 0x10B3A, 0x10B3F, 0x10B99, 0x10B9C, 0x10F55, 0x10F59, + 0x10F86, 0x10F89, 0x11047, 0x1104D, 0x110BE, 0x110C1, 0x11141, 0x11143, + 0x111C5, 0x111C6, 0x111CD, 0x111CD, 0x111DE, 0x111DF, 0x11238, 0x1123C, + 0x112A9, 0x112A9, 0x1144B, 0x1144D, 0x1145A, 0x1145B, 0x115C2, 0x115C5, + 0x115C9, 0x115D7, 0x11641, 0x11642, 0x1173C, 0x1173E, 0x11944, 0x11944, + 0x11946, 0x11946, 0x11A42, 0x11A43, 0x11A9B, 0x11A9C, 0x11AA1, 0x11AA2, + 0x11C41, 0x11C43, 0x11C71, 0x11C71, 0x11EF7, 0x11EF8, 0x12470, 0x12474, + 0x16A6E, 0x16A6F, 0x16AF5, 0x16AF5, 0x16B37, 0x16B39, 0x16B44, 0x16B44, + 0x16E97, 0x16E98, 0x1BC9F, 0x1BC9F, 0x1DA87, 0x1DA8A, + // #86 (13232+15): bp=Unified_Ideograph:UIdeo + 0x3400, 0x4DBF, 0x4E00, 0x9FFF, 0xFA0E, 0xFA0F, 0xFA11, 0xFA11, + 0xFA13, 0xFA14, 0xFA1F, 0xFA1F, 0xFA21, 0xFA21, 0xFA23, 0xFA24, + 0xFA27, 0xFA29, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, + 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x30000, 0x3134A, + // #87 (13247+651): bp=Uppercase:Upper + 0x0041, 0x005A, 0x00C0, 0x00D6, 0x00D8, 0x00DE, 0x0100, 0x0100, + 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106, 0x0108, 0x0108, + 0x010A, 0x010A, 0x010C, 0x010C, 0x010E, 0x010E, 0x0110, 0x0110, + 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116, 0x0118, 0x0118, + 0x011A, 0x011A, 0x011C, 0x011C, 0x011E, 0x011E, 0x0120, 0x0120, + 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126, 0x0128, 0x0128, + 0x012A, 0x012A, 0x012C, 0x012C, 0x012E, 0x012E, 0x0130, 0x0130, + 0x0132, 0x0132, 0x0134, 0x0134, 0x0136, 0x0136, 0x0139, 0x0139, + 0x013B, 0x013B, 0x013D, 0x013D, 0x013F, 0x013F, 0x0141, 0x0141, + 0x0143, 0x0143, 0x0145, 0x0145, 0x0147, 0x0147, 0x014A, 0x014A, + 0x014C, 0x014C, 0x014E, 0x014E, 0x0150, 0x0150, 0x0152, 0x0152, + 0x0154, 0x0154, 0x0156, 0x0156, 0x0158, 0x0158, 0x015A, 0x015A, + 0x015C, 0x015C, 0x015E, 0x015E, 0x0160, 0x0160, 0x0162, 0x0162, + 0x0164, 0x0164, 0x0166, 0x0166, 0x0168, 0x0168, 0x016A, 0x016A, + 0x016C, 0x016C, 0x016E, 0x016E, 0x0170, 0x0170, 0x0172, 0x0172, + 0x0174, 0x0174, 0x0176, 0x0176, 0x0178, 0x0179, 0x017B, 0x017B, + 0x017D, 0x017D, 0x0181, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187, + 0x0189, 0x018B, 0x018E, 0x0191, 0x0193, 0x0194, 0x0196, 0x0198, + 0x019C, 0x019D, 0x019F, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, + 0x01A6, 0x01A7, 0x01A9, 0x01A9, 0x01AC, 0x01AC, 0x01AE, 0x01AF, + 0x01B1, 0x01B3, 0x01B5, 0x01B5, 0x01B7, 0x01B8, 0x01BC, 0x01BC, + 0x01C4, 0x01C4, 0x01C7, 0x01C7, 0x01CA, 0x01CA, 0x01CD, 0x01CD, + 0x01CF, 0x01CF, 0x01D1, 0x01D1, 0x01D3, 0x01D3, 0x01D5, 0x01D5, + 0x01D7, 0x01D7, 0x01D9, 0x01D9, 0x01DB, 0x01DB, 0x01DE, 0x01DE, + 0x01E0, 0x01E0, 0x01E2, 0x01E2, 0x01E4, 0x01E4, 0x01E6, 0x01E6, + 0x01E8, 0x01E8, 0x01EA, 0x01EA, 0x01EC, 0x01EC, 0x01EE, 0x01EE, + 0x01F1, 0x01F1, 0x01F4, 0x01F4, 0x01F6, 0x01F8, 0x01FA, 0x01FA, + 0x01FC, 0x01FC, 0x01FE, 0x01FE, 0x0200, 0x0200, 0x0202, 0x0202, + 0x0204, 0x0204, 0x0206, 0x0206, 0x0208, 0x0208, 0x020A, 0x020A, + 0x020C, 0x020C, 0x020E, 0x020E, 0x0210, 0x0210, 0x0212, 0x0212, + 0x0214, 0x0214, 0x0216, 0x0216, 0x0218, 0x0218, 0x021A, 0x021A, + 0x021C, 0x021C, 0x021E, 0x021E, 0x0220, 0x0220, 0x0222, 0x0222, + 0x0224, 0x0224, 0x0226, 0x0226, 0x0228, 0x0228, 0x022A, 0x022A, + 0x022C, 0x022C, 0x022E, 0x022E, 0x0230, 0x0230, 0x0232, 0x0232, + 0x023A, 0x023B, 0x023D, 0x023E, 0x0241, 0x0241, 0x0243, 0x0246, + 0x0248, 0x0248, 0x024A, 0x024A, 0x024C, 0x024C, 0x024E, 0x024E, + 0x0370, 0x0370, 0x0372, 0x0372, 0x0376, 0x0376, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x038F, + 0x0391, 0x03A1, 0x03A3, 0x03AB, 0x03CF, 0x03CF, 0x03D2, 0x03D4, + 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, + 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, + 0x03E8, 0x03E8, 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, + 0x03F4, 0x03F4, 0x03F7, 0x03F7, 0x03F9, 0x03FA, 0x03FD, 0x042F, + 0x0460, 0x0460, 0x0462, 0x0462, 0x0464, 0x0464, 0x0466, 0x0466, + 0x0468, 0x0468, 0x046A, 0x046A, 0x046C, 0x046C, 0x046E, 0x046E, + 0x0470, 0x0470, 0x0472, 0x0472, 0x0474, 0x0474, 0x0476, 0x0476, + 0x0478, 0x0478, 0x047A, 0x047A, 0x047C, 0x047C, 0x047E, 0x047E, + 0x0480, 0x0480, 0x048A, 0x048A, 0x048C, 0x048C, 0x048E, 0x048E, + 0x0490, 0x0490, 0x0492, 0x0492, 0x0494, 0x0494, 0x0496, 0x0496, + 0x0498, 0x0498, 0x049A, 0x049A, 0x049C, 0x049C, 0x049E, 0x049E, + 0x04A0, 0x04A0, 0x04A2, 0x04A2, 0x04A4, 0x04A4, 0x04A6, 0x04A6, + 0x04A8, 0x04A8, 0x04AA, 0x04AA, 0x04AC, 0x04AC, 0x04AE, 0x04AE, + 0x04B0, 0x04B0, 0x04B2, 0x04B2, 0x04B4, 0x04B4, 0x04B6, 0x04B6, + 0x04B8, 0x04B8, 0x04BA, 0x04BA, 0x04BC, 0x04BC, 0x04BE, 0x04BE, + 0x04C0, 0x04C1, 0x04C3, 0x04C3, 0x04C5, 0x04C5, 0x04C7, 0x04C7, + 0x04C9, 0x04C9, 0x04CB, 0x04CB, 0x04CD, 0x04CD, 0x04D0, 0x04D0, + 0x04D2, 0x04D2, 0x04D4, 0x04D4, 0x04D6, 0x04D6, 0x04D8, 0x04D8, + 0x04DA, 0x04DA, 0x04DC, 0x04DC, 0x04DE, 0x04DE, 0x04E0, 0x04E0, + 0x04E2, 0x04E2, 0x04E4, 0x04E4, 0x04E6, 0x04E6, 0x04E8, 0x04E8, + 0x04EA, 0x04EA, 0x04EC, 0x04EC, 0x04EE, 0x04EE, 0x04F0, 0x04F0, + 0x04F2, 0x04F2, 0x04F4, 0x04F4, 0x04F6, 0x04F6, 0x04F8, 0x04F8, + 0x04FA, 0x04FA, 0x04FC, 0x04FC, 0x04FE, 0x04FE, 0x0500, 0x0500, + 0x0502, 0x0502, 0x0504, 0x0504, 0x0506, 0x0506, 0x0508, 0x0508, + 0x050A, 0x050A, 0x050C, 0x050C, 0x050E, 0x050E, 0x0510, 0x0510, + 0x0512, 0x0512, 0x0514, 0x0514, 0x0516, 0x0516, 0x0518, 0x0518, + 0x051A, 0x051A, 0x051C, 0x051C, 0x051E, 0x051E, 0x0520, 0x0520, + 0x0522, 0x0522, 0x0524, 0x0524, 0x0526, 0x0526, 0x0528, 0x0528, + 0x052A, 0x052A, 0x052C, 0x052C, 0x052E, 0x052E, 0x0531, 0x0556, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x13A0, 0x13F5, + 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1E00, 0x1E00, 0x1E02, 0x1E02, + 0x1E04, 0x1E04, 0x1E06, 0x1E06, 0x1E08, 0x1E08, 0x1E0A, 0x1E0A, + 0x1E0C, 0x1E0C, 0x1E0E, 0x1E0E, 0x1E10, 0x1E10, 0x1E12, 0x1E12, + 0x1E14, 0x1E14, 0x1E16, 0x1E16, 0x1E18, 0x1E18, 0x1E1A, 0x1E1A, + 0x1E1C, 0x1E1C, 0x1E1E, 0x1E1E, 0x1E20, 0x1E20, 0x1E22, 0x1E22, + 0x1E24, 0x1E24, 0x1E26, 0x1E26, 0x1E28, 0x1E28, 0x1E2A, 0x1E2A, + 0x1E2C, 0x1E2C, 0x1E2E, 0x1E2E, 0x1E30, 0x1E30, 0x1E32, 0x1E32, + 0x1E34, 0x1E34, 0x1E36, 0x1E36, 0x1E38, 0x1E38, 0x1E3A, 0x1E3A, + 0x1E3C, 0x1E3C, 0x1E3E, 0x1E3E, 0x1E40, 0x1E40, 0x1E42, 0x1E42, + 0x1E44, 0x1E44, 0x1E46, 0x1E46, 0x1E48, 0x1E48, 0x1E4A, 0x1E4A, + 0x1E4C, 0x1E4C, 0x1E4E, 0x1E4E, 0x1E50, 0x1E50, 0x1E52, 0x1E52, + 0x1E54, 0x1E54, 0x1E56, 0x1E56, 0x1E58, 0x1E58, 0x1E5A, 0x1E5A, + 0x1E5C, 0x1E5C, 0x1E5E, 0x1E5E, 0x1E60, 0x1E60, 0x1E62, 0x1E62, + 0x1E64, 0x1E64, 0x1E66, 0x1E66, 0x1E68, 0x1E68, 0x1E6A, 0x1E6A, + 0x1E6C, 0x1E6C, 0x1E6E, 0x1E6E, 0x1E70, 0x1E70, 0x1E72, 0x1E72, + 0x1E74, 0x1E74, 0x1E76, 0x1E76, 0x1E78, 0x1E78, 0x1E7A, 0x1E7A, + 0x1E7C, 0x1E7C, 0x1E7E, 0x1E7E, 0x1E80, 0x1E80, 0x1E82, 0x1E82, + 0x1E84, 0x1E84, 0x1E86, 0x1E86, 0x1E88, 0x1E88, 0x1E8A, 0x1E8A, + 0x1E8C, 0x1E8C, 0x1E8E, 0x1E8E, 0x1E90, 0x1E90, 0x1E92, 0x1E92, + 0x1E94, 0x1E94, 0x1E9E, 0x1E9E, 0x1EA0, 0x1EA0, 0x1EA2, 0x1EA2, + 0x1EA4, 0x1EA4, 0x1EA6, 0x1EA6, 0x1EA8, 0x1EA8, 0x1EAA, 0x1EAA, + 0x1EAC, 0x1EAC, 0x1EAE, 0x1EAE, 0x1EB0, 0x1EB0, 0x1EB2, 0x1EB2, + 0x1EB4, 0x1EB4, 0x1EB6, 0x1EB6, 0x1EB8, 0x1EB8, 0x1EBA, 0x1EBA, + 0x1EBC, 0x1EBC, 0x1EBE, 0x1EBE, 0x1EC0, 0x1EC0, 0x1EC2, 0x1EC2, + 0x1EC4, 0x1EC4, 0x1EC6, 0x1EC6, 0x1EC8, 0x1EC8, 0x1ECA, 0x1ECA, + 0x1ECC, 0x1ECC, 0x1ECE, 0x1ECE, 0x1ED0, 0x1ED0, 0x1ED2, 0x1ED2, + 0x1ED4, 0x1ED4, 0x1ED6, 0x1ED6, 0x1ED8, 0x1ED8, 0x1EDA, 0x1EDA, + 0x1EDC, 0x1EDC, 0x1EDE, 0x1EDE, 0x1EE0, 0x1EE0, 0x1EE2, 0x1EE2, + 0x1EE4, 0x1EE4, 0x1EE6, 0x1EE6, 0x1EE8, 0x1EE8, 0x1EEA, 0x1EEA, + 0x1EEC, 0x1EEC, 0x1EEE, 0x1EEE, 0x1EF0, 0x1EF0, 0x1EF2, 0x1EF2, + 0x1EF4, 0x1EF4, 0x1EF6, 0x1EF6, 0x1EF8, 0x1EF8, 0x1EFA, 0x1EFA, + 0x1EFC, 0x1EFC, 0x1EFE, 0x1EFE, 0x1F08, 0x1F0F, 0x1F18, 0x1F1D, + 0x1F28, 0x1F2F, 0x1F38, 0x1F3F, 0x1F48, 0x1F4D, 0x1F59, 0x1F59, + 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F5F, 0x1F68, 0x1F6F, + 0x1FB8, 0x1FBB, 0x1FC8, 0x1FCB, 0x1FD8, 0x1FDB, 0x1FE8, 0x1FEC, + 0x1FF8, 0x1FFB, 0x2102, 0x2102, 0x2107, 0x2107, 0x210B, 0x210D, + 0x2110, 0x2112, 0x2115, 0x2115, 0x2119, 0x211D, 0x2124, 0x2124, + 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x212D, 0x2130, 0x2133, + 0x213E, 0x213F, 0x2145, 0x2145, 0x2160, 0x216F, 0x2183, 0x2183, + 0x24B6, 0x24CF, 0x2C00, 0x2C2F, 0x2C60, 0x2C60, 0x2C62, 0x2C64, + 0x2C67, 0x2C67, 0x2C69, 0x2C69, 0x2C6B, 0x2C6B, 0x2C6D, 0x2C70, + 0x2C72, 0x2C72, 0x2C75, 0x2C75, 0x2C7E, 0x2C80, 0x2C82, 0x2C82, + 0x2C84, 0x2C84, 0x2C86, 0x2C86, 0x2C88, 0x2C88, 0x2C8A, 0x2C8A, + 0x2C8C, 0x2C8C, 0x2C8E, 0x2C8E, 0x2C90, 0x2C90, 0x2C92, 0x2C92, + 0x2C94, 0x2C94, 0x2C96, 0x2C96, 0x2C98, 0x2C98, 0x2C9A, 0x2C9A, + 0x2C9C, 0x2C9C, 0x2C9E, 0x2C9E, 0x2CA0, 0x2CA0, 0x2CA2, 0x2CA2, + 0x2CA4, 0x2CA4, 0x2CA6, 0x2CA6, 0x2CA8, 0x2CA8, 0x2CAA, 0x2CAA, + 0x2CAC, 0x2CAC, 0x2CAE, 0x2CAE, 0x2CB0, 0x2CB0, 0x2CB2, 0x2CB2, + 0x2CB4, 0x2CB4, 0x2CB6, 0x2CB6, 0x2CB8, 0x2CB8, 0x2CBA, 0x2CBA, + 0x2CBC, 0x2CBC, 0x2CBE, 0x2CBE, 0x2CC0, 0x2CC0, 0x2CC2, 0x2CC2, + 0x2CC4, 0x2CC4, 0x2CC6, 0x2CC6, 0x2CC8, 0x2CC8, 0x2CCA, 0x2CCA, + 0x2CCC, 0x2CCC, 0x2CCE, 0x2CCE, 0x2CD0, 0x2CD0, 0x2CD2, 0x2CD2, + 0x2CD4, 0x2CD4, 0x2CD6, 0x2CD6, 0x2CD8, 0x2CD8, 0x2CDA, 0x2CDA, + 0x2CDC, 0x2CDC, 0x2CDE, 0x2CDE, 0x2CE0, 0x2CE0, 0x2CE2, 0x2CE2, + 0x2CEB, 0x2CEB, 0x2CED, 0x2CED, 0x2CF2, 0x2CF2, 0xA640, 0xA640, + 0xA642, 0xA642, 0xA644, 0xA644, 0xA646, 0xA646, 0xA648, 0xA648, + 0xA64A, 0xA64A, 0xA64C, 0xA64C, 0xA64E, 0xA64E, 0xA650, 0xA650, + 0xA652, 0xA652, 0xA654, 0xA654, 0xA656, 0xA656, 0xA658, 0xA658, + 0xA65A, 0xA65A, 0xA65C, 0xA65C, 0xA65E, 0xA65E, 0xA660, 0xA660, + 0xA662, 0xA662, 0xA664, 0xA664, 0xA666, 0xA666, 0xA668, 0xA668, + 0xA66A, 0xA66A, 0xA66C, 0xA66C, 0xA680, 0xA680, 0xA682, 0xA682, + 0xA684, 0xA684, 0xA686, 0xA686, 0xA688, 0xA688, 0xA68A, 0xA68A, + 0xA68C, 0xA68C, 0xA68E, 0xA68E, 0xA690, 0xA690, 0xA692, 0xA692, + 0xA694, 0xA694, 0xA696, 0xA696, 0xA698, 0xA698, 0xA69A, 0xA69A, + 0xA722, 0xA722, 0xA724, 0xA724, 0xA726, 0xA726, 0xA728, 0xA728, + 0xA72A, 0xA72A, 0xA72C, 0xA72C, 0xA72E, 0xA72E, 0xA732, 0xA732, + 0xA734, 0xA734, 0xA736, 0xA736, 0xA738, 0xA738, 0xA73A, 0xA73A, + 0xA73C, 0xA73C, 0xA73E, 0xA73E, 0xA740, 0xA740, 0xA742, 0xA742, + 0xA744, 0xA744, 0xA746, 0xA746, 0xA748, 0xA748, 0xA74A, 0xA74A, + 0xA74C, 0xA74C, 0xA74E, 0xA74E, 0xA750, 0xA750, 0xA752, 0xA752, + 0xA754, 0xA754, 0xA756, 0xA756, 0xA758, 0xA758, 0xA75A, 0xA75A, + 0xA75C, 0xA75C, 0xA75E, 0xA75E, 0xA760, 0xA760, 0xA762, 0xA762, + 0xA764, 0xA764, 0xA766, 0xA766, 0xA768, 0xA768, 0xA76A, 0xA76A, + 0xA76C, 0xA76C, 0xA76E, 0xA76E, 0xA779, 0xA779, 0xA77B, 0xA77B, + 0xA77D, 0xA77E, 0xA780, 0xA780, 0xA782, 0xA782, 0xA784, 0xA784, + 0xA786, 0xA786, 0xA78B, 0xA78B, 0xA78D, 0xA78D, 0xA790, 0xA790, + 0xA792, 0xA792, 0xA796, 0xA796, 0xA798, 0xA798, 0xA79A, 0xA79A, + 0xA79C, 0xA79C, 0xA79E, 0xA79E, 0xA7A0, 0xA7A0, 0xA7A2, 0xA7A2, + 0xA7A4, 0xA7A4, 0xA7A6, 0xA7A6, 0xA7A8, 0xA7A8, 0xA7AA, 0xA7AE, + 0xA7B0, 0xA7B4, 0xA7B6, 0xA7B6, 0xA7B8, 0xA7B8, 0xA7BA, 0xA7BA, + 0xA7BC, 0xA7BC, 0xA7BE, 0xA7BE, 0xA7C0, 0xA7C0, 0xA7C2, 0xA7C2, + 0xA7C4, 0xA7C7, 0xA7C9, 0xA7C9, 0xA7D0, 0xA7D0, 0xA7D6, 0xA7D6, + 0xA7D8, 0xA7D8, 0xA7F5, 0xA7F5, 0xFF21, 0xFF3A, 0x10400, 0x10427, + 0x104B0, 0x104D3, 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, + 0x10594, 0x10595, 0x10C80, 0x10CB2, 0x118A0, 0x118BF, 0x16E40, 0x16E5F, + 0x1D400, 0x1D419, 0x1D434, 0x1D44D, 0x1D468, 0x1D481, 0x1D49C, 0x1D49C, + 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, + 0x1D4AE, 0x1D4B5, 0x1D4D0, 0x1D4E9, 0x1D504, 0x1D505, 0x1D507, 0x1D50A, + 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D538, 0x1D539, 0x1D53B, 0x1D53E, + 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D56C, 0x1D585, + 0x1D5A0, 0x1D5B9, 0x1D5D4, 0x1D5ED, 0x1D608, 0x1D621, 0x1D63C, 0x1D655, + 0x1D670, 0x1D689, 0x1D6A8, 0x1D6C0, 0x1D6E2, 0x1D6FA, 0x1D71C, 0x1D734, + 0x1D756, 0x1D76E, 0x1D790, 0x1D7A8, 0x1D7CA, 0x1D7CA, 0x1E900, 0x1E921, + 0x1F130, 0x1F149, 0x1F150, 0x1F169, 0x1F170, 0x1F189, + // #88 (13898+4): bp=Variation_Selector:VS + 0x180B, 0x180D, 0x180F, 0x180F, 0xFE00, 0xFE0F, 0xE0100, 0xE01EF, + // #89 (13902+10): bp=White_Space:space + 0x0009, 0x000D, 0x0020, 0x0020, 0x0085, 0x0085, 0x00A0, 0x00A0, + 0x1680, 0x1680, 0x2000, 0x200A, 0x2028, 0x2029, 0x202F, 0x202F, + 0x205F, 0x205F, 0x3000, 0x3000, + // #90 (13912+763): bp=XID_Continue:XIDC + 0x0030, 0x0039, 0x0041, 0x005A, 0x005F, 0x005F, 0x0061, 0x007A, + 0x00AA, 0x00AA, 0x00B5, 0x00B5, 0x00B7, 0x00B7, 0x00BA, 0x00BA, + 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02C1, 0x02C6, 0x02D1, + 0x02E0, 0x02E4, 0x02EC, 0x02EC, 0x02EE, 0x02EE, 0x0300, 0x0374, + 0x0376, 0x0377, 0x037B, 0x037D, 0x037F, 0x037F, 0x0386, 0x038A, + 0x038C, 0x038C, 0x038E, 0x03A1, 0x03A3, 0x03F5, 0x03F7, 0x0481, + 0x0483, 0x0487, 0x048A, 0x052F, 0x0531, 0x0556, 0x0559, 0x0559, + 0x0560, 0x0588, 0x0591, 0x05BD, 0x05BF, 0x05BF, 0x05C1, 0x05C2, + 0x05C4, 0x05C5, 0x05C7, 0x05C7, 0x05D0, 0x05EA, 0x05EF, 0x05F2, + 0x0610, 0x061A, 0x0620, 0x0669, 0x066E, 0x06D3, 0x06D5, 0x06DC, + 0x06DF, 0x06E8, 0x06EA, 0x06FC, 0x06FF, 0x06FF, 0x0710, 0x074A, + 0x074D, 0x07B1, 0x07C0, 0x07F5, 0x07FA, 0x07FA, 0x07FD, 0x07FD, + 0x0800, 0x082D, 0x0840, 0x085B, 0x0860, 0x086A, 0x0870, 0x0887, + 0x0889, 0x088E, 0x0898, 0x08E1, 0x08E3, 0x0963, 0x0966, 0x096F, + 0x0971, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, + 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BC, 0x09C4, + 0x09C7, 0x09C8, 0x09CB, 0x09CE, 0x09D7, 0x09D7, 0x09DC, 0x09DD, + 0x09DF, 0x09E3, 0x09E6, 0x09F1, 0x09FC, 0x09FC, 0x09FE, 0x09FE, + 0x0A01, 0x0A03, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, + 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, + 0x0A3C, 0x0A3C, 0x0A3E, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, + 0x0A51, 0x0A51, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A66, 0x0A75, + 0x0A81, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABC, 0x0AC5, + 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, + 0x0AE6, 0x0AEF, 0x0AF9, 0x0AFF, 0x0B01, 0x0B03, 0x0B05, 0x0B0C, + 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, + 0x0B35, 0x0B39, 0x0B3C, 0x0B44, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, + 0x0B55, 0x0B57, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B63, 0x0B66, 0x0B6F, + 0x0B71, 0x0B71, 0x0B82, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, + 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, + 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BBE, 0x0BC2, + 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0BD0, 0x0BD0, 0x0BD7, 0x0BD7, + 0x0BE6, 0x0BEF, 0x0C00, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, + 0x0C2A, 0x0C39, 0x0C3C, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, + 0x0C55, 0x0C56, 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, 0x0C60, 0x0C63, + 0x0C66, 0x0C6F, 0x0C80, 0x0C83, 0x0C85, 0x0C8C, 0x0C8E, 0x0C90, + 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBC, 0x0CC4, + 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0CDD, 0x0CDE, + 0x0CE0, 0x0CE3, 0x0CE6, 0x0CEF, 0x0CF1, 0x0CF2, 0x0D00, 0x0D0C, + 0x0D0E, 0x0D10, 0x0D12, 0x0D44, 0x0D46, 0x0D48, 0x0D4A, 0x0D4E, + 0x0D54, 0x0D57, 0x0D5F, 0x0D63, 0x0D66, 0x0D6F, 0x0D7A, 0x0D7F, + 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, + 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCA, 0x0DCA, 0x0DCF, 0x0DD4, + 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DE6, 0x0DEF, 0x0DF2, 0x0DF3, + 0x0E01, 0x0E3A, 0x0E40, 0x0E4E, 0x0E50, 0x0E59, 0x0E81, 0x0E82, + 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, + 0x0EA7, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0EC8, 0x0ECD, + 0x0ED0, 0x0ED9, 0x0EDC, 0x0EDF, 0x0F00, 0x0F00, 0x0F18, 0x0F19, + 0x0F20, 0x0F29, 0x0F35, 0x0F35, 0x0F37, 0x0F37, 0x0F39, 0x0F39, + 0x0F3E, 0x0F47, 0x0F49, 0x0F6C, 0x0F71, 0x0F84, 0x0F86, 0x0F97, + 0x0F99, 0x0FBC, 0x0FC6, 0x0FC6, 0x1000, 0x1049, 0x1050, 0x109D, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x135D, 0x135F, 0x1369, 0x1371, 0x1380, 0x138F, 0x13A0, 0x13F5, + 0x13F8, 0x13FD, 0x1401, 0x166C, 0x166F, 0x167F, 0x1681, 0x169A, + 0x16A0, 0x16EA, 0x16EE, 0x16F8, 0x1700, 0x1715, 0x171F, 0x1734, + 0x1740, 0x1753, 0x1760, 0x176C, 0x176E, 0x1770, 0x1772, 0x1773, + 0x1780, 0x17D3, 0x17D7, 0x17D7, 0x17DC, 0x17DD, 0x17E0, 0x17E9, + 0x180B, 0x180D, 0x180F, 0x1819, 0x1820, 0x1878, 0x1880, 0x18AA, + 0x18B0, 0x18F5, 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x193B, + 0x1946, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, 0x19B0, 0x19C9, + 0x19D0, 0x19DA, 0x1A00, 0x1A1B, 0x1A20, 0x1A5E, 0x1A60, 0x1A7C, + 0x1A7F, 0x1A89, 0x1A90, 0x1A99, 0x1AA7, 0x1AA7, 0x1AB0, 0x1ABD, + 0x1ABF, 0x1ACE, 0x1B00, 0x1B4C, 0x1B50, 0x1B59, 0x1B6B, 0x1B73, + 0x1B80, 0x1BF3, 0x1C00, 0x1C37, 0x1C40, 0x1C49, 0x1C4D, 0x1C7D, + 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1CD0, 0x1CD2, + 0x1CD4, 0x1CFA, 0x1D00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, + 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, + 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, + 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, + 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, + 0x203F, 0x2040, 0x2054, 0x2054, 0x2071, 0x2071, 0x207F, 0x207F, + 0x2090, 0x209C, 0x20D0, 0x20DC, 0x20E1, 0x20E1, 0x20E5, 0x20F0, + 0x2102, 0x2102, 0x2107, 0x2107, 0x210A, 0x2113, 0x2115, 0x2115, + 0x2118, 0x211D, 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, + 0x212A, 0x2139, 0x213C, 0x213F, 0x2145, 0x2149, 0x214E, 0x214E, + 0x2160, 0x2188, 0x2C00, 0x2CE4, 0x2CEB, 0x2CF3, 0x2D00, 0x2D25, + 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, 0x2D30, 0x2D67, 0x2D6F, 0x2D6F, + 0x2D7F, 0x2D96, 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, + 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, + 0x2DD8, 0x2DDE, 0x2DE0, 0x2DFF, 0x3005, 0x3007, 0x3021, 0x302F, + 0x3031, 0x3035, 0x3038, 0x303C, 0x3041, 0x3096, 0x3099, 0x309A, + 0x309D, 0x309F, 0x30A1, 0x30FA, 0x30FC, 0x30FF, 0x3105, 0x312F, + 0x3131, 0x318E, 0x31A0, 0x31BF, 0x31F0, 0x31FF, 0x3400, 0x4DBF, + 0x4E00, 0xA48C, 0xA4D0, 0xA4FD, 0xA500, 0xA60C, 0xA610, 0xA62B, + 0xA640, 0xA66F, 0xA674, 0xA67D, 0xA67F, 0xA6F1, 0xA717, 0xA71F, + 0xA722, 0xA788, 0xA78B, 0xA7CA, 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, + 0xA7D5, 0xA7D9, 0xA7F2, 0xA827, 0xA82C, 0xA82C, 0xA840, 0xA873, + 0xA880, 0xA8C5, 0xA8D0, 0xA8D9, 0xA8E0, 0xA8F7, 0xA8FB, 0xA8FB, + 0xA8FD, 0xA92D, 0xA930, 0xA953, 0xA960, 0xA97C, 0xA980, 0xA9C0, + 0xA9CF, 0xA9D9, 0xA9E0, 0xA9FE, 0xAA00, 0xAA36, 0xAA40, 0xAA4D, + 0xAA50, 0xAA59, 0xAA60, 0xAA76, 0xAA7A, 0xAAC2, 0xAADB, 0xAADD, + 0xAAE0, 0xAAEF, 0xAAF2, 0xAAF6, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, + 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB5A, + 0xAB5C, 0xAB69, 0xAB70, 0xABEA, 0xABEC, 0xABED, 0xABF0, 0xABF9, + 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, + 0xFA70, 0xFAD9, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFB1D, 0xFB28, + 0xFB2A, 0xFB36, 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, + 0xFB43, 0xFB44, 0xFB46, 0xFBB1, 0xFBD3, 0xFC5D, 0xFC64, 0xFD3D, + 0xFD50, 0xFD8F, 0xFD92, 0xFDC7, 0xFDF0, 0xFDF9, 0xFE00, 0xFE0F, + 0xFE20, 0xFE2F, 0xFE33, 0xFE34, 0xFE4D, 0xFE4F, 0xFE71, 0xFE71, + 0xFE73, 0xFE73, 0xFE77, 0xFE77, 0xFE79, 0xFE79, 0xFE7B, 0xFE7B, + 0xFE7D, 0xFE7D, 0xFE7F, 0xFEFC, 0xFF10, 0xFF19, 0xFF21, 0xFF3A, + 0xFF3F, 0xFF3F, 0xFF41, 0xFF5A, 0xFF66, 0xFFBE, 0xFFC2, 0xFFC7, + 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, 0x10000, 0x1000B, + 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, 0x1003F, 0x1004D, + 0x10050, 0x1005D, 0x10080, 0x100FA, 0x10140, 0x10174, 0x101FD, 0x101FD, + 0x10280, 0x1029C, 0x102A0, 0x102D0, 0x102E0, 0x102E0, 0x10300, 0x1031F, + 0x1032D, 0x1034A, 0x10350, 0x1037A, 0x10380, 0x1039D, 0x103A0, 0x103C3, + 0x103C8, 0x103CF, 0x103D1, 0x103D5, 0x10400, 0x1049D, 0x104A0, 0x104A9, + 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, + 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, + 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, 0x10780, 0x10785, + 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10800, 0x10805, 0x10808, 0x10808, + 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, 0x1083F, 0x10855, + 0x10860, 0x10876, 0x10880, 0x1089E, 0x108E0, 0x108F2, 0x108F4, 0x108F5, + 0x10900, 0x10915, 0x10920, 0x10939, 0x10980, 0x109B7, 0x109BE, 0x109BF, + 0x10A00, 0x10A03, 0x10A05, 0x10A06, 0x10A0C, 0x10A13, 0x10A15, 0x10A17, + 0x10A19, 0x10A35, 0x10A38, 0x10A3A, 0x10A3F, 0x10A3F, 0x10A60, 0x10A7C, + 0x10A80, 0x10A9C, 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE6, 0x10B00, 0x10B35, + 0x10B40, 0x10B55, 0x10B60, 0x10B72, 0x10B80, 0x10B91, 0x10C00, 0x10C48, + 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10D00, 0x10D27, 0x10D30, 0x10D39, + 0x10E80, 0x10EA9, 0x10EAB, 0x10EAC, 0x10EB0, 0x10EB1, 0x10F00, 0x10F1C, + 0x10F27, 0x10F27, 0x10F30, 0x10F50, 0x10F70, 0x10F85, 0x10FB0, 0x10FC4, + 0x10FE0, 0x10FF6, 0x11000, 0x11046, 0x11066, 0x11075, 0x1107F, 0x110BA, + 0x110C2, 0x110C2, 0x110D0, 0x110E8, 0x110F0, 0x110F9, 0x11100, 0x11134, + 0x11136, 0x1113F, 0x11144, 0x11147, 0x11150, 0x11173, 0x11176, 0x11176, + 0x11180, 0x111C4, 0x111C9, 0x111CC, 0x111CE, 0x111DA, 0x111DC, 0x111DC, + 0x11200, 0x11211, 0x11213, 0x11237, 0x1123E, 0x1123E, 0x11280, 0x11286, + 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, 0x1129F, 0x112A8, + 0x112B0, 0x112EA, 0x112F0, 0x112F9, 0x11300, 0x11303, 0x11305, 0x1130C, + 0x1130F, 0x11310, 0x11313, 0x11328, 0x1132A, 0x11330, 0x11332, 0x11333, + 0x11335, 0x11339, 0x1133B, 0x11344, 0x11347, 0x11348, 0x1134B, 0x1134D, + 0x11350, 0x11350, 0x11357, 0x11357, 0x1135D, 0x11363, 0x11366, 0x1136C, + 0x11370, 0x11374, 0x11400, 0x1144A, 0x11450, 0x11459, 0x1145E, 0x11461, + 0x11480, 0x114C5, 0x114C7, 0x114C7, 0x114D0, 0x114D9, 0x11580, 0x115B5, + 0x115B8, 0x115C0, 0x115D8, 0x115DD, 0x11600, 0x11640, 0x11644, 0x11644, + 0x11650, 0x11659, 0x11680, 0x116B8, 0x116C0, 0x116C9, 0x11700, 0x1171A, + 0x1171D, 0x1172B, 0x11730, 0x11739, 0x11740, 0x11746, 0x11800, 0x1183A, + 0x118A0, 0x118E9, 0x118FF, 0x11906, 0x11909, 0x11909, 0x1190C, 0x11913, + 0x11915, 0x11916, 0x11918, 0x11935, 0x11937, 0x11938, 0x1193B, 0x11943, + 0x11950, 0x11959, 0x119A0, 0x119A7, 0x119AA, 0x119D7, 0x119DA, 0x119E1, + 0x119E3, 0x119E4, 0x11A00, 0x11A3E, 0x11A47, 0x11A47, 0x11A50, 0x11A99, + 0x11A9D, 0x11A9D, 0x11AB0, 0x11AF8, 0x11C00, 0x11C08, 0x11C0A, 0x11C36, + 0x11C38, 0x11C40, 0x11C50, 0x11C59, 0x11C72, 0x11C8F, 0x11C92, 0x11CA7, + 0x11CA9, 0x11CB6, 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D36, + 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D47, 0x11D50, 0x11D59, + 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, 0x11D90, 0x11D91, + 0x11D93, 0x11D98, 0x11DA0, 0x11DA9, 0x11EE0, 0x11EF6, 0x11FB0, 0x11FB0, + 0x12000, 0x12399, 0x12400, 0x1246E, 0x12480, 0x12543, 0x12F90, 0x12FF0, + 0x13000, 0x1342E, 0x14400, 0x14646, 0x16800, 0x16A38, 0x16A40, 0x16A5E, + 0x16A60, 0x16A69, 0x16A70, 0x16ABE, 0x16AC0, 0x16AC9, 0x16AD0, 0x16AED, + 0x16AF0, 0x16AF4, 0x16B00, 0x16B36, 0x16B40, 0x16B43, 0x16B50, 0x16B59, + 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, 0x16E40, 0x16E7F, 0x16F00, 0x16F4A, + 0x16F4F, 0x16F87, 0x16F8F, 0x16F9F, 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE4, + 0x16FF0, 0x16FF1, 0x17000, 0x187F7, 0x18800, 0x18CD5, 0x18D00, 0x18D08, + 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B122, + 0x1B150, 0x1B152, 0x1B164, 0x1B167, 0x1B170, 0x1B2FB, 0x1BC00, 0x1BC6A, + 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, 0x1BC9D, 0x1BC9E, + 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1D165, 0x1D169, 0x1D16D, 0x1D172, + 0x1D17B, 0x1D182, 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0x1D242, 0x1D244, + 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, + 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, + 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, + 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, + 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D6C0, + 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6FA, 0x1D6FC, 0x1D714, 0x1D716, 0x1D734, + 0x1D736, 0x1D74E, 0x1D750, 0x1D76E, 0x1D770, 0x1D788, 0x1D78A, 0x1D7A8, + 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7CB, 0x1D7CE, 0x1D7FF, 0x1DA00, 0x1DA36, + 0x1DA3B, 0x1DA6C, 0x1DA75, 0x1DA75, 0x1DA84, 0x1DA84, 0x1DA9B, 0x1DA9F, + 0x1DAA1, 0x1DAAF, 0x1DF00, 0x1DF1E, 0x1E000, 0x1E006, 0x1E008, 0x1E018, + 0x1E01B, 0x1E021, 0x1E023, 0x1E024, 0x1E026, 0x1E02A, 0x1E100, 0x1E12C, + 0x1E130, 0x1E13D, 0x1E140, 0x1E149, 0x1E14E, 0x1E14E, 0x1E290, 0x1E2AE, + 0x1E2C0, 0x1E2F9, 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, + 0x1E7F0, 0x1E7FE, 0x1E800, 0x1E8C4, 0x1E8D0, 0x1E8D6, 0x1E900, 0x1E94B, + 0x1E950, 0x1E959, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, + 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, + 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, + 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, + 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, + 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, + 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, + 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1FBF0, 0x1FBF9, 0x20000, 0x2A6DF, + 0x2A700, 0x2B738, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, + 0x2F800, 0x2FA1D, 0x30000, 0x3134A, 0xE0100, 0xE01EF, + // #91 (14675+655): bp=XID_Start:XIDS + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00B5, 0x00B5, + 0x00BA, 0x00BA, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02C1, + 0x02C6, 0x02D1, 0x02E0, 0x02E4, 0x02EC, 0x02EC, 0x02EE, 0x02EE, + 0x0370, 0x0374, 0x0376, 0x0377, 0x037B, 0x037D, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, + 0x03A3, 0x03F5, 0x03F7, 0x0481, 0x048A, 0x052F, 0x0531, 0x0556, + 0x0559, 0x0559, 0x0560, 0x0588, 0x05D0, 0x05EA, 0x05EF, 0x05F2, + 0x0620, 0x064A, 0x066E, 0x066F, 0x0671, 0x06D3, 0x06D5, 0x06D5, + 0x06E5, 0x06E6, 0x06EE, 0x06EF, 0x06FA, 0x06FC, 0x06FF, 0x06FF, + 0x0710, 0x0710, 0x0712, 0x072F, 0x074D, 0x07A5, 0x07B1, 0x07B1, + 0x07CA, 0x07EA, 0x07F4, 0x07F5, 0x07FA, 0x07FA, 0x0800, 0x0815, + 0x081A, 0x081A, 0x0824, 0x0824, 0x0828, 0x0828, 0x0840, 0x0858, + 0x0860, 0x086A, 0x0870, 0x0887, 0x0889, 0x088E, 0x08A0, 0x08C9, + 0x0904, 0x0939, 0x093D, 0x093D, 0x0950, 0x0950, 0x0958, 0x0961, + 0x0971, 0x0980, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, + 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BD, 0x09BD, + 0x09CE, 0x09CE, 0x09DC, 0x09DD, 0x09DF, 0x09E1, 0x09F0, 0x09F1, + 0x09FC, 0x09FC, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, + 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, + 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A72, 0x0A74, 0x0A85, 0x0A8D, + 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, + 0x0AB5, 0x0AB9, 0x0ABD, 0x0ABD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE1, + 0x0AF9, 0x0AF9, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, + 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B35, 0x0B39, 0x0B3D, 0x0B3D, + 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, 0x0B71, 0x0B71, 0x0B83, 0x0B83, + 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, + 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, + 0x0BAE, 0x0BB9, 0x0BD0, 0x0BD0, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, + 0x0C12, 0x0C28, 0x0C2A, 0x0C39, 0x0C3D, 0x0C3D, 0x0C58, 0x0C5A, + 0x0C5D, 0x0C5D, 0x0C60, 0x0C61, 0x0C80, 0x0C80, 0x0C85, 0x0C8C, + 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, + 0x0CBD, 0x0CBD, 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE1, 0x0CF1, 0x0CF2, + 0x0D04, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D3A, 0x0D3D, 0x0D3D, + 0x0D4E, 0x0D4E, 0x0D54, 0x0D56, 0x0D5F, 0x0D61, 0x0D7A, 0x0D7F, + 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, + 0x0DC0, 0x0DC6, 0x0E01, 0x0E30, 0x0E32, 0x0E32, 0x0E40, 0x0E46, + 0x0E81, 0x0E82, 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, + 0x0EA5, 0x0EA5, 0x0EA7, 0x0EB0, 0x0EB2, 0x0EB2, 0x0EBD, 0x0EBD, + 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0EDC, 0x0EDF, 0x0F00, 0x0F00, + 0x0F40, 0x0F47, 0x0F49, 0x0F6C, 0x0F88, 0x0F8C, 0x1000, 0x102A, + 0x103F, 0x103F, 0x1050, 0x1055, 0x105A, 0x105D, 0x1061, 0x1061, + 0x1065, 0x1066, 0x106E, 0x1070, 0x1075, 0x1081, 0x108E, 0x108E, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x1380, 0x138F, 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0x1401, 0x166C, + 0x166F, 0x167F, 0x1681, 0x169A, 0x16A0, 0x16EA, 0x16EE, 0x16F8, + 0x1700, 0x1711, 0x171F, 0x1731, 0x1740, 0x1751, 0x1760, 0x176C, + 0x176E, 0x1770, 0x1780, 0x17B3, 0x17D7, 0x17D7, 0x17DC, 0x17DC, + 0x1820, 0x1878, 0x1880, 0x18A8, 0x18AA, 0x18AA, 0x18B0, 0x18F5, + 0x1900, 0x191E, 0x1950, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, + 0x19B0, 0x19C9, 0x1A00, 0x1A16, 0x1A20, 0x1A54, 0x1AA7, 0x1AA7, + 0x1B05, 0x1B33, 0x1B45, 0x1B4C, 0x1B83, 0x1BA0, 0x1BAE, 0x1BAF, + 0x1BBA, 0x1BE5, 0x1C00, 0x1C23, 0x1C4D, 0x1C4F, 0x1C5A, 0x1C7D, + 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF6, 0x1CFA, 0x1CFA, 0x1D00, 0x1DBF, + 0x1E00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, + 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, + 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, 0x1FBE, 0x1FBE, + 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, + 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, 0x2071, 0x2071, + 0x207F, 0x207F, 0x2090, 0x209C, 0x2102, 0x2102, 0x2107, 0x2107, + 0x210A, 0x2113, 0x2115, 0x2115, 0x2118, 0x211D, 0x2124, 0x2124, + 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x2139, 0x213C, 0x213F, + 0x2145, 0x2149, 0x214E, 0x214E, 0x2160, 0x2188, 0x2C00, 0x2CE4, + 0x2CEB, 0x2CEE, 0x2CF2, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, + 0x2D2D, 0x2D2D, 0x2D30, 0x2D67, 0x2D6F, 0x2D6F, 0x2D80, 0x2D96, + 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, + 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, + 0x3005, 0x3007, 0x3021, 0x3029, 0x3031, 0x3035, 0x3038, 0x303C, + 0x3041, 0x3096, 0x309D, 0x309F, 0x30A1, 0x30FA, 0x30FC, 0x30FF, + 0x3105, 0x312F, 0x3131, 0x318E, 0x31A0, 0x31BF, 0x31F0, 0x31FF, + 0x3400, 0x4DBF, 0x4E00, 0xA48C, 0xA4D0, 0xA4FD, 0xA500, 0xA60C, + 0xA610, 0xA61F, 0xA62A, 0xA62B, 0xA640, 0xA66E, 0xA67F, 0xA69D, + 0xA6A0, 0xA6EF, 0xA717, 0xA71F, 0xA722, 0xA788, 0xA78B, 0xA7CA, + 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, 0xA7F2, 0xA801, + 0xA803, 0xA805, 0xA807, 0xA80A, 0xA80C, 0xA822, 0xA840, 0xA873, + 0xA882, 0xA8B3, 0xA8F2, 0xA8F7, 0xA8FB, 0xA8FB, 0xA8FD, 0xA8FE, + 0xA90A, 0xA925, 0xA930, 0xA946, 0xA960, 0xA97C, 0xA984, 0xA9B2, + 0xA9CF, 0xA9CF, 0xA9E0, 0xA9E4, 0xA9E6, 0xA9EF, 0xA9FA, 0xA9FE, + 0xAA00, 0xAA28, 0xAA40, 0xAA42, 0xAA44, 0xAA4B, 0xAA60, 0xAA76, + 0xAA7A, 0xAA7A, 0xAA7E, 0xAAAF, 0xAAB1, 0xAAB1, 0xAAB5, 0xAAB6, + 0xAAB9, 0xAABD, 0xAAC0, 0xAAC0, 0xAAC2, 0xAAC2, 0xAADB, 0xAADD, + 0xAAE0, 0xAAEA, 0xAAF2, 0xAAF4, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, + 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB5A, + 0xAB5C, 0xAB69, 0xAB70, 0xABE2, 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, + 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0xFB00, 0xFB06, + 0xFB13, 0xFB17, 0xFB1D, 0xFB1D, 0xFB1F, 0xFB28, 0xFB2A, 0xFB36, + 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, + 0xFB46, 0xFBB1, 0xFBD3, 0xFC5D, 0xFC64, 0xFD3D, 0xFD50, 0xFD8F, + 0xFD92, 0xFDC7, 0xFDF0, 0xFDF9, 0xFE71, 0xFE71, 0xFE73, 0xFE73, + 0xFE77, 0xFE77, 0xFE79, 0xFE79, 0xFE7B, 0xFE7B, 0xFE7D, 0xFE7D, + 0xFE7F, 0xFEFC, 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0xFF66, 0xFF9D, + 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, + 0xFFDA, 0xFFDC, 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, + 0x1003C, 0x1003D, 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, + 0x10140, 0x10174, 0x10280, 0x1029C, 0x102A0, 0x102D0, 0x10300, 0x1031F, + 0x1032D, 0x1034A, 0x10350, 0x10375, 0x10380, 0x1039D, 0x103A0, 0x103C3, + 0x103C8, 0x103CF, 0x103D1, 0x103D5, 0x10400, 0x1049D, 0x104B0, 0x104D3, + 0x104D8, 0x104FB, 0x10500, 0x10527, 0x10530, 0x10563, 0x10570, 0x1057A, + 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, 0x10597, 0x105A1, + 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10600, 0x10736, + 0x10740, 0x10755, 0x10760, 0x10767, 0x10780, 0x10785, 0x10787, 0x107B0, + 0x107B2, 0x107BA, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080A, 0x10835, + 0x10837, 0x10838, 0x1083C, 0x1083C, 0x1083F, 0x10855, 0x10860, 0x10876, + 0x10880, 0x1089E, 0x108E0, 0x108F2, 0x108F4, 0x108F5, 0x10900, 0x10915, + 0x10920, 0x10939, 0x10980, 0x109B7, 0x109BE, 0x109BF, 0x10A00, 0x10A00, + 0x10A10, 0x10A13, 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A60, 0x10A7C, + 0x10A80, 0x10A9C, 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE4, 0x10B00, 0x10B35, + 0x10B40, 0x10B55, 0x10B60, 0x10B72, 0x10B80, 0x10B91, 0x10C00, 0x10C48, + 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10D00, 0x10D23, 0x10E80, 0x10EA9, + 0x10EB0, 0x10EB1, 0x10F00, 0x10F1C, 0x10F27, 0x10F27, 0x10F30, 0x10F45, + 0x10F70, 0x10F81, 0x10FB0, 0x10FC4, 0x10FE0, 0x10FF6, 0x11003, 0x11037, + 0x11071, 0x11072, 0x11075, 0x11075, 0x11083, 0x110AF, 0x110D0, 0x110E8, + 0x11103, 0x11126, 0x11144, 0x11144, 0x11147, 0x11147, 0x11150, 0x11172, + 0x11176, 0x11176, 0x11183, 0x111B2, 0x111C1, 0x111C4, 0x111DA, 0x111DA, + 0x111DC, 0x111DC, 0x11200, 0x11211, 0x11213, 0x1122B, 0x11280, 0x11286, + 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, 0x1129F, 0x112A8, + 0x112B0, 0x112DE, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, + 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133D, 0x1133D, + 0x11350, 0x11350, 0x1135D, 0x11361, 0x11400, 0x11434, 0x11447, 0x1144A, + 0x1145F, 0x11461, 0x11480, 0x114AF, 0x114C4, 0x114C5, 0x114C7, 0x114C7, + 0x11580, 0x115AE, 0x115D8, 0x115DB, 0x11600, 0x1162F, 0x11644, 0x11644, + 0x11680, 0x116AA, 0x116B8, 0x116B8, 0x11700, 0x1171A, 0x11740, 0x11746, + 0x11800, 0x1182B, 0x118A0, 0x118DF, 0x118FF, 0x11906, 0x11909, 0x11909, + 0x1190C, 0x11913, 0x11915, 0x11916, 0x11918, 0x1192F, 0x1193F, 0x1193F, + 0x11941, 0x11941, 0x119A0, 0x119A7, 0x119AA, 0x119D0, 0x119E1, 0x119E1, + 0x119E3, 0x119E3, 0x11A00, 0x11A00, 0x11A0B, 0x11A32, 0x11A3A, 0x11A3A, + 0x11A50, 0x11A50, 0x11A5C, 0x11A89, 0x11A9D, 0x11A9D, 0x11AB0, 0x11AF8, + 0x11C00, 0x11C08, 0x11C0A, 0x11C2E, 0x11C40, 0x11C40, 0x11C72, 0x11C8F, + 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D30, 0x11D46, 0x11D46, + 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D89, 0x11D98, 0x11D98, + 0x11EE0, 0x11EF2, 0x11FB0, 0x11FB0, 0x12000, 0x12399, 0x12400, 0x1246E, + 0x12480, 0x12543, 0x12F90, 0x12FF0, 0x13000, 0x1342E, 0x14400, 0x14646, + 0x16800, 0x16A38, 0x16A40, 0x16A5E, 0x16A70, 0x16ABE, 0x16AD0, 0x16AED, + 0x16B00, 0x16B2F, 0x16B40, 0x16B43, 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, + 0x16E40, 0x16E7F, 0x16F00, 0x16F4A, 0x16F50, 0x16F50, 0x16F93, 0x16F9F, + 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE3, 0x17000, 0x187F7, 0x18800, 0x18CD5, + 0x18D00, 0x18D08, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, + 0x1B000, 0x1B122, 0x1B150, 0x1B152, 0x1B164, 0x1B167, 0x1B170, 0x1B2FB, + 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, + 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, + 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, + 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, + 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, + 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D6C0, + 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6FA, 0x1D6FC, 0x1D714, 0x1D716, 0x1D734, + 0x1D736, 0x1D74E, 0x1D750, 0x1D76E, 0x1D770, 0x1D788, 0x1D78A, 0x1D7A8, + 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7CB, 0x1DF00, 0x1DF1E, 0x1E100, 0x1E12C, + 0x1E137, 0x1E13D, 0x1E14E, 0x1E14E, 0x1E290, 0x1E2AD, 0x1E2C0, 0x1E2EB, + 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, + 0x1E800, 0x1E8C4, 0x1E900, 0x1E943, 0x1E94B, 0x1E94B, 0x1EE00, 0x1EE03, + 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, + 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, + 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, + 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, + 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, + 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, + 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, + 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, + 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, + 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, + // #92 (15330+3): sc=Adlam:Adlm + 0x1E900, 0x1E94B, 0x1E950, 0x1E959, 0x1E95E, 0x1E95F, + // #93 (15333+3): sc=Ahom:Ahom scx=Ahom:Ahom + 0x11700, 0x1171A, 0x1171D, 0x1172B, 0x11730, 0x11746, + // #94 (15336+1): sc=Anatolian_Hieroglyphs:Hluw scx=Anatolian_Hieroglyphs:Hluw + 0x14400, 0x14646, + // #95 (15337+57): sc=Arabic:Arab + 0x0600, 0x0604, 0x0606, 0x060B, 0x060D, 0x061A, 0x061C, 0x061E, + 0x0620, 0x063F, 0x0641, 0x064A, 0x0656, 0x066F, 0x0671, 0x06DC, + 0x06DE, 0x06FF, 0x0750, 0x077F, 0x0870, 0x088E, 0x0890, 0x0891, + 0x0898, 0x08E1, 0x08E3, 0x08FF, 0xFB50, 0xFBC2, 0xFBD3, 0xFD3D, + 0xFD40, 0xFD8F, 0xFD92, 0xFDC7, 0xFDCF, 0xFDCF, 0xFDF0, 0xFDFF, + 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0x10E60, 0x10E7E, 0x1EE00, 0x1EE03, + 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, + 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, + 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, + 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, + 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, + 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, + 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, + 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, + 0x1EEF0, 0x1EEF1, + // #96 (15394+4): sc=Armenian:Armn scx=Armenian:Armn + 0x0531, 0x0556, 0x0559, 0x058A, 0x058D, 0x058F, 0xFB13, 0xFB17, + // #97 (15398+2): sc=Avestan:Avst scx=Avestan:Avst + 0x10B00, 0x10B35, 0x10B39, 0x10B3F, + // #98 (15400+2): sc=Balinese:Bali scx=Balinese:Bali + 0x1B00, 0x1B4C, 0x1B50, 0x1B7E, + // #99 (15402+2): sc=Bamum:Bamu scx=Bamum:Bamu + 0xA6A0, 0xA6F7, 0x16800, 0x16A38, + // #100 (15404+2): sc=Bassa_Vah:Bass scx=Bassa_Vah:Bass + 0x16AD0, 0x16AED, 0x16AF0, 0x16AF5, + // #101 (15406+2): sc=Batak:Batk scx=Batak:Batk + 0x1BC0, 0x1BF3, 0x1BFC, 0x1BFF, + // #102 (15408+14): sc=Bengali:Beng + 0x0980, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, + 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BC, 0x09C4, + 0x09C7, 0x09C8, 0x09CB, 0x09CE, 0x09D7, 0x09D7, 0x09DC, 0x09DD, + 0x09DF, 0x09E3, 0x09E6, 0x09FE, + // #103 (15422+4): sc=Bhaiksuki:Bhks scx=Bhaiksuki:Bhks + 0x11C00, 0x11C08, 0x11C0A, 0x11C36, 0x11C38, 0x11C45, 0x11C50, 0x11C6C, + // #104 (15426+3): sc=Bopomofo:Bopo + 0x02EA, 0x02EB, 0x3105, 0x312F, 0x31A0, 0x31BF, + // #105 (15429+3): sc=Brahmi:Brah scx=Brahmi:Brah + 0x11000, 0x1104D, 0x11052, 0x11075, 0x1107F, 0x1107F, + // #106 (15432+1): sc=Braille:Brai scx=Braille:Brai + 0x2800, 0x28FF, + // #107 (15433+2): sc=Buginese:Bugi + 0x1A00, 0x1A1B, 0x1A1E, 0x1A1F, + // #108 (15435+1): sc=Buhid:Buhd + 0x1740, 0x1753, + // #109 (15436+3): sc=Canadian_Aboriginal:Cans scx=Canadian_Aboriginal:Cans + 0x1400, 0x167F, 0x18B0, 0x18F5, 0x11AB0, 0x11ABF, + // #110 (15439+1): sc=Carian:Cari scx=Carian:Cari + 0x102A0, 0x102D0, + // #111 (15440+2): sc=Caucasian_Albanian:Aghb scx=Caucasian_Albanian:Aghb + 0x10530, 0x10563, 0x1056F, 0x1056F, + // #112 (15442+2): sc=Chakma:Cakm + 0x11100, 0x11134, 0x11136, 0x11147, + // #113 (15444+4): sc=Cham:Cham scx=Cham:Cham + 0xAA00, 0xAA36, 0xAA40, 0xAA4D, 0xAA50, 0xAA59, 0xAA5C, 0xAA5F, + // #114 (15448+3): sc=Cherokee:Cher scx=Cherokee:Cher + 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0xAB70, 0xABBF, + // #115 (15451+1): sc=Chorasmian:Chrs scx=Chorasmian:Chrs + 0x10FB0, 0x10FCB, + // #116 (15452+174): sc=Common:Zyyy + 0x0000, 0x0040, 0x005B, 0x0060, 0x007B, 0x00A9, 0x00AB, 0x00B9, + 0x00BB, 0x00BF, 0x00D7, 0x00D7, 0x00F7, 0x00F7, 0x02B9, 0x02DF, + 0x02E5, 0x02E9, 0x02EC, 0x02FF, 0x0374, 0x0374, 0x037E, 0x037E, + 0x0385, 0x0385, 0x0387, 0x0387, 0x0605, 0x0605, 0x060C, 0x060C, + 0x061B, 0x061B, 0x061F, 0x061F, 0x0640, 0x0640, 0x06DD, 0x06DD, + 0x08E2, 0x08E2, 0x0964, 0x0965, 0x0E3F, 0x0E3F, 0x0FD5, 0x0FD8, + 0x10FB, 0x10FB, 0x16EB, 0x16ED, 0x1735, 0x1736, 0x1802, 0x1803, + 0x1805, 0x1805, 0x1CD3, 0x1CD3, 0x1CE1, 0x1CE1, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF7, 0x1CFA, 0x1CFA, 0x2000, 0x200B, + 0x200E, 0x2064, 0x2066, 0x2070, 0x2074, 0x207E, 0x2080, 0x208E, + 0x20A0, 0x20C0, 0x2100, 0x2125, 0x2127, 0x2129, 0x212C, 0x2131, + 0x2133, 0x214D, 0x214F, 0x215F, 0x2189, 0x218B, 0x2190, 0x2426, + 0x2440, 0x244A, 0x2460, 0x27FF, 0x2900, 0x2B73, 0x2B76, 0x2B95, + 0x2B97, 0x2BFF, 0x2E00, 0x2E5D, 0x2FF0, 0x2FFB, 0x3000, 0x3004, + 0x3006, 0x3006, 0x3008, 0x3020, 0x3030, 0x3037, 0x303C, 0x303F, + 0x309B, 0x309C, 0x30A0, 0x30A0, 0x30FB, 0x30FC, 0x3190, 0x319F, + 0x31C0, 0x31E3, 0x3220, 0x325F, 0x327F, 0x32CF, 0x32FF, 0x32FF, + 0x3358, 0x33FF, 0x4DC0, 0x4DFF, 0xA700, 0xA721, 0xA788, 0xA78A, + 0xA830, 0xA839, 0xA92E, 0xA92E, 0xA9CF, 0xA9CF, 0xAB5B, 0xAB5B, + 0xAB6A, 0xAB6B, 0xFD3E, 0xFD3F, 0xFE10, 0xFE19, 0xFE30, 0xFE52, + 0xFE54, 0xFE66, 0xFE68, 0xFE6B, 0xFEFF, 0xFEFF, 0xFF01, 0xFF20, + 0xFF3B, 0xFF40, 0xFF5B, 0xFF65, 0xFF70, 0xFF70, 0xFF9E, 0xFF9F, + 0xFFE0, 0xFFE6, 0xFFE8, 0xFFEE, 0xFFF9, 0xFFFD, 0x10100, 0x10102, + 0x10107, 0x10133, 0x10137, 0x1013F, 0x10190, 0x1019C, 0x101D0, 0x101FC, + 0x102E1, 0x102FB, 0x1BCA0, 0x1BCA3, 0x1CF50, 0x1CFC3, 0x1D000, 0x1D0F5, + 0x1D100, 0x1D126, 0x1D129, 0x1D166, 0x1D16A, 0x1D17A, 0x1D183, 0x1D184, + 0x1D18C, 0x1D1A9, 0x1D1AE, 0x1D1EA, 0x1D2E0, 0x1D2F3, 0x1D300, 0x1D356, + 0x1D360, 0x1D378, 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, + 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, + 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, + 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, + 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, + 0x1D6A8, 0x1D7CB, 0x1D7CE, 0x1D7FF, 0x1EC71, 0x1ECB4, 0x1ED01, 0x1ED3D, + 0x1F000, 0x1F02B, 0x1F030, 0x1F093, 0x1F0A0, 0x1F0AE, 0x1F0B1, 0x1F0BF, + 0x1F0C1, 0x1F0CF, 0x1F0D1, 0x1F0F5, 0x1F100, 0x1F1AD, 0x1F1E6, 0x1F1FF, + 0x1F201, 0x1F202, 0x1F210, 0x1F23B, 0x1F240, 0x1F248, 0x1F250, 0x1F251, + 0x1F260, 0x1F265, 0x1F300, 0x1F6D7, 0x1F6DD, 0x1F6EC, 0x1F6F0, 0x1F6FC, + 0x1F700, 0x1F773, 0x1F780, 0x1F7D8, 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, + 0x1F800, 0x1F80B, 0x1F810, 0x1F847, 0x1F850, 0x1F859, 0x1F860, 0x1F887, + 0x1F890, 0x1F8AD, 0x1F8B0, 0x1F8B1, 0x1F900, 0x1FA53, 0x1FA60, 0x1FA6D, + 0x1FA70, 0x1FA74, 0x1FA78, 0x1FA7C, 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, + 0x1FAB0, 0x1FABA, 0x1FAC0, 0x1FAC5, 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, + 0x1FAF0, 0x1FAF6, 0x1FB00, 0x1FB92, 0x1FB94, 0x1FBCA, 0x1FBF0, 0x1FBF9, + 0xE0001, 0xE0001, 0xE0020, 0xE007F, + // #117 (15626+3): sc=Coptic:Copt:Qaac + 0x03E2, 0x03EF, 0x2C80, 0x2CF3, 0x2CF9, 0x2CFF, + // #118 (15629+1): sc=Cypro_Minoan:Cpmn + 0x12F90, 0x12FF2, + // #119 (15630+4): sc=Cuneiform:Xsux scx=Cuneiform:Xsux + 0x12000, 0x12399, 0x12400, 0x1246E, 0x12470, 0x12474, 0x12480, 0x12543, + // #120 (15634+6): sc=Cypriot:Cprt + 0x10800, 0x10805, 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, + 0x1083C, 0x1083C, 0x1083F, 0x1083F, + // #121 (15640+8): sc=Cyrillic:Cyrl + 0x0400, 0x0484, 0x0487, 0x052F, 0x1C80, 0x1C88, 0x1D2B, 0x1D2B, + 0x1D78, 0x1D78, 0x2DE0, 0x2DFF, 0xA640, 0xA69F, 0xFE2E, 0xFE2F, + // #122 (15648+1): sc=Deseret:Dsrt scx=Deseret:Dsrt + 0x10400, 0x1044F, + // #123 (15649+4): sc=Devanagari:Deva + 0x0900, 0x0950, 0x0955, 0x0963, 0x0966, 0x097F, 0xA8E0, 0xA8FF, + // #124 (15653+8): sc=Dives_Akuru:Diak scx=Dives_Akuru:Diak + 0x11900, 0x11906, 0x11909, 0x11909, 0x1190C, 0x11913, 0x11915, 0x11916, + 0x11918, 0x11935, 0x11937, 0x11938, 0x1193B, 0x11946, 0x11950, 0x11959, + // #125 (15661+1): sc=Dogra:Dogr + 0x11800, 0x1183B, + // #126 (15662+5): sc=Duployan:Dupl + 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, + 0x1BC9C, 0x1BC9F, + // #127 (15667+2): sc=Egyptian_Hieroglyphs:Egyp scx=Egyptian_Hieroglyphs:Egyp + 0x13000, 0x1342E, 0x13430, 0x13438, + // #128 (15669+1): sc=Elbasan:Elba scx=Elbasan:Elba + 0x10500, 0x10527, + // #129 (15670+1): sc=Elymaic:Elym scx=Elymaic:Elym + 0x10FE0, 0x10FF6, + // #130 (15671+36): sc=Ethiopic:Ethi scx=Ethiopic:Ethi + 0x1200, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x135D, 0x137C, 0x1380, 0x1399, 0x2D80, 0x2D96, 0x2DA0, 0x2DA6, + 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, + 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, 0xAB01, 0xAB06, + 0xAB09, 0xAB0E, 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, + 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, + // #131 (15707+10): sc=Georgian:Geor + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x10FF, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x2D00, 0x2D25, + 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, + // #132 (15717+6): sc=Glagolitic:Glag + 0x2C00, 0x2C5F, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, + // #133 (15723+1): sc=Gothic:Goth scx=Gothic:Goth + 0x10330, 0x1034A, + // #134 (15724+15): sc=Grantha:Gran + 0x11300, 0x11303, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, + 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133C, 0x11344, + 0x11347, 0x11348, 0x1134B, 0x1134D, 0x11350, 0x11350, 0x11357, 0x11357, + 0x1135D, 0x11363, 0x11366, 0x1136C, 0x11370, 0x11374, + // #135 (15739+36): sc=Greek:Grek + 0x0370, 0x0373, 0x0375, 0x0377, 0x037A, 0x037D, 0x037F, 0x037F, + 0x0384, 0x0384, 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, + 0x038E, 0x03A1, 0x03A3, 0x03E1, 0x03F0, 0x03FF, 0x1D26, 0x1D2A, + 0x1D5D, 0x1D61, 0x1D66, 0x1D6A, 0x1DBF, 0x1DBF, 0x1F00, 0x1F15, + 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, + 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, + 0x1F80, 0x1FB4, 0x1FB6, 0x1FC4, 0x1FC6, 0x1FD3, 0x1FD6, 0x1FDB, + 0x1FDD, 0x1FEF, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFE, 0x2126, 0x2126, + 0xAB65, 0xAB65, 0x10140, 0x1018E, 0x101A0, 0x101A0, 0x1D200, 0x1D245, + // #136 (15775+14): sc=Gujarati:Gujr + 0x0A81, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABC, 0x0AC5, + 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, + 0x0AE6, 0x0AF1, 0x0AF9, 0x0AFF, + // #137 (15789+6): sc=Gunjala_Gondi:Gong + 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, 0x11D90, 0x11D91, + 0x11D93, 0x11D98, 0x11DA0, 0x11DA9, + // #138 (15795+16): sc=Gurmukhi:Guru + 0x0A01, 0x0A03, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, + 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, + 0x0A3C, 0x0A3C, 0x0A3E, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, + 0x0A51, 0x0A51, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A66, 0x0A76, + // #139 (15811+20): sc=Han:Hani + 0x2E80, 0x2E99, 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, 0x3005, 0x3005, + 0x3007, 0x3007, 0x3021, 0x3029, 0x3038, 0x303B, 0x3400, 0x4DBF, + 0x4E00, 0x9FFF, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0x16FE2, 0x16FE3, + 0x16FF0, 0x16FF1, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, + 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, + // #140 (15831+14): sc=Hangul:Hang + 0x1100, 0x11FF, 0x302E, 0x302F, 0x3131, 0x318E, 0x3200, 0x321E, + 0x3260, 0x327E, 0xA960, 0xA97C, 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, + 0xD7CB, 0xD7FB, 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, + 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, + // #141 (15845+2): sc=Hanifi_Rohingya:Rohg + 0x10D00, 0x10D27, 0x10D30, 0x10D39, + // #142 (15847+1): sc=Hanunoo:Hano + 0x1720, 0x1734, + // #143 (15848+3): sc=Hatran:Hatr scx=Hatran:Hatr + 0x108E0, 0x108F2, 0x108F4, 0x108F5, 0x108FB, 0x108FF, + // #144 (15851+9): sc=Hebrew:Hebr scx=Hebrew:Hebr + 0x0591, 0x05C7, 0x05D0, 0x05EA, 0x05EF, 0x05F4, 0xFB1D, 0xFB36, + 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, + 0xFB46, 0xFB4F, + // #145 (15860+5): sc=Hiragana:Hira + 0x3041, 0x3096, 0x309D, 0x309F, 0x1B001, 0x1B11F, 0x1B150, 0x1B152, + 0x1F200, 0x1F200, + // #146 (15865+2): sc=Imperial_Aramaic:Armi scx=Imperial_Aramaic:Armi + 0x10840, 0x10855, 0x10857, 0x1085F, + // #147 (15867+29): sc=Inherited:Zinh:Qaai + 0x0300, 0x036F, 0x0485, 0x0486, 0x064B, 0x0655, 0x0670, 0x0670, + 0x0951, 0x0954, 0x1AB0, 0x1ACE, 0x1CD0, 0x1CD2, 0x1CD4, 0x1CE0, + 0x1CE2, 0x1CE8, 0x1CED, 0x1CED, 0x1CF4, 0x1CF4, 0x1CF8, 0x1CF9, + 0x1DC0, 0x1DFF, 0x200C, 0x200D, 0x20D0, 0x20F0, 0x302A, 0x302D, + 0x3099, 0x309A, 0xFE00, 0xFE0F, 0xFE20, 0xFE2D, 0x101FD, 0x101FD, + 0x102E0, 0x102E0, 0x1133B, 0x1133B, 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, + 0x1D167, 0x1D169, 0x1D17B, 0x1D182, 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, + 0xE0100, 0xE01EF, + // #148 (15896+2): sc=Inscriptional_Pahlavi:Phli scx=Inscriptional_Pahlavi:Phli + 0x10B60, 0x10B72, 0x10B78, 0x10B7F, + // #149 (15898+2): sc=Inscriptional_Parthian:Prti scx=Inscriptional_Parthian:Prti + 0x10B40, 0x10B55, 0x10B58, 0x10B5F, + // #150 (15900+3): sc=Javanese:Java + 0xA980, 0xA9CD, 0xA9D0, 0xA9D9, 0xA9DE, 0xA9DF, + // #151 (15903+2): sc=Kaithi:Kthi + 0x11080, 0x110C2, 0x110CD, 0x110CD, + // #152 (15905+13): sc=Kannada:Knda + 0x0C80, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, + 0x0CB5, 0x0CB9, 0x0CBC, 0x0CC4, 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, + 0x0CD5, 0x0CD6, 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE3, 0x0CE6, 0x0CEF, + 0x0CF1, 0x0CF2, + // #153 (15918+13): sc=Katakana:Kana + 0x30A1, 0x30FA, 0x30FD, 0x30FF, 0x31F0, 0x31FF, 0x32D0, 0x32FE, + 0x3300, 0x3357, 0xFF66, 0xFF6F, 0xFF71, 0xFF9D, 0x1AFF0, 0x1AFF3, + 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B000, 0x1B120, 0x1B122, + 0x1B164, 0x1B167, + // #154 (15931+2): sc=Kayah_Li:Kali + 0xA900, 0xA92D, 0xA92F, 0xA92F, + // #155 (15933+8): sc=Kharoshthi:Khar scx=Kharoshthi:Khar + 0x10A00, 0x10A03, 0x10A05, 0x10A06, 0x10A0C, 0x10A13, 0x10A15, 0x10A17, + 0x10A19, 0x10A35, 0x10A38, 0x10A3A, 0x10A3F, 0x10A48, 0x10A50, 0x10A58, + // #156 (15941+2): sc=Khitan_Small_Script:Kits scx=Khitan_Small_Script:Kits + 0x16FE4, 0x16FE4, 0x18B00, 0x18CD5, + // #157 (15943+4): sc=Khmer:Khmr scx=Khmer:Khmr + 0x1780, 0x17DD, 0x17E0, 0x17E9, 0x17F0, 0x17F9, 0x19E0, 0x19FF, + // #158 (15947+2): sc=Khojki:Khoj + 0x11200, 0x11211, 0x11213, 0x1123E, + // #159 (15949+2): sc=Khudawadi:Sind + 0x112B0, 0x112EA, 0x112F0, 0x112F9, + // #160 (15951+11): sc=Lao:Laoo scx=Lao:Laoo + 0x0E81, 0x0E82, 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, + 0x0EA5, 0x0EA5, 0x0EA7, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, + 0x0EC8, 0x0ECD, 0x0ED0, 0x0ED9, 0x0EDC, 0x0EDF, + // #161 (15962+38): sc=Latin:Latn + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00BA, 0x00BA, + 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02B8, 0x02E0, 0x02E4, + 0x1D00, 0x1D25, 0x1D2C, 0x1D5C, 0x1D62, 0x1D65, 0x1D6B, 0x1D77, + 0x1D79, 0x1DBE, 0x1E00, 0x1EFF, 0x2071, 0x2071, 0x207F, 0x207F, + 0x2090, 0x209C, 0x212A, 0x212B, 0x2132, 0x2132, 0x214E, 0x214E, + 0x2160, 0x2188, 0x2C60, 0x2C7F, 0xA722, 0xA787, 0xA78B, 0xA7CA, + 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, 0xA7F2, 0xA7FF, + 0xAB30, 0xAB5A, 0xAB5C, 0xAB64, 0xAB66, 0xAB69, 0xFB00, 0xFB06, + 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0x10780, 0x10785, 0x10787, 0x107B0, + 0x107B2, 0x107BA, 0x1DF00, 0x1DF1E, + // #162 (16000+3): sc=Lepcha:Lepc scx=Lepcha:Lepc + 0x1C00, 0x1C37, 0x1C3B, 0x1C49, 0x1C4D, 0x1C4F, + // #163 (16003+5): sc=Limbu:Limb + 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x193B, 0x1940, 0x1940, + 0x1944, 0x194F, + // #164 (16008+3): sc=Linear_A:Lina + 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + // #165 (16011+7): sc=Linear_B:Linb + 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, + 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, + // #166 (16018+2): sc=Lisu:Lisu scx=Lisu:Lisu + 0xA4D0, 0xA4FF, 0x11FB0, 0x11FB0, + // #167 (16020+1): sc=Lycian:Lyci scx=Lycian:Lyci + 0x10280, 0x1029C, + // #168 (16021+2): sc=Lydian:Lydi scx=Lydian:Lydi + 0x10920, 0x10939, 0x1093F, 0x1093F, + // #169 (16023+1): sc=Mahajani:Mahj + 0x11150, 0x11176, + // #170 (16024+1): sc=Makasar:Maka scx=Makasar:Maka + 0x11EE0, 0x11EF8, + // #171 (16025+7): sc=Malayalam:Mlym + 0x0D00, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D44, 0x0D46, 0x0D48, + 0x0D4A, 0x0D4F, 0x0D54, 0x0D63, 0x0D66, 0x0D7F, + // #172 (16032+2): sc=Mandaic:Mand + 0x0840, 0x085B, 0x085E, 0x085E, + // #173 (16034+2): sc=Manichaean:Mani + 0x10AC0, 0x10AE6, 0x10AEB, 0x10AF6, + // #174 (16036+3): sc=Marchen:Marc scx=Marchen:Marc + 0x11C70, 0x11C8F, 0x11C92, 0x11CA7, 0x11CA9, 0x11CB6, + // #175 (16039+7): sc=Masaram_Gondi:Gonm + 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D36, 0x11D3A, 0x11D3A, + 0x11D3C, 0x11D3D, 0x11D3F, 0x11D47, 0x11D50, 0x11D59, + // #176 (16046+1): sc=Medefaidrin:Medf scx=Medefaidrin:Medf + 0x16E40, 0x16E9A, + // #177 (16047+3): sc=Meetei_Mayek:Mtei scx=Meetei_Mayek:Mtei + 0xAAE0, 0xAAF6, 0xABC0, 0xABED, 0xABF0, 0xABF9, + // #178 (16050+2): sc=Mende_Kikakui:Mend scx=Mende_Kikakui:Mend + 0x1E800, 0x1E8C4, 0x1E8C7, 0x1E8D6, + // #179 (16052+3): sc=Meroitic_Cursive:Merc scx=Meroitic_Cursive:Merc + 0x109A0, 0x109B7, 0x109BC, 0x109CF, 0x109D2, 0x109FF, + // #180 (16055+1): sc=Meroitic_Hieroglyphs:Mero scx=Meroitic_Hieroglyphs:Mero + 0x10980, 0x1099F, + // #181 (16056+3): sc=Miao:Plrd scx=Miao:Plrd + 0x16F00, 0x16F4A, 0x16F4F, 0x16F87, 0x16F8F, 0x16F9F, + // #182 (16059+2): sc=Modi:Modi + 0x11600, 0x11644, 0x11650, 0x11659, + // #183 (16061+6): sc=Mongolian:Mong + 0x1800, 0x1801, 0x1804, 0x1804, 0x1806, 0x1819, 0x1820, 0x1878, + 0x1880, 0x18AA, 0x11660, 0x1166C, + // #184 (16067+3): sc=Mro:Mroo scx=Mro:Mroo + 0x16A40, 0x16A5E, 0x16A60, 0x16A69, 0x16A6E, 0x16A6F, + // #185 (16070+5): sc=Multani:Mult + 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, + 0x1129F, 0x112A9, + // #186 (16075+3): sc=Myanmar:Mymr + 0x1000, 0x109F, 0xA9E0, 0xA9FE, 0xAA60, 0xAA7F, + // #187 (16078+2): sc=Nabataean:Nbat scx=Nabataean:Nbat + 0x10880, 0x1089E, 0x108A7, 0x108AF, + // #188 (16080+3): sc=Nandinagari:Nand + 0x119A0, 0x119A7, 0x119AA, 0x119D7, 0x119DA, 0x119E4, + // #189 (16083+4): sc=New_Tai_Lue:Talu scx=New_Tai_Lue:Talu + 0x1980, 0x19AB, 0x19B0, 0x19C9, 0x19D0, 0x19DA, 0x19DE, 0x19DF, + // #190 (16087+2): sc=Newa:Newa scx=Newa:Newa + 0x11400, 0x1145B, 0x1145D, 0x11461, + // #191 (16089+2): sc=Nko:Nkoo + 0x07C0, 0x07FA, 0x07FD, 0x07FF, + // #192 (16091+2): sc=Nushu:Nshu scx=Nushu:Nshu + 0x16FE1, 0x16FE1, 0x1B170, 0x1B2FB, + // #193 (16093+4): sc=Nyiakeng_Puachue_Hmong:Hmnp scx=Nyiakeng_Puachue_Hmong:Hmnp + 0x1E100, 0x1E12C, 0x1E130, 0x1E13D, 0x1E140, 0x1E149, 0x1E14E, 0x1E14F, + // #194 (16097+1): sc=Ogham:Ogam scx=Ogham:Ogam + 0x1680, 0x169C, + // #195 (16098+1): sc=Ol_Chiki:Olck scx=Ol_Chiki:Olck + 0x1C50, 0x1C7F, + // #196 (16099+3): sc=Old_Hungarian:Hung scx=Old_Hungarian:Hung + 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10CFA, 0x10CFF, + // #197 (16102+2): sc=Old_Italic:Ital scx=Old_Italic:Ital + 0x10300, 0x10323, 0x1032D, 0x1032F, + // #198 (16104+1): sc=Old_North_Arabian:Narb scx=Old_North_Arabian:Narb + 0x10A80, 0x10A9F, + // #199 (16105+1): sc=Old_Permic:Perm + 0x10350, 0x1037A, + // #200 (16106+2): sc=Old_Persian:Xpeo scx=Old_Persian:Xpeo + 0x103A0, 0x103C3, 0x103C8, 0x103D5, + // #201 (16108+1): sc=Old_Sogdian:Sogo scx=Old_Sogdian:Sogo + 0x10F00, 0x10F27, + // #202 (16109+1): sc=Old_South_Arabian:Sarb scx=Old_South_Arabian:Sarb + 0x10A60, 0x10A7F, + // #203 (16110+1): sc=Old_Turkic:Orkh scx=Old_Turkic:Orkh + 0x10C00, 0x10C48, + // #204 (16111+1): sc=Old_Uyghur:Ougr + 0x10F70, 0x10F89, + // #205 (16112+14): sc=Oriya:Orya + 0x0B01, 0x0B03, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, + 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B35, 0x0B39, 0x0B3C, 0x0B44, + 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, 0x0B55, 0x0B57, 0x0B5C, 0x0B5D, + 0x0B5F, 0x0B63, 0x0B66, 0x0B77, + // #206 (16126+2): sc=Osage:Osge scx=Osage:Osge + 0x104B0, 0x104D3, 0x104D8, 0x104FB, + // #207 (16128+2): sc=Osmanya:Osma scx=Osmanya:Osma + 0x10480, 0x1049D, 0x104A0, 0x104A9, + // #208 (16130+5): sc=Pahawh_Hmong:Hmng scx=Pahawh_Hmong:Hmng + 0x16B00, 0x16B45, 0x16B50, 0x16B59, 0x16B5B, 0x16B61, 0x16B63, 0x16B77, + 0x16B7D, 0x16B8F, + // #209 (16135+1): sc=Palmyrene:Palm scx=Palmyrene:Palm + 0x10860, 0x1087F, + // #210 (16136+1): sc=Pau_Cin_Hau:Pauc scx=Pau_Cin_Hau:Pauc + 0x11AC0, 0x11AF8, + // #211 (16137+1): sc=Phags_Pa:Phag + 0xA840, 0xA877, + // #212 (16138+2): sc=Phoenician:Phnx scx=Phoenician:Phnx + 0x10900, 0x1091B, 0x1091F, 0x1091F, + // #213 (16140+3): sc=Psalter_Pahlavi:Phlp + 0x10B80, 0x10B91, 0x10B99, 0x10B9C, 0x10BA9, 0x10BAF, + // #214 (16143+2): sc=Rejang:Rjng scx=Rejang:Rjng + 0xA930, 0xA953, 0xA95F, 0xA95F, + // #215 (16145+2): sc=Runic:Runr scx=Runic:Runr + 0x16A0, 0x16EA, 0x16EE, 0x16F8, + // #216 (16147+2): sc=Samaritan:Samr scx=Samaritan:Samr + 0x0800, 0x082D, 0x0830, 0x083E, + // #217 (16149+2): sc=Saurashtra:Saur scx=Saurashtra:Saur + 0xA880, 0xA8C5, 0xA8CE, 0xA8D9, + // #218 (16151+1): sc=Sharada:Shrd + 0x11180, 0x111DF, + // #219 (16152+1): sc=Shavian:Shaw scx=Shavian:Shaw + 0x10450, 0x1047F, + // #220 (16153+2): sc=Siddham:Sidd scx=Siddham:Sidd + 0x11580, 0x115B5, 0x115B8, 0x115DD, + // #221 (16155+3): sc=SignWriting:Sgnw scx=SignWriting:Sgnw + 0x1D800, 0x1DA8B, 0x1DA9B, 0x1DA9F, 0x1DAA1, 0x1DAAF, + // #222 (16158+13): sc=Sinhala:Sinh + 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, + 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCA, 0x0DCA, 0x0DCF, 0x0DD4, + 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DE6, 0x0DEF, 0x0DF2, 0x0DF4, + 0x111E1, 0x111F4, + // #223 (16171+1): sc=Sogdian:Sogd + 0x10F30, 0x10F59, + // #224 (16172+2): sc=Sora_Sompeng:Sora scx=Sora_Sompeng:Sora + 0x110D0, 0x110E8, 0x110F0, 0x110F9, + // #225 (16174+1): sc=Soyombo:Soyo scx=Soyombo:Soyo + 0x11A50, 0x11AA2, + // #226 (16175+2): sc=Sundanese:Sund scx=Sundanese:Sund + 0x1B80, 0x1BBF, 0x1CC0, 0x1CC7, + // #227 (16177+1): sc=Syloti_Nagri:Sylo + 0xA800, 0xA82C, + // #228 (16178+4): sc=Syriac:Syrc + 0x0700, 0x070D, 0x070F, 0x074A, 0x074D, 0x074F, 0x0860, 0x086A, + // #229 (16182+2): sc=Tagalog:Tglg + 0x1700, 0x1715, 0x171F, 0x171F, + // #230 (16184+3): sc=Tagbanwa:Tagb + 0x1760, 0x176C, 0x176E, 0x1770, 0x1772, 0x1773, + // #231 (16187+2): sc=Tai_Le:Tale + 0x1950, 0x196D, 0x1970, 0x1974, + // #232 (16189+5): sc=Tai_Tham:Lana scx=Tai_Tham:Lana + 0x1A20, 0x1A5E, 0x1A60, 0x1A7C, 0x1A7F, 0x1A89, 0x1A90, 0x1A99, + 0x1AA0, 0x1AAD, + // #233 (16194+2): sc=Tai_Viet:Tavt scx=Tai_Viet:Tavt + 0xAA80, 0xAAC2, 0xAADB, 0xAADF, + // #234 (16196+2): sc=Takri:Takr + 0x11680, 0x116B9, 0x116C0, 0x116C9, + // #235 (16198+18): sc=Tamil:Taml + 0x0B82, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, + 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, + 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, + 0x0BCA, 0x0BCD, 0x0BD0, 0x0BD0, 0x0BD7, 0x0BD7, 0x0BE6, 0x0BFA, + 0x11FC0, 0x11FF1, 0x11FFF, 0x11FFF, + // #236 (16216+2): sc=Tangsa:Tnsa scx=Tangsa:Tnsa + 0x16A70, 0x16ABE, 0x16AC0, 0x16AC9, + // #237 (16218+4): sc=Tangut:Tang scx=Tangut:Tang + 0x16FE0, 0x16FE0, 0x17000, 0x187F7, 0x18800, 0x18AFF, 0x18D00, 0x18D08, + // #238 (16222+13): sc=Telugu:Telu + 0x0C00, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C39, + 0x0C3C, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, + 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, 0x0C60, 0x0C63, 0x0C66, 0x0C6F, + 0x0C77, 0x0C7F, + // #239 (16235+1): sc=Thaana:Thaa + 0x0780, 0x07B1, + // #240 (16236+2): sc=Thai:Thai scx=Thai:Thai + 0x0E01, 0x0E3A, 0x0E40, 0x0E5B, + // #241 (16238+7): sc=Tibetan:Tibt scx=Tibetan:Tibt + 0x0F00, 0x0F47, 0x0F49, 0x0F6C, 0x0F71, 0x0F97, 0x0F99, 0x0FBC, + 0x0FBE, 0x0FCC, 0x0FCE, 0x0FD4, 0x0FD9, 0x0FDA, + // #242 (16245+3): sc=Tifinagh:Tfng scx=Tifinagh:Tfng + 0x2D30, 0x2D67, 0x2D6F, 0x2D70, 0x2D7F, 0x2D7F, + // #243 (16248+2): sc=Tirhuta:Tirh + 0x11480, 0x114C7, 0x114D0, 0x114D9, + // #244 (16250+1): sc=Toto scx=Toto + 0x1E290, 0x1E2AE, + // #245 (16251+2): sc=Ugaritic:Ugar scx=Ugaritic:Ugar + 0x10380, 0x1039D, 0x1039F, 0x1039F, + // #246 (16253+1): sc=Vai:Vaii scx=Vai:Vaii + 0xA500, 0xA62B, + // #247 (16254+8): sc=Vithkuqi:Vith scx=Vithkuqi:Vith + 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, + 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, + // #248 (16262+2): sc=Wancho:Wcho scx=Wancho:Wcho + 0x1E2C0, 0x1E2F9, 0x1E2FF, 0x1E2FF, + // #249 (16264+2): sc=Warang_Citi:Wara scx=Warang_Citi:Wara + 0x118A0, 0x118F2, 0x118FF, 0x118FF, + // #250 (16266+3): sc=Yezidi:Yezi + 0x10E80, 0x10EA9, 0x10EAB, 0x10EAD, 0x10EB0, 0x10EB1, + // #251 (16269+2): sc=Yi:Yiii + 0xA000, 0xA48C, 0xA490, 0xA4C6, + // #252 (16271+1): sc=Zanabazar_Square:Zanb scx=Zanabazar_Square:Zanb + 0x11A00, 0x11A47, + // #253 (16272+5): scx=Adlam:Adlm + 0x061F, 0x061F, 0x0640, 0x0640, 0x1E900, 0x1E94B, 0x1E950, 0x1E959, + 0x1E95E, 0x1E95F, + // #254 (16277+51): scx=Arabic:Arab + 0x0600, 0x0604, 0x0606, 0x06DC, 0x06DE, 0x06FF, 0x0750, 0x077F, + 0x0870, 0x088E, 0x0890, 0x0891, 0x0898, 0x08E1, 0x08E3, 0x08FF, + 0xFB50, 0xFBC2, 0xFBD3, 0xFD8F, 0xFD92, 0xFDC7, 0xFDCF, 0xFDCF, + 0xFDF0, 0xFDFF, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0x102E0, 0x102FB, + 0x10E60, 0x10E7E, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, + 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, + 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, + 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, + 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, + 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, + 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, + 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1EEF0, 0x1EEF1, + // #255 (16328+26): scx=Bengali:Beng + 0x0951, 0x0952, 0x0964, 0x0965, 0x0980, 0x0983, 0x0985, 0x098C, + 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B2, 0x09B2, + 0x09B6, 0x09B9, 0x09BC, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CE, + 0x09D7, 0x09D7, 0x09DC, 0x09DD, 0x09DF, 0x09E3, 0x09E6, 0x09FE, + 0x1CD0, 0x1CD0, 0x1CD2, 0x1CD2, 0x1CD5, 0x1CD6, 0x1CD8, 0x1CD8, + 0x1CE1, 0x1CE1, 0x1CEA, 0x1CEA, 0x1CED, 0x1CED, 0x1CF2, 0x1CF2, + 0x1CF5, 0x1CF7, 0xA8F1, 0xA8F1, + // #256 (16354+12): scx=Bopomofo:Bopo + 0x02EA, 0x02EB, 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, + 0x302A, 0x302D, 0x3030, 0x3030, 0x3037, 0x3037, 0x30FB, 0x30FB, + 0x3105, 0x312F, 0x31A0, 0x31BF, 0xFE45, 0xFE46, 0xFF61, 0xFF65, + // #257 (16366+3): scx=Buginese:Bugi + 0x1A00, 0x1A1B, 0x1A1E, 0x1A1F, 0xA9CF, 0xA9CF, + // #258 (16369+2): scx=Buhid:Buhd + 0x1735, 0x1736, 0x1740, 0x1753, + // #259 (16371+4): scx=Chakma:Cakm + 0x09E6, 0x09EF, 0x1040, 0x1049, 0x11100, 0x11134, 0x11136, 0x11147, + // #260 (16375+148): scx=Common:Zyyy + 0x0000, 0x0040, 0x005B, 0x0060, 0x007B, 0x00A9, 0x00AB, 0x00B9, + 0x00BB, 0x00BF, 0x00D7, 0x00D7, 0x00F7, 0x00F7, 0x02B9, 0x02DF, + 0x02E5, 0x02E9, 0x02EC, 0x02FF, 0x0374, 0x0374, 0x037E, 0x037E, + 0x0385, 0x0385, 0x0387, 0x0387, 0x0605, 0x0605, 0x06DD, 0x06DD, + 0x08E2, 0x08E2, 0x0E3F, 0x0E3F, 0x0FD5, 0x0FD8, 0x16EB, 0x16ED, + 0x2000, 0x200B, 0x200E, 0x202E, 0x2030, 0x2064, 0x2066, 0x2070, + 0x2074, 0x207E, 0x2080, 0x208E, 0x20A0, 0x20C0, 0x2100, 0x2125, + 0x2127, 0x2129, 0x212C, 0x2131, 0x2133, 0x214D, 0x214F, 0x215F, + 0x2189, 0x218B, 0x2190, 0x2426, 0x2440, 0x244A, 0x2460, 0x27FF, + 0x2900, 0x2B73, 0x2B76, 0x2B95, 0x2B97, 0x2BFF, 0x2E00, 0x2E42, + 0x2E44, 0x2E5D, 0x2FF0, 0x2FFB, 0x3000, 0x3000, 0x3004, 0x3004, + 0x3012, 0x3012, 0x3020, 0x3020, 0x3036, 0x3036, 0x3248, 0x325F, + 0x327F, 0x327F, 0x32B1, 0x32BF, 0x32CC, 0x32CF, 0x3371, 0x337A, + 0x3380, 0x33DF, 0x33FF, 0x33FF, 0x4DC0, 0x4DFF, 0xA708, 0xA721, + 0xA788, 0xA78A, 0xAB5B, 0xAB5B, 0xAB6A, 0xAB6B, 0xFE10, 0xFE19, + 0xFE30, 0xFE44, 0xFE47, 0xFE52, 0xFE54, 0xFE66, 0xFE68, 0xFE6B, + 0xFEFF, 0xFEFF, 0xFF01, 0xFF20, 0xFF3B, 0xFF40, 0xFF5B, 0xFF60, + 0xFFE0, 0xFFE6, 0xFFE8, 0xFFEE, 0xFFF9, 0xFFFD, 0x10190, 0x1019C, + 0x101D0, 0x101FC, 0x1CF50, 0x1CFC3, 0x1D000, 0x1D0F5, 0x1D100, 0x1D126, + 0x1D129, 0x1D166, 0x1D16A, 0x1D17A, 0x1D183, 0x1D184, 0x1D18C, 0x1D1A9, + 0x1D1AE, 0x1D1EA, 0x1D2E0, 0x1D2F3, 0x1D300, 0x1D356, 0x1D372, 0x1D378, + 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, + 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, + 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, + 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, + 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D7CB, + 0x1D7CE, 0x1D7FF, 0x1EC71, 0x1ECB4, 0x1ED01, 0x1ED3D, 0x1F000, 0x1F02B, + 0x1F030, 0x1F093, 0x1F0A0, 0x1F0AE, 0x1F0B1, 0x1F0BF, 0x1F0C1, 0x1F0CF, + 0x1F0D1, 0x1F0F5, 0x1F100, 0x1F1AD, 0x1F1E6, 0x1F1FF, 0x1F201, 0x1F202, + 0x1F210, 0x1F23B, 0x1F240, 0x1F248, 0x1F260, 0x1F265, 0x1F300, 0x1F6D7, + 0x1F6DD, 0x1F6EC, 0x1F6F0, 0x1F6FC, 0x1F700, 0x1F773, 0x1F780, 0x1F7D8, + 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, 0x1F800, 0x1F80B, 0x1F810, 0x1F847, + 0x1F850, 0x1F859, 0x1F860, 0x1F887, 0x1F890, 0x1F8AD, 0x1F8B0, 0x1F8B1, + 0x1F900, 0x1FA53, 0x1FA60, 0x1FA6D, 0x1FA70, 0x1FA74, 0x1FA78, 0x1FA7C, + 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, 0x1FAB0, 0x1FABA, 0x1FAC0, 0x1FAC5, + 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, 0x1FAF0, 0x1FAF6, 0x1FB00, 0x1FB92, + 0x1FB94, 0x1FBCA, 0x1FBF0, 0x1FBF9, 0xE0001, 0xE0001, 0xE0020, 0xE007F, + // #261 (16523+4): scx=Coptic:Copt:Qaac + 0x03E2, 0x03EF, 0x2C80, 0x2CF3, 0x2CF9, 0x2CFF, 0x102E0, 0x102FB, + // #262 (16527+2): scx=Cypro_Minoan:Cpmn + 0x10100, 0x10101, 0x12F90, 0x12FF2, + // #263 (16529+9): scx=Cypriot:Cprt + 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1013F, 0x10800, 0x10805, + 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, + 0x1083F, 0x1083F, + // #264 (16538+9): scx=Cyrillic:Cyrl + 0x0400, 0x052F, 0x1C80, 0x1C88, 0x1D2B, 0x1D2B, 0x1D78, 0x1D78, + 0x1DF8, 0x1DF8, 0x2DE0, 0x2DFF, 0x2E43, 0x2E43, 0xA640, 0xA69F, + 0xFE2E, 0xFE2F, + // #265 (16547+7): scx=Devanagari:Deva + 0x0900, 0x0952, 0x0955, 0x097F, 0x1CD0, 0x1CF6, 0x1CF8, 0x1CF9, + 0x20F0, 0x20F0, 0xA830, 0xA839, 0xA8E0, 0xA8FF, + // #266 (16554+3): scx=Dogra:Dogr + 0x0964, 0x096F, 0xA830, 0xA839, 0x11800, 0x1183B, + // #267 (16557+5): scx=Duployan:Dupl + 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, + 0x1BC9C, 0x1BCA3, + // #268 (16562+9): scx=Georgian:Geor + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FF, + 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x2D00, 0x2D25, 0x2D27, 0x2D27, + 0x2D2D, 0x2D2D, + // #269 (16571+10): scx=Glagolitic:Glag + 0x0484, 0x0484, 0x0487, 0x0487, 0x2C00, 0x2C5F, 0x2E43, 0x2E43, + 0xA66F, 0xA66F, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, + // #270 (16581+25): scx=Grantha:Gran + 0x0951, 0x0952, 0x0964, 0x0965, 0x0BE6, 0x0BF3, 0x1CD0, 0x1CD0, + 0x1CD2, 0x1CD3, 0x1CF2, 0x1CF4, 0x1CF8, 0x1CF9, 0x20F0, 0x20F0, + 0x11300, 0x11303, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, + 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133B, 0x11344, + 0x11347, 0x11348, 0x1134B, 0x1134D, 0x11350, 0x11350, 0x11357, 0x11357, + 0x1135D, 0x11363, 0x11366, 0x1136C, 0x11370, 0x11374, 0x11FD0, 0x11FD1, + 0x11FD3, 0x11FD3, + // #271 (16606+38): scx=Greek:Grek + 0x0342, 0x0342, 0x0345, 0x0345, 0x0370, 0x0373, 0x0375, 0x0377, + 0x037A, 0x037D, 0x037F, 0x037F, 0x0384, 0x0384, 0x0386, 0x0386, + 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, 0x03A3, 0x03E1, + 0x03F0, 0x03FF, 0x1D26, 0x1D2A, 0x1D5D, 0x1D61, 0x1D66, 0x1D6A, + 0x1DBF, 0x1DC1, 0x1F00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, + 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, + 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FC4, + 0x1FC6, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FDD, 0x1FEF, 0x1FF2, 0x1FF4, + 0x1FF6, 0x1FFE, 0x2126, 0x2126, 0xAB65, 0xAB65, 0x10140, 0x1018E, + 0x101A0, 0x101A0, 0x1D200, 0x1D245, + // #272 (16644+17): scx=Gujarati:Gujr + 0x0951, 0x0952, 0x0964, 0x0965, 0x0A81, 0x0A83, 0x0A85, 0x0A8D, + 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, + 0x0AB5, 0x0AB9, 0x0ABC, 0x0AC5, 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, + 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, 0x0AE6, 0x0AF1, 0x0AF9, 0x0AFF, + 0xA830, 0xA839, + // #273 (16661+7): scx=Gunjala_Gondi:Gong + 0x0964, 0x0965, 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, + 0x11D90, 0x11D91, 0x11D93, 0x11D98, 0x11DA0, 0x11DA9, + // #274 (16668+19): scx=Gurmukhi:Guru + 0x0951, 0x0952, 0x0964, 0x0965, 0x0A01, 0x0A03, 0x0A05, 0x0A0A, + 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, + 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A3C, 0x0A3C, 0x0A3E, 0x0A42, + 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A51, 0x0A51, 0x0A59, 0x0A5C, + 0x0A5E, 0x0A5E, 0x0A66, 0x0A76, 0xA830, 0xA839, + // #275 (16687+37): scx=Han:Hani + 0x2E80, 0x2E99, 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, 0x3001, 0x3003, + 0x3005, 0x3011, 0x3013, 0x301F, 0x3021, 0x302D, 0x3030, 0x3030, + 0x3037, 0x303F, 0x30FB, 0x30FB, 0x3190, 0x319F, 0x31C0, 0x31E3, + 0x3220, 0x3247, 0x3280, 0x32B0, 0x32C0, 0x32CB, 0x32FF, 0x32FF, + 0x3358, 0x3370, 0x337B, 0x337F, 0x33E0, 0x33FE, 0x3400, 0x4DBF, + 0x4E00, 0x9FFF, 0xA700, 0xA707, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, + 0xFE45, 0xFE46, 0xFF61, 0xFF65, 0x16FE2, 0x16FE3, 0x16FF0, 0x16FF1, + 0x1D360, 0x1D371, 0x1F250, 0x1F251, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, + 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, + 0x30000, 0x3134A, + // #276 (16724+21): scx=Hangul:Hang + 0x1100, 0x11FF, 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, + 0x302E, 0x3030, 0x3037, 0x3037, 0x30FB, 0x30FB, 0x3131, 0x318E, + 0x3200, 0x321E, 0x3260, 0x327E, 0xA960, 0xA97C, 0xAC00, 0xD7A3, + 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xFE45, 0xFE46, 0xFF61, 0xFF65, + 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, + 0xFFDA, 0xFFDC, + // #277 (16745+7): scx=Hanifi_Rohingya:Rohg + 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x0640, 0x0640, + 0x06D4, 0x06D4, 0x10D00, 0x10D27, 0x10D30, 0x10D39, + // #278 (16752+1): scx=Hanunoo:Hano + 0x1720, 0x1736, + // #279 (16753+16): scx=Hiragana:Hira + 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x3030, 0x3035, + 0x3037, 0x3037, 0x303C, 0x303D, 0x3041, 0x3096, 0x3099, 0x30A0, + 0x30FB, 0x30FC, 0xFE45, 0xFE46, 0xFF61, 0xFF65, 0xFF70, 0xFF70, + 0xFF9E, 0xFF9F, 0x1B001, 0x1B11F, 0x1B150, 0x1B152, 0x1F200, 0x1F200, + // #280 (16769+20): scx=Inherited:Zinh:Qaai + 0x0300, 0x0341, 0x0343, 0x0344, 0x0346, 0x0362, 0x0953, 0x0954, + 0x1AB0, 0x1ACE, 0x1DC2, 0x1DF7, 0x1DF9, 0x1DF9, 0x1DFB, 0x1DFF, + 0x200C, 0x200D, 0x20D0, 0x20EF, 0xFE00, 0xFE0F, 0xFE20, 0xFE2D, + 0x101FD, 0x101FD, 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1D167, 0x1D169, + 0x1D17B, 0x1D182, 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0xE0100, 0xE01EF, + // #281 (16789+3): scx=Javanese:Java + 0xA980, 0xA9CD, 0xA9CF, 0xA9D9, 0xA9DE, 0xA9DF, + // #282 (16792+4): scx=Kaithi:Kthi + 0x0966, 0x096F, 0xA830, 0xA839, 0x11080, 0x110C2, 0x110CD, 0x110CD, + // #283 (16796+21): scx=Kannada:Knda + 0x0951, 0x0952, 0x0964, 0x0965, 0x0C80, 0x0C8C, 0x0C8E, 0x0C90, + 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBC, 0x0CC4, + 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0CDD, 0x0CDE, + 0x0CE0, 0x0CE3, 0x0CE6, 0x0CEF, 0x0CF1, 0x0CF2, 0x1CD0, 0x1CD0, + 0x1CD2, 0x1CD2, 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, 0x1CF4, 0x1CF4, + 0xA830, 0xA835, + // #284 (16817+19): scx=Katakana:Kana + 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x3030, 0x3035, + 0x3037, 0x3037, 0x303C, 0x303D, 0x3099, 0x309C, 0x30A0, 0x30FF, + 0x31F0, 0x31FF, 0x32D0, 0x32FE, 0x3300, 0x3357, 0xFE45, 0xFE46, + 0xFF61, 0xFF9F, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, + 0x1B000, 0x1B000, 0x1B120, 0x1B122, 0x1B164, 0x1B167, + // #285 (16836+1): scx=Kayah_Li:Kali + 0xA900, 0xA92F, + // #286 (16837+4): scx=Khojki:Khoj + 0x0AE6, 0x0AEF, 0xA830, 0xA839, 0x11200, 0x11211, 0x11213, 0x1123E, + // #287 (16841+4): scx=Khudawadi:Sind + 0x0964, 0x0965, 0xA830, 0xA839, 0x112B0, 0x112EA, 0x112F0, 0x112F9, + // #288 (16845+46): scx=Latin:Latn + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00BA, 0x00BA, + 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02B8, 0x02E0, 0x02E4, + 0x0363, 0x036F, 0x0485, 0x0486, 0x0951, 0x0952, 0x10FB, 0x10FB, + 0x1D00, 0x1D25, 0x1D2C, 0x1D5C, 0x1D62, 0x1D65, 0x1D6B, 0x1D77, + 0x1D79, 0x1DBE, 0x1E00, 0x1EFF, 0x202F, 0x202F, 0x2071, 0x2071, + 0x207F, 0x207F, 0x2090, 0x209C, 0x20F0, 0x20F0, 0x212A, 0x212B, + 0x2132, 0x2132, 0x214E, 0x214E, 0x2160, 0x2188, 0x2C60, 0x2C7F, + 0xA700, 0xA707, 0xA722, 0xA787, 0xA78B, 0xA7CA, 0xA7D0, 0xA7D1, + 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, 0xA7F2, 0xA7FF, 0xA92E, 0xA92E, + 0xAB30, 0xAB5A, 0xAB5C, 0xAB64, 0xAB66, 0xAB69, 0xFB00, 0xFB06, + 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0x10780, 0x10785, 0x10787, 0x107B0, + 0x107B2, 0x107BA, 0x1DF00, 0x1DF1E, + // #289 (16891+6): scx=Limbu:Limb + 0x0965, 0x0965, 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x193B, + 0x1940, 0x1940, 0x1944, 0x194F, + // #290 (16897+4): scx=Linear_A:Lina + 0x10107, 0x10133, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + // #291 (16901+10): scx=Linear_B:Linb + 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, + 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, 0x10100, 0x10102, + 0x10107, 0x10133, 0x10137, 0x1013F, + // #292 (16911+3): scx=Mahajani:Mahj + 0x0964, 0x096F, 0xA830, 0xA839, 0x11150, 0x11176, + // #293 (16914+11): scx=Malayalam:Mlym + 0x0951, 0x0952, 0x0964, 0x0965, 0x0D00, 0x0D0C, 0x0D0E, 0x0D10, + 0x0D12, 0x0D44, 0x0D46, 0x0D48, 0x0D4A, 0x0D4F, 0x0D54, 0x0D63, + 0x0D66, 0x0D7F, 0x1CDA, 0x1CDA, 0xA830, 0xA832, + // #294 (16925+3): scx=Mandaic:Mand + 0x0640, 0x0640, 0x0840, 0x085B, 0x085E, 0x085E, + // #295 (16928+3): scx=Manichaean:Mani + 0x0640, 0x0640, 0x10AC0, 0x10AE6, 0x10AEB, 0x10AF6, + // #296 (16931+8): scx=Masaram_Gondi:Gonm + 0x0964, 0x0965, 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D36, + 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D47, 0x11D50, 0x11D59, + // #297 (16939+3): scx=Modi:Modi + 0xA830, 0xA839, 0x11600, 0x11644, 0x11650, 0x11659, + // #298 (16942+5): scx=Mongolian:Mong + 0x1800, 0x1819, 0x1820, 0x1878, 0x1880, 0x18AA, 0x202F, 0x202F, + 0x11660, 0x1166C, + // #299 (16947+6): scx=Multani:Mult + 0x0A66, 0x0A6F, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, + 0x1128F, 0x1129D, 0x1129F, 0x112A9, + // #300 (16953+4): scx=Myanmar:Mymr + 0x1000, 0x109F, 0xA92E, 0xA92E, 0xA9E0, 0xA9FE, 0xAA60, 0xAA7F, + // #301 (16957+9): scx=Nandinagari:Nand + 0x0964, 0x0965, 0x0CE6, 0x0CEF, 0x1CE9, 0x1CE9, 0x1CF2, 0x1CF2, + 0x1CFA, 0x1CFA, 0xA830, 0xA835, 0x119A0, 0x119A7, 0x119AA, 0x119D7, + 0x119DA, 0x119E4, + // #302 (16966+6): scx=Nko:Nkoo + 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x07C0, 0x07FA, + 0x07FD, 0x07FF, 0xFD3E, 0xFD3F, + // #303 (16972+2): scx=Old_Permic:Perm + 0x0483, 0x0483, 0x10350, 0x1037A, + // #304 (16974+3): scx=Old_Uyghur:Ougr + 0x0640, 0x0640, 0x10AF2, 0x10AF2, 0x10F70, 0x10F89, + // #305 (16977+18): scx=Oriya:Orya + 0x0951, 0x0952, 0x0964, 0x0965, 0x0B01, 0x0B03, 0x0B05, 0x0B0C, + 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, + 0x0B35, 0x0B39, 0x0B3C, 0x0B44, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, + 0x0B55, 0x0B57, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B63, 0x0B66, 0x0B77, + 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, + // #306 (16995+3): scx=Phags_Pa:Phag + 0x1802, 0x1803, 0x1805, 0x1805, 0xA840, 0xA877, + // #307 (16998+4): scx=Psalter_Pahlavi:Phlp + 0x0640, 0x0640, 0x10B80, 0x10B91, 0x10B99, 0x10B9C, 0x10BA9, 0x10BAF, + // #308 (17002+6): scx=Sharada:Shrd + 0x0951, 0x0951, 0x1CD7, 0x1CD7, 0x1CD9, 0x1CD9, 0x1CDC, 0x1CDD, + 0x1CE0, 0x1CE0, 0x11180, 0x111DF, + // #309 (17008+14): scx=Sinhala:Sinh + 0x0964, 0x0965, 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, + 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCA, 0x0DCA, + 0x0DCF, 0x0DD4, 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DE6, 0x0DEF, + 0x0DF2, 0x0DF4, 0x111E1, 0x111F4, + // #310 (17022+2): scx=Sogdian:Sogd + 0x0640, 0x0640, 0x10F30, 0x10F59, + // #311 (17024+3): scx=Syloti_Nagri:Sylo + 0x0964, 0x0965, 0x09E6, 0x09EF, 0xA800, 0xA82C, + // #312 (17027+12): scx=Syriac:Syrc + 0x060C, 0x060C, 0x061B, 0x061C, 0x061F, 0x061F, 0x0640, 0x0640, + 0x064B, 0x0655, 0x0670, 0x0670, 0x0700, 0x070D, 0x070F, 0x074A, + 0x074D, 0x074F, 0x0860, 0x086A, 0x1DF8, 0x1DF8, 0x1DFA, 0x1DFA, + // #313 (17039+3): scx=Tagalog:Tglg + 0x1700, 0x1715, 0x171F, 0x171F, 0x1735, 0x1736, + // #314 (17042+4): scx=Tagbanwa:Tagb + 0x1735, 0x1736, 0x1760, 0x176C, 0x176E, 0x1770, 0x1772, 0x1773, + // #315 (17046+3): scx=Tai_Le:Tale + 0x1040, 0x1049, 0x1950, 0x196D, 0x1970, 0x1974, + // #316 (17049+4): scx=Takri:Takr + 0x0964, 0x0965, 0xA830, 0xA839, 0x11680, 0x116B9, 0x116C0, 0x116C9, + // #317 (17053+25): scx=Tamil:Taml + 0x0951, 0x0952, 0x0964, 0x0965, 0x0B82, 0x0B83, 0x0B85, 0x0B8A, + 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, + 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, + 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0BD0, 0x0BD0, + 0x0BD7, 0x0BD7, 0x0BE6, 0x0BFA, 0x1CDA, 0x1CDA, 0xA8F3, 0xA8F3, + 0x11301, 0x11301, 0x11303, 0x11303, 0x1133B, 0x1133C, 0x11FC0, 0x11FF1, + 0x11FFF, 0x11FFF, + // #318 (17078+17): scx=Telugu:Telu + 0x0951, 0x0952, 0x0964, 0x0965, 0x0C00, 0x0C0C, 0x0C0E, 0x0C10, + 0x0C12, 0x0C28, 0x0C2A, 0x0C39, 0x0C3C, 0x0C44, 0x0C46, 0x0C48, + 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, + 0x0C60, 0x0C63, 0x0C66, 0x0C6F, 0x0C77, 0x0C7F, 0x1CDA, 0x1CDA, + 0x1CF2, 0x1CF2, + // #319 (17095+7): scx=Thaana:Thaa + 0x060C, 0x060C, 0x061B, 0x061C, 0x061F, 0x061F, 0x0660, 0x0669, + 0x0780, 0x07B1, 0xFDF2, 0xFDF2, 0xFDFD, 0xFDFD, + // #320 (17102+6): scx=Tirhuta:Tirh + 0x0951, 0x0952, 0x0964, 0x0965, 0x1CF2, 0x1CF2, 0xA830, 0xA839, + 0x11480, 0x114C7, 0x114D0, 0x114D9, + // #321 (17108+7): scx=Yezidi:Yezi + 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x0660, 0x0669, + 0x10E80, 0x10EA9, 0x10EAB, 0x10EAD, 0x10EB0, 0x10EB1, + // #322 (17115+7): scx=Yi:Yiii + 0x3001, 0x3002, 0x3008, 0x3011, 0x3014, 0x301B, 0x30FB, 0x30FB, + 0xA000, 0xA48C, 0xA490, 0xA4C6, 0xFF61, 0xFF65 +}; + +template +const T5 unicode_property_data::rangenumbertable[] = +{ + { ptype::unknown, "*", 0 }, // #0 + { ptype::general_category, "Other:C", 1 }, // #1 + { ptype::general_category, "Control:Cc:cntrl", 2 }, // #2 + { ptype::general_category, "Format:Cf", 3 }, // #3 + { ptype::general_category, "Unassigned:Cn", 4 }, // #4 + { ptype::general_category, "Private_Use:Co", 5 }, // #5 + { ptype::general_category, "Surrogate:Cs", 6 }, // #6 + { ptype::general_category, "Letter:L", 7 }, // #7 + { ptype::general_category, "Cased_Letter:LC", 8 }, // #8 + { ptype::general_category, "Lowercase_Letter:Ll", 9 }, // #9 + { ptype::general_category, "Titlecase_Letter:Lt", 10 }, // #10 + { ptype::general_category, "Uppercase_Letter:Lu", 11 }, // #11 + { ptype::general_category, "Modifier_Letter:Lm", 12 }, // #12 + { ptype::general_category, "Other_Letter:Lo", 13 }, // #13 + { ptype::general_category, "Mark:M:Combining_Mark", 14 }, // #14 + { ptype::general_category, "Spacing_Mark:Mc", 15 }, // #15 + { ptype::general_category, "Enclosing_Mark:Me", 16 }, // #16 + { ptype::general_category, "Nonspacing_Mark:Mn", 17 }, // #17 + { ptype::general_category, "Number:N", 18 }, // #18 + { ptype::general_category, "Decimal_Number:Nd:digit", 19 }, // #19 + { ptype::general_category, "Letter_Number:Nl", 20 }, // #20 + { ptype::general_category, "Other_Number:No", 21 }, // #21 + { ptype::general_category, "Punctuation:P:punct", 22 }, // #22 + { ptype::general_category, "Connector_Punctuation:Pc", 23 }, // #23 + { ptype::general_category, "Dash_Punctuation:Pd", 24 }, // #24 + { ptype::general_category, "Close_Punctuation:Pe", 25 }, // #25 + { ptype::general_category, "Final_Punctuation:Pf", 26 }, // #26 + { ptype::general_category, "Initial_Punctuation:Pi", 27 }, // #27 + { ptype::general_category, "Other_Punctuation:Po", 28 }, // #28 + { ptype::general_category, "Open_Punctuation:Ps", 29 }, // #29 + { ptype::general_category, "Symbol:S", 30 }, // #30 + { ptype::general_category, "Currency_Symbol:Sc", 31 }, // #31 + { ptype::general_category, "Modifier_Symbol:Sk", 32 }, // #32 + { ptype::general_category, "Math_Symbol:Sm", 33 }, // #33 + { ptype::general_category, "Other_Symbol:So", 34 }, // #34 + { ptype::general_category, "Separator:Z", 35 }, // #35 + { ptype::general_category, "Line_Separator:Zl", 36 }, // #36 + { ptype::general_category, "Paragraph_Separator:Zp", 37 }, // #37 + { ptype::general_category, "Space_Separator:Zs", 38 }, // #38 + { ptype::binary, "ASCII", 39 }, // #39 + { ptype::binary, "ASCII_Hex_Digit:AHex", 40 }, // #40 + { ptype::binary, "Alphabetic:Alpha", 41 }, // #41 + { ptype::binary, "Any", 42 }, // #42 + { ptype::binary, "Assigned", 43 }, // #43 + { ptype::binary, "Bidi_Control:Bidi_C", 44 }, // #44 + { ptype::binary, "Bidi_Mirrored:Bidi_M", 45 }, // #45 + { ptype::binary, "Case_Ignorable:CI", 46 }, // #46 + { ptype::binary, "Cased", 47 }, // #47 + { ptype::binary, "Changes_When_Casefolded:CWCF", 48 }, // #48 + { ptype::binary, "Changes_When_Casemapped:CWCM", 49 }, // #49 + { ptype::binary, "Changes_When_Lowercased:CWL", 50 }, // #50 + { ptype::binary, "Changes_When_NFKC_Casefolded:CWKCF", 51 }, // #51 + { ptype::binary, "Changes_When_Titlecased:CWT", 52 }, // #52 + { ptype::binary, "Changes_When_Uppercased:CWU", 53 }, // #53 + { ptype::binary, "Dash", 54 }, // #54 + { ptype::binary, "Default_Ignorable_Code_Point:DI", 55 }, // #55 + { ptype::binary, "Deprecated:Dep", 56 }, // #56 + { ptype::binary, "Diacritic:Dia", 57 }, // #57 + { ptype::binary, "Emoji", 58 }, // #58 + { ptype::binary, "Emoji_Component:EComp", 59 }, // #59 + { ptype::binary, "Emoji_Modifier:EMod", 60 }, // #60 + { ptype::binary, "Emoji_Modifier_Base:EBase", 61 }, // #61 + { ptype::binary, "Emoji_Presentation:EPres", 62 }, // #62 + { ptype::binary, "Extended_Pictographic:ExtPict", 63 }, // #63 + { ptype::binary, "Extender:Ext", 64 }, // #64 + { ptype::binary, "Grapheme_Base:Gr_Base", 65 }, // #65 + { ptype::binary, "Grapheme_Extend:Gr_Ext", 66 }, // #66 + { ptype::binary, "Hex_Digit:Hex", 67 }, // #67 + { ptype::binary, "IDS_Binary_Operator:IDSB", 68 }, // #68 + { ptype::binary, "IDS_Trinary_Operator:IDST", 69 }, // #69 + { ptype::binary, "ID_Continue:IDC", 70 }, // #70 + { ptype::binary, "ID_Start:IDS", 71 }, // #71 + { ptype::binary, "Ideographic:Ideo", 72 }, // #72 + { ptype::binary, "Join_Control:Join_C", 73 }, // #73 + { ptype::binary, "Logical_Order_Exception:LOE", 74 }, // #74 + { ptype::binary, "Lowercase:Lower", 75 }, // #75 + { ptype::binary, "Math", 76 }, // #76 + { ptype::binary, "Noncharacter_Code_Point:NChar", 77 }, // #77 + { ptype::binary, "Pattern_Syntax:Pat_Syn", 78 }, // #78 + { ptype::binary, "Pattern_White_Space:Pat_WS", 79 }, // #79 + { ptype::binary, "Quotation_Mark:QMark", 80 }, // #80 + { ptype::binary, "Radical", 81 }, // #81 + { ptype::binary, "Regional_Indicator:RI", 82 }, // #82 + { ptype::binary, "Sentence_Terminal:STerm", 83 }, // #83 + { ptype::binary, "Soft_Dotted:SD", 84 }, // #84 + { ptype::binary, "Terminal_Punctuation:Term", 85 }, // #85 + { ptype::binary, "Unified_Ideograph:UIdeo", 86 }, // #86 + { ptype::binary, "Uppercase:Upper", 87 }, // #87 + { ptype::binary, "Variation_Selector:VS", 88 }, // #88 + { ptype::binary, "White_Space:space", 89 }, // #89 + { ptype::binary, "XID_Continue:XIDC", 90 }, // #90 + { ptype::binary, "XID_Start:XIDS", 91 }, // #91 + { ptype::script, "Adlam:Adlm", 92 }, // #92 + { ptype::script, "Ahom:Ahom", 93 }, // #93 + { ptype::script, "Anatolian_Hieroglyphs:Hluw", 94 }, // #94 + { ptype::script, "Arabic:Arab", 95 }, // #95 + { ptype::script, "Armenian:Armn", 96 }, // #96 + { ptype::script, "Avestan:Avst", 97 }, // #97 + { ptype::script, "Balinese:Bali", 98 }, // #98 + { ptype::script, "Bamum:Bamu", 99 }, // #99 + { ptype::script, "Bassa_Vah:Bass", 100 }, // #100 + { ptype::script, "Batak:Batk", 101 }, // #101 + { ptype::script, "Bengali:Beng", 102 }, // #102 + { ptype::script, "Bhaiksuki:Bhks", 103 }, // #103 + { ptype::script, "Bopomofo:Bopo", 104 }, // #104 + { ptype::script, "Brahmi:Brah", 105 }, // #105 + { ptype::script, "Braille:Brai", 106 }, // #106 + { ptype::script, "Buginese:Bugi", 107 }, // #107 + { ptype::script, "Buhid:Buhd", 108 }, // #108 + { ptype::script, "Canadian_Aboriginal:Cans", 109 }, // #109 + { ptype::script, "Carian:Cari", 110 }, // #110 + { ptype::script, "Caucasian_Albanian:Aghb", 111 }, // #111 + { ptype::script, "Chakma:Cakm", 112 }, // #112 + { ptype::script, "Cham:Cham", 113 }, // #113 + { ptype::script, "Cherokee:Cher", 114 }, // #114 + { ptype::script, "Chorasmian:Chrs", 115 }, // #115 + { ptype::script, "Common:Zyyy", 116 }, // #116 + { ptype::script, "Coptic:Copt:Qaac", 117 }, // #117 + { ptype::script, "Cypro_Minoan:Cpmn", 118 }, // #118 + { ptype::script, "Cuneiform:Xsux", 119 }, // #119 + { ptype::script, "Cypriot:Cprt", 120 }, // #120 + { ptype::script, "Cyrillic:Cyrl", 121 }, // #121 + { ptype::script, "Deseret:Dsrt", 122 }, // #122 + { ptype::script, "Devanagari:Deva", 123 }, // #123 + { ptype::script, "Dives_Akuru:Diak", 124 }, // #124 + { ptype::script, "Dogra:Dogr", 125 }, // #125 + { ptype::script, "Duployan:Dupl", 126 }, // #126 + { ptype::script, "Egyptian_Hieroglyphs:Egyp", 127 }, // #127 + { ptype::script, "Elbasan:Elba", 128 }, // #128 + { ptype::script, "Elymaic:Elym", 129 }, // #129 + { ptype::script, "Ethiopic:Ethi", 130 }, // #130 + { ptype::script, "Georgian:Geor", 131 }, // #131 + { ptype::script, "Glagolitic:Glag", 132 }, // #132 + { ptype::script, "Gothic:Goth", 133 }, // #133 + { ptype::script, "Grantha:Gran", 134 }, // #134 + { ptype::script, "Greek:Grek", 135 }, // #135 + { ptype::script, "Gujarati:Gujr", 136 }, // #136 + { ptype::script, "Gunjala_Gondi:Gong", 137 }, // #137 + { ptype::script, "Gurmukhi:Guru", 138 }, // #138 + { ptype::script, "Han:Hani", 139 }, // #139 + { ptype::script, "Hangul:Hang", 140 }, // #140 + { ptype::script, "Hanifi_Rohingya:Rohg", 141 }, // #141 + { ptype::script, "Hanunoo:Hano", 142 }, // #142 + { ptype::script, "Hatran:Hatr", 143 }, // #143 + { ptype::script, "Hebrew:Hebr", 144 }, // #144 + { ptype::script, "Hiragana:Hira", 145 }, // #145 + { ptype::script, "Imperial_Aramaic:Armi", 146 }, // #146 + { ptype::script, "Inherited:Zinh:Qaai", 147 }, // #147 + { ptype::script, "Inscriptional_Pahlavi:Phli", 148 }, // #148 + { ptype::script, "Inscriptional_Parthian:Prti", 149 }, // #149 + { ptype::script, "Javanese:Java", 150 }, // #150 + { ptype::script, "Kaithi:Kthi", 151 }, // #151 + { ptype::script, "Kannada:Knda", 152 }, // #152 + { ptype::script, "Katakana:Kana", 153 }, // #153 + { ptype::script, "Kayah_Li:Kali", 154 }, // #154 + { ptype::script, "Kharoshthi:Khar", 155 }, // #155 + { ptype::script, "Khitan_Small_Script:Kits", 156 }, // #156 + { ptype::script, "Khmer:Khmr", 157 }, // #157 + { ptype::script, "Khojki:Khoj", 158 }, // #158 + { ptype::script, "Khudawadi:Sind", 159 }, // #159 + { ptype::script, "Lao:Laoo", 160 }, // #160 + { ptype::script, "Latin:Latn", 161 }, // #161 + { ptype::script, "Lepcha:Lepc", 162 }, // #162 + { ptype::script, "Limbu:Limb", 163 }, // #163 + { ptype::script, "Linear_A:Lina", 164 }, // #164 + { ptype::script, "Linear_B:Linb", 165 }, // #165 + { ptype::script, "Lisu:Lisu", 166 }, // #166 + { ptype::script, "Lycian:Lyci", 167 }, // #167 + { ptype::script, "Lydian:Lydi", 168 }, // #168 + { ptype::script, "Mahajani:Mahj", 169 }, // #169 + { ptype::script, "Makasar:Maka", 170 }, // #170 + { ptype::script, "Malayalam:Mlym", 171 }, // #171 + { ptype::script, "Mandaic:Mand", 172 }, // #172 + { ptype::script, "Manichaean:Mani", 173 }, // #173 + { ptype::script, "Marchen:Marc", 174 }, // #174 + { ptype::script, "Masaram_Gondi:Gonm", 175 }, // #175 + { ptype::script, "Medefaidrin:Medf", 176 }, // #176 + { ptype::script, "Meetei_Mayek:Mtei", 177 }, // #177 + { ptype::script, "Mende_Kikakui:Mend", 178 }, // #178 + { ptype::script, "Meroitic_Cursive:Merc", 179 }, // #179 + { ptype::script, "Meroitic_Hieroglyphs:Mero", 180 }, // #180 + { ptype::script, "Miao:Plrd", 181 }, // #181 + { ptype::script, "Modi:Modi", 182 }, // #182 + { ptype::script, "Mongolian:Mong", 183 }, // #183 + { ptype::script, "Mro:Mroo", 184 }, // #184 + { ptype::script, "Multani:Mult", 185 }, // #185 + { ptype::script, "Myanmar:Mymr", 186 }, // #186 + { ptype::script, "Nabataean:Nbat", 187 }, // #187 + { ptype::script, "Nandinagari:Nand", 188 }, // #188 + { ptype::script, "New_Tai_Lue:Talu", 189 }, // #189 + { ptype::script, "Newa:Newa", 190 }, // #190 + { ptype::script, "Nko:Nkoo", 191 }, // #191 + { ptype::script, "Nushu:Nshu", 192 }, // #192 + { ptype::script, "Nyiakeng_Puachue_Hmong:Hmnp", 193 }, // #193 + { ptype::script, "Ogham:Ogam", 194 }, // #194 + { ptype::script, "Ol_Chiki:Olck", 195 }, // #195 + { ptype::script, "Old_Hungarian:Hung", 196 }, // #196 + { ptype::script, "Old_Italic:Ital", 197 }, // #197 + { ptype::script, "Old_North_Arabian:Narb", 198 }, // #198 + { ptype::script, "Old_Permic:Perm", 199 }, // #199 + { ptype::script, "Old_Persian:Xpeo", 200 }, // #200 + { ptype::script, "Old_Sogdian:Sogo", 201 }, // #201 + { ptype::script, "Old_South_Arabian:Sarb", 202 }, // #202 + { ptype::script, "Old_Turkic:Orkh", 203 }, // #203 + { ptype::script, "Old_Uyghur:Ougr", 204 }, // #204 + { ptype::script, "Oriya:Orya", 205 }, // #205 + { ptype::script, "Osage:Osge", 206 }, // #206 + { ptype::script, "Osmanya:Osma", 207 }, // #207 + { ptype::script, "Pahawh_Hmong:Hmng", 208 }, // #208 + { ptype::script, "Palmyrene:Palm", 209 }, // #209 + { ptype::script, "Pau_Cin_Hau:Pauc", 210 }, // #210 + { ptype::script, "Phags_Pa:Phag", 211 }, // #211 + { ptype::script, "Phoenician:Phnx", 212 }, // #212 + { ptype::script, "Psalter_Pahlavi:Phlp", 213 }, // #213 + { ptype::script, "Rejang:Rjng", 214 }, // #214 + { ptype::script, "Runic:Runr", 215 }, // #215 + { ptype::script, "Samaritan:Samr", 216 }, // #216 + { ptype::script, "Saurashtra:Saur", 217 }, // #217 + { ptype::script, "Sharada:Shrd", 218 }, // #218 + { ptype::script, "Shavian:Shaw", 219 }, // #219 + { ptype::script, "Siddham:Sidd", 220 }, // #220 + { ptype::script, "SignWriting:Sgnw", 221 }, // #221 + { ptype::script, "Sinhala:Sinh", 222 }, // #222 + { ptype::script, "Sogdian:Sogd", 223 }, // #223 + { ptype::script, "Sora_Sompeng:Sora", 224 }, // #224 + { ptype::script, "Soyombo:Soyo", 225 }, // #225 + { ptype::script, "Sundanese:Sund", 226 }, // #226 + { ptype::script, "Syloti_Nagri:Sylo", 227 }, // #227 + { ptype::script, "Syriac:Syrc", 228 }, // #228 + { ptype::script, "Tagalog:Tglg", 229 }, // #229 + { ptype::script, "Tagbanwa:Tagb", 230 }, // #230 + { ptype::script, "Tai_Le:Tale", 231 }, // #231 + { ptype::script, "Tai_Tham:Lana", 232 }, // #232 + { ptype::script, "Tai_Viet:Tavt", 233 }, // #233 + { ptype::script, "Takri:Takr", 234 }, // #234 + { ptype::script, "Tamil:Taml", 235 }, // #235 + { ptype::script, "Tangsa:Tnsa", 236 }, // #236 + { ptype::script, "Tangut:Tang", 237 }, // #237 + { ptype::script, "Telugu:Telu", 238 }, // #238 + { ptype::script, "Thaana:Thaa", 239 }, // #239 + { ptype::script, "Thai:Thai", 240 }, // #240 + { ptype::script, "Tibetan:Tibt", 241 }, // #241 + { ptype::script, "Tifinagh:Tfng", 242 }, // #242 + { ptype::script, "Tirhuta:Tirh", 243 }, // #243 + { ptype::script, "Toto", 244 }, // #244 + { ptype::script, "Ugaritic:Ugar", 245 }, // #245 + { ptype::script, "Vai:Vaii", 246 }, // #246 + { ptype::script, "Vithkuqi:Vith", 247 }, // #247 + { ptype::script, "Wancho:Wcho", 248 }, // #248 + { ptype::script, "Warang_Citi:Wara", 249 }, // #249 + { ptype::script, "Yezidi:Yezi", 250 }, // #250 + { ptype::script, "Yi:Yiii", 251 }, // #251 + { ptype::script, "Zanabazar_Square:Zanb", 252 }, // #252 + { ptype::script_extensions, "Adlam:Adlm", 253 }, // #253 + { ptype::script_extensions, "Ahom:Ahom", 93 }, // #254 + { ptype::script_extensions, "Anatolian_Hieroglyphs:Hluw", 94 }, // #255 + { ptype::script_extensions, "Arabic:Arab", 254 }, // #256 + { ptype::script_extensions, "Armenian:Armn", 96 }, // #257 + { ptype::script_extensions, "Avestan:Avst", 97 }, // #258 + { ptype::script_extensions, "Balinese:Bali", 98 }, // #259 + { ptype::script_extensions, "Bamum:Bamu", 99 }, // #260 + { ptype::script_extensions, "Bassa_Vah:Bass", 100 }, // #261 + { ptype::script_extensions, "Batak:Batk", 101 }, // #262 + { ptype::script_extensions, "Bengali:Beng", 255 }, // #263 + { ptype::script_extensions, "Bhaiksuki:Bhks", 103 }, // #264 + { ptype::script_extensions, "Bopomofo:Bopo", 256 }, // #265 + { ptype::script_extensions, "Brahmi:Brah", 105 }, // #266 + { ptype::script_extensions, "Braille:Brai", 106 }, // #267 + { ptype::script_extensions, "Buginese:Bugi", 257 }, // #268 + { ptype::script_extensions, "Buhid:Buhd", 258 }, // #269 + { ptype::script_extensions, "Canadian_Aboriginal:Cans", 109 }, // #270 + { ptype::script_extensions, "Carian:Cari", 110 }, // #271 + { ptype::script_extensions, "Caucasian_Albanian:Aghb", 111 }, // #272 + { ptype::script_extensions, "Chakma:Cakm", 259 }, // #273 + { ptype::script_extensions, "Cham:Cham", 113 }, // #274 + { ptype::script_extensions, "Cherokee:Cher", 114 }, // #275 + { ptype::script_extensions, "Chorasmian:Chrs", 115 }, // #276 + { ptype::script_extensions, "Common:Zyyy", 260 }, // #277 + { ptype::script_extensions, "Coptic:Copt:Qaac", 261 }, // #278 + { ptype::script_extensions, "Cypro_Minoan:Cpmn", 262 }, // #279 + { ptype::script_extensions, "Cuneiform:Xsux", 119 }, // #280 + { ptype::script_extensions, "Cypriot:Cprt", 263 }, // #281 + { ptype::script_extensions, "Cyrillic:Cyrl", 264 }, // #282 + { ptype::script_extensions, "Deseret:Dsrt", 122 }, // #283 + { ptype::script_extensions, "Devanagari:Deva", 265 }, // #284 + { ptype::script_extensions, "Dives_Akuru:Diak", 124 }, // #285 + { ptype::script_extensions, "Dogra:Dogr", 266 }, // #286 + { ptype::script_extensions, "Duployan:Dupl", 267 }, // #287 + { ptype::script_extensions, "Egyptian_Hieroglyphs:Egyp", 127 }, // #288 + { ptype::script_extensions, "Elbasan:Elba", 128 }, // #289 + { ptype::script_extensions, "Elymaic:Elym", 129 }, // #290 + { ptype::script_extensions, "Ethiopic:Ethi", 130 }, // #291 + { ptype::script_extensions, "Georgian:Geor", 268 }, // #292 + { ptype::script_extensions, "Glagolitic:Glag", 269 }, // #293 + { ptype::script_extensions, "Gothic:Goth", 133 }, // #294 + { ptype::script_extensions, "Grantha:Gran", 270 }, // #295 + { ptype::script_extensions, "Greek:Grek", 271 }, // #296 + { ptype::script_extensions, "Gujarati:Gujr", 272 }, // #297 + { ptype::script_extensions, "Gunjala_Gondi:Gong", 273 }, // #298 + { ptype::script_extensions, "Gurmukhi:Guru", 274 }, // #299 + { ptype::script_extensions, "Han:Hani", 275 }, // #300 + { ptype::script_extensions, "Hangul:Hang", 276 }, // #301 + { ptype::script_extensions, "Hanifi_Rohingya:Rohg", 277 }, // #302 + { ptype::script_extensions, "Hanunoo:Hano", 278 }, // #303 + { ptype::script_extensions, "Hatran:Hatr", 143 }, // #304 + { ptype::script_extensions, "Hebrew:Hebr", 144 }, // #305 + { ptype::script_extensions, "Hiragana:Hira", 279 }, // #306 + { ptype::script_extensions, "Imperial_Aramaic:Armi", 146 }, // #307 + { ptype::script_extensions, "Inherited:Zinh:Qaai", 280 }, // #308 + { ptype::script_extensions, "Inscriptional_Pahlavi:Phli", 148 }, // #309 + { ptype::script_extensions, "Inscriptional_Parthian:Prti", 149 }, // #310 + { ptype::script_extensions, "Javanese:Java", 281 }, // #311 + { ptype::script_extensions, "Kaithi:Kthi", 282 }, // #312 + { ptype::script_extensions, "Kannada:Knda", 283 }, // #313 + { ptype::script_extensions, "Katakana:Kana", 284 }, // #314 + { ptype::script_extensions, "Kayah_Li:Kali", 285 }, // #315 + { ptype::script_extensions, "Kharoshthi:Khar", 155 }, // #316 + { ptype::script_extensions, "Khitan_Small_Script:Kits", 156 }, // #317 + { ptype::script_extensions, "Khmer:Khmr", 157 }, // #318 + { ptype::script_extensions, "Khojki:Khoj", 286 }, // #319 + { ptype::script_extensions, "Khudawadi:Sind", 287 }, // #320 + { ptype::script_extensions, "Lao:Laoo", 160 }, // #321 + { ptype::script_extensions, "Latin:Latn", 288 }, // #322 + { ptype::script_extensions, "Lepcha:Lepc", 162 }, // #323 + { ptype::script_extensions, "Limbu:Limb", 289 }, // #324 + { ptype::script_extensions, "Linear_A:Lina", 290 }, // #325 + { ptype::script_extensions, "Linear_B:Linb", 291 }, // #326 + { ptype::script_extensions, "Lisu:Lisu", 166 }, // #327 + { ptype::script_extensions, "Lycian:Lyci", 167 }, // #328 + { ptype::script_extensions, "Lydian:Lydi", 168 }, // #329 + { ptype::script_extensions, "Mahajani:Mahj", 292 }, // #330 + { ptype::script_extensions, "Makasar:Maka", 170 }, // #331 + { ptype::script_extensions, "Malayalam:Mlym", 293 }, // #332 + { ptype::script_extensions, "Mandaic:Mand", 294 }, // #333 + { ptype::script_extensions, "Manichaean:Mani", 295 }, // #334 + { ptype::script_extensions, "Marchen:Marc", 174 }, // #335 + { ptype::script_extensions, "Masaram_Gondi:Gonm", 296 }, // #336 + { ptype::script_extensions, "Medefaidrin:Medf", 176 }, // #337 + { ptype::script_extensions, "Meetei_Mayek:Mtei", 177 }, // #338 + { ptype::script_extensions, "Mende_Kikakui:Mend", 178 }, // #339 + { ptype::script_extensions, "Meroitic_Cursive:Merc", 179 }, // #340 + { ptype::script_extensions, "Meroitic_Hieroglyphs:Mero", 180 }, // #341 + { ptype::script_extensions, "Miao:Plrd", 181 }, // #342 + { ptype::script_extensions, "Modi:Modi", 297 }, // #343 + { ptype::script_extensions, "Mongolian:Mong", 298 }, // #344 + { ptype::script_extensions, "Mro:Mroo", 184 }, // #345 + { ptype::script_extensions, "Multani:Mult", 299 }, // #346 + { ptype::script_extensions, "Myanmar:Mymr", 300 }, // #347 + { ptype::script_extensions, "Nabataean:Nbat", 187 }, // #348 + { ptype::script_extensions, "Nandinagari:Nand", 301 }, // #349 + { ptype::script_extensions, "New_Tai_Lue:Talu", 189 }, // #350 + { ptype::script_extensions, "Newa:Newa", 190 }, // #351 + { ptype::script_extensions, "Nko:Nkoo", 302 }, // #352 + { ptype::script_extensions, "Nushu:Nshu", 192 }, // #353 + { ptype::script_extensions, "Nyiakeng_Puachue_Hmong:Hmnp", 193 }, // #354 + { ptype::script_extensions, "Ogham:Ogam", 194 }, // #355 + { ptype::script_extensions, "Ol_Chiki:Olck", 195 }, // #356 + { ptype::script_extensions, "Old_Hungarian:Hung", 196 }, // #357 + { ptype::script_extensions, "Old_Italic:Ital", 197 }, // #358 + { ptype::script_extensions, "Old_North_Arabian:Narb", 198 }, // #359 + { ptype::script_extensions, "Old_Permic:Perm", 303 }, // #360 + { ptype::script_extensions, "Old_Persian:Xpeo", 200 }, // #361 + { ptype::script_extensions, "Old_Sogdian:Sogo", 201 }, // #362 + { ptype::script_extensions, "Old_South_Arabian:Sarb", 202 }, // #363 + { ptype::script_extensions, "Old_Turkic:Orkh", 203 }, // #364 + { ptype::script_extensions, "Old_Uyghur:Ougr", 304 }, // #365 + { ptype::script_extensions, "Oriya:Orya", 305 }, // #366 + { ptype::script_extensions, "Osage:Osge", 206 }, // #367 + { ptype::script_extensions, "Osmanya:Osma", 207 }, // #368 + { ptype::script_extensions, "Pahawh_Hmong:Hmng", 208 }, // #369 + { ptype::script_extensions, "Palmyrene:Palm", 209 }, // #370 + { ptype::script_extensions, "Pau_Cin_Hau:Pauc", 210 }, // #371 + { ptype::script_extensions, "Phags_Pa:Phag", 306 }, // #372 + { ptype::script_extensions, "Phoenician:Phnx", 212 }, // #373 + { ptype::script_extensions, "Psalter_Pahlavi:Phlp", 307 }, // #374 + { ptype::script_extensions, "Rejang:Rjng", 214 }, // #375 + { ptype::script_extensions, "Runic:Runr", 215 }, // #376 + { ptype::script_extensions, "Samaritan:Samr", 216 }, // #377 + { ptype::script_extensions, "Saurashtra:Saur", 217 }, // #378 + { ptype::script_extensions, "Sharada:Shrd", 308 }, // #379 + { ptype::script_extensions, "Shavian:Shaw", 219 }, // #380 + { ptype::script_extensions, "Siddham:Sidd", 220 }, // #381 + { ptype::script_extensions, "SignWriting:Sgnw", 221 }, // #382 + { ptype::script_extensions, "Sinhala:Sinh", 309 }, // #383 + { ptype::script_extensions, "Sogdian:Sogd", 310 }, // #384 + { ptype::script_extensions, "Sora_Sompeng:Sora", 224 }, // #385 + { ptype::script_extensions, "Soyombo:Soyo", 225 }, // #386 + { ptype::script_extensions, "Sundanese:Sund", 226 }, // #387 + { ptype::script_extensions, "Syloti_Nagri:Sylo", 311 }, // #388 + { ptype::script_extensions, "Syriac:Syrc", 312 }, // #389 + { ptype::script_extensions, "Tagalog:Tglg", 313 }, // #390 + { ptype::script_extensions, "Tagbanwa:Tagb", 314 }, // #391 + { ptype::script_extensions, "Tai_Le:Tale", 315 }, // #392 + { ptype::script_extensions, "Tai_Tham:Lana", 232 }, // #393 + { ptype::script_extensions, "Tai_Viet:Tavt", 233 }, // #394 + { ptype::script_extensions, "Takri:Takr", 316 }, // #395 + { ptype::script_extensions, "Tamil:Taml", 317 }, // #396 + { ptype::script_extensions, "Tangsa:Tnsa", 236 }, // #397 + { ptype::script_extensions, "Tangut:Tang", 237 }, // #398 + { ptype::script_extensions, "Telugu:Telu", 318 }, // #399 + { ptype::script_extensions, "Thaana:Thaa", 319 }, // #400 + { ptype::script_extensions, "Thai:Thai", 240 }, // #401 + { ptype::script_extensions, "Tibetan:Tibt", 241 }, // #402 + { ptype::script_extensions, "Tifinagh:Tfng", 242 }, // #403 + { ptype::script_extensions, "Tirhuta:Tirh", 320 }, // #404 + { ptype::script_extensions, "Toto", 244 }, // #405 + { ptype::script_extensions, "Ugaritic:Ugar", 245 }, // #406 + { ptype::script_extensions, "Vai:Vaii", 246 }, // #407 + { ptype::script_extensions, "Vithkuqi:Vith", 247 }, // #408 + { ptype::script_extensions, "Wancho:Wcho", 248 }, // #409 + { ptype::script_extensions, "Warang_Citi:Wara", 249 }, // #410 + { ptype::script_extensions, "Yezidi:Yezi", 321 }, // #411 + { ptype::script_extensions, "Yi:Yiii", 322 }, // #412 + { ptype::script_extensions, "Zanabazar_Square:Zanb", 252 }, // #413 + { ptype::unknown, "", 0 } +}; + +template +const T6 unicode_property_data::positiontable[] = +{ + { 0, 0 }, // #0 unknown + { 0, 725 }, // #1 gc=Other:C + { 0, 2 }, // #2 gc=Control:Cc:cntrl + { 2, 21 }, // #3 gc=Format:Cf + { 23, 698 }, // #4 gc=Unassigned:Cn + { 721, 3 }, // #5 gc=Private_Use:Co + { 724, 1 }, // #6 gc=Surrogate:Cs + { 725, 1883 }, // #7 gc=Letter:L + { 725, 1313 }, // #8 gc=Cased_Letter:LC + { 725, 657 }, // #9 gc=Lowercase_Letter:Ll + { 1382, 10 }, // #10 gc=Titlecase_Letter:Lt + { 1392, 646 }, // #11 gc=Uppercase_Letter:Lu + { 2038, 69 }, // #12 gc=Modifier_Letter:Lm + { 2107, 501 }, // #13 gc=Other_Letter:Lo + { 2608, 518 }, // #14 gc=Mark:M:Combining_Mark + { 2608, 177 }, // #15 gc=Spacing_Mark:Mc + { 2785, 5 }, // #16 gc=Enclosing_Mark:Me + { 2790, 336 }, // #17 gc=Nonspacing_Mark:Mn + { 3126, 145 }, // #18 gc=Number:N + { 3126, 62 }, // #19 gc=Decimal_Number:Nd:digit + { 3188, 12 }, // #20 gc=Letter_Number:Nl + { 3200, 71 }, // #21 gc=Other_Number:No + { 3271, 386 }, // #22 gc=Punctuation:P:punct + { 3271, 6 }, // #23 gc=Connector_Punctuation:Pc + { 3277, 19 }, // #24 gc=Dash_Punctuation:Pd + { 3296, 76 }, // #25 gc=Close_Punctuation:Pe + { 3372, 10 }, // #26 gc=Final_Punctuation:Pf + { 3382, 11 }, // #27 gc=Initial_Punctuation:Pi + { 3393, 185 }, // #28 gc=Other_Punctuation:Po + { 3578, 79 }, // #29 gc=Open_Punctuation:Ps + { 3657, 302 }, // #30 gc=Symbol:S + { 3657, 21 }, // #31 gc=Currency_Symbol:Sc + { 3678, 31 }, // #32 gc=Modifier_Symbol:Sk + { 3709, 64 }, // #33 gc=Math_Symbol:Sm + { 3773, 186 }, // #34 gc=Other_Symbol:So + { 3959, 9 }, // #35 gc=Separator:Z + { 3959, 1 }, // #36 gc=Line_Separator:Zl + { 3960, 1 }, // #37 gc=Paragraph_Separator:Zp + { 3961, 7 }, // #38 gc=Space_Separator:Zs + { 3968, 1 }, // #39 bp=ASCII + { 3969, 3 }, // #40 bp=ASCII_Hex_Digit:AHex + { 3972, 722 }, // #41 bp=Alphabetic:Alpha + { 4694, 1 }, // #42 bp=Any + { 4695, 0 }, // #43 bp=Assigned + { 4695, 4 }, // #44 bp=Bidi_Control:Bidi_C + { 4699, 114 }, // #45 bp=Bidi_Mirrored:Bidi_M + { 4813, 427 }, // #46 bp=Case_Ignorable:CI + { 5240, 155 }, // #47 bp=Cased + { 5395, 622 }, // #48 bp=Changes_When_Casefolded:CWCF + { 6017, 131 }, // #49 bp=Changes_When_Casemapped:CWCM + { 6148, 609 }, // #50 bp=Changes_When_Lowercased:CWL + { 6757, 838 }, // #51 bp=Changes_When_NFKC_Casefolded:CWKCF + { 7595, 626 }, // #52 bp=Changes_When_Titlecased:CWT + { 8221, 627 }, // #53 bp=Changes_When_Uppercased:CWU + { 8848, 23 }, // #54 bp=Dash + { 8871, 17 }, // #55 bp=Default_Ignorable_Code_Point:DI + { 8888, 8 }, // #56 bp=Deprecated:Dep + { 8896, 192 }, // #57 bp=Diacritic:Dia + { 9088, 153 }, // #58 bp=Emoji + { 9241, 10 }, // #59 bp=Emoji_Component:EComp + { 9251, 1 }, // #60 bp=Emoji_Modifier:EMod + { 9252, 40 }, // #61 bp=Emoji_Modifier_Base:EBase + { 9292, 83 }, // #62 bp=Emoji_Presentation:EPres + { 9375, 78 }, // #63 bp=Extended_Pictographic:ExtPict + { 9453, 33 }, // #64 bp=Extender:Ext + { 9486, 861 }, // #65 bp=Grapheme_Base:Gr_Base + { 10347, 353 }, // #66 bp=Grapheme_Extend:Gr_Ext + { 10700, 6 }, // #67 bp=Hex_Digit:Hex + { 10706, 2 }, // #68 bp=IDS_Binary_Operator:IDSB + { 10708, 1 }, // #69 bp=IDS_Trinary_Operator:IDST + { 10709, 756 }, // #70 bp=ID_Continue:IDC + { 11465, 648 }, // #71 bp=ID_Start:IDS + { 12113, 19 }, // #72 bp=Ideographic:Ideo + { 12132, 1 }, // #73 bp=Join_Control:Join_C + { 12133, 7 }, // #74 bp=Logical_Order_Exception:LOE + { 12140, 668 }, // #75 bp=Lowercase:Lower + { 12808, 138 }, // #76 bp=Math + { 12946, 18 }, // #77 bp=Noncharacter_Code_Point:NChar + { 12964, 28 }, // #78 bp=Pattern_Syntax:Pat_Syn + { 12992, 5 }, // #79 bp=Pattern_White_Space:Pat_WS + { 12997, 13 }, // #80 bp=Quotation_Mark:QMark + { 13010, 3 }, // #81 bp=Radical + { 13013, 1 }, // #82 bp=Regional_Indicator:RI + { 13014, 79 }, // #83 bp=Sentence_Terminal:STerm + { 13093, 32 }, // #84 bp=Soft_Dotted:SD + { 13125, 107 }, // #85 bp=Terminal_Punctuation:Term + { 13232, 15 }, // #86 bp=Unified_Ideograph:UIdeo + { 13247, 651 }, // #87 bp=Uppercase:Upper + { 13898, 4 }, // #88 bp=Variation_Selector:VS + { 13902, 10 }, // #89 bp=White_Space:space + { 13912, 763 }, // #90 bp=XID_Continue:XIDC + { 14675, 655 }, // #91 bp=XID_Start:XIDS + { 15330, 3 }, // #92 sc=Adlam:Adlm + { 15333, 3 }, // #93 sc=Ahom:Ahom scx=Ahom:Ahom + { 15336, 1 }, // #94 sc=Anatolian_Hieroglyphs:Hluw scx=Anatolian_Hieroglyphs:Hluw + { 15337, 57 }, // #95 sc=Arabic:Arab + { 15394, 4 }, // #96 sc=Armenian:Armn scx=Armenian:Armn + { 15398, 2 }, // #97 sc=Avestan:Avst scx=Avestan:Avst + { 15400, 2 }, // #98 sc=Balinese:Bali scx=Balinese:Bali + { 15402, 2 }, // #99 sc=Bamum:Bamu scx=Bamum:Bamu + { 15404, 2 }, // #100 sc=Bassa_Vah:Bass scx=Bassa_Vah:Bass + { 15406, 2 }, // #101 sc=Batak:Batk scx=Batak:Batk + { 15408, 14 }, // #102 sc=Bengali:Beng + { 15422, 4 }, // #103 sc=Bhaiksuki:Bhks scx=Bhaiksuki:Bhks + { 15426, 3 }, // #104 sc=Bopomofo:Bopo + { 15429, 3 }, // #105 sc=Brahmi:Brah scx=Brahmi:Brah + { 15432, 1 }, // #106 sc=Braille:Brai scx=Braille:Brai + { 15433, 2 }, // #107 sc=Buginese:Bugi + { 15435, 1 }, // #108 sc=Buhid:Buhd + { 15436, 3 }, // #109 sc=Canadian_Aboriginal:Cans scx=Canadian_Aboriginal:Cans + { 15439, 1 }, // #110 sc=Carian:Cari scx=Carian:Cari + { 15440, 2 }, // #111 sc=Caucasian_Albanian:Aghb scx=Caucasian_Albanian:Aghb + { 15442, 2 }, // #112 sc=Chakma:Cakm + { 15444, 4 }, // #113 sc=Cham:Cham scx=Cham:Cham + { 15448, 3 }, // #114 sc=Cherokee:Cher scx=Cherokee:Cher + { 15451, 1 }, // #115 sc=Chorasmian:Chrs scx=Chorasmian:Chrs + { 15452, 174 }, // #116 sc=Common:Zyyy + { 15626, 3 }, // #117 sc=Coptic:Copt:Qaac + { 15629, 1 }, // #118 sc=Cypro_Minoan:Cpmn + { 15630, 4 }, // #119 sc=Cuneiform:Xsux scx=Cuneiform:Xsux + { 15634, 6 }, // #120 sc=Cypriot:Cprt + { 15640, 8 }, // #121 sc=Cyrillic:Cyrl + { 15648, 1 }, // #122 sc=Deseret:Dsrt scx=Deseret:Dsrt + { 15649, 4 }, // #123 sc=Devanagari:Deva + { 15653, 8 }, // #124 sc=Dives_Akuru:Diak scx=Dives_Akuru:Diak + { 15661, 1 }, // #125 sc=Dogra:Dogr + { 15662, 5 }, // #126 sc=Duployan:Dupl + { 15667, 2 }, // #127 sc=Egyptian_Hieroglyphs:Egyp scx=Egyptian_Hieroglyphs:Egyp + { 15669, 1 }, // #128 sc=Elbasan:Elba scx=Elbasan:Elba + { 15670, 1 }, // #129 sc=Elymaic:Elym scx=Elymaic:Elym + { 15671, 36 }, // #130 sc=Ethiopic:Ethi scx=Ethiopic:Ethi + { 15707, 10 }, // #131 sc=Georgian:Geor + { 15717, 6 }, // #132 sc=Glagolitic:Glag + { 15723, 1 }, // #133 sc=Gothic:Goth scx=Gothic:Goth + { 15724, 15 }, // #134 sc=Grantha:Gran + { 15739, 36 }, // #135 sc=Greek:Grek + { 15775, 14 }, // #136 sc=Gujarati:Gujr + { 15789, 6 }, // #137 sc=Gunjala_Gondi:Gong + { 15795, 16 }, // #138 sc=Gurmukhi:Guru + { 15811, 20 }, // #139 sc=Han:Hani + { 15831, 14 }, // #140 sc=Hangul:Hang + { 15845, 2 }, // #141 sc=Hanifi_Rohingya:Rohg + { 15847, 1 }, // #142 sc=Hanunoo:Hano + { 15848, 3 }, // #143 sc=Hatran:Hatr scx=Hatran:Hatr + { 15851, 9 }, // #144 sc=Hebrew:Hebr scx=Hebrew:Hebr + { 15860, 5 }, // #145 sc=Hiragana:Hira + { 15865, 2 }, // #146 sc=Imperial_Aramaic:Armi scx=Imperial_Aramaic:Armi + { 15867, 29 }, // #147 sc=Inherited:Zinh:Qaai + { 15896, 2 }, // #148 sc=Inscriptional_Pahlavi:Phli scx=Inscriptional_Pahlavi:Phli + { 15898, 2 }, // #149 sc=Inscriptional_Parthian:Prti scx=Inscriptional_Parthian:Prti + { 15900, 3 }, // #150 sc=Javanese:Java + { 15903, 2 }, // #151 sc=Kaithi:Kthi + { 15905, 13 }, // #152 sc=Kannada:Knda + { 15918, 13 }, // #153 sc=Katakana:Kana + { 15931, 2 }, // #154 sc=Kayah_Li:Kali + { 15933, 8 }, // #155 sc=Kharoshthi:Khar scx=Kharoshthi:Khar + { 15941, 2 }, // #156 sc=Khitan_Small_Script:Kits scx=Khitan_Small_Script:Kits + { 15943, 4 }, // #157 sc=Khmer:Khmr scx=Khmer:Khmr + { 15947, 2 }, // #158 sc=Khojki:Khoj + { 15949, 2 }, // #159 sc=Khudawadi:Sind + { 15951, 11 }, // #160 sc=Lao:Laoo scx=Lao:Laoo + { 15962, 38 }, // #161 sc=Latin:Latn + { 16000, 3 }, // #162 sc=Lepcha:Lepc scx=Lepcha:Lepc + { 16003, 5 }, // #163 sc=Limbu:Limb + { 16008, 3 }, // #164 sc=Linear_A:Lina + { 16011, 7 }, // #165 sc=Linear_B:Linb + { 16018, 2 }, // #166 sc=Lisu:Lisu scx=Lisu:Lisu + { 16020, 1 }, // #167 sc=Lycian:Lyci scx=Lycian:Lyci + { 16021, 2 }, // #168 sc=Lydian:Lydi scx=Lydian:Lydi + { 16023, 1 }, // #169 sc=Mahajani:Mahj + { 16024, 1 }, // #170 sc=Makasar:Maka scx=Makasar:Maka + { 16025, 7 }, // #171 sc=Malayalam:Mlym + { 16032, 2 }, // #172 sc=Mandaic:Mand + { 16034, 2 }, // #173 sc=Manichaean:Mani + { 16036, 3 }, // #174 sc=Marchen:Marc scx=Marchen:Marc + { 16039, 7 }, // #175 sc=Masaram_Gondi:Gonm + { 16046, 1 }, // #176 sc=Medefaidrin:Medf scx=Medefaidrin:Medf + { 16047, 3 }, // #177 sc=Meetei_Mayek:Mtei scx=Meetei_Mayek:Mtei + { 16050, 2 }, // #178 sc=Mende_Kikakui:Mend scx=Mende_Kikakui:Mend + { 16052, 3 }, // #179 sc=Meroitic_Cursive:Merc scx=Meroitic_Cursive:Merc + { 16055, 1 }, // #180 sc=Meroitic_Hieroglyphs:Mero scx=Meroitic_Hieroglyphs:Mero + { 16056, 3 }, // #181 sc=Miao:Plrd scx=Miao:Plrd + { 16059, 2 }, // #182 sc=Modi:Modi + { 16061, 6 }, // #183 sc=Mongolian:Mong + { 16067, 3 }, // #184 sc=Mro:Mroo scx=Mro:Mroo + { 16070, 5 }, // #185 sc=Multani:Mult + { 16075, 3 }, // #186 sc=Myanmar:Mymr + { 16078, 2 }, // #187 sc=Nabataean:Nbat scx=Nabataean:Nbat + { 16080, 3 }, // #188 sc=Nandinagari:Nand + { 16083, 4 }, // #189 sc=New_Tai_Lue:Talu scx=New_Tai_Lue:Talu + { 16087, 2 }, // #190 sc=Newa:Newa scx=Newa:Newa + { 16089, 2 }, // #191 sc=Nko:Nkoo + { 16091, 2 }, // #192 sc=Nushu:Nshu scx=Nushu:Nshu + { 16093, 4 }, // #193 sc=Nyiakeng_Puachue_Hmong:Hmnp scx=Nyiakeng_Puachue_Hmong:Hmnp + { 16097, 1 }, // #194 sc=Ogham:Ogam scx=Ogham:Ogam + { 16098, 1 }, // #195 sc=Ol_Chiki:Olck scx=Ol_Chiki:Olck + { 16099, 3 }, // #196 sc=Old_Hungarian:Hung scx=Old_Hungarian:Hung + { 16102, 2 }, // #197 sc=Old_Italic:Ital scx=Old_Italic:Ital + { 16104, 1 }, // #198 sc=Old_North_Arabian:Narb scx=Old_North_Arabian:Narb + { 16105, 1 }, // #199 sc=Old_Permic:Perm + { 16106, 2 }, // #200 sc=Old_Persian:Xpeo scx=Old_Persian:Xpeo + { 16108, 1 }, // #201 sc=Old_Sogdian:Sogo scx=Old_Sogdian:Sogo + { 16109, 1 }, // #202 sc=Old_South_Arabian:Sarb scx=Old_South_Arabian:Sarb + { 16110, 1 }, // #203 sc=Old_Turkic:Orkh scx=Old_Turkic:Orkh + { 16111, 1 }, // #204 sc=Old_Uyghur:Ougr + { 16112, 14 }, // #205 sc=Oriya:Orya + { 16126, 2 }, // #206 sc=Osage:Osge scx=Osage:Osge + { 16128, 2 }, // #207 sc=Osmanya:Osma scx=Osmanya:Osma + { 16130, 5 }, // #208 sc=Pahawh_Hmong:Hmng scx=Pahawh_Hmong:Hmng + { 16135, 1 }, // #209 sc=Palmyrene:Palm scx=Palmyrene:Palm + { 16136, 1 }, // #210 sc=Pau_Cin_Hau:Pauc scx=Pau_Cin_Hau:Pauc + { 16137, 1 }, // #211 sc=Phags_Pa:Phag + { 16138, 2 }, // #212 sc=Phoenician:Phnx scx=Phoenician:Phnx + { 16140, 3 }, // #213 sc=Psalter_Pahlavi:Phlp + { 16143, 2 }, // #214 sc=Rejang:Rjng scx=Rejang:Rjng + { 16145, 2 }, // #215 sc=Runic:Runr scx=Runic:Runr + { 16147, 2 }, // #216 sc=Samaritan:Samr scx=Samaritan:Samr + { 16149, 2 }, // #217 sc=Saurashtra:Saur scx=Saurashtra:Saur + { 16151, 1 }, // #218 sc=Sharada:Shrd + { 16152, 1 }, // #219 sc=Shavian:Shaw scx=Shavian:Shaw + { 16153, 2 }, // #220 sc=Siddham:Sidd scx=Siddham:Sidd + { 16155, 3 }, // #221 sc=SignWriting:Sgnw scx=SignWriting:Sgnw + { 16158, 13 }, // #222 sc=Sinhala:Sinh + { 16171, 1 }, // #223 sc=Sogdian:Sogd + { 16172, 2 }, // #224 sc=Sora_Sompeng:Sora scx=Sora_Sompeng:Sora + { 16174, 1 }, // #225 sc=Soyombo:Soyo scx=Soyombo:Soyo + { 16175, 2 }, // #226 sc=Sundanese:Sund scx=Sundanese:Sund + { 16177, 1 }, // #227 sc=Syloti_Nagri:Sylo + { 16178, 4 }, // #228 sc=Syriac:Syrc + { 16182, 2 }, // #229 sc=Tagalog:Tglg + { 16184, 3 }, // #230 sc=Tagbanwa:Tagb + { 16187, 2 }, // #231 sc=Tai_Le:Tale + { 16189, 5 }, // #232 sc=Tai_Tham:Lana scx=Tai_Tham:Lana + { 16194, 2 }, // #233 sc=Tai_Viet:Tavt scx=Tai_Viet:Tavt + { 16196, 2 }, // #234 sc=Takri:Takr + { 16198, 18 }, // #235 sc=Tamil:Taml + { 16216, 2 }, // #236 sc=Tangsa:Tnsa scx=Tangsa:Tnsa + { 16218, 4 }, // #237 sc=Tangut:Tang scx=Tangut:Tang + { 16222, 13 }, // #238 sc=Telugu:Telu + { 16235, 1 }, // #239 sc=Thaana:Thaa + { 16236, 2 }, // #240 sc=Thai:Thai scx=Thai:Thai + { 16238, 7 }, // #241 sc=Tibetan:Tibt scx=Tibetan:Tibt + { 16245, 3 }, // #242 sc=Tifinagh:Tfng scx=Tifinagh:Tfng + { 16248, 2 }, // #243 sc=Tirhuta:Tirh + { 16250, 1 }, // #244 sc=Toto scx=Toto + { 16251, 2 }, // #245 sc=Ugaritic:Ugar scx=Ugaritic:Ugar + { 16253, 1 }, // #246 sc=Vai:Vaii scx=Vai:Vaii + { 16254, 8 }, // #247 sc=Vithkuqi:Vith scx=Vithkuqi:Vith + { 16262, 2 }, // #248 sc=Wancho:Wcho scx=Wancho:Wcho + { 16264, 2 }, // #249 sc=Warang_Citi:Wara scx=Warang_Citi:Wara + { 16266, 3 }, // #250 sc=Yezidi:Yezi + { 16269, 2 }, // #251 sc=Yi:Yiii + { 16271, 1 }, // #252 sc=Zanabazar_Square:Zanb scx=Zanabazar_Square:Zanb + { 16272, 5 }, // #253 scx=Adlam:Adlm + { 16277, 51 }, // #254 scx=Arabic:Arab + { 16328, 26 }, // #255 scx=Bengali:Beng + { 16354, 12 }, // #256 scx=Bopomofo:Bopo + { 16366, 3 }, // #257 scx=Buginese:Bugi + { 16369, 2 }, // #258 scx=Buhid:Buhd + { 16371, 4 }, // #259 scx=Chakma:Cakm + { 16375, 148 }, // #260 scx=Common:Zyyy + { 16523, 4 }, // #261 scx=Coptic:Copt:Qaac + { 16527, 2 }, // #262 scx=Cypro_Minoan:Cpmn + { 16529, 9 }, // #263 scx=Cypriot:Cprt + { 16538, 9 }, // #264 scx=Cyrillic:Cyrl + { 16547, 7 }, // #265 scx=Devanagari:Deva + { 16554, 3 }, // #266 scx=Dogra:Dogr + { 16557, 5 }, // #267 scx=Duployan:Dupl + { 16562, 9 }, // #268 scx=Georgian:Geor + { 16571, 10 }, // #269 scx=Glagolitic:Glag + { 16581, 25 }, // #270 scx=Grantha:Gran + { 16606, 38 }, // #271 scx=Greek:Grek + { 16644, 17 }, // #272 scx=Gujarati:Gujr + { 16661, 7 }, // #273 scx=Gunjala_Gondi:Gong + { 16668, 19 }, // #274 scx=Gurmukhi:Guru + { 16687, 37 }, // #275 scx=Han:Hani + { 16724, 21 }, // #276 scx=Hangul:Hang + { 16745, 7 }, // #277 scx=Hanifi_Rohingya:Rohg + { 16752, 1 }, // #278 scx=Hanunoo:Hano + { 16753, 16 }, // #279 scx=Hiragana:Hira + { 16769, 20 }, // #280 scx=Inherited:Zinh:Qaai + { 16789, 3 }, // #281 scx=Javanese:Java + { 16792, 4 }, // #282 scx=Kaithi:Kthi + { 16796, 21 }, // #283 scx=Kannada:Knda + { 16817, 19 }, // #284 scx=Katakana:Kana + { 16836, 1 }, // #285 scx=Kayah_Li:Kali + { 16837, 4 }, // #286 scx=Khojki:Khoj + { 16841, 4 }, // #287 scx=Khudawadi:Sind + { 16845, 46 }, // #288 scx=Latin:Latn + { 16891, 6 }, // #289 scx=Limbu:Limb + { 16897, 4 }, // #290 scx=Linear_A:Lina + { 16901, 10 }, // #291 scx=Linear_B:Linb + { 16911, 3 }, // #292 scx=Mahajani:Mahj + { 16914, 11 }, // #293 scx=Malayalam:Mlym + { 16925, 3 }, // #294 scx=Mandaic:Mand + { 16928, 3 }, // #295 scx=Manichaean:Mani + { 16931, 8 }, // #296 scx=Masaram_Gondi:Gonm + { 16939, 3 }, // #297 scx=Modi:Modi + { 16942, 5 }, // #298 scx=Mongolian:Mong + { 16947, 6 }, // #299 scx=Multani:Mult + { 16953, 4 }, // #300 scx=Myanmar:Mymr + { 16957, 9 }, // #301 scx=Nandinagari:Nand + { 16966, 6 }, // #302 scx=Nko:Nkoo + { 16972, 2 }, // #303 scx=Old_Permic:Perm + { 16974, 3 }, // #304 scx=Old_Uyghur:Ougr + { 16977, 18 }, // #305 scx=Oriya:Orya + { 16995, 3 }, // #306 scx=Phags_Pa:Phag + { 16998, 4 }, // #307 scx=Psalter_Pahlavi:Phlp + { 17002, 6 }, // #308 scx=Sharada:Shrd + { 17008, 14 }, // #309 scx=Sinhala:Sinh + { 17022, 2 }, // #310 scx=Sogdian:Sogd + { 17024, 3 }, // #311 scx=Syloti_Nagri:Sylo + { 17027, 12 }, // #312 scx=Syriac:Syrc + { 17039, 3 }, // #313 scx=Tagalog:Tglg + { 17042, 4 }, // #314 scx=Tagbanwa:Tagb + { 17046, 3 }, // #315 scx=Tai_Le:Tale + { 17049, 4 }, // #316 scx=Takri:Takr + { 17053, 25 }, // #317 scx=Tamil:Taml + { 17078, 17 }, // #318 scx=Telugu:Telu + { 17095, 7 }, // #319 scx=Thaana:Thaa + { 17102, 6 }, // #320 scx=Tirhuta:Tirh + { 17108, 7 }, // #321 scx=Yezidi:Yezi + { 17115, 7 } // #322 scx=Yi:Yiii +}; +#define SRELL_UPDATA_VERSION 110 +// ... "srell_updata.hpp"] + +//template +class unicode_property +{ +public: + + typedef uint_l32 property_type; + typedef simple_array pstring; + + static const property_type error_property = static_cast(-1); + + unicode_property() + { + } + + unicode_property &operator=(const unicode_property &) + { + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + unicode_property &operator=(unicode_property &&) SRELL_NOEXCEPT + { + return *this; + } +#endif + + static property_type lookup_property(const pstring &name, const pstring &value) + { + pname_type ptype = name.size() ? lookup_property_name(name) : updata::ptype::general_category; + property_type property_number = lookup_property_value(ptype, value); + + if (property_number == updata::unknown && name.size() == 0) + { + ptype = updata::ptype::binary; + property_number = lookup_property_value(ptype, value); + } + + return property_number != updata::unknown ? property_number : error_property; + } + + static std::size_t ranges_offset(const property_type property_number) + { +#if defined(SRELL_UPDATA_VERSION) + return updata::positiontable[property_number].offset; +#else + const offset_and_number *const postable = updata::position_table(); + return postable[property_number].offset; +#endif + } + + static std::size_t number_of_ranges(const property_type property_number) + { +#if defined(SRELL_UPDATA_VERSION) + return updata::positiontable[property_number].number_of_pairs; +#else + const offset_and_number *const postable = updata::position_table(); + return postable[property_number].number_of_pairs; +#endif + } + + static const uchar32 *ranges_address(const property_type property_number) + { +#if defined(SRELL_UPDATA_VERSION) + return &updata::rangetable[ranges_offset(property_number) << 1]; +#else + const uchar32 *const ranges = updata::ranges(); + return &ranges[ranges_offset(property_number) << 1]; +#endif + } + +private: + + typedef uint_l32 pname_type; + typedef const char *pname_string_type; + +#if defined(SRELL_UPDATA_VERSION) && (SRELL_UPDATA_VERSION >= 200) + struct pvalue_type + { + pname_type pname; + property_type pnumber; + pname_string_type csstrings; + }; +#else + struct pvalue_type + { + pname_type pname; + pname_string_type csstrings; + property_type pnumber; + }; +#endif + + struct offset_and_number + { + std::size_t offset; + std::size_t number_of_pairs; + }; + + typedef unicode_property_data + updata; + + static pname_type lookup_property_name(const pstring &name) + { +#if defined(SRELL_UPDATA_VERSION) + for (std::size_t pno = 0; *updata::propertynametable[pno]; ++pno) + { + if (check_if_included(name, updata::propertynametable[pno])) + return static_cast(pno); + } +#else + const pname_string_type *const pname_table = updata::propertyname_table(); + + for (std::size_t pno = 0; *pname_table[pno]; ++pno) + { + if (check_if_included(name, pname_table[pno])) + return static_cast(pno); + } +#endif + return updata::ptype::unknown; + } + + // Checks if value is included in colon-separated strings. + static bool check_if_included(const pstring &value, pname_string_type csstrings) + { + if (static_cast(*csstrings) != meta_char::mc_astrsk) // '*' + { + while (*csstrings) + { + const pname_string_type begin = csstrings; + + for (; static_cast(*csstrings) != meta_char::mc_colon && static_cast(*csstrings) != char_ctrl::cc_nul; ++csstrings); + + const std::size_t length = csstrings - begin; + + if (static_cast(value.size()) == length) + if (value.compare(0, value.size(), begin, length) == 0) + return true; + + if (static_cast(*csstrings) == meta_char::mc_colon) + ++csstrings; + } + } + return false; + } + + static property_type lookup_property_value(const pname_type ptype, const pstring &value) + { +#if defined(SRELL_UPDATA_VERSION) + for (std::size_t pno = 0; *updata::rangenumbertable[pno].csstrings; ++pno) + { + const pvalue_type &pvalue = updata::rangenumbertable[pno]; + if (pvalue.pname == ptype && check_if_included(value, pvalue.csstrings)) + return pvalue.pnumber; + } +#else + const pvalue_type *const pvalue_table = updata::rangenumber_table(); + + for (std::size_t pno = 0; *pvalue_table[pno].csstrings; ++pno) + { + const pvalue_type &pvalue = pvalue_table[pno]; + if (pvalue.pname == ptype && check_if_included(value, pvalue.csstrings)) + return pvalue.pnumber; + } +#endif + return updata::unknown; + } + +public: + + static const std::size_t number_of_properties = updata::last_property_number + 1; + static const std::size_t last_property_number = updata::last_property_number; +#if defined(SRELL_UPDATA_VERSION) && (SRELL_UPDATA_VERSION >= 200) + static const std::size_t last_pos_number = updata::last_pos_number; +#endif + static const property_type gc_Zs = updata::gc_Space_Separator; + static const property_type gc_Cn = updata::gc_Unassigned; + static const property_type bp_Assigned = updata::bp_Assigned; + +// UnicodeIDStart:: +// UnicodeIDContinue:: + static const property_type bp_ID_Start = updata::bp_ID_Start; + static const property_type bp_ID_Continue = updata::bp_ID_Continue; +}; +// unicode_property + +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + } // namespace regex_internal + +// ... "rei_up.hpp"] +// ["rei_char_class.hpp" ... + + namespace regex_internal + { + +struct range_pair // , public std::pair +{ + uchar32 second; + uchar32 first; + + void set(const uchar32 min, const uchar32 max) + { + this->first = min; + this->second = max; + } + + bool is_range_valid() const + { + return first <= second; + } + + bool operator==(const range_pair &right) const + { + return this->first == right.first && this->second == right.second; + } + + bool operator<(const range_pair &right) const + { + return this->second < right.first; // This assumes that optimise() has been called. + } + + void swap(range_pair &right) + { + const range_pair tmp = *this; + *this = right; + right = tmp; + } + + bool unify_range(const range_pair &right) + { + range_pair &left = *this; + + if (right.first <= left.second || left.second + 1 == right.first) // r1 <= l2 || l2+1 == r1 + { + // l1 l2+1 < r1 r2 excluded. + + if (left.first <= right.second || right.second + 1 == left.first) // l1 <= r2 || r2+1 == l1 + { + // r1 r2+1 < l1 l2 excluded. + + if (left.first > right.first) + left.first = right.first; + + if (left.second < right.second) + left.second = right.second; + + return true; + } + } + return false; + } +}; +// range_pair + +struct range_pair_helper : public range_pair +{ + range_pair_helper(const uchar32 min, const uchar32 max) + { + this->first = min; + this->second = max; + } + + range_pair_helper(const uchar32 minmax) + { + this->first = minmax; + this->second = minmax; + } +}; +// range_pair_helper + +struct range_pairs // : public simple_array +{ +public: + + typedef simple_array array_type; + typedef array_type::size_type size_type; + + range_pairs() + { + } + + range_pairs(const range_pairs &rp) : rparray_(rp.rparray_) + { + } + + range_pairs &operator=(const range_pairs &rp) + { + rparray_.operator=(rp.rparray_); + return *this; + } + + range_pairs(const size_type initsize) : rparray_(initsize) + { + } + + range_pairs(const range_pairs &right, size_type pos, size_type size) + : rparray_(right.rparray_, pos, size) + { + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + range_pairs(range_pairs &&rp) SRELL_NOEXCEPT + : rparray_(std::move(rp.rparray_)) + { + } + + range_pairs &operator=(range_pairs &&rp) SRELL_NOEXCEPT + { + rparray_.operator=(std::move(rp.rparray_)); + return *this; + } +#endif + + void clear() + { + rparray_.clear(); + } + + size_type size() const + { + return rparray_.size(); + } + + const range_pair &operator[](const size_type pos) const + { + return rparray_[pos]; + } + range_pair &operator[](const size_type pos) + { + return rparray_[pos]; + } + + void resize(const size_type size) + { + rparray_.resize(size); + } + + void swap(range_pairs &right) + { + rparray_.swap(right.rparray_); + } + + void set_solerange(const range_pair &right) + { + rparray_.clear(); + rparray_.push_back(right); + } + + void append_newclass(const range_pairs &right) + { + rparray_.append(right.rparray_); + } + + void append_newpair(const range_pair &right) + { + rparray_.push_back(right); + } + + void join(const range_pair &right) + { + size_type pos = 0; + + for (; pos < rparray_.size(); ++pos) + { + range_pair &curpair = rparray_[pos]; + + if (curpair.unify_range(right)) + { + for (++pos; pos < rparray_.size();) + { + if (curpair.unify_range(rparray_[pos])) + rparray_.erase(pos); + else + break; + } + return; + } + if (right.second < curpair.first) + break; + } + rparray_.insert(pos, right); + } + + void merge(const range_pairs &right) + { + for (size_type i = 0; i < right.size(); ++i) + join(right[i]); + } + + bool same(uchar32 pos, const uchar32 count, const range_pairs &right) const + { + if (count == right.size()) + { + for (uchar32 i = 0; i < count; ++i, ++pos) + if (!(rparray_[pos] == right[i])) + return false; + + return true; + } + return false; + } + + int relationship(const range_pairs &right) const + { + if (rparray_.size() == right.rparray_.size()) + { + for (size_type i = 0; i < rparray_.size(); ++i) + { + if (!(this->rparray_[i] == right.rparray_[i])) + { + if (i == 0) + goto check_overlap; + + return 1; // Overlapped. + } + } + return 0; // Same. + } + check_overlap: + return is_overlap(right) ? 1 : 2; // Overlapped or exclusive. + } + + void negation() + { + uchar32 begin = 0; + range_pairs newpairs; + + for (size_type i = 0; i < rparray_.size(); ++i) + { + const range_pair &range = rparray_[i]; + + if (begin < range.first) + newpairs.join(range_pair_helper(begin, range.first - 1)); + + begin = range.second + 1; + } + + if (begin <= constants::unicode_max_codepoint) + newpairs.join(range_pair_helper(begin, constants::unicode_max_codepoint)); + + *this = newpairs; + } + + bool is_overlap(const range_pairs &right) const + { + for (size_type i = 0; i < rparray_.size(); ++i) + { + const range_pair &leftrange = rparray_[i]; + + for (size_type j = 0; j < right.size(); ++j) + { + const range_pair &rightrange = right[j]; + + if (rightrange.first <= leftrange.second) // Excludes l1 l2 < r1 r2. + if (leftrange.first <= rightrange.second) // Excludes r1 r2 < l1 l2. + return true; + } + } + return false; + } + + void load_from_memory(const uchar32 *array, size_type number_of_pairs) + { + for (; number_of_pairs; --number_of_pairs, array += 2) + join(range_pair_helper(array[0], array[1])); + } + + void make_caseunfoldedcharset() + { + uchar32 table[unicode_case_folding::rev_maxset] = {}; + bitset bs; + + for (size_type i = 0; i < rparray_.size(); ++i) + { + const range_pair &range = rparray_[i]; + + for (uchar32 ucp = range.first; ucp <= range.second; ++ucp) + { + const uchar32 setnum = unicode_case_folding::casefoldedcharset(table, ucp); + + for (uchar32 j = 0; j < setnum; ++j) + bs.set(table[j]); + } + } + load_from_bitset(bs); + } + + // For updataout.hpp. + void remove_range(const range_pair &right) + { + for (size_type pos = 0; pos < rparray_.size();) + { + range_pair &left = rparray_[pos]; + + if (right.first <= left.first && left.first <= right.second) // r1 <= l1 <= r2. + { + if (left.second > right.second) // r1 <= l1 <= r2 < l2. + { + left.first = right.second + 1; // carry doesn't happen. + ++pos; + } + else // r1 <= l1 <= l2 <= r2. + rparray_.erase(pos); + } + else if (right.first <= left.second && left.second <= right.second) // r1 <= l2 <= r2. + { + if (left.first < right.first) // l1 < r1 <= l2 <= r2. + { + left.second = right.first - 1; + ++pos; + } + else // r1 <= l1 <= l2 <= r2. + rparray_.erase(pos); + } + else if (left.first < right.first && right.second < left.second) // l1 < r1 && r2 < l2. + { + range_pair newrange(left); + + left.second = right.first - 1; + newrange.first = right.second + 1; + rparray_.insert(++pos, newrange); + ++pos; + } + else + ++pos; + } + } + +// template + uchar32 consists_of_one_character(const bool icase) const + { + if (rparray_.size() >= 1) + { + uchar32 (*const casefolding_func)(const uchar32) = !icase ? do_nothing : unicode_case_folding::do_casefolding; + const uchar32 ucp1st = casefolding_func(rparray_[0].first); + + for (size_type no = 0; no < rparray_.size(); ++no) + { + const range_pair &cr = rparray_[no]; + + for (uchar32 ucp = cr.first;; ++ucp) + { + if (ucp1st != casefolding_func(ucp)) + return constants::invalid_u32value; + + if (ucp == cr.second) + break; + } + } + return ucp1st; + } + return constants::invalid_u32value; + } + + void split_ranges(range_pairs &kept, range_pairs &removed, const range_pairs &rightranges) const + { + range_pair newpair; + + kept.rparray_ = this->rparray_; // Subtraction set. + removed.clear(); // Intersection set. + + for (size_type i = 0;; ++i) + { + RETRY_SAMEINDEXNO: + if (i >= kept.rparray_.size()) + break; + + range_pair &left = kept.rparray_[i]; + + for (size_type j = 0; j < rightranges.rparray_.size(); ++j) + { + const range_pair &right = rightranges.rparray_[j]; + + if (right.first <= left.second) // Excludes l1 l2 < r1 r2. + { + if (left.first <= right.second) // Excludes r1 r2 < l1 l2. + { + if (left.first < right.first) + { + if (right.second < left.second) + { + removed.join(range_pair_helper(right.first, right.second)); + + newpair.set(right.second + 1, left.second); + left.second = right.first - 1; + kept.rparray_.insert(i + 1, newpair); + } + else + { + removed.join(range_pair_helper(right.first, left.second)); + left.second = right.first - 1; + } + } + else if (right.second < left.second) + { + removed.join(range_pair_helper(left.first, right.second)); + left.first = right.second + 1; + } + else + { + removed.join(range_pair_helper(left.first, left.second)); + kept.rparray_.erase(i); + goto RETRY_SAMEINDEXNO; + } + } + } + else + break; + } + } + } + +#if defined(SRELLDBG_NO_BITSET) + bool is_included(const uchar32 ch) const + { +#if 01 + const range_pair *const end = rparray_.data() + rparray_.size(); + + for (const range_pair *cur = rparray_.data(); cur != end; ++cur) + { + if (ch <= cur->second) + return ch >= cur->first; +#else + for (size_type i = 0; i < rparray_.size(); ++i) + { + if (rparray_[i].is_included(ch)) + return true; +#endif + } + return false; + } +#endif // defined(SRELLDBG_NO_BITSET) + + // For multiple_range_pairs functions. + + bool is_included_ls(const uchar32 pos, uchar32 count, const uchar32 c) const + { + const range_pair *cur = &rparray_[pos]; + + for (; count; ++cur, --count) + { + if (c <= cur->second) + return c >= cur->first; + } + return false; + } + + bool is_included(const uchar32 pos, uchar32 count, const uchar32 c) const + { + const range_pair *base = &rparray_[pos]; + + while (count) + { + uchar32 mid = count >> 1; + const range_pair &rp = base[mid]; + + if (c <= rp.second) + { + if (c >= rp.first) + return true; + + count = mid; + } + else + { + ++mid; + count -= mid; + base += mid; + } + } + return false; + } + + void replace(const size_type pos, const size_type count, const range_pairs &right) + { + rparray_.replace(pos, count, right.rparray_); + } + +#if !defined(SRELLDBG_NO_CCPOS) + + // For Eytzinger layout functions. + + bool is_included_el(uchar32 pos, const uchar32 len, const uchar32 c) const + { + const range_pair *const base = &rparray_[pos]; + +#if defined(__GNUC__) + __builtin_prefetch(base); +#endif + for (pos = 0; pos < len;) + { + const range_pair &rp = base[pos]; + + if (c <= rp.second) + { + if (c >= rp.first) + return true; + + pos = (pos << 1) + 1; + } + else + { + pos = (pos << 1) + 2; + } + } + return false; + } + + uchar32 create_el(const range_pair *srcbase, const uchar32 srcsize) + { + const uchar32 basepos = static_cast(rparray_.size()); + + rparray_.resize(basepos + srcsize); + set_eytzinger_layout(0, srcbase, srcsize, &rparray_[basepos], 0); + + return srcsize; + } + +#endif // !defined(SRELLDBG_NO_CCPOS) + + uint_l32 total_codepoints() const + { + uint_l32 num = 0; + + for (size_type no = 0; no < rparray_.size(); ++no) + { + const range_pair &cr = rparray_[no]; + + num += cr.second - cr.first + 1; + } + return num; + } + +private: + +#if !defined(SRELLDBG_NO_CCPOS) + + uchar32 set_eytzinger_layout(uchar32 srcpos, const range_pair *const srcbase, const uchar32 srclen, + range_pair *const destbase, const uchar32 destpos) + { + if (destpos < srclen) + { + const uchar32 nextpos = (destpos << 1) + 1; + + srcpos = set_eytzinger_layout(srcpos, srcbase, srclen, destbase, nextpos); + destbase[destpos] = srcbase[srcpos++]; + srcpos = set_eytzinger_layout(srcpos, srcbase, srclen, destbase, nextpos + 1); + } + return srcpos; + } + +#endif // !defined(SRELLDBG_NO_CCPOS) + + static uchar32 do_nothing(const uchar32 cp) + { + return cp; + } + + template + void load_from_bitset(const BitSetT &bs) + { + uchar32 begin = constants::invalid_u32value; + range_pairs newranges; + + for (uchar32 ucp = 0;; ++ucp) + { + if (ucp > constants::unicode_max_codepoint || !bs.test(ucp)) + { + if (begin != constants::invalid_u32value) + { + newranges.join(range_pair_helper(begin, ucp - 1)); + begin = constants::invalid_u32value; + } + if (ucp > constants::unicode_max_codepoint) + break; + } + else if (begin == constants::invalid_u32value && bs.test(ucp)) + begin = ucp; + } + rparray_.swap(newranges.rparray_); + } + + array_type rparray_; + +public: // For debug. + + void print_pairs(const int, const char *const = NULL, const char *const = NULL) const; +}; +// range_pairs + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + +// For RegExpIdentifierStart and RegExpIdentifierPart +struct identifier_charclass +{ +public: + + void clear() + { + char_class_.clear(); + char_class_pos_.clear(); + } + + void setup() + { + if (char_class_pos_.size() == 0) + { + static const uchar32 additions[] = { + // reg_exp_identifier_start, reg_exp_identifier_part. + 0x24, 0x24, 0x5f, 0x5f, 0x200c, 0x200d // '$' '_' - + }; + range_pairs ranges; + + // For reg_exp_identifier_start. + { + const uchar32 *const IDs_address = unicode_property::ranges_address(unicode_property::bp_ID_Start); + const std::size_t IDs_number = unicode_property::number_of_ranges(unicode_property::bp_ID_Start); + ranges.load_from_memory(IDs_address, IDs_number); + } + ranges.load_from_memory(&additions[0], 2); + append_charclass(ranges); + + // For reg_exp_identifier_part. + ranges.clear(); + { + const uchar32 *const IDc_address = unicode_property::ranges_address(unicode_property::bp_ID_Continue); + const std::size_t IDc_number = unicode_property::number_of_ranges(unicode_property::bp_ID_Continue); + ranges.load_from_memory(IDc_address, IDc_number); + } + ranges.load_from_memory(&additions[0], 3); + append_charclass(ranges); + } + } + + bool is_identifier(const uchar32 ch, const bool part) const + { + const range_pair &rp = char_class_pos_[part ? 1 : 0]; + + return char_class_.is_included(rp.first, rp.second, ch); + } + +private: + + void append_charclass(const range_pairs &rps) + { + char_class_pos_.push_back(range_pair_helper(static_cast(char_class_.size()), static_cast(rps.size()))); + char_class_.append_newclass(rps); + } + + range_pairs char_class_; + range_pairs::array_type char_class_pos_; +}; +// identifier_charclass +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + +class re_character_class +{ +public: + + enum + { // 0 1 2 3 4 5 + newline, dotall, space, digit, word, icase_word, + // 6 + number_of_predefcls + }; + static const uint_l32 error_property = static_cast(-1); + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + typedef unicode_property::pstring pstring; +#endif + + re_character_class() + { + setup_predefinedclass(); + } + + re_character_class &operator=(const re_character_class &that) + { + if (this != &that) + { + this->char_class_ = that.char_class_; + this->char_class_pos_ = that.char_class_pos_; +#if !defined(SRELLDBG_NO_CCPOS) + this->char_class_el_ = that.char_class_el_; + this->char_class_pos_el_ = that.char_class_pos_el_; +#endif + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + re_character_class &operator=(re_character_class &&that) SRELL_NOEXCEPT + { + if (this != &that) + { + this->char_class_ = std::move(that.char_class_); + this->char_class_pos_ = std::move(that.char_class_pos_); +#if !defined(SRELLDBG_NO_CCPOS) + this->char_class_el_ = std::move(that.char_class_el_); + this->char_class_pos_el_ = std::move(that.char_class_pos_el_); +#endif + } + return *this; + } +#endif + + bool is_included(const uint_l32 class_number, const uchar32 c) const + { +// return char_class_.is_included(char_class_pos_[class_number], c); + const range_pair &rp = char_class_pos_[class_number]; + + return char_class_.is_included(rp.first, rp.second, c); + } + +#if !defined(SRELLDBG_NO_CCPOS) +// bool is_included(const uint_l32 pos, const uint_l32 len, const uchar32 &c) const + bool is_included(const uchar32 pos, const uchar32 len, const uchar32 c) const + { + return char_class_el_.is_included_el(pos, len, c); + } +#endif + + void setup_icase_word() + { + range_pair &icase_pos = char_class_pos_[icase_word]; + + if (icase_pos.second == char_class_pos_[word].second) + { + range_pairs icasewordclass(char_class_, icase_pos.first, icase_pos.second); + + icasewordclass.make_caseunfoldedcharset(); + // Includes 017f and 212a so that they and their case-folded + // characters 's' and 'k' will be excluded from the character + // set that /[\W]/i matches. + + char_class_.replace(icase_pos.first, icase_pos.second, icasewordclass); + + if (icase_pos.second < static_cast(icasewordclass.size())) + { + const uchar32 delta = static_cast(icasewordclass.size() - icase_pos.second); + + for (int i = number_of_predefcls; i < static_cast(char_class_pos_.size()); ++i) + char_class_pos_[i].first += delta; + } + icase_pos.second = static_cast(icasewordclass.size()); + } + } + + void clear() + { + char_class_pos_.resize(number_of_predefcls); + + uchar32 basesize = 0; + for (int i = 0; i < number_of_predefcls; ++i) + basesize += char_class_pos_[i].second; + + char_class_.resize(basesize); + +#if !defined(SRELLDBG_NO_CCPOS) + char_class_el_.clear(); + char_class_pos_el_.clear(); +#endif + } + + uint_l32 register_newclass(const range_pairs &rps) + { + for (range_pairs::size_type no = 0; no < char_class_pos_.size(); ++no) + { + const range_pair &rp = char_class_pos_[no]; + + if (char_class_.same(rp.first, rp.second, rps)) + return static_cast(no); + } + + append_charclass(rps); + return static_cast(char_class_pos_.size() - 1); + } + + range_pairs operator[](const uint_l32 no) const + { + const range_pair &ccpos = char_class_pos_[no]; + range_pairs rp(ccpos.second); + + for (uchar32 i = 0; i < ccpos.second; ++i) + rp[i] = char_class_[ccpos.first + i]; + + return rp; + } + +#if !defined(SRELLDBG_NO_CCPOS) + const range_pair &charclasspos(const uint_l32 no) // const + { + const range_pair &pos = char_class_pos_el_[no]; + + if (pos.second == 0) + finalise(no); + return pos; + } + + void finalise() + { + char_class_el_.clear(); + char_class_pos_el_.resize(char_class_pos_.size()); + std::memset(&char_class_pos_el_[0], 0, char_class_pos_el_.size() * sizeof (range_pairs::array_type::value_type)); + } + + void finalise(const uint_l32 no) + { + const range_pair &posinfo = char_class_pos_[no]; + range_pair &outpair = char_class_pos_el_[no]; + + outpair.first = static_cast(char_class_el_.size()); + outpair.second = char_class_el_.create_el(&char_class_[posinfo.first], posinfo.second); //arraysize; + + } + +#endif // #if !defined(SRELLDBG_NO_CCPOS) + + void optimise() + { + } + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + + uint_l32 lookup_property(const pstring &pname, const pstring &pvalue, const bool icase) + { + const uint_l32 property_number = static_cast(unicode_property::lookup_property(pname, pvalue)); + + if (property_number != unicode_property::error_property && property_number < unicode_property::number_of_properties) + { + const uint_l32 charclass_number = register_property_as_charclass(property_number, icase); + return charclass_number; + } + return error_property; + } + +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + + void swap(re_character_class &right) + { + if (this != &right) + { + this->char_class_.swap(right.char_class_); + this->char_class_pos_.swap(right.char_class_pos_); +#if !defined(SRELLDBG_NO_CCPOS) + this->char_class_el_.swap(right.char_class_el_); + this->char_class_pos_el_.swap(right.char_class_pos_el_); +#endif + } + } + +private: + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + + uint_l32 register_property_as_charclass(const uint_l32 property_number, const bool icase) + { + if (property_number == unicode_property::bp_Assigned) + { + // \p{Assigned} == \P{Cn} + return load_updata_and_register_as_charclass(unicode_property::gc_Cn, false, true); + } + return load_updata_and_register_as_charclass(property_number, icase, false); + } + + uint_l32 load_updata_and_register_as_charclass(const uint_l32 property_number, const bool /* icase */, const bool negation) + { + const uchar32 *const address = unicode_property::ranges_address(property_number); +// const std::size_t offset = unicode_property::ranges_offset(property_number); + const std::size_t number = unicode_property::number_of_ranges(property_number); + range_pairs newranges; + + newranges.load_from_memory(address, number); + + if (negation) + newranges.negation(); + + return register_newclass(newranges); + } + +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + + void append_charclass(const range_pairs &rps) + { + char_class_pos_.push_back(range_pair_helper(static_cast(char_class_.size()), static_cast(rps.size()))); + char_class_.append_newclass(rps); + } + +// The production CharacterClassEscape::s evaluates as follows: +// Return the set of characters containing the characters that are on the right-hand side of the WhiteSpace or LineTerminator productions. +// WhiteSpace:: +// 0009 000B 000C 0020 00A0 FEFF Zs +// LineTerminator:: +// 000A 000D 2028 2029 + + void setup_predefinedclass() + { +#if !defined(SRELL_NO_UNICODE_PROPERTY) + const uchar32 *const Zs_address = unicode_property::ranges_address(unicode_property::gc_Zs); +// const std::size_t Zs_offset = unicode_property::ranges_offset(unicode_property::gc_Zs); + const std::size_t Zs_number = unicode_property::number_of_ranges(unicode_property::gc_Zs); +#else + static const uchar32 Zs[] = { + 0x1680, 0x1680, 0x2000, 0x200a, // 0x2028, 0x2029, + 0x202f, 0x202f, 0x205f, 0x205f, 0x3000, 0x3000 + }; +#endif // defined(SRELL_NO_UNICODE_PROPERTY) + static const uchar32 allranges[] = { + // dotall. + 0x0000, 0x10ffff, + // newline. + 0x0a, 0x0a, 0x0d, 0x0d, // \n \r + // newline, space. + 0x2028, 0x2029, + // space. + 0x09, 0x0d, // \t \n \v \f \r + 0x20, 0x20, // ' ' + 0xa0, 0xa0, // + 0xfeff, 0xfeff, // + // digit, word. + 0x30, 0x39, // '0'-'9' + 0x41, 0x5a, 0x5f, 0x5f, 0x61, 0x7a // 'A'-'Z' '_' 'a'-'z' + }; + range_pairs ranges; + + // newline. + ranges.load_from_memory(&allranges[2], 3); + append_charclass(ranges); + + // dotall. + ranges.clear(); + ranges.load_from_memory(&allranges[0], 1); + append_charclass(ranges); + + // space. + ranges.clear(); + ranges.load_from_memory(&allranges[6], 5); +#if !defined(SRELL_NO_UNICODE_PROPERTY) + ranges.load_from_memory(Zs_address, Zs_number); +#else + ranges.load_from_memory(Zs, 5); +#endif + append_charclass(ranges); + + // digit. + ranges.clear(); + ranges.load_from_memory(&allranges[16], 1); + append_charclass(ranges); + + // word. + ranges.clear(); + ranges.load_from_memory(&allranges[16], 4); + append_charclass(ranges); + + // Reservation for icase_word. + append_charclass(ranges); + } + +private: + + range_pairs char_class_; + range_pairs::array_type char_class_pos_; + +#if !defined(SRELLDBG_NO_CCPOS) + range_pairs char_class_el_; + range_pairs::array_type char_class_pos_el_; + +#endif + +public: // For debug. + + void print_classes(const int) const; +}; +// re_character_class + + } // namespace regex_internal + +// ... "rei_char_class.hpp"] +// ["rei_groupname_mapper.hpp" ... + + namespace regex_internal + { + +#if !defined(SRELL_NO_NAMEDCAPTURE) + +template +class groupname_and_backrefnumber_mapper +{ +public: + + typedef simple_array gname_string; + typedef typename gname_string::size_type size_type; + static const numberT notfound = static_cast(-1); + + groupname_and_backrefnumber_mapper() + { + } + + groupname_and_backrefnumber_mapper(const groupname_and_backrefnumber_mapper &right) + : names_(right.names_), keysize_classno_(right.keysize_classno_) + { + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + groupname_and_backrefnumber_mapper(groupname_and_backrefnumber_mapper &&right) SRELL_NOEXCEPT + : names_(std::move(right.names_)), keysize_classno_(std::move(right.keysize_classno_)) + { + } +#endif + + groupname_and_backrefnumber_mapper &operator=(const groupname_and_backrefnumber_mapper &right) + { + if (this != &right) + { + names_ = right.names_; + keysize_classno_ = right.keysize_classno_; + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + groupname_and_backrefnumber_mapper &operator=(groupname_and_backrefnumber_mapper &&right) SRELL_NOEXCEPT + { + if (this != &right) + { + names_ = std::move(right.names_); + keysize_classno_ = std::move(right.keysize_classno_); + } + return *this; + } +#endif + + void clear() + { + names_.clear(); + keysize_classno_.clear(); + } + + numberT operator[](const gname_string &gname) const + { + numberT pos = 0; + for (std::size_t i = 0; i < static_cast(keysize_classno_.size()); i += 2) + { + const numberT keysize = keysize_classno_[i]; + + if (keysize == static_cast(gname.size()) && sameseq(pos, gname)) + return keysize_classno_[++i]; + + pos += keysize; + } + return notfound; + } + + gname_string operator[](const numberT indexno) const + { + numberT pos = 0; + for (std::size_t i = 0; i < static_cast(keysize_classno_.size()); ++i) + { + const numberT keysize = keysize_classno_[i]; + const numberT classno = keysize_classno_[++i]; + + if (classno == indexno) + return gname_string(names_, pos, keysize); + + pos += keysize; + } + return gname_string(); + } + + size_type size() const + { + return static_cast(keysize_classno_.size() >> 1); + } + + bool push_back(const gname_string &gname, const numberT class_number) + { + const numberT num = operator[](gname); + + if (num == notfound) + { + names_.append(gname); + keysize_classno_.append(1, static_cast(gname.size())); + keysize_classno_.append(1, class_number); + return true; + } + return false; // Already exists. + } + + void swap(groupname_and_backrefnumber_mapper &right) + { + this->names_.swap(right.names_); + keysize_classno_.swap(right.keysize_classno_); + } + +private: + + bool sameseq(size_type pos, const gname_string &gname) const + { + for (size_type i = 0; i < gname.size(); ++i, ++pos) + if (pos >= names_.size() || names_[pos] != gname[i]) + return false; + + return true; + } + + gname_string names_; + simple_array keysize_classno_; + +public: // For debug. + + void print_mappings(const int) const; +}; +// groupname_and_backrefnumber_mapper + +template +class groupname_mapper : public groupname_and_backrefnumber_mapper +{ +}; + +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + + } // namespace regex_internal + +// ... "rei_groupname_mapper.hpp"] +// ["rei_state.hpp" ... + + namespace regex_internal + { + +struct re_quantifier +{ + static const uint_l32 infinity = static_cast(~0); + + // atleast and atmost: for check_counter. + // offset and length: for charcter_class. + // (Special case 1) in roundbracket_open and roundbracket_pop atleast and atmost represent + // the minimum and maximum bracket numbers respectively inside the brackets itself. + // (Special case 2) in repeat_in_push and repeat_in_pop atleast and atmost represent the + // minimum and maximum bracket numbers respectively inside the repetition. + union + { + uint_l32 atleast; + // (Special case 3: v1) in lookaround_open represents the number of characters to be rewound. + // (Special case 3: v2) in lookaround_open represents: 0=lookaheads, 1=lookbehinds, + // 2=matchpointrewinder. + // (Special case 4) in NFA_states[0] represents the class number of the first character class. + uchar32 offset; + }; + union + { + uint_l32 atmost; + uchar32 length; + }; + + union + { + bool is_greedy; + uint_l32 padding_; + }; + + void reset(const uint_l32 len = 1) + { + atleast = atmost = len; + is_greedy = true; + } + + void set(const uint_l32 min, const uint_l32 max) + { + atleast = min; + atmost = max; + } + + void set(const uint_l32 min, const uint_l32 max, const bool greedy) + { + atleast = min; + atmost = max; + is_greedy = greedy; + } + + void setccpos(const uchar32 o, const uchar32 l) + { + offset = o; + length = l; + } + + bool is_valid() const + { + return atleast <= atmost && atmost > 0; + } + + void set_infinity() + { + atmost = infinity; + } + + bool is_infinity() const + { + return atmost == infinity; + } + + bool is_same() const + { + return atleast == atmost; + } + + bool is_default() const + { + return atleast == 1 && atmost == 1; + } + + bool is_asterisk() const + { + return atleast == 0 && atmost == infinity; + } + bool is_plus() const + { + return atleast == 1 && atmost == infinity; + } + bool is_asterisk_or_plus() const + { + return atleast <= 1 && atmost == infinity; + } + bool is_question_or_asterisk() const + { + return atleast == 0 && (atmost == 1 || atmost == infinity); + } + + bool has_simple_equivalence() const + { + return (atleast <= 1 && atmost <= 3) || (atleast == 2 && atmost <= 4) || (atleast == atmost && atmost <= 6); + } + + void multiply(const re_quantifier &q) + { + if (atleast != infinity) + { + if (q.atleast != infinity) + atleast *= q.atleast; + else + atleast = infinity; + } + + if (atmost != infinity) + { + if (q.atmost != infinity) + atmost *= q.atmost; + else + atmost = infinity; + } + } + + void add(const re_quantifier &q) + { + if (atleast != infinity) + { + if (q.atleast != infinity && (atleast + q.atleast) >= atleast) + atleast += q.atleast; + else + atleast = infinity; + } + + if (atmost != infinity) + { + if (q.atmost != infinity && (atmost + q.atmost) >= atmost) + atmost += q.atmost; + else + atmost = infinity; + } + } +}; +// re_quantifier + +struct re_state +{ + union + { + uchar32 character; // For character. + uint_l32 number; // For character_class, brackets, counter, repeat, backreference. + }; + + re_state_type type; + + union + { + std::ptrdiff_t next1; + re_state *next_state1; + // Points to the next state. + // (Special case 1) in lookaround_open points to the next of lookaround_close. + }; + union + { + std::ptrdiff_t next2; + re_state *next_state2; + // character and character_class: points to another possibility, non-backtracking. + // epsilon: points to another possibility, backtracking. + // save_and_reset_counter, roundbracket_open, and repeat_in_push: points to a + // restore state, backtracking. + // check_counter: complementary to next1 based on quantifier.is_greedy. + // (Special case 1) roundbracket_close, check_0_width_repeat, and backreference: + // points to the next state as an exit after 0 width match. + // (Special case 2) in NFA_states[0] holds the entry point for match_continuous/regex_match. + // (Special case 3) in lookaround_open points to the contents of brackets. + }; + + re_quantifier quantifier; // For check_counter, roundbrackets, repeasts, (?<=...) and (? number of chars to be rewound (for (?<=...) (? 0: lookahead, 1: lookbehind, 2: mprewinder. + // q.atmost: - + // q.greedy: - + // is_not/dont_push: not + + // st_bol, // 0x0f + // char/number: - + // next1/next2: - + // quantifiers: - + // is_not/dont_push: - + + // st_eol, // 0x10 + // char/number: - + // next1/next2: - + // quantifiers: - + // is_not/dont_push: - + + // st_boundary, // 0x11 + // char/number: - + // next1/next2: - + // quantifiers: - + // is_not/dont_push: not + + // st_success, // 0x12 + // char/number: - + // next1/next2: - + // quantifiers: - + // is_not/dont_push: - + + // st_move_nextpos, // 0x13 + // char/number: - + // next1/next2: - + // quantifiers: - + // is_not/dont_push: - + + void reset() + { + number = 0; + type = st_character; + next1 = 1; + next2 = 0; + is_not = false; + quantifier.reset(); + } + + bool is_character_or_class() const + { + return type == st_character || type == st_character_class; + } + + bool has_quantifier() const + { + // 1. character: size == 1 && type == character, + // 2. [...]: size == 1 && type == character_class, + // 3. (...): size == ? && type == roundbracket_open, + // 4. (?:...): size == ? && type == epsilon && character == ':', + // 5. backref: size == ? && type == backreference, + // -- assertions boundary -- + // 6. lookaround: size == ? && type == lookaround, + // 7. assertion: size == 0 && type == one of assertions (^, $, \b and \B). +#if !defined(SRELL_ENABLE_GT) + return type < st_zero_width_boundary; +#else + // 5.5. independent: size == ? && type == lookaround && character == '>', + return type < st_zero_width_boundary || (type == st_lookaround_open && character == meta_char::mc_gt); +#endif + } + + bool is_noncapturinggroup() const + { + return type == st_epsilon && character == meta_char::mc_colon; + } + + bool has_0widthchecker() const + { + return type == st_roundbracket_open || type == st_backreference; + } + + bool is_negcharclass() const + { + return type == st_character_class && is_not; + } + + bool is_branch() const + { + return type == st_epsilon && next2 != 0 && character == meta_char::mc_bar; // '|' + } +}; +// re_state + +template +//struct re_flags +struct re_compiler_state +{ +// bool i; +// bool m; +// bool s; + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + bool back; +#endif + + bool backref_used; + + simple_array atleast_widths_of_brackets; +#if !defined(SRELL_NO_NAMEDCAPTURE) + groupname_mapper unresolved_gnames; +#endif + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + identifier_charclass idchecker; +#endif + + void reset(const regex_constants::syntax_option_type & /* flags */) + { +// i = (flags & regex_constants::icase) != 0; // Case-insensitive. +// m = (flags & regex_constants::multiline) != 0; +// s = (flags & regex_constants::dotall) != 0; + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + back = false; +#endif + + backref_used = false; + atleast_widths_of_brackets.clear(); + +#if !defined(SRELL_NO_NAMEDCAPTURE) + unresolved_gnames.clear(); +#endif + +#if !defined(SRELL_NO_UNICODE_PROPERTY) +// idchecker.clear(); // Keeps data once created. +#endif + } + + void restore_from(const re_compiler_state &backup) + { +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + back = backup.back; +#endif + } +}; +// re_compiler_state + + } // namespace regex_internal + +// ... "rei_state.hpp"] +// ["rei_search_state.hpp" ... + +template +class sub_match /* : std::pair */; + + namespace regex_internal + { + +//template +struct re_state; + +template +struct re_search_state_core +{ + const re_state/* */ *in_NFA_states; + BidirectionalIterator in_string; +}; + +template +struct re_submatch_core +{ + BidirectionalIterator open_at; + BidirectionalIterator close_at; +}; + +template +struct re_submatch_type +{ + re_submatch_core core; + uint_l32 counter; +}; + +template +struct re_search_state_types +{ + typedef re_submatch_core submatch_core; + typedef re_submatch_type submatch_type; + typedef uint_l32 counter_type; + typedef BidirectionalIterator position_type; + + typedef std::vector submatch_array; + + typedef re_search_state_core search_core_state; + + typedef std::vector backtracking_array; + typedef std::vector capture_array; + typedef simple_array counter_array; + typedef std::vector repeat_array; +}; + +template +struct re_search_state_types +{ + typedef re_submatch_core submatch_core; + typedef re_submatch_type submatch_type; + typedef uint_l32 counter_type; + typedef const charT2 *position_type; + + typedef simple_array submatch_array; + + typedef re_search_state_core search_core_state; + + typedef simple_array backtracking_array; + typedef simple_array capture_array; + typedef simple_array repeat_array; + typedef simple_array counter_array; +}; +// re_search_state_types + +template +class re_search_state : public re_search_state_types +{ +private: + + typedef re_search_state_types base_type; + +public: + + typedef typename base_type::submatch_core submatchcore_type; + typedef typename base_type::submatch_type submatch_type; + typedef typename base_type::counter_type counter_type; + typedef typename base_type::position_type position_type; + + typedef typename base_type::submatch_array submatch_array; + + typedef typename base_type::search_core_state search_core_state; + + typedef typename base_type::backtracking_array backtracking_array; + typedef typename base_type::capture_array capture_array; + typedef typename base_type::counter_array counter_array; + typedef typename base_type::repeat_array repeat_array; + + typedef typename backtracking_array::size_type btstack_size_type; + +public: + + struct bottom_state + { + btstack_size_type btstack_size; + typename capture_array::size_type capturestack_size; + typename counter_array::size_type counterstack_size; + typename repeat_array::size_type repeatstack_size; + + bottom_state( + const btstack_size_type bt, + const typename capture_array::size_type h, + const typename counter_array::size_type c, + const typename repeat_array::size_type r) + : btstack_size(bt) + , capturestack_size(h) + , counterstack_size(c) + , repeatstack_size(r) + { + } + }; + +public: + + search_core_state nth; + +#if !defined(SRELL_NO_LIMIT_COUNTER) + std::size_t failure_counter; +#endif + + BidirectionalIterator srchend; + BidirectionalIterator lblim; + + BidirectionalIterator nextpos; + + backtracking_array bt_stack; + + capture_array capture_stack; + counter_array counter_stack; + repeat_array repeat_stack; + + submatch_array bracket; + counter_array counter; + repeat_array repeat; + + btstack_size_type btstack_size; + + BidirectionalIterator srchbegin; + +public: + + void init + ( + const BidirectionalIterator begin, + const BidirectionalIterator end, + const BidirectionalIterator lookbehindlimit, + const regex_constants::match_flag_type flags + ) + { + lblim = lookbehindlimit; + nextpos = srchbegin = begin; + srchend = end; + flags_ = flags; + } + + void set_entrypoint(const re_state *const entry) + { + entry_state_ = entry; + } + + void init_for_automaton + ( + uint_l32 num_of_submatches, + const uint_l32 num_of_counters, + const uint_l32 num_of_repeats + ) + { + + bracket.resize(num_of_submatches); + counter.resize(num_of_counters); + repeat.resize(num_of_repeats); + + nth.in_string = (flags_ & regex_constants::match_continuous) ? srchbegin : srchend; + + while (num_of_submatches > 1) + { + submatch_type &br = bracket[--num_of_submatches]; + + br.core.open_at = br.core.close_at = this->srchend; + br.counter = 0; + // 15.10.2.9; AtomEscape: + // If the regular expression has n or more capturing parentheses + // but the nth one is undefined because it hasn't captured anything, + // then the backreference always succeeds. + + // C.f., table 27 and 28 on TR1, table 142 and 143 on C++11. + } + + clear_stacks(); + } + +#if defined(SRELL_NO_LIMIT_COUNTER) + void reset(/* const BidirectionalIterator start */) +#else + void reset(/* const BidirectionalIterator start, */ const std::size_t limit) +#endif + { + nth.in_NFA_states = this->entry_state_; + + bracket[0].core.open_at = nth.in_string; + +#if !defined(SRELL_NO_LIMIT_COUNTER) + failure_counter = limit; +#endif + } + + bool is_at_lookbehindlimit() const + { + return nth.in_string == this->lblim; + } + + bool is_at_srchend() const + { + return nth.in_string == this->srchend; + } + + bool is_null() const + { + return nth.in_string == bracket[0].core.open_at; + } + +// regex_constants::match_flag_type flags() const +// { +// return this->flags_; +// } + + bool match_not_bol_flag() const + { + if (this->flags_ & regex_constants::match_not_bol) + return true; + return false; + } + + bool match_not_eol_flag() const + { + if (this->flags_ & regex_constants::match_not_eol) + return true; + return false; + } + + bool match_not_bow_flag() const + { + if (this->flags_ & regex_constants::match_not_bow) + return true; + return false; + } + + bool match_not_eow_flag() const + { + if (this->flags_ & regex_constants::match_not_eow) + return true; + return false; + } + + bool match_prev_avail_flag() const + { + if (this->flags_ & regex_constants::match_prev_avail) + return true; + return false; + } + + bool match_not_null_flag() const + { + if (this->flags_ & regex_constants::match_not_null) + return true; + return false; + } + + bool match_continuous_flag() const + { + if (this->flags_ & regex_constants::match_continuous) + return true; + return false; + } + + bool match_match_flag() const + { + if (this->flags_ & regex_constants::match_match_) + return true; + return false; + } + + bool set_bracket0(const BidirectionalIterator begin, const BidirectionalIterator end) + { + nth.in_string = begin; + nextpos = end; + return true; + } + + void clear_stacks() + { + btstack_size = 0; + bt_stack.clear(); + capture_stack.clear(); + repeat_stack.clear(); + counter_stack.clear(); + } + + btstack_size_type size() const // For debug. + { + return bt_stack.size(); + } + + bool is_empty() const // For debug. + { + if (btstack_size == 0 + && bt_stack.size() == 0 + && capture_stack.size() == 0 + && repeat_stack.size() == 0 + && counter_stack.size() == 0) + return true; + + return false; + } + +private: + + /* const */regex_constants::match_flag_type flags_; + const re_state/* */ * /* const */entry_state_; +}; +// re_search_state + + } // namespace regex_internal + +// ... "rei_search_state.hpp"] +// ["rei_bmh.hpp" ... + + namespace regex_internal + { + +#if !defined(SRELLDBG_NO_BMH) + +template +class re_bmh +{ +public: + + re_bmh() + { + } + + re_bmh(const re_bmh &right) + { + operator=(right); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + re_bmh(re_bmh &&right) SRELL_NOEXCEPT + { + operator=(std::move(right)); + } +#endif + + re_bmh &operator=(const re_bmh &that) + { + if (this != &that) + { + this->u32string_ = that.u32string_; + + this->bmtable_ = that.bmtable_; + this->repseq_ = that.repseq_; + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + re_bmh &operator=(re_bmh &&that) SRELL_NOEXCEPT + { + if (this != &that) + { + this->u32string_ = std::move(that.u32string_); + + this->bmtable_ = std::move(that.bmtable_); + this->repseq_ = std::move(that.repseq_); + } + return *this; + } +#endif + + void clear() + { + u32string_.clear(); + + bmtable_.clear(); + repseq_.clear(); + } + + void setup(const simple_array &u32s, const bool icase) + { + u32string_ = u32s; + setup_(); + + if (!icase) + setup_for_casesensitive(); + else + setup_for_icase(); + } + + template + bool do_casesensitivesearch(re_search_state &sstate, const std::random_access_iterator_tag) const + { + RandomAccessIterator begin = sstate.srchbegin; + const RandomAccessIterator end = sstate.srchend; + std::size_t offset = static_cast(repseq_.size() - 1); + const charT *const relastchar = &repseq_[offset]; + + for (; static_cast(end - begin) > offset;) + { + begin += offset; + + if (*begin == *relastchar) + { + const charT *re = relastchar; + RandomAccessIterator tail = begin; + + for (; *--re == *--tail;) + { + if (re == repseq_.data()) + return sstate.set_bracket0(tail, ++begin); + } + } + offset = bmtable_[*begin & 0xff]; + } + return false; + } + + template + bool do_casesensitivesearch(re_search_state &sstate, const std::bidirectional_iterator_tag) const + { + BidirectionalIterator begin = sstate.srchbegin; + const BidirectionalIterator end = sstate.srchend; + std::size_t offset = static_cast(repseq_.size() - 1); + const charT *const relastchar = &repseq_[offset]; + + for (;;) + { + for (; offset; --offset, ++begin) + if (begin == end) + return false; + + if (*begin == *relastchar) + { + const charT *re = relastchar; + BidirectionalIterator tail = begin; + + for (; *--re == *--tail;) + { + if (re == repseq_.data()) + return sstate.set_bracket0(tail, ++begin); + } + } + offset = bmtable_[*begin & 0xff]; + } + } + + template + bool do_icasesearch(re_search_state &sstate, const std::random_access_iterator_tag) const + { + const RandomAccessIterator begin = sstate.srchbegin; + const RandomAccessIterator end = sstate.srchend; + std::size_t offset = bmtable_[256]; + const uchar32 entrychar = u32string_[u32string_.size() - 1]; + const uchar32 *const re2ndlastchar = &u32string_[u32string_.size() - 2]; + RandomAccessIterator curpos = begin; + + for (; static_cast(end - curpos) > offset;) + { + curpos += offset; + + for (; utf_traits::is_trailing(*curpos);) + if (++curpos == end) + return false; + + const uchar32 txtlastchar = utf_traits::codepoint(curpos, end); + + if (txtlastchar == entrychar || unicode_case_folding::do_casefolding(txtlastchar) == entrychar) + { + const uchar32 *re = re2ndlastchar; + RandomAccessIterator tail = curpos; + +// for (; *--re == unicode_case_folding::do_casefolding(utf_traits::dec_codepoint(tail, begin));) + for (; *re == unicode_case_folding::do_casefolding(utf_traits::dec_codepoint(tail, begin)); --re) + { + if (re == u32string_.data()) + { + utf_traits::codepoint_inc(curpos, end); + return sstate.set_bracket0(tail, curpos); + } + if (tail == begin) + break; + } + } + offset = bmtable_[txtlastchar & 0xff]; + } + return false; + } + + template + bool do_icasesearch(re_search_state &sstate, const std::bidirectional_iterator_tag) const + { + const BidirectionalIterator begin = sstate.srchbegin; + const BidirectionalIterator end = sstate.srchend; + + if (begin != end) + { + std::size_t offset = bmtable_[256]; //static_cast(u32string_.size() - 1); + const uchar32 entrychar = u32string_[offset]; + const uchar32 *const re2ndlastchar = &u32string_[offset - 1]; + BidirectionalIterator curpos = begin; + + for (;;) + { + for (;;) + { + if (++curpos == end) + return false; + if (!utf_traits::is_trailing(*curpos)) + if (--offset == 0) + break; + } +// const uchar32 txtlastchar = unicode_case_folding::do_casefolding(utf_traits::codepoint(curpos, end)); + const uchar32 txtlastchar = utf_traits::codepoint(curpos, end); + +// if (txtlastchar == *re2ndlastchar) +// if (txtlastchar == *re2ndlastchar || unicode_case_folding::do_casefolding(txtlastchar) == *re2ndlastchar) + if (txtlastchar == entrychar || unicode_case_folding::do_casefolding(txtlastchar) == entrychar) + { + const uchar32 *re = re2ndlastchar; + BidirectionalIterator tail = curpos; + + for (; *re == unicode_case_folding::do_casefolding(utf_traits::dec_codepoint(tail, begin)); --re) + { + if (re == u32string_.data()) + { + utf_traits::codepoint_inc(curpos, end); + return sstate.set_bracket0(tail, curpos); + } + if (tail == begin) + break; + } + } + offset = bmtable_[txtlastchar & 0xff]; + } + } + return false; + } + +private: + + void setup_() + { + bmtable_.resize(257); + } + + void setup_for_casesensitive() + { + charT mbstr[utf_traits::maxseqlen]; + const std::size_t u32str_lastcharpos_ = static_cast(u32string_.size() - 1); + + repseq_.clear(); + + for (std::size_t i = 0; i <= u32str_lastcharpos_; ++i) + { + const uchar32 seqlen = utf_traits::to_codeunits(mbstr, u32string_[i]); + + for (uchar32 j = 0; j < seqlen; ++j) + repseq_.push_back(mbstr[j]); + } + + for (std::size_t i = 0; i < 256; ++i) + bmtable_[i] = static_cast(repseq_.size()); + + const std::size_t repseq_lastcharpos_ = static_cast(repseq_.size() - 1); + + for (std::size_t i = 0; i < repseq_lastcharpos_; ++i) + bmtable_[repseq_[i] & 0xff] = repseq_lastcharpos_ - i; + } + + void setup_for_icase() + { + charT mbstr[utf_traits::maxseqlen]; + uchar32 u32table[unicode_case_folding::rev_maxset]; + const std::size_t u32str_lastcharpos = static_cast(u32string_.size() - 1); + simple_array minlen(u32string_.size()); + std::size_t cu_repseq_lastcharpos = 0; + + for (std::size_t i = 0; i <= u32str_lastcharpos; ++i) + { + const uchar32 setnum = unicode_case_folding::casefoldedcharset(u32table, u32string_[i]); + uchar32 u32c = u32table[0]; + + for (uchar32 j = 1; j < setnum; ++j) + if (u32c > u32table[j]) + u32c = u32table[j]; + + if (i < u32str_lastcharpos) + cu_repseq_lastcharpos += minlen[i] = utf_traits::to_codeunits(mbstr, u32c); + } + + ++cu_repseq_lastcharpos; + + for (std::size_t i = 0; i < 256; ++i) + bmtable_[i] = cu_repseq_lastcharpos; + + bmtable_[256] = --cu_repseq_lastcharpos; + + for (std::size_t i = 0; i < u32str_lastcharpos; ++i) + { + const uchar32 setnum = unicode_case_folding::casefoldedcharset(u32table, u32string_[i]); + + for (uchar32 j = 0; j < setnum; ++j) + bmtable_[u32table[j] & 0xff] = cu_repseq_lastcharpos; + + cu_repseq_lastcharpos -= minlen[i]; + } + } + +public: // For debug. + + void print_table() const; + void print_seq() const; + +private: + + simple_array u32string_; +// std::size_t bmtable_[256]; + simple_array bmtable_; + simple_array repseq_; +}; +// re_bmh + +#endif // !defined(SRELLDBG_NO_BMH) + } // namespace regex_internal + +// ... "rei_bmh.hpp"] +// ["rei_compiler.hpp" ... + + namespace regex_internal + { + +template +struct re_object_core +{ +protected: + + typedef re_state/**/ state_type; + typedef simple_array state_array; + + state_array NFA_states; + re_character_class character_class; + +#if !defined(SRELLDBG_NO_1STCHRCLS) + #if !defined(SRELLDBG_NO_BITSET) + bitset firstchar_class_bs; + #else + range_pairs firstchar_class; + #endif +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) +public: + + std::size_t limit_counter; + +protected: +#endif + + typedef typename traits::utf_traits utf_traits; + + uint_l32 number_of_brackets; + uint_l32 number_of_counters; + uint_l32 number_of_repeats; + regex_constants::syntax_option_type soflags; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + groupname_mapper namedcaptures; + typedef typename groupname_mapper::gname_string gname_string; +#endif + +#if !defined(SRELLDBG_NO_BMH) + re_bmh *bmdata; +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) +private: + + static const std::size_t lcounter_defnum_ = 16777216; + +#endif + +protected: + + re_object_core() +#if !defined(SRELL_NO_LIMIT_COUNTER) + : limit_counter(lcounter_defnum_) + #if !defined(SRELLDBG_NO_BMH) + , bmdata(NULL) + #endif +#elif !defined(SRELLDBG_NO_BMH) + : bmdata(NULL) +#endif + { + } + + re_object_core(const re_object_core &right) +#if !defined(SRELLDBG_NO_BMH) + : bmdata(NULL) +#endif + { + operator=(right); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + re_object_core(re_object_core &&right) SRELL_NOEXCEPT +#if !defined(SRELLDBG_NO_BMH) + : bmdata(NULL) +#endif + { + operator=(std::move(right)); + } +#endif + +#if !defined(SRELLDBG_NO_BMH) + ~re_object_core() + { + if (bmdata) + delete bmdata; + } +#endif + + void reset(const regex_constants::syntax_option_type flags) + { + NFA_states.clear(); + character_class.clear(); + +#if !defined(SRELLDBG_NO_1STCHRCLS) + #if !defined(SRELLDBG_NO_BITSET) + firstchar_class_bs.reset(); + #else + firstchar_class.clear(); + #endif +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) + limit_counter = lcounter_defnum_; +#endif + + number_of_brackets = 1; + number_of_counters = 0; + number_of_repeats = 0; + soflags = flags; // regex_constants::ECMAScript; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + namedcaptures.clear(); +#endif + +#if !defined(SRELLDBG_NO_BMH) +// bmdata->clear(); + if (bmdata) + delete bmdata; + bmdata = NULL; +#endif + } + + re_object_core &operator=(const re_object_core &that) + { + if (this != &that) + { + this->NFA_states = that.NFA_states; + this->character_class = that.character_class; + +#if !defined(SRELLDBG_NO_1STCHRCLS) + #if !defined(SRELLDBG_NO_BITSET) + this->firstchar_class_bs = that.firstchar_class_bs; + #else + this->firstchar_class = that.firstchar_class; + #endif +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) + this->limit_counter = that.limit_counter; +#endif + +// this->utf_traits_inst = that.utf_traits_inst; + + this->number_of_brackets = that.number_of_brackets; + this->number_of_counters = that.number_of_counters; + this->number_of_repeats = that.number_of_repeats; + this->soflags = that.soflags; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + this->namedcaptures = that.namedcaptures; +#endif + +#if !defined(SRELLDBG_NO_BMH) + if (that.bmdata) + { + if (this->bmdata) + *this->bmdata = *that.bmdata; + else + this->bmdata = new re_bmh(*that.bmdata); + } + else if (this->bmdata) + { + delete this->bmdata; + this->bmdata = NULL; + } +#endif + + if (that.NFA_states.size()) + repair_nextstates(&that.NFA_states[0]); + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + re_object_core &operator=(re_object_core &&that) SRELL_NOEXCEPT + { + if (this != &that) + { + this->NFA_states = std::move(that.NFA_states); + this->character_class = std::move(that.character_class); + +#if !defined(SRELLDBG_NO_1STCHRCLS) + #if !defined(SRELLDBG_NO_BITSET) + this->firstchar_class_bs = std::move(that.firstchar_class_bs); + #else + this->firstchar_class = std::move(that.firstchar_class); + #endif +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) + this->limit_counter = that.limit_counter; +#endif + + this->number_of_brackets = that.number_of_brackets; + this->number_of_counters = that.number_of_counters; + this->number_of_repeats = that.number_of_repeats; + this->soflags = that.soflags; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + this->namedcaptures = std::move(that.namedcaptures); +#endif + +#if !defined(SRELLDBG_NO_BMH) + if (this->bmdata) + delete this->bmdata; + this->bmdata = that.bmdata; + that.bmdata = NULL; +#endif + } + return *this; + } +#endif // defined(SRELL_CPP11_MOVE_ENABLED) + + void swap(re_object_core &right) + { + if (this != &right) + { + this->NFA_states.swap(right.NFA_states); + this->character_class.swap(right.character_class); + +#if !defined(SRELLDBG_NO_1STCHRCLS) + #if !defined(SRELLDBG_NO_BITSET) + this->firstchar_class_bs.swap(right.firstchar_class_bs); + #else + this->firstchar_class.swap(right.firstchar_class); + #endif +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) + { + const std::size_t tmp_limit_counter = this->limit_counter; + this->limit_counter = right.limit_counter; + right.limit_counter = tmp_limit_counter; + } +#endif +// this->utf_traits_inst.swap(right.utf_traits_inst); + + { + const uint_l32 tmp_numof_brackets = this->number_of_brackets; + this->number_of_brackets = right.number_of_brackets; + right.number_of_brackets = tmp_numof_brackets; + } + { + const uint_l32 tmp_numof_counters = this->number_of_counters; + this->number_of_counters = right.number_of_counters; + right.number_of_counters = tmp_numof_counters; + } + { + const uint_l32 tmp_numof_repeats = this->number_of_repeats; + this->number_of_repeats = right.number_of_repeats; + right.number_of_repeats = tmp_numof_repeats; + } + { + const regex_constants::syntax_option_type tmp_soflags = this->soflags; + this->soflags = right.soflags; + right.soflags = tmp_soflags; + } + +#if !defined(SRELL_NO_NAMEDCAPTURE) + this->namedcaptures.swap(right.namedcaptures); +#endif + +#if !defined(SRELLDBG_NO_BMH) + { + re_bmh *const tmp_bmdata = this->bmdata; + this->bmdata = right.bmdata; + right.bmdata = tmp_bmdata; + } +#endif + } + } + + void throw_error(const regex_constants::error_type &e) + { +// reset(); + NFA_states.clear(); +#if !defined(SRELLDBG_NO_BMH) + if (bmdata) + delete bmdata; + bmdata = NULL; +#endif + throw regex_error(e); + } + +private: + + void repair_nextstates(const state_type *const oldbase) + { + state_type *const newbase = &this->NFA_states[0]; + + for (typename state_array::size_type i = 0; i < this->NFA_states.size(); ++i) + { + state_type &state = this->NFA_states[i]; + + if (state.next_state1) + state.next_state1 = state.next_state1 - oldbase + newbase; + + if (state.next_state2) + state.next_state2 = state.next_state2 - oldbase + newbase; + } + } +}; +// re_object_core + +template +class re_compiler : public re_object_core +{ +protected: + + template + bool compile(ForwardIterator begin, const ForwardIterator end, const regex_constants::syntax_option_type flags /* = regex_constants::ECMAScript */) + { + simple_array u32; + + while (begin != end) + { + const uchar32 u32c = utf_traits::codepoint_inc(begin, end); + if (u32c > constants::unicode_max_codepoint) + this->throw_error(regex_constants::error_utf8); + u32.push_back(u32c); + } + + return compile_core(u32.data(), u32.data() + u32.size(), flags); + } + + bool is_icase() const + { +#if !defined(SRELL_NO_ICASE) + if (this->soflags & regex_constants::icase) + return true; +#endif + return false; + } + bool is_ricase() const + { +#if !defined(SRELL_NO_ICASE) + return /* this->NFA_states.size() && */ this->NFA_states[0].icase == true; +#else + return false; +#endif + } + + bool is_multiline() const + { + if (this->soflags & regex_constants::multiline) + return true; + return false; + } + + bool is_dotall() const + { + return (this->soflags & regex_constants::dotall) ? true : false; + } + + bool is_optimize() const + { + return (this->soflags & regex_constants::optimize) ? true : false; + } + +private: + + typedef re_object_core base_type; + typedef typename base_type::utf_traits utf_traits; + typedef typename base_type::state_type state_type; + typedef typename base_type::state_array state_array; +#if !defined(SRELL_NO_NAMEDCAPTURE) + typedef typename base_type::gname_string gname_string; +#endif +#if !defined(SRELL_NO_UNICODE_PROPERTY) + typedef typename re_character_class::pstring pstring; +#endif + typedef typename state_array::size_type state_size_type; + + bool compile_core(const uchar32 *begin, const uchar32 *const end, const regex_constants::syntax_option_type flags) + { + re_quantifier piececharlen; + re_compiler_state cstate; + state_type atom; + + this->reset(flags); +// this->soflags = flags; + cstate.reset(flags); + + atom.reset(); + atom.type = st_epsilon; + atom.next2 = 1; + this->NFA_states.push_back(atom); + + if (!make_nfa_states(this->NFA_states, piececharlen, begin, end, cstate)) + { + return false; + } + + if (begin != end) + this->throw_error(regex_constants::error_paren); // ')'s are too many. + + if (!check_backreferences(cstate)) + this->throw_error(regex_constants::error_backref); + +#if !defined(SRELL_NO_ICASE) + if (this->is_icase()) + this->NFA_states[0].icase = check_if_really_needs_icase_search(); +#endif + +#if !defined(SRELLDBG_NO_BMH) + setup_bmhdata(); +#endif + + atom.type = st_success; + atom.next1 = 0; + atom.next2 = 0; + this->NFA_states.push_back(atom); + + optimise(); + relativejump_to_absolutejump(); + + return true; + } + + bool make_nfa_states(state_array &piece, re_quantifier &piececharlen, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + typename state_array::size_type prevbranch_end = 0; + state_type atom; + state_array branch; + re_quantifier branchsize; + + piececharlen.reset(0); + + for (;;) + { + branch.clear(); + + if (!make_branch(branch, branchsize, curpos, end, cstate)) + return false; + + // For piececharlen.atleast, 0 as the initial value and 0 as an + // actual value must be distinguished. + if (piececharlen.atmost == 0 || piececharlen.atleast > branchsize.atleast) + piececharlen.atleast = branchsize.atleast; + + if (piececharlen.atmost < branchsize.atmost) + piececharlen.atmost = branchsize.atmost; + + if (curpos != end && *curpos == meta_char::mc_bar) + { + atom.reset(); + atom.character = meta_char::mc_bar; + atom.type = st_epsilon; + atom.next2 = static_cast(branch.size()) + 2; + branch.insert(0, atom); + } + + if (prevbranch_end) + piece[prevbranch_end].next1 = static_cast(branch.size()) + 1; + + piece += branch; + + // end or ')' + if (curpos == end || *curpos == meta_char::mc_rbracl) + break; + + // *curpos == '|' + + prevbranch_end = piece.size(); + atom.reset(); + atom.type = st_epsilon; + piece.push_back(atom); + + ++curpos; + } + return true; + } + + bool make_branch(state_array &branch, re_quantifier &branchsize, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + state_array piece; + state_array piece_with_quantifier; + re_quantifier quantifier; + + branchsize.reset(0); + + for (;;) + { + re_quantifier piececharlen; + + if (curpos == end) + return true; + + piece.clear(); + piece_with_quantifier.clear(); + + switch (*curpos) + { +// case char_ctrl::cc_nul: // '\0': + case meta_char::mc_bar: // '|': + case meta_char::mc_rbracl: // ')': + return true; + + default: + if (!get_atom(piece, piececharlen, curpos, end, cstate)) + return false; + } + + if (piece.size()) + { + const state_type &firstatom = piece[0]; + + quantifier.reset(); // quantifier.atleast = quantifier.atmost = 1; + + if (firstatom.has_quantifier()) + { + if (curpos != end && !get_quantifier(quantifier, curpos, end)) + return false; + } + + if (piece.size() == 2 && firstatom.is_noncapturinggroup() && piece[1].is_noncapturinggroup()) + { + // (?:) alone or followed by a quantifier. +// piece_with_quantifier += piece; + ; // Do nothing. + } + else + combine_piece_with_quantifier(piece_with_quantifier, piece, quantifier, piececharlen); + +#if 01 + piececharlen.multiply(quantifier); + branchsize.add(piececharlen); +#else + branchsize.atleast += piececharlen.atleast * quantifier.atleast; + if (!branchsize.is_infinity()) + { + if (piececharlen.is_infinity() || quantifier.is_infinity()) + branchsize.set_infinity(); + else + branchsize.atmost += piececharlen.atmost * quantifier.atmost; + } +#endif + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + + if (!cstate.back) + branch += piece_with_quantifier; + else + branch.insert(0, piece_with_quantifier); +#else + branch += piece_with_quantifier; +#endif + } + } + } + + bool get_atom(state_array &piece, re_quantifier &atomsize, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + state_type atom; + + atom.reset(); + atom.character = *curpos++; + + switch (atom.character) + { + case meta_char::mc_rbraop: // '(': + return get_piece_in_roundbrackets(piece, atomsize, curpos, end, cstate); + + case meta_char::mc_sbraop: // '[': + if (!register_character_class(atom, curpos, end, cstate)) + return false; + + break; + + case meta_char::mc_escape: // '\\': + if (!translate_atom_escape(atom, curpos, end, cstate)) + return false; + + break; + + case meta_char::mc_period: // '.': + atom.type = st_character_class; +#if !defined(SRELL_NO_SINGLELINE) + if (this->is_dotall()) + { + atom.number = static_cast(re_character_class::dotall); + } + else +#endif + { +// atom.number = static_cast(re_character_class::newline); + range_pairs nlclass = this->character_class[static_cast(re_character_class::newline)]; + + nlclass.negation(); + atom.number = this->character_class.register_newclass(nlclass); + } + break; + + case meta_char::mc_caret: // '^': + atom.type = st_bol; + atom.quantifier.reset(0); +// if (current_flags.m) + if (is_multiline()) + atom.multiline = true; + break; + + case meta_char::mc_dollar: // '$': + atom.type = st_eol; + atom.quantifier.reset(0); +// if (current_flags.m) + if (is_multiline()) + atom.multiline = true; + break; + + case meta_char::mc_astrsk: // '*': + case meta_char::mc_plus: // '+': + case meta_char::mc_query: // '?': + case meta_char::mc_cbraop: // '{' + this->throw_error(regex_constants::error_badrepeat); + + default:; + } + + if (atom.type == st_character) + { + if (this->is_icase()) + atom.character = unicode_case_folding::do_casefolding(atom.character); + } + + piece.push_back(atom); + atomsize = atom.quantifier; + + return true; + } + + // '('. + + bool get_piece_in_roundbrackets(state_array &piece, re_quantifier &piececharlen, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + const re_compiler_state original_cstate(cstate); + state_type atom; + + if (curpos == end) + this->throw_error(regex_constants::error_paren); + + atom.reset(); + atom.type = st_roundbracket_open; + + if (*curpos == meta_char::mc_query) // '?' + { + if (!extended_roundbrackets(piece, atom, ++curpos, end, cstate)) + return false; + } + + if (atom.type == st_roundbracket_open) + { + push_bracket_open(piece, atom); + } + +// if (curpos == end) +// this->throw_error(regex_constants::error_paren); + + if (!make_nfa_states(piece, piececharlen, curpos, end, cstate)) + return false; + + // end or ')'? + if (curpos == end) + this->throw_error(regex_constants::error_paren); + + ++curpos; + + cstate.restore_from(original_cstate); + + switch (atom.type) + { + case st_epsilon: + +// if (piece.size() <= 2) // ':' or ':' + one. + if (piece.size() == 2) // ':' + something. + { + piece.erase(0); + return true; + } + + piece[0].quantifier.atmost = this->number_of_brackets - 1; + break; + +// case st_lookaround_pop: + case st_lookaround_open: + { + state_type &firstatom = piece[0]; + +#if defined(SRELL_FIXEDWIDTHLOOKBEHIND) +// if (firstatom.reverse) + if (firstatom.quantifier.atleast) // > 0 means lookbehind. + { + if (!piececharlen.is_same() || piececharlen.is_infinity()) + this->throw_error(regex_constants::error_lookbehind); + + firstatom.quantifier = piececharlen; + } +#endif + +#if defined(SRELL_ENABLE_GT) + if (firstatom.character != meta_char::mc_gt) +#endif + piececharlen.reset(0); + + firstatom.next1 = static_cast(piece.size()) + 1; + + atom.type = st_lookaround_close; + atom.next1 = 0; + atom.next2 = 0; + } + break; + + default: + set_bracket_close(piece, atom, piececharlen, cstate); + } + + piece.push_back(atom); + return true; + } + + bool extended_roundbrackets(state_array &piece, state_type &atom, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + bool lookbehind = false; +#endif + + if (curpos == end) + this->throw_error(regex_constants::error_paren); + + atom.character = *curpos; + + if (atom.character == meta_char::mc_lt) // '<' + { +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + lookbehind = true; +#endif + if (++curpos == end) + this->throw_error(regex_constants::error_paren); + + atom.character = *curpos; + + if (atom.character != meta_char::mc_eq && atom.character != meta_char::mc_exclam) + { +#if !defined(SRELL_NO_NAMEDCAPTURE) + return parse_groupname(curpos, end, cstate); +#else + this->throw_error(regex_constants::error_paren); +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + } + } + else + atom.quantifier.atleast = 0; + // Sets atleast to 0 for other assertions than lookbehinds. The automaton + // checks atleast to know whether lookbehinds or other assertions. + + switch (atom.character) + { + case meta_char::mc_colon: + atom.type = st_epsilon; + atom.quantifier.atleast = this->number_of_brackets; + break; + + case meta_char::mc_exclam: // '!': + atom.is_not = true; + //@fallthrough@ + + case meta_char::mc_eq: // '=': +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + cstate.back = lookbehind; +#else +// atom.reverse = lookbehind; +#endif + +#if defined(SRELL_ENABLE_GT) + case meta_char::mc_gt: +#endif + atom.type = st_lookaround_open; + atom.next2 = 1; + break; + + default: + this->throw_error(regex_constants::error_paren); + } + + ++curpos; + piece.push_back(atom); + return true; + } + + void push_bracket_open(state_array &piece, state_type &atom) + { + atom.number = this->number_of_brackets; + atom.next1 = 2; + atom.next2 = 1; + piece.push_back(atom); + ++this->number_of_brackets; + + atom.type = st_roundbracket_pop; + atom.next1 = 0; + atom.next2 = 0; + piece.push_back(atom); + } + + void set_bracket_close(state_array &piece, state_type &atom, const re_quantifier &piececharlen, re_compiler_state &cstate) + { +// uint_l32 max_bracketno = atom.number; + + atom.type = st_roundbracket_close; + atom.next1 = 1; + atom.next2 = 1; +#if 0 + for (typename state_array::size_type i = 0; i < piece.size(); ++i) + { + const state_type &state = piece[i]; + + if (state.type == st_roundbracket_open && max_bracketno < state.number) + max_bracketno = state.number; + } +#endif + + re_quantifier &rb_open = piece[0].quantifier; + re_quantifier &rb_pop = piece[1].quantifier; + + rb_open.atleast = rb_pop.atleast = atom.number + 1; + rb_open.atmost = rb_pop.atmost = this->number_of_brackets - 1; // max_bracketno; + + if (cstate.atleast_widths_of_brackets.size() < atom.number) + cstate.atleast_widths_of_brackets.resize(atom.number, 0); + + cstate.atleast_widths_of_brackets[atom.number - 1] = piececharlen.atleast; + } + + void combine_piece_with_quantifier(state_array &piece_with_quantifier, state_array &piece, const re_quantifier &quantifier, const re_quantifier &piececharlen) + { + state_type &firstatom = piece[0]; +// const bool firstpiece_is_roundbracket_open = (firstatom.type == st_roundbracket_open); + const bool piece_has_0widthchecker = firstatom.has_0widthchecker(); + const bool piece_is_noncapturinggroup_contaning_capturinggroup = firstatom.is_noncapturinggroup() && firstatom.quantifier.is_valid(); + state_type atom; + + if (quantifier.atmost == 0) + return; + + atom.reset(); + atom.quantifier = quantifier; + if (firstatom.is_character_or_class()) + atom.character = meta_char::mc_astrsk; // For nextpos_optimisation1_3(). + + if (quantifier.atmost == 1) + { + if (quantifier.atleast == 0) + { + atom.type = st_epsilon; + atom.next2 = static_cast(piece.size()) + 1; + + if (!quantifier.is_greedy) + { + atom.next1 = atom.next2; + atom.next2 = 1; + } + + if (atom.character == meta_char::mc_astrsk) + firstatom.quantifier = quantifier; + + piece_with_quantifier.push_back(atom); + // (push) + } + + if (piece.size() >= 2 && firstatom.type == st_roundbracket_open && piece[1].type == st_roundbracket_pop) + { + firstatom.quantifier.atmost = 0u; + piece[1].quantifier.atmost = 0u; + } + + piece_with_quantifier += piece; + return; + } + + // atmost >= 2 + +#if !defined(SRELLDBG_NO_SIMPLEEQUIV) + // The counter requires at least 6 states: save, restore, check, inc, dec, atom(s). + // A character or charclass quantified by one of these has a simple equivalent representation: + // a{0,2} 1.epsilon(2|5), 2.CHorCL(3), 3.epsilon(4|5), 4.CHorCL(5), [5]. + // a{0,3} 1.epsilon(2|7), 2.CHorCL(3), 3.epsilon(4|7), 4.CHorCL(5), 5.epsilon(6|7), 6.CHorCL(7), [7]. + // a{1,2} 1.CHorCL(2), 2.epsilon(3|4), 3.CHorCL(4), [4]. + // a{1,3} 1.CHorCL(2), 2.epsilon(3|6), 3.CHorCL(4), 4.epsilon(5|6), 5.CHorCL(6), [6]. + // a{2,3} 1.CHorCL(2), 2.CHorCL(3), 3.epsilon(4|5), 4.CHorCL(5), [5]. + // a{2,4} 1.CHorCL(2), 2.CHorCL(3), 3.epsilon(4|7), 4.CHorCL(5), 5.epsilon(6|7), 6.CHorCL(7), [7]. + if (piece.size() == 1 && firstatom.is_character_or_class() && quantifier.has_simple_equivalence()) + { + const typename state_array::size_type branchsize = piece.size() + 1; + + for (uint_l32 i = 0; i < quantifier.atleast; ++i) + piece_with_quantifier += piece; + + if (atom.character == meta_char::mc_astrsk) + firstatom.quantifier.set(0, 1, quantifier.is_greedy); + + atom.type = st_epsilon; + atom.next2 = (quantifier.atmost - quantifier.atleast) * branchsize; + if (!quantifier.is_greedy) + { + atom.next1 = atom.next2; + atom.next2 = 1; + } + for (uint_l32 i = quantifier.atleast; i < quantifier.atmost; ++i) + { + piece_with_quantifier.push_back(atom); + piece_with_quantifier += piece; + quantifier.is_greedy ? (atom.next2 -= branchsize) : (atom.next1 -= branchsize); + } + return; + } +#endif // !defined(SRELLDBG_NO_SIMPLEEQUIV) + + atom.type = st_epsilon; + if (quantifier.is_asterisk()) // {0,} + { + // greedy: 1.epsilon(2|4), 2.piece, 3.LAorC0WR(1|0), 4.OutOfLoop. + // !greedy: 1.epsilon(4|2), 2.piece, 3.LAorC0WR(1|0), 4.OutOfLoop. + // LAorC0WR: LastAtomOfPiece or Check0WidthRepeat. + // atom.type points to 1. + } + else if (quantifier.is_plus()) // {1,} + { +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + + if (piece.size() == 1 && firstatom.is_character_or_class()) + { + piece_with_quantifier += piece; + --atom.quantifier.atleast; // /.+/ -> /..*/. + } + else +#endif + { + atom.next1 = 2; + atom.next2 = 0; + piece_with_quantifier.push_back(atom); + // greedy: 1.epsilon(3), 2.epsilon(3|5), 3.piece, 4.LAorC0WR(2|0), 5.OutOfLoop. + // !greedy: 1.epsilon(3), 2.epsilon(5|3), 3.piece, 4.LAorC0WR(2|0), 5.OutOfLoop. + // atom.type points to 2. + } + } + else + { + atom.number = this->number_of_counters; + ++this->number_of_counters; + + atom.type = st_save_and_reset_counter; + atom.next1 = 2; + atom.next2 = 1; + piece_with_quantifier.push_back(atom); + + atom.type = st_restore_counter; + atom.next1 = 0; + atom.next2 = 0; + piece_with_quantifier.push_back(atom); + // 1.save_and_reset_counter(3|2), 2.restore_counter(0|0), + + atom.next1 = 0; + atom.next2 = 0; + atom.type = st_decrement_counter; + piece.insert(0, atom); + + atom.next1 = 2; +// atom.next2 = piece[1].is_character_or_class() ? 0 : 1; +// atom.next2 = 0; + for (state_size_type i = 1; i < piece.size(); ++i) + { + const state_type &state = piece[i]; + + if (state.is_character_or_class() || (state.type == st_epsilon && state.next2 == 0)) + ; + else + { + atom.next2 = 1; + break; + } + } + atom.type = st_epsilon; // st_increment_counter; + piece.insert(0, atom); + piece[0].number = 0; + + atom.type = st_check_counter; + // greedy: 3.check_counter(4|6), 4.piece, 5.LAorC0WR(3|0), 6.OutOfLoop. + // !greedy: 3.check_counter(6|4), 4.piece, 5.LAorC0WR(3|0), 6.OutOfLoop. + // 4.piece = { 4a.increment_counter(4c|4b), 4b.decrement_counter(0|0), 4c.OriginalPiece }. + } + + // atom.type is epsilon or check_counter. + // Its "next"s point to piece and OutOfLoop. + + if (!piece_is_noncapturinggroup_contaning_capturinggroup && (piececharlen.atleast || piece_has_0widthchecker)) + { + const typename state_array::size_type piece_size = piece.size(); + state_type &lastatom = piece[piece_size - 1]; + + lastatom.next1 = 0 - static_cast(piece_size); + // Points to the one immediately before piece, which will be pushed last in this block. + + // atom.type has already been set. epsilon or check_counter. + atom.next1 = 1; + atom.next2 = static_cast(piece_size) + 1; + if (!quantifier.is_greedy) + { + atom.next1 = atom.next2; + atom.next2 = 1; + } + piece_with_quantifier.push_back(atom); + } + else + { + // atom.type has already been set. epsilon or check_counter. + atom.next1 = 1; + atom.next2 = static_cast(piece.size()) + 4; // To OutOfLoop. + // The reason for +3 than above is that push, pop, and check_0_width are added below. + if (!quantifier.is_greedy) + { + atom.next1 = atom.next2; + atom.next2 = 1; + } + piece_with_quantifier.push_back(atom); // *1 + + atom.number = this->number_of_repeats; + ++this->number_of_repeats; + + const state_size_type org1stpos = (atom.type == st_check_counter) ? 2 : 0; + + if (piece_is_noncapturinggroup_contaning_capturinggroup) + atom.quantifier = piece[org1stpos].quantifier; + else + atom.quantifier.set(1, 0); + + atom.type = st_repeat_in_pop; + atom.next1 = 0; + atom.next2 = 0; + piece.insert(org1stpos, atom); + + atom.type = st_repeat_in_push; + atom.next1 = 2; + atom.next2 = 1; + piece.insert(org1stpos, atom); + + atom.type = st_check_0_width_repeat; + atom.next1 = 0 - static_cast(piece.size()) - 1; // Points to *1. + atom.next2 = 1; + piece.push_back(atom); + // greedy: 1.epsilon(2|6), + // !greedy: 1.epsilon(6|2), + // 2.repeat_in_push(4|3), 3.repeat_in_pop(0|0), 4.piece, + // 5.check_0_width_repeat(1|6), 6.OutOfLoop. + // or + // greedy: 1.check_counter(2|8), + // !greedy: 1.check_counter(8|2), + // 2.increment_counter(4|3), 3.decrement_counter(0|0) + // 4.repeat_in_push(6|5), 5.repeat_in_pop(0|0), 6.piece, + // 7.check_0_width_repeat(1|8), 8.OutOfLoop. + } + piece_with_quantifier += piece; + } + +#if !defined(SRELL_NO_NAMEDCAPTURE) + bool parse_groupname(const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + const gname_string groupname = get_groupname(curpos, end, cstate); + + if (!this->namedcaptures.push_back(groupname, this->number_of_brackets)) + this->throw_error(regex_constants::error_backref); + + return true; + } +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + + // '['. + + bool register_character_class(state_type &atom, const uchar32 *&curpos, const uchar32 *const end, const re_compiler_state & /* cstate */) + { + range_pair code_range; + range_pairs ranges; + state_type classatom; + + if (curpos == end) + this->throw_error(regex_constants::error_brack); + + atom.type = st_character_class; + + if (*curpos == meta_char::mc_caret) // '^' + { + atom.is_not = true; + ++curpos; + } + + for (;;) + { + if (curpos == end) + this->throw_error(regex_constants::error_brack); + + if (*curpos == meta_char::mc_sbracl) // ']' + break; + + classatom.reset(); + + if (!get_character_in_class(classatom, curpos, end)) + return false; + + if (classatom.type == st_character_class) + { + add_predefclass_to_charclass(ranges, classatom); + continue; + } + + code_range.first = code_range.second = classatom.character; + + if (curpos == end) + this->throw_error(regex_constants::error_brack); + + if (*curpos == meta_char::mc_minus) // '-' + { + ++curpos; + + if (curpos == end) + this->throw_error(regex_constants::error_brack); + + if (*curpos == meta_char::mc_sbracl) + { + PUSH_SEPARATELY: + ranges.join(code_range); + code_range.first = code_range.second = meta_char::mc_minus; + } + else + { + if (!get_character_in_class(classatom, curpos, end)) + return false; + + if (classatom.type == st_character_class) + { + add_predefclass_to_charclass(ranges, classatom); + goto PUSH_SEPARATELY; + } + + code_range.second = classatom.character; + + if (!code_range.is_range_valid()) + this->throw_error(regex_constants::error_range); + } + } + ranges.join(code_range); + } + + // *curpos == ']' + ++curpos; + if (this->is_icase()) + ranges.make_caseunfoldedcharset(); + + if (atom.is_not) + { + ranges.negation(); + atom.is_not = false; + } + +// atom.character = this->is_icase() ? ranges.template consists_of_one_character() : ranges.template consists_of_one_character(); + atom.character = ranges.consists_of_one_character(this->is_icase()); + + if (atom.character != constants::invalid_u32value) + { + atom.type = st_character; + return true; + } + + atom.number = this->character_class.register_newclass(ranges); + + return true; + } + + bool get_character_in_class(state_type &atom, const uchar32 *&curpos, const uchar32 *const end /* , const re_compiler_state &cstate */) + { + atom.character = *curpos++; + + return atom.character != meta_char::mc_escape // '\\' + || translate_escseq(atom, curpos, end); + } + + void add_predefclass_to_charclass(range_pairs &cls, const state_type &classatom) + { + range_pairs predefclass = this->character_class[classatom.number]; + + if (classatom.is_not) + predefclass.negation(); + + cls.merge(predefclass); + } + + // Escape characters which appear both in and out of [] pairs. + bool translate_escseq(state_type &atom, const uchar32 *&curpos, const uchar32 *const end) + { + if (curpos == end) + this->throw_error(regex_constants::error_escape); + + atom.character = *curpos++; + + switch (atom.character) + { + // Predefined classes. + + case char_alnum::ch_D: // 'D': + atom.is_not = true; + //@fallthrough@ + + case char_alnum::ch_d: // 'd': + atom.number = static_cast(re_character_class::digit); // \d, \D. + atom.type = st_character_class; + break; + + case char_alnum::ch_S: // 'S': + atom.is_not = true; + //@fallthrough@ + + case char_alnum::ch_s: // 's': + atom.number = static_cast(re_character_class::space); // \s, \S. + atom.type = st_character_class; + break; + + case char_alnum::ch_W: // 'W': + atom.is_not = true; + //@fallthrough@ + + case char_alnum::ch_w: // 'w': + if (this->is_icase()) + { + this->character_class.setup_icase_word(); + atom.number = static_cast(re_character_class::icase_word); + } + else + atom.number = static_cast(re_character_class::word); // \w, \W. + atom.type = st_character_class; + break; + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + // Prepared for Unicode properties and script names. + case char_alnum::ch_P: // \P{...} + atom.is_not = true; + //@fallthrough@ + + case char_alnum::ch_p: // \p{...} + atom.number = get_property_number(curpos, end); + atom.type = st_character_class; + break; +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + + case char_alnum::ch_b: + atom.character = char_ctrl::cc_bs; // '\b' 0x08:BS + break; + + case char_alnum::ch_t: + atom.character = char_ctrl::cc_htab; // '\t' 0x09:HT + break; + + case char_alnum::ch_n: + atom.character = char_ctrl::cc_nl; // '\n' 0x0a:LF + break; + + case char_alnum::ch_v: + atom.character = char_ctrl::cc_vtab; // '\v' 0x0b:VT + break; + + case char_alnum::ch_f: + atom.character = char_ctrl::cc_ff; // '\f' 0x0c:FF + break; + + case char_alnum::ch_r: + atom.character = char_ctrl::cc_cr; // '\r' 0x0d:CR + break; + + case char_alnum::ch_c: // \cX + if (curpos != end) + { +// atom.character = static_cast(utf_traits().codepoint_inc(curpos, end) & 0x1f); // *curpos++ + atom.character = static_cast(*curpos | constants::asc_icase); + + if (atom.character >= char_alnum::ch_a && atom.character <= char_alnum::ch_z) + atom.character = static_cast(*curpos++ & 0x1f); + else + { + this->throw_error(regex_constants::error_escape); // Strict. +// atom.character = char_alnum::ch_c; // Loose. + } + } + break; + + case char_alnum::ch_0: + atom.character = char_ctrl::cc_nul; // '\0' 0x00:NUL + break; + + case char_alnum::ch_u: // \uhhhh, \u{h~hhhhhh} + atom.character = parse_escape_u(curpos, end); + break; + + case char_alnum::ch_x: // \xhh + atom.character = translate_numbers(curpos, end, 16, 2, 2, 0xff); + break; + + // SyntaxCharacter, '/', and '-'. + case meta_char::mc_caret: // '^' + case meta_char::mc_dollar: // '$' + case meta_char::mc_escape: // '\\' + case meta_char::mc_period: // '.' + case meta_char::mc_astrsk: // '*' + case meta_char::mc_plus: // '+' + case meta_char::mc_query: // '?' + case meta_char::mc_rbraop: // '(' + case meta_char::mc_rbracl: // ')' + case meta_char::mc_sbraop: // '[' + case meta_char::mc_sbracl: // ']' + case meta_char::mc_cbraop: // '{' + case meta_char::mc_cbracl: // '}' + case meta_char::mc_bar: // '|' + case char_other::co_slash: // '/' + case meta_char::mc_minus: // '-' allowed only in charclass. + break; + + default: + atom.character = constants::invalid_u32value; + } + + if (atom.character == constants::invalid_u32value) + this->throw_error(regex_constants::error_escape); + + return true; + } + + uchar32 parse_escape_u(const uchar32 *&curpos, const uchar32 *const end) const + { + uchar32 ucp; + + if (curpos == end) + return constants::invalid_u32value; + + if (*curpos == meta_char::mc_cbraop) + { +// ucp = translate_numbers(++curpos, end, 16, 1, 6, constants::unicode_max_codepoint, true); + ucp = translate_numbers(++curpos, end, 16, 1, 0, constants::unicode_max_codepoint); + + if (curpos == end || *curpos != meta_char::mc_cbracl) + return constants::invalid_u32value; + + ++curpos; + } + else + { + ucp = translate_numbers(curpos, end, 16, 4, 4, 0xffff); + + if (ucp >= 0xd800 && ucp <= 0xdbff) + { + const uchar32 * prefetch = curpos; + + if (prefetch != end && *prefetch == meta_char::mc_escape && ++prefetch != end && *prefetch == char_alnum::ch_u) + { + const uchar32 nextucp = translate_numbers(++prefetch, end, 16, 4, 4, 0xffff); + + if (nextucp >= 0xdc00 && nextucp <= 0xdfff) + { + curpos = prefetch; + ucp = (((ucp << 10) & 0xffc00) | (nextucp & 0x3ff)) + 0x10000; + } + } + } + } + return ucp; + } + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + uint_l32 get_property_number(const uchar32 *&curpos, const uchar32 *const end) + { + if (curpos == end || *curpos != meta_char::mc_cbraop) // '{' + this->throw_error(regex_constants::error_escape); + + pstring pname; + pstring pvalue(get_property_name_or_value(++curpos, end)); + + if (!pvalue.size()) + this->throw_error(regex_constants::error_escape); + + if (static_cast(pvalue[pvalue.size() - 1]) != char_other::co_sp) // ' ', not a value. + { + if (curpos == end) + this->throw_error(regex_constants::error_escape); + + if (*curpos == meta_char::mc_eq) // '=' + { + pname = pvalue; + pvalue = get_property_name_or_value(++curpos, end); + if (!pvalue.size()) + this->throw_error(regex_constants::error_escape); + } + } + + if (curpos == end || *curpos != meta_char::mc_cbracl) // '}' + this->throw_error(regex_constants::error_escape); + + if (static_cast(pvalue[pvalue.size() - 1]) == char_other::co_sp) // ' ', value. + pvalue.resize(pvalue.size() - 1); + + ++curpos; + + const uint_l32 class_number = this->character_class.lookup_property(pname, pvalue, this->is_icase()); + + if (class_number == re_character_class::error_property) + this->throw_error(regex_constants::error_escape); + + return class_number; + } + + pstring get_property_name_or_value(const uchar32 *&curpos, const uchar32 *const end) const + { + pstring name_or_value; + bool number_found = false; + + for (;; ++curpos) + { + if (curpos == end) + break; + + const uchar32 curchar = *curpos; + + if (curchar >= char_alnum::ch_A && curchar <= char_alnum::ch_Z) + ; + else if (curchar >= char_alnum::ch_a && curchar <= char_alnum::ch_z) + ; + else if (curchar == char_other::co_ll) // '_' + ; + else if (curchar >= char_alnum::ch_0 && curchar <= char_alnum::ch_9) + number_found = true; + else + break; + + name_or_value.append(1, static_cast(curchar)); + } + if (number_found) + name_or_value.append(1, char_other::co_sp); // ' ' + + return name_or_value; + } +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + + // Escape characters which do not appear in [] pairs. + + bool translate_atom_escape(state_type &atom, const uchar32 *&curpos, const uchar32 *const end, /* const */ re_compiler_state &cstate) + { + if (curpos == end) + this->throw_error(regex_constants::error_escape); + + atom.character = *curpos; + + switch (atom.character) + { + case meta_char::mc_minus: // '-' + this->throw_error(regex_constants::error_escape); + //@fallthrough@ + + case char_alnum::ch_B: // 'B': + atom.is_not = true; + //@fallthrough@ + + case char_alnum::ch_b: // 'b': + atom.type = st_boundary; // \b, \B. + atom.quantifier.reset(0); +// atom.number = 0; + if (this->is_icase()) + { + this->character_class.setup_icase_word(); + atom.number = static_cast(re_character_class::icase_word); + } + else + atom.number = static_cast(re_character_class::word); // \w, \W. + break; + +// case char_alnum::ch_A: // 'A': +// atom.type = st_bol; // '\A' +// case char_alnum::ch_Z: // 'Z': +// atom.type = st_eol; // '\Z' +// case char_alnum::ch_z: // 'z': +// atom.type = st_eol; // '\z' + + // Backreferences. + +#if !defined(SRELL_NO_NAMEDCAPTURE) + // Prepared for named captures. + case char_alnum::ch_k: // 'k': + return parse_backreference_name(atom, curpos, end, cstate); // \k. +#endif + + default: + + if (atom.character >= char_alnum::ch_1 && atom.character <= char_alnum::ch_9) // \1, \9. + return parse_backreference_number(atom, curpos, end, cstate); + + translate_escseq(atom, curpos, end); + + if (atom.type == st_character_class) + { + range_pairs newclass = this->character_class[atom.number]; + + if (atom.is_not) + { + newclass.negation(); + atom.is_not = false; + } + + if (this->is_icase() && atom.number >= static_cast(re_character_class::number_of_predefcls)) + newclass.make_caseunfoldedcharset(); + + atom.number = this->character_class.register_newclass(newclass); + } + return true; + } + + ++curpos; + return true; + } + + bool parse_backreference_number(state_type &atom, const uchar32 *&curpos, const uchar32 *const end, const re_compiler_state &cstate) + { + const uchar32 backrefno = translate_numbers(curpos, end, 10, 0, 0, 0xfffffffe); + // 22.2.1.1 Static Semantics: Early Errors: + // It is a Syntax Error if NcapturingParens >= 23^2 - 1. + + if (backrefno == constants::invalid_u32value) + this->throw_error(regex_constants::error_escape); + + atom.number = static_cast(backrefno); + atom.backrefnumber_unresolved = false; + + return backreference_postprocess(atom, cstate); + } + + bool backreference_postprocess(state_type &atom, const re_compiler_state & /* cstate */) const + { + atom.next2 = 1; + atom.type = st_backreference; + +// atom.quantifier.atleast = cstate.atleast_widths_of_brackets[atom.number - 1]; + // Moved to check_backreferences(). + + return true; + } + +#if !defined(SRELL_NO_NAMEDCAPTURE) + bool parse_backreference_name(state_type &atom, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + if (++curpos == end || *curpos != meta_char::mc_lt) + this->throw_error(regex_constants::error_escape); + + const gname_string groupname = get_groupname(++curpos, end, cstate); + + atom.number = this->namedcaptures[groupname]; + + if (atom.number != groupname_mapper::notfound) + atom.backrefnumber_unresolved = false; + else + { + atom.backrefnumber_unresolved = true; + atom.number = static_cast(cstate.unresolved_gnames.size()); + cstate.unresolved_gnames.push_back(groupname, atom.number); + } + + return backreference_postprocess(atom, cstate); + } + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + gname_string get_groupname(const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) +#else + gname_string get_groupname(const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &) +#endif + { + charT mbstr[utf_traits::maxseqlen]; + gname_string groupname; + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + cstate.idchecker.setup(); +#endif + for (;;) + { + if (curpos == end) + this->throw_error(regex_constants::error_escape); + + uchar32 curchar = *curpos++; + + if (curchar == meta_char::mc_gt) // '>' + break; + + if (curchar == meta_char::mc_escape && curpos != end && *curpos == char_alnum::ch_u) // '\\', 'u'. + curchar = parse_escape_u(++curpos, end); + +#if defined(SRELL_NO_UNICODE_PROPERTY) + if (curchar != meta_char::mc_escape) +#else + if (cstate.idchecker.is_identifier(curchar, groupname.size() != 0)) +#endif + ; // OK. + else + curchar = constants::invalid_u32value; + + if (curchar == constants::invalid_u32value) + this->throw_error(regex_constants::error_escape); + + const uchar32 seqlen = utf_traits::to_codeunits(mbstr, curchar); + for (uchar32 i = 0; i < seqlen; ++i) + groupname.append(1, mbstr[i]); + } + if (!groupname.size()) + this->throw_error(regex_constants::error_escape); + + return groupname; + } +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + + bool get_quantifier(re_quantifier &quantifier, const uchar32 *&curpos, const uchar32 *const end) + { + switch (*curpos) + { + case meta_char::mc_astrsk: // '*': + --quantifier.atleast; + //@fallthrough@ + + case meta_char::mc_plus: // '+': + quantifier.set_infinity(); + break; + + case meta_char::mc_query: // '?': + --quantifier.atleast; + break; + + case meta_char::mc_cbraop: // '{': + get_brace_with_quantifier(quantifier, curpos, end); + break; + + default: + return true; + } + + if (++curpos != end && *curpos == meta_char::mc_query) // '?' + { + quantifier.is_greedy = false; + ++curpos; + } + return true; + } + + void get_brace_with_quantifier(re_quantifier &quantifier, const uchar32 *&curpos, const uchar32 *const end) + { + ++curpos; + + quantifier.atleast = static_cast(translate_numbers(curpos, end, 10, 1, 0, constants::max_u32value)); + + if (quantifier.atleast == static_cast(constants::invalid_u32value)) + goto THROW_ERROR_BRACE; + + if (curpos == end) + goto THROW_ERROR_BRACE; + + if (*curpos == meta_char::mc_comma) // ',' + { + ++curpos; + + quantifier.atmost = static_cast(translate_numbers(curpos, end, 10, 1, 0, constants::max_u32value)); + + if (quantifier.atmost == static_cast(constants::invalid_u32value)) + quantifier.set_infinity(); + + if (!quantifier.is_valid()) + this->throw_error(regex_constants::error_badbrace); + } + else + quantifier.atmost = quantifier.atleast; + + if (curpos == end || *curpos != meta_char::mc_cbracl) // '}' + { + THROW_ERROR_BRACE: + this->throw_error(regex_constants::error_brace); + } + // *curpos == '}' + } + + uchar32 translate_numbers(const uchar32 *&curpos, const uchar32 *const end, const int radix, const std::size_t minsize, const std::size_t maxsize, const uchar32 maxvalue) const + { + std::size_t count = 0; + uchar32 u32value = 0; + int num; + + for (; maxsize == 0 || count < maxsize; ++curpos, ++count) + { + + if (curpos == end || (num = tonumber(*curpos, radix)) == -1) + break; + + const uchar32 nextvalue = u32value * radix + num; + + if ((/* maxvalue != 0 && */ nextvalue > maxvalue) || nextvalue < u32value) + break; + + u32value = nextvalue; + } + + if (count >= minsize) + return u32value; + + return constants::invalid_u32value; + } + + int tonumber(const uchar32 ch, const int radix) const + { + if ((ch >= char_alnum::ch_0 && ch <= char_alnum::ch_7) || (radix >= 10 && (ch == char_alnum::ch_8 || ch == char_alnum::ch_9))) + return static_cast(ch - char_alnum::ch_0); + + if (radix == 16) + { + if (ch >= char_alnum::ch_a && ch <= char_alnum::ch_f) + return static_cast(ch - char_alnum::ch_a + 10); + + if (ch >= char_alnum::ch_A && ch <= char_alnum::ch_F) + return static_cast(ch - char_alnum::ch_A + 10); + } + return -1; + } + + bool check_backreferences(re_compiler_state &cstate) + { + for (typename state_array::size_type backrefpos = 0; backrefpos < this->NFA_states.size(); ++backrefpos) + { + state_type &brs = this->NFA_states[backrefpos]; + + if (brs.type == st_backreference) + { + const uint_l32 &backrefno = brs.number; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + if (brs.backrefnumber_unresolved) + { + if (backrefno >= cstate.unresolved_gnames.size()) + return false; // Internal error. + + brs.number = this->namedcaptures[cstate.unresolved_gnames[backrefno]]; + + if (backrefno == groupname_mapper::notfound) + return false; + + brs.backrefnumber_unresolved = false; + } +#endif + + for (typename state_array::size_type roundbracket_closepos = 0;; ++roundbracket_closepos) + { + if (roundbracket_closepos < this->NFA_states.size()) + { + const state_type &rbcs = this->NFA_states[roundbracket_closepos]; + + if (rbcs.type == st_roundbracket_close && rbcs.number == backrefno) + { + if (roundbracket_closepos < backrefpos) + { +// brs.quantifier.atleast = cstate.atleast_widths_of_brackets[backrefno - 1]; + // 20210429: It was reported that clang-tidy was dissatisfied with this code. + // 20211006: Replaced with the following code: + + const uint_l32 backrefnoindex = backrefno - 1; + + // This can never be true. Added only for satisfying clang-tidy. + if (backrefnoindex >= cstate.atleast_widths_of_brackets.size()) + return false; + + brs.quantifier.atleast = cstate.atleast_widths_of_brackets[backrefnoindex]; + + cstate.backref_used = true; + } + else + { + brs.type = st_epsilon; + brs.next2 = 0; + } + break; + } + } + else + return false; + } + } + } + return true; + } + +#if !defined(SRELLDBG_NO_1STCHRCLS) + + void create_firstchar_class() + { +#if !defined(SRELLDBG_NO_BITSET) + range_pairs fcc; +#else + range_pairs &fcc = this->firstchar_class; +#endif + + const bool canbe0length = gather_nextchars(fcc, static_cast(this->NFA_states[0].next1), 0u, false); + + if (canbe0length) + { + fcc.set_solerange(range_pair_helper(0, constants::unicode_max_codepoint)); + // Expressions would consist of assertions only, such as /^$/. + // We cannot but accept every codepoint. + } + +#if !defined(SRELLDBG_NO_BITSET) + this->NFA_states[0].quantifier.atleast = this->character_class.register_newclass(fcc); + + set_bitset_table(fcc); +#endif + } + +#if !defined(SRELLDBG_NO_BITSET) + void set_bitset_table(const range_pairs &fcc) + { + for (typename range_pairs::size_type i = 0; i < fcc.size(); ++i) + { + const range_pair &range = fcc[i]; + +#if 0 + uchar32 second = range.second <= constants::unicode_max_codepoint ? range.second : constants::unicode_max_codepoint; + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (utf_traits::utftype == 16) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + if (second >= 0x10000 && range.first < 0x10000) + { + this->firstchar_class_bs.set_range(utf_traits::firstcodeunit(0x10000) & utf_traits::bitsetmask, utf_traits::firstcodeunit(second) & utf_traits::bitsetmask); + second = 0xffff; + } + } + this->firstchar_class_bs.set_range(utf_traits::firstcodeunit(range.first) & utf_traits::bitsetmask, utf_traits::firstcodeunit(second) & utf_traits::bitsetmask); + +#else + for (uchar32 ucp = range.first; ucp <= constants::unicode_max_codepoint; ++ucp) + { + this->firstchar_class_bs.set(utf_traits::firstcodeunit(ucp) & utf_traits::bitsetmask); + + if (ucp == range.second) + break; + } +#endif + } + } +#endif // !defined(SRELLDBG_NO_BITSET) +#endif // !defined(SRELLDBG_NO_1STCHRCLS) + + bool gather_nextchars(range_pairs &nextcharclass, typename state_array::size_type pos, simple_array &checked, const uint_l32 bracket_number, const bool subsequent) const + { + bool canbe0length = false; + + for (;;) + { + const state_type &state = this->NFA_states[pos]; + + if (checked[pos]) + break; + + checked[pos] = true; + + if (state.next2 + && (state.type != st_check_counter || !state.quantifier.is_greedy || state.quantifier.atleast == 0) + && (state.type != st_save_and_reset_counter) + && (state.type != st_roundbracket_open) + && (state.type != st_roundbracket_close || state.number != bracket_number) + && (state.type != st_repeat_in_push) + && (state.type != st_backreference || (state.quantifier.atleast == 0 && state.next1 != state.next2)) + && (state.type != st_lookaround_open)) + if (gather_nextchars(nextcharclass, pos + state.next2, checked, bracket_number, subsequent)) + canbe0length = true; + + switch (state.type) + { + case st_character: + nextcharclass.join(range_pair_helper(state.character)); + + if (this->is_ricase()) + nextcharclass.make_caseunfoldedcharset(); + + return canbe0length; + + case st_character_class: + nextcharclass.merge(this->character_class[state.number]); + return canbe0length; + + case st_backreference: + { + const typename state_array::size_type nextpos = find_next1_of_bracketopen(state.number); + + const bool length0 = gather_nextchars(nextcharclass, nextpos, state.number, subsequent); + + if (!length0) + return canbe0length; + } + break; + + case st_eol: + case st_bol: + if (!subsequent) + break; + + //@fallthrough@ + + case st_boundary: + if (subsequent) + nextcharclass.set_solerange(range_pair_helper(0, constants::unicode_max_codepoint)); + + break; + + case st_lookaround_open: +// if (!state.is_not && !state.reverse) + if (!state.is_not && state.quantifier.atleast == 0) + { + gather_nextchars(nextcharclass, pos + 1, checked, 0u, subsequent); + } + else if (subsequent) + nextcharclass.set_solerange(range_pair_helper(0, constants::unicode_max_codepoint)); + + break; + + case st_roundbracket_close: + if (/* bracket_number == 0 || */ state.number != bracket_number) + break; + //@fallthrough@ + + case st_success: // == st_lookaround_close. + return true; + + case st_check_counter: + if (!state.quantifier.is_greedy && state.quantifier.atleast >= 1) + return canbe0length; + //@fallthrough@ + + default:; + } + + if (state.next1) + pos += state.next1; + else + break; + } + return canbe0length; + } + + bool gather_nextchars(range_pairs &nextcharclass, const typename state_array::size_type pos, const uint_l32 bracket_number, const bool subsequent) const + { + simple_array checked; + + checked.resize(this->NFA_states.size(), false); + return gather_nextchars(nextcharclass, pos, checked, bracket_number, subsequent); + } + + typename state_array::size_type find_next1_of_bracketopen(const uint_l32 bracketno) const + { + for (typename state_array::size_type no = 0; no < this->NFA_states.size(); ++no) + { + const state_type &state = this->NFA_states[no]; + + if (state.type == st_roundbracket_open && state.number == bracketno) + return no + state.next1; + } + return 0; + } + + void relativejump_to_absolutejump() + { + for (typename state_array::size_type pos = 0; pos < this->NFA_states.size(); ++pos) + { + state_type &state = this->NFA_states[pos]; + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + if (state.next1 || state.type == st_character || state.type == st_character_class) +#else + if (state.next1) +#endif + state.next_state1 = &this->NFA_states[pos + state.next1]; + else + state.next_state1 = NULL; + + if (state.next2) + state.next_state2 = &this->NFA_states[pos + state.next2]; + else + state.next_state2 = NULL; + } + } + + void optimise() + { +#if !defined(SRELLDBG_NO_BRANCH_OPT2) && !defined(SRELLDBG_NO_ASTERISK_OPT) + branch_optimisation2(); +#endif + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + asterisk_optimisation(); +#endif + +#if !defined(SRELLDBG_NO_BRANCH_OPT) && !defined(SRELLDBG_NO_ASTERISK_OPT) + branch_optimisation(); +#endif + +#if !defined(SRELLDBG_NO_1STCHRCLS) + create_firstchar_class(); +#endif + +#if !defined(SRELLDBG_NO_SKIP_EPSILON) + skip_epsilon(); +#endif + +#if !defined(SRELLDBG_NO_CCPOS) + set_charclass_posinfo(); +#endif + } + +#if !defined(SRELLDBG_NO_SKIP_EPSILON) + + void skip_epsilon() + { + for (typename state_array::size_type pos = 0; pos < this->NFA_states.size(); ++pos) + { + state_type &state = this->NFA_states[pos]; + + if (state.next1) + state.next1 = static_cast(skip_nonbranch_epsilon(pos + state.next1) - pos); + + if (state.next2) + state.next2 = static_cast(skip_nonbranch_epsilon(pos + state.next2) - pos); + } + } + + typename state_array::size_type skip_nonbranch_epsilon(typename state_array::size_type pos) const + { + for (;;) + { + const state_type &state = this->NFA_states[pos]; + + if (state.type == st_epsilon && state.next2 == 0) + { + pos += state.next1; + continue; + } + break; + } + return pos; + } + +#endif + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + + void asterisk_optimisation() + { + state_type *prevstate_is_astrskepsilon = NULL; + const state_type *prevcharstate = NULL; + state_size_type mnp_inspos = 0; + bool inspos_updatable = true; +#if !defined(SRELLDBG_NO_SPLITCC) + bool inserted = false; +#endif + + for (typename state_array::size_type cur = 1; cur < this->NFA_states.size(); ++cur) + { + state_type &curstate = this->NFA_states[cur]; + + switch (curstate.type) + { + case st_epsilon: + if (curstate.character == meta_char::mc_astrsk) + { + prevstate_is_astrskepsilon = &curstate; + } + else + { + prevstate_is_astrskepsilon = NULL; + inspos_updatable = false; + } + break; + + case st_character: + case st_character_class: + if (inspos_updatable) + { + if (prevcharstate) + { + if (prevcharstate->type != curstate.type || prevcharstate->number != curstate.number) + inspos_updatable = false; + } + if (inspos_updatable) + { + if (prevstate_is_astrskepsilon) + { + inspos_updatable = false; + if (prevstate_is_astrskepsilon->quantifier.is_asterisk_or_plus()) + { + mnp_inspos = cur + 1; + } + } + } + prevcharstate = &curstate; + } + if (prevstate_is_astrskepsilon) + { + const re_quantifier &eq = prevstate_is_astrskepsilon->quantifier; + const state_size_type epsilonno = cur - 1; + const state_size_type faroffset = eq.is_greedy ? prevstate_is_astrskepsilon->next2 : prevstate_is_astrskepsilon->next1; + const state_size_type nextno = epsilonno + faroffset; +#if !defined(SRELLDBG_NO_SPLITCC) + const state_size_type origlen = this->NFA_states.size(); +#endif + + if (is_exclusive_sequence(eq, cur, nextno)) + { + state_type &epsilonstate = this->NFA_states[epsilonno]; + state_type &curstate2 = this->NFA_states[cur]; + + epsilonstate.next1 = 1; + epsilonstate.next2 = 0; + epsilonstate.number = 0; +// curstate2.quantifier.is_greedy = true; + if (epsilonstate.quantifier.is_infinity()) + { + curstate2.next1 = 0; + curstate2.next2 = faroffset - 1; + } + else // ? or {0,1} + { + curstate2.next2 = faroffset - 1; + } + +#if !defined(SRELLDBG_NO_SPLITCC) + if (mnp_inspos == nextno && origlen != this->NFA_states.size()) + inserted = true; +#endif + } + prevstate_is_astrskepsilon = NULL; + } + break; + + default: + prevstate_is_astrskepsilon = NULL; + inspos_updatable = false; + } + } + +#if !defined(SRELLDBG_NO_NEXTPOS_OPT) + + if (mnp_inspos != 0) + { + state_size_type cur = mnp_inspos; + + if (this->NFA_states[cur].type != st_success) + { + const state_type &prevstate = this->NFA_states[cur - 1]; + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) && !defined(SRELLDBG_NO_MPREWINDER) && !defined(SRELLDBG_NO_1STCHRCLS) && !defined(SRELLDBG_NO_BITSET) + +#if !defined(SRELLDBG_NO_SPLITCC) + if (!inserted && prevstate.next1 == 0) +#else + if (prevstate.next1 == 0) +#endif + { + range_pairs prevcc; + range_pairs nextcc; + +// gather_if_char_or_cc_strict(prevcc, prevstate); + if (prevstate.type == st_character) + { + prevcc.set_solerange(range_pair_helper(prevstate.character)); + } + else if (prevstate.type == st_character_class) + { + prevcc = this->character_class[prevstate.number]; + } + + gather_nextchars(nextcc, cur, 0u, true); + + const uint_l32 cpnum_prevcc = prevcc.total_codepoints(); + const uint_l32 cpnum_nextcc = nextcc.total_codepoints(); + + if (cpnum_nextcc != 0 && cpnum_nextcc < cpnum_prevcc) + { + state_array newNFAs; + state_type atom; + + atom.reset(); + atom.character = meta_char::mc_eq; // '=' + atom.type = st_lookaround_open; + atom.next1 = static_cast(cur - 1) * 2 + 2; + atom.next2 = 1; + atom.quantifier.atleast = 2; // Match point rewinder. + newNFAs.append(1, atom); + + newNFAs.append(this->NFA_states, 1, cur - 1); + + atom.type = st_lookaround_close; + atom.next1 = 0; + atom.next2 = 0; + newNFAs.append(1, atom); + + insert_at(1, newNFAs.size()); + this->NFA_states.replace(1, newNFAs.size(), newNFAs); + this->NFA_states[0].next2 = this->NFA_states[0].next1; + this->NFA_states[0].next1 = 1; + + return; + } + } +#endif // !defined(SRELL_FIXEDWIDTHLOOKBEHIND) && !defined(SRELLDBG_NO_MPREWINDER) && !defined(SRELLDBG_NO_1STCHRCLS) && !defined(SRELLDBG_NO_BITSET) + + insert_at(cur, 1); + state_type &mnpstate = this->NFA_states[cur]; + state_type &charstate = this->NFA_states[cur - 1]; + + mnpstate.type = st_move_nextpos; + +#if !defined(SRELLDBG_NO_SPLITCC) + + if (inserted) + { + charstate.next2 = 1; + } + else +#endif + if (charstate.next1 == 0) + { + mnpstate.next1 = charstate.next2 - 1; + charstate.next2 = 1; + } + else + { + mnpstate.next1 = -2; + charstate.next1 = 1; + } + } + } +#endif // !defined(SRELLDBG_NO_NEXTPOS_OPT) + } + + bool is_exclusive_sequence(const re_quantifier &eq, const state_size_type curno, const state_size_type nextno) // const + { + const state_type &curstate = this->NFA_states[curno]; + range_pairs curchar_class; + range_pairs nextchar_class; + + if (curstate.type == st_character) + { + curchar_class.join(range_pair_helper(curstate.character)); + } + else if (curstate.type == st_character_class) + { + curchar_class = this->character_class[curstate.number]; + if (curchar_class.size() == 0) // Means [], which always makes matching fail. + return true; // For preventing the automaton from pushing bt data. + } + else + { + return false; + } + + const bool canbe0length = gather_nextchars(nextchar_class, nextno, 0u, true); + + if (nextchar_class.size()) + { + if (!canbe0length || eq.is_greedy) + { +#if !defined(SRELLDBG_NO_SPLITCC) + + range_pairs kept; + range_pairs removed; + + curchar_class.split_ranges(kept, removed, nextchar_class); + + if (removed.size() == 0) // !curchar_class.is_overlap(nextchar_class) + return true; + + if (curstate.type == st_character_class && kept.size() && eq.is_infinity()) + { + { + state_type &curstate2 = this->NFA_states[curno]; + + curstate2.character = kept.consists_of_one_character(this->is_icase()); + if (curstate2.character != constants::invalid_u32value) + curstate2.type = st_character; + else + curstate2.number = this->character_class.register_newclass(kept); + } + const re_quantifier backupeq(eq); + + insert_at(nextno, 2); + state_type &n0 = this->NFA_states[nextno]; + state_type &n1 = this->NFA_states[nextno + 1]; + + n0.reset(); + n0.type = st_epsilon; + n0.character = meta_char::mc_astrsk; + n0.quantifier = backupeq; +// n0.next2 = 1; + n0.next2 = 2; + if (!n0.quantifier.is_greedy) + { + n0.next1 = n0.next2; + n0.next2 = 1; + } + + n1.reset(); + n1.type = st_character_class; + + n1.character = removed.consists_of_one_character(this->is_icase()); + if (n1.character != constants::invalid_u32value) + n1.type = st_character; + else + n1.number = this->character_class.register_newclass(removed); + + n1.next1 = -2; +// n1.next2 = 0; + return true; + } + +#else // defined(SRELLDBG_NO_SPLITCC) + + if (!curchar_class.is_overlap(nextchar_class)) + { + return true; + } + +#endif // !defined(SRELLDBG_NO_SPLITCC) + } + } + else if (/* nextchar_class.size() == 0 && */ (!canbe0length || only_success_left(nextno))) + { + // (size() == 0 && !canbe0length) means []. + return eq.is_greedy; + } + + return false; + } + + bool only_success_left(typename state_array::size_type pos) const + { + for (;;) + { + const state_type &state = this->NFA_states[pos]; + + switch (state.type) + { + case st_success: + return true; + + case st_roundbracket_close: + case st_backreference: + if (state.next2 != 0 && state.next1 != state.next2) + return false; + break; + + case st_epsilon: + if (state.next2 != 0 && !only_success_left(pos + state.next2)) + return false; + break; + + case st_roundbracket_open: + break; // /a*()/ + + default: + return false; + } + if (state.next1) + pos += state.next1; + else + return false; + } + } +#endif // !defined(SRELLDBG_NO_ASTERISK_OPT) + + void insert_at(const typename state_array::size_type pos, const std::ptrdiff_t len) + { + state_type newstate; + + for (typename state_array::size_type cur = 0; cur < pos; ++cur) + { + state_type &state = this->NFA_states[cur]; + + if (state.next1 && (cur + state.next1) >= pos) + state.next1 += len; + + if (state.next2 && (cur + state.next2) >= pos) + state.next2 += len; + } + + for (typename state_array::size_type cur = pos; cur < this->NFA_states.size(); ++cur) + { + state_type &state = this->NFA_states[cur]; + + if ((cur + state.next1) < pos) + state.next1 -= len; + + if ((cur + state.next2) < pos) + state.next2 -= len; + } + + newstate.reset(); + newstate.type = st_epsilon; + for (std::ptrdiff_t count = 0; count < len; ++count) + this->NFA_states.insert(pos, newstate); + } + +#if !defined(SRELLDBG_NO_NEXTPOS_OPT) +#endif // !defined(SRELLDBG_NO_NEXTPOS_OPT) + +#if !defined(SRELLDBG_NO_BRANCH_OPT) || defined(SRELLTEST_NEXTPOS_OPT2) + typename state_array::size_type gather_if_char_or_charclass(range_pairs &charclass, typename state_array::size_type pos) const + { + for (; pos < this->NFA_states.size();) + { + const state_type &curstate = this->NFA_states[pos]; + + if (curstate.type == st_character && curstate.next2 == 0) + { + charclass.set_solerange(range_pair_helper(curstate.character)); + return pos; + } + else if (curstate.type == st_character_class && curstate.next2 == 0) + { + charclass = this->character_class[curstate.number]; + return pos; + } + else if (curstate.type == st_epsilon && curstate.next2 == 0) + { + } + else + break; + + pos += curstate.next1; + } + return 0; + } +#endif // !defined(SRELLDBG_NO_BRANCH_OPT) || defined(SRELLTEST_NEXTPOS_OPT2) + +#if !defined(SRELLDBG_NO_BRANCH_OPT) + void branch_optimisation() + { + range_pairs nextcharclass1; + + for (typename state_array::size_type pos = 0; pos < this->NFA_states.size(); ++pos) + { + const state_type &state = this->NFA_states[pos]; + + if (state.is_branch()) + { + const typename state_array::size_type nextcharpos = gather_if_char_or_charclass(nextcharclass1, pos + state.next1); + + if (nextcharpos) + { + range_pairs nextcharclass2; + + const bool canbe0length = gather_nextchars(nextcharclass2, pos + state.next2, 0u /* bracket_number */, true); + + if (!canbe0length && !nextcharclass1.is_overlap(nextcharclass2)) + { + state_type &branch = this->NFA_states[pos]; + state_type &next1 = this->NFA_states[nextcharpos]; + + next1.next2 = pos + branch.next2 - nextcharpos; + branch.next2 = 0; + } + } + } + } + } +#endif // !defined(SRELLDBG_NO_BRANCH_OPT) + +#if !defined(SRELL_NO_ICASE) + bool check_if_really_needs_icase_search() + { + uchar32 u32chars[unicode_case_folding::rev_maxset]; + + for (typename state_array::size_type i = 0; i < this->NFA_states.size(); ++i) + { + const state_type &state = this->NFA_states[i]; + + if (state.type == st_character) + { + if (unicode_case_folding::casefoldedcharset(u32chars, state.character) > 1) + return true; + } + else if (state.type == st_backreference) + return true; + } +// this->soflags &= ~regex_constants::icase; + return false; + } +#endif // !defined(SRELL_NO_ICASE) + +#if !defined(SRELLDBG_NO_BMH) + void setup_bmhdata() + { + simple_array u32s; + + for (typename state_array::size_type i = 1; i < this->NFA_states.size(); ++i) + { + const state_type &state = this->NFA_states[i]; + + if (state.type == st_character) + u32s.push_back(state.character); + else + { + u32s.clear(); + break; + } + } + + if (u32s.size() > 1) +// if ((u32s.size() > 1 && !this->is_ricase()) || (u32s.size() > 2 && this->is_ricase())) + { + if (this->bmdata) + this->bmdata->clear(); + else + this->bmdata = new re_bmh; + + this->bmdata->setup(u32s, this->is_ricase()); + return /* false */; + } + + if (this->bmdata) + delete this->bmdata; + this->bmdata = NULL; +// return true; + } +#endif // !defined(SRELLDBG_NO_BMH) + +#if !defined(SRELLDBG_NO_CCPOS) + void set_charclass_posinfo() + { + this->character_class.finalise(); + for (typename state_array::size_type i = 1; i < this->NFA_states.size(); ++i) + { + state_type &state = this->NFA_states[i]; + + if (state.type == st_character_class) + { + const range_pair &posinfo = this->character_class.charclasspos(state.number); + state.quantifier.setccpos(posinfo.first, posinfo.second); + } + } + } +#endif // !defined(SRELLDBG_NO_CCPOS) + +#if !defined(SRELLDBG_NO_BRANCH_OPT2) + + bool gather_if_char_or_charclass_strict(range_pairs &out, const state_type &state) const + { + if (state.type == st_character /* && state.next2 == 0 */) + { + out.set_solerange(range_pair_helper(state.character)); + } + else if (state.type == st_character_class /* && state.next2 == 0 */) + { + out = this->character_class[state.number]; + } + else + return false; + + return true; + } + + void branch_optimisation2() + { + range_pairs basealt1stch; + range_pairs nextalt1stch; + + for (state_size_type pos = 0; pos < this->NFA_states.size(); ++pos) + { + const state_type &curstate = this->NFA_states[pos]; + + if (curstate.is_branch()) + { + const state_size_type next1pos = pos + curstate.next1; + state_size_type precharchainpos = pos; + + if (gather_if_char_or_charclass_strict(basealt1stch, this->NFA_states[next1pos])) + { + state_size_type next2pos = precharchainpos + curstate.next2; + state_size_type postcharchainpos = 0; + + for (;;) + { + state_size_type next2next1pos = next2pos; + state_type &nstate2 = this->NFA_states[next2pos]; + state_size_type next2next2pos = 0; + + if (nstate2.is_branch()) + { + next2next2pos = next2pos + nstate2.next2; + next2next1pos += nstate2.next1; + } + + if (gather_if_char_or_charclass_strict(nextalt1stch, this->NFA_states[next2next1pos])) + { + const int relation = basealt1stch.relationship(nextalt1stch); + + if (relation == 0) + { + if (next2next2pos) // if (nstate2.is_branch()) + { + nstate2.reset(); + nstate2.type = st_epsilon; + } + + if (postcharchainpos == 0) + { + postcharchainpos = next1pos + 1; + insert_at(postcharchainpos, 1); + this->NFA_states[next1pos].next1 = 1; + } + else + { + const state_size_type prevbranchpos = postcharchainpos; + + postcharchainpos = prevbranchpos + this->NFA_states[prevbranchpos].next2; + insert_at(postcharchainpos, 1); + this->NFA_states[prevbranchpos].next2 = postcharchainpos - prevbranchpos; + // Fix for bug210423. This line cannot be omitted, because + // NFA_states[prevbranchpos].next2 has been incremented in insert_at(). + } + +// if (next2next1pos >= postcharchainpos) + ++next2next1pos; + + if (precharchainpos >= postcharchainpos) + ++precharchainpos; + + state_type &prechainbranchpoint = this->NFA_states[precharchainpos]; + if (next2next2pos) + { +// if (next2next2pos >= postcharchainpos) + ++next2next2pos; + prechainbranchpoint.next2 = next2next2pos - precharchainpos; + } + else + { + prechainbranchpoint.next2 = 0; + } + + state_type &newbranchpoint = this->NFA_states[postcharchainpos]; + newbranchpoint.character = meta_char::mc_bar; +// newbranchpoint.next1 = 1; + newbranchpoint.next2 = next2next1pos + this->NFA_states[next2next1pos].next1 - postcharchainpos; + } + else if (relation == 1) + { + break; + } + else + precharchainpos = next2pos; + } + else + { + // Fix for bug210428. + // Original: /mm2|m|mm/ + // 1st step: /m(?:m2||m)/ <- No more optimisation can be performed. Must quit. + // 2nd step: /mm(?:2||)/ <- BUG. + break; + } + + if (next2next2pos == 0) + break; + + next2pos = next2next2pos; + } + } + } + } + } +#endif // !defined(SRELLDBG_NO_BRANCH_OPT2) + +public: // For debug. + + void print_NFA_states(const int) const; +}; +// re_compiler + + } // namespace regex_internal + +// ... "rei_compiler.hpp"] +// ["regex_sub_match.hpp" ... + +// 28.9, class template sub_match: +template +class sub_match : public std::pair +{ +public: + + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::difference_type difference_type; + typedef BidirectionalIterator iterator; + typedef std::basic_string string_type; + + bool matched; + +// constexpr sub_match(); // C++11. + + sub_match() : matched(false) + { + } + + difference_type length() const + { + return matched ? std::distance(this->first, this->second) : 0; + } + + operator string_type() const + { + return matched ? string_type(this->first, this->second) : string_type(); + } + + string_type str() const + { + return matched ? string_type(this->first, this->second) : string_type(); + } + + int compare(const sub_match &s) const + { + return str().compare(s.str()); + } + + int compare(const string_type &s) const + { + return str().compare(s); + } + + int compare(const value_type *const s) const + { + return str().compare(s); + } +}; + +// 28.9.2, sub_match non-member operators: +// [7.9.2] sub_match non-member operators + +// Compares sub_match & with sub_match &. +template +bool operator==(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) == 0; // 1 +} + +template +bool operator!=(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) != 0; // 2 +} + +template +bool operator<(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) < 0; // 3 +} + +template +bool operator<=(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) <= 0; // 4 +} + +template +bool operator>=(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) >= 0; // 5 +} + +template +bool operator>(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) > 0; // 6 +} + +// Compares basic_string & with sub_match &. +template +bool operator==( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return rhs.compare(lhs.c_str()) == 0; // 7 +} + +template +bool operator!=( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return !(lhs == rhs); // 8 +} + +template +bool operator<( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return rhs.compare(lhs.c_str()) > 0; // 9 +} + +template +bool operator>( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return rhs < lhs; // 10 +} + +template +bool operator>=( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return !(lhs < rhs); // 11 +} + +template +bool operator<=( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return !(rhs < lhs); // 12 +} + +// Compares sub_match & with basic_string &. +template +bool operator==( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return lhs.compare(rhs.c_str()) == 0; // 13 +} + +template +bool operator!=( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return !(lhs == rhs); // 14 +} + +template +bool operator<( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return lhs.compare(rhs.c_str()) < 0; // 15 +} + +template +bool operator>( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return rhs < lhs; // 16 +} + +template +bool operator>=( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return !(lhs < rhs); // 17 +} + +template +bool operator<=( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return !(rhs < lhs); // 18 +} + +// Compares iterator_traits::value_type * with sub_match &. +template +bool operator==( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return rhs.compare(lhs) == 0; // 19 +} + +template +bool operator!=( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return !(lhs == rhs); // 20 +} + +template +bool operator<( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return rhs.compare(lhs) > 0; // 21 +} + +template +bool operator>( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return rhs < lhs; // 22 +} + +template +bool operator>=( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return !(lhs < rhs); // 23 +} + +template +bool operator<=( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return !(rhs < lhs); // 24 +} + +// Compares sub_match & with iterator_traits::value_type *. +template +bool operator==( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return lhs.compare(rhs) == 0; // 25 +} + +template +bool operator!=( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return !(lhs == rhs); // 26 +} + +template +bool operator<( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return lhs.compare(rhs) < 0; // 27 +} + +template +bool operator>( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return rhs < lhs; // 28 +} + +template +bool operator>=( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return !(lhs < rhs); // 29 +} + +template +bool operator<=( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return !(rhs < lhs); // 30 +} + +// Compares iterator_traits::value_type & with sub_match &. +template +bool operator==( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return rhs.compare(typename sub_match::string_type(1, lhs)) == 0; // 31 +} + +template +bool operator!=( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return !(lhs == rhs); // 32 +} + +template +bool operator<( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return rhs.compare(typename sub_match::string_type(1, lhs)) > 0; // 33 +} + +template +bool operator>( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return rhs < lhs; // 34 +} + +template +bool operator>=( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return !(lhs < rhs); // 35 +} + +template +bool operator<=( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return !(rhs < lhs); // 36 +} + +// Compares sub_match & with iterator_traits::value_type &. +template +bool operator==( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return lhs.compare(typename sub_match::string_type(1, rhs)) == 0; // 37 +} + +template +bool operator!=( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return !(lhs == rhs); // 38 +} + +template +bool operator<( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return lhs.compare(typename sub_match::string_type(1, rhs)) < 0; // 39 +} + +template +bool operator>( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return rhs < lhs; // 40 +} + +template +bool operator>=( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return !(lhs < rhs); // 41 +} + +template +bool operator<=( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return !(rhs < lhs); // 42 +} + +template +std::basic_ostream &operator<<(std::basic_ostream &os, const sub_match &m) +{ + return (os << m.str()); +} + +typedef sub_match csub_match; +typedef sub_match wcsub_match; +typedef sub_match ssub_match; +typedef sub_match wssub_match; + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + typedef sub_match u16csub_match; + typedef sub_match u32csub_match; + typedef sub_match u16ssub_match; + typedef sub_match u32ssub_match; +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) + typedef sub_match u8csub_match; +#endif +#if defined(SRELL_CPP20_CHAR8_ENABLED) && SRELL_CPP20_CHAR8_ENABLED >= 2 + typedef sub_match u8ssub_match; +#endif + +typedef csub_match u8ccsub_match; +typedef ssub_match u8cssub_match; +#if !defined(SRELL_CPP20_CHAR8_ENABLED) + typedef u8ccsub_match u8csub_match; +#endif +#if !defined(SRELL_CPP20_CHAR8_ENABLED) || SRELL_CPP20_CHAR8_ENABLED < 2 + typedef u8cssub_match u8ssub_match; +#endif + +#if defined(WCHAR_MAX) + #if WCHAR_MAX >= 0x10ffff + typedef wcsub_match u32wcsub_match; + typedef wssub_match u32wssub_match; + typedef u32wcsub_match u1632wcsub_match; + typedef u32wssub_match u1632wssub_match; + #elif WCHAR_MAX >= 0xffff + typedef wcsub_match u16wcsub_match; + typedef wssub_match u16wssub_match; + typedef u16wcsub_match u1632wcsub_match; + typedef u16wssub_match u1632wssub_match; + #endif +#endif + +// ... "regex_sub_match.hpp"] +// ["regex_match_results.hpp" ... + +// 28.10, class template match_results: +template > > +class match_results +{ +public: + + typedef sub_match value_type; + typedef const value_type & const_reference; + typedef const_reference reference; +// typedef implementation defined const_iterator; + typedef typename std::vector::const_iterator const_iterator; + typedef const_iterator iterator; + typedef typename std::iterator_traits::difference_type difference_type; + +#if defined(__cplusplus) && __cplusplus >= 201103L + typedef typename std::allocator_traits::size_type size_type; +#else + typedef typename Allocator::size_type size_type; // TR1. +#endif + + typedef Allocator allocator_type; + typedef typename std::iterator_traits::value_type char_type; + typedef std::basic_string string_type; + +public: + + // 28.10.1, construct/copy/destroy: + // [7.10.1] construct/copy/destroy + explicit match_results(const Allocator &a = Allocator()) : ready_(false), sub_matches_(a) + { + } + + match_results(const match_results &m) + { + operator=(m); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + match_results(match_results &&m) SRELL_NOEXCEPT + { + operator=(std::move(m)); + } +#endif + + match_results &operator=(const match_results &m) + { + if (this != &m) + { +// this->sstate_ = m.sstate_; + this->ready_ = m.ready_; + this->sub_matches_ = m.sub_matches_; + this->prefix_ = m.prefix_; + this->suffix_ = m.suffix_; + this->base_ = m.base_; +#if !defined(SRELL_NO_NAMEDCAPTURE) + this->gnames_ = m.gnames_; +#endif + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + match_results &operator=(match_results &&m) SRELL_NOEXCEPT + { + if (this != &m) + { +// this->sstate_ = std::move(m.sstate_); + this->ready_ = m.ready_; + this->sub_matches_ = std::move(m.sub_matches_); + this->prefix_ = std::move(m.prefix_); + this->suffix_ = std::move(m.suffix_); + this->base_ = m.base_; +#if !defined(SRELL_NO_NAMEDCAPTURE) + this->gnames_ = std::move(m.gnames_); +#endif + } + return *this; + } +#endif + +// ~match_results(); + + // 28.10.2, state: + bool ready() const + { + return ready_; + } + + // 28.10.3, size: + // [7.10.2] size + size_type size() const + { + return sub_matches_.size(); + } + + size_type max_size() const + { + return sub_matches_.max_size(); +// return static_cast(~0) / sizeof (value_type); + } + + bool empty() const + { + return size() == 0; + } + + // 28.10.4, element access: + // [7.10.3] element access + difference_type length(const size_type sub = 0) const + { + return (*this)[sub].length(); + } + + difference_type position(const size_type sub = 0) const + { + const_reference ref = (*this)[sub]; + + return std::distance(base_, ref.first); + } + + string_type str(const size_type sub = 0) const + { + return string_type((*this)[sub]); + } + + const_reference operator[](const size_type n) const + { +#if defined(SRELL_STRICT_IMPL) + return n < sub_matches_.size() ? sub_matches_[n] : unmatched_; +#else + return sub_matches_[n]; +#endif + } + +#if !defined(SRELL_NO_NAMEDCAPTURE) + + // Helpers for overload resolution of the integer literal 0 of signed types. + template + difference_type length(const IntegerType zero) const + { + return length(static_cast(zero)); + } + template + difference_type position(const IntegerType zero) const + { + return position(static_cast(zero)); + } + template + string_type str(const IntegerType zero) const + { + return str(static_cast(zero)); + } + template + const_reference operator[](const IntegerType zero) const + { + return operator[](static_cast(zero)); + } + + difference_type length(const string_type &sub) const + { + return (*this)[sub].length(); + } + + difference_type position(const string_type &sub) const + { + const_reference ref = (*this)[sub]; + + return std::distance(base_, ref.first); + } + + string_type str(const string_type &sub) const + { + return string_type((*this)[sub]); + } + + const_reference operator[](const string_type &sub) const + { + return sub_matches_[lookup_and_check_backref_number(sub.c_str(), sub.c_str() + sub.size())]; + } + + difference_type length(const char_type *sub) const + { + return (*this)[sub].length(); + } + + difference_type position(const char_type *sub) const + { + const_reference ref = (*this)[sub]; + + return std::distance(base_, ref.first); + } + + string_type str(const char_type *sub) const + { + return string_type((*this)[sub]); + } + + const_reference operator[](const char_type *sub) const + { + return sub_matches_[lookup_and_check_backref_number(sub, sub + std::char_traits::length(sub))]; + } + +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + + const_reference prefix() const + { + return prefix_; + } + + const_reference suffix() const + { + return suffix_; + } + + const_iterator begin() const + { + return sub_matches_.begin(); + } + + const_iterator end() const + { + return sub_matches_.end(); + } + + const_iterator cbegin() const + { + return sub_matches_.begin(); + } + + const_iterator cend() const + { + return sub_matches_.end(); + } + + // 28.10.5, format: + // [7.10.4] format + template + OutputIter format( + OutputIter out, + const char_type *fmt_first, + const char_type *const fmt_last, + regex_constants::match_flag_type /* flags */ = regex_constants::format_default + ) const + { + if (this->ready() && !this->empty()) + { +#if !defined(SRELL_NO_NAMEDCAPTURE) + const bool no_groupnames = gnames_.size() == 0; +#endif + const value_type &m0 = (*this)[0]; + + while (fmt_first != fmt_last) + { + if (*fmt_first != static_cast(regex_internal::meta_char::mc_dollar)) // '$' + { + *out++ = *fmt_first++; + } + else + { + ++fmt_first; + if (fmt_first == fmt_last) + { + *out++ = regex_internal::meta_char::mc_dollar; // '$'; + } + else if (*fmt_first == static_cast(regex_internal::char_other::co_amp)) // '&', $& + { + out = std::copy(m0.first, m0.second, out); + ++fmt_first; + } + else if (*fmt_first == static_cast(regex_internal::char_other::co_grav)) // '`', $`, prefix. + { + out = std::copy(this->prefix().first, this->prefix().second, out); + ++fmt_first; + } + else if (*fmt_first == static_cast(regex_internal::char_other::co_apos)) // '\'', $', suffix. + { + out = std::copy(this->suffix().first, this->suffix().second, out); + ++fmt_first; + } +#if !defined(SRELL_NO_NAMEDCAPTURE) + else if (*fmt_first == static_cast(regex_internal::meta_char::mc_lt) && !no_groupnames) // '<', $< + { + const char_type *const current_backup = fmt_first; + bool replaced = false; + + if (++fmt_first == fmt_last) + ; // Do nothing. + else + { + const char_type *const name_begin = fmt_first; + + for (;; ++fmt_first) + { + if (*fmt_first == static_cast(regex_internal::meta_char::mc_gt)) + { + const regex_internal::uint_l32 backref_number = lookup_backref_number(name_begin, fmt_first); + + if (backref_number != regex_internal::groupname_mapper::notfound) + { + const value_type &mn = (*this)[backref_number]; + + if (mn.matched) + out = std::copy(mn.first, mn.second, out); +// replaced = true; + } + replaced = true; + ++fmt_first; + break; + } + if (fmt_first == fmt_last) + break; + } + } + if (!replaced) + { + fmt_first = current_backup; + *out++ = regex_internal::meta_char::mc_dollar; // '$'; + } + } +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + else + { + const char_type *const backup_pos = fmt_first; + size_type backref_number = 0; + + if (fmt_first != fmt_last && *fmt_first >= static_cast(regex_internal::char_alnum::ch_0) && *fmt_first <= static_cast(regex_internal::char_alnum::ch_9)) // '0'-'9' + { + backref_number += *fmt_first - regex_internal::char_alnum::ch_0; // '0'; + + if (++fmt_first != fmt_last && *fmt_first >= static_cast(regex_internal::char_alnum::ch_0) && *fmt_first <= static_cast(regex_internal::char_alnum::ch_9)) // '0'-'9' + { + backref_number *= 10; + backref_number += *fmt_first - regex_internal::char_alnum::ch_0; // '0'; + ++fmt_first; + } + } + + if (backref_number && backref_number < this->size()) + { + const value_type &mn = (*this)[backref_number]; + + if (mn.matched) + out = std::copy(mn.first, mn.second, out); + } + else + { + *out++ = regex_internal::meta_char::mc_dollar; // '$'; + + fmt_first = backup_pos; + if (*fmt_first == static_cast(regex_internal::meta_char::mc_dollar)) + ++fmt_first; + } + } + } + } + } + return out; + } + + template + OutputIter format( + OutputIter out, + const std::basic_string &fmt, + regex_constants::match_flag_type flags = regex_constants::format_default + ) const + { + return format(out, fmt.data(), fmt.data() + fmt.size(), flags); + } + + template + std::basic_string format( + const string_type &fmt, + regex_constants::match_flag_type flags = regex_constants::format_default + ) const + { + std::basic_string result; + +// format(std::back_insert_iterator(result), fmt, flags); + format(std::back_inserter(result), fmt, flags); + return result; + } + + string_type format(const char_type *fmt, regex_constants::match_flag_type flags = regex_constants::format_default) const + { + string_type result; + + format(std::back_inserter(result), fmt, fmt + std::char_traits::length(fmt), flags); + return result; + } + + // 28.10.6, allocator: + // [7.10.5] allocator + allocator_type get_allocator() const + { + return allocator_type(); + } + + // 28.10.7, swap: + // [7.10.6] swap + void swap(match_results &that) + { + const match_results tmp(that); + that = *this; + *this = tmp; + } + +public: // For internal. + + typedef match_results match_results_type; + typedef typename match_results_type::size_type match_results_size_type; + typedef typename regex_internal::re_search_state search_state_type; + + search_state_type sstate_; + + void clear_() + { + ready_ = false; + sub_matches_.clear(); +// prefix_.matched = false; +// suffix_.matched = false; +#if !defined(SRELL_NO_NAMEDCAPTURE) + gnames_.clear(); +#endif + } + +// template +#if !defined(SRELL_NO_NAMEDCAPTURE) + bool set_match_results_(const regex_internal::groupname_mapper &gnames) +#else + bool set_match_results_() +#endif + { + sub_matches_.resize(sstate_.bracket.size()); +// value_type &m0 = sub_matches_[0]; + + sub_matches_[0].matched = true; + + for (regex_internal::uint_l32 i = 1; i < static_cast(sstate_.bracket.size()); ++i) + { + const typename search_state_type::submatch_type &br = sstate_.bracket[i]; + value_type &sm = sub_matches_[i]; + + sm.first = br.core.open_at; + sm.second = br.core.close_at; + sm.matched = br.counter != 0; + } + + base_ = sstate_.lblim; + prefix_.first = sstate_.srchbegin; + prefix_.second = sub_matches_[0].first = sstate_.bracket[0].core.open_at; + suffix_.first = sub_matches_[0].second = sstate_.nth.in_string; + suffix_.second = sstate_.srchend; + + prefix_.matched = prefix_.first != prefix_.second; // The spec says prefix().first != prefix().second + suffix_.matched = suffix_.first != suffix_.second; // The spec says suffix().first != suffix().second + +#if !defined(SRELL_NO_NAMEDCAPTURE) + gnames_ = gnames; +#endif + ready_ = true; + return true; + } + + bool set_match_results_bmh_() + { + sub_matches_.resize(1); +// value_type &m0 = sub_matches_[0]; + + sub_matches_[0].matched = true; + + base_ = sstate_.lblim; + prefix_.first = sstate_.srchbegin; + prefix_.second = sub_matches_[0].first = sstate_.nth.in_string; + suffix_.first = sub_matches_[0].second = sstate_.nextpos; + suffix_.second = sstate_.srchend; + + prefix_.matched = prefix_.first != prefix_.second; + suffix_.matched = suffix_.first != suffix_.second; + + ready_ = true; + return true; + } + + void set_prefix_first_(const BidirectionalIterator pf) + { + prefix_.first = pf; + } + + bool mark_as_failed_() + { + ready_ = true; // 30.11.2 and 3: Postconditions: m.ready() == true in all cases. + return false; + } + +private: + +#if !defined(SRELL_NO_NAMEDCAPTURE) + + regex_internal::uint_l32 lookup_backref_number(const char_type *begin, const char_type *const end) const + { + typename regex_internal::groupname_mapper::gname_string key(end - begin); + + for (std::size_t i = 0; begin != end; ++begin, ++i) + key[i] = *begin; + + return gnames_[key]; + } + + regex_internal::uint_l32 lookup_and_check_backref_number(const char_type *begin, const char_type *const end) const + { + const regex_internal::uint_l32 backrefno = lookup_backref_number(begin, end); + + if (backrefno == regex_internal::groupname_mapper::notfound) + throw regex_error(regex_constants::error_backref); + + return backrefno; + } + +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + +public: // For debug. + + template + void print_sub_matches(const BasicRegexT &, const int) const; + void print_addresses(const value_type &, const char *const) const; + +private: + + typedef std::vector sub_match_array; + + bool ready_; + sub_match_array sub_matches_; + value_type prefix_; + value_type suffix_; + BidirectionalIterator base_; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + regex_internal::groupname_mapper gnames_; +#endif +#if defined(SRELL_STRICT_IMPL) + value_type unmatched_; +#endif +}; + +// 28.10.7, match_results swap: +// [7.10.6] match_results swap +template +void swap( + match_results &m1, + match_results &m2 +) +{ + m1.swap(m2); +} + +// 28.10.8, match_results comparisons +template +bool operator==( + const match_results &m1, + const match_results &m2 +) +{ + if (!m1.ready() && !m2.ready()) + return true; + + if (m1.ready() && m2.ready()) + { + if (m1.empty() && m2.empty()) + return true; + + if (!m1.empty() && !m2.empty()) + { + return m1.prefix() == m2.prefix() && m1.size() == m2.size() && std::equal(m1.begin(), m1.end(), m2.begin()) && m1.suffix() == m2.suffix(); + } + } + return false; +} + +template +bool operator!=( + const match_results &m1, + const match_results &m2 +) +{ + return !(m1 == m2); +} + +typedef match_results cmatch; +typedef match_results wcmatch; +typedef match_results smatch; +typedef match_results wsmatch; + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + typedef match_results u16cmatch; + typedef match_results u32cmatch; + typedef match_results u16smatch; + typedef match_results u32smatch; +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) + typedef match_results u8cmatch; +#endif +#if defined(SRELL_CPP20_CHAR8_ENABLED) && SRELL_CPP20_CHAR8_ENABLED >= 2 + typedef match_results u8smatch; +#endif + +typedef cmatch u8ccmatch; +typedef smatch u8csmatch; +#if !defined(SRELL_CPP20_CHAR8_ENABLED) + typedef u8ccmatch u8cmatch; +#endif +#if !defined(SRELL_CPP20_CHAR8_ENABLED) || SRELL_CPP20_CHAR8_ENABLED < 2 + typedef u8csmatch u8smatch; +#endif + +#if defined(WCHAR_MAX) + #if WCHAR_MAX >= 0x10ffff + typedef wcmatch u32wcmatch; + typedef wsmatch u32wsmatch; + typedef u32wcmatch u1632wcmatch; + typedef u32wsmatch u1632wsmatch; + #elif WCHAR_MAX >= 0xffff + typedef wcmatch u16wcmatch; + typedef wsmatch u16wsmatch; + typedef u16wcmatch u1632wcmatch; + typedef u16wsmatch u1632wsmatch; + #endif +#endif + +// ... "regex_match_results.hpp"] +// ["rei_algorithm.hpp" ... + + namespace regex_internal + { + +template +class regex_object : public re_compiler +{ +public: + + template + bool search + ( + const BidirectionalIterator begin, + const BidirectionalIterator end, + const BidirectionalIterator lookbehind_limit, + match_results &results, + const regex_constants::match_flag_type flags /* = regex_constants::match_default */ + ) const + { + results.clear_(); + +// results.sstate_.template init(begin, end, lookbehind_limit, flags); + results.sstate_.init(begin, end, lookbehind_limit, flags); + + if (results.sstate_.match_continuous_flag()) + { + if (this->NFA_states.size()) + { + results.sstate_.set_entrypoint(this->NFA_states[0].next_state2); + goto DO_SEARCH; + } + } + else +#if !defined(SRELLDBG_NO_BMH) + if (this->bmdata) + { +#if !defined(SRELL_NO_ICASE) + if (!this->is_ricase() ? this->bmdata->do_casesensitivesearch(results.sstate_, typename std::iterator_traits::iterator_category()) : this->bmdata->do_icasesearch(results.sstate_, typename std::iterator_traits::iterator_category())) +#else + if (this->bmdata->do_casesensitivesearch(results.sstate_, typename std::iterator_traits::iterator_category())) +#endif + return results.set_match_results_bmh_(); + } + else +#endif + if (this->NFA_states.size()) + { + results.sstate_.set_entrypoint(this->NFA_states[0].next_state1); + + DO_SEARCH: + results.sstate_.init_for_automaton(this->number_of_brackets, this->number_of_counters, this->number_of_repeats); + +#if !defined(SRELL_NO_ICASE) + if (!this->is_ricase() ? do_search(results) : do_search(results)) +#else + if (do_search(results)) +#endif + { +#if !defined(SRELL_NO_NAMEDCAPTURE) + return results.set_match_results_(this->namedcaptures); +#else + return results.set_match_results_(); +#endif + } + } + return results.mark_as_failed_(); + } + +private: + + typedef typename traits::utf_traits utf_traits; + + template + bool do_search + ( + match_results &results + ) const + { + re_search_state &sstate = results.sstate_; + const BidirectionalIterator searchend = sstate.nth.in_string; + + for (;;) + { + const bool final = sstate.nextpos == searchend; + + sstate.nth.in_string = sstate.nextpos; + + if (!final) + { + +#ifdef SRELLDBG_NO_1STCHRCLS + utf_traits::codepoint_inc(sstate.nextpos, sstate.srchend); +#else + { + #if !defined(SRELLDBG_NO_BITSET) + if (!this->firstchar_class_bs.test((*sstate.nextpos++) & utf_traits::bitsetmask)) + #else + const uchar32 firstchar = utf_traits::codepoint_inc(sstate.nextpos, sstate.srchend); + + if (!this->firstchar_class.is_included(firstchar)) + #endif + continue; + } +#endif + } + // Even when final == true, we have to try for such expressions + // as "" =~ /^$/ or "..." =~ /$/. + +#if defined(SRELL_NO_LIMIT_COUNTER) + sstate.reset(/* first */); +#else + sstate.reset(/* first, */ this->limit_counter); +#endif + if (run_automaton(sstate /* , false */)) + return true; + + if (final) + break; + } + return false; + } + + template + struct casehelper + { + static T canonicalise(const T t) + { + return t; + } + }; + + template + struct casehelper + { + static T canonicalise(const T t) + { + return unicode_case_folding::do_casefolding(t); + } + }; + + template + bool run_automaton + ( +// match_results &results, + re_search_state &sstate +// , const bool is_recursive /* = false */ + ) const + { + typedef casehelper casehelper_type; + typedef typename re_object_core::state_type state_type; + typedef re_search_state ss_type; +// typedef typename ss_type::search_core_state scstate_type; + typedef typename ss_type::submatch_type submatch_type; + typedef typename ss_type::submatchcore_type submatchcore_type; + typedef typename ss_type::counter_type counter_type; + typedef typename ss_type::position_type position_type; + bool is_matched; + + goto START; + + JUDGE: + if (is_matched) + { + MATCHED: + sstate.nth.in_NFA_states = sstate.nth.in_NFA_states->next_state1; + } + else + { + NOT_MATCHED: + +#if !defined(SRELL_NO_LIMIT_COUNTER) + if (--sstate.failure_counter) + { +#endif + if (sstate.bt_stack.size() > sstate.btstack_size) + { + sstate.nth = sstate.bt_stack.back(); + sstate.bt_stack.pop_back(); + + sstate.nth.in_NFA_states = sstate.nth.in_NFA_states->next_state2; +// continue; + } + else + { + return false; + } +#if !defined(SRELL_NO_LIMIT_COUNTER) + } + else + throw regex_error(regex_constants::error_complexity); +#endif + } + +// START: + for (;;) + { + START: + const state_type ¤t_NFA = *sstate.nth.in_NFA_states; + + switch (current_NFA.type) + { + case st_character: + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (!reverse) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + if (!sstate.is_at_srchend()) + { +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + const BidirectionalIterator prevpos = sstate.nth.in_string; +#endif + const uchar32 uchar = casehelper_type::canonicalise(utf_traits::codepoint_inc(sstate.nth.in_string, sstate.srchend)); + RETRY_CF: + const state_type ¤t_NFA2 = *sstate.nth.in_NFA_states; + + if (current_NFA2.character == uchar) + goto MATCHED; + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + if (current_NFA2.next_state2) + { + sstate.nth.in_NFA_states = current_NFA2.next_state2; + + if (sstate.nth.in_NFA_states->type == st_character) + goto RETRY_CF; + + sstate.nth.in_string = prevpos; + continue; + } +#endif + } +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + else if (current_NFA.next_state2) + { + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + } +#endif + } + else // reverse == true. + { + if (!sstate.is_at_lookbehindlimit()) + { +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + const BidirectionalIterator prevpos = sstate.nth.in_string; +#endif + const uchar32 uchar = casehelper_type::canonicalise(utf_traits::dec_codepoint(sstate.nth.in_string, sstate.lblim)); + RETRY_CB: + const state_type ¤t_NFA2 = *sstate.nth.in_NFA_states; + + if (current_NFA2.character == uchar) + goto MATCHED; + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + if (current_NFA2.next_state2) + { + sstate.nth.in_NFA_states = current_NFA2.next_state2; + + if (sstate.nth.in_NFA_states->type == st_character) + goto RETRY_CB; + + sstate.nth.in_string = prevpos; + continue; + } +#endif + } +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + else if (current_NFA.next_state2) + { + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + } +#endif + } + goto NOT_MATCHED; + + case st_character_class: + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (!reverse) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + if (!sstate.is_at_srchend()) + { +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + const BidirectionalIterator prevpos = sstate.nth.in_string; +#endif + const uchar32 uchar = utf_traits::codepoint_inc(sstate.nth.in_string, sstate.srchend); +// RETRY_CCF: + const state_type ¤t_NFA2 = *sstate.nth.in_NFA_states; + +#if !defined(SRELLDBG_NO_CCPOS) + if (this->character_class.is_included(current_NFA2.quantifier.offset, current_NFA2.quantifier.length, uchar)) +#else + if (this->character_class.is_included(current_NFA2.number, uchar)) +#endif + goto MATCHED; + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + if (current_NFA2.next_state2) + { + sstate.nth.in_NFA_states = current_NFA2.next_state2; + +// if (sstate.nth.in_NFA_states->type == st_character_class) +// goto RETRY_CCF; + + sstate.nth.in_string = prevpos; + continue; + } +#endif + } +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + else if (current_NFA.next_state2) + { + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + } +#endif + } + else // reverse == true. + { + if (!sstate.is_at_lookbehindlimit()) + { +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + const BidirectionalIterator prevpos = sstate.nth.in_string; +#endif + const uchar32 uchar = utf_traits::dec_codepoint(sstate.nth.in_string, sstate.lblim); +// RETRY_CCB: + const state_type ¤t_NFA2 = *sstate.nth.in_NFA_states; + +#if !defined(SRELLDBG_NO_CCPOS) + if (this->character_class.is_included(current_NFA2.quantifier.offset, current_NFA2.quantifier.length, uchar)) +#else + if (this->character_class.is_included(current_NFA2.number, uchar)) +#endif + goto MATCHED; + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + if (current_NFA2.next_state2) + { + sstate.nth.in_NFA_states = current_NFA2.next_state2; + +// if (sstate.nth.in_NFA_states->type == st_character_class) +// goto RETRY_CCB; + + sstate.nth.in_string = prevpos; + continue; + } +#endif + } +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + else if (current_NFA.next_state2) + { + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + } +#endif + } + goto NOT_MATCHED; + + case st_epsilon: + +#if defined(SRELLDBG_NO_SKIP_EPSILON) + if (current_NFA.next_state2) +#endif + { + sstate.bt_stack.push_back(sstate.nth); // sstate.push(); + } + + sstate.nth.in_NFA_states = current_NFA.next_state1; + continue; + + default: + switch (current_NFA.type) + { + + case st_check_counter: + { + const uint_l32 counter = sstate.counter[current_NFA.number]; + + if (counter < current_NFA.quantifier.atmost) + { + ++sstate.counter[current_NFA.number]; + + LOOP_WITHOUT_INCREMENT: + + if (counter >= current_NFA.quantifier.atleast) + { + sstate.bt_stack.push_back(sstate.nth); + sstate.nth.in_NFA_states = current_NFA.next_state1; + } + else + { + sstate.nth.in_NFA_states + = current_NFA.quantifier.is_greedy + ? current_NFA.next_state1 + : current_NFA.next_state2; + } + } + else + { + if (current_NFA.quantifier.is_infinity()) + goto LOOP_WITHOUT_INCREMENT; + + sstate.nth.in_NFA_states + = current_NFA.quantifier.is_greedy + ? current_NFA.next_state2 + : current_NFA.next_state1; + } + } + continue; + + case st_decrement_counter: + --sstate.counter[current_NFA.number]; + goto NOT_MATCHED; + + case st_save_and_reset_counter: + { + counter_type &c = sstate.counter[current_NFA.number]; + + sstate.counter_stack.push_back(c); + sstate.bt_stack.push_back(sstate.nth); + c = 0; + } + goto MATCHED; + + case st_restore_counter: + sstate.counter[current_NFA.number] = sstate.counter_stack.back(); + sstate.counter_stack.pop_back(); + goto NOT_MATCHED; + + case st_roundbracket_open: // '(': + { + submatch_type &bracket = sstate.bracket[current_NFA.number]; + + sstate.capture_stack.push_back(bracket.core); + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (!reverse) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + bracket.core.open_at = sstate.nth.in_string; + } + else + bracket.core.close_at = sstate.nth.in_string; + + ++bracket.counter; + + for (uint_l32 brno = current_NFA.quantifier.atleast; brno <= current_NFA.quantifier.atmost; ++brno) + { + submatch_type &inner_bracket = sstate.bracket[brno]; + + sstate.capture_stack.push_back(inner_bracket.core); + sstate.counter_stack.push_back(inner_bracket.counter); + inner_bracket.core.open_at = inner_bracket.core.close_at = sstate.srchend; + inner_bracket.counter = 0; + // ECMAScript spec (3-5.1) 15.10.2.5, NOTE 3. + // ECMAScript 2018 (ES9) 21.2.2.5.1, Note 3. + } + + sstate.bt_stack.push_back(sstate.nth); + } + goto MATCHED; + + case st_roundbracket_pop: // '/': + { + for (uint_l32 brno = current_NFA.quantifier.atmost; brno >= current_NFA.quantifier.atleast; --brno) + { + submatch_type &inner_bracket = sstate.bracket[brno]; + + inner_bracket.counter = sstate.counter_stack.back(); + inner_bracket.core = sstate.capture_stack.back(); + sstate.counter_stack.pop_back(); + sstate.capture_stack.pop_back(); + } + + submatch_type &bracket = sstate.bracket[current_NFA.number]; + + bracket.core = sstate.capture_stack.back(); + sstate.capture_stack.pop_back(); + --bracket.counter; + } + goto NOT_MATCHED; + + case st_roundbracket_close: // ')': + { + submatch_type &bracket = sstate.bracket[current_NFA.number]; + submatchcore_type &brc = bracket.core; + + if ((!reverse ? brc.open_at : brc.close_at) != sstate.nth.in_string) + { + sstate.nth.in_NFA_states = current_NFA.next_state1; + } + else // 0 width match, breaks from the loop. + { + if (current_NFA.next_state1->type != st_check_counter) + { + if (bracket.counter > 1) + goto NOT_MATCHED; // ECMAScript spec 15.10.2.5, note 4. + + sstate.nth.in_NFA_states = current_NFA.next_state2; + // Accepts 0 width match and exits. + } + else + { + // A pair with check_counter. + const counter_type counter = sstate.counter[current_NFA.next_state1->number]; + + if (counter > current_NFA.next_state1->quantifier.atleast) + goto NOT_MATCHED; // Takes a captured string in the previous loop. + + sstate.nth.in_NFA_states = current_NFA.next_state1; + // Accepts 0 width match and continues. + } + } +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (!reverse) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + brc.close_at = sstate.nth.in_string; + } + else // reverse == true. + { + brc.open_at = sstate.nth.in_string; + } + } + continue; + + case st_repeat_in_push: + { + position_type &r = sstate.repeat[current_NFA.number]; + + sstate.repeat_stack.push_back(r); + r = sstate.nth.in_string; + + for (uint_l32 brno = current_NFA.quantifier.atleast; brno <= current_NFA.quantifier.atmost; ++brno) + { + submatch_type &inner_bracket = sstate.bracket[brno]; + + sstate.capture_stack.push_back(inner_bracket.core); + sstate.counter_stack.push_back(inner_bracket.counter); + inner_bracket.core.open_at = inner_bracket.core.close_at = sstate.srchend; + inner_bracket.counter = 0; + // ECMAScript 2019 (ES10) 21.2.2.5.1, Note 3. + } + sstate.bt_stack.push_back(sstate.nth); + } + goto MATCHED; + + case st_repeat_in_pop: + for (uint_l32 brno = current_NFA.quantifier.atmost; brno >= current_NFA.quantifier.atleast; --brno) + { + submatch_type &inner_bracket = sstate.bracket[brno]; + + inner_bracket.counter = sstate.counter_stack.back(); + inner_bracket.core = sstate.capture_stack.back(); + sstate.counter_stack.pop_back(); + sstate.capture_stack.pop_back(); + } + + sstate.repeat[current_NFA.number] = sstate.repeat_stack.back(); + sstate.repeat_stack.pop_back(); + goto NOT_MATCHED; + + case st_check_0_width_repeat: + if (sstate.nth.in_string != sstate.repeat[current_NFA.number]) + goto MATCHED; + + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + + case st_backreference: // '\\': + { + const submatch_type &bracket = sstate.bracket[current_NFA.number]; + + if (!bracket.counter) // Undefined. + { + ESCAPE_FROM_ZERO_WIDTH_MATCH: + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + } + else + { + const submatchcore_type &brc = bracket.core; + + if (brc.open_at == brc.close_at) + { + goto ESCAPE_FROM_ZERO_WIDTH_MATCH; + } + else + { +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (!reverse) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + for (BidirectionalIterator backrefpos = brc.open_at; backrefpos != brc.close_at;) + { + if (!sstate.is_at_srchend()) + { + const uchar32 uchartxt = utf_traits::codepoint_inc(sstate.nth.in_string, sstate.srchend); + const uchar32 ucharref = utf_traits::codepoint_inc(backrefpos, brc.close_at); + + if (casehelper_type::canonicalise(uchartxt) == casehelper_type::canonicalise(ucharref)) + continue; + } + goto NOT_MATCHED; + } + } + else // reverse == true. + { + for (BidirectionalIterator backrefpos = brc.close_at; backrefpos != brc.open_at;) + { + if (!sstate.is_at_lookbehindlimit()) + { + const uchar32 uchartxt = utf_traits::dec_codepoint(sstate.nth.in_string, sstate.lblim); + const uchar32 ucharref = utf_traits::dec_codepoint(backrefpos, brc.open_at); + + if (casehelper_type::canonicalise(uchartxt) == casehelper_type::canonicalise(ucharref)) + continue; + } + goto NOT_MATCHED; + } + } + } + } + } + goto MATCHED; + + case st_lookaround_open: + { + for (uint_l32 i = 1; i < this->number_of_brackets; ++i) + { + const submatch_type &sm = sstate.bracket[i]; + sstate.capture_stack.push_back(sm.core); + sstate.counter_stack.push_back(sm.counter); + } + + for (uint_l32 i = 0; i < this->number_of_counters; ++i) + sstate.counter_stack.push_back(sstate.counter[i]); + + for (uint_l32 i = 0; i < this->number_of_repeats; ++i) + sstate.repeat_stack.push_back(sstate.repeat[i]); + + const typename ss_type::bottom_state backup_bottom(sstate.btstack_size, sstate.capture_stack.size(), sstate.counter_stack.size(), sstate.repeat_stack.size()); + const BidirectionalIterator orgpos = sstate.nth.in_string; + + sstate.btstack_size = sstate.bt_stack.size(); + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) && !defined(SRELLDBG_NO_MPREWINDER) + if (current_NFA.quantifier.atleast == 2) + { + sstate.repeat_stack.push_back(sstate.lblim); + sstate.lblim = sstate.srchbegin; + } +#endif + +#if defined(SRELL_FIXEDWIDTHLOOKBEHIND) + +// if (current_NFA.reverse) + { + for (uint_l32 i = 0; i < current_NFA.quantifier.atleast; ++i) + { + if (!sstate.is_at_lookbehindlimit()) + { + utf_traits::dec_codepoint(sstate.nth.in_string, sstate.lblim); + continue; + } + is_matched = false; + goto AFTER_LOOKAROUND; + } + } +#endif + sstate.nth.in_NFA_states = current_NFA.next_state2; + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + is_matched = current_NFA.quantifier.atleast == 0 ? run_automaton(sstate /* , true */) : run_automaton(sstate /* , true */); +#else + is_matched = run_automaton(sstate /* , true */); +#endif + +#if defined(SRELL_FIXEDWIDTHLOOKBEHIND) + AFTER_LOOKAROUND: +#endif + { + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) && !defined(SRELLDBG_NO_MPREWINDER) + if (current_NFA.quantifier.atleast == 2) + { + sstate.lblim = sstate.repeat_stack[backup_bottom.repeatstack_size]; + if (is_matched) + sstate.bracket[0].core.open_at = sstate.nth.in_string; + } +#endif + +#if defined(SRELL_ENABLE_GT) + if (current_NFA.character != meta_char::mc_gt) // '>' +#endif + { + sstate.nth.in_string = orgpos; + } + sstate.bt_stack.resize(sstate.btstack_size); + + sstate.btstack_size = backup_bottom.btstack_size; + sstate.capture_stack.resize(backup_bottom.capturestack_size); + sstate.counter_stack.resize(backup_bottom.counterstack_size); + sstate.repeat_stack.resize(backup_bottom.repeatstack_size); + + is_matched ^= current_NFA.is_not; + } + } + if (is_matched) + { + sstate.nth.in_NFA_states = current_NFA.next_state1; + continue; + } + +// case st_lookaround_pop: + for (uint_l32 i = this->number_of_repeats; i;) + { + sstate.repeat[--i] = sstate.repeat_stack.back(); + sstate.repeat_stack.pop_back(); + } + + for (uint_l32 i = this->number_of_counters; i;) + { + sstate.counter[--i] = sstate.counter_stack.back(); + sstate.counter_stack.pop_back(); + } + + for (uint_l32 i = this->number_of_brackets; i > 1;) + { + submatch_type &sm = sstate.bracket[--i]; + + sm.counter = sstate.counter_stack.back(); + sm.core = sstate.capture_stack.back(); + sstate.counter_stack.pop_back(); + sstate.capture_stack.pop_back(); + } + goto NOT_MATCHED; + + case st_bol: // '^': + if (sstate.is_at_lookbehindlimit() && !sstate.match_prev_avail_flag()) + { + if (!sstate.match_not_bol_flag()) + goto MATCHED; + } + // !sstate.is_at_lookbehindlimit() || sstate.match_prev_avail_flag() + else if (current_NFA.multiline) + { + const uchar32 prevchar = utf_traits::prevcodepoint(sstate.nth.in_string, sstate.lblim); + + if (this->character_class.is_included(re_character_class::newline, prevchar)) + goto MATCHED; + } + goto NOT_MATCHED; + + case st_eol: // '$': + if (sstate.is_at_srchend()) + { + if (!sstate.match_not_eol_flag()) + goto MATCHED; + } + else if (current_NFA.multiline) + { + const uchar32 nextchar = utf_traits::codepoint(sstate.nth.in_string, sstate.srchend); + + if (this->character_class.is_included(re_character_class::newline, nextchar)) + goto MATCHED; + } + goto NOT_MATCHED; + + case st_boundary: // '\b' '\B' + is_matched = current_NFA.is_not; +// is_matched = current_NFA.character == char_alnum::ch_B; + + // First, suppose the previous character is not \w but \W. + + if (sstate.is_at_srchend()) + { + if (sstate.match_not_eow_flag()) + is_matched = !is_matched; + } + else if (this->character_class.is_included(current_NFA.number, utf_traits::codepoint(sstate.nth.in_string, sstate.srchend))) + { + is_matched = !is_matched; + } + // \W/last \w + // \b false true + // \B true false + + // Second, if the actual previous character is \w, flip is_matched. + + if (sstate.is_at_lookbehindlimit() && !sstate.match_prev_avail_flag()) + { + if (sstate.match_not_bow_flag()) + is_matched = !is_matched; + } + // !sstate.is_at_lookbehindlimit() || sstate.match_prev_avail_flag() + else if (this->character_class.is_included(current_NFA.number, utf_traits::prevcodepoint(sstate.nth.in_string, sstate.lblim))) + { + is_matched = !is_matched; + } + // \b \B + // pre cur \W/last \w pre cur \W/last \w + // \W/base false true \W/base true false + // \w true false \w false true + + goto JUDGE; + + case st_success: // == lookaround_close. +// if (is_recursive) + if (sstate.btstack_size) + return true; + + if + ( + (!sstate.match_not_null_flag() || !sstate.is_null()) + && + (!sstate.match_match_flag() || sstate.is_at_srchend()) + ) + return true; + + goto NOT_MATCHED; + +#if !defined(SRELLDBG_NO_NEXTPOS_OPT) + case st_move_nextpos: +#if !defined(SRELLDBG_NO_1STCHRCLS) && !defined(SRELLDBG_NO_BITSET) + sstate.nextpos = sstate.nth.in_string; + if (!sstate.is_at_srchend()) + ++sstate.nextpos; +#else // defined(SRELLDBG_NO_1STCHRCLS) || defined(SRELLDBG_NO_BITSET) + if (sstate.nth.in_string != sstate.bracket[0].core.open_at) + { + sstate.nextpos = sstate.nth.in_string; + if (!sstate.is_at_srchend()) + utf_traits::codepoint_inc(sstate.nextpos, sstate.srchend); + } +#endif + goto MATCHED; +#endif + + default: + // Reaching here means that this->NFA_states is corrupted. + throw regex_error(regex_constants::error_internal); + + } + } + } + } +}; +// regex_object + + } // namespace regex_internal + +// ... "rei_algorithm.hpp"] +// ["basic_regex.hpp" ... + +// 28.8, class template basic_regex: +template > +class basic_regex : public regex_internal::regex_object +{ +public: + + // Types: + typedef charT value_type; + typedef traits traits_type; + typedef typename traits::string_type string_type; + typedef regex_constants::syntax_option_type flag_type; + typedef typename traits::locale_type locale_type; + + // 28.8.1, constants: + // [7.8.1] constants + static const regex_constants::syntax_option_type icase = regex_constants::icase; + static const regex_constants::syntax_option_type nosubs = regex_constants::nosubs; + static const regex_constants::syntax_option_type optimize = regex_constants::optimize; + static const regex_constants::syntax_option_type collate = regex_constants::collate; + static const regex_constants::syntax_option_type ECMAScript = regex_constants::ECMAScript; + static const regex_constants::syntax_option_type basic = regex_constants::basic; + static const regex_constants::syntax_option_type extended = regex_constants::extended; + static const regex_constants::syntax_option_type awk = regex_constants::awk; + static const regex_constants::syntax_option_type grep = regex_constants::grep; + static const regex_constants::syntax_option_type egrep = regex_constants::egrep; + static const regex_constants::syntax_option_type multiline = regex_constants::multiline; + + static const regex_constants::syntax_option_type dotall = regex_constants::dotall; + + // 28.8.2, construct/copy/destroy: + // [7.8.2] construct/copy/destroy + basic_regex() + { + } + + explicit basic_regex(const charT *const p, const flag_type f = regex_constants::ECMAScript) + { + assign(p, p + std::char_traits::length(p), f); + } + + basic_regex(const charT *const p, const std::size_t len, const flag_type f = regex_constants::ECMAScript) + { + assign(p, p + len, f); + } + + basic_regex(const basic_regex &e) + { + assign(e); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + basic_regex(basic_regex &&e) SRELL_NOEXCEPT + { + assign(std::move(e)); + } +#endif + + template + explicit basic_regex(const std::basic_string &p, const flag_type f = regex_constants::ECMAScript) + { + assign(p, f); + } + + template + basic_regex(ForwardIterator first, ForwardIterator last, const flag_type f = regex_constants::ECMAScript) + { + assign(first, last, f); + } + +#if defined(SRELL_CPP11_INITIALIZER_LIST_ENABLED) + basic_regex(std::initializer_list il, const flag_type f = regex_constants::ECMAScript) + { + assign(il, f); + } +#endif + +// ~basic_regex(); + + basic_regex &operator=(const basic_regex &right) + { + return assign(right); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + basic_regex &operator=(basic_regex &&e) SRELL_NOEXCEPT + { + return assign(std::move(e)); + } +#endif + + basic_regex &operator=(const charT *const ptr) + { + return assign(ptr); + } + +#if defined(SRELL_CPP11_INITIALIZER_LIST_ENABLED) + basic_regex &operator=(std::initializer_list il) + { + return assign(il.begin(), il.end()); + } +#endif + + template + basic_regex &operator=(const std::basic_string &p) + { + return assign(p); + } + + // 28.8.3, assign: + // [7.8.3] assign + basic_regex &assign(const basic_regex &right) + { + regex_internal::re_object_core::operator=(right); + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + basic_regex &assign(basic_regex &&right) SRELL_NOEXCEPT + { + regex_internal::re_object_core::operator=(std::move(right)); + return *this; + } +#endif + + basic_regex &assign(const charT *const ptr, const flag_type f = regex_constants::ECMAScript) + { + return assign(ptr, ptr + std::char_traits::length(ptr), f); + } + + basic_regex &assign(const charT *const p, std::size_t len, const flag_type f = regex_constants::ECMAScript) + { + return assign(p, p + len, f); + } + + template + basic_regex &assign(const std::basic_string &s, const flag_type f = regex_constants::ECMAScript) + { + return assign(s.c_str(), s.c_str() + s.size(), f); + } + + template + basic_regex &assign(InputIterator first, InputIterator last, const flag_type f = regex_constants::ECMAScript) + { +#if defined(SRELL_STRICT_IMPL) + basic_regex tmp; + tmp.compile(first, last, f); + tmp.swap(*this); +#else + this->compile(first, last, f); +#endif + return *this; + } + +#if defined(SRELL_CPP11_INITIALIZER_LIST_ENABLED) + basic_regex &assign(std::initializer_list il, const flag_type f = regex_constants::ECMAScript) + { + return assign(il.begin(), il.end(), f); + } +#endif + + // 28.8.4, const operations: + // [7.8.4] const operations + unsigned mark_count() const + { + return this->number_of_brackets - 1; + } + + flag_type flags() const + { + return this->soflags; + } + + // 28.8.5, locale: + // [7.8.5] locale + locale_type imbue(locale_type loc) + { + return this->traits_inst.imbue(loc); + } + + locale_type getloc() const + { + return this->traits_inst.getloc(); + } + + // 28.8.6, swap: + // [7.8.6] swap + void swap(basic_regex &e) + { + regex_internal::re_object_core::swap(e); + } +}; + +// 28.8.6, basic_regex swap: +template +void swap(basic_regex &lhs, basic_regex &rhs) +{ + lhs.swap(rhs); +} + +typedef basic_regex regex; +typedef basic_regex wregex; + +#if defined(WCHAR_MAX) + #if WCHAR_MAX >= 0x10ffff + typedef wregex u32wregex; + typedef u32wregex u1632wregex; + #elif WCHAR_MAX >= 0xffff + typedef basic_regex > u16wregex; + typedef u16wregex u1632wregex; + #endif +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) + typedef basic_regex u8regex; +#endif + +typedef basic_regex > u8cregex; +#if !defined(SRELL_CPP20_CHAR8_ENABLED) + typedef u8cregex u8regex; +#endif + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + typedef basic_regex u16regex; + typedef basic_regex u32regex; +#endif + +// ... "basic_regex.hpp"] +// ["regex_iterator.hpp" ... + +// 28.12.1, class template regex_iterator: +template ::value_type, class traits = regex_traits > +class regex_iterator +{ +public: + + typedef basic_regex regex_type; + typedef match_results value_type; + typedef std::ptrdiff_t difference_type; + typedef const value_type * pointer; + typedef const value_type & reference; + typedef std::forward_iterator_tag iterator_category; + + regex_iterator() + { + // 28.12.1.1: Constructs an end-of-sequence iterator. + } + + regex_iterator( + const BidirectionalIterator a, + const BidirectionalIterator b, + const regex_type &re, + const regex_constants::match_flag_type m = regex_constants::match_default) + : begin(a), end(b), pregex(&re), flags(m) + { + regex_search(begin, end, begin, match, *pregex, flags); + // 28.12.1.1: If this call returns false the constructor + // sets *this to the end-of-sequence iterator. + } + + regex_iterator(const regex_iterator &that) + { + operator=(that); + } + + regex_iterator &operator=(const regex_iterator &that) + { + if (this != &that) + { + this->begin = that.begin; + this->end = that.end; + this->pregex = that.pregex; + this->flags = that.flags; + this->match = that.match; + } + return *this; + } + + bool operator==(const regex_iterator &right) const + { + // It is probably safe to assume that match.size() == 0 means + // end-of-sequence, because it happens only when 1) never tried + // regex_search, or 2) regex_search returned false. + + if (this->match.size() == 0 || right.match.size() == 0) + return this->match.size() == right.match.size(); + + return + this->begin == right.begin + && + this->end == right.end + && + this->pregex == right.pregex + && + this->flags == right.flags + && + this->match[0] == right.match[0]; + } + + bool operator!=(const regex_iterator &right) const + { + return !(*this == right); + } + + const value_type &operator*() const + { + return match; + } + + const value_type *operator->() const + { + return &match; + } + + regex_iterator &operator++() + { + if (this->match.size()) + { + BidirectionalIterator start = match[0].second; + + if (match[0].first == start) // The iterator holds a 0-length match. + { + if (start == end) + { + match.clear_(); + // 28.12.1.4.2: If the iterator holds a zero-length match and + // start == end the operator sets *this to the end-ofsequence + // iterator and returns *this. + } + else + { + // 28.12.1.4.3: Otherwise, if the iterator holds a zero-length match + // the operator calls regex_search(start, end, match, *pregex, flags + // | regex_constants::match_not_null | regex_constants::match_continuous). + // If the call returns true the operator returns *this. [Cont...] + + if (!regex_search(start, end, begin, match, *pregex, flags | regex_constants::match_not_null | regex_constants::match_continuous)) + { + const BidirectionalIterator prevend = start; + + // [...Cont] Otherwise the operator increments start and continues + // as if the most recent match was not a zero-length match. +// ++start; + utf_traits::codepoint_inc(start, end); + + flags |= regex_constants::match_prev_avail; + + if (regex_search(start, end, begin, match, *pregex, flags)) + { + // 28.12.1.4.5-6: In all cases in which the call to regex_search + // returns true, match.prefix().first shall be equal to the previous + // value of match[0].second, ... match[i].position() shall return + // distance(begin, match[i].first). + // This means that match[i].position() gives the offset from the + // beginning of the target sequence, which is often not the same as + // the offset from the sequence passed in the call to regex_search. + // + // To satisfy this: + match.set_prefix_first_(prevend); + } + } + } + } + else + { + // 28.12.1.4.4: If the most recent match was not a zero-length match, + // the operator sets flags to flags | regex_constants::match_prev_avail + // and calls regex_search(start, end, match, *pregex, flags). [Cont...] + flags |= regex_constants::match_prev_avail; + + regex_search(start, end, begin, match, *pregex, flags); + // [...Cont] If the call returns false the iterator sets *this to + // the end-of-sequence iterator. The iterator then returns *this. + // + // 28.12.1.4.5-6: In all cases in which the call to regex_search + // returns true, match.prefix().first shall be equal to the previous + // value of match[0].second, ... match[i].position() shall return + // distance(begin, match[i].first). + // This means that match[i].position() gives the offset from the + // beginning of the target sequence, which is often not the same as + // the offset from the sequence passed in the call to regex_search. + // + // These should already be done in regex_search. + } + } + return *this; + } + + regex_iterator operator++(int) + { + const regex_iterator tmp = *this; + ++(*this); + return tmp; + } + +private: + + BidirectionalIterator begin; + BidirectionalIterator end; + const regex_type *pregex; + regex_constants::match_flag_type flags; + match_results match; + + typedef typename traits::utf_traits utf_traits; +}; + +typedef regex_iterator cregex_iterator; +typedef regex_iterator wcregex_iterator; +typedef regex_iterator sregex_iterator; +typedef regex_iterator wsregex_iterator; + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + typedef regex_iterator u16cregex_iterator; + typedef regex_iterator u32cregex_iterator; + typedef regex_iterator u16sregex_iterator; + typedef regex_iterator u32sregex_iterator; +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) + typedef regex_iterator u8cregex_iterator; +#endif +#if defined(SRELL_CPP20_CHAR8_ENABLED) && SRELL_CPP20_CHAR8_ENABLED >= 2 + typedef regex_iterator u8sregex_iterator; +#endif + +typedef regex_iterator::value_type, u8regex_traits::value_type> > u8ccregex_iterator; +typedef regex_iterator::value_type, u8regex_traits::value_type> > u8csregex_iterator; +#if !defined(SRELL_CPP20_CHAR8_ENABLED) + typedef u8ccregex_iterator u8cregex_iterator; +#endif +#if !defined(SRELL_CPP20_CHAR8_ENABLED) || SRELL_CPP20_CHAR8_ENABLED < 2 + typedef u8csregex_iterator u8sregex_iterator; +#endif + +#if defined(WCHAR_MAX) + #if WCHAR_MAX >= 0x10ffff + typedef wcregex_iterator u32wcregex_iterator; + typedef wsregex_iterator u32wsregex_iterator; + typedef u32wcregex_iterator u1632wcregex_iterator; + typedef u32wsregex_iterator u1632wsregex_iterator; + #elif WCHAR_MAX >= 0xffff + typedef regex_iterator::value_type, u16regex_traits::value_type> > u16wcregex_iterator; + typedef regex_iterator::value_type, u16regex_traits::value_type> > u16wsregex_iterator; + typedef u16wcregex_iterator u1632wcregex_iterator; + typedef u16wsregex_iterator u1632wsregex_iterator; + #endif +#endif + +// ... "regex_iterator.hpp"] +// ["regex_algorithm.hpp" ... + +// 28.11.2, function template regex_match: +// [7.11.2] Function template regex_match +template +bool regex_match( + const BidirectionalIterator first, + const BidirectionalIterator last, + match_results &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return e.search(first, last, first, m, flags | regex_constants::match_continuous | regex_constants::match_match_); +} + +template +bool regex_match( + const BidirectionalIterator first, + const BidirectionalIterator last, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ +// 4 Effects: Behaves "as if" by constructing an instance of +// match_results what, and then returning the +// result of regex_match(first, last, what, e, flags). + + match_results what; + + return regex_match(first, last, what, e, flags); +} + +template +bool regex_match( + const charT *const str, + match_results &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_match(str, str + std::char_traits::length(str), m, e, flags); +} + +template +bool regex_match( + const std::basic_string &s, + match_results::const_iterator, Allocator> &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_match(s.begin(), s.end(), m, e, flags); +} + +template +bool regex_match( + const charT *const str, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_match(str, str + std::char_traits::length(str), e, flags); +} + +template +bool regex_match( + const std::basic_string &s, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_match(s.begin(), s.end(), e, flags); +} + +template +bool regex_search( + const BidirectionalIterator first, + const BidirectionalIterator last, + const BidirectionalIterator lookbehind_limit, + match_results &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return e.search(first, last, lookbehind_limit, m, flags); +} + +template +bool regex_search( + const BidirectionalIterator first, + const BidirectionalIterator last, + const BidirectionalIterator lookbehind_limit, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ +// 6 Effects: Behaves "as if" by constructing an object what of type +// match_results and then returning the result of +// regex_search(first, last, what, e, flags). + + match_results what; + return regex_search(first, last, lookbehind_limit, what, e, flags); +} + +// 28.11.3, function template regex_search: +// 7.11.3 regex_search [tr.re.alg.search] +template +bool regex_search( + const BidirectionalIterator first, + const BidirectionalIterator last, + match_results &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return e.search(first, last, first, m, flags); +} + +template +bool regex_search( + const BidirectionalIterator first, + const BidirectionalIterator last, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ +// 6 Effects: Behaves "as if" by constructing an object what of type +// match_results and then returning the result of +// regex_search(first, last, what, e, flags). + + match_results what; + return regex_search(first, last, what, e, flags); +} + +template +bool regex_search( + const charT *const str, + match_results &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_search(str, str + std::char_traits::length(str), m, e, flags); +} + +template +bool regex_search( + const charT *const str, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_search(str, str + std::char_traits::length(str), e, flags); +} + +template +bool regex_search( + const std::basic_string &s, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_search(s.begin(), s.end(), e, flags); +} + +template +bool regex_search( + const std::basic_string &s, + match_results::const_iterator, Allocator> &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_search(s.begin(), s.end(), m, e, flags); +} + +// 28.11.4, function template regex_replace: +// [7.11.4] Function template regex_replace +template +OutputIterator regex_replace( + OutputIterator out, + const BidirectionalIterator first, + const BidirectionalIterator last, + const basic_regex &e, + const std::basic_string &fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + typedef regex_iterator iterator_type; + + const bool do_copy = !(flags & regex_constants::format_no_copy); + const iterator_type eos; + iterator_type i(first, last, e, flags); + typename iterator_type::value_type::value_type last_m_suffix; + + last_m_suffix.first = first; + last_m_suffix.second = last; + + for (; i != eos; ++i) + { + if (do_copy) + out = std::copy(i->prefix().first, i->prefix().second, out); + + out = i->format(out, fmt, flags); + last_m_suffix = i->suffix(); + + if (flags & regex_constants::format_first_only) + break; + } + + if (do_copy) + out = std::copy(last_m_suffix.first, last_m_suffix.second, out); + + return out; +} + +template +OutputIterator regex_replace( + OutputIterator out, + const BidirectionalIterator first, + const BidirectionalIterator last, + const basic_regex &e, + const charT *const fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + // Strictly speaking, this should be implemented as a version different + // from the above with changing the line i->format(out, fmt, flags) to + // i->format(out, fmt, fmt + char_traits::length(fmt), flags). + + const std::basic_string fs(fmt, fmt + std::char_traits::length(fmt)); + + return regex_replace(out, first, last, e, fs, flags); +} + +template +std::basic_string regex_replace( + const std::basic_string &s, + const basic_regex &e, + const std::basic_string &fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + std::basic_string result; + + regex_replace(std::back_inserter(result), s.begin(), s.end(), e, fmt, flags); + return result; +} + +template +std::basic_string regex_replace( + const std::basic_string &s, + const basic_regex &e, + const charT *const fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + std::basic_string result; + + regex_replace(std::back_inserter(result), s.begin(), s.end(), e, fmt, flags); + return result; +} + +template +std::basic_string regex_replace( + const charT *const s, + const basic_regex &e, + const std::basic_string &fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + std::basic_string result; + + regex_replace(std::back_inserter(result), s, s + std::char_traits::length(s), e, fmt, flags); + return result; +} + +template +std::basic_string regex_replace( + const charT *const s, + const basic_regex &e, + const charT *const fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + std::basic_string result; + + regex_replace(std::back_inserter(result), s, s + std::char_traits::length(s), e, fmt, flags); + return result; +} + +// ... "regex_algorithm.hpp"] +// ["regex_token_iterator.hpp" ... + +// 28.12.2, class template regex_token_iterator: +template ::value_type, class traits = regex_traits > +class regex_token_iterator +{ +public: + + typedef basic_regex regex_type; + typedef sub_match value_type; + typedef std::ptrdiff_t difference_type; + typedef const value_type * pointer; + typedef const value_type & reference; + typedef std::forward_iterator_tag iterator_category; + + regex_token_iterator() : result(NULL) + { + // Constructs the end-of-sequence iterator. + } + + regex_token_iterator( + const BidirectionalIterator a, + const BidirectionalIterator b, + const regex_type &re, + int submatch = 0, + regex_constants::match_flag_type m = regex_constants::match_default + ) : position(a, b, re, m), result(NULL), subs(1, submatch) + { + post_constructor(a, b); + } + + regex_token_iterator( + const BidirectionalIterator a, + const BidirectionalIterator b, + const regex_type &re, + const std::vector &submatches, + regex_constants::match_flag_type m = regex_constants::match_default + ) : position(a, b, re, m), result(NULL), subs(submatches) + { + post_constructor(a, b); + } + +#if defined(SRELL_CPP11_INITIALIZER_LIST_ENABLED) + regex_token_iterator( + const BidirectionalIterator a, + const BidirectionalIterator b, + const regex_type &re, + std::initializer_list submatches, + regex_constants::match_flag_type m = regex_constants::match_default + ) : position(a, b, re, m), result(NULL), subs(submatches) + { + post_constructor(a, b); + } +#endif + + template // Was R in TR1. + regex_token_iterator( + const BidirectionalIterator a, + const BidirectionalIterator b, + const regex_type &re, + const int (&submatches)[N], + regex_constants::match_flag_type m = regex_constants::match_default + ) : position(a, b, re, m), result(NULL), subs(submatches, submatches + N) + { + post_constructor(a, b); + } + + regex_token_iterator(const regex_token_iterator &that) + { + operator=(that); + } + + regex_token_iterator &operator=(const regex_token_iterator &that) + { + if (this != &that) + { + this->position = that.position; + this->result = that.result; + this->suffix = that.suffix; + this->N = that.N; + this->subs = that.subs; + } + return *this; + } + + bool operator==(const regex_token_iterator &right) + { + if (this->result == NULL || right.result == NULL) + return this->result == right.result; + + if (this->result == &this->suffix || right.result == &right.suffix) + return this->suffix == right.suffix; + + return + this->position == right.position + && + this->N == right.N + && + this->subs == right.subs; + } + + bool operator!=(const regex_token_iterator &right) + { + return !(*this == right); + } + + const value_type &operator*() + { + return *result; + } + + const value_type *operator->() + { + return result; + } + + regex_token_iterator &operator++() + { + position_iterator prev(position); + position_iterator eos_iterator; + + if (result != NULL) + // To avoid inifinite loop. The specification does not require, though. + { + if (result == &suffix) + { + result = NULL; // end-of-sequence. + } + else + { + ++this->N; + for (;;) + { + if (this->N < subs.size()) + { + result = subs[this->N] != -1 ? &((*position)[subs[this->N]]) : &((*position).prefix()); + break; + } + + this->N = 0; + ++position; + + if (position == eos_iterator) + { + if (this->N < subs.size() && prev->suffix().length() && minus1_in_subs()) + { + suffix = prev->suffix(); + result = &suffix; + } + else + { + result = NULL; + } + break; + } + } + } + } + return *this; + } + + regex_token_iterator operator++(int) + { + const regex_token_iterator tmp(*this); + ++(*this); + return tmp; + } + +private: + + void post_constructor(const BidirectionalIterator a, const BidirectionalIterator b) + { + position_iterator eos_iterator; + + this->N = 0; + + if (position != eos_iterator && subs.size()) + { + result = subs[this->N] != -1 ? &((*position)[subs[this->N]]) : &((*position).prefix()); + } + else if (minus1_in_subs()) // end-of-sequence. + { + suffix.first = a; + suffix.second = b; + suffix.matched = a != b; + // 28.1.2.7: In a suffix iterator the member result holds a pointer + // to the data member suffix, the value of the member suffix.match is true, + + if (suffix.matched) + result = &suffix; + else + result = NULL; // Means end-of-sequence. + } + } + + bool minus1_in_subs() const + { + for (std::size_t i = 0; i < subs.size(); ++i) + if (subs[i] == -1) + return true; + + return false; + } + +private: + + typedef regex_iterator position_iterator; + position_iterator position; + const value_type *result; + value_type suffix; + std::size_t N; + std::vector subs; +}; + +typedef regex_token_iterator cregex_token_iterator; +typedef regex_token_iterator wcregex_token_iterator; +typedef regex_token_iterator sregex_token_iterator; +typedef regex_token_iterator wsregex_token_iterator; + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + typedef regex_token_iterator u16cregex_token_iterator; + typedef regex_token_iterator u32cregex_token_iterator; + typedef regex_token_iterator u16sregex_token_iterator; + typedef regex_token_iterator u32sregex_token_iterator; +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) + typedef regex_token_iterator u8cregex_token_iterator; +#endif +#if defined(SRELL_CPP20_CHAR8_ENABLED) && SRELL_CPP20_CHAR8_ENABLED >= 2 + typedef regex_token_iterator u8sregex_token_iterator; +#endif + +typedef regex_token_iterator::value_type, u8regex_traits::value_type> > u8ccregex_token_iterator; +typedef regex_token_iterator::value_type, u8regex_traits::value_type> > u8csregex_token_iterator; +#if !defined(SRELL_CPP20_CHAR8_ENABLED) + typedef u8ccregex_token_iterator u8cregex_token_iterator; +#endif +#if !defined(SRELL_CPP20_CHAR8_ENABLED) || SRELL_CPP20_CHAR8_ENABLED < 2 + typedef u8csregex_token_iterator u8sregex_token_iterator; +#endif + +#if defined(WCHAR_MAX) + #if WCHAR_MAX >= 0x10ffff + typedef wcregex_token_iterator u32wcregex_token_iterator; + typedef wsregex_token_iterator u32wsregex_token_iterator; + typedef u32wcregex_token_iterator u1632wcregex_token_iterator; + typedef u32wsregex_token_iterator u1632wsregex_token_iterator; + #elif WCHAR_MAX >= 0xffff + typedef regex_token_iterator::value_type, u16regex_traits::value_type> > u16wcregex_token_iterator; + typedef regex_token_iterator::value_type, u16regex_traits::value_type> > u16wsregex_token_iterator; + typedef u16wcregex_token_iterator u1632wcregex_token_iterator; + typedef u16wsregex_token_iterator u1632wsregex_token_iterator; + #endif +#endif + +// ... "regex_token_iterator.hpp"] + +} // namespace srell + +#ifdef SRELL_NOEXCEPT +#undef SRELL_NOEXCEPT +#endif + +#ifdef SRELL_CPP20_CHAR8_ENABLED +#undef SRELL_CPP20_CHAR8_ENABLED +#endif + +#ifdef SRELL_CPP11_CHAR1632_ENABLED +#undef SRELL_CPP11_CHAR1632_ENABLED +#endif + +#ifdef SRELL_CPP11_INITIALIZER_LIST_ENABLED +#undef SRELL_CPP11_INITIALIZER_LIST_ENABLED +#endif + +#ifdef SRELL_CPP11_MOVE_ENABLED +#undef SRELL_CPP11_MOVE_ENABLED +#endif + +#endif // SRELL_REGEX_TEMPLATE_LIBRARY diff --git a/lib/srell3_009/srell.hpp b/lib/srell3_009/srell.hpp new file mode 100644 index 000000000..85377d7c6 --- /dev/null +++ b/lib/srell3_009/srell.hpp @@ -0,0 +1,9868 @@ +/***************************************************************************** +** +** SRELL (std::regex-like library) version 3.009 +** +** Copyright (c) 2012-2022, Nozomu Katoo. All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS +** IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +** THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +****************************************************************************** +**/ + +#ifndef SRELL_REGEX_TEMPLATE_LIBRARY +#define SRELL_REGEX_TEMPLATE_LIBRARY + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cpp_unicode_characters + #ifndef SRELL_CPP11_CHAR1632_ENABLED + #define SRELL_CPP11_CHAR1632_ENABLED + #endif +#endif +#ifdef __cpp_initializer_lists +#include + #ifndef SRELL_CPP11_INITIALIZER_LIST_ENABLED + #define SRELL_CPP11_INITIALIZER_LIST_ENABLED + #endif +#endif +#ifdef __cpp_rvalue_references + #ifndef SRELL_CPP11_MOVE_ENABLED + #define SRELL_CPP11_MOVE_ENABLED + #endif +#endif +#ifdef SRELL_CPP11_MOVE_ENABLED + #if defined(_MSC_VER) && _MSC_VER < 1900 + #define SRELL_NOEXCEPT + #else + #define SRELL_NOEXCEPT noexcept + #endif +#endif +#ifdef __cpp_char8_t + #ifndef SRELL_CPP20_CHAR8_ENABLED + #ifdef __cpp_lib_char8_t + #define SRELL_CPP20_CHAR8_ENABLED 2 + #else + #define SRELL_CPP20_CHAR8_ENABLED 1 + #endif + #endif +#endif + +// The following SRELL_NO_* macros would be useful when wanting to +// reduce the size of a binary by turning off some feature(s). + +#ifdef SRELL_NO_UNICODE_DATA + +// Prevents Unicode data used for icase (case-insensitive) matching +// from being output into a resulting binary. In this case only the +// ASCII characters are case-folded when icase matching is performed +// (i.e., [A-Z] -> [a-z] only). +#define SRELL_NO_UNICODE_ICASE + +// Disables the Unicode property (\p{...} and \P{...}) and prevents +// Unicode property data from being output into a resulting binary. +#define SRELL_NO_UNICODE_PROPERTY +#endif + +// Prevents icase matching specific functions into a resulting binary. +// In this case the icase flag is ignored and icase matching becomes +// unavailable. +#ifdef SRELL_NO_ICASE +#ifndef SRELL_NO_UNICODE_ICASE +#define SRELL_NO_UNICODE_ICASE +#endif +#endif + +// This macro might be removed in the future. +#ifdef SRELL_V1_COMPATIBLE +#ifndef SRELL_NO_UNICODE_PROPERTY +#define SRELL_NO_UNICODE_PROPERTY +#endif +#define SRELL_NO_NAMEDCAPTURE +#define SRELL_NO_SINGLELINE +#define SRELL_FIXEDWIDTHLOOKBEHIND +#endif + +namespace srell +{ +// ["regex_constants.h" ... + + namespace regex_constants + { + enum syntax_option_type + { + icase = 1 << 0, + nosubs = 1 << 1, + optimize = 1 << 2, + collate = 1 << 3, + ECMAScript = 1 << 4, + basic = 1 << 5, + extended = 1 << 6, + awk = 1 << 7, + grep = 1 << 8, + egrep = 1 << 9, + multiline = 1 << 10, + + // SRELL's extension. + dotall = 1 << 11 // singleline. + }; + + inline syntax_option_type operator&(const syntax_option_type left, const syntax_option_type right) + { + return static_cast(static_cast(left) & static_cast(right)); + } + inline syntax_option_type operator|(const syntax_option_type left, const syntax_option_type right) + { + return static_cast(static_cast(left) | static_cast(right)); + } + inline syntax_option_type operator^(const syntax_option_type left, const syntax_option_type right) + { + return static_cast(static_cast(left) ^ static_cast(right)); + } + inline syntax_option_type operator~(const syntax_option_type b) + { + return static_cast(~static_cast(b)); + } + inline syntax_option_type &operator&=(syntax_option_type &left, const syntax_option_type right) + { + left = left & right; + return left; + } + inline syntax_option_type &operator|=(syntax_option_type &left, const syntax_option_type right) + { + left = left | right; + return left; + } + inline syntax_option_type &operator^=(syntax_option_type &left, const syntax_option_type right) + { + left = left ^ right; + return left; + } + } + // namespace regex_constants + + namespace regex_constants + { + enum match_flag_type + { + match_default = 0, + match_not_bol = 1 << 0, + match_not_eol = 1 << 1, + match_not_bow = 1 << 2, + match_not_eow = 1 << 3, + match_any = 1 << 4, + match_not_null = 1 << 5, + match_continuous = 1 << 6, + match_prev_avail = 1 << 7, + + format_default = 0, + format_sed = 1 << 8, + format_no_copy = 1 << 9, + format_first_only = 1 << 10, + + // For internal use. + match_match_ = 1 << 11 + }; + + inline match_flag_type operator&(const match_flag_type left, const match_flag_type right) + { + return static_cast(static_cast(left) & static_cast(right)); + } + inline match_flag_type operator|(const match_flag_type left, const match_flag_type right) + { + return static_cast(static_cast(left) | static_cast(right)); + } + inline match_flag_type operator^(const match_flag_type left, const match_flag_type right) + { + return static_cast(static_cast(left) ^ static_cast(right)); + } + inline match_flag_type operator~(const match_flag_type b) + { + return static_cast(~static_cast(b)); + } + inline match_flag_type &operator&=(match_flag_type &left, const match_flag_type right) + { + left = left & right; + return left; + } + inline match_flag_type &operator|=(match_flag_type &left, const match_flag_type right) + { + left = left | right; + return left; + } + inline match_flag_type &operator^=(match_flag_type &left, const match_flag_type right) + { + left = left ^ right; + return left; + } + } + // namespace regex_constants + + // 28.5, regex constants: + namespace regex_constants + { + typedef int error_type; + + static const error_type error_collate = 100; + static const error_type error_ctype = 101; + static const error_type error_escape = 102; + static const error_type error_backref = 103; + static const error_type error_brack = 104; + static const error_type error_paren = 105; + static const error_type error_brace = 106; + static const error_type error_badbrace = 107; + static const error_type error_range = 108; + static const error_type error_space = 109; + static const error_type error_badrepeat = 110; + static const error_type error_complexity = 111; + static const error_type error_stack = 112; + + // SRELL's extension. + static const error_type error_utf8 = 113; + +#if defined(SRELL_FIXEDWIDTHLOOKBEHIND) + static const error_type error_lookbehind = 200; +#endif + static const error_type error_internal = 999; + } + // namespace regex_constants + +// ... "regex_constants.h"] +// ["regex_error.hpp" ... + +// 28.6, class regex_error: +class regex_error : public std::runtime_error +{ +public: + + explicit regex_error(const regex_constants::error_type ecode) + : std::runtime_error("regex_error") // added for error C2512. + , ecode_(ecode) + { + } + + regex_constants::error_type code() const + { + return ecode_; + } + +private: + + regex_constants::error_type ecode_; +}; + +// ... "regex_error.hpp"] +// ["rei_type.h" ... + + namespace regex_internal + { + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + + typedef char32_t uchar32; + +#elif defined(UINT_MAX) && UINT_MAX >= 0xFFFFFFFF + + typedef unsigned int uchar32; + +#elif defined(ULONG_MAX) && ULONG_MAX >= 0xFFFFFFFF + + typedef unsigned long uchar32; + +#else +#error could not find a suitable type for 32-bit Unicode integer values. +#endif // defined(SRELL_CPP11_CHAR1632_ENABLED) + + typedef uchar32 uint_l32; // uint_least32. + + } // regex_internal + +// ... "rei_type.h"] +// ["rei_constants.h" ... + + namespace regex_internal + { + enum re_state_type + { + st_character, // 0x00 + st_character_class, // 0x01 + + st_epsilon, // 0x02 + + st_check_counter, // 0x03 +// st_increment_counter, // 0x04 + st_decrement_counter, // 0x04 + st_save_and_reset_counter, // 0x05 + st_restore_counter, // 0x06 + + st_roundbracket_open, // 0x07 + st_roundbracket_pop, // 0x08 + st_roundbracket_close, // 0x09 + + st_repeat_in_push, // 0x0a + st_repeat_in_pop, // 0x0b + st_check_0_width_repeat, // 0x0c + + st_backreference, // 0x0d + + st_lookaround_open, // 0x0e + +// st_lookaround_pop, // 0x10 + + st_bol, // 0x0f + st_eol, // 0x10 + st_boundary, // 0x11 + + st_success, // 0x12 + +#if !defined(SRELLDBG_NO_NEXTPOS_OPT) + st_move_nextpos, // 0x13 +#endif + + st_lookaround_close = st_success, + st_zero_width_boundary = st_lookaround_open, + }; + // re_state_type + + namespace constants + { + static const uchar32 unicode_max_codepoint = 0x10ffff; + static const uchar32 invalid_u32value = static_cast(-1); + static const uchar32 max_u32value = static_cast(-2); + static const uchar32 asc_icase = 0x20; + static const uchar32 ccstr_empty = static_cast(-3); + } + // constants + + namespace meta_char + { + static const uchar32 mc_exclam = 0x21; // '!' + static const uchar32 mc_dollar = 0x24; // '$' + static const uchar32 mc_rbraop = 0x28; // '(' + static const uchar32 mc_rbracl = 0x29; // ')' + static const uchar32 mc_astrsk = 0x2a; // '*' + static const uchar32 mc_plus = 0x2b; // '+' + static const uchar32 mc_comma = 0x2c; // ',' + static const uchar32 mc_minus = 0x2d; // '-' + static const uchar32 mc_period = 0x2e; // '.' + static const uchar32 mc_colon = 0x3a; // ':' + static const uchar32 mc_lt = 0x3c; // '<' + static const uchar32 mc_eq = 0x3d; // '=' + static const uchar32 mc_gt = 0x3e; // '>' + static const uchar32 mc_query = 0x3f; // '?' + static const uchar32 mc_sbraop = 0x5b; // '[' + static const uchar32 mc_escape = 0x5c; // '\\' + static const uchar32 mc_sbracl = 0x5d; // ']' + static const uchar32 mc_caret = 0x5e; // '^' + static const uchar32 mc_cbraop = 0x7b; // '{' + static const uchar32 mc_bar = 0x7c; // '|' + static const uchar32 mc_cbracl = 0x7d; // '}' + } + // meta_char + + namespace char_ctrl + { + static const uchar32 cc_nul = 0x00; // '\0' //0x00:NUL + static const uchar32 cc_bs = 0x08; // '\b' //0x08:BS + static const uchar32 cc_htab = 0x09; // '\t' //0x09:HT + static const uchar32 cc_nl = 0x0a; // '\n' //0x0a:LF + static const uchar32 cc_vtab = 0x0b; // '\v' //0x0b:VT + static const uchar32 cc_ff = 0x0c; // '\f' //0x0c:FF + static const uchar32 cc_cr = 0x0d; // '\r' //0x0d:CR + } + // char_ctrl + + namespace char_alnum + { + static const uchar32 ch_0 = 0x30; // '0' + static const uchar32 ch_1 = 0x31; // '1' + static const uchar32 ch_7 = 0x37; // '7' + static const uchar32 ch_8 = 0x38; // '8' + static const uchar32 ch_9 = 0x39; // '9' + static const uchar32 ch_A = 0x41; // 'A' + static const uchar32 ch_B = 0x42; // 'B' + static const uchar32 ch_D = 0x44; // 'D' + static const uchar32 ch_F = 0x46; // 'F' + static const uchar32 ch_P = 0x50; // 'P' + static const uchar32 ch_S = 0x53; // 'S' + static const uchar32 ch_W = 0x57; // 'W' + static const uchar32 ch_Z = 0x5a; // 'Z' + static const uchar32 ch_a = 0x61; // 'a' + static const uchar32 ch_b = 0x62; // 'b' + static const uchar32 ch_c = 0x63; // 'c' + static const uchar32 ch_d = 0x64; // 'd' + static const uchar32 ch_f = 0x66; // 'f' + static const uchar32 ch_k = 0x6b; // 'k' + static const uchar32 ch_n = 0x6e; // 'n' + static const uchar32 ch_p = 0x70; // 'p' + static const uchar32 ch_r = 0x72; // 'r' + static const uchar32 ch_s = 0x73; // 's' + static const uchar32 ch_t = 0x74; // 't' + static const uchar32 ch_u = 0x75; // 'u' + static const uchar32 ch_v = 0x76; // 'v' + static const uchar32 ch_w = 0x77; // 'w' + static const uchar32 ch_x = 0x78; // 'x' + static const uchar32 ch_z = 0x7a; // 'z' + } + // char_alnum + + namespace char_other + { + static const uchar32 co_sp = 0x20; // ' ' + static const uchar32 co_amp = 0x26; // '&' + static const uchar32 co_apos = 0x27; // '\'' + static const uchar32 co_slash = 0x2f; // '/' + static const uchar32 co_ll = 0x5f; // '_' + static const uchar32 co_grav = 0x60; // '`' + } + // char_other + } + // namespace regex_internal + +// ... "rei_constants.h"] +// ["rei_utf_traits.hpp" ... + + namespace regex_internal + { + +template +struct utf_traits_core +{ +public: + + static const std::size_t maxseqlen = 1; + static const int utftype = 0; + + static const std::size_t bitsetsize = 0x100; + static const uchar32 bitsetmask = 0xff; + static const uchar32 cumask = 0xff; + + // *iter + template + static uchar32 codepoint(ForwardIterator begin, const ForwardIterator /* end */) + { + return static_cast(*begin); + // Caller is responsible for begin != end. + } + + // *iter++ + template + static uchar32 codepoint_inc(ForwardIterator &begin, const ForwardIterator /* end */) + { + return static_cast(*begin++); + // Caller is responsible for begin != end. + } + + // iter2 = iter; return *--iter2; + template + static uchar32 prevcodepoint(BidirectionalIterator cur, const BidirectionalIterator /* begin */) + { + return static_cast(*--cur); + } + + // *--iter + template + static uchar32 dec_codepoint(BidirectionalIterator &cur, const BidirectionalIterator /* begin */) + { + return static_cast(*--cur); + // Caller is responsible for cur != begin. + } + +#if !defined(SRELLDBG_NO_BMH) + + template + static bool is_trailing(const charT2 /* cu */) + { + return false; + } + +#endif // !defined(SRELLDBG_NO_BMH) + + static uchar32 to_codeunits(charT out[maxseqlen], uchar32 cp) + { + out[0] = static_cast(cp); + return 1; + } + + static uchar32 firstcodeunit(const uchar32 cp) + { + return cp; + } + + template + static bool seek_charboundary(ForwardIterator &begin, const ForwardIterator end) + { + return begin != end; + } +}; // utf_traits_core + +// common and utf-32. +template +struct utf_traits : public utf_traits_core +{ + static const int utftype = 32; + + static const std::size_t bitsetsize = 0x10000; + static const uchar32 bitsetmask = 0xffff; + static const uchar32 cumask = 0x1fffff; +}; // utf_traits + +// utf-8 specific. +template +struct utf8_traits : public utf_traits_core +{ +public: + + // utf-8 specific. + static const std::size_t maxseqlen = 4; + static const int utftype = 8; + + template + static uchar32 codepoint(ForwardIterator begin, const ForwardIterator end) + { +// return codepoint_inc(begin, end); + + uchar32 codepoint = static_cast(*begin & 0xff); + + if ((codepoint & 0x80) == 0) // 1 octet. + return codepoint; + + if (++begin != end && (codepoint >= 0xc0 && codepoint <= 0xf7) && (*begin & 0xc0) == 0x80) + { + codepoint = static_cast((codepoint << 6) | (*begin & 0x3f)); + + if ((codepoint & 0x800) == 0) // 2 octets. + return static_cast(codepoint & 0x7ff); + + if (++begin != end && (*begin & 0xc0) == 0x80) + { + codepoint = static_cast((codepoint << 6) | (*begin & 0x3f)); + + if ((codepoint & 0x10000) == 0) // 3 octets. + return static_cast(codepoint & 0xffff); + + if (++begin != end && (*begin & 0xc0) == 0x80) // 4 octets. + { + codepoint = static_cast((codepoint << 6) | (*begin & 0x3f)); + + return static_cast(codepoint & 0x1fffff); + } + } + } +// else // 80-bf, f8-ff: invalid. + + return regex_internal::constants::invalid_u32value; + } + + template + static uchar32 codepoint_inc(ForwardIterator &begin, const ForwardIterator end) + { + uchar32 codepoint = static_cast(*begin++ & 0xff); + + if ((codepoint & 0x80) == 0) // 1 octet. + return codepoint; + + // Expects transformation to (codepoint - 0xc0) <= 0x37 by optimisation. + // 0xF7 instead of 0xF4 is for consistency with reverse iterators. + if (begin != end && (codepoint >= 0xc0 && codepoint <= 0xf7) && (*begin & 0xc0) == 0x80) +// if (begin != end && (0x7f00 & (1 << ((codepoint >> 3) & 0xf))) && (*begin & 0xc0) == 0x80) // c0, c8, d0, d8, e0, e8, f0. + { + codepoint = static_cast((codepoint << 6) | (*begin++ & 0x3f)); + + // 11 ?aaa aabb bbbb + if ((codepoint & 0x800) == 0) // 2 octets. + return static_cast(codepoint & 0x7ff); + // c080-c1bf: invalid. 00-7F. + // c280-dfbf: valid. 080-7FF. + + // 11 1aaa aabb bbbb + if (begin != end && (*begin & 0xc0) == 0x80) + { + codepoint = static_cast((codepoint << 6) | (*begin++ & 0x3f)); + + // 111? aaaa bbbb bbcc cccc + if ((codepoint & 0x10000) == 0) // 3 octets. + return static_cast(codepoint & 0xffff); + // e08080-e09fbf: invalid. 000-7FF. + // e0a080-efbfbf: valid. 0800-FFFF. + + // 1111 0aaa bbbb bbcc cccc + if (begin != end && (*begin & 0xc0) == 0x80) // 4 octets. + { + codepoint = static_cast((codepoint << 6) | (*begin++ & 0x3f)); + // f0808080-f08fbfbf: invalid. 0000-FFFF. + // f0908080-f3bfbfbf: valid. 10000-FFFFF. + // f4808080-f48fbfbf: valid. 100000-10FFFF. + // f4908080-f4bfbfbf: invalid. 110000-13FFFF. + // f5808080-f7bfbfbf: invalid. 140000-1FFFFF. + + // 11 110a aabb bbbb cccc ccdd dddd + return static_cast(codepoint & 0x1fffff); + } + } + } +// else // 80-bf, f8-ff: invalid. + + return regex_internal::constants::invalid_u32value; + } + + template + static uchar32 prevcodepoint(BidirectionalIterator cur, const BidirectionalIterator begin) + { + uchar32 codepoint = static_cast(*--cur); + + if ((codepoint & 0x80) == 0) + return static_cast(codepoint & 0xff); + + if ((codepoint & 0x40) == 0 && cur != begin) + { + codepoint = static_cast((codepoint & 0x3f) | (*--cur << 6)); + + if ((codepoint & 0x3800) == 0x3000) // 2 octets. + return static_cast(codepoint & 0x7ff); + + if ((codepoint & 0x3000) == 0x2000 && cur != begin) + { + codepoint = static_cast((codepoint & 0xfff) | (*--cur << 12)); + + if ((codepoint & 0xf0000) == 0xe0000) // 3 octets. + return static_cast(codepoint & 0xffff); + + if ((codepoint & 0xc0000) == 0x80000 && cur != begin) + { + if ((*--cur & 0xf8) == 0xf0) // 4 octets. + return static_cast((codepoint & 0x3ffff) | ((*cur & 7) << 18)); + } + } + } + return regex_internal::constants::invalid_u32value; + } + + template + static uchar32 dec_codepoint(BidirectionalIterator &cur, const BidirectionalIterator begin) + { + uchar32 codepoint = static_cast(*--cur); + + if ((codepoint & 0x80) == 0) + return static_cast(codepoint & 0xff); + + if ((codepoint & 0x40) == 0 && cur != begin) + { + codepoint = static_cast((codepoint & 0x3f) | (*--cur << 6)); + + // 11 0bbb bbaa aaaa? + if ((codepoint & 0x3800) == 0x3000) // 2 octets. +// if ((*cur & 0xe0) == 0xc0) + return static_cast(codepoint & 0x7ff); + + // 10 bbbb bbaa aaaa? + if ((codepoint & 0x3000) == 0x2000 && cur != begin) // [\x80-\xbf]{2}. +// if ((*cur & 0xc0) == 0x80 && cur != begin) + { + codepoint = static_cast((codepoint & 0xfff) | (*--cur << 12)); + + // 1110 cccc bbbb bbaa aaaa? + if ((codepoint & 0xf0000) == 0xe0000) // 3 octets. +// if ((*cur & 0xf0) == 0xe0) + return static_cast(codepoint & 0xffff); + + // 10cc cccc bbbb bbaa aaaa? + if ((codepoint & 0xc0000) == 0x80000 && cur != begin) // [\x80-\xbf]{3}. +// if ((*cur & 0xc0) == 0x80 && cur != begin) + { + if ((*--cur & 0xf8) == 0xf0) // 4 octets. + return static_cast((codepoint & 0x3ffff) | ((*cur & 7) << 18)); + // d ddcc cccc bbbb bbaa aaaa + //else // [\0-\xef\xf8-\xff][\x80-\xbf]{3}. + + // Sequences [\xc0-\xdf][\x80-\xbf] and [\xe0-\xef][\x80-\xbf]{2} are valid. + // To give a chance to them, rewinds cur. + ++cur; + } + //else // [\0-\x7f\xc0-\xdf\xf0-\xff][\x80-\xbf]{2}. + ++cur; // Sequence [\xc0-\xdf][\x80-\xbf] is valid. Rewinds to give a chance to it. + } + //else // [\0-\x7f\xe0-\xff][\x80-\xbf]. + ++cur; // Rewinds to give a chance to [\0-\x7f]. + } + //else // [\xc0-\xff]. + + return regex_internal::constants::invalid_u32value; + } + +#if !defined(SRELLDBG_NO_BMH) + + template + static bool is_trailing(const charT2 cu) + { + return (cu & 0xc0) == 0x80; + } + +#endif // !defined(SRELLDBG_NO_BMH) + + static uchar32 to_codeunits(charT out[maxseqlen], uchar32 cp) + { + if (cp < 0x80) + { + out[0] = static_cast(cp); + return 1; + } + else if (cp < 0x800) + { + out[0] = static_cast(((cp >> 6) & 0x1f) | 0xc0); + out[1] = static_cast((cp & 0x3f) | 0x80); + return 2; + } + else if (cp < 0x10000) + { + out[0] = static_cast(((cp >> 12) & 0x0f) | 0xe0); + out[1] = static_cast(((cp >> 6) & 0x3f) | 0x80); + out[2] = static_cast((cp & 0x3f) | 0x80); + return 3; + } +// else // if (cp < 0x110000) + { + out[0] = static_cast(((cp >> 18) & 0x07) | 0xf0); + out[1] = static_cast(((cp >> 12) & 0x3f) | 0x80); + out[2] = static_cast(((cp >> 6) & 0x3f) | 0x80); + out[3] = static_cast((cp & 0x3f) | 0x80); + return 4; + } + } + + static uchar32 firstcodeunit(const uchar32 cp) + { + if (cp < 0x80) + return cp; + + if (cp < 0x800) + return static_cast(((cp >> 6) & 0x1f) | 0xc0); + + if (cp < 0x10000) + return static_cast(((cp >> 12) & 0x0f) | 0xe0); + + return static_cast(((cp >> 18) & 0x07) | 0xf0); + } + + template + static bool seek_charboundary(ForwardIterator &begin, const ForwardIterator end) + { + for (; begin != end; ++begin) + { +// if ((*begin & 0xc0) != 0x80 && (*begin & 0xf8) != 0xf8) // 00-7f, c0-f7. + if ((*begin & 0xc0) != 0x80) // 00-7f, c0-ff. + return true; + } + return false; + } +}; // utf8_traits + +// utf-16 specific. +template +struct utf16_traits : public utf_traits_core +{ +public: + + // utf-16 specific. + static const std::size_t maxseqlen = 2; + static const int utftype = 16; + + static const std::size_t bitsetsize = 0x10000; + static const uchar32 bitsetmask = 0xffff; + static const uchar32 cumask = 0xffff; + + template + static uchar32 codepoint(ForwardIterator begin, const ForwardIterator end) + { + const uchar32 codeunit = *begin; + + if ((codeunit & 0xdc00) != 0xd800) + return static_cast(codeunit & 0xffff); + + if (++begin != end && (*begin & 0xdc00) == 0xdc00) + return static_cast((((codeunit & 0x3ff) << 10) | (*begin & 0x3ff)) + 0x10000); + + return static_cast(codeunit & 0xffff); + } + + template + static uchar32 codepoint_inc(ForwardIterator &begin, const ForwardIterator end) + { + const uchar32 codeunit = *begin++; + + if ((codeunit & 0xdc00) != 0xd800) + return static_cast(codeunit & 0xffff); + + if (begin != end && (*begin & 0xdc00) == 0xdc00) + return static_cast((((codeunit & 0x3ff) << 10) | (*begin++ & 0x3ff)) + 0x10000); + + return static_cast(codeunit & 0xffff); + } + + template + static uchar32 prevcodepoint(BidirectionalIterator cur, const BidirectionalIterator begin) + { + const uchar32 codeunit = *--cur; + + if ((codeunit & 0xdc00) != 0xdc00 || cur == begin) + return static_cast(codeunit & 0xffff); + + if ((*--cur & 0xdc00) == 0xd800) + return static_cast((((*cur & 0x3ff) << 10) | (codeunit & 0x3ff)) + 0x10000); + + return static_cast(codeunit & 0xffff); + } + + template + static uchar32 dec_codepoint(BidirectionalIterator &cur, const BidirectionalIterator begin) + { + const uchar32 codeunit = *--cur; + + if ((codeunit & 0xdc00) != 0xdc00 || cur == begin) + return static_cast(codeunit & 0xffff); + + if ((*--cur & 0xdc00) == 0xd800) + return static_cast((((*cur & 0x3ff) << 10) | (codeunit & 0x3ff)) + 0x10000); + //else // (codeunit & 0xdc00) == 0xdc00 && (*cur & 0xdc00) != 0xd800 + + ++cur; + + return static_cast(codeunit & 0xffff); + } + +#if !defined(SRELLDBG_NO_BMH) + + template + static bool is_trailing(const charT2 cu) + { + return (cu & 0xdc00) == 0xdc00; + } + +#endif // !defined(SRELLDBG_NO_BMH) + + static uchar32 to_codeunits(charT out[maxseqlen], uchar32 cp) + { + if (cp < 0x10000) + { + out[0] = static_cast(cp); + return 1; + } +// else // if (cp < 0x110000) + { + cp -= 0x10000; + out[0] = static_cast(((cp >> 10) & 0x3ff) | 0xd800); + out[1] = static_cast((cp & 0x3ff) | 0xdc00); + return 2; + } + } + + static uchar32 firstcodeunit(const uchar32 cp) + { + if (cp < 0x10000) + return cp; + + return static_cast((cp >> 10) + 0xd7c0); + // aaaaa bbbbcccc ddddeeee -> AA AAbb bbcc/cc dddd eeee where AAAA = aaaaa - 1. + } + + template + static bool seek_charboundary(ForwardIterator &begin, const ForwardIterator end) + { + for (; begin != end; ++begin) + { + if ((*begin & 0xdc00) != 0xdc00) + return true; + } + return false; + } +}; // utf16_traits + +// specialisation for char. +template <> +struct utf_traits : public utf_traits_core +{ +public: + + template + static uchar32 codepoint(ForwardIterator begin, const ForwardIterator /* end */) + { + return static_cast(static_cast(*begin)); + } + + template + static uchar32 codepoint_inc(ForwardIterator &begin, const ForwardIterator /* end */) + { + return static_cast(static_cast(*begin++)); + } + + template + static uchar32 prevcodepoint(BidirectionalIterator cur, const BidirectionalIterator /* begin */) + { + return static_cast(static_cast(*--cur)); + } + + template + static uchar32 dec_codepoint(BidirectionalIterator &cur, const BidirectionalIterator /* begin */) + { + return static_cast(static_cast(*--cur)); + } + +#if !defined(SRELLDBG_NO_BMH) +#endif // !defined(SRELLDBG_NO_BMH) +}; // utf_traits + +// specialisation for signed char. +template <> +struct utf_traits : public utf_traits +{ +}; + +// (signed) short, (signed) int, (signed) long, (signed) long long, ... + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) +template <> +struct utf_traits : public utf16_traits +{ +}; +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) +template <> +struct utf_traits : public utf8_traits +{ +}; +#endif + + } // regex_internal + +// ... "rei_utf_traits.hpp"] +// ["regex_traits.hpp" ... + +// 28.7, class template regex_traits: +template +struct regex_traits +{ +public: + + typedef charT char_type; + typedef std::basic_string string_type; + typedef std::locale locale_type; +// typedef bitmask_type char_class_type; + typedef int char_class_type; + + typedef regex_internal::utf_traits utf_traits; + +public: + +// regex_traits(); + + static std::size_t length(const char_type *p) + { + return std::char_traits::length(p); + } + + charT translate(const charT c) const + { + return c; + } + + charT translate_nocase(const charT c) const + { + return c; + } + + template + string_type transform(ForwardIterator first, ForwardIterator last) const + { + return string_type(first, last); + } + + template + string_type transform_primary(ForwardIterator first, ForwardIterator last) const + { + return string_type(first, last); + } + + template + string_type lookup_collatename(ForwardIterator first, ForwardIterator last) const + { + return string_type(first, last); + } + + template + char_class_type lookup_classname(ForwardIterator /* first */, ForwardIterator /* last */, bool /* icase */ = false) const + { + return static_cast(0); + } + + bool isctype(const charT /* c */, const char_class_type /* f */) const + { + return false; + } + + int value(const charT /* ch */, const int /* radix */) const + { + return -1; + } + + locale_type imbue(const locale_type /* l */) + { + return locale_type(); + } + + locale_type getloc() const + { + return locale_type(); + } +}; // regex_traits + +template +struct u8regex_traits : public regex_traits +{ + typedef regex_internal::utf8_traits utf_traits; +}; + +template +struct u16regex_traits : public regex_traits +{ + typedef regex_internal::utf16_traits utf_traits; +}; + +// ... "regex_traits.hpp"] +// ["rei_memory.hpp" ... + + namespace regex_internal + { +/* + * Similar to std::basic_string, except for: + * a. only allocates memory, does not initialise it. + * b. uses realloc() to avoid moving data as much as possible when + * resizing an allocated buffer. + */ +template +class simple_array +{ +public: + + typedef ElemT value_type; + typedef std::size_t size_type; + typedef ElemT &reference; + typedef const ElemT &const_reference; + typedef ElemT *pointer; + typedef const ElemT *const_pointer; + + static const size_type npos = static_cast(-1); + +public: + + simple_array() + : buffer_(NULL) + , size_(0) + , capacity_(0) + { + } + + simple_array(const size_type initsize) + : buffer_(NULL) + , size_(0) + , capacity_(0) + { + if (initsize) + { + buffer_ = static_cast(std::malloc(initsize * sizeof (ElemT))); + + if (buffer_ != NULL) + size_ = capacity_ = initsize; + else + throw std::bad_alloc(); + } + } + + simple_array(const simple_array &right, size_type pos, size_type len = npos) + : buffer_(NULL) + , size_(0) + , capacity_(0) + { + if (pos > right.size_) + pos = right.size_; + + { + const size_type len2 = right.size_ - pos; + if (len > len2) + len = len2; + } + + if (len) + { + buffer_ = static_cast(std::malloc(len * sizeof (ElemT))); + + if (buffer_ != NULL) + { + for (capacity_ = len; size_ < capacity_;) + buffer_[size_++] = right[pos++]; + } + else + { + throw std::bad_alloc(); + } + } + } + + simple_array(const simple_array &right) + : buffer_(NULL) + , size_(0) + , capacity_(0) + { + operator=(right); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + simple_array(simple_array &&right) SRELL_NOEXCEPT + : buffer_(right.buffer_) + , size_(right.size_) + , capacity_(right.capacity_) + { + right.size_ = 0; + right.capacity_ = 0; + right.buffer_ = NULL; + } +#endif + + simple_array &operator=(const simple_array &right) + { + if (this != &right) + { + resize(right.size_); + for (size_type i = 0; i < right.size_; ++i) + buffer_[i] = right.buffer_[i]; + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + simple_array &operator=(simple_array &&right) SRELL_NOEXCEPT + { + if (this != &right) + { + if (this->buffer_ != NULL) + std::free(this->buffer_); + + this->size_ = right.size_; + this->capacity_ = right.capacity_; + this->buffer_ = right.buffer_; + + right.size_ = 0; + right.capacity_ = 0; + right.buffer_ = NULL; + } + return *this; + } +#endif + + ~simple_array() + { + if (buffer_ != NULL) + std::free(buffer_); + } + + size_type size() const + { + return size_; + } + + void clear() + { + size_ = 0; + } + + void resize(const size_type newsize) + { + if (newsize > capacity_) + reserve(newsize); + + size_ = newsize; + } + + void resize(const size_type newsize, const ElemT &type) + { + size_type oldsize = size_; + + resize(newsize); + for (; oldsize < size_; ++oldsize) + buffer_[oldsize] = type; + } + + reference operator[](const size_type pos) + { + return buffer_[pos]; + } + + const_reference operator[](const size_type pos) const + { + return buffer_[pos]; + } + + void push_back(const_reference n) + { + const size_type oldsize = size_; + + if (++size_ > capacity_) + reserve(size_); + + buffer_[oldsize] = n; + } + + const_reference back() const + { + return buffer_[size_ - 1]; + } + + reference back() + { + return buffer_[size_ - 1]; + } + + void pop_back() + { + --size_; + } + + simple_array &operator+=(const simple_array &right) + { + return append(right); + } + + simple_array &append(const size_type size, const ElemT &type) + { + resize(size_ + size, type); + return *this; + } + + simple_array &append(const simple_array &right) + { + size_type oldsize = size_; + + resize(size_ + right.size_); + for (size_type i = 0; i < right.size_; ++i, ++oldsize) + buffer_[oldsize] = right.buffer_[i]; + + return *this; + } + + simple_array &append(const simple_array &right, size_type pos, size_type len /* = npos */) + { + { + const size_type len2 = right.size_ - pos; + if (len > len2) + len = len2; + } + + size_type oldsize = size_; + + resize(size_ + len); + len += pos; // end. + for (; pos < len; ++oldsize, ++pos) + buffer_[oldsize] = right.buffer_[pos]; + + return *this; + } + + // For rei_char_class class. + void erase(const size_type pos) + { + if (pos < size_) + { + std::memmove(buffer_ + pos, buffer_ + pos + 1, (size_ - pos - 1) * sizeof (ElemT)); + --size_; + } + } + + // For rei_compiler class. + void insert(const size_type pos, const ElemT &type) + { + move_forward(pos, 1); + buffer_[pos] = type; + } + + void insert(size_type pos, const simple_array &right) + { + move_forward(pos, right.size_); + for (size_type i = 0; i < right.size_; ++i, ++pos) + buffer_[pos] = right.buffer_[i]; + } + + void insert(size_type destpos, const simple_array &right, size_type srcpos, size_type srclen = npos) + { + { + const size_type len2 = right.size_ - srcpos; + if (srclen > len2) + srclen = len2; + } + + move_forward(destpos, srclen); + srclen += srcpos; // srcend. + for (; srcpos < srclen; ++destpos, ++srcpos) + buffer_[destpos] = right.buffer_[srcpos]; + } + + simple_array &replace(size_type pos, size_type count, const simple_array &right) + { + if (count < right.size_) + move_forward(pos + count, right.size_ - count); + else if (count > right.size_) + { + const pointer base = buffer_ + pos; + + std::memmove(base + right.size_, base + count, (size_ - pos - count) * sizeof (ElemT)); + size_ -= count - right.size_; + } + + for (size_type i = 0; i < right.size_; ++pos, ++i) + buffer_[pos] = right[i]; + + return *this; + } + + size_type find(const value_type c, size_type pos = 0) const + { + for (; pos <= size_; ++pos) + if (buffer_[pos] == c) + return pos; + + return npos; + } + + const_pointer data() const + { + return buffer_; + } + + int compare(size_type pos, const size_type count1, const_pointer p, const size_type count2) const + { + size_type count = count1 <= count2 ? count1 : count2; + + for (; count; ++pos, ++p, --count) + { + const value_type &v = buffer_[pos]; + if (v != *p) + return v < *p ? -1 : 1; + } + return count1 == count2 ? 0 : (count1 < count2 ? -1 : 1); + } + + size_type max_size() const + { + return maxsize_; + } + + void swap(simple_array &right) + { + if (this != &right) + { + const pointer tmpbuffer = this->buffer_; + const size_type tmpsize = this->size_; + const size_type tmpcapacity = this->capacity_; + + this->buffer_ = right.buffer_; + this->size_ = right.size_; + this->capacity_ = right.capacity_; + + right.buffer_ = tmpbuffer; + right.size_ = tmpsize; + right.capacity_ = tmpcapacity; + } + } + +private: + + void reserve(const size_type newsize) + { +// if (newsize > capacity_) + { + if (newsize <= maxsize_) + { +// capacity_ = newsize + (newsize >> 1); // newsize * 1.5. + capacity_ = ((newsize >> 8) + 1) << 8; // Round up to a multiple of 256. + + if (capacity_ > maxsize_) + capacity_ = maxsize_; + + const size_type newsize_in_byte = capacity_ * sizeof (ElemT); + const pointer oldbuffer = buffer_; + + buffer_ = static_cast(std::realloc(buffer_, newsize_in_byte)); + if (buffer_ != NULL) + return; + + // Even if realloc() failed, already-existing buffer remains valid. + std::free(oldbuffer); +// buffer_ = NULL; + size_ = capacity_ = 0; + } + throw std::bad_alloc(); + } + } + + void move_forward(const size_type pos, const size_type count) + { + const size_type oldsize = size_; + + resize(size_ + count); + + if (pos < oldsize) + { + const pointer base = buffer_ + pos; + + std::memmove(base + count, base, (oldsize - pos) * sizeof (ElemT)); + } + } + +private: + + pointer buffer_; + size_type size_; + size_type capacity_; + +// static const size_type maxsize_ = (npos - sizeof (simple_array)) / sizeof (ElemT); + static const size_type maxsize_ = (npos - sizeof (pointer) - sizeof (size_type) * 2) / sizeof (ElemT) / 2; +}; +// simple_array + + } // namespace regex_internal + +// ... "rei_memory.hpp"] +// ["rei_bitset.hpp" ... + + namespace regex_internal + { + +// Always uses a heap instead of the stack. +template +class bitset +{ +private: + + typedef unsigned long array_type; + +public: + + bitset() + : buffer_(static_cast(std::malloc(size_in_byte_))) + { + if (buffer_ != NULL) + { + reset(); + return; + } + throw std::bad_alloc(); + } + + bitset(const bitset &right) + : buffer_(static_cast(std::malloc(size_in_byte_))) + { + if (buffer_ != NULL) + { + operator=(right); + return; + } + throw std::bad_alloc(); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + bitset(bitset &&right) SRELL_NOEXCEPT + : buffer_(right.buffer_) + { + right.buffer_ = NULL; + } +#endif + + bitset &operator=(const bitset &right) + { + if (this != &right) + { +// for (std::size_t i = 0; i < arraylength_; ++i) +// buffer_[i] = right.buffer_[i]; + std::memcpy(buffer_, right.buffer_, size_in_byte_); + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + bitset &operator=(bitset &&right) SRELL_NOEXCEPT + { + if (this != &right) + { + if (this->buffer_ != NULL) + std::free(this->buffer_); + + this->buffer_ = right.buffer_; + right.buffer_ = NULL; + } + return *this; + } +#endif + + ~bitset() + { + if (buffer_ != NULL) + std::free(buffer_); + } + + bitset &reset() + { + std::memset(buffer_, 0, size_in_byte_); + return *this; + } + + bitset &reset(const std::size_t bit) + { + buffer_[bit / bits_per_elem_] &= ~(1 << (bit & bitmask_)); + return *this; + } + + bitset &set(const std::size_t bit) + { + buffer_[bit / bits_per_elem_] |= (1 << (bit & bitmask_)); + return *this; + } + +#if 0 + void set_range(const std::size_t firstbit, const std::size_t lastbit) + { + const std::size_t lastelemidx = lastbit / bits_per_elem_; + std::size_t firstelemidx = firstbit / bits_per_elem_; + const array_type lastelemmask = ~(allbits1_ << ((lastbit & bitmask_) + 1)); + array_type ormask = allbits1_ << (firstbit & bitmask_); + + if (firstelemidx < lastelemidx) + { + buffer_[firstelemidx] |= ormask; + ormask = allbits1_; + + for (++firstelemidx; firstelemidx < lastelemidx; ++firstelemidx) + buffer_[firstelemidx] |= ormask; + } + ormask &= lastelemmask; + buffer_[lastelemidx] |= ormask; + + } +#endif + + bool test(const std::size_t bit) const + { + return (buffer_[bit / bits_per_elem_] & (1 << (bit & bitmask_))) != 0; + } + + bool operator[](const std::size_t bit) const + { + return (buffer_[bit / bits_per_elem_] & (1 << (bit & bitmask_))) != 0; + } + + bitset &flip() + { + for (std::size_t i = 0; i < arraylength_; ++i) + buffer_[i] = ~buffer_[i]; + return *this; + } + + void swap(bitset &right) + { + if (this != &right) + { + array_type *const tmpbuffer = this->buffer_; + this->buffer_ = right.buffer_; + right.buffer_ = tmpbuffer; + } + } + +private: + +#if defined(__cpp_constexpr) + static constexpr std::size_t pow2leN(const std::size_t n, const std::size_t p2) + { + return ((p2 << 1) == 0 || (p2 << 1) > n) ? p2 : pow2leN(n, p2 << 1); + } + static const std::size_t bits_per_elem_ = pow2leN(CHAR_BIT * sizeof (array_type), 8); +#else + static const std::size_t bpe_tmp_ = CHAR_BIT * sizeof (array_type); + static const std::size_t bits_per_elem_ = bpe_tmp_ >= 64 ? 64 : (bpe_tmp_ >= 32 ? 32 : (bpe_tmp_ >= 16 ? 16 : 8)); +#endif + static const std::size_t bitmask_ = bits_per_elem_ - 1; + static const std::size_t arraylength_ = (Bits + bitmask_) / bits_per_elem_; + static const std::size_t size_in_byte_ = arraylength_ * sizeof (array_type); + static const array_type allbits1_ = ~static_cast(0); + + array_type *buffer_; +}; + + } // namespace regex_internal + +// ... "rei_bitset.hpp"] +// ["rei_ucf.hpp" ... + + namespace regex_internal + { + +#if !defined(SRELL_NO_UNICODE_ICASE) +#include "srell_ucfdata2.hpp" + + namespace ucf_internal + { + +typedef unicode_casefolding ucf_data; + + } // namespace ucf_internal +#endif // !defined(SRELL_NO_UNICODE_ICASE) + +class unicode_case_folding +{ +public: + +#if !defined(SRELL_NO_UNICODE_ICASE) + static const uchar32 rev_maxset = ucf_internal::ucf_data::rev_maxset; +#else + static const uchar32 rev_maxset = 2; +#endif + + static uchar32 do_casefolding(const uchar32 cp) + { +#if !defined(SRELL_NO_UNICODE_ICASE) + if (cp <= ucf_internal::ucf_data::ucf_maxcodepoint) + return cp + ucf_internal::ucf_data::ucf_deltatable[ucf_internal::ucf_data::ucf_segmenttable[cp >> 8] + (cp & 0xff)]; +#else + if (cp >= char_alnum::ch_A && cp <= char_alnum::ch_Z) // 'A' && 'Z' + return static_cast(cp - char_alnum::ch_A + char_alnum::ch_a); // - 'A' + 'a' +#endif + return cp; + } + + static uchar32 casefoldedcharset(uchar32 out[rev_maxset], const uchar32 cp) + { +#if !defined(SRELL_NO_UNICODE_ICASE) + uchar32 count = 0; + + if (cp <= ucf_internal::ucf_data::rev_maxcodepoint) + { + const uchar32 offset_of_charset = ucf_internal::ucf_data::rev_indextable[ucf_internal::ucf_data::rev_segmenttable[cp >> 8] + (cp & 0xff)]; + const uchar32 *ptr = &ucf_internal::ucf_data::rev_charsettable[offset_of_charset]; + + for (; *ptr != cfcharset_eos_ && count < rev_maxset; ++ptr, ++count) + out[count] = *ptr; + } + if (count == 0) + out[count++] = cp; + + return count; +#else +// const uchar32 nocase = static_cast(cp & ~0x20); + const uchar32 nocase = static_cast(cp | constants::asc_icase); + + out[0] = cp; +// if (nocase >= char_alnum::ch_A && nocase <= char_alnum::ch_Z) + if (nocase >= char_alnum::ch_a && nocase <= char_alnum::ch_z) + { + out[1] = static_cast(cp ^ constants::asc_icase); + return 2; + } + return 1; +#endif + } + + unicode_case_folding &operator=(const unicode_case_folding &) + { + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + unicode_case_folding &operator=(unicode_case_folding &&) SRELL_NOEXCEPT + { + return *this; + } +#endif + + void swap(unicode_case_folding & /* right */) + { + } + +private: + +#if !defined(SRELL_NO_UNICODE_ICASE) + static const uchar32 cfcharset_eos_ = ucf_internal::ucf_data::eos; +#endif + +public: // For debug. + + void print_tables() const; +}; +// unicode_case_folding + + } // namespace regex_internal + +// ... "rei_ucf.hpp"] +// ["rei_up.hpp" ... + + namespace regex_internal + { + +#if !defined(SRELL_NO_UNICODE_PROPERTY) +#include "srell_updata.hpp" + +//template +class unicode_property +{ +public: + + typedef uint_l32 property_type; + typedef simple_array pstring; + + static const property_type error_property = static_cast(-1); + + unicode_property() + { + } + + unicode_property &operator=(const unicode_property &) + { + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + unicode_property &operator=(unicode_property &&) SRELL_NOEXCEPT + { + return *this; + } +#endif + + static property_type lookup_property(const pstring &name, const pstring &value) + { + pname_type ptype = name.size() ? lookup_property_name(name) : updata::ptype::general_category; + property_type property_number = lookup_property_value(ptype, value); + + if (property_number == updata::unknown && name.size() == 0) + { + ptype = updata::ptype::binary; + property_number = lookup_property_value(ptype, value); + } + + return property_number != updata::unknown ? property_number : error_property; + } + + static std::size_t ranges_offset(const property_type property_number) + { +#if defined(SRELL_UPDATA_VERSION) + return updata::positiontable[property_number].offset; +#else + const offset_and_number *const postable = updata::position_table(); + return postable[property_number].offset; +#endif + } + + static std::size_t number_of_ranges(const property_type property_number) + { +#if defined(SRELL_UPDATA_VERSION) + return updata::positiontable[property_number].number_of_pairs; +#else + const offset_and_number *const postable = updata::position_table(); + return postable[property_number].number_of_pairs; +#endif + } + + static const uchar32 *ranges_address(const property_type property_number) + { +#if defined(SRELL_UPDATA_VERSION) + return &updata::rangetable[ranges_offset(property_number) << 1]; +#else + const uchar32 *const ranges = updata::ranges(); + return &ranges[ranges_offset(property_number) << 1]; +#endif + } + +private: + + typedef uint_l32 pname_type; + typedef const char *pname_string_type; + +#if defined(SRELL_UPDATA_VERSION) && (SRELL_UPDATA_VERSION >= 200) + struct pvalue_type + { + pname_type pname; + property_type pnumber; + pname_string_type csstrings; + }; +#else + struct pvalue_type + { + pname_type pname; + pname_string_type csstrings; + property_type pnumber; + }; +#endif + + struct offset_and_number + { + std::size_t offset; + std::size_t number_of_pairs; + }; + + typedef unicode_property_data + updata; + + static pname_type lookup_property_name(const pstring &name) + { +#if defined(SRELL_UPDATA_VERSION) + for (std::size_t pno = 0; *updata::propertynametable[pno]; ++pno) + { + if (check_if_included(name, updata::propertynametable[pno])) + return static_cast(pno); + } +#else + const pname_string_type *const pname_table = updata::propertyname_table(); + + for (std::size_t pno = 0; *pname_table[pno]; ++pno) + { + if (check_if_included(name, pname_table[pno])) + return static_cast(pno); + } +#endif + return updata::ptype::unknown; + } + + // Checks if value is included in colon-separated strings. + static bool check_if_included(const pstring &value, pname_string_type csstrings) + { + if (static_cast(*csstrings) != meta_char::mc_astrsk) // '*' + { + while (*csstrings) + { + const pname_string_type begin = csstrings; + + for (; static_cast(*csstrings) != meta_char::mc_colon && static_cast(*csstrings) != char_ctrl::cc_nul; ++csstrings); + + const std::size_t length = csstrings - begin; + + if (static_cast(value.size()) == length) + if (value.compare(0, value.size(), begin, length) == 0) + return true; + + if (static_cast(*csstrings) == meta_char::mc_colon) + ++csstrings; + } + } + return false; + } + + static property_type lookup_property_value(const pname_type ptype, const pstring &value) + { +#if defined(SRELL_UPDATA_VERSION) + for (std::size_t pno = 0; *updata::rangenumbertable[pno].csstrings; ++pno) + { + const pvalue_type &pvalue = updata::rangenumbertable[pno]; + if (pvalue.pname == ptype && check_if_included(value, pvalue.csstrings)) + return pvalue.pnumber; + } +#else + const pvalue_type *const pvalue_table = updata::rangenumber_table(); + + for (std::size_t pno = 0; *pvalue_table[pno].csstrings; ++pno) + { + const pvalue_type &pvalue = pvalue_table[pno]; + if (pvalue.pname == ptype && check_if_included(value, pvalue.csstrings)) + return pvalue.pnumber; + } +#endif + return updata::unknown; + } + +public: + + static const std::size_t number_of_properties = updata::last_property_number + 1; + static const std::size_t last_property_number = updata::last_property_number; +#if defined(SRELL_UPDATA_VERSION) && (SRELL_UPDATA_VERSION >= 200) + static const std::size_t last_pos_number = updata::last_pos_number; +#endif + static const property_type gc_Zs = updata::gc_Space_Separator; + static const property_type gc_Cn = updata::gc_Unassigned; + static const property_type bp_Assigned = updata::bp_Assigned; + +// UnicodeIDStart:: +// UnicodeIDContinue:: + static const property_type bp_ID_Start = updata::bp_ID_Start; + static const property_type bp_ID_Continue = updata::bp_ID_Continue; +}; +// unicode_property + +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + } // namespace regex_internal + +// ... "rei_up.hpp"] +// ["rei_char_class.hpp" ... + + namespace regex_internal + { + +struct range_pair // , public std::pair +{ + uchar32 second; + uchar32 first; + + void set(const uchar32 min, const uchar32 max) + { + this->first = min; + this->second = max; + } + + bool is_range_valid() const + { + return first <= second; + } + + bool operator==(const range_pair &right) const + { + return this->first == right.first && this->second == right.second; + } + + bool operator<(const range_pair &right) const + { + return this->second < right.first; // This assumes that optimise() has been called. + } + + void swap(range_pair &right) + { + const range_pair tmp = *this; + *this = right; + right = tmp; + } + + bool unify_range(const range_pair &right) + { + range_pair &left = *this; + + if (right.first <= left.second || left.second + 1 == right.first) // r1 <= l2 || l2+1 == r1 + { + // l1 l2+1 < r1 r2 excluded. + + if (left.first <= right.second || right.second + 1 == left.first) // l1 <= r2 || r2+1 == l1 + { + // r1 r2+1 < l1 l2 excluded. + + if (left.first > right.first) + left.first = right.first; + + if (left.second < right.second) + left.second = right.second; + + return true; + } + } + return false; + } +}; +// range_pair + +struct range_pair_helper : public range_pair +{ + range_pair_helper(const uchar32 min, const uchar32 max) + { + this->first = min; + this->second = max; + } + + range_pair_helper(const uchar32 minmax) + { + this->first = minmax; + this->second = minmax; + } +}; +// range_pair_helper + +struct range_pairs // : public simple_array +{ +public: + + typedef simple_array array_type; + typedef array_type::size_type size_type; + + range_pairs() + { + } + + range_pairs(const range_pairs &rp) : rparray_(rp.rparray_) + { + } + + range_pairs &operator=(const range_pairs &rp) + { + rparray_.operator=(rp.rparray_); + return *this; + } + + range_pairs(const size_type initsize) : rparray_(initsize) + { + } + + range_pairs(const range_pairs &right, size_type pos, size_type size) + : rparray_(right.rparray_, pos, size) + { + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + range_pairs(range_pairs &&rp) SRELL_NOEXCEPT + : rparray_(std::move(rp.rparray_)) + { + } + + range_pairs &operator=(range_pairs &&rp) SRELL_NOEXCEPT + { + rparray_.operator=(std::move(rp.rparray_)); + return *this; + } +#endif + + void clear() + { + rparray_.clear(); + } + + size_type size() const + { + return rparray_.size(); + } + + const range_pair &operator[](const size_type pos) const + { + return rparray_[pos]; + } + range_pair &operator[](const size_type pos) + { + return rparray_[pos]; + } + + void resize(const size_type size) + { + rparray_.resize(size); + } + + void swap(range_pairs &right) + { + rparray_.swap(right.rparray_); + } + + void set_solerange(const range_pair &right) + { + rparray_.clear(); + rparray_.push_back(right); + } + + void append_newclass(const range_pairs &right) + { + rparray_.append(right.rparray_); + } + + void append_newpair(const range_pair &right) + { + rparray_.push_back(right); + } + + void join(const range_pair &right) + { + size_type pos = 0; + + for (; pos < rparray_.size(); ++pos) + { + range_pair &curpair = rparray_[pos]; + + if (curpair.unify_range(right)) + { + for (++pos; pos < rparray_.size();) + { + if (curpair.unify_range(rparray_[pos])) + rparray_.erase(pos); + else + break; + } + return; + } + if (right.second < curpair.first) + break; + } + rparray_.insert(pos, right); + } + + void merge(const range_pairs &right) + { + for (size_type i = 0; i < right.size(); ++i) + join(right[i]); + } + + bool same(uchar32 pos, const uchar32 count, const range_pairs &right) const + { + if (count == right.size()) + { + for (uchar32 i = 0; i < count; ++i, ++pos) + if (!(rparray_[pos] == right[i])) + return false; + + return true; + } + return false; + } + + int relationship(const range_pairs &right) const + { + if (rparray_.size() == right.rparray_.size()) + { + for (size_type i = 0; i < rparray_.size(); ++i) + { + if (!(this->rparray_[i] == right.rparray_[i])) + { + if (i == 0) + goto check_overlap; + + return 1; // Overlapped. + } + } + return 0; // Same. + } + check_overlap: + return is_overlap(right) ? 1 : 2; // Overlapped or exclusive. + } + + void negation() + { + uchar32 begin = 0; + range_pairs newpairs; + + for (size_type i = 0; i < rparray_.size(); ++i) + { + const range_pair &range = rparray_[i]; + + if (begin < range.first) + newpairs.join(range_pair_helper(begin, range.first - 1)); + + begin = range.second + 1; + } + + if (begin <= constants::unicode_max_codepoint) + newpairs.join(range_pair_helper(begin, constants::unicode_max_codepoint)); + + *this = newpairs; + } + + bool is_overlap(const range_pairs &right) const + { + for (size_type i = 0; i < rparray_.size(); ++i) + { + const range_pair &leftrange = rparray_[i]; + + for (size_type j = 0; j < right.size(); ++j) + { + const range_pair &rightrange = right[j]; + + if (rightrange.first <= leftrange.second) // Excludes l1 l2 < r1 r2. + if (leftrange.first <= rightrange.second) // Excludes r1 r2 < l1 l2. + return true; + } + } + return false; + } + + void load_from_memory(const uchar32 *array, size_type number_of_pairs) + { + for (; number_of_pairs; --number_of_pairs, array += 2) + join(range_pair_helper(array[0], array[1])); + } + + void make_caseunfoldedcharset() + { + uchar32 table[unicode_case_folding::rev_maxset] = {}; + bitset bs; + + for (size_type i = 0; i < rparray_.size(); ++i) + { + const range_pair &range = rparray_[i]; + + for (uchar32 ucp = range.first; ucp <= range.second; ++ucp) + { + const uchar32 setnum = unicode_case_folding::casefoldedcharset(table, ucp); + + for (uchar32 j = 0; j < setnum; ++j) + bs.set(table[j]); + } + } + load_from_bitset(bs); + } + + // For updataout.hpp. + void remove_range(const range_pair &right) + { + for (size_type pos = 0; pos < rparray_.size();) + { + range_pair &left = rparray_[pos]; + + if (right.first <= left.first && left.first <= right.second) // r1 <= l1 <= r2. + { + if (left.second > right.second) // r1 <= l1 <= r2 < l2. + { + left.first = right.second + 1; // carry doesn't happen. + ++pos; + } + else // r1 <= l1 <= l2 <= r2. + rparray_.erase(pos); + } + else if (right.first <= left.second && left.second <= right.second) // r1 <= l2 <= r2. + { + if (left.first < right.first) // l1 < r1 <= l2 <= r2. + { + left.second = right.first - 1; + ++pos; + } + else // r1 <= l1 <= l2 <= r2. + rparray_.erase(pos); + } + else if (left.first < right.first && right.second < left.second) // l1 < r1 && r2 < l2. + { + range_pair newrange(left); + + left.second = right.first - 1; + newrange.first = right.second + 1; + rparray_.insert(++pos, newrange); + ++pos; + } + else + ++pos; + } + } + +// template + uchar32 consists_of_one_character(const bool icase) const + { + if (rparray_.size() >= 1) + { + uchar32 (*const casefolding_func)(const uchar32) = !icase ? do_nothing : unicode_case_folding::do_casefolding; + const uchar32 ucp1st = casefolding_func(rparray_[0].first); + + for (size_type no = 0; no < rparray_.size(); ++no) + { + const range_pair &cr = rparray_[no]; + + for (uchar32 ucp = cr.first;; ++ucp) + { + if (ucp1st != casefolding_func(ucp)) + return constants::invalid_u32value; + + if (ucp == cr.second) + break; + } + } + return ucp1st; + } + return constants::invalid_u32value; + } + + void split_ranges(range_pairs &kept, range_pairs &removed, const range_pairs &rightranges) const + { + range_pair newpair; + + kept.rparray_ = this->rparray_; // Subtraction set. + removed.clear(); // Intersection set. + + for (size_type i = 0;; ++i) + { + RETRY_SAMEINDEXNO: + if (i >= kept.rparray_.size()) + break; + + range_pair &left = kept.rparray_[i]; + + for (size_type j = 0; j < rightranges.rparray_.size(); ++j) + { + const range_pair &right = rightranges.rparray_[j]; + + if (right.first <= left.second) // Excludes l1 l2 < r1 r2. + { + if (left.first <= right.second) // Excludes r1 r2 < l1 l2. + { + if (left.first < right.first) + { + if (right.second < left.second) + { + removed.join(range_pair_helper(right.first, right.second)); + + newpair.set(right.second + 1, left.second); + left.second = right.first - 1; + kept.rparray_.insert(i + 1, newpair); + } + else + { + removed.join(range_pair_helper(right.first, left.second)); + left.second = right.first - 1; + } + } + else if (right.second < left.second) + { + removed.join(range_pair_helper(left.first, right.second)); + left.first = right.second + 1; + } + else + { + removed.join(range_pair_helper(left.first, left.second)); + kept.rparray_.erase(i); + goto RETRY_SAMEINDEXNO; + } + } + } + else + break; + } + } + } + +#if defined(SRELLDBG_NO_BITSET) + bool is_included(const uchar32 ch) const + { +#if 01 + const range_pair *const end = rparray_.data() + rparray_.size(); + + for (const range_pair *cur = rparray_.data(); cur != end; ++cur) + { + if (ch <= cur->second) + return ch >= cur->first; +#else + for (size_type i = 0; i < rparray_.size(); ++i) + { + if (rparray_[i].is_included(ch)) + return true; +#endif + } + return false; + } +#endif // defined(SRELLDBG_NO_BITSET) + + // For multiple_range_pairs functions. + + bool is_included_ls(const uchar32 pos, uchar32 count, const uchar32 c) const + { + const range_pair *cur = &rparray_[pos]; + + for (; count; ++cur, --count) + { + if (c <= cur->second) + return c >= cur->first; + } + return false; + } + + bool is_included(const uchar32 pos, uchar32 count, const uchar32 c) const + { + const range_pair *base = &rparray_[pos]; + + while (count) + { + uchar32 mid = count >> 1; + const range_pair &rp = base[mid]; + + if (c <= rp.second) + { + if (c >= rp.first) + return true; + + count = mid; + } + else + { + ++mid; + count -= mid; + base += mid; + } + } + return false; + } + + void replace(const size_type pos, const size_type count, const range_pairs &right) + { + rparray_.replace(pos, count, right.rparray_); + } + +#if !defined(SRELLDBG_NO_CCPOS) + + // For Eytzinger layout functions. + + bool is_included_el(uchar32 pos, const uchar32 len, const uchar32 c) const + { + const range_pair *const base = &rparray_[pos]; + +#if defined(__GNUC__) + __builtin_prefetch(base); +#endif + for (pos = 0; pos < len;) + { + const range_pair &rp = base[pos]; + + if (c <= rp.second) + { + if (c >= rp.first) + return true; + + pos = (pos << 1) + 1; + } + else + { + pos = (pos << 1) + 2; + } + } + return false; + } + + uchar32 create_el(const range_pair *srcbase, const uchar32 srcsize) + { + const uchar32 basepos = static_cast(rparray_.size()); + + rparray_.resize(basepos + srcsize); + set_eytzinger_layout(0, srcbase, srcsize, &rparray_[basepos], 0); + + return srcsize; + } + +#endif // !defined(SRELLDBG_NO_CCPOS) + + uint_l32 total_codepoints() const + { + uint_l32 num = 0; + + for (size_type no = 0; no < rparray_.size(); ++no) + { + const range_pair &cr = rparray_[no]; + + num += cr.second - cr.first + 1; + } + return num; + } + +private: + +#if !defined(SRELLDBG_NO_CCPOS) + + uchar32 set_eytzinger_layout(uchar32 srcpos, const range_pair *const srcbase, const uchar32 srclen, + range_pair *const destbase, const uchar32 destpos) + { + if (destpos < srclen) + { + const uchar32 nextpos = (destpos << 1) + 1; + + srcpos = set_eytzinger_layout(srcpos, srcbase, srclen, destbase, nextpos); + destbase[destpos] = srcbase[srcpos++]; + srcpos = set_eytzinger_layout(srcpos, srcbase, srclen, destbase, nextpos + 1); + } + return srcpos; + } + +#endif // !defined(SRELLDBG_NO_CCPOS) + + static uchar32 do_nothing(const uchar32 cp) + { + return cp; + } + + template + void load_from_bitset(const BitSetT &bs) + { + uchar32 begin = constants::invalid_u32value; + range_pairs newranges; + + for (uchar32 ucp = 0;; ++ucp) + { + if (ucp > constants::unicode_max_codepoint || !bs.test(ucp)) + { + if (begin != constants::invalid_u32value) + { + newranges.join(range_pair_helper(begin, ucp - 1)); + begin = constants::invalid_u32value; + } + if (ucp > constants::unicode_max_codepoint) + break; + } + else if (begin == constants::invalid_u32value && bs.test(ucp)) + begin = ucp; + } + rparray_.swap(newranges.rparray_); + } + + array_type rparray_; + +public: // For debug. + + void print_pairs(const int, const char *const = NULL, const char *const = NULL) const; +}; +// range_pairs + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + +// For RegExpIdentifierStart and RegExpIdentifierPart +struct identifier_charclass +{ +public: + + void clear() + { + char_class_.clear(); + char_class_pos_.clear(); + } + + void setup() + { + if (char_class_pos_.size() == 0) + { + static const uchar32 additions[] = { + // reg_exp_identifier_start, reg_exp_identifier_part. + 0x24, 0x24, 0x5f, 0x5f, 0x200c, 0x200d // '$' '_' - + }; + range_pairs ranges; + + // For reg_exp_identifier_start. + { + const uchar32 *const IDs_address = unicode_property::ranges_address(unicode_property::bp_ID_Start); + const std::size_t IDs_number = unicode_property::number_of_ranges(unicode_property::bp_ID_Start); + ranges.load_from_memory(IDs_address, IDs_number); + } + ranges.load_from_memory(&additions[0], 2); + append_charclass(ranges); + + // For reg_exp_identifier_part. + ranges.clear(); + { + const uchar32 *const IDc_address = unicode_property::ranges_address(unicode_property::bp_ID_Continue); + const std::size_t IDc_number = unicode_property::number_of_ranges(unicode_property::bp_ID_Continue); + ranges.load_from_memory(IDc_address, IDc_number); + } + ranges.load_from_memory(&additions[0], 3); + append_charclass(ranges); + } + } + + bool is_identifier(const uchar32 ch, const bool part) const + { + const range_pair &rp = char_class_pos_[part ? 1 : 0]; + + return char_class_.is_included(rp.first, rp.second, ch); + } + +private: + + void append_charclass(const range_pairs &rps) + { + char_class_pos_.push_back(range_pair_helper(static_cast(char_class_.size()), static_cast(rps.size()))); + char_class_.append_newclass(rps); + } + + range_pairs char_class_; + range_pairs::array_type char_class_pos_; +}; +// identifier_charclass +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + +class re_character_class +{ +public: + + enum + { // 0 1 2 3 4 5 + newline, dotall, space, digit, word, icase_word, + // 6 + number_of_predefcls + }; + static const uint_l32 error_property = static_cast(-1); + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + typedef unicode_property::pstring pstring; +#endif + + re_character_class() + { + setup_predefinedclass(); + } + + re_character_class &operator=(const re_character_class &that) + { + if (this != &that) + { + this->char_class_ = that.char_class_; + this->char_class_pos_ = that.char_class_pos_; +#if !defined(SRELLDBG_NO_CCPOS) + this->char_class_el_ = that.char_class_el_; + this->char_class_pos_el_ = that.char_class_pos_el_; +#endif + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + re_character_class &operator=(re_character_class &&that) SRELL_NOEXCEPT + { + if (this != &that) + { + this->char_class_ = std::move(that.char_class_); + this->char_class_pos_ = std::move(that.char_class_pos_); +#if !defined(SRELLDBG_NO_CCPOS) + this->char_class_el_ = std::move(that.char_class_el_); + this->char_class_pos_el_ = std::move(that.char_class_pos_el_); +#endif + } + return *this; + } +#endif + + bool is_included(const uint_l32 class_number, const uchar32 c) const + { +// return char_class_.is_included(char_class_pos_[class_number], c); + const range_pair &rp = char_class_pos_[class_number]; + + return char_class_.is_included(rp.first, rp.second, c); + } + +#if !defined(SRELLDBG_NO_CCPOS) +// bool is_included(const uint_l32 pos, const uint_l32 len, const uchar32 &c) const + bool is_included(const uchar32 pos, const uchar32 len, const uchar32 c) const + { + return char_class_el_.is_included_el(pos, len, c); + } +#endif + + void setup_icase_word() + { + range_pair &icase_pos = char_class_pos_[icase_word]; + + if (icase_pos.second == char_class_pos_[word].second) + { + range_pairs icasewordclass(char_class_, icase_pos.first, icase_pos.second); + + icasewordclass.make_caseunfoldedcharset(); + // Includes 017f and 212a so that they and their case-folded + // characters 's' and 'k' will be excluded from the character + // set that /[\W]/i matches. + + char_class_.replace(icase_pos.first, icase_pos.second, icasewordclass); + + if (icase_pos.second < static_cast(icasewordclass.size())) + { + const uchar32 delta = static_cast(icasewordclass.size() - icase_pos.second); + + for (int i = number_of_predefcls; i < static_cast(char_class_pos_.size()); ++i) + char_class_pos_[i].first += delta; + } + icase_pos.second = static_cast(icasewordclass.size()); + } + } + + void clear() + { + char_class_pos_.resize(number_of_predefcls); + + uchar32 basesize = 0; + for (int i = 0; i < number_of_predefcls; ++i) + basesize += char_class_pos_[i].second; + + char_class_.resize(basesize); + +#if !defined(SRELLDBG_NO_CCPOS) + char_class_el_.clear(); + char_class_pos_el_.clear(); +#endif + } + + uint_l32 register_newclass(const range_pairs &rps) + { + for (range_pairs::size_type no = 0; no < char_class_pos_.size(); ++no) + { + const range_pair &rp = char_class_pos_[no]; + + if (char_class_.same(rp.first, rp.second, rps)) + return static_cast(no); + } + + append_charclass(rps); + return static_cast(char_class_pos_.size() - 1); + } + + range_pairs operator[](const uint_l32 no) const + { + const range_pair &ccpos = char_class_pos_[no]; + range_pairs rp(ccpos.second); + + for (uchar32 i = 0; i < ccpos.second; ++i) + rp[i] = char_class_[ccpos.first + i]; + + return rp; + } + +#if !defined(SRELLDBG_NO_CCPOS) + const range_pair &charclasspos(const uint_l32 no) // const + { + const range_pair &pos = char_class_pos_el_[no]; + + if (pos.second == 0) + finalise(no); + return pos; + } + + void finalise() + { + char_class_el_.clear(); + char_class_pos_el_.resize(char_class_pos_.size()); + std::memset(&char_class_pos_el_[0], 0, char_class_pos_el_.size() * sizeof (range_pairs::array_type::value_type)); + } + + void finalise(const uint_l32 no) + { + const range_pair &posinfo = char_class_pos_[no]; + range_pair &outpair = char_class_pos_el_[no]; + + outpair.first = static_cast(char_class_el_.size()); + outpair.second = char_class_el_.create_el(&char_class_[posinfo.first], posinfo.second); //arraysize; + + } + +#endif // #if !defined(SRELLDBG_NO_CCPOS) + + void optimise() + { + } + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + + uint_l32 lookup_property(const pstring &pname, const pstring &pvalue, const bool icase) + { + const uint_l32 property_number = static_cast(unicode_property::lookup_property(pname, pvalue)); + + if (property_number != unicode_property::error_property && property_number < unicode_property::number_of_properties) + { + const uint_l32 charclass_number = register_property_as_charclass(property_number, icase); + return charclass_number; + } + return error_property; + } + +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + + void swap(re_character_class &right) + { + if (this != &right) + { + this->char_class_.swap(right.char_class_); + this->char_class_pos_.swap(right.char_class_pos_); +#if !defined(SRELLDBG_NO_CCPOS) + this->char_class_el_.swap(right.char_class_el_); + this->char_class_pos_el_.swap(right.char_class_pos_el_); +#endif + } + } + +private: + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + + uint_l32 register_property_as_charclass(const uint_l32 property_number, const bool icase) + { + if (property_number == unicode_property::bp_Assigned) + { + // \p{Assigned} == \P{Cn} + return load_updata_and_register_as_charclass(unicode_property::gc_Cn, false, true); + } + return load_updata_and_register_as_charclass(property_number, icase, false); + } + + uint_l32 load_updata_and_register_as_charclass(const uint_l32 property_number, const bool /* icase */, const bool negation) + { + const uchar32 *const address = unicode_property::ranges_address(property_number); +// const std::size_t offset = unicode_property::ranges_offset(property_number); + const std::size_t number = unicode_property::number_of_ranges(property_number); + range_pairs newranges; + + newranges.load_from_memory(address, number); + + if (negation) + newranges.negation(); + + return register_newclass(newranges); + } + +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + + void append_charclass(const range_pairs &rps) + { + char_class_pos_.push_back(range_pair_helper(static_cast(char_class_.size()), static_cast(rps.size()))); + char_class_.append_newclass(rps); + } + +// The production CharacterClassEscape::s evaluates as follows: +// Return the set of characters containing the characters that are on the right-hand side of the WhiteSpace or LineTerminator productions. +// WhiteSpace:: +// 0009 000B 000C 0020 00A0 FEFF Zs +// LineTerminator:: +// 000A 000D 2028 2029 + + void setup_predefinedclass() + { +#if !defined(SRELL_NO_UNICODE_PROPERTY) + const uchar32 *const Zs_address = unicode_property::ranges_address(unicode_property::gc_Zs); +// const std::size_t Zs_offset = unicode_property::ranges_offset(unicode_property::gc_Zs); + const std::size_t Zs_number = unicode_property::number_of_ranges(unicode_property::gc_Zs); +#else + static const uchar32 Zs[] = { + 0x1680, 0x1680, 0x2000, 0x200a, // 0x2028, 0x2029, + 0x202f, 0x202f, 0x205f, 0x205f, 0x3000, 0x3000 + }; +#endif // defined(SRELL_NO_UNICODE_PROPERTY) + static const uchar32 allranges[] = { + // dotall. + 0x0000, 0x10ffff, + // newline. + 0x0a, 0x0a, 0x0d, 0x0d, // \n \r + // newline, space. + 0x2028, 0x2029, + // space. + 0x09, 0x0d, // \t \n \v \f \r + 0x20, 0x20, // ' ' + 0xa0, 0xa0, // + 0xfeff, 0xfeff, // + // digit, word. + 0x30, 0x39, // '0'-'9' + 0x41, 0x5a, 0x5f, 0x5f, 0x61, 0x7a // 'A'-'Z' '_' 'a'-'z' + }; + range_pairs ranges; + + // newline. + ranges.load_from_memory(&allranges[2], 3); + append_charclass(ranges); + + // dotall. + ranges.clear(); + ranges.load_from_memory(&allranges[0], 1); + append_charclass(ranges); + + // space. + ranges.clear(); + ranges.load_from_memory(&allranges[6], 5); +#if !defined(SRELL_NO_UNICODE_PROPERTY) + ranges.load_from_memory(Zs_address, Zs_number); +#else + ranges.load_from_memory(Zs, 5); +#endif + append_charclass(ranges); + + // digit. + ranges.clear(); + ranges.load_from_memory(&allranges[16], 1); + append_charclass(ranges); + + // word. + ranges.clear(); + ranges.load_from_memory(&allranges[16], 4); + append_charclass(ranges); + + // Reservation for icase_word. + append_charclass(ranges); + } + +private: + + range_pairs char_class_; + range_pairs::array_type char_class_pos_; + +#if !defined(SRELLDBG_NO_CCPOS) + range_pairs char_class_el_; + range_pairs::array_type char_class_pos_el_; + +#endif + +public: // For debug. + + void print_classes(const int) const; +}; +// re_character_class + + } // namespace regex_internal + +// ... "rei_char_class.hpp"] +// ["rei_groupname_mapper.hpp" ... + + namespace regex_internal + { + +#if !defined(SRELL_NO_NAMEDCAPTURE) + +template +class groupname_and_backrefnumber_mapper +{ +public: + + typedef simple_array gname_string; + typedef typename gname_string::size_type size_type; + static const numberT notfound = static_cast(-1); + + groupname_and_backrefnumber_mapper() + { + } + + groupname_and_backrefnumber_mapper(const groupname_and_backrefnumber_mapper &right) + : names_(right.names_), keysize_classno_(right.keysize_classno_) + { + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + groupname_and_backrefnumber_mapper(groupname_and_backrefnumber_mapper &&right) SRELL_NOEXCEPT + : names_(std::move(right.names_)), keysize_classno_(std::move(right.keysize_classno_)) + { + } +#endif + + groupname_and_backrefnumber_mapper &operator=(const groupname_and_backrefnumber_mapper &right) + { + if (this != &right) + { + names_ = right.names_; + keysize_classno_ = right.keysize_classno_; + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + groupname_and_backrefnumber_mapper &operator=(groupname_and_backrefnumber_mapper &&right) SRELL_NOEXCEPT + { + if (this != &right) + { + names_ = std::move(right.names_); + keysize_classno_ = std::move(right.keysize_classno_); + } + return *this; + } +#endif + + void clear() + { + names_.clear(); + keysize_classno_.clear(); + } + + numberT operator[](const gname_string &gname) const + { + numberT pos = 0; + for (std::size_t i = 0; i < static_cast(keysize_classno_.size()); i += 2) + { + const numberT keysize = keysize_classno_[i]; + + if (keysize == static_cast(gname.size()) && sameseq(pos, gname)) + return keysize_classno_[++i]; + + pos += keysize; + } + return notfound; + } + + gname_string operator[](const numberT indexno) const + { + numberT pos = 0; + for (std::size_t i = 0; i < static_cast(keysize_classno_.size()); ++i) + { + const numberT keysize = keysize_classno_[i]; + const numberT classno = keysize_classno_[++i]; + + if (classno == indexno) + return gname_string(names_, pos, keysize); + + pos += keysize; + } + return gname_string(); + } + + size_type size() const + { + return static_cast(keysize_classno_.size() >> 1); + } + + bool push_back(const gname_string &gname, const numberT class_number) + { + const numberT num = operator[](gname); + + if (num == notfound) + { + names_.append(gname); + keysize_classno_.append(1, static_cast(gname.size())); + keysize_classno_.append(1, class_number); + return true; + } + return false; // Already exists. + } + + void swap(groupname_and_backrefnumber_mapper &right) + { + this->names_.swap(right.names_); + keysize_classno_.swap(right.keysize_classno_); + } + +private: + + bool sameseq(size_type pos, const gname_string &gname) const + { + for (size_type i = 0; i < gname.size(); ++i, ++pos) + if (pos >= names_.size() || names_[pos] != gname[i]) + return false; + + return true; + } + + gname_string names_; + simple_array keysize_classno_; + +public: // For debug. + + void print_mappings(const int) const; +}; +// groupname_and_backrefnumber_mapper + +template +class groupname_mapper : public groupname_and_backrefnumber_mapper +{ +}; + +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + + } // namespace regex_internal + +// ... "rei_groupname_mapper.hpp"] +// ["rei_state.hpp" ... + + namespace regex_internal + { + +struct re_quantifier +{ + static const uint_l32 infinity = static_cast(~0); + + // atleast and atmost: for check_counter. + // offset and length: for charcter_class. + // (Special case 1) in roundbracket_open and roundbracket_pop atleast and atmost represent + // the minimum and maximum bracket numbers respectively inside the brackets itself. + // (Special case 2) in repeat_in_push and repeat_in_pop atleast and atmost represent the + // minimum and maximum bracket numbers respectively inside the repetition. + union + { + uint_l32 atleast; + // (Special case 3: v1) in lookaround_open represents the number of characters to be rewound. + // (Special case 3: v2) in lookaround_open represents: 0=lookaheads, 1=lookbehinds, + // 2=matchpointrewinder. + // (Special case 4) in NFA_states[0] represents the class number of the first character class. + uchar32 offset; + }; + union + { + uint_l32 atmost; + uchar32 length; + }; + + union + { + bool is_greedy; + uint_l32 padding_; + }; + + void reset(const uint_l32 len = 1) + { + atleast = atmost = len; + is_greedy = true; + } + + void set(const uint_l32 min, const uint_l32 max) + { + atleast = min; + atmost = max; + } + + void set(const uint_l32 min, const uint_l32 max, const bool greedy) + { + atleast = min; + atmost = max; + is_greedy = greedy; + } + + void setccpos(const uchar32 o, const uchar32 l) + { + offset = o; + length = l; + } + + bool is_valid() const + { + return atleast <= atmost && atmost > 0; + } + + void set_infinity() + { + atmost = infinity; + } + + bool is_infinity() const + { + return atmost == infinity; + } + + bool is_same() const + { + return atleast == atmost; + } + + bool is_default() const + { + return atleast == 1 && atmost == 1; + } + + bool is_asterisk() const + { + return atleast == 0 && atmost == infinity; + } + bool is_plus() const + { + return atleast == 1 && atmost == infinity; + } + bool is_asterisk_or_plus() const + { + return atleast <= 1 && atmost == infinity; + } + bool is_question_or_asterisk() const + { + return atleast == 0 && (atmost == 1 || atmost == infinity); + } + + bool has_simple_equivalence() const + { + return (atleast <= 1 && atmost <= 3) || (atleast == 2 && atmost <= 4) || (atleast == atmost && atmost <= 6); + } + + void multiply(const re_quantifier &q) + { + if (atleast != infinity) + { + if (q.atleast != infinity) + atleast *= q.atleast; + else + atleast = infinity; + } + + if (atmost != infinity) + { + if (q.atmost != infinity) + atmost *= q.atmost; + else + atmost = infinity; + } + } + + void add(const re_quantifier &q) + { + if (atleast != infinity) + { + if (q.atleast != infinity && (atleast + q.atleast) >= atleast) + atleast += q.atleast; + else + atleast = infinity; + } + + if (atmost != infinity) + { + if (q.atmost != infinity && (atmost + q.atmost) >= atmost) + atmost += q.atmost; + else + atmost = infinity; + } + } +}; +// re_quantifier + +struct re_state +{ + union + { + uchar32 character; // For character. + uint_l32 number; // For character_class, brackets, counter, repeat, backreference. + }; + + re_state_type type; + + union + { + std::ptrdiff_t next1; + re_state *next_state1; + // Points to the next state. + // (Special case 1) in lookaround_open points to the next of lookaround_close. + }; + union + { + std::ptrdiff_t next2; + re_state *next_state2; + // character and character_class: points to another possibility, non-backtracking. + // epsilon: points to another possibility, backtracking. + // save_and_reset_counter, roundbracket_open, and repeat_in_push: points to a + // restore state, backtracking. + // check_counter: complementary to next1 based on quantifier.is_greedy. + // (Special case 1) roundbracket_close, check_0_width_repeat, and backreference: + // points to the next state as an exit after 0 width match. + // (Special case 2) in NFA_states[0] holds the entry point for match_continuous/regex_match. + // (Special case 3) in lookaround_open points to the contents of brackets. + }; + + re_quantifier quantifier; // For check_counter, roundbrackets, repeasts, (?<=...) and (? number of chars to be rewound (for (?<=...) (? 0: lookahead, 1: lookbehind, 2: mprewinder. + // q.atmost: - + // q.greedy: - + // is_not/dont_push: not + + // st_bol, // 0x0f + // char/number: - + // next1/next2: - + // quantifiers: - + // is_not/dont_push: - + + // st_eol, // 0x10 + // char/number: - + // next1/next2: - + // quantifiers: - + // is_not/dont_push: - + + // st_boundary, // 0x11 + // char/number: - + // next1/next2: - + // quantifiers: - + // is_not/dont_push: not + + // st_success, // 0x12 + // char/number: - + // next1/next2: - + // quantifiers: - + // is_not/dont_push: - + + // st_move_nextpos, // 0x13 + // char/number: - + // next1/next2: - + // quantifiers: - + // is_not/dont_push: - + + void reset() + { + number = 0; + type = st_character; + next1 = 1; + next2 = 0; + is_not = false; + quantifier.reset(); + } + + bool is_character_or_class() const + { + return type == st_character || type == st_character_class; + } + + bool has_quantifier() const + { + // 1. character: size == 1 && type == character, + // 2. [...]: size == 1 && type == character_class, + // 3. (...): size == ? && type == roundbracket_open, + // 4. (?:...): size == ? && type == epsilon && character == ':', + // 5. backref: size == ? && type == backreference, + // -- assertions boundary -- + // 6. lookaround: size == ? && type == lookaround, + // 7. assertion: size == 0 && type == one of assertions (^, $, \b and \B). +#if !defined(SRELL_ENABLE_GT) + return type < st_zero_width_boundary; +#else + // 5.5. independent: size == ? && type == lookaround && character == '>', + return type < st_zero_width_boundary || (type == st_lookaround_open && character == meta_char::mc_gt); +#endif + } + + bool is_noncapturinggroup() const + { + return type == st_epsilon && character == meta_char::mc_colon; + } + + bool has_0widthchecker() const + { + return type == st_roundbracket_open || type == st_backreference; + } + + bool is_negcharclass() const + { + return type == st_character_class && is_not; + } + + bool is_branch() const + { + return type == st_epsilon && next2 != 0 && character == meta_char::mc_bar; // '|' + } +}; +// re_state + +template +//struct re_flags +struct re_compiler_state +{ +// bool i; +// bool m; +// bool s; + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + bool back; +#endif + + bool backref_used; + + simple_array atleast_widths_of_brackets; +#if !defined(SRELL_NO_NAMEDCAPTURE) + groupname_mapper unresolved_gnames; +#endif + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + identifier_charclass idchecker; +#endif + + void reset(const regex_constants::syntax_option_type & /* flags */) + { +// i = (flags & regex_constants::icase) != 0; // Case-insensitive. +// m = (flags & regex_constants::multiline) != 0; +// s = (flags & regex_constants::dotall) != 0; + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + back = false; +#endif + + backref_used = false; + atleast_widths_of_brackets.clear(); + +#if !defined(SRELL_NO_NAMEDCAPTURE) + unresolved_gnames.clear(); +#endif + +#if !defined(SRELL_NO_UNICODE_PROPERTY) +// idchecker.clear(); // Keeps data once created. +#endif + } + + void restore_from(const re_compiler_state &backup) + { +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + back = backup.back; +#endif + } +}; +// re_compiler_state + + } // namespace regex_internal + +// ... "rei_state.hpp"] +// ["rei_search_state.hpp" ... + +template +class sub_match /* : std::pair */; + + namespace regex_internal + { + +//template +struct re_state; + +template +struct re_search_state_core +{ + const re_state/* */ *in_NFA_states; + BidirectionalIterator in_string; +}; + +template +struct re_submatch_core +{ + BidirectionalIterator open_at; + BidirectionalIterator close_at; +}; + +template +struct re_submatch_type +{ + re_submatch_core core; + uint_l32 counter; +}; + +template +struct re_search_state_types +{ + typedef re_submatch_core submatch_core; + typedef re_submatch_type submatch_type; + typedef uint_l32 counter_type; + typedef BidirectionalIterator position_type; + + typedef std::vector submatch_array; + + typedef re_search_state_core search_core_state; + + typedef std::vector backtracking_array; + typedef std::vector capture_array; + typedef simple_array counter_array; + typedef std::vector repeat_array; +}; + +template +struct re_search_state_types +{ + typedef re_submatch_core submatch_core; + typedef re_submatch_type submatch_type; + typedef uint_l32 counter_type; + typedef const charT2 *position_type; + + typedef simple_array submatch_array; + + typedef re_search_state_core search_core_state; + + typedef simple_array backtracking_array; + typedef simple_array capture_array; + typedef simple_array repeat_array; + typedef simple_array counter_array; +}; +// re_search_state_types + +template +class re_search_state : public re_search_state_types +{ +private: + + typedef re_search_state_types base_type; + +public: + + typedef typename base_type::submatch_core submatchcore_type; + typedef typename base_type::submatch_type submatch_type; + typedef typename base_type::counter_type counter_type; + typedef typename base_type::position_type position_type; + + typedef typename base_type::submatch_array submatch_array; + + typedef typename base_type::search_core_state search_core_state; + + typedef typename base_type::backtracking_array backtracking_array; + typedef typename base_type::capture_array capture_array; + typedef typename base_type::counter_array counter_array; + typedef typename base_type::repeat_array repeat_array; + + typedef typename backtracking_array::size_type btstack_size_type; + +public: + + struct bottom_state + { + btstack_size_type btstack_size; + typename capture_array::size_type capturestack_size; + typename counter_array::size_type counterstack_size; + typename repeat_array::size_type repeatstack_size; + + bottom_state( + const btstack_size_type bt, + const typename capture_array::size_type h, + const typename counter_array::size_type c, + const typename repeat_array::size_type r) + : btstack_size(bt) + , capturestack_size(h) + , counterstack_size(c) + , repeatstack_size(r) + { + } + }; + +public: + + search_core_state nth; + +#if !defined(SRELL_NO_LIMIT_COUNTER) + std::size_t failure_counter; +#endif + + BidirectionalIterator srchend; + BidirectionalIterator lblim; + + BidirectionalIterator nextpos; + + backtracking_array bt_stack; + + capture_array capture_stack; + counter_array counter_stack; + repeat_array repeat_stack; + + submatch_array bracket; + counter_array counter; + repeat_array repeat; + + btstack_size_type btstack_size; + + BidirectionalIterator srchbegin; + +public: + + void init + ( + const BidirectionalIterator begin, + const BidirectionalIterator end, + const BidirectionalIterator lookbehindlimit, + const regex_constants::match_flag_type flags + ) + { + lblim = lookbehindlimit; + nextpos = srchbegin = begin; + srchend = end; + flags_ = flags; + } + + void set_entrypoint(const re_state *const entry) + { + entry_state_ = entry; + } + + void init_for_automaton + ( + uint_l32 num_of_submatches, + const uint_l32 num_of_counters, + const uint_l32 num_of_repeats + ) + { + + bracket.resize(num_of_submatches); + counter.resize(num_of_counters); + repeat.resize(num_of_repeats); + + nth.in_string = (flags_ & regex_constants::match_continuous) ? srchbegin : srchend; + + while (num_of_submatches > 1) + { + submatch_type &br = bracket[--num_of_submatches]; + + br.core.open_at = br.core.close_at = this->srchend; + br.counter = 0; + // 15.10.2.9; AtomEscape: + // If the regular expression has n or more capturing parentheses + // but the nth one is undefined because it hasn't captured anything, + // then the backreference always succeeds. + + // C.f., table 27 and 28 on TR1, table 142 and 143 on C++11. + } + + clear_stacks(); + } + +#if defined(SRELL_NO_LIMIT_COUNTER) + void reset(/* const BidirectionalIterator start */) +#else + void reset(/* const BidirectionalIterator start, */ const std::size_t limit) +#endif + { + nth.in_NFA_states = this->entry_state_; + + bracket[0].core.open_at = nth.in_string; + +#if !defined(SRELL_NO_LIMIT_COUNTER) + failure_counter = limit; +#endif + } + + bool is_at_lookbehindlimit() const + { + return nth.in_string == this->lblim; + } + + bool is_at_srchend() const + { + return nth.in_string == this->srchend; + } + + bool is_null() const + { + return nth.in_string == bracket[0].core.open_at; + } + +// regex_constants::match_flag_type flags() const +// { +// return this->flags_; +// } + + bool match_not_bol_flag() const + { + if (this->flags_ & regex_constants::match_not_bol) + return true; + return false; + } + + bool match_not_eol_flag() const + { + if (this->flags_ & regex_constants::match_not_eol) + return true; + return false; + } + + bool match_not_bow_flag() const + { + if (this->flags_ & regex_constants::match_not_bow) + return true; + return false; + } + + bool match_not_eow_flag() const + { + if (this->flags_ & regex_constants::match_not_eow) + return true; + return false; + } + + bool match_prev_avail_flag() const + { + if (this->flags_ & regex_constants::match_prev_avail) + return true; + return false; + } + + bool match_not_null_flag() const + { + if (this->flags_ & regex_constants::match_not_null) + return true; + return false; + } + + bool match_continuous_flag() const + { + if (this->flags_ & regex_constants::match_continuous) + return true; + return false; + } + + bool match_match_flag() const + { + if (this->flags_ & regex_constants::match_match_) + return true; + return false; + } + + bool set_bracket0(const BidirectionalIterator begin, const BidirectionalIterator end) + { + nth.in_string = begin; + nextpos = end; + return true; + } + + void clear_stacks() + { + btstack_size = 0; + bt_stack.clear(); + capture_stack.clear(); + repeat_stack.clear(); + counter_stack.clear(); + } + + btstack_size_type size() const // For debug. + { + return bt_stack.size(); + } + + bool is_empty() const // For debug. + { + if (btstack_size == 0 + && bt_stack.size() == 0 + && capture_stack.size() == 0 + && repeat_stack.size() == 0 + && counter_stack.size() == 0) + return true; + + return false; + } + +private: + + /* const */regex_constants::match_flag_type flags_; + const re_state/* */ * /* const */entry_state_; +}; +// re_search_state + + } // namespace regex_internal + +// ... "rei_search_state.hpp"] +// ["rei_bmh.hpp" ... + + namespace regex_internal + { + +#if !defined(SRELLDBG_NO_BMH) + +template +class re_bmh +{ +public: + + re_bmh() + { + } + + re_bmh(const re_bmh &right) + { + operator=(right); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + re_bmh(re_bmh &&right) SRELL_NOEXCEPT + { + operator=(std::move(right)); + } +#endif + + re_bmh &operator=(const re_bmh &that) + { + if (this != &that) + { + this->u32string_ = that.u32string_; + + this->bmtable_ = that.bmtable_; + this->repseq_ = that.repseq_; + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + re_bmh &operator=(re_bmh &&that) SRELL_NOEXCEPT + { + if (this != &that) + { + this->u32string_ = std::move(that.u32string_); + + this->bmtable_ = std::move(that.bmtable_); + this->repseq_ = std::move(that.repseq_); + } + return *this; + } +#endif + + void clear() + { + u32string_.clear(); + + bmtable_.clear(); + repseq_.clear(); + } + + void setup(const simple_array &u32s, const bool icase) + { + u32string_ = u32s; + setup_(); + + if (!icase) + setup_for_casesensitive(); + else + setup_for_icase(); + } + + template + bool do_casesensitivesearch(re_search_state &sstate, const std::random_access_iterator_tag) const + { + RandomAccessIterator begin = sstate.srchbegin; + const RandomAccessIterator end = sstate.srchend; + std::size_t offset = static_cast(repseq_.size() - 1); + const charT *const relastchar = &repseq_[offset]; + + for (; static_cast(end - begin) > offset;) + { + begin += offset; + + if (*begin == *relastchar) + { + const charT *re = relastchar; + RandomAccessIterator tail = begin; + + for (; *--re == *--tail;) + { + if (re == repseq_.data()) + return sstate.set_bracket0(tail, ++begin); + } + } + offset = bmtable_[*begin & 0xff]; + } + return false; + } + + template + bool do_casesensitivesearch(re_search_state &sstate, const std::bidirectional_iterator_tag) const + { + BidirectionalIterator begin = sstate.srchbegin; + const BidirectionalIterator end = sstate.srchend; + std::size_t offset = static_cast(repseq_.size() - 1); + const charT *const relastchar = &repseq_[offset]; + + for (;;) + { + for (; offset; --offset, ++begin) + if (begin == end) + return false; + + if (*begin == *relastchar) + { + const charT *re = relastchar; + BidirectionalIterator tail = begin; + + for (; *--re == *--tail;) + { + if (re == repseq_.data()) + return sstate.set_bracket0(tail, ++begin); + } + } + offset = bmtable_[*begin & 0xff]; + } + } + + template + bool do_icasesearch(re_search_state &sstate, const std::random_access_iterator_tag) const + { + const RandomAccessIterator begin = sstate.srchbegin; + const RandomAccessIterator end = sstate.srchend; + std::size_t offset = bmtable_[256]; + const uchar32 entrychar = u32string_[u32string_.size() - 1]; + const uchar32 *const re2ndlastchar = &u32string_[u32string_.size() - 2]; + RandomAccessIterator curpos = begin; + + for (; static_cast(end - curpos) > offset;) + { + curpos += offset; + + for (; utf_traits::is_trailing(*curpos);) + if (++curpos == end) + return false; + + const uchar32 txtlastchar = utf_traits::codepoint(curpos, end); + + if (txtlastchar == entrychar || unicode_case_folding::do_casefolding(txtlastchar) == entrychar) + { + const uchar32 *re = re2ndlastchar; + RandomAccessIterator tail = curpos; + +// for (; *--re == unicode_case_folding::do_casefolding(utf_traits::dec_codepoint(tail, begin));) + for (; *re == unicode_case_folding::do_casefolding(utf_traits::dec_codepoint(tail, begin)); --re) + { + if (re == u32string_.data()) + { + utf_traits::codepoint_inc(curpos, end); + return sstate.set_bracket0(tail, curpos); + } + if (tail == begin) + break; + } + } + offset = bmtable_[txtlastchar & 0xff]; + } + return false; + } + + template + bool do_icasesearch(re_search_state &sstate, const std::bidirectional_iterator_tag) const + { + const BidirectionalIterator begin = sstate.srchbegin; + const BidirectionalIterator end = sstate.srchend; + + if (begin != end) + { + std::size_t offset = bmtable_[256]; //static_cast(u32string_.size() - 1); + const uchar32 entrychar = u32string_[offset]; + const uchar32 *const re2ndlastchar = &u32string_[offset - 1]; + BidirectionalIterator curpos = begin; + + for (;;) + { + for (;;) + { + if (++curpos == end) + return false; + if (!utf_traits::is_trailing(*curpos)) + if (--offset == 0) + break; + } +// const uchar32 txtlastchar = unicode_case_folding::do_casefolding(utf_traits::codepoint(curpos, end)); + const uchar32 txtlastchar = utf_traits::codepoint(curpos, end); + +// if (txtlastchar == *re2ndlastchar) +// if (txtlastchar == *re2ndlastchar || unicode_case_folding::do_casefolding(txtlastchar) == *re2ndlastchar) + if (txtlastchar == entrychar || unicode_case_folding::do_casefolding(txtlastchar) == entrychar) + { + const uchar32 *re = re2ndlastchar; + BidirectionalIterator tail = curpos; + + for (; *re == unicode_case_folding::do_casefolding(utf_traits::dec_codepoint(tail, begin)); --re) + { + if (re == u32string_.data()) + { + utf_traits::codepoint_inc(curpos, end); + return sstate.set_bracket0(tail, curpos); + } + if (tail == begin) + break; + } + } + offset = bmtable_[txtlastchar & 0xff]; + } + } + return false; + } + +private: + + void setup_() + { + bmtable_.resize(257); + } + + void setup_for_casesensitive() + { + charT mbstr[utf_traits::maxseqlen]; + const std::size_t u32str_lastcharpos_ = static_cast(u32string_.size() - 1); + + repseq_.clear(); + + for (std::size_t i = 0; i <= u32str_lastcharpos_; ++i) + { + const uchar32 seqlen = utf_traits::to_codeunits(mbstr, u32string_[i]); + + for (uchar32 j = 0; j < seqlen; ++j) + repseq_.push_back(mbstr[j]); + } + + for (std::size_t i = 0; i < 256; ++i) + bmtable_[i] = static_cast(repseq_.size()); + + const std::size_t repseq_lastcharpos_ = static_cast(repseq_.size() - 1); + + for (std::size_t i = 0; i < repseq_lastcharpos_; ++i) + bmtable_[repseq_[i] & 0xff] = repseq_lastcharpos_ - i; + } + + void setup_for_icase() + { + charT mbstr[utf_traits::maxseqlen]; + uchar32 u32table[unicode_case_folding::rev_maxset]; + const std::size_t u32str_lastcharpos = static_cast(u32string_.size() - 1); + simple_array minlen(u32string_.size()); + std::size_t cu_repseq_lastcharpos = 0; + + for (std::size_t i = 0; i <= u32str_lastcharpos; ++i) + { + const uchar32 setnum = unicode_case_folding::casefoldedcharset(u32table, u32string_[i]); + uchar32 u32c = u32table[0]; + + for (uchar32 j = 1; j < setnum; ++j) + if (u32c > u32table[j]) + u32c = u32table[j]; + + if (i < u32str_lastcharpos) + cu_repseq_lastcharpos += minlen[i] = utf_traits::to_codeunits(mbstr, u32c); + } + + ++cu_repseq_lastcharpos; + + for (std::size_t i = 0; i < 256; ++i) + bmtable_[i] = cu_repseq_lastcharpos; + + bmtable_[256] = --cu_repseq_lastcharpos; + + for (std::size_t i = 0; i < u32str_lastcharpos; ++i) + { + const uchar32 setnum = unicode_case_folding::casefoldedcharset(u32table, u32string_[i]); + + for (uchar32 j = 0; j < setnum; ++j) + bmtable_[u32table[j] & 0xff] = cu_repseq_lastcharpos; + + cu_repseq_lastcharpos -= minlen[i]; + } + } + +public: // For debug. + + void print_table() const; + void print_seq() const; + +private: + + simple_array u32string_; +// std::size_t bmtable_[256]; + simple_array bmtable_; + simple_array repseq_; +}; +// re_bmh + +#endif // !defined(SRELLDBG_NO_BMH) + } // namespace regex_internal + +// ... "rei_bmh.hpp"] +// ["rei_compiler.hpp" ... + + namespace regex_internal + { + +template +struct re_object_core +{ +protected: + + typedef re_state/**/ state_type; + typedef simple_array state_array; + + state_array NFA_states; + re_character_class character_class; + +#if !defined(SRELLDBG_NO_1STCHRCLS) + #if !defined(SRELLDBG_NO_BITSET) + bitset firstchar_class_bs; + #else + range_pairs firstchar_class; + #endif +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) +public: + + std::size_t limit_counter; + +protected: +#endif + + typedef typename traits::utf_traits utf_traits; + + uint_l32 number_of_brackets; + uint_l32 number_of_counters; + uint_l32 number_of_repeats; + regex_constants::syntax_option_type soflags; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + groupname_mapper namedcaptures; + typedef typename groupname_mapper::gname_string gname_string; +#endif + +#if !defined(SRELLDBG_NO_BMH) + re_bmh *bmdata; +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) +private: + + static const std::size_t lcounter_defnum_ = 16777216; + +#endif + +protected: + + re_object_core() +#if !defined(SRELL_NO_LIMIT_COUNTER) + : limit_counter(lcounter_defnum_) + #if !defined(SRELLDBG_NO_BMH) + , bmdata(NULL) + #endif +#elif !defined(SRELLDBG_NO_BMH) + : bmdata(NULL) +#endif + { + } + + re_object_core(const re_object_core &right) +#if !defined(SRELLDBG_NO_BMH) + : bmdata(NULL) +#endif + { + operator=(right); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + re_object_core(re_object_core &&right) SRELL_NOEXCEPT +#if !defined(SRELLDBG_NO_BMH) + : bmdata(NULL) +#endif + { + operator=(std::move(right)); + } +#endif + +#if !defined(SRELLDBG_NO_BMH) + ~re_object_core() + { + if (bmdata) + delete bmdata; + } +#endif + + void reset(const regex_constants::syntax_option_type flags) + { + NFA_states.clear(); + character_class.clear(); + +#if !defined(SRELLDBG_NO_1STCHRCLS) + #if !defined(SRELLDBG_NO_BITSET) + firstchar_class_bs.reset(); + #else + firstchar_class.clear(); + #endif +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) + limit_counter = lcounter_defnum_; +#endif + + number_of_brackets = 1; + number_of_counters = 0; + number_of_repeats = 0; + soflags = flags; // regex_constants::ECMAScript; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + namedcaptures.clear(); +#endif + +#if !defined(SRELLDBG_NO_BMH) +// bmdata->clear(); + if (bmdata) + delete bmdata; + bmdata = NULL; +#endif + } + + re_object_core &operator=(const re_object_core &that) + { + if (this != &that) + { + this->NFA_states = that.NFA_states; + this->character_class = that.character_class; + +#if !defined(SRELLDBG_NO_1STCHRCLS) + #if !defined(SRELLDBG_NO_BITSET) + this->firstchar_class_bs = that.firstchar_class_bs; + #else + this->firstchar_class = that.firstchar_class; + #endif +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) + this->limit_counter = that.limit_counter; +#endif + +// this->utf_traits_inst = that.utf_traits_inst; + + this->number_of_brackets = that.number_of_brackets; + this->number_of_counters = that.number_of_counters; + this->number_of_repeats = that.number_of_repeats; + this->soflags = that.soflags; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + this->namedcaptures = that.namedcaptures; +#endif + +#if !defined(SRELLDBG_NO_BMH) + if (that.bmdata) + { + if (this->bmdata) + *this->bmdata = *that.bmdata; + else + this->bmdata = new re_bmh(*that.bmdata); + } + else if (this->bmdata) + { + delete this->bmdata; + this->bmdata = NULL; + } +#endif + + if (that.NFA_states.size()) + repair_nextstates(&that.NFA_states[0]); + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + re_object_core &operator=(re_object_core &&that) SRELL_NOEXCEPT + { + if (this != &that) + { + this->NFA_states = std::move(that.NFA_states); + this->character_class = std::move(that.character_class); + +#if !defined(SRELLDBG_NO_1STCHRCLS) + #if !defined(SRELLDBG_NO_BITSET) + this->firstchar_class_bs = std::move(that.firstchar_class_bs); + #else + this->firstchar_class = std::move(that.firstchar_class); + #endif +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) + this->limit_counter = that.limit_counter; +#endif + + this->number_of_brackets = that.number_of_brackets; + this->number_of_counters = that.number_of_counters; + this->number_of_repeats = that.number_of_repeats; + this->soflags = that.soflags; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + this->namedcaptures = std::move(that.namedcaptures); +#endif + +#if !defined(SRELLDBG_NO_BMH) + if (this->bmdata) + delete this->bmdata; + this->bmdata = that.bmdata; + that.bmdata = NULL; +#endif + } + return *this; + } +#endif // defined(SRELL_CPP11_MOVE_ENABLED) + + void swap(re_object_core &right) + { + if (this != &right) + { + this->NFA_states.swap(right.NFA_states); + this->character_class.swap(right.character_class); + +#if !defined(SRELLDBG_NO_1STCHRCLS) + #if !defined(SRELLDBG_NO_BITSET) + this->firstchar_class_bs.swap(right.firstchar_class_bs); + #else + this->firstchar_class.swap(right.firstchar_class); + #endif +#endif + +#if !defined(SRELL_NO_LIMIT_COUNTER) + { + const std::size_t tmp_limit_counter = this->limit_counter; + this->limit_counter = right.limit_counter; + right.limit_counter = tmp_limit_counter; + } +#endif +// this->utf_traits_inst.swap(right.utf_traits_inst); + + { + const uint_l32 tmp_numof_brackets = this->number_of_brackets; + this->number_of_brackets = right.number_of_brackets; + right.number_of_brackets = tmp_numof_brackets; + } + { + const uint_l32 tmp_numof_counters = this->number_of_counters; + this->number_of_counters = right.number_of_counters; + right.number_of_counters = tmp_numof_counters; + } + { + const uint_l32 tmp_numof_repeats = this->number_of_repeats; + this->number_of_repeats = right.number_of_repeats; + right.number_of_repeats = tmp_numof_repeats; + } + { + const regex_constants::syntax_option_type tmp_soflags = this->soflags; + this->soflags = right.soflags; + right.soflags = tmp_soflags; + } + +#if !defined(SRELL_NO_NAMEDCAPTURE) + this->namedcaptures.swap(right.namedcaptures); +#endif + +#if !defined(SRELLDBG_NO_BMH) + { + re_bmh *const tmp_bmdata = this->bmdata; + this->bmdata = right.bmdata; + right.bmdata = tmp_bmdata; + } +#endif + } + } + + void throw_error(const regex_constants::error_type &e) + { +// reset(); + NFA_states.clear(); +#if !defined(SRELLDBG_NO_BMH) + if (bmdata) + delete bmdata; + bmdata = NULL; +#endif + throw regex_error(e); + } + +private: + + void repair_nextstates(const state_type *const oldbase) + { + state_type *const newbase = &this->NFA_states[0]; + + for (typename state_array::size_type i = 0; i < this->NFA_states.size(); ++i) + { + state_type &state = this->NFA_states[i]; + + if (state.next_state1) + state.next_state1 = state.next_state1 - oldbase + newbase; + + if (state.next_state2) + state.next_state2 = state.next_state2 - oldbase + newbase; + } + } +}; +// re_object_core + +template +class re_compiler : public re_object_core +{ +protected: + + template + bool compile(ForwardIterator begin, const ForwardIterator end, const regex_constants::syntax_option_type flags /* = regex_constants::ECMAScript */) + { + simple_array u32; + + while (begin != end) + { + const uchar32 u32c = utf_traits::codepoint_inc(begin, end); + if (u32c > constants::unicode_max_codepoint) + this->throw_error(regex_constants::error_utf8); + u32.push_back(u32c); + } + + return compile_core(u32.data(), u32.data() + u32.size(), flags); + } + + bool is_icase() const + { +#if !defined(SRELL_NO_ICASE) + if (this->soflags & regex_constants::icase) + return true; +#endif + return false; + } + bool is_ricase() const + { +#if !defined(SRELL_NO_ICASE) + return /* this->NFA_states.size() && */ this->NFA_states[0].icase == true; +#else + return false; +#endif + } + + bool is_multiline() const + { + if (this->soflags & regex_constants::multiline) + return true; + return false; + } + + bool is_dotall() const + { + return (this->soflags & regex_constants::dotall) ? true : false; + } + + bool is_optimize() const + { + return (this->soflags & regex_constants::optimize) ? true : false; + } + +private: + + typedef re_object_core base_type; + typedef typename base_type::utf_traits utf_traits; + typedef typename base_type::state_type state_type; + typedef typename base_type::state_array state_array; +#if !defined(SRELL_NO_NAMEDCAPTURE) + typedef typename base_type::gname_string gname_string; +#endif +#if !defined(SRELL_NO_UNICODE_PROPERTY) + typedef typename re_character_class::pstring pstring; +#endif + typedef typename state_array::size_type state_size_type; + + bool compile_core(const uchar32 *begin, const uchar32 *const end, const regex_constants::syntax_option_type flags) + { + re_quantifier piececharlen; + re_compiler_state cstate; + state_type atom; + + this->reset(flags); +// this->soflags = flags; + cstate.reset(flags); + + atom.reset(); + atom.type = st_epsilon; + atom.next2 = 1; + this->NFA_states.push_back(atom); + + if (!make_nfa_states(this->NFA_states, piececharlen, begin, end, cstate)) + { + return false; + } + + if (begin != end) + this->throw_error(regex_constants::error_paren); // ')'s are too many. + + if (!check_backreferences(cstate)) + this->throw_error(regex_constants::error_backref); + +#if !defined(SRELL_NO_ICASE) + if (this->is_icase()) + this->NFA_states[0].icase = check_if_really_needs_icase_search(); +#endif + +#if !defined(SRELLDBG_NO_BMH) + setup_bmhdata(); +#endif + + atom.type = st_success; + atom.next1 = 0; + atom.next2 = 0; + this->NFA_states.push_back(atom); + + optimise(); + relativejump_to_absolutejump(); + + return true; + } + + bool make_nfa_states(state_array &piece, re_quantifier &piececharlen, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + typename state_array::size_type prevbranch_end = 0; + state_type atom; + state_array branch; + re_quantifier branchsize; + + piececharlen.reset(0); + + for (;;) + { + branch.clear(); + + if (!make_branch(branch, branchsize, curpos, end, cstate)) + return false; + + // For piececharlen.atleast, 0 as the initial value and 0 as an + // actual value must be distinguished. + if (piececharlen.atmost == 0 || piececharlen.atleast > branchsize.atleast) + piececharlen.atleast = branchsize.atleast; + + if (piececharlen.atmost < branchsize.atmost) + piececharlen.atmost = branchsize.atmost; + + if (curpos != end && *curpos == meta_char::mc_bar) + { + atom.reset(); + atom.character = meta_char::mc_bar; + atom.type = st_epsilon; + atom.next2 = static_cast(branch.size()) + 2; + branch.insert(0, atom); + } + + if (prevbranch_end) + piece[prevbranch_end].next1 = static_cast(branch.size()) + 1; + + piece += branch; + + // end or ')' + if (curpos == end || *curpos == meta_char::mc_rbracl) + break; + + // *curpos == '|' + + prevbranch_end = piece.size(); + atom.reset(); + atom.type = st_epsilon; + piece.push_back(atom); + + ++curpos; + } + return true; + } + + bool make_branch(state_array &branch, re_quantifier &branchsize, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + state_array piece; + state_array piece_with_quantifier; + re_quantifier quantifier; + + branchsize.reset(0); + + for (;;) + { + re_quantifier piececharlen; + + if (curpos == end) + return true; + + piece.clear(); + piece_with_quantifier.clear(); + + switch (*curpos) + { +// case char_ctrl::cc_nul: // '\0': + case meta_char::mc_bar: // '|': + case meta_char::mc_rbracl: // ')': + return true; + + default: + if (!get_atom(piece, piececharlen, curpos, end, cstate)) + return false; + } + + if (piece.size()) + { + const state_type &firstatom = piece[0]; + + quantifier.reset(); // quantifier.atleast = quantifier.atmost = 1; + + if (firstatom.has_quantifier()) + { + if (curpos != end && !get_quantifier(quantifier, curpos, end)) + return false; + } + + if (piece.size() == 2 && firstatom.is_noncapturinggroup() && piece[1].is_noncapturinggroup()) + { + // (?:) alone or followed by a quantifier. +// piece_with_quantifier += piece; + ; // Do nothing. + } + else + combine_piece_with_quantifier(piece_with_quantifier, piece, quantifier, piececharlen); + +#if 01 + piececharlen.multiply(quantifier); + branchsize.add(piececharlen); +#else + branchsize.atleast += piececharlen.atleast * quantifier.atleast; + if (!branchsize.is_infinity()) + { + if (piececharlen.is_infinity() || quantifier.is_infinity()) + branchsize.set_infinity(); + else + branchsize.atmost += piececharlen.atmost * quantifier.atmost; + } +#endif + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + + if (!cstate.back) + branch += piece_with_quantifier; + else + branch.insert(0, piece_with_quantifier); +#else + branch += piece_with_quantifier; +#endif + } + } + } + + bool get_atom(state_array &piece, re_quantifier &atomsize, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + state_type atom; + + atom.reset(); + atom.character = *curpos++; + + switch (atom.character) + { + case meta_char::mc_rbraop: // '(': + return get_piece_in_roundbrackets(piece, atomsize, curpos, end, cstate); + + case meta_char::mc_sbraop: // '[': + if (!register_character_class(atom, curpos, end, cstate)) + return false; + + break; + + case meta_char::mc_escape: // '\\': + if (!translate_atom_escape(atom, curpos, end, cstate)) + return false; + + break; + + case meta_char::mc_period: // '.': + atom.type = st_character_class; +#if !defined(SRELL_NO_SINGLELINE) + if (this->is_dotall()) + { + atom.number = static_cast(re_character_class::dotall); + } + else +#endif + { +// atom.number = static_cast(re_character_class::newline); + range_pairs nlclass = this->character_class[static_cast(re_character_class::newline)]; + + nlclass.negation(); + atom.number = this->character_class.register_newclass(nlclass); + } + break; + + case meta_char::mc_caret: // '^': + atom.type = st_bol; + atom.quantifier.reset(0); +// if (current_flags.m) + if (is_multiline()) + atom.multiline = true; + break; + + case meta_char::mc_dollar: // '$': + atom.type = st_eol; + atom.quantifier.reset(0); +// if (current_flags.m) + if (is_multiline()) + atom.multiline = true; + break; + + case meta_char::mc_astrsk: // '*': + case meta_char::mc_plus: // '+': + case meta_char::mc_query: // '?': + case meta_char::mc_cbraop: // '{' + this->throw_error(regex_constants::error_badrepeat); + + default:; + } + + if (atom.type == st_character) + { + if (this->is_icase()) + atom.character = unicode_case_folding::do_casefolding(atom.character); + } + + piece.push_back(atom); + atomsize = atom.quantifier; + + return true; + } + + // '('. + + bool get_piece_in_roundbrackets(state_array &piece, re_quantifier &piececharlen, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + const re_compiler_state original_cstate(cstate); + state_type atom; + + if (curpos == end) + this->throw_error(regex_constants::error_paren); + + atom.reset(); + atom.type = st_roundbracket_open; + + if (*curpos == meta_char::mc_query) // '?' + { + if (!extended_roundbrackets(piece, atom, ++curpos, end, cstate)) + return false; + } + + if (atom.type == st_roundbracket_open) + { + push_bracket_open(piece, atom); + } + +// if (curpos == end) +// this->throw_error(regex_constants::error_paren); + + if (!make_nfa_states(piece, piececharlen, curpos, end, cstate)) + return false; + + // end or ')'? + if (curpos == end) + this->throw_error(regex_constants::error_paren); + + ++curpos; + + cstate.restore_from(original_cstate); + + switch (atom.type) + { + case st_epsilon: + +// if (piece.size() <= 2) // ':' or ':' + one. + if (piece.size() == 2) // ':' + something. + { + piece.erase(0); + return true; + } + + piece[0].quantifier.atmost = this->number_of_brackets - 1; + break; + +// case st_lookaround_pop: + case st_lookaround_open: + { + state_type &firstatom = piece[0]; + +#if defined(SRELL_FIXEDWIDTHLOOKBEHIND) +// if (firstatom.reverse) + if (firstatom.quantifier.atleast) // > 0 means lookbehind. + { + if (!piececharlen.is_same() || piececharlen.is_infinity()) + this->throw_error(regex_constants::error_lookbehind); + + firstatom.quantifier = piececharlen; + } +#endif + +#if defined(SRELL_ENABLE_GT) + if (firstatom.character != meta_char::mc_gt) +#endif + piececharlen.reset(0); + + firstatom.next1 = static_cast(piece.size()) + 1; + + atom.type = st_lookaround_close; + atom.next1 = 0; + atom.next2 = 0; + } + break; + + default: + set_bracket_close(piece, atom, piececharlen, cstate); + } + + piece.push_back(atom); + return true; + } + + bool extended_roundbrackets(state_array &piece, state_type &atom, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + bool lookbehind = false; +#endif + + if (curpos == end) + this->throw_error(regex_constants::error_paren); + + atom.character = *curpos; + + if (atom.character == meta_char::mc_lt) // '<' + { +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + lookbehind = true; +#endif + if (++curpos == end) + this->throw_error(regex_constants::error_paren); + + atom.character = *curpos; + + if (atom.character != meta_char::mc_eq && atom.character != meta_char::mc_exclam) + { +#if !defined(SRELL_NO_NAMEDCAPTURE) + return parse_groupname(curpos, end, cstate); +#else + this->throw_error(regex_constants::error_paren); +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + } + } + else + atom.quantifier.atleast = 0; + // Sets atleast to 0 for other assertions than lookbehinds. The automaton + // checks atleast to know whether lookbehinds or other assertions. + + switch (atom.character) + { + case meta_char::mc_colon: + atom.type = st_epsilon; + atom.quantifier.atleast = this->number_of_brackets; + break; + + case meta_char::mc_exclam: // '!': + atom.is_not = true; + //@fallthrough@ + + case meta_char::mc_eq: // '=': +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + cstate.back = lookbehind; +#else +// atom.reverse = lookbehind; +#endif + +#if defined(SRELL_ENABLE_GT) + case meta_char::mc_gt: +#endif + atom.type = st_lookaround_open; + atom.next2 = 1; + break; + + default: + this->throw_error(regex_constants::error_paren); + } + + ++curpos; + piece.push_back(atom); + return true; + } + + void push_bracket_open(state_array &piece, state_type &atom) + { + atom.number = this->number_of_brackets; + atom.next1 = 2; + atom.next2 = 1; + piece.push_back(atom); + ++this->number_of_brackets; + + atom.type = st_roundbracket_pop; + atom.next1 = 0; + atom.next2 = 0; + piece.push_back(atom); + } + + void set_bracket_close(state_array &piece, state_type &atom, const re_quantifier &piececharlen, re_compiler_state &cstate) + { +// uint_l32 max_bracketno = atom.number; + + atom.type = st_roundbracket_close; + atom.next1 = 1; + atom.next2 = 1; +#if 0 + for (typename state_array::size_type i = 0; i < piece.size(); ++i) + { + const state_type &state = piece[i]; + + if (state.type == st_roundbracket_open && max_bracketno < state.number) + max_bracketno = state.number; + } +#endif + + re_quantifier &rb_open = piece[0].quantifier; + re_quantifier &rb_pop = piece[1].quantifier; + + rb_open.atleast = rb_pop.atleast = atom.number + 1; + rb_open.atmost = rb_pop.atmost = this->number_of_brackets - 1; // max_bracketno; + + if (cstate.atleast_widths_of_brackets.size() < atom.number) + cstate.atleast_widths_of_brackets.resize(atom.number, 0); + + cstate.atleast_widths_of_brackets[atom.number - 1] = piececharlen.atleast; + } + + void combine_piece_with_quantifier(state_array &piece_with_quantifier, state_array &piece, const re_quantifier &quantifier, const re_quantifier &piececharlen) + { + state_type &firstatom = piece[0]; +// const bool firstpiece_is_roundbracket_open = (firstatom.type == st_roundbracket_open); + const bool piece_has_0widthchecker = firstatom.has_0widthchecker(); + const bool piece_is_noncapturinggroup_contaning_capturinggroup = firstatom.is_noncapturinggroup() && firstatom.quantifier.is_valid(); + state_type atom; + + if (quantifier.atmost == 0) + return; + + atom.reset(); + atom.quantifier = quantifier; + if (firstatom.is_character_or_class()) + atom.character = meta_char::mc_astrsk; // For nextpos_optimisation1_3(). + + if (quantifier.atmost == 1) + { + if (quantifier.atleast == 0) + { + atom.type = st_epsilon; + atom.next2 = static_cast(piece.size()) + 1; + + if (!quantifier.is_greedy) + { + atom.next1 = atom.next2; + atom.next2 = 1; + } + + if (atom.character == meta_char::mc_astrsk) + firstatom.quantifier = quantifier; + + piece_with_quantifier.push_back(atom); + // (push) + } + + if (piece.size() >= 2 && firstatom.type == st_roundbracket_open && piece[1].type == st_roundbracket_pop) + { + firstatom.quantifier.atmost = 0u; + piece[1].quantifier.atmost = 0u; + } + + piece_with_quantifier += piece; + return; + } + + // atmost >= 2 + +#if !defined(SRELLDBG_NO_SIMPLEEQUIV) + // The counter requires at least 6 states: save, restore, check, inc, dec, atom(s). + // A character or charclass quantified by one of these has a simple equivalent representation: + // a{0,2} 1.epsilon(2|5), 2.CHorCL(3), 3.epsilon(4|5), 4.CHorCL(5), [5]. + // a{0,3} 1.epsilon(2|7), 2.CHorCL(3), 3.epsilon(4|7), 4.CHorCL(5), 5.epsilon(6|7), 6.CHorCL(7), [7]. + // a{1,2} 1.CHorCL(2), 2.epsilon(3|4), 3.CHorCL(4), [4]. + // a{1,3} 1.CHorCL(2), 2.epsilon(3|6), 3.CHorCL(4), 4.epsilon(5|6), 5.CHorCL(6), [6]. + // a{2,3} 1.CHorCL(2), 2.CHorCL(3), 3.epsilon(4|5), 4.CHorCL(5), [5]. + // a{2,4} 1.CHorCL(2), 2.CHorCL(3), 3.epsilon(4|7), 4.CHorCL(5), 5.epsilon(6|7), 6.CHorCL(7), [7]. + if (piece.size() == 1 && firstatom.is_character_or_class() && quantifier.has_simple_equivalence()) + { + const typename state_array::size_type branchsize = piece.size() + 1; + + for (uint_l32 i = 0; i < quantifier.atleast; ++i) + piece_with_quantifier += piece; + + if (atom.character == meta_char::mc_astrsk) + firstatom.quantifier.set(0, 1, quantifier.is_greedy); + + atom.type = st_epsilon; + atom.next2 = (quantifier.atmost - quantifier.atleast) * branchsize; + if (!quantifier.is_greedy) + { + atom.next1 = atom.next2; + atom.next2 = 1; + } + for (uint_l32 i = quantifier.atleast; i < quantifier.atmost; ++i) + { + piece_with_quantifier.push_back(atom); + piece_with_quantifier += piece; + quantifier.is_greedy ? (atom.next2 -= branchsize) : (atom.next1 -= branchsize); + } + return; + } +#endif // !defined(SRELLDBG_NO_SIMPLEEQUIV) + + atom.type = st_epsilon; + if (quantifier.is_asterisk()) // {0,} + { + // greedy: 1.epsilon(2|4), 2.piece, 3.LAorC0WR(1|0), 4.OutOfLoop. + // !greedy: 1.epsilon(4|2), 2.piece, 3.LAorC0WR(1|0), 4.OutOfLoop. + // LAorC0WR: LastAtomOfPiece or Check0WidthRepeat. + // atom.type points to 1. + } + else if (quantifier.is_plus()) // {1,} + { +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + + if (piece.size() == 1 && firstatom.is_character_or_class()) + { + piece_with_quantifier += piece; + --atom.quantifier.atleast; // /.+/ -> /..*/. + } + else +#endif + { + atom.next1 = 2; + atom.next2 = 0; + piece_with_quantifier.push_back(atom); + // greedy: 1.epsilon(3), 2.epsilon(3|5), 3.piece, 4.LAorC0WR(2|0), 5.OutOfLoop. + // !greedy: 1.epsilon(3), 2.epsilon(5|3), 3.piece, 4.LAorC0WR(2|0), 5.OutOfLoop. + // atom.type points to 2. + } + } + else + { + atom.number = this->number_of_counters; + ++this->number_of_counters; + + atom.type = st_save_and_reset_counter; + atom.next1 = 2; + atom.next2 = 1; + piece_with_quantifier.push_back(atom); + + atom.type = st_restore_counter; + atom.next1 = 0; + atom.next2 = 0; + piece_with_quantifier.push_back(atom); + // 1.save_and_reset_counter(3|2), 2.restore_counter(0|0), + + atom.next1 = 0; + atom.next2 = 0; + atom.type = st_decrement_counter; + piece.insert(0, atom); + + atom.next1 = 2; +// atom.next2 = piece[1].is_character_or_class() ? 0 : 1; +// atom.next2 = 0; + for (state_size_type i = 1; i < piece.size(); ++i) + { + const state_type &state = piece[i]; + + if (state.is_character_or_class() || (state.type == st_epsilon && state.next2 == 0)) + ; + else + { + atom.next2 = 1; + break; + } + } + atom.type = st_epsilon; // st_increment_counter; + piece.insert(0, atom); + piece[0].number = 0; + + atom.type = st_check_counter; + // greedy: 3.check_counter(4|6), 4.piece, 5.LAorC0WR(3|0), 6.OutOfLoop. + // !greedy: 3.check_counter(6|4), 4.piece, 5.LAorC0WR(3|0), 6.OutOfLoop. + // 4.piece = { 4a.increment_counter(4c|4b), 4b.decrement_counter(0|0), 4c.OriginalPiece }. + } + + // atom.type is epsilon or check_counter. + // Its "next"s point to piece and OutOfLoop. + + if (!piece_is_noncapturinggroup_contaning_capturinggroup && (piececharlen.atleast || piece_has_0widthchecker)) + { + const typename state_array::size_type piece_size = piece.size(); + state_type &lastatom = piece[piece_size - 1]; + + lastatom.next1 = 0 - static_cast(piece_size); + // Points to the one immediately before piece, which will be pushed last in this block. + + // atom.type has already been set. epsilon or check_counter. + atom.next1 = 1; + atom.next2 = static_cast(piece_size) + 1; + if (!quantifier.is_greedy) + { + atom.next1 = atom.next2; + atom.next2 = 1; + } + piece_with_quantifier.push_back(atom); + } + else + { + // atom.type has already been set. epsilon or check_counter. + atom.next1 = 1; + atom.next2 = static_cast(piece.size()) + 4; // To OutOfLoop. + // The reason for +3 than above is that push, pop, and check_0_width are added below. + if (!quantifier.is_greedy) + { + atom.next1 = atom.next2; + atom.next2 = 1; + } + piece_with_quantifier.push_back(atom); // *1 + + atom.number = this->number_of_repeats; + ++this->number_of_repeats; + + const state_size_type org1stpos = (atom.type == st_check_counter) ? 2 : 0; + + if (piece_is_noncapturinggroup_contaning_capturinggroup) + atom.quantifier = piece[org1stpos].quantifier; + else + atom.quantifier.set(1, 0); + + atom.type = st_repeat_in_pop; + atom.next1 = 0; + atom.next2 = 0; + piece.insert(org1stpos, atom); + + atom.type = st_repeat_in_push; + atom.next1 = 2; + atom.next2 = 1; + piece.insert(org1stpos, atom); + + atom.type = st_check_0_width_repeat; + atom.next1 = 0 - static_cast(piece.size()) - 1; // Points to *1. + atom.next2 = 1; + piece.push_back(atom); + // greedy: 1.epsilon(2|6), + // !greedy: 1.epsilon(6|2), + // 2.repeat_in_push(4|3), 3.repeat_in_pop(0|0), 4.piece, + // 5.check_0_width_repeat(1|6), 6.OutOfLoop. + // or + // greedy: 1.check_counter(2|8), + // !greedy: 1.check_counter(8|2), + // 2.increment_counter(4|3), 3.decrement_counter(0|0) + // 4.repeat_in_push(6|5), 5.repeat_in_pop(0|0), 6.piece, + // 7.check_0_width_repeat(1|8), 8.OutOfLoop. + } + piece_with_quantifier += piece; + } + +#if !defined(SRELL_NO_NAMEDCAPTURE) + bool parse_groupname(const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + const gname_string groupname = get_groupname(curpos, end, cstate); + + if (!this->namedcaptures.push_back(groupname, this->number_of_brackets)) + this->throw_error(regex_constants::error_backref); + + return true; + } +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + + // '['. + + bool register_character_class(state_type &atom, const uchar32 *&curpos, const uchar32 *const end, const re_compiler_state & /* cstate */) + { + range_pair code_range; + range_pairs ranges; + state_type classatom; + + if (curpos == end) + this->throw_error(regex_constants::error_brack); + + atom.type = st_character_class; + + if (*curpos == meta_char::mc_caret) // '^' + { + atom.is_not = true; + ++curpos; + } + + for (;;) + { + if (curpos == end) + this->throw_error(regex_constants::error_brack); + + if (*curpos == meta_char::mc_sbracl) // ']' + break; + + classatom.reset(); + + if (!get_character_in_class(classatom, curpos, end)) + return false; + + if (classatom.type == st_character_class) + { + add_predefclass_to_charclass(ranges, classatom); + continue; + } + + code_range.first = code_range.second = classatom.character; + + if (curpos == end) + this->throw_error(regex_constants::error_brack); + + if (*curpos == meta_char::mc_minus) // '-' + { + ++curpos; + + if (curpos == end) + this->throw_error(regex_constants::error_brack); + + if (*curpos == meta_char::mc_sbracl) + { + PUSH_SEPARATELY: + ranges.join(code_range); + code_range.first = code_range.second = meta_char::mc_minus; + } + else + { + if (!get_character_in_class(classatom, curpos, end)) + return false; + + if (classatom.type == st_character_class) + { + add_predefclass_to_charclass(ranges, classatom); + goto PUSH_SEPARATELY; + } + + code_range.second = classatom.character; + + if (!code_range.is_range_valid()) + this->throw_error(regex_constants::error_range); + } + } + ranges.join(code_range); + } + + // *curpos == ']' + ++curpos; + if (this->is_icase()) + ranges.make_caseunfoldedcharset(); + + if (atom.is_not) + { + ranges.negation(); + atom.is_not = false; + } + +// atom.character = this->is_icase() ? ranges.template consists_of_one_character() : ranges.template consists_of_one_character(); + atom.character = ranges.consists_of_one_character(this->is_icase()); + + if (atom.character != constants::invalid_u32value) + { + atom.type = st_character; + return true; + } + + atom.number = this->character_class.register_newclass(ranges); + + return true; + } + + bool get_character_in_class(state_type &atom, const uchar32 *&curpos, const uchar32 *const end /* , const re_compiler_state &cstate */) + { + atom.character = *curpos++; + + return atom.character != meta_char::mc_escape // '\\' + || translate_escseq(atom, curpos, end); + } + + void add_predefclass_to_charclass(range_pairs &cls, const state_type &classatom) + { + range_pairs predefclass = this->character_class[classatom.number]; + + if (classatom.is_not) + predefclass.negation(); + + cls.merge(predefclass); + } + + // Escape characters which appear both in and out of [] pairs. + bool translate_escseq(state_type &atom, const uchar32 *&curpos, const uchar32 *const end) + { + if (curpos == end) + this->throw_error(regex_constants::error_escape); + + atom.character = *curpos++; + + switch (atom.character) + { + // Predefined classes. + + case char_alnum::ch_D: // 'D': + atom.is_not = true; + //@fallthrough@ + + case char_alnum::ch_d: // 'd': + atom.number = static_cast(re_character_class::digit); // \d, \D. + atom.type = st_character_class; + break; + + case char_alnum::ch_S: // 'S': + atom.is_not = true; + //@fallthrough@ + + case char_alnum::ch_s: // 's': + atom.number = static_cast(re_character_class::space); // \s, \S. + atom.type = st_character_class; + break; + + case char_alnum::ch_W: // 'W': + atom.is_not = true; + //@fallthrough@ + + case char_alnum::ch_w: // 'w': + if (this->is_icase()) + { + this->character_class.setup_icase_word(); + atom.number = static_cast(re_character_class::icase_word); + } + else + atom.number = static_cast(re_character_class::word); // \w, \W. + atom.type = st_character_class; + break; + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + // Prepared for Unicode properties and script names. + case char_alnum::ch_P: // \P{...} + atom.is_not = true; + //@fallthrough@ + + case char_alnum::ch_p: // \p{...} + atom.number = get_property_number(curpos, end); + atom.type = st_character_class; + break; +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + + case char_alnum::ch_b: + atom.character = char_ctrl::cc_bs; // '\b' 0x08:BS + break; + + case char_alnum::ch_t: + atom.character = char_ctrl::cc_htab; // '\t' 0x09:HT + break; + + case char_alnum::ch_n: + atom.character = char_ctrl::cc_nl; // '\n' 0x0a:LF + break; + + case char_alnum::ch_v: + atom.character = char_ctrl::cc_vtab; // '\v' 0x0b:VT + break; + + case char_alnum::ch_f: + atom.character = char_ctrl::cc_ff; // '\f' 0x0c:FF + break; + + case char_alnum::ch_r: + atom.character = char_ctrl::cc_cr; // '\r' 0x0d:CR + break; + + case char_alnum::ch_c: // \cX + if (curpos != end) + { +// atom.character = static_cast(utf_traits().codepoint_inc(curpos, end) & 0x1f); // *curpos++ + atom.character = static_cast(*curpos | constants::asc_icase); + + if (atom.character >= char_alnum::ch_a && atom.character <= char_alnum::ch_z) + atom.character = static_cast(*curpos++ & 0x1f); + else + { + this->throw_error(regex_constants::error_escape); // Strict. +// atom.character = char_alnum::ch_c; // Loose. + } + } + break; + + case char_alnum::ch_0: + atom.character = char_ctrl::cc_nul; // '\0' 0x00:NUL + break; + + case char_alnum::ch_u: // \uhhhh, \u{h~hhhhhh} + atom.character = parse_escape_u(curpos, end); + break; + + case char_alnum::ch_x: // \xhh + atom.character = translate_numbers(curpos, end, 16, 2, 2, 0xff); + break; + + // SyntaxCharacter, '/', and '-'. + case meta_char::mc_caret: // '^' + case meta_char::mc_dollar: // '$' + case meta_char::mc_escape: // '\\' + case meta_char::mc_period: // '.' + case meta_char::mc_astrsk: // '*' + case meta_char::mc_plus: // '+' + case meta_char::mc_query: // '?' + case meta_char::mc_rbraop: // '(' + case meta_char::mc_rbracl: // ')' + case meta_char::mc_sbraop: // '[' + case meta_char::mc_sbracl: // ']' + case meta_char::mc_cbraop: // '{' + case meta_char::mc_cbracl: // '}' + case meta_char::mc_bar: // '|' + case char_other::co_slash: // '/' + case meta_char::mc_minus: // '-' allowed only in charclass. + break; + + default: + atom.character = constants::invalid_u32value; + } + + if (atom.character == constants::invalid_u32value) + this->throw_error(regex_constants::error_escape); + + return true; + } + + uchar32 parse_escape_u(const uchar32 *&curpos, const uchar32 *const end) const + { + uchar32 ucp; + + if (curpos == end) + return constants::invalid_u32value; + + if (*curpos == meta_char::mc_cbraop) + { +// ucp = translate_numbers(++curpos, end, 16, 1, 6, constants::unicode_max_codepoint, true); + ucp = translate_numbers(++curpos, end, 16, 1, 0, constants::unicode_max_codepoint); + + if (curpos == end || *curpos != meta_char::mc_cbracl) + return constants::invalid_u32value; + + ++curpos; + } + else + { + ucp = translate_numbers(curpos, end, 16, 4, 4, 0xffff); + + if (ucp >= 0xd800 && ucp <= 0xdbff) + { + const uchar32 * prefetch = curpos; + + if (prefetch != end && *prefetch == meta_char::mc_escape && ++prefetch != end && *prefetch == char_alnum::ch_u) + { + const uchar32 nextucp = translate_numbers(++prefetch, end, 16, 4, 4, 0xffff); + + if (nextucp >= 0xdc00 && nextucp <= 0xdfff) + { + curpos = prefetch; + ucp = (((ucp << 10) & 0xffc00) | (nextucp & 0x3ff)) + 0x10000; + } + } + } + } + return ucp; + } + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + uint_l32 get_property_number(const uchar32 *&curpos, const uchar32 *const end) + { + if (curpos == end || *curpos != meta_char::mc_cbraop) // '{' + this->throw_error(regex_constants::error_escape); + + pstring pname; + pstring pvalue(get_property_name_or_value(++curpos, end)); + + if (!pvalue.size()) + this->throw_error(regex_constants::error_escape); + + if (static_cast(pvalue[pvalue.size() - 1]) != char_other::co_sp) // ' ', not a value. + { + if (curpos == end) + this->throw_error(regex_constants::error_escape); + + if (*curpos == meta_char::mc_eq) // '=' + { + pname = pvalue; + pvalue = get_property_name_or_value(++curpos, end); + if (!pvalue.size()) + this->throw_error(regex_constants::error_escape); + } + } + + if (curpos == end || *curpos != meta_char::mc_cbracl) // '}' + this->throw_error(regex_constants::error_escape); + + if (static_cast(pvalue[pvalue.size() - 1]) == char_other::co_sp) // ' ', value. + pvalue.resize(pvalue.size() - 1); + + ++curpos; + + const uint_l32 class_number = this->character_class.lookup_property(pname, pvalue, this->is_icase()); + + if (class_number == re_character_class::error_property) + this->throw_error(regex_constants::error_escape); + + return class_number; + } + + pstring get_property_name_or_value(const uchar32 *&curpos, const uchar32 *const end) const + { + pstring name_or_value; + bool number_found = false; + + for (;; ++curpos) + { + if (curpos == end) + break; + + const uchar32 curchar = *curpos; + + if (curchar >= char_alnum::ch_A && curchar <= char_alnum::ch_Z) + ; + else if (curchar >= char_alnum::ch_a && curchar <= char_alnum::ch_z) + ; + else if (curchar == char_other::co_ll) // '_' + ; + else if (curchar >= char_alnum::ch_0 && curchar <= char_alnum::ch_9) + number_found = true; + else + break; + + name_or_value.append(1, static_cast(curchar)); + } + if (number_found) + name_or_value.append(1, char_other::co_sp); // ' ' + + return name_or_value; + } +#endif // !defined(SRELL_NO_UNICODE_PROPERTY) + + // Escape characters which do not appear in [] pairs. + + bool translate_atom_escape(state_type &atom, const uchar32 *&curpos, const uchar32 *const end, /* const */ re_compiler_state &cstate) + { + if (curpos == end) + this->throw_error(regex_constants::error_escape); + + atom.character = *curpos; + + switch (atom.character) + { + case meta_char::mc_minus: // '-' + this->throw_error(regex_constants::error_escape); + //@fallthrough@ + + case char_alnum::ch_B: // 'B': + atom.is_not = true; + //@fallthrough@ + + case char_alnum::ch_b: // 'b': + atom.type = st_boundary; // \b, \B. + atom.quantifier.reset(0); +// atom.number = 0; + if (this->is_icase()) + { + this->character_class.setup_icase_word(); + atom.number = static_cast(re_character_class::icase_word); + } + else + atom.number = static_cast(re_character_class::word); // \w, \W. + break; + +// case char_alnum::ch_A: // 'A': +// atom.type = st_bol; // '\A' +// case char_alnum::ch_Z: // 'Z': +// atom.type = st_eol; // '\Z' +// case char_alnum::ch_z: // 'z': +// atom.type = st_eol; // '\z' + + // Backreferences. + +#if !defined(SRELL_NO_NAMEDCAPTURE) + // Prepared for named captures. + case char_alnum::ch_k: // 'k': + return parse_backreference_name(atom, curpos, end, cstate); // \k. +#endif + + default: + + if (atom.character >= char_alnum::ch_1 && atom.character <= char_alnum::ch_9) // \1, \9. + return parse_backreference_number(atom, curpos, end, cstate); + + translate_escseq(atom, curpos, end); + + if (atom.type == st_character_class) + { + range_pairs newclass = this->character_class[atom.number]; + + if (atom.is_not) + { + newclass.negation(); + atom.is_not = false; + } + + if (this->is_icase() && atom.number >= static_cast(re_character_class::number_of_predefcls)) + newclass.make_caseunfoldedcharset(); + + atom.number = this->character_class.register_newclass(newclass); + } + return true; + } + + ++curpos; + return true; + } + + bool parse_backreference_number(state_type &atom, const uchar32 *&curpos, const uchar32 *const end, const re_compiler_state &cstate) + { + const uchar32 backrefno = translate_numbers(curpos, end, 10, 0, 0, 0xfffffffe); + // 22.2.1.1 Static Semantics: Early Errors: + // It is a Syntax Error if NcapturingParens >= 23^2 - 1. + + if (backrefno == constants::invalid_u32value) + this->throw_error(regex_constants::error_escape); + + atom.number = static_cast(backrefno); + atom.backrefnumber_unresolved = false; + + return backreference_postprocess(atom, cstate); + } + + bool backreference_postprocess(state_type &atom, const re_compiler_state & /* cstate */) const + { + atom.next2 = 1; + atom.type = st_backreference; + +// atom.quantifier.atleast = cstate.atleast_widths_of_brackets[atom.number - 1]; + // Moved to check_backreferences(). + + return true; + } + +#if !defined(SRELL_NO_NAMEDCAPTURE) + bool parse_backreference_name(state_type &atom, const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) + { + if (++curpos == end || *curpos != meta_char::mc_lt) + this->throw_error(regex_constants::error_escape); + + const gname_string groupname = get_groupname(++curpos, end, cstate); + + atom.number = this->namedcaptures[groupname]; + + if (atom.number != groupname_mapper::notfound) + atom.backrefnumber_unresolved = false; + else + { + atom.backrefnumber_unresolved = true; + atom.number = static_cast(cstate.unresolved_gnames.size()); + cstate.unresolved_gnames.push_back(groupname, atom.number); + } + + return backreference_postprocess(atom, cstate); + } + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + gname_string get_groupname(const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &cstate) +#else + gname_string get_groupname(const uchar32 *&curpos, const uchar32 *const end, re_compiler_state &) +#endif + { + charT mbstr[utf_traits::maxseqlen]; + gname_string groupname; + +#if !defined(SRELL_NO_UNICODE_PROPERTY) + cstate.idchecker.setup(); +#endif + for (;;) + { + if (curpos == end) + this->throw_error(regex_constants::error_escape); + + uchar32 curchar = *curpos++; + + if (curchar == meta_char::mc_gt) // '>' + break; + + if (curchar == meta_char::mc_escape && curpos != end && *curpos == char_alnum::ch_u) // '\\', 'u'. + curchar = parse_escape_u(++curpos, end); + +#if defined(SRELL_NO_UNICODE_PROPERTY) + if (curchar != meta_char::mc_escape) +#else + if (cstate.idchecker.is_identifier(curchar, groupname.size() != 0)) +#endif + ; // OK. + else + curchar = constants::invalid_u32value; + + if (curchar == constants::invalid_u32value) + this->throw_error(regex_constants::error_escape); + + const uchar32 seqlen = utf_traits::to_codeunits(mbstr, curchar); + for (uchar32 i = 0; i < seqlen; ++i) + groupname.append(1, mbstr[i]); + } + if (!groupname.size()) + this->throw_error(regex_constants::error_escape); + + return groupname; + } +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + + bool get_quantifier(re_quantifier &quantifier, const uchar32 *&curpos, const uchar32 *const end) + { + switch (*curpos) + { + case meta_char::mc_astrsk: // '*': + --quantifier.atleast; + //@fallthrough@ + + case meta_char::mc_plus: // '+': + quantifier.set_infinity(); + break; + + case meta_char::mc_query: // '?': + --quantifier.atleast; + break; + + case meta_char::mc_cbraop: // '{': + get_brace_with_quantifier(quantifier, curpos, end); + break; + + default: + return true; + } + + if (++curpos != end && *curpos == meta_char::mc_query) // '?' + { + quantifier.is_greedy = false; + ++curpos; + } + return true; + } + + void get_brace_with_quantifier(re_quantifier &quantifier, const uchar32 *&curpos, const uchar32 *const end) + { + ++curpos; + + quantifier.atleast = static_cast(translate_numbers(curpos, end, 10, 1, 0, constants::max_u32value)); + + if (quantifier.atleast == static_cast(constants::invalid_u32value)) + goto THROW_ERROR_BRACE; + + if (curpos == end) + goto THROW_ERROR_BRACE; + + if (*curpos == meta_char::mc_comma) // ',' + { + ++curpos; + + quantifier.atmost = static_cast(translate_numbers(curpos, end, 10, 1, 0, constants::max_u32value)); + + if (quantifier.atmost == static_cast(constants::invalid_u32value)) + quantifier.set_infinity(); + + if (!quantifier.is_valid()) + this->throw_error(regex_constants::error_badbrace); + } + else + quantifier.atmost = quantifier.atleast; + + if (curpos == end || *curpos != meta_char::mc_cbracl) // '}' + { + THROW_ERROR_BRACE: + this->throw_error(regex_constants::error_brace); + } + // *curpos == '}' + } + + uchar32 translate_numbers(const uchar32 *&curpos, const uchar32 *const end, const int radix, const std::size_t minsize, const std::size_t maxsize, const uchar32 maxvalue) const + { + std::size_t count = 0; + uchar32 u32value = 0; + int num; + + for (; maxsize == 0 || count < maxsize; ++curpos, ++count) + { + + if (curpos == end || (num = tonumber(*curpos, radix)) == -1) + break; + + const uchar32 nextvalue = u32value * radix + num; + + if ((/* maxvalue != 0 && */ nextvalue > maxvalue) || nextvalue < u32value) + break; + + u32value = nextvalue; + } + + if (count >= minsize) + return u32value; + + return constants::invalid_u32value; + } + + int tonumber(const uchar32 ch, const int radix) const + { + if ((ch >= char_alnum::ch_0 && ch <= char_alnum::ch_7) || (radix >= 10 && (ch == char_alnum::ch_8 || ch == char_alnum::ch_9))) + return static_cast(ch - char_alnum::ch_0); + + if (radix == 16) + { + if (ch >= char_alnum::ch_a && ch <= char_alnum::ch_f) + return static_cast(ch - char_alnum::ch_a + 10); + + if (ch >= char_alnum::ch_A && ch <= char_alnum::ch_F) + return static_cast(ch - char_alnum::ch_A + 10); + } + return -1; + } + + bool check_backreferences(re_compiler_state &cstate) + { + for (typename state_array::size_type backrefpos = 0; backrefpos < this->NFA_states.size(); ++backrefpos) + { + state_type &brs = this->NFA_states[backrefpos]; + + if (brs.type == st_backreference) + { + const uint_l32 &backrefno = brs.number; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + if (brs.backrefnumber_unresolved) + { + if (backrefno >= cstate.unresolved_gnames.size()) + return false; // Internal error. + + brs.number = this->namedcaptures[cstate.unresolved_gnames[backrefno]]; + + if (backrefno == groupname_mapper::notfound) + return false; + + brs.backrefnumber_unresolved = false; + } +#endif + + for (typename state_array::size_type roundbracket_closepos = 0;; ++roundbracket_closepos) + { + if (roundbracket_closepos < this->NFA_states.size()) + { + const state_type &rbcs = this->NFA_states[roundbracket_closepos]; + + if (rbcs.type == st_roundbracket_close && rbcs.number == backrefno) + { + if (roundbracket_closepos < backrefpos) + { +// brs.quantifier.atleast = cstate.atleast_widths_of_brackets[backrefno - 1]; + // 20210429: It was reported that clang-tidy was dissatisfied with this code. + // 20211006: Replaced with the following code: + + const uint_l32 backrefnoindex = backrefno - 1; + + // This can never be true. Added only for satisfying clang-tidy. + if (backrefnoindex >= cstate.atleast_widths_of_brackets.size()) + return false; + + brs.quantifier.atleast = cstate.atleast_widths_of_brackets[backrefnoindex]; + + cstate.backref_used = true; + } + else + { + brs.type = st_epsilon; + brs.next2 = 0; + } + break; + } + } + else + return false; + } + } + } + return true; + } + +#if !defined(SRELLDBG_NO_1STCHRCLS) + + void create_firstchar_class() + { +#if !defined(SRELLDBG_NO_BITSET) + range_pairs fcc; +#else + range_pairs &fcc = this->firstchar_class; +#endif + + const bool canbe0length = gather_nextchars(fcc, static_cast(this->NFA_states[0].next1), 0u, false); + + if (canbe0length) + { + fcc.set_solerange(range_pair_helper(0, constants::unicode_max_codepoint)); + // Expressions would consist of assertions only, such as /^$/. + // We cannot but accept every codepoint. + } + +#if !defined(SRELLDBG_NO_BITSET) + this->NFA_states[0].quantifier.atleast = this->character_class.register_newclass(fcc); + + set_bitset_table(fcc); +#endif + } + +#if !defined(SRELLDBG_NO_BITSET) + void set_bitset_table(const range_pairs &fcc) + { + for (typename range_pairs::size_type i = 0; i < fcc.size(); ++i) + { + const range_pair &range = fcc[i]; + +#if 0 + uchar32 second = range.second <= constants::unicode_max_codepoint ? range.second : constants::unicode_max_codepoint; + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (utf_traits::utftype == 16) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + if (second >= 0x10000 && range.first < 0x10000) + { + this->firstchar_class_bs.set_range(utf_traits::firstcodeunit(0x10000) & utf_traits::bitsetmask, utf_traits::firstcodeunit(second) & utf_traits::bitsetmask); + second = 0xffff; + } + } + this->firstchar_class_bs.set_range(utf_traits::firstcodeunit(range.first) & utf_traits::bitsetmask, utf_traits::firstcodeunit(second) & utf_traits::bitsetmask); + +#else + for (uchar32 ucp = range.first; ucp <= constants::unicode_max_codepoint; ++ucp) + { + this->firstchar_class_bs.set(utf_traits::firstcodeunit(ucp) & utf_traits::bitsetmask); + + if (ucp == range.second) + break; + } +#endif + } + } +#endif // !defined(SRELLDBG_NO_BITSET) +#endif // !defined(SRELLDBG_NO_1STCHRCLS) + + bool gather_nextchars(range_pairs &nextcharclass, typename state_array::size_type pos, simple_array &checked, const uint_l32 bracket_number, const bool subsequent) const + { + bool canbe0length = false; + + for (;;) + { + const state_type &state = this->NFA_states[pos]; + + if (checked[pos]) + break; + + checked[pos] = true; + + if (state.next2 + && (state.type != st_check_counter || !state.quantifier.is_greedy || state.quantifier.atleast == 0) + && (state.type != st_save_and_reset_counter) + && (state.type != st_roundbracket_open) + && (state.type != st_roundbracket_close || state.number != bracket_number) + && (state.type != st_repeat_in_push) + && (state.type != st_backreference || (state.quantifier.atleast == 0 && state.next1 != state.next2)) + && (state.type != st_lookaround_open)) + if (gather_nextchars(nextcharclass, pos + state.next2, checked, bracket_number, subsequent)) + canbe0length = true; + + switch (state.type) + { + case st_character: + nextcharclass.join(range_pair_helper(state.character)); + + if (this->is_ricase()) + nextcharclass.make_caseunfoldedcharset(); + + return canbe0length; + + case st_character_class: + nextcharclass.merge(this->character_class[state.number]); + return canbe0length; + + case st_backreference: + { + const typename state_array::size_type nextpos = find_next1_of_bracketopen(state.number); + + const bool length0 = gather_nextchars(nextcharclass, nextpos, state.number, subsequent); + + if (!length0) + return canbe0length; + } + break; + + case st_eol: + case st_bol: + if (!subsequent) + break; + + //@fallthrough@ + + case st_boundary: + if (subsequent) + nextcharclass.set_solerange(range_pair_helper(0, constants::unicode_max_codepoint)); + + break; + + case st_lookaround_open: +// if (!state.is_not && !state.reverse) + if (!state.is_not && state.quantifier.atleast == 0) + { + gather_nextchars(nextcharclass, pos + 1, checked, 0u, subsequent); + } + else if (subsequent) + nextcharclass.set_solerange(range_pair_helper(0, constants::unicode_max_codepoint)); + + break; + + case st_roundbracket_close: + if (/* bracket_number == 0 || */ state.number != bracket_number) + break; + //@fallthrough@ + + case st_success: // == st_lookaround_close. + return true; + + case st_check_counter: + if (!state.quantifier.is_greedy && state.quantifier.atleast >= 1) + return canbe0length; + //@fallthrough@ + + default:; + } + + if (state.next1) + pos += state.next1; + else + break; + } + return canbe0length; + } + + bool gather_nextchars(range_pairs &nextcharclass, const typename state_array::size_type pos, const uint_l32 bracket_number, const bool subsequent) const + { + simple_array checked; + + checked.resize(this->NFA_states.size(), false); + return gather_nextchars(nextcharclass, pos, checked, bracket_number, subsequent); + } + + typename state_array::size_type find_next1_of_bracketopen(const uint_l32 bracketno) const + { + for (typename state_array::size_type no = 0; no < this->NFA_states.size(); ++no) + { + const state_type &state = this->NFA_states[no]; + + if (state.type == st_roundbracket_open && state.number == bracketno) + return no + state.next1; + } + return 0; + } + + void relativejump_to_absolutejump() + { + for (typename state_array::size_type pos = 0; pos < this->NFA_states.size(); ++pos) + { + state_type &state = this->NFA_states[pos]; + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + if (state.next1 || state.type == st_character || state.type == st_character_class) +#else + if (state.next1) +#endif + state.next_state1 = &this->NFA_states[pos + state.next1]; + else + state.next_state1 = NULL; + + if (state.next2) + state.next_state2 = &this->NFA_states[pos + state.next2]; + else + state.next_state2 = NULL; + } + } + + void optimise() + { +#if !defined(SRELLDBG_NO_BRANCH_OPT2) && !defined(SRELLDBG_NO_ASTERISK_OPT) + branch_optimisation2(); +#endif + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + asterisk_optimisation(); +#endif + +#if !defined(SRELLDBG_NO_BRANCH_OPT) && !defined(SRELLDBG_NO_ASTERISK_OPT) + branch_optimisation(); +#endif + +#if !defined(SRELLDBG_NO_1STCHRCLS) + create_firstchar_class(); +#endif + +#if !defined(SRELLDBG_NO_SKIP_EPSILON) + skip_epsilon(); +#endif + +#if !defined(SRELLDBG_NO_CCPOS) + set_charclass_posinfo(); +#endif + } + +#if !defined(SRELLDBG_NO_SKIP_EPSILON) + + void skip_epsilon() + { + for (typename state_array::size_type pos = 0; pos < this->NFA_states.size(); ++pos) + { + state_type &state = this->NFA_states[pos]; + + if (state.next1) + state.next1 = static_cast(skip_nonbranch_epsilon(pos + state.next1) - pos); + + if (state.next2) + state.next2 = static_cast(skip_nonbranch_epsilon(pos + state.next2) - pos); + } + } + + typename state_array::size_type skip_nonbranch_epsilon(typename state_array::size_type pos) const + { + for (;;) + { + const state_type &state = this->NFA_states[pos]; + + if (state.type == st_epsilon && state.next2 == 0) + { + pos += state.next1; + continue; + } + break; + } + return pos; + } + +#endif + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + + void asterisk_optimisation() + { + state_type *prevstate_is_astrskepsilon = NULL; + const state_type *prevcharstate = NULL; + state_size_type mnp_inspos = 0; + bool inspos_updatable = true; +#if !defined(SRELLDBG_NO_SPLITCC) + bool inserted = false; +#endif + + for (typename state_array::size_type cur = 1; cur < this->NFA_states.size(); ++cur) + { + state_type &curstate = this->NFA_states[cur]; + + switch (curstate.type) + { + case st_epsilon: + if (curstate.character == meta_char::mc_astrsk) + { + prevstate_is_astrskepsilon = &curstate; + } + else + { + prevstate_is_astrskepsilon = NULL; + inspos_updatable = false; + } + break; + + case st_character: + case st_character_class: + if (inspos_updatable) + { + if (prevcharstate) + { + if (prevcharstate->type != curstate.type || prevcharstate->number != curstate.number) + inspos_updatable = false; + } + if (inspos_updatable) + { + if (prevstate_is_astrskepsilon) + { + inspos_updatable = false; + if (prevstate_is_astrskepsilon->quantifier.is_asterisk_or_plus()) + { + mnp_inspos = cur + 1; + } + } + } + prevcharstate = &curstate; + } + if (prevstate_is_astrskepsilon) + { + const re_quantifier &eq = prevstate_is_astrskepsilon->quantifier; + const state_size_type epsilonno = cur - 1; + const state_size_type faroffset = eq.is_greedy ? prevstate_is_astrskepsilon->next2 : prevstate_is_astrskepsilon->next1; + const state_size_type nextno = epsilonno + faroffset; +#if !defined(SRELLDBG_NO_SPLITCC) + const state_size_type origlen = this->NFA_states.size(); +#endif + + if (is_exclusive_sequence(eq, cur, nextno)) + { + state_type &epsilonstate = this->NFA_states[epsilonno]; + state_type &curstate2 = this->NFA_states[cur]; + + epsilonstate.next1 = 1; + epsilonstate.next2 = 0; + epsilonstate.number = 0; +// curstate2.quantifier.is_greedy = true; + if (epsilonstate.quantifier.is_infinity()) + { + curstate2.next1 = 0; + curstate2.next2 = faroffset - 1; + } + else // ? or {0,1} + { + curstate2.next2 = faroffset - 1; + } + +#if !defined(SRELLDBG_NO_SPLITCC) + if (mnp_inspos == nextno && origlen != this->NFA_states.size()) + inserted = true; +#endif + } + prevstate_is_astrskepsilon = NULL; + } + break; + + default: + prevstate_is_astrskepsilon = NULL; + inspos_updatable = false; + } + } + +#if !defined(SRELLDBG_NO_NEXTPOS_OPT) + + if (mnp_inspos != 0) + { + state_size_type cur = mnp_inspos; + + if (this->NFA_states[cur].type != st_success) + { + const state_type &prevstate = this->NFA_states[cur - 1]; + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) && !defined(SRELLDBG_NO_MPREWINDER) && !defined(SRELLDBG_NO_1STCHRCLS) && !defined(SRELLDBG_NO_BITSET) + +#if !defined(SRELLDBG_NO_SPLITCC) + if (!inserted && prevstate.next1 == 0) +#else + if (prevstate.next1 == 0) +#endif + { + range_pairs prevcc; + range_pairs nextcc; + +// gather_if_char_or_cc_strict(prevcc, prevstate); + if (prevstate.type == st_character) + { + prevcc.set_solerange(range_pair_helper(prevstate.character)); + } + else if (prevstate.type == st_character_class) + { + prevcc = this->character_class[prevstate.number]; + } + + gather_nextchars(nextcc, cur, 0u, true); + + const uint_l32 cpnum_prevcc = prevcc.total_codepoints(); + const uint_l32 cpnum_nextcc = nextcc.total_codepoints(); + + if (cpnum_nextcc != 0 && cpnum_nextcc < cpnum_prevcc) + { + state_array newNFAs; + state_type atom; + + atom.reset(); + atom.character = meta_char::mc_eq; // '=' + atom.type = st_lookaround_open; + atom.next1 = static_cast(cur - 1) * 2 + 2; + atom.next2 = 1; + atom.quantifier.atleast = 2; // Match point rewinder. + newNFAs.append(1, atom); + + newNFAs.append(this->NFA_states, 1, cur - 1); + + atom.type = st_lookaround_close; + atom.next1 = 0; + atom.next2 = 0; + newNFAs.append(1, atom); + + insert_at(1, newNFAs.size()); + this->NFA_states.replace(1, newNFAs.size(), newNFAs); + this->NFA_states[0].next2 = this->NFA_states[0].next1; + this->NFA_states[0].next1 = 1; + + return; + } + } +#endif // !defined(SRELL_FIXEDWIDTHLOOKBEHIND) && !defined(SRELLDBG_NO_MPREWINDER) && !defined(SRELLDBG_NO_1STCHRCLS) && !defined(SRELLDBG_NO_BITSET) + + insert_at(cur, 1); + state_type &mnpstate = this->NFA_states[cur]; + state_type &charstate = this->NFA_states[cur - 1]; + + mnpstate.type = st_move_nextpos; + +#if !defined(SRELLDBG_NO_SPLITCC) + + if (inserted) + { + charstate.next2 = 1; + } + else +#endif + if (charstate.next1 == 0) + { + mnpstate.next1 = charstate.next2 - 1; + charstate.next2 = 1; + } + else + { + mnpstate.next1 = -2; + charstate.next1 = 1; + } + } + } +#endif // !defined(SRELLDBG_NO_NEXTPOS_OPT) + } + + bool is_exclusive_sequence(const re_quantifier &eq, const state_size_type curno, const state_size_type nextno) // const + { + const state_type &curstate = this->NFA_states[curno]; + range_pairs curchar_class; + range_pairs nextchar_class; + + if (curstate.type == st_character) + { + curchar_class.join(range_pair_helper(curstate.character)); + } + else if (curstate.type == st_character_class) + { + curchar_class = this->character_class[curstate.number]; + if (curchar_class.size() == 0) // Means [], which always makes matching fail. + return true; // For preventing the automaton from pushing bt data. + } + else + { + return false; + } + + const bool canbe0length = gather_nextchars(nextchar_class, nextno, 0u, true); + + if (nextchar_class.size()) + { + if (!canbe0length || eq.is_greedy) + { +#if !defined(SRELLDBG_NO_SPLITCC) + + range_pairs kept; + range_pairs removed; + + curchar_class.split_ranges(kept, removed, nextchar_class); + + if (removed.size() == 0) // !curchar_class.is_overlap(nextchar_class) + return true; + + if (curstate.type == st_character_class && kept.size() && eq.is_infinity()) + { + { + state_type &curstate2 = this->NFA_states[curno]; + + curstate2.character = kept.consists_of_one_character(this->is_icase()); + if (curstate2.character != constants::invalid_u32value) + curstate2.type = st_character; + else + curstate2.number = this->character_class.register_newclass(kept); + } + const re_quantifier backupeq(eq); + + insert_at(nextno, 2); + state_type &n0 = this->NFA_states[nextno]; + state_type &n1 = this->NFA_states[nextno + 1]; + + n0.reset(); + n0.type = st_epsilon; + n0.character = meta_char::mc_astrsk; + n0.quantifier = backupeq; +// n0.next2 = 1; + n0.next2 = 2; + if (!n0.quantifier.is_greedy) + { + n0.next1 = n0.next2; + n0.next2 = 1; + } + + n1.reset(); + n1.type = st_character_class; + + n1.character = removed.consists_of_one_character(this->is_icase()); + if (n1.character != constants::invalid_u32value) + n1.type = st_character; + else + n1.number = this->character_class.register_newclass(removed); + + n1.next1 = -2; +// n1.next2 = 0; + return true; + } + +#else // defined(SRELLDBG_NO_SPLITCC) + + if (!curchar_class.is_overlap(nextchar_class)) + { + return true; + } + +#endif // !defined(SRELLDBG_NO_SPLITCC) + } + } + else if (/* nextchar_class.size() == 0 && */ (!canbe0length || only_success_left(nextno))) + { + // (size() == 0 && !canbe0length) means []. + return eq.is_greedy; + } + + return false; + } + + bool only_success_left(typename state_array::size_type pos) const + { + for (;;) + { + const state_type &state = this->NFA_states[pos]; + + switch (state.type) + { + case st_success: + return true; + + case st_roundbracket_close: + case st_backreference: + if (state.next2 != 0 && state.next1 != state.next2) + return false; + break; + + case st_epsilon: + if (state.next2 != 0 && !only_success_left(pos + state.next2)) + return false; + break; + + case st_roundbracket_open: + break; // /a*()/ + + default: + return false; + } + if (state.next1) + pos += state.next1; + else + return false; + } + } +#endif // !defined(SRELLDBG_NO_ASTERISK_OPT) + + void insert_at(const typename state_array::size_type pos, const std::ptrdiff_t len) + { + state_type newstate; + + for (typename state_array::size_type cur = 0; cur < pos; ++cur) + { + state_type &state = this->NFA_states[cur]; + + if (state.next1 && (cur + state.next1) >= pos) + state.next1 += len; + + if (state.next2 && (cur + state.next2) >= pos) + state.next2 += len; + } + + for (typename state_array::size_type cur = pos; cur < this->NFA_states.size(); ++cur) + { + state_type &state = this->NFA_states[cur]; + + if ((cur + state.next1) < pos) + state.next1 -= len; + + if ((cur + state.next2) < pos) + state.next2 -= len; + } + + newstate.reset(); + newstate.type = st_epsilon; + for (std::ptrdiff_t count = 0; count < len; ++count) + this->NFA_states.insert(pos, newstate); + } + +#if !defined(SRELLDBG_NO_NEXTPOS_OPT) +#endif // !defined(SRELLDBG_NO_NEXTPOS_OPT) + +#if !defined(SRELLDBG_NO_BRANCH_OPT) || defined(SRELLTEST_NEXTPOS_OPT2) + typename state_array::size_type gather_if_char_or_charclass(range_pairs &charclass, typename state_array::size_type pos) const + { + for (; pos < this->NFA_states.size();) + { + const state_type &curstate = this->NFA_states[pos]; + + if (curstate.type == st_character && curstate.next2 == 0) + { + charclass.set_solerange(range_pair_helper(curstate.character)); + return pos; + } + else if (curstate.type == st_character_class && curstate.next2 == 0) + { + charclass = this->character_class[curstate.number]; + return pos; + } + else if (curstate.type == st_epsilon && curstate.next2 == 0) + { + } + else + break; + + pos += curstate.next1; + } + return 0; + } +#endif // !defined(SRELLDBG_NO_BRANCH_OPT) || defined(SRELLTEST_NEXTPOS_OPT2) + +#if !defined(SRELLDBG_NO_BRANCH_OPT) + void branch_optimisation() + { + range_pairs nextcharclass1; + + for (typename state_array::size_type pos = 0; pos < this->NFA_states.size(); ++pos) + { + const state_type &state = this->NFA_states[pos]; + + if (state.is_branch()) + { + const typename state_array::size_type nextcharpos = gather_if_char_or_charclass(nextcharclass1, pos + state.next1); + + if (nextcharpos) + { + range_pairs nextcharclass2; + + const bool canbe0length = gather_nextchars(nextcharclass2, pos + state.next2, 0u /* bracket_number */, true); + + if (!canbe0length && !nextcharclass1.is_overlap(nextcharclass2)) + { + state_type &branch = this->NFA_states[pos]; + state_type &next1 = this->NFA_states[nextcharpos]; + + next1.next2 = pos + branch.next2 - nextcharpos; + branch.next2 = 0; + } + } + } + } + } +#endif // !defined(SRELLDBG_NO_BRANCH_OPT) + +#if !defined(SRELL_NO_ICASE) + bool check_if_really_needs_icase_search() + { + uchar32 u32chars[unicode_case_folding::rev_maxset]; + + for (typename state_array::size_type i = 0; i < this->NFA_states.size(); ++i) + { + const state_type &state = this->NFA_states[i]; + + if (state.type == st_character) + { + if (unicode_case_folding::casefoldedcharset(u32chars, state.character) > 1) + return true; + } + else if (state.type == st_backreference) + return true; + } +// this->soflags &= ~regex_constants::icase; + return false; + } +#endif // !defined(SRELL_NO_ICASE) + +#if !defined(SRELLDBG_NO_BMH) + void setup_bmhdata() + { + simple_array u32s; + + for (typename state_array::size_type i = 1; i < this->NFA_states.size(); ++i) + { + const state_type &state = this->NFA_states[i]; + + if (state.type == st_character) + u32s.push_back(state.character); + else + { + u32s.clear(); + break; + } + } + + if (u32s.size() > 1) +// if ((u32s.size() > 1 && !this->is_ricase()) || (u32s.size() > 2 && this->is_ricase())) + { + if (this->bmdata) + this->bmdata->clear(); + else + this->bmdata = new re_bmh; + + this->bmdata->setup(u32s, this->is_ricase()); + return /* false */; + } + + if (this->bmdata) + delete this->bmdata; + this->bmdata = NULL; +// return true; + } +#endif // !defined(SRELLDBG_NO_BMH) + +#if !defined(SRELLDBG_NO_CCPOS) + void set_charclass_posinfo() + { + this->character_class.finalise(); + for (typename state_array::size_type i = 1; i < this->NFA_states.size(); ++i) + { + state_type &state = this->NFA_states[i]; + + if (state.type == st_character_class) + { + const range_pair &posinfo = this->character_class.charclasspos(state.number); + state.quantifier.setccpos(posinfo.first, posinfo.second); + } + } + } +#endif // !defined(SRELLDBG_NO_CCPOS) + +#if !defined(SRELLDBG_NO_BRANCH_OPT2) + + bool gather_if_char_or_charclass_strict(range_pairs &out, const state_type &state) const + { + if (state.type == st_character /* && state.next2 == 0 */) + { + out.set_solerange(range_pair_helper(state.character)); + } + else if (state.type == st_character_class /* && state.next2 == 0 */) + { + out = this->character_class[state.number]; + } + else + return false; + + return true; + } + + void branch_optimisation2() + { + range_pairs basealt1stch; + range_pairs nextalt1stch; + + for (state_size_type pos = 0; pos < this->NFA_states.size(); ++pos) + { + const state_type &curstate = this->NFA_states[pos]; + + if (curstate.is_branch()) + { + const state_size_type next1pos = pos + curstate.next1; + state_size_type precharchainpos = pos; + + if (gather_if_char_or_charclass_strict(basealt1stch, this->NFA_states[next1pos])) + { + state_size_type next2pos = precharchainpos + curstate.next2; + state_size_type postcharchainpos = 0; + + for (;;) + { + state_size_type next2next1pos = next2pos; + state_type &nstate2 = this->NFA_states[next2pos]; + state_size_type next2next2pos = 0; + + if (nstate2.is_branch()) + { + next2next2pos = next2pos + nstate2.next2; + next2next1pos += nstate2.next1; + } + + if (gather_if_char_or_charclass_strict(nextalt1stch, this->NFA_states[next2next1pos])) + { + const int relation = basealt1stch.relationship(nextalt1stch); + + if (relation == 0) + { + if (next2next2pos) // if (nstate2.is_branch()) + { + nstate2.reset(); + nstate2.type = st_epsilon; + } + + if (postcharchainpos == 0) + { + postcharchainpos = next1pos + 1; + insert_at(postcharchainpos, 1); + this->NFA_states[next1pos].next1 = 1; + } + else + { + const state_size_type prevbranchpos = postcharchainpos; + + postcharchainpos = prevbranchpos + this->NFA_states[prevbranchpos].next2; + insert_at(postcharchainpos, 1); + this->NFA_states[prevbranchpos].next2 = postcharchainpos - prevbranchpos; + // Fix for bug210423. This line cannot be omitted, because + // NFA_states[prevbranchpos].next2 has been incremented in insert_at(). + } + +// if (next2next1pos >= postcharchainpos) + ++next2next1pos; + + if (precharchainpos >= postcharchainpos) + ++precharchainpos; + + state_type &prechainbranchpoint = this->NFA_states[precharchainpos]; + if (next2next2pos) + { +// if (next2next2pos >= postcharchainpos) + ++next2next2pos; + prechainbranchpoint.next2 = next2next2pos - precharchainpos; + } + else + { + prechainbranchpoint.next2 = 0; + } + + state_type &newbranchpoint = this->NFA_states[postcharchainpos]; + newbranchpoint.character = meta_char::mc_bar; +// newbranchpoint.next1 = 1; + newbranchpoint.next2 = next2next1pos + this->NFA_states[next2next1pos].next1 - postcharchainpos; + } + else if (relation == 1) + { + break; + } + else + precharchainpos = next2pos; + } + else + { + // Fix for bug210428. + // Original: /mm2|m|mm/ + // 1st step: /m(?:m2||m)/ <- No more optimisation can be performed. Must quit. + // 2nd step: /mm(?:2||)/ <- BUG. + break; + } + + if (next2next2pos == 0) + break; + + next2pos = next2next2pos; + } + } + } + } + } +#endif // !defined(SRELLDBG_NO_BRANCH_OPT2) + +public: // For debug. + + void print_NFA_states(const int) const; +}; +// re_compiler + + } // namespace regex_internal + +// ... "rei_compiler.hpp"] +// ["regex_sub_match.hpp" ... + +// 28.9, class template sub_match: +template +class sub_match : public std::pair +{ +public: + + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::difference_type difference_type; + typedef BidirectionalIterator iterator; + typedef std::basic_string string_type; + + bool matched; + +// constexpr sub_match(); // C++11. + + sub_match() : matched(false) + { + } + + difference_type length() const + { + return matched ? std::distance(this->first, this->second) : 0; + } + + operator string_type() const + { + return matched ? string_type(this->first, this->second) : string_type(); + } + + string_type str() const + { + return matched ? string_type(this->first, this->second) : string_type(); + } + + int compare(const sub_match &s) const + { + return str().compare(s.str()); + } + + int compare(const string_type &s) const + { + return str().compare(s); + } + + int compare(const value_type *const s) const + { + return str().compare(s); + } +}; + +// 28.9.2, sub_match non-member operators: +// [7.9.2] sub_match non-member operators + +// Compares sub_match & with sub_match &. +template +bool operator==(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) == 0; // 1 +} + +template +bool operator!=(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) != 0; // 2 +} + +template +bool operator<(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) < 0; // 3 +} + +template +bool operator<=(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) <= 0; // 4 +} + +template +bool operator>=(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) >= 0; // 5 +} + +template +bool operator>(const sub_match &lhs, const sub_match &rhs) +{ + return lhs.compare(rhs) > 0; // 6 +} + +// Compares basic_string & with sub_match &. +template +bool operator==( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return rhs.compare(lhs.c_str()) == 0; // 7 +} + +template +bool operator!=( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return !(lhs == rhs); // 8 +} + +template +bool operator<( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return rhs.compare(lhs.c_str()) > 0; // 9 +} + +template +bool operator>( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return rhs < lhs; // 10 +} + +template +bool operator>=( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return !(lhs < rhs); // 11 +} + +template +bool operator<=( + const std::basic_string::value_type, ST, SA> &lhs, + const sub_match &rhs +) +{ + return !(rhs < lhs); // 12 +} + +// Compares sub_match & with basic_string &. +template +bool operator==( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return lhs.compare(rhs.c_str()) == 0; // 13 +} + +template +bool operator!=( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return !(lhs == rhs); // 14 +} + +template +bool operator<( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return lhs.compare(rhs.c_str()) < 0; // 15 +} + +template +bool operator>( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return rhs < lhs; // 16 +} + +template +bool operator>=( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return !(lhs < rhs); // 17 +} + +template +bool operator<=( + const sub_match &lhs, + const std::basic_string::value_type, ST, SA> &rhs +) +{ + return !(rhs < lhs); // 18 +} + +// Compares iterator_traits::value_type * with sub_match &. +template +bool operator==( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return rhs.compare(lhs) == 0; // 19 +} + +template +bool operator!=( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return !(lhs == rhs); // 20 +} + +template +bool operator<( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return rhs.compare(lhs) > 0; // 21 +} + +template +bool operator>( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return rhs < lhs; // 22 +} + +template +bool operator>=( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return !(lhs < rhs); // 23 +} + +template +bool operator<=( + typename std::iterator_traits::value_type const *lhs, + const sub_match &rhs +) +{ + return !(rhs < lhs); // 24 +} + +// Compares sub_match & with iterator_traits::value_type *. +template +bool operator==( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return lhs.compare(rhs) == 0; // 25 +} + +template +bool operator!=( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return !(lhs == rhs); // 26 +} + +template +bool operator<( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return lhs.compare(rhs) < 0; // 27 +} + +template +bool operator>( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return rhs < lhs; // 28 +} + +template +bool operator>=( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return !(lhs < rhs); // 29 +} + +template +bool operator<=( + const sub_match &lhs, + typename std::iterator_traits::value_type const *rhs +) +{ + return !(rhs < lhs); // 30 +} + +// Compares iterator_traits::value_type & with sub_match &. +template +bool operator==( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return rhs.compare(typename sub_match::string_type(1, lhs)) == 0; // 31 +} + +template +bool operator!=( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return !(lhs == rhs); // 32 +} + +template +bool operator<( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return rhs.compare(typename sub_match::string_type(1, lhs)) > 0; // 33 +} + +template +bool operator>( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return rhs < lhs; // 34 +} + +template +bool operator>=( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return !(lhs < rhs); // 35 +} + +template +bool operator<=( + typename std::iterator_traits::value_type const &lhs, + const sub_match &rhs +) +{ + return !(rhs < lhs); // 36 +} + +// Compares sub_match & with iterator_traits::value_type &. +template +bool operator==( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return lhs.compare(typename sub_match::string_type(1, rhs)) == 0; // 37 +} + +template +bool operator!=( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return !(lhs == rhs); // 38 +} + +template +bool operator<( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return lhs.compare(typename sub_match::string_type(1, rhs)) < 0; // 39 +} + +template +bool operator>( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return rhs < lhs; // 40 +} + +template +bool operator>=( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return !(lhs < rhs); // 41 +} + +template +bool operator<=( + const sub_match &lhs, + typename std::iterator_traits::value_type const &rhs +) +{ + return !(rhs < lhs); // 42 +} + +template +std::basic_ostream &operator<<(std::basic_ostream &os, const sub_match &m) +{ + return (os << m.str()); +} + +typedef sub_match csub_match; +typedef sub_match wcsub_match; +typedef sub_match ssub_match; +typedef sub_match wssub_match; + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + typedef sub_match u16csub_match; + typedef sub_match u32csub_match; + typedef sub_match u16ssub_match; + typedef sub_match u32ssub_match; +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) + typedef sub_match u8csub_match; +#endif +#if defined(SRELL_CPP20_CHAR8_ENABLED) && SRELL_CPP20_CHAR8_ENABLED >= 2 + typedef sub_match u8ssub_match; +#endif + +typedef csub_match u8ccsub_match; +typedef ssub_match u8cssub_match; +#if !defined(SRELL_CPP20_CHAR8_ENABLED) + typedef u8ccsub_match u8csub_match; +#endif +#if !defined(SRELL_CPP20_CHAR8_ENABLED) || SRELL_CPP20_CHAR8_ENABLED < 2 + typedef u8cssub_match u8ssub_match; +#endif + +#if defined(WCHAR_MAX) + #if WCHAR_MAX >= 0x10ffff + typedef wcsub_match u32wcsub_match; + typedef wssub_match u32wssub_match; + typedef u32wcsub_match u1632wcsub_match; + typedef u32wssub_match u1632wssub_match; + #elif WCHAR_MAX >= 0xffff + typedef wcsub_match u16wcsub_match; + typedef wssub_match u16wssub_match; + typedef u16wcsub_match u1632wcsub_match; + typedef u16wssub_match u1632wssub_match; + #endif +#endif + +// ... "regex_sub_match.hpp"] +// ["regex_match_results.hpp" ... + +// 28.10, class template match_results: +template > > +class match_results +{ +public: + + typedef sub_match value_type; + typedef const value_type & const_reference; + typedef const_reference reference; +// typedef implementation defined const_iterator; + typedef typename std::vector::const_iterator const_iterator; + typedef const_iterator iterator; + typedef typename std::iterator_traits::difference_type difference_type; + +#if defined(__cplusplus) && __cplusplus >= 201103L + typedef typename std::allocator_traits::size_type size_type; +#else + typedef typename Allocator::size_type size_type; // TR1. +#endif + + typedef Allocator allocator_type; + typedef typename std::iterator_traits::value_type char_type; + typedef std::basic_string string_type; + +public: + + // 28.10.1, construct/copy/destroy: + // [7.10.1] construct/copy/destroy + explicit match_results(const Allocator &a = Allocator()) : ready_(false), sub_matches_(a) + { + } + + match_results(const match_results &m) + { + operator=(m); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + match_results(match_results &&m) SRELL_NOEXCEPT + { + operator=(std::move(m)); + } +#endif + + match_results &operator=(const match_results &m) + { + if (this != &m) + { +// this->sstate_ = m.sstate_; + this->ready_ = m.ready_; + this->sub_matches_ = m.sub_matches_; + this->prefix_ = m.prefix_; + this->suffix_ = m.suffix_; + this->base_ = m.base_; +#if !defined(SRELL_NO_NAMEDCAPTURE) + this->gnames_ = m.gnames_; +#endif + } + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + match_results &operator=(match_results &&m) SRELL_NOEXCEPT + { + if (this != &m) + { +// this->sstate_ = std::move(m.sstate_); + this->ready_ = m.ready_; + this->sub_matches_ = std::move(m.sub_matches_); + this->prefix_ = std::move(m.prefix_); + this->suffix_ = std::move(m.suffix_); + this->base_ = m.base_; +#if !defined(SRELL_NO_NAMEDCAPTURE) + this->gnames_ = std::move(m.gnames_); +#endif + } + return *this; + } +#endif + +// ~match_results(); + + // 28.10.2, state: + bool ready() const + { + return ready_; + } + + // 28.10.3, size: + // [7.10.2] size + size_type size() const + { + return sub_matches_.size(); + } + + size_type max_size() const + { + return sub_matches_.max_size(); +// return static_cast(~0) / sizeof (value_type); + } + + bool empty() const + { + return size() == 0; + } + + // 28.10.4, element access: + // [7.10.3] element access + difference_type length(const size_type sub = 0) const + { + return (*this)[sub].length(); + } + + difference_type position(const size_type sub = 0) const + { + const_reference ref = (*this)[sub]; + + return std::distance(base_, ref.first); + } + + string_type str(const size_type sub = 0) const + { + return string_type((*this)[sub]); + } + + const_reference operator[](const size_type n) const + { +#if defined(SRELL_STRICT_IMPL) + return n < sub_matches_.size() ? sub_matches_[n] : unmatched_; +#else + return sub_matches_[n]; +#endif + } + +#if !defined(SRELL_NO_NAMEDCAPTURE) + + // Helpers for overload resolution of the integer literal 0 of signed types. + template + difference_type length(const IntegerType zero) const + { + return length(static_cast(zero)); + } + template + difference_type position(const IntegerType zero) const + { + return position(static_cast(zero)); + } + template + string_type str(const IntegerType zero) const + { + return str(static_cast(zero)); + } + template + const_reference operator[](const IntegerType zero) const + { + return operator[](static_cast(zero)); + } + + difference_type length(const string_type &sub) const + { + return (*this)[sub].length(); + } + + difference_type position(const string_type &sub) const + { + const_reference ref = (*this)[sub]; + + return std::distance(base_, ref.first); + } + + string_type str(const string_type &sub) const + { + return string_type((*this)[sub]); + } + + const_reference operator[](const string_type &sub) const + { + return sub_matches_[lookup_and_check_backref_number(sub.c_str(), sub.c_str() + sub.size())]; + } + + difference_type length(const char_type *sub) const + { + return (*this)[sub].length(); + } + + difference_type position(const char_type *sub) const + { + const_reference ref = (*this)[sub]; + + return std::distance(base_, ref.first); + } + + string_type str(const char_type *sub) const + { + return string_type((*this)[sub]); + } + + const_reference operator[](const char_type *sub) const + { + return sub_matches_[lookup_and_check_backref_number(sub, sub + std::char_traits::length(sub))]; + } + +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + + const_reference prefix() const + { + return prefix_; + } + + const_reference suffix() const + { + return suffix_; + } + + const_iterator begin() const + { + return sub_matches_.begin(); + } + + const_iterator end() const + { + return sub_matches_.end(); + } + + const_iterator cbegin() const + { + return sub_matches_.begin(); + } + + const_iterator cend() const + { + return sub_matches_.end(); + } + + // 28.10.5, format: + // [7.10.4] format + template + OutputIter format( + OutputIter out, + const char_type *fmt_first, + const char_type *const fmt_last, + regex_constants::match_flag_type /* flags */ = regex_constants::format_default + ) const + { + if (this->ready() && !this->empty()) + { +#if !defined(SRELL_NO_NAMEDCAPTURE) + const bool no_groupnames = gnames_.size() == 0; +#endif + const value_type &m0 = (*this)[0]; + + while (fmt_first != fmt_last) + { + if (*fmt_first != static_cast(regex_internal::meta_char::mc_dollar)) // '$' + { + *out++ = *fmt_first++; + } + else + { + ++fmt_first; + if (fmt_first == fmt_last) + { + *out++ = regex_internal::meta_char::mc_dollar; // '$'; + } + else if (*fmt_first == static_cast(regex_internal::char_other::co_amp)) // '&', $& + { + out = std::copy(m0.first, m0.second, out); + ++fmt_first; + } + else if (*fmt_first == static_cast(regex_internal::char_other::co_grav)) // '`', $`, prefix. + { + out = std::copy(this->prefix().first, this->prefix().second, out); + ++fmt_first; + } + else if (*fmt_first == static_cast(regex_internal::char_other::co_apos)) // '\'', $', suffix. + { + out = std::copy(this->suffix().first, this->suffix().second, out); + ++fmt_first; + } +#if !defined(SRELL_NO_NAMEDCAPTURE) + else if (*fmt_first == static_cast(regex_internal::meta_char::mc_lt) && !no_groupnames) // '<', $< + { + const char_type *const current_backup = fmt_first; + bool replaced = false; + + if (++fmt_first == fmt_last) + ; // Do nothing. + else + { + const char_type *const name_begin = fmt_first; + + for (;; ++fmt_first) + { + if (*fmt_first == static_cast(regex_internal::meta_char::mc_gt)) + { + const regex_internal::uint_l32 backref_number = lookup_backref_number(name_begin, fmt_first); + + if (backref_number != regex_internal::groupname_mapper::notfound) + { + const value_type &mn = (*this)[backref_number]; + + if (mn.matched) + out = std::copy(mn.first, mn.second, out); +// replaced = true; + } + replaced = true; + ++fmt_first; + break; + } + if (fmt_first == fmt_last) + break; + } + } + if (!replaced) + { + fmt_first = current_backup; + *out++ = regex_internal::meta_char::mc_dollar; // '$'; + } + } +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + else + { + const char_type *const backup_pos = fmt_first; + size_type backref_number = 0; + + if (fmt_first != fmt_last && *fmt_first >= static_cast(regex_internal::char_alnum::ch_0) && *fmt_first <= static_cast(regex_internal::char_alnum::ch_9)) // '0'-'9' + { + backref_number += *fmt_first - regex_internal::char_alnum::ch_0; // '0'; + + if (++fmt_first != fmt_last && *fmt_first >= static_cast(regex_internal::char_alnum::ch_0) && *fmt_first <= static_cast(regex_internal::char_alnum::ch_9)) // '0'-'9' + { + backref_number *= 10; + backref_number += *fmt_first - regex_internal::char_alnum::ch_0; // '0'; + ++fmt_first; + } + } + + if (backref_number && backref_number < this->size()) + { + const value_type &mn = (*this)[backref_number]; + + if (mn.matched) + out = std::copy(mn.first, mn.second, out); + } + else + { + *out++ = regex_internal::meta_char::mc_dollar; // '$'; + + fmt_first = backup_pos; + if (*fmt_first == static_cast(regex_internal::meta_char::mc_dollar)) + ++fmt_first; + } + } + } + } + } + return out; + } + + template + OutputIter format( + OutputIter out, + const std::basic_string &fmt, + regex_constants::match_flag_type flags = regex_constants::format_default + ) const + { + return format(out, fmt.data(), fmt.data() + fmt.size(), flags); + } + + template + std::basic_string format( + const string_type &fmt, + regex_constants::match_flag_type flags = regex_constants::format_default + ) const + { + std::basic_string result; + +// format(std::back_insert_iterator(result), fmt, flags); + format(std::back_inserter(result), fmt, flags); + return result; + } + + string_type format(const char_type *fmt, regex_constants::match_flag_type flags = regex_constants::format_default) const + { + string_type result; + + format(std::back_inserter(result), fmt, fmt + std::char_traits::length(fmt), flags); + return result; + } + + // 28.10.6, allocator: + // [7.10.5] allocator + allocator_type get_allocator() const + { + return allocator_type(); + } + + // 28.10.7, swap: + // [7.10.6] swap + void swap(match_results &that) + { + const match_results tmp(that); + that = *this; + *this = tmp; + } + +public: // For internal. + + typedef match_results match_results_type; + typedef typename match_results_type::size_type match_results_size_type; + typedef typename regex_internal::re_search_state search_state_type; + + search_state_type sstate_; + + void clear_() + { + ready_ = false; + sub_matches_.clear(); +// prefix_.matched = false; +// suffix_.matched = false; +#if !defined(SRELL_NO_NAMEDCAPTURE) + gnames_.clear(); +#endif + } + +// template +#if !defined(SRELL_NO_NAMEDCAPTURE) + bool set_match_results_(const regex_internal::groupname_mapper &gnames) +#else + bool set_match_results_() +#endif + { + sub_matches_.resize(sstate_.bracket.size()); +// value_type &m0 = sub_matches_[0]; + + sub_matches_[0].matched = true; + + for (regex_internal::uint_l32 i = 1; i < static_cast(sstate_.bracket.size()); ++i) + { + const typename search_state_type::submatch_type &br = sstate_.bracket[i]; + value_type &sm = sub_matches_[i]; + + sm.first = br.core.open_at; + sm.second = br.core.close_at; + sm.matched = br.counter != 0; + } + + base_ = sstate_.lblim; + prefix_.first = sstate_.srchbegin; + prefix_.second = sub_matches_[0].first = sstate_.bracket[0].core.open_at; + suffix_.first = sub_matches_[0].second = sstate_.nth.in_string; + suffix_.second = sstate_.srchend; + + prefix_.matched = prefix_.first != prefix_.second; // The spec says prefix().first != prefix().second + suffix_.matched = suffix_.first != suffix_.second; // The spec says suffix().first != suffix().second + +#if !defined(SRELL_NO_NAMEDCAPTURE) + gnames_ = gnames; +#endif + ready_ = true; + return true; + } + + bool set_match_results_bmh_() + { + sub_matches_.resize(1); +// value_type &m0 = sub_matches_[0]; + + sub_matches_[0].matched = true; + + base_ = sstate_.lblim; + prefix_.first = sstate_.srchbegin; + prefix_.second = sub_matches_[0].first = sstate_.nth.in_string; + suffix_.first = sub_matches_[0].second = sstate_.nextpos; + suffix_.second = sstate_.srchend; + + prefix_.matched = prefix_.first != prefix_.second; + suffix_.matched = suffix_.first != suffix_.second; + + ready_ = true; + return true; + } + + void set_prefix_first_(const BidirectionalIterator pf) + { + prefix_.first = pf; + } + + bool mark_as_failed_() + { + ready_ = true; // 30.11.2 and 3: Postconditions: m.ready() == true in all cases. + return false; + } + +private: + +#if !defined(SRELL_NO_NAMEDCAPTURE) + + regex_internal::uint_l32 lookup_backref_number(const char_type *begin, const char_type *const end) const + { + typename regex_internal::groupname_mapper::gname_string key(end - begin); + + for (std::size_t i = 0; begin != end; ++begin, ++i) + key[i] = *begin; + + return gnames_[key]; + } + + regex_internal::uint_l32 lookup_and_check_backref_number(const char_type *begin, const char_type *const end) const + { + const regex_internal::uint_l32 backrefno = lookup_backref_number(begin, end); + + if (backrefno == regex_internal::groupname_mapper::notfound) + throw regex_error(regex_constants::error_backref); + + return backrefno; + } + +#endif // !defined(SRELL_NO_NAMEDCAPTURE) + +public: // For debug. + + template + void print_sub_matches(const BasicRegexT &, const int) const; + void print_addresses(const value_type &, const char *const) const; + +private: + + typedef std::vector sub_match_array; + + bool ready_; + sub_match_array sub_matches_; + value_type prefix_; + value_type suffix_; + BidirectionalIterator base_; + +#if !defined(SRELL_NO_NAMEDCAPTURE) + regex_internal::groupname_mapper gnames_; +#endif +#if defined(SRELL_STRICT_IMPL) + value_type unmatched_; +#endif +}; + +// 28.10.7, match_results swap: +// [7.10.6] match_results swap +template +void swap( + match_results &m1, + match_results &m2 +) +{ + m1.swap(m2); +} + +// 28.10.8, match_results comparisons +template +bool operator==( + const match_results &m1, + const match_results &m2 +) +{ + if (!m1.ready() && !m2.ready()) + return true; + + if (m1.ready() && m2.ready()) + { + if (m1.empty() && m2.empty()) + return true; + + if (!m1.empty() && !m2.empty()) + { + return m1.prefix() == m2.prefix() && m1.size() == m2.size() && std::equal(m1.begin(), m1.end(), m2.begin()) && m1.suffix() == m2.suffix(); + } + } + return false; +} + +template +bool operator!=( + const match_results &m1, + const match_results &m2 +) +{ + return !(m1 == m2); +} + +typedef match_results cmatch; +typedef match_results wcmatch; +typedef match_results smatch; +typedef match_results wsmatch; + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + typedef match_results u16cmatch; + typedef match_results u32cmatch; + typedef match_results u16smatch; + typedef match_results u32smatch; +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) + typedef match_results u8cmatch; +#endif +#if defined(SRELL_CPP20_CHAR8_ENABLED) && SRELL_CPP20_CHAR8_ENABLED >= 2 + typedef match_results u8smatch; +#endif + +typedef cmatch u8ccmatch; +typedef smatch u8csmatch; +#if !defined(SRELL_CPP20_CHAR8_ENABLED) + typedef u8ccmatch u8cmatch; +#endif +#if !defined(SRELL_CPP20_CHAR8_ENABLED) || SRELL_CPP20_CHAR8_ENABLED < 2 + typedef u8csmatch u8smatch; +#endif + +#if defined(WCHAR_MAX) + #if WCHAR_MAX >= 0x10ffff + typedef wcmatch u32wcmatch; + typedef wsmatch u32wsmatch; + typedef u32wcmatch u1632wcmatch; + typedef u32wsmatch u1632wsmatch; + #elif WCHAR_MAX >= 0xffff + typedef wcmatch u16wcmatch; + typedef wsmatch u16wsmatch; + typedef u16wcmatch u1632wcmatch; + typedef u16wsmatch u1632wsmatch; + #endif +#endif + +// ... "regex_match_results.hpp"] +// ["rei_algorithm.hpp" ... + + namespace regex_internal + { + +template +class regex_object : public re_compiler +{ +public: + + template + bool search + ( + const BidirectionalIterator begin, + const BidirectionalIterator end, + const BidirectionalIterator lookbehind_limit, + match_results &results, + const regex_constants::match_flag_type flags /* = regex_constants::match_default */ + ) const + { + results.clear_(); + +// results.sstate_.template init(begin, end, lookbehind_limit, flags); + results.sstate_.init(begin, end, lookbehind_limit, flags); + + if (results.sstate_.match_continuous_flag()) + { + if (this->NFA_states.size()) + { + results.sstate_.set_entrypoint(this->NFA_states[0].next_state2); + goto DO_SEARCH; + } + } + else +#if !defined(SRELLDBG_NO_BMH) + if (this->bmdata) + { +#if !defined(SRELL_NO_ICASE) + if (!this->is_ricase() ? this->bmdata->do_casesensitivesearch(results.sstate_, typename std::iterator_traits::iterator_category()) : this->bmdata->do_icasesearch(results.sstate_, typename std::iterator_traits::iterator_category())) +#else + if (this->bmdata->do_casesensitivesearch(results.sstate_, typename std::iterator_traits::iterator_category())) +#endif + return results.set_match_results_bmh_(); + } + else +#endif + if (this->NFA_states.size()) + { + results.sstate_.set_entrypoint(this->NFA_states[0].next_state1); + + DO_SEARCH: + results.sstate_.init_for_automaton(this->number_of_brackets, this->number_of_counters, this->number_of_repeats); + +#if !defined(SRELL_NO_ICASE) + if (!this->is_ricase() ? do_search(results) : do_search(results)) +#else + if (do_search(results)) +#endif + { +#if !defined(SRELL_NO_NAMEDCAPTURE) + return results.set_match_results_(this->namedcaptures); +#else + return results.set_match_results_(); +#endif + } + } + return results.mark_as_failed_(); + } + +private: + + typedef typename traits::utf_traits utf_traits; + + template + bool do_search + ( + match_results &results + ) const + { + re_search_state &sstate = results.sstate_; + const BidirectionalIterator searchend = sstate.nth.in_string; + + for (;;) + { + const bool final = sstate.nextpos == searchend; + + sstate.nth.in_string = sstate.nextpos; + + if (!final) + { + +#ifdef SRELLDBG_NO_1STCHRCLS + utf_traits::codepoint_inc(sstate.nextpos, sstate.srchend); +#else + { + #if !defined(SRELLDBG_NO_BITSET) + if (!this->firstchar_class_bs.test((*sstate.nextpos++) & utf_traits::bitsetmask)) + #else + const uchar32 firstchar = utf_traits::codepoint_inc(sstate.nextpos, sstate.srchend); + + if (!this->firstchar_class.is_included(firstchar)) + #endif + continue; + } +#endif + } + // Even when final == true, we have to try for such expressions + // as "" =~ /^$/ or "..." =~ /$/. + +#if defined(SRELL_NO_LIMIT_COUNTER) + sstate.reset(/* first */); +#else + sstate.reset(/* first, */ this->limit_counter); +#endif + if (run_automaton(sstate /* , false */)) + return true; + + if (final) + break; + } + return false; + } + + template + struct casehelper + { + static T canonicalise(const T t) + { + return t; + } + }; + + template + struct casehelper + { + static T canonicalise(const T t) + { + return unicode_case_folding::do_casefolding(t); + } + }; + + template + bool run_automaton + ( +// match_results &results, + re_search_state &sstate +// , const bool is_recursive /* = false */ + ) const + { + typedef casehelper casehelper_type; + typedef typename re_object_core::state_type state_type; + typedef re_search_state ss_type; +// typedef typename ss_type::search_core_state scstate_type; + typedef typename ss_type::submatch_type submatch_type; + typedef typename ss_type::submatchcore_type submatchcore_type; + typedef typename ss_type::counter_type counter_type; + typedef typename ss_type::position_type position_type; + bool is_matched; + + goto START; + + JUDGE: + if (is_matched) + { + MATCHED: + sstate.nth.in_NFA_states = sstate.nth.in_NFA_states->next_state1; + } + else + { + NOT_MATCHED: + +#if !defined(SRELL_NO_LIMIT_COUNTER) + if (--sstate.failure_counter) + { +#endif + if (sstate.bt_stack.size() > sstate.btstack_size) + { + sstate.nth = sstate.bt_stack.back(); + sstate.bt_stack.pop_back(); + + sstate.nth.in_NFA_states = sstate.nth.in_NFA_states->next_state2; +// continue; + } + else + { + return false; + } +#if !defined(SRELL_NO_LIMIT_COUNTER) + } + else + throw regex_error(regex_constants::error_complexity); +#endif + } + +// START: + for (;;) + { + START: + const state_type ¤t_NFA = *sstate.nth.in_NFA_states; + + switch (current_NFA.type) + { + case st_character: + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (!reverse) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + if (!sstate.is_at_srchend()) + { +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + const BidirectionalIterator prevpos = sstate.nth.in_string; +#endif + const uchar32 uchar = casehelper_type::canonicalise(utf_traits::codepoint_inc(sstate.nth.in_string, sstate.srchend)); + RETRY_CF: + const state_type ¤t_NFA2 = *sstate.nth.in_NFA_states; + + if (current_NFA2.character == uchar) + goto MATCHED; + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + if (current_NFA2.next_state2) + { + sstate.nth.in_NFA_states = current_NFA2.next_state2; + + if (sstate.nth.in_NFA_states->type == st_character) + goto RETRY_CF; + + sstate.nth.in_string = prevpos; + continue; + } +#endif + } +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + else if (current_NFA.next_state2) + { + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + } +#endif + } + else // reverse == true. + { + if (!sstate.is_at_lookbehindlimit()) + { +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + const BidirectionalIterator prevpos = sstate.nth.in_string; +#endif + const uchar32 uchar = casehelper_type::canonicalise(utf_traits::dec_codepoint(sstate.nth.in_string, sstate.lblim)); + RETRY_CB: + const state_type ¤t_NFA2 = *sstate.nth.in_NFA_states; + + if (current_NFA2.character == uchar) + goto MATCHED; + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + if (current_NFA2.next_state2) + { + sstate.nth.in_NFA_states = current_NFA2.next_state2; + + if (sstate.nth.in_NFA_states->type == st_character) + goto RETRY_CB; + + sstate.nth.in_string = prevpos; + continue; + } +#endif + } +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + else if (current_NFA.next_state2) + { + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + } +#endif + } + goto NOT_MATCHED; + + case st_character_class: + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (!reverse) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + if (!sstate.is_at_srchend()) + { +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + const BidirectionalIterator prevpos = sstate.nth.in_string; +#endif + const uchar32 uchar = utf_traits::codepoint_inc(sstate.nth.in_string, sstate.srchend); +// RETRY_CCF: + const state_type ¤t_NFA2 = *sstate.nth.in_NFA_states; + +#if !defined(SRELLDBG_NO_CCPOS) + if (this->character_class.is_included(current_NFA2.quantifier.offset, current_NFA2.quantifier.length, uchar)) +#else + if (this->character_class.is_included(current_NFA2.number, uchar)) +#endif + goto MATCHED; + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + if (current_NFA2.next_state2) + { + sstate.nth.in_NFA_states = current_NFA2.next_state2; + +// if (sstate.nth.in_NFA_states->type == st_character_class) +// goto RETRY_CCF; + + sstate.nth.in_string = prevpos; + continue; + } +#endif + } +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + else if (current_NFA.next_state2) + { + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + } +#endif + } + else // reverse == true. + { + if (!sstate.is_at_lookbehindlimit()) + { +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + const BidirectionalIterator prevpos = sstate.nth.in_string; +#endif + const uchar32 uchar = utf_traits::dec_codepoint(sstate.nth.in_string, sstate.lblim); +// RETRY_CCB: + const state_type ¤t_NFA2 = *sstate.nth.in_NFA_states; + +#if !defined(SRELLDBG_NO_CCPOS) + if (this->character_class.is_included(current_NFA2.quantifier.offset, current_NFA2.quantifier.length, uchar)) +#else + if (this->character_class.is_included(current_NFA2.number, uchar)) +#endif + goto MATCHED; + +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + if (current_NFA2.next_state2) + { + sstate.nth.in_NFA_states = current_NFA2.next_state2; + +// if (sstate.nth.in_NFA_states->type == st_character_class) +// goto RETRY_CCB; + + sstate.nth.in_string = prevpos; + continue; + } +#endif + } +#if !defined(SRELLDBG_NO_ASTERISK_OPT) + else if (current_NFA.next_state2) + { + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + } +#endif + } + goto NOT_MATCHED; + + case st_epsilon: + +#if defined(SRELLDBG_NO_SKIP_EPSILON) + if (current_NFA.next_state2) +#endif + { + sstate.bt_stack.push_back(sstate.nth); // sstate.push(); + } + + sstate.nth.in_NFA_states = current_NFA.next_state1; + continue; + + default: + switch (current_NFA.type) + { + + case st_check_counter: + { + const uint_l32 counter = sstate.counter[current_NFA.number]; + + if (counter < current_NFA.quantifier.atmost) + { + ++sstate.counter[current_NFA.number]; + + LOOP_WITHOUT_INCREMENT: + + if (counter >= current_NFA.quantifier.atleast) + { + sstate.bt_stack.push_back(sstate.nth); + sstate.nth.in_NFA_states = current_NFA.next_state1; + } + else + { + sstate.nth.in_NFA_states + = current_NFA.quantifier.is_greedy + ? current_NFA.next_state1 + : current_NFA.next_state2; + } + } + else + { + if (current_NFA.quantifier.is_infinity()) + goto LOOP_WITHOUT_INCREMENT; + + sstate.nth.in_NFA_states + = current_NFA.quantifier.is_greedy + ? current_NFA.next_state2 + : current_NFA.next_state1; + } + } + continue; + + case st_decrement_counter: + --sstate.counter[current_NFA.number]; + goto NOT_MATCHED; + + case st_save_and_reset_counter: + { + counter_type &c = sstate.counter[current_NFA.number]; + + sstate.counter_stack.push_back(c); + sstate.bt_stack.push_back(sstate.nth); + c = 0; + } + goto MATCHED; + + case st_restore_counter: + sstate.counter[current_NFA.number] = sstate.counter_stack.back(); + sstate.counter_stack.pop_back(); + goto NOT_MATCHED; + + case st_roundbracket_open: // '(': + { + submatch_type &bracket = sstate.bracket[current_NFA.number]; + + sstate.capture_stack.push_back(bracket.core); + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (!reverse) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + bracket.core.open_at = sstate.nth.in_string; + } + else + bracket.core.close_at = sstate.nth.in_string; + + ++bracket.counter; + + for (uint_l32 brno = current_NFA.quantifier.atleast; brno <= current_NFA.quantifier.atmost; ++brno) + { + submatch_type &inner_bracket = sstate.bracket[brno]; + + sstate.capture_stack.push_back(inner_bracket.core); + sstate.counter_stack.push_back(inner_bracket.counter); + inner_bracket.core.open_at = inner_bracket.core.close_at = sstate.srchend; + inner_bracket.counter = 0; + // ECMAScript spec (3-5.1) 15.10.2.5, NOTE 3. + // ECMAScript 2018 (ES9) 21.2.2.5.1, Note 3. + } + + sstate.bt_stack.push_back(sstate.nth); + } + goto MATCHED; + + case st_roundbracket_pop: // '/': + { + for (uint_l32 brno = current_NFA.quantifier.atmost; brno >= current_NFA.quantifier.atleast; --brno) + { + submatch_type &inner_bracket = sstate.bracket[brno]; + + inner_bracket.counter = sstate.counter_stack.back(); + inner_bracket.core = sstate.capture_stack.back(); + sstate.counter_stack.pop_back(); + sstate.capture_stack.pop_back(); + } + + submatch_type &bracket = sstate.bracket[current_NFA.number]; + + bracket.core = sstate.capture_stack.back(); + sstate.capture_stack.pop_back(); + --bracket.counter; + } + goto NOT_MATCHED; + + case st_roundbracket_close: // ')': + { + submatch_type &bracket = sstate.bracket[current_NFA.number]; + submatchcore_type &brc = bracket.core; + + if ((!reverse ? brc.open_at : brc.close_at) != sstate.nth.in_string) + { + sstate.nth.in_NFA_states = current_NFA.next_state1; + } + else // 0 width match, breaks from the loop. + { + if (current_NFA.next_state1->type != st_check_counter) + { + if (bracket.counter > 1) + goto NOT_MATCHED; // ECMAScript spec 15.10.2.5, note 4. + + sstate.nth.in_NFA_states = current_NFA.next_state2; + // Accepts 0 width match and exits. + } + else + { + // A pair with check_counter. + const counter_type counter = sstate.counter[current_NFA.next_state1->number]; + + if (counter > current_NFA.next_state1->quantifier.atleast) + goto NOT_MATCHED; // Takes a captured string in the previous loop. + + sstate.nth.in_NFA_states = current_NFA.next_state1; + // Accepts 0 width match and continues. + } + } +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (!reverse) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + brc.close_at = sstate.nth.in_string; + } + else // reverse == true. + { + brc.open_at = sstate.nth.in_string; + } + } + continue; + + case st_repeat_in_push: + { + position_type &r = sstate.repeat[current_NFA.number]; + + sstate.repeat_stack.push_back(r); + r = sstate.nth.in_string; + + for (uint_l32 brno = current_NFA.quantifier.atleast; brno <= current_NFA.quantifier.atmost; ++brno) + { + submatch_type &inner_bracket = sstate.bracket[brno]; + + sstate.capture_stack.push_back(inner_bracket.core); + sstate.counter_stack.push_back(inner_bracket.counter); + inner_bracket.core.open_at = inner_bracket.core.close_at = sstate.srchend; + inner_bracket.counter = 0; + // ECMAScript 2019 (ES10) 21.2.2.5.1, Note 3. + } + sstate.bt_stack.push_back(sstate.nth); + } + goto MATCHED; + + case st_repeat_in_pop: + for (uint_l32 brno = current_NFA.quantifier.atmost; brno >= current_NFA.quantifier.atleast; --brno) + { + submatch_type &inner_bracket = sstate.bracket[brno]; + + inner_bracket.counter = sstate.counter_stack.back(); + inner_bracket.core = sstate.capture_stack.back(); + sstate.counter_stack.pop_back(); + sstate.capture_stack.pop_back(); + } + + sstate.repeat[current_NFA.number] = sstate.repeat_stack.back(); + sstate.repeat_stack.pop_back(); + goto NOT_MATCHED; + + case st_check_0_width_repeat: + if (sstate.nth.in_string != sstate.repeat[current_NFA.number]) + goto MATCHED; + + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + + case st_backreference: // '\\': + { + const submatch_type &bracket = sstate.bracket[current_NFA.number]; + + if (!bracket.counter) // Undefined. + { + ESCAPE_FROM_ZERO_WIDTH_MATCH: + sstate.nth.in_NFA_states = current_NFA.next_state2; + continue; + } + else + { + const submatchcore_type &brc = bracket.core; + + if (brc.open_at == brc.close_at) + { + goto ESCAPE_FROM_ZERO_WIDTH_MATCH; + } + else + { +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(push) +#pragma warning(disable:4127) +#endif + if (!reverse) +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(pop) +#endif + { + for (BidirectionalIterator backrefpos = brc.open_at; backrefpos != brc.close_at;) + { + if (!sstate.is_at_srchend()) + { + const uchar32 uchartxt = utf_traits::codepoint_inc(sstate.nth.in_string, sstate.srchend); + const uchar32 ucharref = utf_traits::codepoint_inc(backrefpos, brc.close_at); + + if (casehelper_type::canonicalise(uchartxt) == casehelper_type::canonicalise(ucharref)) + continue; + } + goto NOT_MATCHED; + } + } + else // reverse == true. + { + for (BidirectionalIterator backrefpos = brc.close_at; backrefpos != brc.open_at;) + { + if (!sstate.is_at_lookbehindlimit()) + { + const uchar32 uchartxt = utf_traits::dec_codepoint(sstate.nth.in_string, sstate.lblim); + const uchar32 ucharref = utf_traits::dec_codepoint(backrefpos, brc.open_at); + + if (casehelper_type::canonicalise(uchartxt) == casehelper_type::canonicalise(ucharref)) + continue; + } + goto NOT_MATCHED; + } + } + } + } + } + goto MATCHED; + + case st_lookaround_open: + { + for (uint_l32 i = 1; i < this->number_of_brackets; ++i) + { + const submatch_type &sm = sstate.bracket[i]; + sstate.capture_stack.push_back(sm.core); + sstate.counter_stack.push_back(sm.counter); + } + + for (uint_l32 i = 0; i < this->number_of_counters; ++i) + sstate.counter_stack.push_back(sstate.counter[i]); + + for (uint_l32 i = 0; i < this->number_of_repeats; ++i) + sstate.repeat_stack.push_back(sstate.repeat[i]); + + const typename ss_type::bottom_state backup_bottom(sstate.btstack_size, sstate.capture_stack.size(), sstate.counter_stack.size(), sstate.repeat_stack.size()); + const BidirectionalIterator orgpos = sstate.nth.in_string; + + sstate.btstack_size = sstate.bt_stack.size(); + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) && !defined(SRELLDBG_NO_MPREWINDER) + if (current_NFA.quantifier.atleast == 2) + { + sstate.repeat_stack.push_back(sstate.lblim); + sstate.lblim = sstate.srchbegin; + } +#endif + +#if defined(SRELL_FIXEDWIDTHLOOKBEHIND) + +// if (current_NFA.reverse) + { + for (uint_l32 i = 0; i < current_NFA.quantifier.atleast; ++i) + { + if (!sstate.is_at_lookbehindlimit()) + { + utf_traits::dec_codepoint(sstate.nth.in_string, sstate.lblim); + continue; + } + is_matched = false; + goto AFTER_LOOKAROUND; + } + } +#endif + sstate.nth.in_NFA_states = current_NFA.next_state2; + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) + is_matched = current_NFA.quantifier.atleast == 0 ? run_automaton(sstate /* , true */) : run_automaton(sstate /* , true */); +#else + is_matched = run_automaton(sstate /* , true */); +#endif + +#if defined(SRELL_FIXEDWIDTHLOOKBEHIND) + AFTER_LOOKAROUND: +#endif + { + +#if !defined(SRELL_FIXEDWIDTHLOOKBEHIND) && !defined(SRELLDBG_NO_MPREWINDER) + if (current_NFA.quantifier.atleast == 2) + { + sstate.lblim = sstate.repeat_stack[backup_bottom.repeatstack_size]; + if (is_matched) + sstate.bracket[0].core.open_at = sstate.nth.in_string; + } +#endif + +#if defined(SRELL_ENABLE_GT) + if (current_NFA.character != meta_char::mc_gt) // '>' +#endif + { + sstate.nth.in_string = orgpos; + } + sstate.bt_stack.resize(sstate.btstack_size); + + sstate.btstack_size = backup_bottom.btstack_size; + sstate.capture_stack.resize(backup_bottom.capturestack_size); + sstate.counter_stack.resize(backup_bottom.counterstack_size); + sstate.repeat_stack.resize(backup_bottom.repeatstack_size); + + is_matched ^= current_NFA.is_not; + } + } + if (is_matched) + { + sstate.nth.in_NFA_states = current_NFA.next_state1; + continue; + } + +// case st_lookaround_pop: + for (uint_l32 i = this->number_of_repeats; i;) + { + sstate.repeat[--i] = sstate.repeat_stack.back(); + sstate.repeat_stack.pop_back(); + } + + for (uint_l32 i = this->number_of_counters; i;) + { + sstate.counter[--i] = sstate.counter_stack.back(); + sstate.counter_stack.pop_back(); + } + + for (uint_l32 i = this->number_of_brackets; i > 1;) + { + submatch_type &sm = sstate.bracket[--i]; + + sm.counter = sstate.counter_stack.back(); + sm.core = sstate.capture_stack.back(); + sstate.counter_stack.pop_back(); + sstate.capture_stack.pop_back(); + } + goto NOT_MATCHED; + + case st_bol: // '^': + if (sstate.is_at_lookbehindlimit() && !sstate.match_prev_avail_flag()) + { + if (!sstate.match_not_bol_flag()) + goto MATCHED; + } + // !sstate.is_at_lookbehindlimit() || sstate.match_prev_avail_flag() + else if (current_NFA.multiline) + { + const uchar32 prevchar = utf_traits::prevcodepoint(sstate.nth.in_string, sstate.lblim); + + if (this->character_class.is_included(re_character_class::newline, prevchar)) + goto MATCHED; + } + goto NOT_MATCHED; + + case st_eol: // '$': + if (sstate.is_at_srchend()) + { + if (!sstate.match_not_eol_flag()) + goto MATCHED; + } + else if (current_NFA.multiline) + { + const uchar32 nextchar = utf_traits::codepoint(sstate.nth.in_string, sstate.srchend); + + if (this->character_class.is_included(re_character_class::newline, nextchar)) + goto MATCHED; + } + goto NOT_MATCHED; + + case st_boundary: // '\b' '\B' + is_matched = current_NFA.is_not; +// is_matched = current_NFA.character == char_alnum::ch_B; + + // First, suppose the previous character is not \w but \W. + + if (sstate.is_at_srchend()) + { + if (sstate.match_not_eow_flag()) + is_matched = !is_matched; + } + else if (this->character_class.is_included(current_NFA.number, utf_traits::codepoint(sstate.nth.in_string, sstate.srchend))) + { + is_matched = !is_matched; + } + // \W/last \w + // \b false true + // \B true false + + // Second, if the actual previous character is \w, flip is_matched. + + if (sstate.is_at_lookbehindlimit() && !sstate.match_prev_avail_flag()) + { + if (sstate.match_not_bow_flag()) + is_matched = !is_matched; + } + // !sstate.is_at_lookbehindlimit() || sstate.match_prev_avail_flag() + else if (this->character_class.is_included(current_NFA.number, utf_traits::prevcodepoint(sstate.nth.in_string, sstate.lblim))) + { + is_matched = !is_matched; + } + // \b \B + // pre cur \W/last \w pre cur \W/last \w + // \W/base false true \W/base true false + // \w true false \w false true + + goto JUDGE; + + case st_success: // == lookaround_close. +// if (is_recursive) + if (sstate.btstack_size) + return true; + + if + ( + (!sstate.match_not_null_flag() || !sstate.is_null()) + && + (!sstate.match_match_flag() || sstate.is_at_srchend()) + ) + return true; + + goto NOT_MATCHED; + +#if !defined(SRELLDBG_NO_NEXTPOS_OPT) + case st_move_nextpos: +#if !defined(SRELLDBG_NO_1STCHRCLS) && !defined(SRELLDBG_NO_BITSET) + sstate.nextpos = sstate.nth.in_string; + if (!sstate.is_at_srchend()) + ++sstate.nextpos; +#else // defined(SRELLDBG_NO_1STCHRCLS) || defined(SRELLDBG_NO_BITSET) + if (sstate.nth.in_string != sstate.bracket[0].core.open_at) + { + sstate.nextpos = sstate.nth.in_string; + if (!sstate.is_at_srchend()) + utf_traits::codepoint_inc(sstate.nextpos, sstate.srchend); + } +#endif + goto MATCHED; +#endif + + default: + // Reaching here means that this->NFA_states is corrupted. + throw regex_error(regex_constants::error_internal); + + } + } + } + } +}; +// regex_object + + } // namespace regex_internal + +// ... "rei_algorithm.hpp"] +// ["basic_regex.hpp" ... + +// 28.8, class template basic_regex: +template > +class basic_regex : public regex_internal::regex_object +{ +public: + + // Types: + typedef charT value_type; + typedef traits traits_type; + typedef typename traits::string_type string_type; + typedef regex_constants::syntax_option_type flag_type; + typedef typename traits::locale_type locale_type; + + // 28.8.1, constants: + // [7.8.1] constants + static const regex_constants::syntax_option_type icase = regex_constants::icase; + static const regex_constants::syntax_option_type nosubs = regex_constants::nosubs; + static const regex_constants::syntax_option_type optimize = regex_constants::optimize; + static const regex_constants::syntax_option_type collate = regex_constants::collate; + static const regex_constants::syntax_option_type ECMAScript = regex_constants::ECMAScript; + static const regex_constants::syntax_option_type basic = regex_constants::basic; + static const regex_constants::syntax_option_type extended = regex_constants::extended; + static const regex_constants::syntax_option_type awk = regex_constants::awk; + static const regex_constants::syntax_option_type grep = regex_constants::grep; + static const regex_constants::syntax_option_type egrep = regex_constants::egrep; + static const regex_constants::syntax_option_type multiline = regex_constants::multiline; + + static const regex_constants::syntax_option_type dotall = regex_constants::dotall; + + // 28.8.2, construct/copy/destroy: + // [7.8.2] construct/copy/destroy + basic_regex() + { + } + + explicit basic_regex(const charT *const p, const flag_type f = regex_constants::ECMAScript) + { + assign(p, p + std::char_traits::length(p), f); + } + + basic_regex(const charT *const p, const std::size_t len, const flag_type f = regex_constants::ECMAScript) + { + assign(p, p + len, f); + } + + basic_regex(const basic_regex &e) + { + assign(e); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + basic_regex(basic_regex &&e) SRELL_NOEXCEPT + { + assign(std::move(e)); + } +#endif + + template + explicit basic_regex(const std::basic_string &p, const flag_type f = regex_constants::ECMAScript) + { + assign(p, f); + } + + template + basic_regex(ForwardIterator first, ForwardIterator last, const flag_type f = regex_constants::ECMAScript) + { + assign(first, last, f); + } + +#if defined(SRELL_CPP11_INITIALIZER_LIST_ENABLED) + basic_regex(std::initializer_list il, const flag_type f = regex_constants::ECMAScript) + { + assign(il, f); + } +#endif + +// ~basic_regex(); + + basic_regex &operator=(const basic_regex &right) + { + return assign(right); + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + basic_regex &operator=(basic_regex &&e) SRELL_NOEXCEPT + { + return assign(std::move(e)); + } +#endif + + basic_regex &operator=(const charT *const ptr) + { + return assign(ptr); + } + +#if defined(SRELL_CPP11_INITIALIZER_LIST_ENABLED) + basic_regex &operator=(std::initializer_list il) + { + return assign(il.begin(), il.end()); + } +#endif + + template + basic_regex &operator=(const std::basic_string &p) + { + return assign(p); + } + + // 28.8.3, assign: + // [7.8.3] assign + basic_regex &assign(const basic_regex &right) + { + regex_internal::re_object_core::operator=(right); + return *this; + } + +#if defined(SRELL_CPP11_MOVE_ENABLED) + basic_regex &assign(basic_regex &&right) SRELL_NOEXCEPT + { + regex_internal::re_object_core::operator=(std::move(right)); + return *this; + } +#endif + + basic_regex &assign(const charT *const ptr, const flag_type f = regex_constants::ECMAScript) + { + return assign(ptr, ptr + std::char_traits::length(ptr), f); + } + + basic_regex &assign(const charT *const p, std::size_t len, const flag_type f = regex_constants::ECMAScript) + { + return assign(p, p + len, f); + } + + template + basic_regex &assign(const std::basic_string &s, const flag_type f = regex_constants::ECMAScript) + { + return assign(s.c_str(), s.c_str() + s.size(), f); + } + + template + basic_regex &assign(InputIterator first, InputIterator last, const flag_type f = regex_constants::ECMAScript) + { +#if defined(SRELL_STRICT_IMPL) + basic_regex tmp; + tmp.compile(first, last, f); + tmp.swap(*this); +#else + this->compile(first, last, f); +#endif + return *this; + } + +#if defined(SRELL_CPP11_INITIALIZER_LIST_ENABLED) + basic_regex &assign(std::initializer_list il, const flag_type f = regex_constants::ECMAScript) + { + return assign(il.begin(), il.end(), f); + } +#endif + + // 28.8.4, const operations: + // [7.8.4] const operations + unsigned mark_count() const + { + return this->number_of_brackets - 1; + } + + flag_type flags() const + { + return this->soflags; + } + + // 28.8.5, locale: + // [7.8.5] locale + locale_type imbue(locale_type loc) + { + return this->traits_inst.imbue(loc); + } + + locale_type getloc() const + { + return this->traits_inst.getloc(); + } + + // 28.8.6, swap: + // [7.8.6] swap + void swap(basic_regex &e) + { + regex_internal::re_object_core::swap(e); + } +}; + +// 28.8.6, basic_regex swap: +template +void swap(basic_regex &lhs, basic_regex &rhs) +{ + lhs.swap(rhs); +} + +typedef basic_regex regex; +typedef basic_regex wregex; + +#if defined(WCHAR_MAX) + #if WCHAR_MAX >= 0x10ffff + typedef wregex u32wregex; + typedef u32wregex u1632wregex; + #elif WCHAR_MAX >= 0xffff + typedef basic_regex > u16wregex; + typedef u16wregex u1632wregex; + #endif +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) + typedef basic_regex u8regex; +#endif + +typedef basic_regex > u8cregex; +#if !defined(SRELL_CPP20_CHAR8_ENABLED) + typedef u8cregex u8regex; +#endif + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + typedef basic_regex u16regex; + typedef basic_regex u32regex; +#endif + +// ... "basic_regex.hpp"] +// ["regex_iterator.hpp" ... + +// 28.12.1, class template regex_iterator: +template ::value_type, class traits = regex_traits > +class regex_iterator +{ +public: + + typedef basic_regex regex_type; + typedef match_results value_type; + typedef std::ptrdiff_t difference_type; + typedef const value_type * pointer; + typedef const value_type & reference; + typedef std::forward_iterator_tag iterator_category; + + regex_iterator() + { + // 28.12.1.1: Constructs an end-of-sequence iterator. + } + + regex_iterator( + const BidirectionalIterator a, + const BidirectionalIterator b, + const regex_type &re, + const regex_constants::match_flag_type m = regex_constants::match_default) + : begin(a), end(b), pregex(&re), flags(m) + { + regex_search(begin, end, begin, match, *pregex, flags); + // 28.12.1.1: If this call returns false the constructor + // sets *this to the end-of-sequence iterator. + } + + regex_iterator(const regex_iterator &that) + { + operator=(that); + } + + regex_iterator &operator=(const regex_iterator &that) + { + if (this != &that) + { + this->begin = that.begin; + this->end = that.end; + this->pregex = that.pregex; + this->flags = that.flags; + this->match = that.match; + } + return *this; + } + + bool operator==(const regex_iterator &right) const + { + // It is probably safe to assume that match.size() == 0 means + // end-of-sequence, because it happens only when 1) never tried + // regex_search, or 2) regex_search returned false. + + if (this->match.size() == 0 || right.match.size() == 0) + return this->match.size() == right.match.size(); + + return + this->begin == right.begin + && + this->end == right.end + && + this->pregex == right.pregex + && + this->flags == right.flags + && + this->match[0] == right.match[0]; + } + + bool operator!=(const regex_iterator &right) const + { + return !(*this == right); + } + + const value_type &operator*() const + { + return match; + } + + const value_type *operator->() const + { + return &match; + } + + regex_iterator &operator++() + { + if (this->match.size()) + { + BidirectionalIterator start = match[0].second; + + if (match[0].first == start) // The iterator holds a 0-length match. + { + if (start == end) + { + match.clear_(); + // 28.12.1.4.2: If the iterator holds a zero-length match and + // start == end the operator sets *this to the end-ofsequence + // iterator and returns *this. + } + else + { + // 28.12.1.4.3: Otherwise, if the iterator holds a zero-length match + // the operator calls regex_search(start, end, match, *pregex, flags + // | regex_constants::match_not_null | regex_constants::match_continuous). + // If the call returns true the operator returns *this. [Cont...] + + if (!regex_search(start, end, begin, match, *pregex, flags | regex_constants::match_not_null | regex_constants::match_continuous)) + { + const BidirectionalIterator prevend = start; + + // [...Cont] Otherwise the operator increments start and continues + // as if the most recent match was not a zero-length match. +// ++start; + utf_traits::codepoint_inc(start, end); + + flags |= regex_constants::match_prev_avail; + + if (regex_search(start, end, begin, match, *pregex, flags)) + { + // 28.12.1.4.5-6: In all cases in which the call to regex_search + // returns true, match.prefix().first shall be equal to the previous + // value of match[0].second, ... match[i].position() shall return + // distance(begin, match[i].first). + // This means that match[i].position() gives the offset from the + // beginning of the target sequence, which is often not the same as + // the offset from the sequence passed in the call to regex_search. + // + // To satisfy this: + match.set_prefix_first_(prevend); + } + } + } + } + else + { + // 28.12.1.4.4: If the most recent match was not a zero-length match, + // the operator sets flags to flags | regex_constants::match_prev_avail + // and calls regex_search(start, end, match, *pregex, flags). [Cont...] + flags |= regex_constants::match_prev_avail; + + regex_search(start, end, begin, match, *pregex, flags); + // [...Cont] If the call returns false the iterator sets *this to + // the end-of-sequence iterator. The iterator then returns *this. + // + // 28.12.1.4.5-6: In all cases in which the call to regex_search + // returns true, match.prefix().first shall be equal to the previous + // value of match[0].second, ... match[i].position() shall return + // distance(begin, match[i].first). + // This means that match[i].position() gives the offset from the + // beginning of the target sequence, which is often not the same as + // the offset from the sequence passed in the call to regex_search. + // + // These should already be done in regex_search. + } + } + return *this; + } + + regex_iterator operator++(int) + { + const regex_iterator tmp = *this; + ++(*this); + return tmp; + } + +private: + + BidirectionalIterator begin; + BidirectionalIterator end; + const regex_type *pregex; + regex_constants::match_flag_type flags; + match_results match; + + typedef typename traits::utf_traits utf_traits; +}; + +typedef regex_iterator cregex_iterator; +typedef regex_iterator wcregex_iterator; +typedef regex_iterator sregex_iterator; +typedef regex_iterator wsregex_iterator; + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + typedef regex_iterator u16cregex_iterator; + typedef regex_iterator u32cregex_iterator; + typedef regex_iterator u16sregex_iterator; + typedef regex_iterator u32sregex_iterator; +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) + typedef regex_iterator u8cregex_iterator; +#endif +#if defined(SRELL_CPP20_CHAR8_ENABLED) && SRELL_CPP20_CHAR8_ENABLED >= 2 + typedef regex_iterator u8sregex_iterator; +#endif + +typedef regex_iterator::value_type, u8regex_traits::value_type> > u8ccregex_iterator; +typedef regex_iterator::value_type, u8regex_traits::value_type> > u8csregex_iterator; +#if !defined(SRELL_CPP20_CHAR8_ENABLED) + typedef u8ccregex_iterator u8cregex_iterator; +#endif +#if !defined(SRELL_CPP20_CHAR8_ENABLED) || SRELL_CPP20_CHAR8_ENABLED < 2 + typedef u8csregex_iterator u8sregex_iterator; +#endif + +#if defined(WCHAR_MAX) + #if WCHAR_MAX >= 0x10ffff + typedef wcregex_iterator u32wcregex_iterator; + typedef wsregex_iterator u32wsregex_iterator; + typedef u32wcregex_iterator u1632wcregex_iterator; + typedef u32wsregex_iterator u1632wsregex_iterator; + #elif WCHAR_MAX >= 0xffff + typedef regex_iterator::value_type, u16regex_traits::value_type> > u16wcregex_iterator; + typedef regex_iterator::value_type, u16regex_traits::value_type> > u16wsregex_iterator; + typedef u16wcregex_iterator u1632wcregex_iterator; + typedef u16wsregex_iterator u1632wsregex_iterator; + #endif +#endif + +// ... "regex_iterator.hpp"] +// ["regex_algorithm.hpp" ... + +// 28.11.2, function template regex_match: +// [7.11.2] Function template regex_match +template +bool regex_match( + const BidirectionalIterator first, + const BidirectionalIterator last, + match_results &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return e.search(first, last, first, m, flags | regex_constants::match_continuous | regex_constants::match_match_); +} + +template +bool regex_match( + const BidirectionalIterator first, + const BidirectionalIterator last, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ +// 4 Effects: Behaves "as if" by constructing an instance of +// match_results what, and then returning the +// result of regex_match(first, last, what, e, flags). + + match_results what; + + return regex_match(first, last, what, e, flags); +} + +template +bool regex_match( + const charT *const str, + match_results &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_match(str, str + std::char_traits::length(str), m, e, flags); +} + +template +bool regex_match( + const std::basic_string &s, + match_results::const_iterator, Allocator> &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_match(s.begin(), s.end(), m, e, flags); +} + +template +bool regex_match( + const charT *const str, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_match(str, str + std::char_traits::length(str), e, flags); +} + +template +bool regex_match( + const std::basic_string &s, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_match(s.begin(), s.end(), e, flags); +} + +template +bool regex_search( + const BidirectionalIterator first, + const BidirectionalIterator last, + const BidirectionalIterator lookbehind_limit, + match_results &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return e.search(first, last, lookbehind_limit, m, flags); +} + +template +bool regex_search( + const BidirectionalIterator first, + const BidirectionalIterator last, + const BidirectionalIterator lookbehind_limit, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ +// 6 Effects: Behaves "as if" by constructing an object what of type +// match_results and then returning the result of +// regex_search(first, last, what, e, flags). + + match_results what; + return regex_search(first, last, lookbehind_limit, what, e, flags); +} + +// 28.11.3, function template regex_search: +// 7.11.3 regex_search [tr.re.alg.search] +template +bool regex_search( + const BidirectionalIterator first, + const BidirectionalIterator last, + match_results &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return e.search(first, last, first, m, flags); +} + +template +bool regex_search( + const BidirectionalIterator first, + const BidirectionalIterator last, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ +// 6 Effects: Behaves "as if" by constructing an object what of type +// match_results and then returning the result of +// regex_search(first, last, what, e, flags). + + match_results what; + return regex_search(first, last, what, e, flags); +} + +template +bool regex_search( + const charT *const str, + match_results &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_search(str, str + std::char_traits::length(str), m, e, flags); +} + +template +bool regex_search( + const charT *const str, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_search(str, str + std::char_traits::length(str), e, flags); +} + +template +bool regex_search( + const std::basic_string &s, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_search(s.begin(), s.end(), e, flags); +} + +template +bool regex_search( + const std::basic_string &s, + match_results::const_iterator, Allocator> &m, + const basic_regex &e, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + return regex_search(s.begin(), s.end(), m, e, flags); +} + +// 28.11.4, function template regex_replace: +// [7.11.4] Function template regex_replace +template +OutputIterator regex_replace( + OutputIterator out, + const BidirectionalIterator first, + const BidirectionalIterator last, + const basic_regex &e, + const std::basic_string &fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + typedef regex_iterator iterator_type; + + const bool do_copy = !(flags & regex_constants::format_no_copy); + const iterator_type eos; + iterator_type i(first, last, e, flags); + typename iterator_type::value_type::value_type last_m_suffix; + + last_m_suffix.first = first; + last_m_suffix.second = last; + + for (; i != eos; ++i) + { + if (do_copy) + out = std::copy(i->prefix().first, i->prefix().second, out); + + out = i->format(out, fmt, flags); + last_m_suffix = i->suffix(); + + if (flags & regex_constants::format_first_only) + break; + } + + if (do_copy) + out = std::copy(last_m_suffix.first, last_m_suffix.second, out); + + return out; +} + +template +OutputIterator regex_replace( + OutputIterator out, + const BidirectionalIterator first, + const BidirectionalIterator last, + const basic_regex &e, + const charT *const fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + // Strictly speaking, this should be implemented as a version different + // from the above with changing the line i->format(out, fmt, flags) to + // i->format(out, fmt, fmt + char_traits::length(fmt), flags). + + const std::basic_string fs(fmt, fmt + std::char_traits::length(fmt)); + + return regex_replace(out, first, last, e, fs, flags); +} + +template +std::basic_string regex_replace( + const std::basic_string &s, + const basic_regex &e, + const std::basic_string &fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + std::basic_string result; + + regex_replace(std::back_inserter(result), s.begin(), s.end(), e, fmt, flags); + return result; +} + +template +std::basic_string regex_replace( + const std::basic_string &s, + const basic_regex &e, + const charT *const fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + std::basic_string result; + + regex_replace(std::back_inserter(result), s.begin(), s.end(), e, fmt, flags); + return result; +} + +template +std::basic_string regex_replace( + const charT *const s, + const basic_regex &e, + const std::basic_string &fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + std::basic_string result; + + regex_replace(std::back_inserter(result), s, s + std::char_traits::length(s), e, fmt, flags); + return result; +} + +template +std::basic_string regex_replace( + const charT *const s, + const basic_regex &e, + const charT *const fmt, + const regex_constants::match_flag_type flags = regex_constants::match_default +) +{ + std::basic_string result; + + regex_replace(std::back_inserter(result), s, s + std::char_traits::length(s), e, fmt, flags); + return result; +} + +// ... "regex_algorithm.hpp"] +// ["regex_token_iterator.hpp" ... + +// 28.12.2, class template regex_token_iterator: +template ::value_type, class traits = regex_traits > +class regex_token_iterator +{ +public: + + typedef basic_regex regex_type; + typedef sub_match value_type; + typedef std::ptrdiff_t difference_type; + typedef const value_type * pointer; + typedef const value_type & reference; + typedef std::forward_iterator_tag iterator_category; + + regex_token_iterator() : result(NULL) + { + // Constructs the end-of-sequence iterator. + } + + regex_token_iterator( + const BidirectionalIterator a, + const BidirectionalIterator b, + const regex_type &re, + int submatch = 0, + regex_constants::match_flag_type m = regex_constants::match_default + ) : position(a, b, re, m), result(NULL), subs(1, submatch) + { + post_constructor(a, b); + } + + regex_token_iterator( + const BidirectionalIterator a, + const BidirectionalIterator b, + const regex_type &re, + const std::vector &submatches, + regex_constants::match_flag_type m = regex_constants::match_default + ) : position(a, b, re, m), result(NULL), subs(submatches) + { + post_constructor(a, b); + } + +#if defined(SRELL_CPP11_INITIALIZER_LIST_ENABLED) + regex_token_iterator( + const BidirectionalIterator a, + const BidirectionalIterator b, + const regex_type &re, + std::initializer_list submatches, + regex_constants::match_flag_type m = regex_constants::match_default + ) : position(a, b, re, m), result(NULL), subs(submatches) + { + post_constructor(a, b); + } +#endif + + template // Was R in TR1. + regex_token_iterator( + const BidirectionalIterator a, + const BidirectionalIterator b, + const regex_type &re, + const int (&submatches)[N], + regex_constants::match_flag_type m = regex_constants::match_default + ) : position(a, b, re, m), result(NULL), subs(submatches, submatches + N) + { + post_constructor(a, b); + } + + regex_token_iterator(const regex_token_iterator &that) + { + operator=(that); + } + + regex_token_iterator &operator=(const regex_token_iterator &that) + { + if (this != &that) + { + this->position = that.position; + this->result = that.result; + this->suffix = that.suffix; + this->N = that.N; + this->subs = that.subs; + } + return *this; + } + + bool operator==(const regex_token_iterator &right) + { + if (this->result == NULL || right.result == NULL) + return this->result == right.result; + + if (this->result == &this->suffix || right.result == &right.suffix) + return this->suffix == right.suffix; + + return + this->position == right.position + && + this->N == right.N + && + this->subs == right.subs; + } + + bool operator!=(const regex_token_iterator &right) + { + return !(*this == right); + } + + const value_type &operator*() + { + return *result; + } + + const value_type *operator->() + { + return result; + } + + regex_token_iterator &operator++() + { + position_iterator prev(position); + position_iterator eos_iterator; + + if (result != NULL) + // To avoid inifinite loop. The specification does not require, though. + { + if (result == &suffix) + { + result = NULL; // end-of-sequence. + } + else + { + ++this->N; + for (;;) + { + if (this->N < subs.size()) + { + result = subs[this->N] != -1 ? &((*position)[subs[this->N]]) : &((*position).prefix()); + break; + } + + this->N = 0; + ++position; + + if (position == eos_iterator) + { + if (this->N < subs.size() && prev->suffix().length() && minus1_in_subs()) + { + suffix = prev->suffix(); + result = &suffix; + } + else + { + result = NULL; + } + break; + } + } + } + } + return *this; + } + + regex_token_iterator operator++(int) + { + const regex_token_iterator tmp(*this); + ++(*this); + return tmp; + } + +private: + + void post_constructor(const BidirectionalIterator a, const BidirectionalIterator b) + { + position_iterator eos_iterator; + + this->N = 0; + + if (position != eos_iterator && subs.size()) + { + result = subs[this->N] != -1 ? &((*position)[subs[this->N]]) : &((*position).prefix()); + } + else if (minus1_in_subs()) // end-of-sequence. + { + suffix.first = a; + suffix.second = b; + suffix.matched = a != b; + // 28.1.2.7: In a suffix iterator the member result holds a pointer + // to the data member suffix, the value of the member suffix.match is true, + + if (suffix.matched) + result = &suffix; + else + result = NULL; // Means end-of-sequence. + } + } + + bool minus1_in_subs() const + { + for (std::size_t i = 0; i < subs.size(); ++i) + if (subs[i] == -1) + return true; + + return false; + } + +private: + + typedef regex_iterator position_iterator; + position_iterator position; + const value_type *result; + value_type suffix; + std::size_t N; + std::vector subs; +}; + +typedef regex_token_iterator cregex_token_iterator; +typedef regex_token_iterator wcregex_token_iterator; +typedef regex_token_iterator sregex_token_iterator; +typedef regex_token_iterator wsregex_token_iterator; + +#if defined(SRELL_CPP11_CHAR1632_ENABLED) + typedef regex_token_iterator u16cregex_token_iterator; + typedef regex_token_iterator u32cregex_token_iterator; + typedef regex_token_iterator u16sregex_token_iterator; + typedef regex_token_iterator u32sregex_token_iterator; +#endif + +#if defined(SRELL_CPP20_CHAR8_ENABLED) + typedef regex_token_iterator u8cregex_token_iterator; +#endif +#if defined(SRELL_CPP20_CHAR8_ENABLED) && SRELL_CPP20_CHAR8_ENABLED >= 2 + typedef regex_token_iterator u8sregex_token_iterator; +#endif + +typedef regex_token_iterator::value_type, u8regex_traits::value_type> > u8ccregex_token_iterator; +typedef regex_token_iterator::value_type, u8regex_traits::value_type> > u8csregex_token_iterator; +#if !defined(SRELL_CPP20_CHAR8_ENABLED) + typedef u8ccregex_token_iterator u8cregex_token_iterator; +#endif +#if !defined(SRELL_CPP20_CHAR8_ENABLED) || SRELL_CPP20_CHAR8_ENABLED < 2 + typedef u8csregex_token_iterator u8sregex_token_iterator; +#endif + +#if defined(WCHAR_MAX) + #if WCHAR_MAX >= 0x10ffff + typedef wcregex_token_iterator u32wcregex_token_iterator; + typedef wsregex_token_iterator u32wsregex_token_iterator; + typedef u32wcregex_token_iterator u1632wcregex_token_iterator; + typedef u32wsregex_token_iterator u1632wsregex_token_iterator; + #elif WCHAR_MAX >= 0xffff + typedef regex_token_iterator::value_type, u16regex_traits::value_type> > u16wcregex_token_iterator; + typedef regex_token_iterator::value_type, u16regex_traits::value_type> > u16wsregex_token_iterator; + typedef u16wcregex_token_iterator u1632wcregex_token_iterator; + typedef u16wsregex_token_iterator u1632wsregex_token_iterator; + #endif +#endif + +// ... "regex_token_iterator.hpp"] + +} // namespace srell + +#ifdef SRELL_NOEXCEPT +#undef SRELL_NOEXCEPT +#endif + +#ifdef SRELL_CPP20_CHAR8_ENABLED +#undef SRELL_CPP20_CHAR8_ENABLED +#endif + +#ifdef SRELL_CPP11_CHAR1632_ENABLED +#undef SRELL_CPP11_CHAR1632_ENABLED +#endif + +#ifdef SRELL_CPP11_INITIALIZER_LIST_ENABLED +#undef SRELL_CPP11_INITIALIZER_LIST_ENABLED +#endif + +#ifdef SRELL_CPP11_MOVE_ENABLED +#undef SRELL_CPP11_MOVE_ENABLED +#endif + +#endif // SRELL_REGEX_TEMPLATE_LIBRARY diff --git a/lib/srell3_009/srell_ucfdata2.hpp b/lib/srell3_009/srell_ucfdata2.hpp new file mode 100644 index 000000000..1f079a5c5 --- /dev/null +++ b/lib/srell3_009/srell_ucfdata2.hpp @@ -0,0 +1,2491 @@ +// CaseFolding-14.0.0.txt +// Date: 2021-03-08, 19:35:41 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html + +template +struct unicode_casefolding +{ + static const T2 ucf_maxcodepoint = 0x1E921; + static const T3 ucf_deltatablesize = 0x1900; + static const T2 rev_maxcodepoint = 0x1E943; + static const T3 rev_indextablesize = 0x1B00; + static const T3 rev_charsettablesize = 4303; // 1 + 1424 * 2 + 1454 + static const T3 rev_maxset = 4; + static const T2 eos = 0; + + static const T2 ucf_deltatable[]; + static const T3 ucf_segmenttable[]; + static const T3 rev_indextable[]; + static const T3 rev_segmenttable[]; + static const T2 rev_charsettable[]; + + static const T2 *ucf_deltatable_ptr() + { + return ucf_deltatable; + } + static const T3 *ucf_segmenttable_ptr() + { + return ucf_segmenttable; + } + static const T3 *rev_indextable_ptr() + { + return rev_indextable; + } + static const T3 *rev_segmenttable_ptr() + { + return rev_segmenttable; + } + static const T2 *rev_charsettable_ptr() + { + return rev_charsettable; + } +}; + +template +const T2 unicode_casefolding::ucf_deltatable[] = +{ + // For common (0) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+00xx (256) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 775, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 0, 32, 32, 32, 32, 32, 32, 32, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+01xx (512) + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, static_cast(-121), 1, 0, 1, 0, 1, 0, static_cast(-268), + 0, 210, 1, 0, 1, 0, 206, 1, 0, 205, 205, 1, 0, 0, 79, 202, + 203, 1, 0, 205, 207, 0, 211, 209, 1, 0, 0, 0, 211, 213, 0, 214, + 1, 0, 1, 0, 1, 0, 218, 1, 0, 218, 0, 0, 1, 0, 218, 1, + 0, 217, 217, 1, 0, 1, 0, 219, 1, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 2, 1, 0, 1, 0, static_cast(-97), static_cast(-56), 1, 0, 1, 0, 1, 0, 1, 0, + + // For u+02xx (768) + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + static_cast(-130), 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 10795, 1, 0, static_cast(-163), 10792, 0, + 0, 1, 0, static_cast(-195), 69, 71, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+03xx (1024) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 116, + 0, 0, 0, 0, 0, 0, 38, 0, 37, 37, 37, 0, 64, 0, 63, 63, + 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, + static_cast(-30), static_cast(-25), 0, 0, 0, static_cast(-15), static_cast(-22), 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + static_cast(-54), static_cast(-48), 0, 0, static_cast(-60), static_cast(-64), 0, 1, 0, static_cast(-7), 1, 0, 0, static_cast(-130), static_cast(-130), static_cast(-130), + + // For u+04xx (1280) + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 15, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + + // For u+05xx (1536) + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+10xx (1792) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, + 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, 7264, + 7264, 7264, 7264, 7264, 7264, 7264, 0, 7264, 0, 0, 0, 0, 0, 7264, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+13xx (2048) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), 0, 0, + + // For u+1Cxx (2304) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + static_cast(-6222), static_cast(-6221), static_cast(-6212), static_cast(-6210), static_cast(-6210), static_cast(-6211), static_cast(-6204), static_cast(-6180), 35267, 0, 0, 0, 0, 0, 0, 0, + static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), + static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), + static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), static_cast(-3008), 0, 0, static_cast(-3008), static_cast(-3008), static_cast(-3008), + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1Exx (2560) + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, static_cast(-58), 0, 0, static_cast(-7615), 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + + // For u+1Fxx (2816) + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), 0, static_cast(-8), 0, static_cast(-8), 0, static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), static_cast(-8), + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-74), static_cast(-74), static_cast(-9), 0, static_cast(-7173), 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-86), static_cast(-86), static_cast(-86), static_cast(-86), static_cast(-9), 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-100), static_cast(-100), 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-8), static_cast(-8), static_cast(-112), static_cast(-112), static_cast(-7), 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-128), static_cast(-128), static_cast(-126), static_cast(-126), static_cast(-9), 0, 0, 0, + + // For u+21xx (3072) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, static_cast(-7517), 0, 0, 0, static_cast(-8383), static_cast(-8262), 0, 0, 0, 0, + 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+24xx (3328) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+2Cxx (3584) + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, static_cast(-10743), static_cast(-3814), static_cast(-10727), 0, 0, 1, 0, 1, 0, 1, 0, static_cast(-10780), static_cast(-10749), static_cast(-10783), + static_cast(-10782), 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, static_cast(-10815), static_cast(-10815), + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+A6xx (3840) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+A7xx (4096) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, static_cast(-35332), 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, static_cast(-42280), 0, 0, + 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, static_cast(-42308), static_cast(-42319), static_cast(-42315), static_cast(-42305), static_cast(-42308), 0, + static_cast(-42258), static_cast(-42282), static_cast(-42261), 928, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, static_cast(-48), static_cast(-42307), static_cast(-35384), 1, 0, 1, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+ABxx (4352) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), + static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), + static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), + static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), + static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), static_cast(-38864), + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+FFxx (4608) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+104xx (4864) + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+105xx (5120) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 0, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 0, 39, 39, 39, 39, + 39, 39, 39, 0, 39, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+10Cxx (5376) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+118xx (5632) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+16Exx (5888) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1E9xx (6144) + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +template +const T3 unicode_casefolding::ucf_segmenttable[] = +{ + 256, 512, 768, 1024, 1280, 1536, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1792, 0, 0, 2048, 0, 0, 0, 0, 0, 0, 0, 0, 2304, 0, 2560, 2816, + 0, 3072, 0, 0, 3328, 0, 0, 0, 0, 0, 0, 0, 3584, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3840, 4096, 0, 0, 0, 4352, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4608, + 0, 0, 0, 0, 4864, 5120, 0, 0, 0, 0, 0, 0, 5376, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 5632, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5888, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6144 +}; + +template +const T3 unicode_casefolding::rev_indextable[] = +{ + // For common (0) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+00xx (256) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 35, 38, 41, 44, + 47, 50, 53, 56, 60, 63, 66, 69, 72, 75, 78, 0, 0, 0, 0, 0, + 0, 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 35, 38, 41, 44, + 47, 50, 53, 56, 60, 63, 66, 69, 72, 75, 78, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 85, 88, 91, 94, 97, 100, 104, 107, 110, 113, 116, 119, 122, 125, 128, 131, + 134, 137, 140, 143, 146, 149, 152, 0, 155, 158, 161, 164, 167, 170, 173, 1924, + 85, 88, 91, 94, 97, 100, 104, 107, 110, 113, 116, 119, 122, 125, 128, 131, + 134, 137, 140, 143, 146, 149, 152, 0, 155, 158, 161, 164, 167, 170, 173, 350, + + // For u+21xx (512) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 785, 0, 0, 0, 31, 100, 0, 0, 0, 0, + 0, 0, 2359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2359, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2362, 2365, 2368, 2371, 2374, 2377, 2380, 2383, 2386, 2389, 2392, 2395, 2398, 2401, 2404, 2407, + 2362, 2365, 2368, 2371, 2374, 2377, 2380, 2383, 2386, 2389, 2392, 2395, 2398, 2401, 2404, 2407, + 0, 0, 0, 2410, 2410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+01xx (768) + 176, 176, 179, 179, 182, 182, 185, 185, 188, 188, 191, 191, 194, 194, 197, 197, + 200, 200, 203, 203, 206, 206, 209, 209, 212, 212, 215, 215, 218, 218, 221, 221, + 224, 224, 227, 227, 230, 230, 233, 233, 236, 236, 239, 239, 242, 242, 245, 245, + 0, 0, 248, 248, 251, 251, 254, 254, 0, 257, 257, 260, 260, 263, 263, 266, + 266, 269, 269, 272, 272, 275, 275, 278, 278, 0, 281, 281, 284, 284, 287, 287, + 290, 290, 293, 293, 296, 296, 299, 299, 302, 302, 305, 305, 308, 308, 311, 311, + 314, 314, 317, 317, 320, 320, 323, 323, 326, 326, 329, 329, 332, 332, 335, 335, + 338, 338, 341, 341, 344, 344, 347, 347, 350, 353, 353, 356, 356, 359, 359, 56, + 651, 362, 365, 365, 368, 368, 371, 374, 374, 377, 380, 383, 383, 0, 386, 389, + 392, 395, 395, 398, 401, 540, 404, 407, 410, 410, 642, 0, 413, 416, 606, 419, + 422, 422, 425, 425, 428, 428, 431, 434, 434, 437, 0, 0, 440, 440, 443, 446, + 446, 449, 452, 455, 455, 458, 458, 461, 464, 464, 0, 0, 467, 467, 0, 543, + 0, 0, 0, 0, 470, 470, 470, 474, 474, 474, 478, 478, 478, 482, 482, 485, + 485, 488, 488, 491, 491, 494, 494, 497, 497, 500, 500, 503, 503, 386, 506, 506, + 509, 509, 512, 512, 515, 515, 518, 518, 521, 521, 524, 524, 527, 527, 530, 530, + 0, 533, 533, 533, 537, 537, 540, 543, 546, 546, 549, 549, 552, 552, 555, 555, + + // For u+03xx (1024) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 675, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 680, 680, 683, 683, 0, 0, 686, 686, 0, 0, 0, 843, 846, 849, 0, 689, + 0, 0, 0, 0, 0, 0, 692, 0, 695, 698, 701, 0, 704, 0, 707, 710, + 0, 713, 716, 720, 723, 726, 730, 733, 736, 675, 741, 745, 81, 748, 751, 754, + 757, 761, 0, 765, 769, 772, 775, 779, 782, 785, 789, 792, 692, 695, 698, 701, + 0, 713, 716, 720, 723, 726, 730, 733, 736, 675, 741, 745, 81, 748, 751, 754, + 757, 761, 765, 765, 769, 772, 775, 779, 782, 785, 789, 792, 704, 707, 710, 795, + 716, 736, 0, 0, 0, 775, 757, 795, 798, 798, 801, 801, 804, 804, 807, 807, + 810, 810, 813, 813, 816, 816, 819, 819, 822, 822, 825, 825, 828, 828, 831, 831, + 741, 761, 837, 689, 736, 726, 0, 834, 834, 837, 840, 840, 0, 843, 846, 849, + + // For u+02xx (1280) + 558, 558, 561, 561, 564, 564, 567, 567, 570, 570, 573, 573, 576, 576, 579, 579, + 582, 582, 585, 585, 588, 588, 591, 591, 594, 594, 597, 597, 600, 600, 603, 603, + 606, 0, 609, 609, 612, 612, 615, 615, 618, 618, 621, 621, 624, 624, 627, 627, + 630, 630, 633, 633, 0, 0, 0, 0, 0, 0, 636, 639, 639, 642, 645, 2674, + 2677, 648, 648, 651, 654, 657, 660, 660, 663, 663, 666, 666, 669, 669, 672, 672, + 2662, 2656, 2665, 362, 371, 0, 377, 380, 0, 389, 0, 392, 3130, 0, 0, 0, + 398, 3133, 0, 401, 0, 3088, 3127, 0, 407, 404, 3139, 2638, 3136, 0, 0, 413, + 0, 2659, 416, 0, 0, 419, 0, 0, 0, 0, 0, 0, 0, 2644, 0, 0, + 431, 0, 3181, 437, 0, 0, 0, 3145, 443, 654, 449, 452, 657, 0, 0, 0, + 0, 0, 461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3148, 3142, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+2Cxx (1536) + 2491, 2494, 2497, 2500, 2503, 2506, 2509, 2512, 2515, 2518, 2521, 2524, 2527, 2530, 2533, 2536, + 2539, 2542, 2545, 2548, 2551, 2554, 2557, 2560, 2563, 2566, 2569, 2572, 2575, 2578, 2581, 2584, + 2587, 2590, 2593, 2596, 2599, 2602, 2605, 2608, 2611, 2614, 2617, 2620, 2623, 2626, 2629, 2632, + 2491, 2494, 2497, 2500, 2503, 2506, 2509, 2512, 2515, 2518, 2521, 2524, 2527, 2530, 2533, 2536, + 2539, 2542, 2545, 2548, 2551, 2554, 2557, 2560, 2563, 2566, 2569, 2572, 2575, 2578, 2581, 2584, + 2587, 2590, 2593, 2596, 2599, 2602, 2605, 2608, 2611, 2614, 2617, 2620, 2623, 2626, 2629, 2632, + 2635, 2635, 2638, 2641, 2644, 636, 645, 2647, 2647, 2650, 2650, 2653, 2653, 2656, 2659, 2662, + 2665, 0, 2668, 2668, 0, 2671, 2671, 0, 0, 0, 0, 0, 0, 0, 2674, 2677, + 2680, 2680, 2683, 2683, 2686, 2686, 2689, 2689, 2692, 2692, 2695, 2695, 2698, 2698, 2701, 2701, + 2704, 2704, 2707, 2707, 2710, 2710, 2713, 2713, 2716, 2716, 2719, 2719, 2722, 2722, 2725, 2725, + 2728, 2728, 2731, 2731, 2734, 2734, 2737, 2737, 2740, 2740, 2743, 2743, 2746, 2746, 2749, 2749, + 2752, 2752, 2755, 2755, 2758, 2758, 2761, 2761, 2764, 2764, 2767, 2767, 2770, 2770, 2773, 2773, + 2776, 2776, 2779, 2779, 2782, 2782, 2785, 2785, 2788, 2788, 2791, 2791, 2794, 2794, 2797, 2797, + 2800, 2800, 2803, 2803, 2806, 2806, 2809, 2809, 2812, 2812, 2815, 2815, 2818, 2818, 2821, 2821, + 2824, 2824, 2827, 2827, 0, 0, 0, 0, 0, 0, 0, 2830, 2830, 2833, 2833, 0, + 0, 0, 2836, 2836, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1Fxx (1792) + 2071, 2074, 2077, 2080, 2083, 2086, 2089, 2092, 2071, 2074, 2077, 2080, 2083, 2086, 2089, 2092, + 2095, 2098, 2101, 2104, 2107, 2110, 0, 0, 2095, 2098, 2101, 2104, 2107, 2110, 0, 0, + 2113, 2116, 2119, 2122, 2125, 2128, 2131, 2134, 2113, 2116, 2119, 2122, 2125, 2128, 2131, 2134, + 2137, 2140, 2143, 2146, 2149, 2152, 2155, 2158, 2137, 2140, 2143, 2146, 2149, 2152, 2155, 2158, + 2161, 2164, 2167, 2170, 2173, 2176, 0, 0, 2161, 2164, 2167, 2170, 2173, 2176, 0, 0, + 0, 2179, 0, 2182, 0, 2185, 0, 2188, 0, 2179, 0, 2182, 0, 2185, 0, 2188, + 2191, 2194, 2197, 2200, 2203, 2206, 2209, 2212, 2191, 2194, 2197, 2200, 2203, 2206, 2209, 2212, + 2293, 2296, 2302, 2305, 2308, 2311, 2323, 2326, 2344, 2347, 2335, 2338, 2350, 2353, 0, 0, + 2215, 2218, 2221, 2224, 2227, 2230, 2233, 2236, 2215, 2218, 2221, 2224, 2227, 2230, 2233, 2236, + 2239, 2242, 2245, 2248, 2251, 2254, 2257, 2260, 2239, 2242, 2245, 2248, 2251, 2254, 2257, 2260, + 2263, 2266, 2269, 2272, 2275, 2278, 2281, 2284, 2263, 2266, 2269, 2272, 2275, 2278, 2281, 2284, + 2287, 2290, 0, 2299, 0, 0, 0, 0, 2287, 2290, 2293, 2296, 2299, 0, 675, 0, + 0, 0, 0, 2314, 0, 0, 0, 0, 2302, 2305, 2308, 2311, 2314, 0, 0, 0, + 2317, 2320, 0, 0, 0, 0, 0, 0, 2317, 2320, 2323, 2326, 0, 0, 0, 0, + 2329, 2332, 0, 0, 0, 2341, 0, 0, 2329, 2332, 2335, 2338, 2341, 0, 0, 0, + 0, 0, 0, 2356, 0, 0, 0, 0, 2344, 2347, 2350, 2353, 2356, 0, 0, 0, + + // For u+04xx (2048) + 852, 855, 858, 861, 864, 867, 870, 873, 876, 879, 882, 885, 888, 891, 894, 897, + 900, 903, 906, 910, 913, 917, 920, 923, 926, 929, 932, 935, 938, 941, 944, 948, + 951, 954, 958, 963, 966, 969, 972, 975, 978, 981, 984, 988, 991, 994, 997, 1000, + 900, 903, 906, 910, 913, 917, 920, 923, 926, 929, 932, 935, 938, 941, 944, 948, + 951, 954, 958, 963, 966, 969, 972, 975, 978, 981, 984, 988, 991, 994, 997, 1000, + 852, 855, 858, 861, 864, 867, 870, 873, 876, 879, 882, 885, 888, 891, 894, 897, + 1003, 1003, 1006, 1006, 1010, 1010, 1013, 1013, 1016, 1016, 1019, 1019, 1022, 1022, 1025, 1025, + 1028, 1028, 1031, 1031, 1034, 1034, 1037, 1037, 1040, 1040, 1043, 1043, 1046, 1046, 1049, 1049, + 1052, 1052, 0, 0, 0, 0, 0, 0, 0, 0, 1055, 1055, 1058, 1058, 1061, 1061, + 1064, 1064, 1067, 1067, 1070, 1070, 1073, 1073, 1076, 1076, 1079, 1079, 1082, 1082, 1085, 1085, + 1088, 1088, 1091, 1091, 1094, 1094, 1097, 1097, 1100, 1100, 1103, 1103, 1106, 1106, 1109, 1109, + 1112, 1112, 1115, 1115, 1118, 1118, 1121, 1121, 1124, 1124, 1127, 1127, 1130, 1130, 1133, 1133, + 1136, 1139, 1139, 1142, 1142, 1145, 1145, 1148, 1148, 1151, 1151, 1154, 1154, 1157, 1157, 1136, + 1160, 1160, 1163, 1163, 1166, 1166, 1169, 1169, 1172, 1172, 1175, 1175, 1178, 1178, 1181, 1181, + 1184, 1184, 1187, 1187, 1190, 1190, 1193, 1193, 1196, 1196, 1199, 1199, 1202, 1202, 1205, 1205, + 1208, 1208, 1211, 1211, 1214, 1214, 1217, 1217, 1220, 1220, 1223, 1223, 1226, 1226, 1229, 1229, + + // For u+1Cxx (2304) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 906, 913, 944, 954, 958, 958, 984, 1006, 1556, 0, 0, 0, 0, 0, 0, 0, + 1560, 1563, 1566, 1569, 1572, 1575, 1578, 1581, 1584, 1587, 1590, 1593, 1596, 1599, 1602, 1605, + 1608, 1611, 1614, 1617, 1620, 1623, 1626, 1629, 1632, 1635, 1638, 1641, 1644, 1647, 1650, 1653, + 1656, 1659, 1662, 1665, 1668, 1671, 1674, 1677, 1680, 1683, 1686, 0, 0, 1689, 1692, 1695, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+05xx (2560) + 1232, 1232, 1235, 1235, 1238, 1238, 1241, 1241, 1244, 1244, 1247, 1247, 1250, 1250, 1253, 1253, + 1256, 1256, 1259, 1259, 1262, 1262, 1265, 1265, 1268, 1268, 1271, 1271, 1274, 1274, 1277, 1277, + 1280, 1280, 1283, 1283, 1286, 1286, 1289, 1289, 1292, 1292, 1295, 1295, 1298, 1298, 1301, 1301, + 0, 1304, 1307, 1310, 1313, 1316, 1319, 1322, 1325, 1328, 1331, 1334, 1337, 1340, 1343, 1346, + 1349, 1352, 1355, 1358, 1361, 1364, 1367, 1370, 1373, 1376, 1379, 1382, 1385, 1388, 1391, 1394, + 1397, 1400, 1403, 1406, 1409, 1412, 1415, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1304, 1307, 1310, 1313, 1316, 1319, 1322, 1325, 1328, 1331, 1334, 1337, 1340, 1343, 1346, + 1349, 1352, 1355, 1358, 1361, 1364, 1367, 1370, 1373, 1376, 1379, 1382, 1385, 1388, 1391, 1394, + 1397, 1400, 1403, 1406, 1409, 1412, 1415, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+2Dxx (2816) + 1418, 1421, 1424, 1427, 1430, 1433, 1436, 1439, 1442, 1445, 1448, 1451, 1454, 1457, 1460, 1463, + 1466, 1469, 1472, 1475, 1478, 1481, 1484, 1487, 1490, 1493, 1496, 1499, 1502, 1505, 1508, 1511, + 1514, 1517, 1520, 1523, 1526, 1529, 0, 1532, 0, 0, 0, 0, 0, 1535, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+10xx (3072) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1418, 1421, 1424, 1427, 1430, 1433, 1436, 1439, 1442, 1445, 1448, 1451, 1454, 1457, 1460, 1463, + 1466, 1469, 1472, 1475, 1478, 1481, 1484, 1487, 1490, 1493, 1496, 1499, 1502, 1505, 1508, 1511, + 1514, 1517, 1520, 1523, 1526, 1529, 0, 1532, 0, 0, 0, 0, 0, 1535, 0, 0, + 1560, 1563, 1566, 1569, 1572, 1575, 1578, 1581, 1584, 1587, 1590, 1593, 1596, 1599, 1602, 1605, + 1608, 1611, 1614, 1617, 1620, 1623, 1626, 1629, 1632, 1635, 1638, 1641, 1644, 1647, 1650, 1653, + 1656, 1659, 1662, 1665, 1668, 1671, 1674, 1677, 1680, 1683, 1686, 0, 0, 1689, 1692, 1695, + + // For u+13xx (3328) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3205, 3208, 3211, 3214, 3217, 3220, 3223, 3226, 3229, 3232, 3235, 3238, 3241, 3244, 3247, 3250, + 3253, 3256, 3259, 3262, 3265, 3268, 3271, 3274, 3277, 3280, 3283, 3286, 3289, 3292, 3295, 3298, + 3301, 3304, 3307, 3310, 3313, 3316, 3319, 3322, 3325, 3328, 3331, 3334, 3337, 3340, 3343, 3346, + 3349, 3352, 3355, 3358, 3361, 3364, 3367, 3370, 3373, 3376, 3379, 3382, 3385, 3388, 3391, 3394, + 3397, 3400, 3403, 3406, 3409, 3412, 3415, 3418, 3421, 3424, 3427, 3430, 3433, 3436, 3439, 3442, + 1538, 1541, 1544, 1547, 1550, 1553, 0, 0, 1538, 1541, 1544, 1547, 1550, 1553, 0, 0, + + // For u+A6xx (3584) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2839, 2839, 2842, 2842, 2845, 2845, 2848, 2848, 2851, 2851, 1556, 1556, 2854, 2854, 2857, 2857, + 2860, 2860, 2863, 2863, 2866, 2866, 2869, 2869, 2872, 2872, 2875, 2875, 2878, 2878, 2881, 2881, + 2884, 2884, 2887, 2887, 2890, 2890, 2893, 2893, 2896, 2896, 2899, 2899, 2902, 2902, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2905, 2905, 2908, 2908, 2911, 2911, 2914, 2914, 2917, 2917, 2920, 2920, 2923, 2923, 2926, 2926, + 2929, 2929, 2932, 2932, 2935, 2935, 2938, 2938, 2941, 2941, 2944, 2944, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1Exx (3840) + 1698, 1698, 1701, 1701, 1704, 1704, 1707, 1707, 1710, 1710, 1713, 1713, 1716, 1716, 1719, 1719, + 1722, 1722, 1725, 1725, 1728, 1728, 1731, 1731, 1734, 1734, 1737, 1737, 1740, 1740, 1743, 1743, + 1746, 1746, 1749, 1749, 1752, 1752, 1755, 1755, 1758, 1758, 1761, 1761, 1764, 1764, 1767, 1767, + 1770, 1770, 1773, 1773, 1776, 1776, 1779, 1779, 1782, 1782, 1785, 1785, 1788, 1788, 1791, 1791, + 1794, 1794, 1797, 1797, 1800, 1800, 1803, 1803, 1806, 1806, 1809, 1809, 1812, 1812, 1815, 1815, + 1818, 1818, 1821, 1821, 1824, 1824, 1827, 1827, 1830, 1830, 1833, 1833, 1836, 1836, 1839, 1839, + 1842, 1842, 1846, 1846, 1849, 1849, 1852, 1852, 1855, 1855, 1858, 1858, 1861, 1861, 1864, 1864, + 1867, 1867, 1870, 1870, 1873, 1873, 1876, 1876, 1879, 1879, 1882, 1882, 1885, 1885, 1888, 1888, + 1891, 1891, 1894, 1894, 1897, 1897, 1900, 1900, 1903, 1903, 1906, 1906, 1909, 1909, 1912, 1912, + 1915, 1915, 1918, 1918, 1921, 1921, 0, 0, 0, 0, 0, 1842, 0, 0, 1924, 0, + 1927, 1927, 1930, 1930, 1933, 1933, 1936, 1936, 1939, 1939, 1942, 1942, 1945, 1945, 1948, 1948, + 1951, 1951, 1954, 1954, 1957, 1957, 1960, 1960, 1963, 1963, 1966, 1966, 1969, 1969, 1972, 1972, + 1975, 1975, 1978, 1978, 1981, 1981, 1984, 1984, 1987, 1987, 1990, 1990, 1993, 1993, 1996, 1996, + 1999, 1999, 2002, 2002, 2005, 2005, 2008, 2008, 2011, 2011, 2014, 2014, 2017, 2017, 2020, 2020, + 2023, 2023, 2026, 2026, 2029, 2029, 2032, 2032, 2035, 2035, 2038, 2038, 2041, 2041, 2044, 2044, + 2047, 2047, 2050, 2050, 2053, 2053, 2056, 2056, 2059, 2059, 2062, 2062, 2065, 2065, 2068, 2068, + + // For u+24xx (4096) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2413, 2416, 2419, 2422, 2425, 2428, 2431, 2434, 2437, 2440, + 2443, 2446, 2449, 2452, 2455, 2458, 2461, 2464, 2467, 2470, 2473, 2476, 2479, 2482, 2485, 2488, + 2413, 2416, 2419, 2422, 2425, 2428, 2431, 2434, 2437, 2440, 2443, 2446, 2449, 2452, 2455, 2458, + 2461, 2464, 2467, 2470, 2473, 2476, 2479, 2482, 2485, 2488, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1Dxx (4352) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3067, 0, 0, 0, 2641, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3184, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+A7xx (4608) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2947, 2947, 2950, 2950, 2953, 2953, 2956, 2956, 2959, 2959, 2962, 2962, 2965, 2965, + 0, 0, 2968, 2968, 2971, 2971, 2974, 2974, 2977, 2977, 2980, 2980, 2983, 2983, 2986, 2986, + 2989, 2989, 2992, 2992, 2995, 2995, 2998, 2998, 3001, 3001, 3004, 3004, 3007, 3007, 3010, 3010, + 3013, 3013, 3016, 3016, 3019, 3019, 3022, 3022, 3025, 3025, 3028, 3028, 3031, 3031, 3034, 3034, + 3037, 3037, 3040, 3040, 3043, 3043, 3046, 3046, 3049, 3049, 3052, 3052, 3055, 3055, 3058, 3058, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3061, 3061, 3064, 3064, 3067, 3070, 3070, + 3073, 3073, 3076, 3076, 3079, 3079, 3082, 3082, 0, 0, 0, 3085, 3085, 3088, 0, 0, + 3091, 3091, 3094, 3094, 3178, 0, 3097, 3097, 3100, 3100, 3103, 3103, 3106, 3106, 3109, 3109, + 3112, 3112, 3115, 3115, 3118, 3118, 3121, 3121, 3124, 3124, 3127, 3130, 3133, 3136, 3139, 0, + 3142, 3145, 3148, 3151, 3154, 3154, 3157, 3157, 3160, 3160, 3163, 3163, 3166, 3166, 3169, 3169, + 3172, 3172, 3175, 3175, 3178, 3181, 3184, 3187, 3187, 3190, 3190, 0, 0, 0, 0, 0, + 3193, 3193, 0, 0, 0, 0, 3196, 3196, 3199, 3199, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3202, 3202, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+ABxx (4864) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3205, 3208, 3211, 3214, 3217, 3220, 3223, 3226, 3229, 3232, 3235, 3238, 3241, 3244, 3247, 3250, + 3253, 3256, 3259, 3262, 3265, 3268, 3271, 3274, 3277, 3280, 3283, 3286, 3289, 3292, 3295, 3298, + 3301, 3304, 3307, 3310, 3313, 3316, 3319, 3322, 3325, 3328, 3331, 3334, 3337, 3340, 3343, 3346, + 3349, 3352, 3355, 3358, 3361, 3364, 3367, 3370, 3373, 3376, 3379, 3382, 3385, 3388, 3391, 3394, + 3397, 3400, 3403, 3406, 3409, 3412, 3415, 3418, 3421, 3424, 3427, 3430, 3433, 3436, 3439, 3442, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+FFxx (5120) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3445, 3448, 3451, 3454, 3457, 3460, 3463, 3466, 3469, 3472, 3475, 3478, 3481, 3484, 3487, + 3490, 3493, 3496, 3499, 3502, 3505, 3508, 3511, 3514, 3517, 3520, 0, 0, 0, 0, 0, + 0, 3445, 3448, 3451, 3454, 3457, 3460, 3463, 3466, 3469, 3472, 3475, 3478, 3481, 3484, 3487, + 3490, 3493, 3496, 3499, 3502, 3505, 3508, 3511, 3514, 3517, 3520, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+104xx (5376) + 3523, 3526, 3529, 3532, 3535, 3538, 3541, 3544, 3547, 3550, 3553, 3556, 3559, 3562, 3565, 3568, + 3571, 3574, 3577, 3580, 3583, 3586, 3589, 3592, 3595, 3598, 3601, 3604, 3607, 3610, 3613, 3616, + 3619, 3622, 3625, 3628, 3631, 3634, 3637, 3640, 3523, 3526, 3529, 3532, 3535, 3538, 3541, 3544, + 3547, 3550, 3553, 3556, 3559, 3562, 3565, 3568, 3571, 3574, 3577, 3580, 3583, 3586, 3589, 3592, + 3595, 3598, 3601, 3604, 3607, 3610, 3613, 3616, 3619, 3622, 3625, 3628, 3631, 3634, 3637, 3640, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3643, 3646, 3649, 3652, 3655, 3658, 3661, 3664, 3667, 3670, 3673, 3676, 3679, 3682, 3685, 3688, + 3691, 3694, 3697, 3700, 3703, 3706, 3709, 3712, 3715, 3718, 3721, 3724, 3727, 3730, 3733, 3736, + 3739, 3742, 3745, 3748, 0, 0, 0, 0, 3643, 3646, 3649, 3652, 3655, 3658, 3661, 3664, + 3667, 3670, 3673, 3676, 3679, 3682, 3685, 3688, 3691, 3694, 3697, 3700, 3703, 3706, 3709, 3712, + 3715, 3718, 3721, 3724, 3727, 3730, 3733, 3736, 3739, 3742, 3745, 3748, 0, 0, 0, 0, + + // For u+105xx (5632) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3751, 3754, 3757, 3760, 3763, 3766, 3769, 3772, 3775, 3778, 3781, 0, 3784, 3787, 3790, 3793, + 3796, 3799, 3802, 3805, 3808, 3811, 3814, 3817, 3820, 3823, 3826, 0, 3829, 3832, 3835, 3838, + 3841, 3844, 3847, 0, 3850, 3853, 0, 3751, 3754, 3757, 3760, 3763, 3766, 3769, 3772, 3775, + 3778, 3781, 0, 3784, 3787, 3790, 3793, 3796, 3799, 3802, 3805, 3808, 3811, 3814, 3817, 3820, + 3823, 3826, 0, 3829, 3832, 3835, 3838, 3841, 3844, 3847, 0, 3850, 3853, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+10Cxx (5888) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3856, 3859, 3862, 3865, 3868, 3871, 3874, 3877, 3880, 3883, 3886, 3889, 3892, 3895, 3898, 3901, + 3904, 3907, 3910, 3913, 3916, 3919, 3922, 3925, 3928, 3931, 3934, 3937, 3940, 3943, 3946, 3949, + 3952, 3955, 3958, 3961, 3964, 3967, 3970, 3973, 3976, 3979, 3982, 3985, 3988, 3991, 3994, 3997, + 4000, 4003, 4006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3856, 3859, 3862, 3865, 3868, 3871, 3874, 3877, 3880, 3883, 3886, 3889, 3892, 3895, 3898, 3901, + 3904, 3907, 3910, 3913, 3916, 3919, 3922, 3925, 3928, 3931, 3934, 3937, 3940, 3943, 3946, 3949, + 3952, 3955, 3958, 3961, 3964, 3967, 3970, 3973, 3976, 3979, 3982, 3985, 3988, 3991, 3994, 3997, + 4000, 4003, 4006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+118xx (6144) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4009, 4012, 4015, 4018, 4021, 4024, 4027, 4030, 4033, 4036, 4039, 4042, 4045, 4048, 4051, 4054, + 4057, 4060, 4063, 4066, 4069, 4072, 4075, 4078, 4081, 4084, 4087, 4090, 4093, 4096, 4099, 4102, + 4009, 4012, 4015, 4018, 4021, 4024, 4027, 4030, 4033, 4036, 4039, 4042, 4045, 4048, 4051, 4054, + 4057, 4060, 4063, 4066, 4069, 4072, 4075, 4078, 4081, 4084, 4087, 4090, 4093, 4096, 4099, 4102, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+16Exx (6400) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4105, 4108, 4111, 4114, 4117, 4120, 4123, 4126, 4129, 4132, 4135, 4138, 4141, 4144, 4147, 4150, + 4153, 4156, 4159, 4162, 4165, 4168, 4171, 4174, 4177, 4180, 4183, 4186, 4189, 4192, 4195, 4198, + 4105, 4108, 4111, 4114, 4117, 4120, 4123, 4126, 4129, 4132, 4135, 4138, 4141, 4144, 4147, 4150, + 4153, 4156, 4159, 4162, 4165, 4168, 4171, 4174, 4177, 4180, 4183, 4186, 4189, 4192, 4195, 4198, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + // For u+1E9xx (6656) + 4201, 4204, 4207, 4210, 4213, 4216, 4219, 4222, 4225, 4228, 4231, 4234, 4237, 4240, 4243, 4246, + 4249, 4252, 4255, 4258, 4261, 4264, 4267, 4270, 4273, 4276, 4279, 4282, 4285, 4288, 4291, 4294, + 4297, 4300, 4201, 4204, 4207, 4210, 4213, 4216, 4219, 4222, 4225, 4228, 4231, 4234, 4237, 4240, + 4243, 4246, 4249, 4252, 4255, 4258, 4261, 4264, 4267, 4270, 4273, 4276, 4279, 4282, 4285, 4288, + 4291, 4294, 4297, 4300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +template +const T3 unicode_casefolding::rev_segmenttable[] = +{ + 256, 768, 1280, 1024, 2048, 2560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3072, 0, 0, 3328, 0, 0, 0, 0, 0, 0, 0, 0, 2304, 4352, 3840, 1792, + 0, 512, 0, 0, 4096, 0, 0, 0, 0, 0, 0, 0, 1536, 2816, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3584, 4608, 0, 0, 0, 4864, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5120, + 0, 0, 0, 0, 5376, 5632, 0, 0, 0, 0, 0, 0, 5888, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6144, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6400, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6656 +}; + +template +const T2 unicode_casefolding::rev_charsettable[] = +{ + eos, // 0 + 0x0061, 0x0041, eos, + 0x0062, 0x0042, eos, + 0x0063, 0x0043, eos, + 0x0064, 0x0044, eos, // 10 + 0x0065, 0x0045, eos, + 0x0066, 0x0046, eos, + 0x0067, 0x0047, eos, + 0x0068, 0x0048, eos, // 22 + 0x0069, 0x0049, eos, + 0x006A, 0x004A, eos, + 0x006B, 0x004B, 0x212A, eos, // 31 + 0x006C, 0x004C, eos, + 0x006D, 0x004D, eos, + 0x006E, 0x004E, eos, // 41 + 0x006F, 0x004F, eos, + 0x0070, 0x0050, eos, + 0x0071, 0x0051, eos, // 50 + 0x0072, 0x0052, eos, + 0x0073, 0x0053, 0x017F, eos, + 0x0074, 0x0054, eos, // 60 + 0x0075, 0x0055, eos, + 0x0076, 0x0056, eos, + 0x0077, 0x0057, eos, + 0x0078, 0x0058, eos, // 72 + 0x0079, 0x0059, eos, + 0x007A, 0x005A, eos, + 0x03BC, 0x00B5, 0x039C, eos, // 81 + 0x00E0, 0x00C0, eos, + 0x00E1, 0x00C1, eos, + 0x00E2, 0x00C2, eos, // 91 + 0x00E3, 0x00C3, eos, + 0x00E4, 0x00C4, eos, + 0x00E5, 0x00C5, 0x212B, eos, // 100 + 0x00E6, 0x00C6, eos, + 0x00E7, 0x00C7, eos, + 0x00E8, 0x00C8, eos, // 110 + 0x00E9, 0x00C9, eos, + 0x00EA, 0x00CA, eos, + 0x00EB, 0x00CB, eos, + 0x00EC, 0x00CC, eos, // 122 + 0x00ED, 0x00CD, eos, + 0x00EE, 0x00CE, eos, + 0x00EF, 0x00CF, eos, // 131 + 0x00F0, 0x00D0, eos, + 0x00F1, 0x00D1, eos, + 0x00F2, 0x00D2, eos, // 140 + 0x00F3, 0x00D3, eos, + 0x00F4, 0x00D4, eos, + 0x00F5, 0x00D5, eos, + 0x00F6, 0x00D6, eos, // 152 + 0x00F8, 0x00D8, eos, + 0x00F9, 0x00D9, eos, + 0x00FA, 0x00DA, eos, // 161 + 0x00FB, 0x00DB, eos, + 0x00FC, 0x00DC, eos, + 0x00FD, 0x00DD, eos, // 170 + 0x00FE, 0x00DE, eos, + 0x0101, 0x0100, eos, + 0x0103, 0x0102, eos, + 0x0105, 0x0104, eos, // 182 + 0x0107, 0x0106, eos, + 0x0109, 0x0108, eos, + 0x010B, 0x010A, eos, // 191 + 0x010D, 0x010C, eos, + 0x010F, 0x010E, eos, + 0x0111, 0x0110, eos, // 200 + 0x0113, 0x0112, eos, + 0x0115, 0x0114, eos, + 0x0117, 0x0116, eos, + 0x0119, 0x0118, eos, // 212 + 0x011B, 0x011A, eos, + 0x011D, 0x011C, eos, + 0x011F, 0x011E, eos, // 221 + 0x0121, 0x0120, eos, + 0x0123, 0x0122, eos, + 0x0125, 0x0124, eos, // 230 + 0x0127, 0x0126, eos, + 0x0129, 0x0128, eos, + 0x012B, 0x012A, eos, + 0x012D, 0x012C, eos, // 242 + 0x012F, 0x012E, eos, + 0x0133, 0x0132, eos, + 0x0135, 0x0134, eos, // 251 + 0x0137, 0x0136, eos, + 0x013A, 0x0139, eos, + 0x013C, 0x013B, eos, // 260 + 0x013E, 0x013D, eos, + 0x0140, 0x013F, eos, + 0x0142, 0x0141, eos, + 0x0144, 0x0143, eos, // 272 + 0x0146, 0x0145, eos, + 0x0148, 0x0147, eos, + 0x014B, 0x014A, eos, // 281 + 0x014D, 0x014C, eos, + 0x014F, 0x014E, eos, + 0x0151, 0x0150, eos, // 290 + 0x0153, 0x0152, eos, + 0x0155, 0x0154, eos, + 0x0157, 0x0156, eos, + 0x0159, 0x0158, eos, // 302 + 0x015B, 0x015A, eos, + 0x015D, 0x015C, eos, + 0x015F, 0x015E, eos, // 311 + 0x0161, 0x0160, eos, + 0x0163, 0x0162, eos, + 0x0165, 0x0164, eos, // 320 + 0x0167, 0x0166, eos, + 0x0169, 0x0168, eos, + 0x016B, 0x016A, eos, + 0x016D, 0x016C, eos, // 332 + 0x016F, 0x016E, eos, + 0x0171, 0x0170, eos, + 0x0173, 0x0172, eos, // 341 + 0x0175, 0x0174, eos, + 0x0177, 0x0176, eos, + 0x00FF, 0x0178, eos, // 350 + 0x017A, 0x0179, eos, + 0x017C, 0x017B, eos, + 0x017E, 0x017D, eos, + 0x0253, 0x0181, eos, // 362 + 0x0183, 0x0182, eos, + 0x0185, 0x0184, eos, + 0x0254, 0x0186, eos, // 371 + 0x0188, 0x0187, eos, + 0x0256, 0x0189, eos, + 0x0257, 0x018A, eos, // 380 + 0x018C, 0x018B, eos, + 0x01DD, 0x018E, eos, + 0x0259, 0x018F, eos, + 0x025B, 0x0190, eos, // 392 + 0x0192, 0x0191, eos, + 0x0260, 0x0193, eos, + 0x0263, 0x0194, eos, // 401 + 0x0269, 0x0196, eos, + 0x0268, 0x0197, eos, + 0x0199, 0x0198, eos, // 410 + 0x026F, 0x019C, eos, + 0x0272, 0x019D, eos, + 0x0275, 0x019F, eos, + 0x01A1, 0x01A0, eos, // 422 + 0x01A3, 0x01A2, eos, + 0x01A5, 0x01A4, eos, + 0x0280, 0x01A6, eos, // 431 + 0x01A8, 0x01A7, eos, + 0x0283, 0x01A9, eos, + 0x01AD, 0x01AC, eos, // 440 + 0x0288, 0x01AE, eos, + 0x01B0, 0x01AF, eos, + 0x028A, 0x01B1, eos, + 0x028B, 0x01B2, eos, // 452 + 0x01B4, 0x01B3, eos, + 0x01B6, 0x01B5, eos, + 0x0292, 0x01B7, eos, // 461 + 0x01B9, 0x01B8, eos, + 0x01BD, 0x01BC, eos, + 0x01C6, 0x01C4, 0x01C5, eos, // 470 + 0x01C9, 0x01C7, 0x01C8, eos, + 0x01CC, 0x01CA, 0x01CB, eos, + 0x01CE, 0x01CD, eos, // 482 + 0x01D0, 0x01CF, eos, + 0x01D2, 0x01D1, eos, + 0x01D4, 0x01D3, eos, // 491 + 0x01D6, 0x01D5, eos, + 0x01D8, 0x01D7, eos, + 0x01DA, 0x01D9, eos, // 500 + 0x01DC, 0x01DB, eos, + 0x01DF, 0x01DE, eos, + 0x01E1, 0x01E0, eos, + 0x01E3, 0x01E2, eos, // 512 + 0x01E5, 0x01E4, eos, + 0x01E7, 0x01E6, eos, + 0x01E9, 0x01E8, eos, // 521 + 0x01EB, 0x01EA, eos, + 0x01ED, 0x01EC, eos, + 0x01EF, 0x01EE, eos, // 530 + 0x01F3, 0x01F1, 0x01F2, eos, + 0x01F5, 0x01F4, eos, + 0x0195, 0x01F6, eos, // 540 + 0x01BF, 0x01F7, eos, + 0x01F9, 0x01F8, eos, + 0x01FB, 0x01FA, eos, + 0x01FD, 0x01FC, eos, // 552 + 0x01FF, 0x01FE, eos, + 0x0201, 0x0200, eos, + 0x0203, 0x0202, eos, // 561 + 0x0205, 0x0204, eos, + 0x0207, 0x0206, eos, + 0x0209, 0x0208, eos, // 570 + 0x020B, 0x020A, eos, + 0x020D, 0x020C, eos, + 0x020F, 0x020E, eos, + 0x0211, 0x0210, eos, // 582 + 0x0213, 0x0212, eos, + 0x0215, 0x0214, eos, + 0x0217, 0x0216, eos, // 591 + 0x0219, 0x0218, eos, + 0x021B, 0x021A, eos, + 0x021D, 0x021C, eos, // 600 + 0x021F, 0x021E, eos, + 0x019E, 0x0220, eos, + 0x0223, 0x0222, eos, + 0x0225, 0x0224, eos, // 612 + 0x0227, 0x0226, eos, + 0x0229, 0x0228, eos, + 0x022B, 0x022A, eos, // 621 + 0x022D, 0x022C, eos, + 0x022F, 0x022E, eos, + 0x0231, 0x0230, eos, // 630 + 0x0233, 0x0232, eos, + 0x2C65, 0x023A, eos, + 0x023C, 0x023B, eos, + 0x019A, 0x023D, eos, // 642 + 0x2C66, 0x023E, eos, + 0x0242, 0x0241, eos, + 0x0180, 0x0243, eos, // 651 + 0x0289, 0x0244, eos, + 0x028C, 0x0245, eos, + 0x0247, 0x0246, eos, // 660 + 0x0249, 0x0248, eos, + 0x024B, 0x024A, eos, + 0x024D, 0x024C, eos, + 0x024F, 0x024E, eos, // 672 + 0x03B9, 0x0345, 0x0399, 0x1FBE, eos, + 0x0371, 0x0370, eos, // 680 + 0x0373, 0x0372, eos, + 0x0377, 0x0376, eos, + 0x03F3, 0x037F, eos, + 0x03AC, 0x0386, eos, // 692 + 0x03AD, 0x0388, eos, + 0x03AE, 0x0389, eos, + 0x03AF, 0x038A, eos, // 701 + 0x03CC, 0x038C, eos, + 0x03CD, 0x038E, eos, + 0x03CE, 0x038F, eos, // 710 + 0x03B1, 0x0391, eos, + 0x03B2, 0x0392, 0x03D0, eos, + 0x03B3, 0x0393, eos, // 720 + 0x03B4, 0x0394, eos, + 0x03B5, 0x0395, 0x03F5, eos, + 0x03B6, 0x0396, eos, // 730 + 0x03B7, 0x0397, eos, + 0x03B8, 0x0398, 0x03D1, 0x03F4, eos, + 0x03BA, 0x039A, 0x03F0, eos, // 741 + 0x03BB, 0x039B, eos, + 0x03BD, 0x039D, eos, + 0x03BE, 0x039E, eos, // 751 + 0x03BF, 0x039F, eos, + 0x03C0, 0x03A0, 0x03D6, eos, + 0x03C1, 0x03A1, 0x03F1, eos, // 761 + 0x03C3, 0x03A3, 0x03C2, eos, + 0x03C4, 0x03A4, eos, + 0x03C5, 0x03A5, eos, // 772 + 0x03C6, 0x03A6, 0x03D5, eos, + 0x03C7, 0x03A7, eos, + 0x03C8, 0x03A8, eos, // 782 + 0x03C9, 0x03A9, 0x2126, eos, + 0x03CA, 0x03AA, eos, + 0x03CB, 0x03AB, eos, // 792 + 0x03D7, 0x03CF, eos, + 0x03D9, 0x03D8, eos, + 0x03DB, 0x03DA, eos, // 801 + 0x03DD, 0x03DC, eos, + 0x03DF, 0x03DE, eos, + 0x03E1, 0x03E0, eos, // 810 + 0x03E3, 0x03E2, eos, + 0x03E5, 0x03E4, eos, + 0x03E7, 0x03E6, eos, + 0x03E9, 0x03E8, eos, // 822 + 0x03EB, 0x03EA, eos, + 0x03ED, 0x03EC, eos, + 0x03EF, 0x03EE, eos, // 831 + 0x03F8, 0x03F7, eos, + 0x03F2, 0x03F9, eos, + 0x03FB, 0x03FA, eos, // 840 + 0x037B, 0x03FD, eos, + 0x037C, 0x03FE, eos, + 0x037D, 0x03FF, eos, + 0x0450, 0x0400, eos, // 852 + 0x0451, 0x0401, eos, + 0x0452, 0x0402, eos, + 0x0453, 0x0403, eos, // 861 + 0x0454, 0x0404, eos, + 0x0455, 0x0405, eos, + 0x0456, 0x0406, eos, // 870 + 0x0457, 0x0407, eos, + 0x0458, 0x0408, eos, + 0x0459, 0x0409, eos, + 0x045A, 0x040A, eos, // 882 + 0x045B, 0x040B, eos, + 0x045C, 0x040C, eos, + 0x045D, 0x040D, eos, // 891 + 0x045E, 0x040E, eos, + 0x045F, 0x040F, eos, + 0x0430, 0x0410, eos, // 900 + 0x0431, 0x0411, eos, + 0x0432, 0x0412, 0x1C80, eos, + 0x0433, 0x0413, eos, // 910 + 0x0434, 0x0414, 0x1C81, eos, + 0x0435, 0x0415, eos, + 0x0436, 0x0416, eos, // 920 + 0x0437, 0x0417, eos, + 0x0438, 0x0418, eos, + 0x0439, 0x0419, eos, + 0x043A, 0x041A, eos, // 932 + 0x043B, 0x041B, eos, + 0x043C, 0x041C, eos, + 0x043D, 0x041D, eos, // 941 + 0x043E, 0x041E, 0x1C82, eos, + 0x043F, 0x041F, eos, + 0x0440, 0x0420, eos, // 951 + 0x0441, 0x0421, 0x1C83, eos, + 0x0442, 0x0422, 0x1C84, 0x1C85, eos, + 0x0443, 0x0423, eos, // 963 + 0x0444, 0x0424, eos, + 0x0445, 0x0425, eos, + 0x0446, 0x0426, eos, // 972 + 0x0447, 0x0427, eos, + 0x0448, 0x0428, eos, + 0x0449, 0x0429, eos, // 981 + 0x044A, 0x042A, 0x1C86, eos, + 0x044B, 0x042B, eos, + 0x044C, 0x042C, eos, // 991 + 0x044D, 0x042D, eos, + 0x044E, 0x042E, eos, + 0x044F, 0x042F, eos, // 1000 + 0x0461, 0x0460, eos, + 0x0463, 0x0462, 0x1C87, eos, + 0x0465, 0x0464, eos, // 1010 + 0x0467, 0x0466, eos, + 0x0469, 0x0468, eos, + 0x046B, 0x046A, eos, + 0x046D, 0x046C, eos, // 1022 + 0x046F, 0x046E, eos, + 0x0471, 0x0470, eos, + 0x0473, 0x0472, eos, // 1031 + 0x0475, 0x0474, eos, + 0x0477, 0x0476, eos, + 0x0479, 0x0478, eos, // 1040 + 0x047B, 0x047A, eos, + 0x047D, 0x047C, eos, + 0x047F, 0x047E, eos, + 0x0481, 0x0480, eos, // 1052 + 0x048B, 0x048A, eos, + 0x048D, 0x048C, eos, + 0x048F, 0x048E, eos, // 1061 + 0x0491, 0x0490, eos, + 0x0493, 0x0492, eos, + 0x0495, 0x0494, eos, // 1070 + 0x0497, 0x0496, eos, + 0x0499, 0x0498, eos, + 0x049B, 0x049A, eos, + 0x049D, 0x049C, eos, // 1082 + 0x049F, 0x049E, eos, + 0x04A1, 0x04A0, eos, + 0x04A3, 0x04A2, eos, // 1091 + 0x04A5, 0x04A4, eos, + 0x04A7, 0x04A6, eos, + 0x04A9, 0x04A8, eos, // 1100 + 0x04AB, 0x04AA, eos, + 0x04AD, 0x04AC, eos, + 0x04AF, 0x04AE, eos, + 0x04B1, 0x04B0, eos, // 1112 + 0x04B3, 0x04B2, eos, + 0x04B5, 0x04B4, eos, + 0x04B7, 0x04B6, eos, // 1121 + 0x04B9, 0x04B8, eos, + 0x04BB, 0x04BA, eos, + 0x04BD, 0x04BC, eos, // 1130 + 0x04BF, 0x04BE, eos, + 0x04CF, 0x04C0, eos, + 0x04C2, 0x04C1, eos, + 0x04C4, 0x04C3, eos, // 1142 + 0x04C6, 0x04C5, eos, + 0x04C8, 0x04C7, eos, + 0x04CA, 0x04C9, eos, // 1151 + 0x04CC, 0x04CB, eos, + 0x04CE, 0x04CD, eos, + 0x04D1, 0x04D0, eos, // 1160 + 0x04D3, 0x04D2, eos, + 0x04D5, 0x04D4, eos, + 0x04D7, 0x04D6, eos, + 0x04D9, 0x04D8, eos, // 1172 + 0x04DB, 0x04DA, eos, + 0x04DD, 0x04DC, eos, + 0x04DF, 0x04DE, eos, // 1181 + 0x04E1, 0x04E0, eos, + 0x04E3, 0x04E2, eos, + 0x04E5, 0x04E4, eos, // 1190 + 0x04E7, 0x04E6, eos, + 0x04E9, 0x04E8, eos, + 0x04EB, 0x04EA, eos, + 0x04ED, 0x04EC, eos, // 1202 + 0x04EF, 0x04EE, eos, + 0x04F1, 0x04F0, eos, + 0x04F3, 0x04F2, eos, // 1211 + 0x04F5, 0x04F4, eos, + 0x04F7, 0x04F6, eos, + 0x04F9, 0x04F8, eos, // 1220 + 0x04FB, 0x04FA, eos, + 0x04FD, 0x04FC, eos, + 0x04FF, 0x04FE, eos, + 0x0501, 0x0500, eos, // 1232 + 0x0503, 0x0502, eos, + 0x0505, 0x0504, eos, + 0x0507, 0x0506, eos, // 1241 + 0x0509, 0x0508, eos, + 0x050B, 0x050A, eos, + 0x050D, 0x050C, eos, // 1250 + 0x050F, 0x050E, eos, + 0x0511, 0x0510, eos, + 0x0513, 0x0512, eos, + 0x0515, 0x0514, eos, // 1262 + 0x0517, 0x0516, eos, + 0x0519, 0x0518, eos, + 0x051B, 0x051A, eos, // 1271 + 0x051D, 0x051C, eos, + 0x051F, 0x051E, eos, + 0x0521, 0x0520, eos, // 1280 + 0x0523, 0x0522, eos, + 0x0525, 0x0524, eos, + 0x0527, 0x0526, eos, + 0x0529, 0x0528, eos, // 1292 + 0x052B, 0x052A, eos, + 0x052D, 0x052C, eos, + 0x052F, 0x052E, eos, // 1301 + 0x0561, 0x0531, eos, + 0x0562, 0x0532, eos, + 0x0563, 0x0533, eos, // 1310 + 0x0564, 0x0534, eos, + 0x0565, 0x0535, eos, + 0x0566, 0x0536, eos, + 0x0567, 0x0537, eos, // 1322 + 0x0568, 0x0538, eos, + 0x0569, 0x0539, eos, + 0x056A, 0x053A, eos, // 1331 + 0x056B, 0x053B, eos, + 0x056C, 0x053C, eos, + 0x056D, 0x053D, eos, // 1340 + 0x056E, 0x053E, eos, + 0x056F, 0x053F, eos, + 0x0570, 0x0540, eos, + 0x0571, 0x0541, eos, // 1352 + 0x0572, 0x0542, eos, + 0x0573, 0x0543, eos, + 0x0574, 0x0544, eos, // 1361 + 0x0575, 0x0545, eos, + 0x0576, 0x0546, eos, + 0x0577, 0x0547, eos, // 1370 + 0x0578, 0x0548, eos, + 0x0579, 0x0549, eos, + 0x057A, 0x054A, eos, + 0x057B, 0x054B, eos, // 1382 + 0x057C, 0x054C, eos, + 0x057D, 0x054D, eos, + 0x057E, 0x054E, eos, // 1391 + 0x057F, 0x054F, eos, + 0x0580, 0x0550, eos, + 0x0581, 0x0551, eos, // 1400 + 0x0582, 0x0552, eos, + 0x0583, 0x0553, eos, + 0x0584, 0x0554, eos, + 0x0585, 0x0555, eos, // 1412 + 0x0586, 0x0556, eos, + 0x2D00, 0x10A0, eos, + 0x2D01, 0x10A1, eos, // 1421 + 0x2D02, 0x10A2, eos, + 0x2D03, 0x10A3, eos, + 0x2D04, 0x10A4, eos, // 1430 + 0x2D05, 0x10A5, eos, + 0x2D06, 0x10A6, eos, + 0x2D07, 0x10A7, eos, + 0x2D08, 0x10A8, eos, // 1442 + 0x2D09, 0x10A9, eos, + 0x2D0A, 0x10AA, eos, + 0x2D0B, 0x10AB, eos, // 1451 + 0x2D0C, 0x10AC, eos, + 0x2D0D, 0x10AD, eos, + 0x2D0E, 0x10AE, eos, // 1460 + 0x2D0F, 0x10AF, eos, + 0x2D10, 0x10B0, eos, + 0x2D11, 0x10B1, eos, + 0x2D12, 0x10B2, eos, // 1472 + 0x2D13, 0x10B3, eos, + 0x2D14, 0x10B4, eos, + 0x2D15, 0x10B5, eos, // 1481 + 0x2D16, 0x10B6, eos, + 0x2D17, 0x10B7, eos, + 0x2D18, 0x10B8, eos, // 1490 + 0x2D19, 0x10B9, eos, + 0x2D1A, 0x10BA, eos, + 0x2D1B, 0x10BB, eos, + 0x2D1C, 0x10BC, eos, // 1502 + 0x2D1D, 0x10BD, eos, + 0x2D1E, 0x10BE, eos, + 0x2D1F, 0x10BF, eos, // 1511 + 0x2D20, 0x10C0, eos, + 0x2D21, 0x10C1, eos, + 0x2D22, 0x10C2, eos, // 1520 + 0x2D23, 0x10C3, eos, + 0x2D24, 0x10C4, eos, + 0x2D25, 0x10C5, eos, + 0x2D27, 0x10C7, eos, // 1532 + 0x2D2D, 0x10CD, eos, + 0x13F0, 0x13F8, eos, + 0x13F1, 0x13F9, eos, // 1541 + 0x13F2, 0x13FA, eos, + 0x13F3, 0x13FB, eos, + 0x13F4, 0x13FC, eos, // 1550 + 0x13F5, 0x13FD, eos, + 0xA64B, 0x1C88, 0xA64A, eos, + 0x10D0, 0x1C90, eos, // 1560 + 0x10D1, 0x1C91, eos, + 0x10D2, 0x1C92, eos, + 0x10D3, 0x1C93, eos, + 0x10D4, 0x1C94, eos, // 1572 + 0x10D5, 0x1C95, eos, + 0x10D6, 0x1C96, eos, + 0x10D7, 0x1C97, eos, // 1581 + 0x10D8, 0x1C98, eos, + 0x10D9, 0x1C99, eos, + 0x10DA, 0x1C9A, eos, // 1590 + 0x10DB, 0x1C9B, eos, + 0x10DC, 0x1C9C, eos, + 0x10DD, 0x1C9D, eos, + 0x10DE, 0x1C9E, eos, // 1602 + 0x10DF, 0x1C9F, eos, + 0x10E0, 0x1CA0, eos, + 0x10E1, 0x1CA1, eos, // 1611 + 0x10E2, 0x1CA2, eos, + 0x10E3, 0x1CA3, eos, + 0x10E4, 0x1CA4, eos, // 1620 + 0x10E5, 0x1CA5, eos, + 0x10E6, 0x1CA6, eos, + 0x10E7, 0x1CA7, eos, + 0x10E8, 0x1CA8, eos, // 1632 + 0x10E9, 0x1CA9, eos, + 0x10EA, 0x1CAA, eos, + 0x10EB, 0x1CAB, eos, // 1641 + 0x10EC, 0x1CAC, eos, + 0x10ED, 0x1CAD, eos, + 0x10EE, 0x1CAE, eos, // 1650 + 0x10EF, 0x1CAF, eos, + 0x10F0, 0x1CB0, eos, + 0x10F1, 0x1CB1, eos, + 0x10F2, 0x1CB2, eos, // 1662 + 0x10F3, 0x1CB3, eos, + 0x10F4, 0x1CB4, eos, + 0x10F5, 0x1CB5, eos, // 1671 + 0x10F6, 0x1CB6, eos, + 0x10F7, 0x1CB7, eos, + 0x10F8, 0x1CB8, eos, // 1680 + 0x10F9, 0x1CB9, eos, + 0x10FA, 0x1CBA, eos, + 0x10FD, 0x1CBD, eos, + 0x10FE, 0x1CBE, eos, // 1692 + 0x10FF, 0x1CBF, eos, + 0x1E01, 0x1E00, eos, + 0x1E03, 0x1E02, eos, // 1701 + 0x1E05, 0x1E04, eos, + 0x1E07, 0x1E06, eos, + 0x1E09, 0x1E08, eos, // 1710 + 0x1E0B, 0x1E0A, eos, + 0x1E0D, 0x1E0C, eos, + 0x1E0F, 0x1E0E, eos, + 0x1E11, 0x1E10, eos, // 1722 + 0x1E13, 0x1E12, eos, + 0x1E15, 0x1E14, eos, + 0x1E17, 0x1E16, eos, // 1731 + 0x1E19, 0x1E18, eos, + 0x1E1B, 0x1E1A, eos, + 0x1E1D, 0x1E1C, eos, // 1740 + 0x1E1F, 0x1E1E, eos, + 0x1E21, 0x1E20, eos, + 0x1E23, 0x1E22, eos, + 0x1E25, 0x1E24, eos, // 1752 + 0x1E27, 0x1E26, eos, + 0x1E29, 0x1E28, eos, + 0x1E2B, 0x1E2A, eos, // 1761 + 0x1E2D, 0x1E2C, eos, + 0x1E2F, 0x1E2E, eos, + 0x1E31, 0x1E30, eos, // 1770 + 0x1E33, 0x1E32, eos, + 0x1E35, 0x1E34, eos, + 0x1E37, 0x1E36, eos, + 0x1E39, 0x1E38, eos, // 1782 + 0x1E3B, 0x1E3A, eos, + 0x1E3D, 0x1E3C, eos, + 0x1E3F, 0x1E3E, eos, // 1791 + 0x1E41, 0x1E40, eos, + 0x1E43, 0x1E42, eos, + 0x1E45, 0x1E44, eos, // 1800 + 0x1E47, 0x1E46, eos, + 0x1E49, 0x1E48, eos, + 0x1E4B, 0x1E4A, eos, + 0x1E4D, 0x1E4C, eos, // 1812 + 0x1E4F, 0x1E4E, eos, + 0x1E51, 0x1E50, eos, + 0x1E53, 0x1E52, eos, // 1821 + 0x1E55, 0x1E54, eos, + 0x1E57, 0x1E56, eos, + 0x1E59, 0x1E58, eos, // 1830 + 0x1E5B, 0x1E5A, eos, + 0x1E5D, 0x1E5C, eos, + 0x1E5F, 0x1E5E, eos, + 0x1E61, 0x1E60, 0x1E9B, eos, // 1842 + 0x1E63, 0x1E62, eos, + 0x1E65, 0x1E64, eos, + 0x1E67, 0x1E66, eos, // 1852 + 0x1E69, 0x1E68, eos, + 0x1E6B, 0x1E6A, eos, + 0x1E6D, 0x1E6C, eos, // 1861 + 0x1E6F, 0x1E6E, eos, + 0x1E71, 0x1E70, eos, + 0x1E73, 0x1E72, eos, // 1870 + 0x1E75, 0x1E74, eos, + 0x1E77, 0x1E76, eos, + 0x1E79, 0x1E78, eos, + 0x1E7B, 0x1E7A, eos, // 1882 + 0x1E7D, 0x1E7C, eos, + 0x1E7F, 0x1E7E, eos, + 0x1E81, 0x1E80, eos, // 1891 + 0x1E83, 0x1E82, eos, + 0x1E85, 0x1E84, eos, + 0x1E87, 0x1E86, eos, // 1900 + 0x1E89, 0x1E88, eos, + 0x1E8B, 0x1E8A, eos, + 0x1E8D, 0x1E8C, eos, + 0x1E8F, 0x1E8E, eos, // 1912 + 0x1E91, 0x1E90, eos, + 0x1E93, 0x1E92, eos, + 0x1E95, 0x1E94, eos, // 1921 + 0x00DF, 0x1E9E, eos, + 0x1EA1, 0x1EA0, eos, + 0x1EA3, 0x1EA2, eos, // 1930 + 0x1EA5, 0x1EA4, eos, + 0x1EA7, 0x1EA6, eos, + 0x1EA9, 0x1EA8, eos, + 0x1EAB, 0x1EAA, eos, // 1942 + 0x1EAD, 0x1EAC, eos, + 0x1EAF, 0x1EAE, eos, + 0x1EB1, 0x1EB0, eos, // 1951 + 0x1EB3, 0x1EB2, eos, + 0x1EB5, 0x1EB4, eos, + 0x1EB7, 0x1EB6, eos, // 1960 + 0x1EB9, 0x1EB8, eos, + 0x1EBB, 0x1EBA, eos, + 0x1EBD, 0x1EBC, eos, + 0x1EBF, 0x1EBE, eos, // 1972 + 0x1EC1, 0x1EC0, eos, + 0x1EC3, 0x1EC2, eos, + 0x1EC5, 0x1EC4, eos, // 1981 + 0x1EC7, 0x1EC6, eos, + 0x1EC9, 0x1EC8, eos, + 0x1ECB, 0x1ECA, eos, // 1990 + 0x1ECD, 0x1ECC, eos, + 0x1ECF, 0x1ECE, eos, + 0x1ED1, 0x1ED0, eos, + 0x1ED3, 0x1ED2, eos, // 2002 + 0x1ED5, 0x1ED4, eos, + 0x1ED7, 0x1ED6, eos, + 0x1ED9, 0x1ED8, eos, // 2011 + 0x1EDB, 0x1EDA, eos, + 0x1EDD, 0x1EDC, eos, + 0x1EDF, 0x1EDE, eos, // 2020 + 0x1EE1, 0x1EE0, eos, + 0x1EE3, 0x1EE2, eos, + 0x1EE5, 0x1EE4, eos, + 0x1EE7, 0x1EE6, eos, // 2032 + 0x1EE9, 0x1EE8, eos, + 0x1EEB, 0x1EEA, eos, + 0x1EED, 0x1EEC, eos, // 2041 + 0x1EEF, 0x1EEE, eos, + 0x1EF1, 0x1EF0, eos, + 0x1EF3, 0x1EF2, eos, // 2050 + 0x1EF5, 0x1EF4, eos, + 0x1EF7, 0x1EF6, eos, + 0x1EF9, 0x1EF8, eos, + 0x1EFB, 0x1EFA, eos, // 2062 + 0x1EFD, 0x1EFC, eos, + 0x1EFF, 0x1EFE, eos, + 0x1F00, 0x1F08, eos, // 2071 + 0x1F01, 0x1F09, eos, + 0x1F02, 0x1F0A, eos, + 0x1F03, 0x1F0B, eos, // 2080 + 0x1F04, 0x1F0C, eos, + 0x1F05, 0x1F0D, eos, + 0x1F06, 0x1F0E, eos, + 0x1F07, 0x1F0F, eos, // 2092 + 0x1F10, 0x1F18, eos, + 0x1F11, 0x1F19, eos, + 0x1F12, 0x1F1A, eos, // 2101 + 0x1F13, 0x1F1B, eos, + 0x1F14, 0x1F1C, eos, + 0x1F15, 0x1F1D, eos, // 2110 + 0x1F20, 0x1F28, eos, + 0x1F21, 0x1F29, eos, + 0x1F22, 0x1F2A, eos, + 0x1F23, 0x1F2B, eos, // 2122 + 0x1F24, 0x1F2C, eos, + 0x1F25, 0x1F2D, eos, + 0x1F26, 0x1F2E, eos, // 2131 + 0x1F27, 0x1F2F, eos, + 0x1F30, 0x1F38, eos, + 0x1F31, 0x1F39, eos, // 2140 + 0x1F32, 0x1F3A, eos, + 0x1F33, 0x1F3B, eos, + 0x1F34, 0x1F3C, eos, + 0x1F35, 0x1F3D, eos, // 2152 + 0x1F36, 0x1F3E, eos, + 0x1F37, 0x1F3F, eos, + 0x1F40, 0x1F48, eos, // 2161 + 0x1F41, 0x1F49, eos, + 0x1F42, 0x1F4A, eos, + 0x1F43, 0x1F4B, eos, // 2170 + 0x1F44, 0x1F4C, eos, + 0x1F45, 0x1F4D, eos, + 0x1F51, 0x1F59, eos, + 0x1F53, 0x1F5B, eos, // 2182 + 0x1F55, 0x1F5D, eos, + 0x1F57, 0x1F5F, eos, + 0x1F60, 0x1F68, eos, // 2191 + 0x1F61, 0x1F69, eos, + 0x1F62, 0x1F6A, eos, + 0x1F63, 0x1F6B, eos, // 2200 + 0x1F64, 0x1F6C, eos, + 0x1F65, 0x1F6D, eos, + 0x1F66, 0x1F6E, eos, + 0x1F67, 0x1F6F, eos, // 2212 + 0x1F80, 0x1F88, eos, + 0x1F81, 0x1F89, eos, + 0x1F82, 0x1F8A, eos, // 2221 + 0x1F83, 0x1F8B, eos, + 0x1F84, 0x1F8C, eos, + 0x1F85, 0x1F8D, eos, // 2230 + 0x1F86, 0x1F8E, eos, + 0x1F87, 0x1F8F, eos, + 0x1F90, 0x1F98, eos, + 0x1F91, 0x1F99, eos, // 2242 + 0x1F92, 0x1F9A, eos, + 0x1F93, 0x1F9B, eos, + 0x1F94, 0x1F9C, eos, // 2251 + 0x1F95, 0x1F9D, eos, + 0x1F96, 0x1F9E, eos, + 0x1F97, 0x1F9F, eos, // 2260 + 0x1FA0, 0x1FA8, eos, + 0x1FA1, 0x1FA9, eos, + 0x1FA2, 0x1FAA, eos, + 0x1FA3, 0x1FAB, eos, // 2272 + 0x1FA4, 0x1FAC, eos, + 0x1FA5, 0x1FAD, eos, + 0x1FA6, 0x1FAE, eos, // 2281 + 0x1FA7, 0x1FAF, eos, + 0x1FB0, 0x1FB8, eos, + 0x1FB1, 0x1FB9, eos, // 2290 + 0x1F70, 0x1FBA, eos, + 0x1F71, 0x1FBB, eos, + 0x1FB3, 0x1FBC, eos, + 0x1F72, 0x1FC8, eos, // 2302 + 0x1F73, 0x1FC9, eos, + 0x1F74, 0x1FCA, eos, + 0x1F75, 0x1FCB, eos, // 2311 + 0x1FC3, 0x1FCC, eos, + 0x1FD0, 0x1FD8, eos, + 0x1FD1, 0x1FD9, eos, // 2320 + 0x1F76, 0x1FDA, eos, + 0x1F77, 0x1FDB, eos, + 0x1FE0, 0x1FE8, eos, + 0x1FE1, 0x1FE9, eos, // 2332 + 0x1F7A, 0x1FEA, eos, + 0x1F7B, 0x1FEB, eos, + 0x1FE5, 0x1FEC, eos, // 2341 + 0x1F78, 0x1FF8, eos, + 0x1F79, 0x1FF9, eos, + 0x1F7C, 0x1FFA, eos, // 2350 + 0x1F7D, 0x1FFB, eos, + 0x1FF3, 0x1FFC, eos, + 0x214E, 0x2132, eos, + 0x2170, 0x2160, eos, // 2362 + 0x2171, 0x2161, eos, + 0x2172, 0x2162, eos, + 0x2173, 0x2163, eos, // 2371 + 0x2174, 0x2164, eos, + 0x2175, 0x2165, eos, + 0x2176, 0x2166, eos, // 2380 + 0x2177, 0x2167, eos, + 0x2178, 0x2168, eos, + 0x2179, 0x2169, eos, + 0x217A, 0x216A, eos, // 2392 + 0x217B, 0x216B, eos, + 0x217C, 0x216C, eos, + 0x217D, 0x216D, eos, // 2401 + 0x217E, 0x216E, eos, + 0x217F, 0x216F, eos, + 0x2184, 0x2183, eos, // 2410 + 0x24D0, 0x24B6, eos, + 0x24D1, 0x24B7, eos, + 0x24D2, 0x24B8, eos, + 0x24D3, 0x24B9, eos, // 2422 + 0x24D4, 0x24BA, eos, + 0x24D5, 0x24BB, eos, + 0x24D6, 0x24BC, eos, // 2431 + 0x24D7, 0x24BD, eos, + 0x24D8, 0x24BE, eos, + 0x24D9, 0x24BF, eos, // 2440 + 0x24DA, 0x24C0, eos, + 0x24DB, 0x24C1, eos, + 0x24DC, 0x24C2, eos, + 0x24DD, 0x24C3, eos, // 2452 + 0x24DE, 0x24C4, eos, + 0x24DF, 0x24C5, eos, + 0x24E0, 0x24C6, eos, // 2461 + 0x24E1, 0x24C7, eos, + 0x24E2, 0x24C8, eos, + 0x24E3, 0x24C9, eos, // 2470 + 0x24E4, 0x24CA, eos, + 0x24E5, 0x24CB, eos, + 0x24E6, 0x24CC, eos, + 0x24E7, 0x24CD, eos, // 2482 + 0x24E8, 0x24CE, eos, + 0x24E9, 0x24CF, eos, + 0x2C30, 0x2C00, eos, // 2491 + 0x2C31, 0x2C01, eos, + 0x2C32, 0x2C02, eos, + 0x2C33, 0x2C03, eos, // 2500 + 0x2C34, 0x2C04, eos, + 0x2C35, 0x2C05, eos, + 0x2C36, 0x2C06, eos, + 0x2C37, 0x2C07, eos, // 2512 + 0x2C38, 0x2C08, eos, + 0x2C39, 0x2C09, eos, + 0x2C3A, 0x2C0A, eos, // 2521 + 0x2C3B, 0x2C0B, eos, + 0x2C3C, 0x2C0C, eos, + 0x2C3D, 0x2C0D, eos, // 2530 + 0x2C3E, 0x2C0E, eos, + 0x2C3F, 0x2C0F, eos, + 0x2C40, 0x2C10, eos, + 0x2C41, 0x2C11, eos, // 2542 + 0x2C42, 0x2C12, eos, + 0x2C43, 0x2C13, eos, + 0x2C44, 0x2C14, eos, // 2551 + 0x2C45, 0x2C15, eos, + 0x2C46, 0x2C16, eos, + 0x2C47, 0x2C17, eos, // 2560 + 0x2C48, 0x2C18, eos, + 0x2C49, 0x2C19, eos, + 0x2C4A, 0x2C1A, eos, + 0x2C4B, 0x2C1B, eos, // 2572 + 0x2C4C, 0x2C1C, eos, + 0x2C4D, 0x2C1D, eos, + 0x2C4E, 0x2C1E, eos, // 2581 + 0x2C4F, 0x2C1F, eos, + 0x2C50, 0x2C20, eos, + 0x2C51, 0x2C21, eos, // 2590 + 0x2C52, 0x2C22, eos, + 0x2C53, 0x2C23, eos, + 0x2C54, 0x2C24, eos, + 0x2C55, 0x2C25, eos, // 2602 + 0x2C56, 0x2C26, eos, + 0x2C57, 0x2C27, eos, + 0x2C58, 0x2C28, eos, // 2611 + 0x2C59, 0x2C29, eos, + 0x2C5A, 0x2C2A, eos, + 0x2C5B, 0x2C2B, eos, // 2620 + 0x2C5C, 0x2C2C, eos, + 0x2C5D, 0x2C2D, eos, + 0x2C5E, 0x2C2E, eos, + 0x2C5F, 0x2C2F, eos, // 2632 + 0x2C61, 0x2C60, eos, + 0x026B, 0x2C62, eos, + 0x1D7D, 0x2C63, eos, // 2641 + 0x027D, 0x2C64, eos, + 0x2C68, 0x2C67, eos, + 0x2C6A, 0x2C69, eos, // 2650 + 0x2C6C, 0x2C6B, eos, + 0x0251, 0x2C6D, eos, + 0x0271, 0x2C6E, eos, + 0x0250, 0x2C6F, eos, // 2662 + 0x0252, 0x2C70, eos, + 0x2C73, 0x2C72, eos, + 0x2C76, 0x2C75, eos, // 2671 + 0x023F, 0x2C7E, eos, + 0x0240, 0x2C7F, eos, + 0x2C81, 0x2C80, eos, // 2680 + 0x2C83, 0x2C82, eos, + 0x2C85, 0x2C84, eos, + 0x2C87, 0x2C86, eos, + 0x2C89, 0x2C88, eos, // 2692 + 0x2C8B, 0x2C8A, eos, + 0x2C8D, 0x2C8C, eos, + 0x2C8F, 0x2C8E, eos, // 2701 + 0x2C91, 0x2C90, eos, + 0x2C93, 0x2C92, eos, + 0x2C95, 0x2C94, eos, // 2710 + 0x2C97, 0x2C96, eos, + 0x2C99, 0x2C98, eos, + 0x2C9B, 0x2C9A, eos, + 0x2C9D, 0x2C9C, eos, // 2722 + 0x2C9F, 0x2C9E, eos, + 0x2CA1, 0x2CA0, eos, + 0x2CA3, 0x2CA2, eos, // 2731 + 0x2CA5, 0x2CA4, eos, + 0x2CA7, 0x2CA6, eos, + 0x2CA9, 0x2CA8, eos, // 2740 + 0x2CAB, 0x2CAA, eos, + 0x2CAD, 0x2CAC, eos, + 0x2CAF, 0x2CAE, eos, + 0x2CB1, 0x2CB0, eos, // 2752 + 0x2CB3, 0x2CB2, eos, + 0x2CB5, 0x2CB4, eos, + 0x2CB7, 0x2CB6, eos, // 2761 + 0x2CB9, 0x2CB8, eos, + 0x2CBB, 0x2CBA, eos, + 0x2CBD, 0x2CBC, eos, // 2770 + 0x2CBF, 0x2CBE, eos, + 0x2CC1, 0x2CC0, eos, + 0x2CC3, 0x2CC2, eos, + 0x2CC5, 0x2CC4, eos, // 2782 + 0x2CC7, 0x2CC6, eos, + 0x2CC9, 0x2CC8, eos, + 0x2CCB, 0x2CCA, eos, // 2791 + 0x2CCD, 0x2CCC, eos, + 0x2CCF, 0x2CCE, eos, + 0x2CD1, 0x2CD0, eos, // 2800 + 0x2CD3, 0x2CD2, eos, + 0x2CD5, 0x2CD4, eos, + 0x2CD7, 0x2CD6, eos, + 0x2CD9, 0x2CD8, eos, // 2812 + 0x2CDB, 0x2CDA, eos, + 0x2CDD, 0x2CDC, eos, + 0x2CDF, 0x2CDE, eos, // 2821 + 0x2CE1, 0x2CE0, eos, + 0x2CE3, 0x2CE2, eos, + 0x2CEC, 0x2CEB, eos, // 2830 + 0x2CEE, 0x2CED, eos, + 0x2CF3, 0x2CF2, eos, + 0xA641, 0xA640, eos, + 0xA643, 0xA642, eos, // 2842 + 0xA645, 0xA644, eos, + 0xA647, 0xA646, eos, + 0xA649, 0xA648, eos, // 2851 + 0xA64D, 0xA64C, eos, + 0xA64F, 0xA64E, eos, + 0xA651, 0xA650, eos, // 2860 + 0xA653, 0xA652, eos, + 0xA655, 0xA654, eos, + 0xA657, 0xA656, eos, + 0xA659, 0xA658, eos, // 2872 + 0xA65B, 0xA65A, eos, + 0xA65D, 0xA65C, eos, + 0xA65F, 0xA65E, eos, // 2881 + 0xA661, 0xA660, eos, + 0xA663, 0xA662, eos, + 0xA665, 0xA664, eos, // 2890 + 0xA667, 0xA666, eos, + 0xA669, 0xA668, eos, + 0xA66B, 0xA66A, eos, + 0xA66D, 0xA66C, eos, // 2902 + 0xA681, 0xA680, eos, + 0xA683, 0xA682, eos, + 0xA685, 0xA684, eos, // 2911 + 0xA687, 0xA686, eos, + 0xA689, 0xA688, eos, + 0xA68B, 0xA68A, eos, // 2920 + 0xA68D, 0xA68C, eos, + 0xA68F, 0xA68E, eos, + 0xA691, 0xA690, eos, + 0xA693, 0xA692, eos, // 2932 + 0xA695, 0xA694, eos, + 0xA697, 0xA696, eos, + 0xA699, 0xA698, eos, // 2941 + 0xA69B, 0xA69A, eos, + 0xA723, 0xA722, eos, + 0xA725, 0xA724, eos, // 2950 + 0xA727, 0xA726, eos, + 0xA729, 0xA728, eos, + 0xA72B, 0xA72A, eos, + 0xA72D, 0xA72C, eos, // 2962 + 0xA72F, 0xA72E, eos, + 0xA733, 0xA732, eos, + 0xA735, 0xA734, eos, // 2971 + 0xA737, 0xA736, eos, + 0xA739, 0xA738, eos, + 0xA73B, 0xA73A, eos, // 2980 + 0xA73D, 0xA73C, eos, + 0xA73F, 0xA73E, eos, + 0xA741, 0xA740, eos, + 0xA743, 0xA742, eos, // 2992 + 0xA745, 0xA744, eos, + 0xA747, 0xA746, eos, + 0xA749, 0xA748, eos, // 3001 + 0xA74B, 0xA74A, eos, + 0xA74D, 0xA74C, eos, + 0xA74F, 0xA74E, eos, // 3010 + 0xA751, 0xA750, eos, + 0xA753, 0xA752, eos, + 0xA755, 0xA754, eos, + 0xA757, 0xA756, eos, // 3022 + 0xA759, 0xA758, eos, + 0xA75B, 0xA75A, eos, + 0xA75D, 0xA75C, eos, // 3031 + 0xA75F, 0xA75E, eos, + 0xA761, 0xA760, eos, + 0xA763, 0xA762, eos, // 3040 + 0xA765, 0xA764, eos, + 0xA767, 0xA766, eos, + 0xA769, 0xA768, eos, + 0xA76B, 0xA76A, eos, // 3052 + 0xA76D, 0xA76C, eos, + 0xA76F, 0xA76E, eos, + 0xA77A, 0xA779, eos, // 3061 + 0xA77C, 0xA77B, eos, + 0x1D79, 0xA77D, eos, + 0xA77F, 0xA77E, eos, // 3070 + 0xA781, 0xA780, eos, + 0xA783, 0xA782, eos, + 0xA785, 0xA784, eos, + 0xA787, 0xA786, eos, // 3082 + 0xA78C, 0xA78B, eos, + 0x0265, 0xA78D, eos, + 0xA791, 0xA790, eos, // 3091 + 0xA793, 0xA792, eos, + 0xA797, 0xA796, eos, + 0xA799, 0xA798, eos, // 3100 + 0xA79B, 0xA79A, eos, + 0xA79D, 0xA79C, eos, + 0xA79F, 0xA79E, eos, + 0xA7A1, 0xA7A0, eos, // 3112 + 0xA7A3, 0xA7A2, eos, + 0xA7A5, 0xA7A4, eos, + 0xA7A7, 0xA7A6, eos, // 3121 + 0xA7A9, 0xA7A8, eos, + 0x0266, 0xA7AA, eos, + 0x025C, 0xA7AB, eos, // 3130 + 0x0261, 0xA7AC, eos, + 0x026C, 0xA7AD, eos, + 0x026A, 0xA7AE, eos, + 0x029E, 0xA7B0, eos, // 3142 + 0x0287, 0xA7B1, eos, + 0x029D, 0xA7B2, eos, + 0xAB53, 0xA7B3, eos, // 3151 + 0xA7B5, 0xA7B4, eos, + 0xA7B7, 0xA7B6, eos, + 0xA7B9, 0xA7B8, eos, // 3160 + 0xA7BB, 0xA7BA, eos, + 0xA7BD, 0xA7BC, eos, + 0xA7BF, 0xA7BE, eos, + 0xA7C1, 0xA7C0, eos, // 3172 + 0xA7C3, 0xA7C2, eos, + 0xA794, 0xA7C4, eos, + 0x0282, 0xA7C5, eos, // 3181 + 0x1D8E, 0xA7C6, eos, + 0xA7C8, 0xA7C7, eos, + 0xA7CA, 0xA7C9, eos, // 3190 + 0xA7D1, 0xA7D0, eos, + 0xA7D7, 0xA7D6, eos, + 0xA7D9, 0xA7D8, eos, + 0xA7F6, 0xA7F5, eos, // 3202 + 0x13A0, 0xAB70, eos, + 0x13A1, 0xAB71, eos, + 0x13A2, 0xAB72, eos, // 3211 + 0x13A3, 0xAB73, eos, + 0x13A4, 0xAB74, eos, + 0x13A5, 0xAB75, eos, // 3220 + 0x13A6, 0xAB76, eos, + 0x13A7, 0xAB77, eos, + 0x13A8, 0xAB78, eos, + 0x13A9, 0xAB79, eos, // 3232 + 0x13AA, 0xAB7A, eos, + 0x13AB, 0xAB7B, eos, + 0x13AC, 0xAB7C, eos, // 3241 + 0x13AD, 0xAB7D, eos, + 0x13AE, 0xAB7E, eos, + 0x13AF, 0xAB7F, eos, // 3250 + 0x13B0, 0xAB80, eos, + 0x13B1, 0xAB81, eos, + 0x13B2, 0xAB82, eos, + 0x13B3, 0xAB83, eos, // 3262 + 0x13B4, 0xAB84, eos, + 0x13B5, 0xAB85, eos, + 0x13B6, 0xAB86, eos, // 3271 + 0x13B7, 0xAB87, eos, + 0x13B8, 0xAB88, eos, + 0x13B9, 0xAB89, eos, // 3280 + 0x13BA, 0xAB8A, eos, + 0x13BB, 0xAB8B, eos, + 0x13BC, 0xAB8C, eos, + 0x13BD, 0xAB8D, eos, // 3292 + 0x13BE, 0xAB8E, eos, + 0x13BF, 0xAB8F, eos, + 0x13C0, 0xAB90, eos, // 3301 + 0x13C1, 0xAB91, eos, + 0x13C2, 0xAB92, eos, + 0x13C3, 0xAB93, eos, // 3310 + 0x13C4, 0xAB94, eos, + 0x13C5, 0xAB95, eos, + 0x13C6, 0xAB96, eos, + 0x13C7, 0xAB97, eos, // 3322 + 0x13C8, 0xAB98, eos, + 0x13C9, 0xAB99, eos, + 0x13CA, 0xAB9A, eos, // 3331 + 0x13CB, 0xAB9B, eos, + 0x13CC, 0xAB9C, eos, + 0x13CD, 0xAB9D, eos, // 3340 + 0x13CE, 0xAB9E, eos, + 0x13CF, 0xAB9F, eos, + 0x13D0, 0xABA0, eos, + 0x13D1, 0xABA1, eos, // 3352 + 0x13D2, 0xABA2, eos, + 0x13D3, 0xABA3, eos, + 0x13D4, 0xABA4, eos, // 3361 + 0x13D5, 0xABA5, eos, + 0x13D6, 0xABA6, eos, + 0x13D7, 0xABA7, eos, // 3370 + 0x13D8, 0xABA8, eos, + 0x13D9, 0xABA9, eos, + 0x13DA, 0xABAA, eos, + 0x13DB, 0xABAB, eos, // 3382 + 0x13DC, 0xABAC, eos, + 0x13DD, 0xABAD, eos, + 0x13DE, 0xABAE, eos, // 3391 + 0x13DF, 0xABAF, eos, + 0x13E0, 0xABB0, eos, + 0x13E1, 0xABB1, eos, // 3400 + 0x13E2, 0xABB2, eos, + 0x13E3, 0xABB3, eos, + 0x13E4, 0xABB4, eos, + 0x13E5, 0xABB5, eos, // 3412 + 0x13E6, 0xABB6, eos, + 0x13E7, 0xABB7, eos, + 0x13E8, 0xABB8, eos, // 3421 + 0x13E9, 0xABB9, eos, + 0x13EA, 0xABBA, eos, + 0x13EB, 0xABBB, eos, // 3430 + 0x13EC, 0xABBC, eos, + 0x13ED, 0xABBD, eos, + 0x13EE, 0xABBE, eos, + 0x13EF, 0xABBF, eos, // 3442 + 0xFF41, 0xFF21, eos, + 0xFF42, 0xFF22, eos, + 0xFF43, 0xFF23, eos, // 3451 + 0xFF44, 0xFF24, eos, + 0xFF45, 0xFF25, eos, + 0xFF46, 0xFF26, eos, // 3460 + 0xFF47, 0xFF27, eos, + 0xFF48, 0xFF28, eos, + 0xFF49, 0xFF29, eos, + 0xFF4A, 0xFF2A, eos, // 3472 + 0xFF4B, 0xFF2B, eos, + 0xFF4C, 0xFF2C, eos, + 0xFF4D, 0xFF2D, eos, // 3481 + 0xFF4E, 0xFF2E, eos, + 0xFF4F, 0xFF2F, eos, + 0xFF50, 0xFF30, eos, // 3490 + 0xFF51, 0xFF31, eos, + 0xFF52, 0xFF32, eos, + 0xFF53, 0xFF33, eos, + 0xFF54, 0xFF34, eos, // 3502 + 0xFF55, 0xFF35, eos, + 0xFF56, 0xFF36, eos, + 0xFF57, 0xFF37, eos, // 3511 + 0xFF58, 0xFF38, eos, + 0xFF59, 0xFF39, eos, + 0xFF5A, 0xFF3A, eos, // 3520 + 0x10428, 0x10400, eos, + 0x10429, 0x10401, eos, + 0x1042A, 0x10402, eos, + 0x1042B, 0x10403, eos, // 3532 + 0x1042C, 0x10404, eos, + 0x1042D, 0x10405, eos, + 0x1042E, 0x10406, eos, // 3541 + 0x1042F, 0x10407, eos, + 0x10430, 0x10408, eos, + 0x10431, 0x10409, eos, // 3550 + 0x10432, 0x1040A, eos, + 0x10433, 0x1040B, eos, + 0x10434, 0x1040C, eos, + 0x10435, 0x1040D, eos, // 3562 + 0x10436, 0x1040E, eos, + 0x10437, 0x1040F, eos, + 0x10438, 0x10410, eos, // 3571 + 0x10439, 0x10411, eos, + 0x1043A, 0x10412, eos, + 0x1043B, 0x10413, eos, // 3580 + 0x1043C, 0x10414, eos, + 0x1043D, 0x10415, eos, + 0x1043E, 0x10416, eos, + 0x1043F, 0x10417, eos, // 3592 + 0x10440, 0x10418, eos, + 0x10441, 0x10419, eos, + 0x10442, 0x1041A, eos, // 3601 + 0x10443, 0x1041B, eos, + 0x10444, 0x1041C, eos, + 0x10445, 0x1041D, eos, // 3610 + 0x10446, 0x1041E, eos, + 0x10447, 0x1041F, eos, + 0x10448, 0x10420, eos, + 0x10449, 0x10421, eos, // 3622 + 0x1044A, 0x10422, eos, + 0x1044B, 0x10423, eos, + 0x1044C, 0x10424, eos, // 3631 + 0x1044D, 0x10425, eos, + 0x1044E, 0x10426, eos, + 0x1044F, 0x10427, eos, // 3640 + 0x104D8, 0x104B0, eos, + 0x104D9, 0x104B1, eos, + 0x104DA, 0x104B2, eos, + 0x104DB, 0x104B3, eos, // 3652 + 0x104DC, 0x104B4, eos, + 0x104DD, 0x104B5, eos, + 0x104DE, 0x104B6, eos, // 3661 + 0x104DF, 0x104B7, eos, + 0x104E0, 0x104B8, eos, + 0x104E1, 0x104B9, eos, // 3670 + 0x104E2, 0x104BA, eos, + 0x104E3, 0x104BB, eos, + 0x104E4, 0x104BC, eos, + 0x104E5, 0x104BD, eos, // 3682 + 0x104E6, 0x104BE, eos, + 0x104E7, 0x104BF, eos, + 0x104E8, 0x104C0, eos, // 3691 + 0x104E9, 0x104C1, eos, + 0x104EA, 0x104C2, eos, + 0x104EB, 0x104C3, eos, // 3700 + 0x104EC, 0x104C4, eos, + 0x104ED, 0x104C5, eos, + 0x104EE, 0x104C6, eos, + 0x104EF, 0x104C7, eos, // 3712 + 0x104F0, 0x104C8, eos, + 0x104F1, 0x104C9, eos, + 0x104F2, 0x104CA, eos, // 3721 + 0x104F3, 0x104CB, eos, + 0x104F4, 0x104CC, eos, + 0x104F5, 0x104CD, eos, // 3730 + 0x104F6, 0x104CE, eos, + 0x104F7, 0x104CF, eos, + 0x104F8, 0x104D0, eos, + 0x104F9, 0x104D1, eos, // 3742 + 0x104FA, 0x104D2, eos, + 0x104FB, 0x104D3, eos, + 0x10597, 0x10570, eos, // 3751 + 0x10598, 0x10571, eos, + 0x10599, 0x10572, eos, + 0x1059A, 0x10573, eos, // 3760 + 0x1059B, 0x10574, eos, + 0x1059C, 0x10575, eos, + 0x1059D, 0x10576, eos, + 0x1059E, 0x10577, eos, // 3772 + 0x1059F, 0x10578, eos, + 0x105A0, 0x10579, eos, + 0x105A1, 0x1057A, eos, // 3781 + 0x105A3, 0x1057C, eos, + 0x105A4, 0x1057D, eos, + 0x105A5, 0x1057E, eos, // 3790 + 0x105A6, 0x1057F, eos, + 0x105A7, 0x10580, eos, + 0x105A8, 0x10581, eos, + 0x105A9, 0x10582, eos, // 3802 + 0x105AA, 0x10583, eos, + 0x105AB, 0x10584, eos, + 0x105AC, 0x10585, eos, // 3811 + 0x105AD, 0x10586, eos, + 0x105AE, 0x10587, eos, + 0x105AF, 0x10588, eos, // 3820 + 0x105B0, 0x10589, eos, + 0x105B1, 0x1058A, eos, + 0x105B3, 0x1058C, eos, + 0x105B4, 0x1058D, eos, // 3832 + 0x105B5, 0x1058E, eos, + 0x105B6, 0x1058F, eos, + 0x105B7, 0x10590, eos, // 3841 + 0x105B8, 0x10591, eos, + 0x105B9, 0x10592, eos, + 0x105BB, 0x10594, eos, // 3850 + 0x105BC, 0x10595, eos, + 0x10CC0, 0x10C80, eos, + 0x10CC1, 0x10C81, eos, + 0x10CC2, 0x10C82, eos, // 3862 + 0x10CC3, 0x10C83, eos, + 0x10CC4, 0x10C84, eos, + 0x10CC5, 0x10C85, eos, // 3871 + 0x10CC6, 0x10C86, eos, + 0x10CC7, 0x10C87, eos, + 0x10CC8, 0x10C88, eos, // 3880 + 0x10CC9, 0x10C89, eos, + 0x10CCA, 0x10C8A, eos, + 0x10CCB, 0x10C8B, eos, + 0x10CCC, 0x10C8C, eos, // 3892 + 0x10CCD, 0x10C8D, eos, + 0x10CCE, 0x10C8E, eos, + 0x10CCF, 0x10C8F, eos, // 3901 + 0x10CD0, 0x10C90, eos, + 0x10CD1, 0x10C91, eos, + 0x10CD2, 0x10C92, eos, // 3910 + 0x10CD3, 0x10C93, eos, + 0x10CD4, 0x10C94, eos, + 0x10CD5, 0x10C95, eos, + 0x10CD6, 0x10C96, eos, // 3922 + 0x10CD7, 0x10C97, eos, + 0x10CD8, 0x10C98, eos, + 0x10CD9, 0x10C99, eos, // 3931 + 0x10CDA, 0x10C9A, eos, + 0x10CDB, 0x10C9B, eos, + 0x10CDC, 0x10C9C, eos, // 3940 + 0x10CDD, 0x10C9D, eos, + 0x10CDE, 0x10C9E, eos, + 0x10CDF, 0x10C9F, eos, + 0x10CE0, 0x10CA0, eos, // 3952 + 0x10CE1, 0x10CA1, eos, + 0x10CE2, 0x10CA2, eos, + 0x10CE3, 0x10CA3, eos, // 3961 + 0x10CE4, 0x10CA4, eos, + 0x10CE5, 0x10CA5, eos, + 0x10CE6, 0x10CA6, eos, // 3970 + 0x10CE7, 0x10CA7, eos, + 0x10CE8, 0x10CA8, eos, + 0x10CE9, 0x10CA9, eos, + 0x10CEA, 0x10CAA, eos, // 3982 + 0x10CEB, 0x10CAB, eos, + 0x10CEC, 0x10CAC, eos, + 0x10CED, 0x10CAD, eos, // 3991 + 0x10CEE, 0x10CAE, eos, + 0x10CEF, 0x10CAF, eos, + 0x10CF0, 0x10CB0, eos, // 4000 + 0x10CF1, 0x10CB1, eos, + 0x10CF2, 0x10CB2, eos, + 0x118C0, 0x118A0, eos, + 0x118C1, 0x118A1, eos, // 4012 + 0x118C2, 0x118A2, eos, + 0x118C3, 0x118A3, eos, + 0x118C4, 0x118A4, eos, // 4021 + 0x118C5, 0x118A5, eos, + 0x118C6, 0x118A6, eos, + 0x118C7, 0x118A7, eos, // 4030 + 0x118C8, 0x118A8, eos, + 0x118C9, 0x118A9, eos, + 0x118CA, 0x118AA, eos, + 0x118CB, 0x118AB, eos, // 4042 + 0x118CC, 0x118AC, eos, + 0x118CD, 0x118AD, eos, + 0x118CE, 0x118AE, eos, // 4051 + 0x118CF, 0x118AF, eos, + 0x118D0, 0x118B0, eos, + 0x118D1, 0x118B1, eos, // 4060 + 0x118D2, 0x118B2, eos, + 0x118D3, 0x118B3, eos, + 0x118D4, 0x118B4, eos, + 0x118D5, 0x118B5, eos, // 4072 + 0x118D6, 0x118B6, eos, + 0x118D7, 0x118B7, eos, + 0x118D8, 0x118B8, eos, // 4081 + 0x118D9, 0x118B9, eos, + 0x118DA, 0x118BA, eos, + 0x118DB, 0x118BB, eos, // 4090 + 0x118DC, 0x118BC, eos, + 0x118DD, 0x118BD, eos, + 0x118DE, 0x118BE, eos, + 0x118DF, 0x118BF, eos, // 4102 + 0x16E60, 0x16E40, eos, + 0x16E61, 0x16E41, eos, + 0x16E62, 0x16E42, eos, // 4111 + 0x16E63, 0x16E43, eos, + 0x16E64, 0x16E44, eos, + 0x16E65, 0x16E45, eos, // 4120 + 0x16E66, 0x16E46, eos, + 0x16E67, 0x16E47, eos, + 0x16E68, 0x16E48, eos, + 0x16E69, 0x16E49, eos, // 4132 + 0x16E6A, 0x16E4A, eos, + 0x16E6B, 0x16E4B, eos, + 0x16E6C, 0x16E4C, eos, // 4141 + 0x16E6D, 0x16E4D, eos, + 0x16E6E, 0x16E4E, eos, + 0x16E6F, 0x16E4F, eos, // 4150 + 0x16E70, 0x16E50, eos, + 0x16E71, 0x16E51, eos, + 0x16E72, 0x16E52, eos, + 0x16E73, 0x16E53, eos, // 4162 + 0x16E74, 0x16E54, eos, + 0x16E75, 0x16E55, eos, + 0x16E76, 0x16E56, eos, // 4171 + 0x16E77, 0x16E57, eos, + 0x16E78, 0x16E58, eos, + 0x16E79, 0x16E59, eos, // 4180 + 0x16E7A, 0x16E5A, eos, + 0x16E7B, 0x16E5B, eos, + 0x16E7C, 0x16E5C, eos, + 0x16E7D, 0x16E5D, eos, // 4192 + 0x16E7E, 0x16E5E, eos, + 0x16E7F, 0x16E5F, eos, + 0x1E922, 0x1E900, eos, // 4201 + 0x1E923, 0x1E901, eos, + 0x1E924, 0x1E902, eos, + 0x1E925, 0x1E903, eos, // 4210 + 0x1E926, 0x1E904, eos, + 0x1E927, 0x1E905, eos, + 0x1E928, 0x1E906, eos, + 0x1E929, 0x1E907, eos, // 4222 + 0x1E92A, 0x1E908, eos, + 0x1E92B, 0x1E909, eos, + 0x1E92C, 0x1E90A, eos, // 4231 + 0x1E92D, 0x1E90B, eos, + 0x1E92E, 0x1E90C, eos, + 0x1E92F, 0x1E90D, eos, // 4240 + 0x1E930, 0x1E90E, eos, + 0x1E931, 0x1E90F, eos, + 0x1E932, 0x1E910, eos, + 0x1E933, 0x1E911, eos, // 4252 + 0x1E934, 0x1E912, eos, + 0x1E935, 0x1E913, eos, + 0x1E936, 0x1E914, eos, // 4261 + 0x1E937, 0x1E915, eos, + 0x1E938, 0x1E916, eos, + 0x1E939, 0x1E917, eos, // 4270 + 0x1E93A, 0x1E918, eos, + 0x1E93B, 0x1E919, eos, + 0x1E93C, 0x1E91A, eos, + 0x1E93D, 0x1E91B, eos, // 4282 + 0x1E93E, 0x1E91C, eos, + 0x1E93F, 0x1E91D, eos, + 0x1E940, 0x1E91E, eos, // 4291 + 0x1E941, 0x1E91F, eos, + 0x1E942, 0x1E920, eos, + 0x1E943, 0x1E921, eos // 4300 +}; +#define SRELL_UCFDATA_VERSION 200 diff --git a/lib/srell3_009/srell_updata.hpp b/lib/srell3_009/srell_updata.hpp new file mode 100644 index 000000000..dcbed7e1a --- /dev/null +++ b/lib/srell3_009/srell_updata.hpp @@ -0,0 +1,6000 @@ +// UnicodeData.txt +// +// PropList-14.0.0.txt +// Date: 2021-08-12, 23:13:05 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// +// DerivedCoreProperties-14.0.0.txt +// Date: 2021-08-12, 23:12:53 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// +// emoji-data-14.0.0.txt +// Date: 2021-08-26, 17:22:22 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// +// DerivedNormalizationProps-14.0.0.txt +// Date: 2021-06-04, 02:19:20 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// +// Scripts-14.0.0.txt +// Date: 2021-07-10, 00:35:31 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// +// ScriptExtensions-14.0.0.txt +// Date: 2021-06-04, 02:19:38 GMT +// © 2021 Unicode®, Inc. +// Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. +// For terms of use, see http://www.unicode.org/terms_of_use.html +// + +template +struct unicode_property_data +{ + static const T1 unknown = 0; + static const T1 gc_Other = 1; // #1 + static const T1 gc_Control = 2; // #2 + static const T1 gc_Format = 3; // #3 + static const T1 gc_Unassigned = 4; // #4 + static const T1 gc_Private_Use = 5; // #5 + static const T1 gc_Surrogate = 6; // #6 + static const T1 gc_Letter = 7; // #7 + static const T1 gc_Cased_Letter = 8; // #8 + static const T1 gc_Lowercase_Letter = 9; // #9 + static const T1 gc_Titlecase_Letter = 10; // #10 + static const T1 gc_Uppercase_Letter = 11; // #11 + static const T1 gc_Modifier_Letter = 12; // #12 + static const T1 gc_Other_Letter = 13; // #13 + static const T1 gc_Mark = 14; // #14 + static const T1 gc_Spacing_Mark = 15; // #15 + static const T1 gc_Enclosing_Mark = 16; // #16 + static const T1 gc_Nonspacing_Mark = 17; // #17 + static const T1 gc_Number = 18; // #18 + static const T1 gc_Decimal_Number = 19; // #19 + static const T1 gc_Letter_Number = 20; // #20 + static const T1 gc_Other_Number = 21; // #21 + static const T1 gc_Punctuation = 22; // #22 + static const T1 gc_Connector_Punctuation = 23; // #23 + static const T1 gc_Dash_Punctuation = 24; // #24 + static const T1 gc_Close_Punctuation = 25; // #25 + static const T1 gc_Final_Punctuation = 26; // #26 + static const T1 gc_Initial_Punctuation = 27; // #27 + static const T1 gc_Other_Punctuation = 28; // #28 + static const T1 gc_Open_Punctuation = 29; // #29 + static const T1 gc_Symbol = 30; // #30 + static const T1 gc_Currency_Symbol = 31; // #31 + static const T1 gc_Modifier_Symbol = 32; // #32 + static const T1 gc_Math_Symbol = 33; // #33 + static const T1 gc_Other_Symbol = 34; // #34 + static const T1 gc_Separator = 35; // #35 + static const T1 gc_Line_Separator = 36; // #36 + static const T1 gc_Paragraph_Separator = 37; // #37 + static const T1 gc_Space_Separator = 38; // #38 + static const T1 bp_ASCII = 39; // #39 + static const T1 bp_ASCII_Hex_Digit = 40; // #40 + static const T1 bp_Alphabetic = 41; // #41 + static const T1 bp_Any = 42; // #42 + static const T1 bp_Assigned = 43; // #43 + static const T1 bp_Bidi_Control = 44; // #44 + static const T1 bp_Bidi_Mirrored = 45; // #45 + static const T1 bp_Case_Ignorable = 46; // #46 + static const T1 bp_Cased = 47; // #47 + static const T1 bp_Changes_When_Casefolded = 48; // #48 + static const T1 bp_Changes_When_Casemapped = 49; // #49 + static const T1 bp_Changes_When_Lowercased = 50; // #50 + static const T1 bp_Changes_When_NFKC_Casefolded = 51; // #51 + static const T1 bp_Changes_When_Titlecased = 52; // #52 + static const T1 bp_Changes_When_Uppercased = 53; // #53 + static const T1 bp_Dash = 54; // #54 + static const T1 bp_Default_Ignorable_Code_Point = 55; // #55 + static const T1 bp_Deprecated = 56; // #56 + static const T1 bp_Diacritic = 57; // #57 + static const T1 bp_Emoji = 58; // #58 + static const T1 bp_Emoji_Component = 59; // #59 + static const T1 bp_Emoji_Modifier = 60; // #60 + static const T1 bp_Emoji_Modifier_Base = 61; // #61 + static const T1 bp_Emoji_Presentation = 62; // #62 + static const T1 bp_Extended_Pictographic = 63; // #63 + static const T1 bp_Extender = 64; // #64 + static const T1 bp_Grapheme_Base = 65; // #65 + static const T1 bp_Grapheme_Extend = 66; // #66 + static const T1 bp_Hex_Digit = 67; // #67 + static const T1 bp_IDS_Binary_Operator = 68; // #68 + static const T1 bp_IDS_Trinary_Operator = 69; // #69 + static const T1 bp_ID_Continue = 70; // #70 + static const T1 bp_ID_Start = 71; // #71 + static const T1 bp_Ideographic = 72; // #72 + static const T1 bp_Join_Control = 73; // #73 + static const T1 bp_Logical_Order_Exception = 74; // #74 + static const T1 bp_Lowercase = 75; // #75 + static const T1 bp_Math = 76; // #76 + static const T1 bp_Noncharacter_Code_Point = 77; // #77 + static const T1 bp_Pattern_Syntax = 78; // #78 + static const T1 bp_Pattern_White_Space = 79; // #79 + static const T1 bp_Quotation_Mark = 80; // #80 + static const T1 bp_Radical = 81; // #81 + static const T1 bp_Regional_Indicator = 82; // #82 + static const T1 bp_Sentence_Terminal = 83; // #83 + static const T1 bp_Soft_Dotted = 84; // #84 + static const T1 bp_Terminal_Punctuation = 85; // #85 + static const T1 bp_Unified_Ideograph = 86; // #86 + static const T1 bp_Uppercase = 87; // #87 + static const T1 bp_Variation_Selector = 88; // #88 + static const T1 bp_White_Space = 89; // #89 + static const T1 bp_XID_Continue = 90; // #90 + static const T1 bp_XID_Start = 91; // #91 + static const T1 sc_Adlam = 92; // #92 + static const T1 sc_Ahom = 93; // #93 + static const T1 sc_Anatolian_Hieroglyphs = 94; // #94 + static const T1 sc_Arabic = 95; // #95 + static const T1 sc_Armenian = 96; // #96 + static const T1 sc_Avestan = 97; // #97 + static const T1 sc_Balinese = 98; // #98 + static const T1 sc_Bamum = 99; // #99 + static const T1 sc_Bassa_Vah = 100; // #100 + static const T1 sc_Batak = 101; // #101 + static const T1 sc_Bengali = 102; // #102 + static const T1 sc_Bhaiksuki = 103; // #103 + static const T1 sc_Bopomofo = 104; // #104 + static const T1 sc_Brahmi = 105; // #105 + static const T1 sc_Braille = 106; // #106 + static const T1 sc_Buginese = 107; // #107 + static const T1 sc_Buhid = 108; // #108 + static const T1 sc_Canadian_Aboriginal = 109; // #109 + static const T1 sc_Carian = 110; // #110 + static const T1 sc_Caucasian_Albanian = 111; // #111 + static const T1 sc_Chakma = 112; // #112 + static const T1 sc_Cham = 113; // #113 + static const T1 sc_Cherokee = 114; // #114 + static const T1 sc_Chorasmian = 115; // #115 + static const T1 sc_Common = 116; // #116 + static const T1 sc_Coptic = 117; // #117 + static const T1 sc_Cypro_Minoan = 118; // #118 + static const T1 sc_Cuneiform = 119; // #119 + static const T1 sc_Cypriot = 120; // #120 + static const T1 sc_Cyrillic = 121; // #121 + static const T1 sc_Deseret = 122; // #122 + static const T1 sc_Devanagari = 123; // #123 + static const T1 sc_Dives_Akuru = 124; // #124 + static const T1 sc_Dogra = 125; // #125 + static const T1 sc_Duployan = 126; // #126 + static const T1 sc_Egyptian_Hieroglyphs = 127; // #127 + static const T1 sc_Elbasan = 128; // #128 + static const T1 sc_Elymaic = 129; // #129 + static const T1 sc_Ethiopic = 130; // #130 + static const T1 sc_Georgian = 131; // #131 + static const T1 sc_Glagolitic = 132; // #132 + static const T1 sc_Gothic = 133; // #133 + static const T1 sc_Grantha = 134; // #134 + static const T1 sc_Greek = 135; // #135 + static const T1 sc_Gujarati = 136; // #136 + static const T1 sc_Gunjala_Gondi = 137; // #137 + static const T1 sc_Gurmukhi = 138; // #138 + static const T1 sc_Han = 139; // #139 + static const T1 sc_Hangul = 140; // #140 + static const T1 sc_Hanifi_Rohingya = 141; // #141 + static const T1 sc_Hanunoo = 142; // #142 + static const T1 sc_Hatran = 143; // #143 + static const T1 sc_Hebrew = 144; // #144 + static const T1 sc_Hiragana = 145; // #145 + static const T1 sc_Imperial_Aramaic = 146; // #146 + static const T1 sc_Inherited = 147; // #147 + static const T1 sc_Inscriptional_Pahlavi = 148; // #148 + static const T1 sc_Inscriptional_Parthian = 149; // #149 + static const T1 sc_Javanese = 150; // #150 + static const T1 sc_Kaithi = 151; // #151 + static const T1 sc_Kannada = 152; // #152 + static const T1 sc_Katakana = 153; // #153 + static const T1 sc_Kayah_Li = 154; // #154 + static const T1 sc_Kharoshthi = 155; // #155 + static const T1 sc_Khitan_Small_Script = 156; // #156 + static const T1 sc_Khmer = 157; // #157 + static const T1 sc_Khojki = 158; // #158 + static const T1 sc_Khudawadi = 159; // #159 + static const T1 sc_Lao = 160; // #160 + static const T1 sc_Latin = 161; // #161 + static const T1 sc_Lepcha = 162; // #162 + static const T1 sc_Limbu = 163; // #163 + static const T1 sc_Linear_A = 164; // #164 + static const T1 sc_Linear_B = 165; // #165 + static const T1 sc_Lisu = 166; // #166 + static const T1 sc_Lycian = 167; // #167 + static const T1 sc_Lydian = 168; // #168 + static const T1 sc_Mahajani = 169; // #169 + static const T1 sc_Makasar = 170; // #170 + static const T1 sc_Malayalam = 171; // #171 + static const T1 sc_Mandaic = 172; // #172 + static const T1 sc_Manichaean = 173; // #173 + static const T1 sc_Marchen = 174; // #174 + static const T1 sc_Masaram_Gondi = 175; // #175 + static const T1 sc_Medefaidrin = 176; // #176 + static const T1 sc_Meetei_Mayek = 177; // #177 + static const T1 sc_Mende_Kikakui = 178; // #178 + static const T1 sc_Meroitic_Cursive = 179; // #179 + static const T1 sc_Meroitic_Hieroglyphs = 180; // #180 + static const T1 sc_Miao = 181; // #181 + static const T1 sc_Modi = 182; // #182 + static const T1 sc_Mongolian = 183; // #183 + static const T1 sc_Mro = 184; // #184 + static const T1 sc_Multani = 185; // #185 + static const T1 sc_Myanmar = 186; // #186 + static const T1 sc_Nabataean = 187; // #187 + static const T1 sc_Nandinagari = 188; // #188 + static const T1 sc_New_Tai_Lue = 189; // #189 + static const T1 sc_Newa = 190; // #190 + static const T1 sc_Nko = 191; // #191 + static const T1 sc_Nushu = 192; // #192 + static const T1 sc_Nyiakeng_Puachue_Hmong = 193; // #193 + static const T1 sc_Ogham = 194; // #194 + static const T1 sc_Ol_Chiki = 195; // #195 + static const T1 sc_Old_Hungarian = 196; // #196 + static const T1 sc_Old_Italic = 197; // #197 + static const T1 sc_Old_North_Arabian = 198; // #198 + static const T1 sc_Old_Permic = 199; // #199 + static const T1 sc_Old_Persian = 200; // #200 + static const T1 sc_Old_Sogdian = 201; // #201 + static const T1 sc_Old_South_Arabian = 202; // #202 + static const T1 sc_Old_Turkic = 203; // #203 + static const T1 sc_Old_Uyghur = 204; // #204 + static const T1 sc_Oriya = 205; // #205 + static const T1 sc_Osage = 206; // #206 + static const T1 sc_Osmanya = 207; // #207 + static const T1 sc_Pahawh_Hmong = 208; // #208 + static const T1 sc_Palmyrene = 209; // #209 + static const T1 sc_Pau_Cin_Hau = 210; // #210 + static const T1 sc_Phags_Pa = 211; // #211 + static const T1 sc_Phoenician = 212; // #212 + static const T1 sc_Psalter_Pahlavi = 213; // #213 + static const T1 sc_Rejang = 214; // #214 + static const T1 sc_Runic = 215; // #215 + static const T1 sc_Samaritan = 216; // #216 + static const T1 sc_Saurashtra = 217; // #217 + static const T1 sc_Sharada = 218; // #218 + static const T1 sc_Shavian = 219; // #219 + static const T1 sc_Siddham = 220; // #220 + static const T1 sc_SignWriting = 221; // #221 + static const T1 sc_Sinhala = 222; // #222 + static const T1 sc_Sogdian = 223; // #223 + static const T1 sc_Sora_Sompeng = 224; // #224 + static const T1 sc_Soyombo = 225; // #225 + static const T1 sc_Sundanese = 226; // #226 + static const T1 sc_Syloti_Nagri = 227; // #227 + static const T1 sc_Syriac = 228; // #228 + static const T1 sc_Tagalog = 229; // #229 + static const T1 sc_Tagbanwa = 230; // #230 + static const T1 sc_Tai_Le = 231; // #231 + static const T1 sc_Tai_Tham = 232; // #232 + static const T1 sc_Tai_Viet = 233; // #233 + static const T1 sc_Takri = 234; // #234 + static const T1 sc_Tamil = 235; // #235 + static const T1 sc_Tangsa = 236; // #236 + static const T1 sc_Tangut = 237; // #237 + static const T1 sc_Telugu = 238; // #238 + static const T1 sc_Thaana = 239; // #239 + static const T1 sc_Thai = 240; // #240 + static const T1 sc_Tibetan = 241; // #241 + static const T1 sc_Tifinagh = 242; // #242 + static const T1 sc_Tirhuta = 243; // #243 + static const T1 sc_Toto = 244; // #244 + static const T1 sc_Ugaritic = 245; // #245 + static const T1 sc_Vai = 246; // #246 + static const T1 sc_Vithkuqi = 247; // #247 + static const T1 sc_Wancho = 248; // #248 + static const T1 sc_Warang_Citi = 249; // #249 + static const T1 sc_Yezidi = 250; // #250 + static const T1 sc_Yi = 251; // #251 + static const T1 sc_Zanabazar_Square = 252; // #252 + static const T1 scx_Adlam = 253; // #253 + static const T1 scx_Ahom = 254; // #93 + static const T1 scx_Anatolian_Hieroglyphs = 255; // #94 + static const T1 scx_Arabic = 256; // #254 + static const T1 scx_Armenian = 257; // #96 + static const T1 scx_Avestan = 258; // #97 + static const T1 scx_Balinese = 259; // #98 + static const T1 scx_Bamum = 260; // #99 + static const T1 scx_Bassa_Vah = 261; // #100 + static const T1 scx_Batak = 262; // #101 + static const T1 scx_Bengali = 263; // #255 + static const T1 scx_Bhaiksuki = 264; // #103 + static const T1 scx_Bopomofo = 265; // #256 + static const T1 scx_Brahmi = 266; // #105 + static const T1 scx_Braille = 267; // #106 + static const T1 scx_Buginese = 268; // #257 + static const T1 scx_Buhid = 269; // #258 + static const T1 scx_Canadian_Aboriginal = 270; // #109 + static const T1 scx_Carian = 271; // #110 + static const T1 scx_Caucasian_Albanian = 272; // #111 + static const T1 scx_Chakma = 273; // #259 + static const T1 scx_Cham = 274; // #113 + static const T1 scx_Cherokee = 275; // #114 + static const T1 scx_Chorasmian = 276; // #115 + static const T1 scx_Common = 277; // #260 + static const T1 scx_Coptic = 278; // #261 + static const T1 scx_Cypro_Minoan = 279; // #262 + static const T1 scx_Cuneiform = 280; // #119 + static const T1 scx_Cypriot = 281; // #263 + static const T1 scx_Cyrillic = 282; // #264 + static const T1 scx_Deseret = 283; // #122 + static const T1 scx_Devanagari = 284; // #265 + static const T1 scx_Dives_Akuru = 285; // #124 + static const T1 scx_Dogra = 286; // #266 + static const T1 scx_Duployan = 287; // #267 + static const T1 scx_Egyptian_Hieroglyphs = 288; // #127 + static const T1 scx_Elbasan = 289; // #128 + static const T1 scx_Elymaic = 290; // #129 + static const T1 scx_Ethiopic = 291; // #130 + static const T1 scx_Georgian = 292; // #268 + static const T1 scx_Glagolitic = 293; // #269 + static const T1 scx_Gothic = 294; // #133 + static const T1 scx_Grantha = 295; // #270 + static const T1 scx_Greek = 296; // #271 + static const T1 scx_Gujarati = 297; // #272 + static const T1 scx_Gunjala_Gondi = 298; // #273 + static const T1 scx_Gurmukhi = 299; // #274 + static const T1 scx_Han = 300; // #275 + static const T1 scx_Hangul = 301; // #276 + static const T1 scx_Hanifi_Rohingya = 302; // #277 + static const T1 scx_Hanunoo = 303; // #278 + static const T1 scx_Hatran = 304; // #143 + static const T1 scx_Hebrew = 305; // #144 + static const T1 scx_Hiragana = 306; // #279 + static const T1 scx_Imperial_Aramaic = 307; // #146 + static const T1 scx_Inherited = 308; // #280 + static const T1 scx_Inscriptional_Pahlavi = 309; // #148 + static const T1 scx_Inscriptional_Parthian = 310; // #149 + static const T1 scx_Javanese = 311; // #281 + static const T1 scx_Kaithi = 312; // #282 + static const T1 scx_Kannada = 313; // #283 + static const T1 scx_Katakana = 314; // #284 + static const T1 scx_Kayah_Li = 315; // #285 + static const T1 scx_Kharoshthi = 316; // #155 + static const T1 scx_Khitan_Small_Script = 317; // #156 + static const T1 scx_Khmer = 318; // #157 + static const T1 scx_Khojki = 319; // #286 + static const T1 scx_Khudawadi = 320; // #287 + static const T1 scx_Lao = 321; // #160 + static const T1 scx_Latin = 322; // #288 + static const T1 scx_Lepcha = 323; // #162 + static const T1 scx_Limbu = 324; // #289 + static const T1 scx_Linear_A = 325; // #290 + static const T1 scx_Linear_B = 326; // #291 + static const T1 scx_Lisu = 327; // #166 + static const T1 scx_Lycian = 328; // #167 + static const T1 scx_Lydian = 329; // #168 + static const T1 scx_Mahajani = 330; // #292 + static const T1 scx_Makasar = 331; // #170 + static const T1 scx_Malayalam = 332; // #293 + static const T1 scx_Mandaic = 333; // #294 + static const T1 scx_Manichaean = 334; // #295 + static const T1 scx_Marchen = 335; // #174 + static const T1 scx_Masaram_Gondi = 336; // #296 + static const T1 scx_Medefaidrin = 337; // #176 + static const T1 scx_Meetei_Mayek = 338; // #177 + static const T1 scx_Mende_Kikakui = 339; // #178 + static const T1 scx_Meroitic_Cursive = 340; // #179 + static const T1 scx_Meroitic_Hieroglyphs = 341; // #180 + static const T1 scx_Miao = 342; // #181 + static const T1 scx_Modi = 343; // #297 + static const T1 scx_Mongolian = 344; // #298 + static const T1 scx_Mro = 345; // #184 + static const T1 scx_Multani = 346; // #299 + static const T1 scx_Myanmar = 347; // #300 + static const T1 scx_Nabataean = 348; // #187 + static const T1 scx_Nandinagari = 349; // #301 + static const T1 scx_New_Tai_Lue = 350; // #189 + static const T1 scx_Newa = 351; // #190 + static const T1 scx_Nko = 352; // #302 + static const T1 scx_Nushu = 353; // #192 + static const T1 scx_Nyiakeng_Puachue_Hmong = 354; // #193 + static const T1 scx_Ogham = 355; // #194 + static const T1 scx_Ol_Chiki = 356; // #195 + static const T1 scx_Old_Hungarian = 357; // #196 + static const T1 scx_Old_Italic = 358; // #197 + static const T1 scx_Old_North_Arabian = 359; // #198 + static const T1 scx_Old_Permic = 360; // #303 + static const T1 scx_Old_Persian = 361; // #200 + static const T1 scx_Old_Sogdian = 362; // #201 + static const T1 scx_Old_South_Arabian = 363; // #202 + static const T1 scx_Old_Turkic = 364; // #203 + static const T1 scx_Old_Uyghur = 365; // #304 + static const T1 scx_Oriya = 366; // #305 + static const T1 scx_Osage = 367; // #206 + static const T1 scx_Osmanya = 368; // #207 + static const T1 scx_Pahawh_Hmong = 369; // #208 + static const T1 scx_Palmyrene = 370; // #209 + static const T1 scx_Pau_Cin_Hau = 371; // #210 + static const T1 scx_Phags_Pa = 372; // #306 + static const T1 scx_Phoenician = 373; // #212 + static const T1 scx_Psalter_Pahlavi = 374; // #307 + static const T1 scx_Rejang = 375; // #214 + static const T1 scx_Runic = 376; // #215 + static const T1 scx_Samaritan = 377; // #216 + static const T1 scx_Saurashtra = 378; // #217 + static const T1 scx_Sharada = 379; // #308 + static const T1 scx_Shavian = 380; // #219 + static const T1 scx_Siddham = 381; // #220 + static const T1 scx_SignWriting = 382; // #221 + static const T1 scx_Sinhala = 383; // #309 + static const T1 scx_Sogdian = 384; // #310 + static const T1 scx_Sora_Sompeng = 385; // #224 + static const T1 scx_Soyombo = 386; // #225 + static const T1 scx_Sundanese = 387; // #226 + static const T1 scx_Syloti_Nagri = 388; // #311 + static const T1 scx_Syriac = 389; // #312 + static const T1 scx_Tagalog = 390; // #313 + static const T1 scx_Tagbanwa = 391; // #314 + static const T1 scx_Tai_Le = 392; // #315 + static const T1 scx_Tai_Tham = 393; // #232 + static const T1 scx_Tai_Viet = 394; // #233 + static const T1 scx_Takri = 395; // #316 + static const T1 scx_Tamil = 396; // #317 + static const T1 scx_Tangsa = 397; // #236 + static const T1 scx_Tangut = 398; // #237 + static const T1 scx_Telugu = 399; // #318 + static const T1 scx_Thaana = 400; // #319 + static const T1 scx_Thai = 401; // #240 + static const T1 scx_Tibetan = 402; // #241 + static const T1 scx_Tifinagh = 403; // #242 + static const T1 scx_Tirhuta = 404; // #320 + static const T1 scx_Toto = 405; // #244 + static const T1 scx_Ugaritic = 406; // #245 + static const T1 scx_Vai = 407; // #246 + static const T1 scx_Vithkuqi = 408; // #247 + static const T1 scx_Wancho = 409; // #248 + static const T1 scx_Warang_Citi = 410; // #249 + static const T1 scx_Yezidi = 411; // #321 + static const T1 scx_Yi = 412; // #322 + static const T1 scx_Zanabazar_Square = 413; // #252 + static const T1 last_property_number = 322; + struct ptype + { + static const T2 unknown = 0; + static const T2 binary = 1; + static const T2 general_category = 2; + static const T2 script = 3; + static const T2 script_extensions = 4; + }; + static const T3 propertynametable[]; + static const T4 rangetable[]; + static const T5 rangenumbertable[]; + static const T6 positiontable[]; + + static const T3 *propertyname_table() + { + return propertynametable; + } + static const T4 *ranges() + { + return rangetable; + } + static const T5 *rangenumber_table() + { + return rangenumbertable; + } + static const T6 *position_table() + { + return positiontable; + } +}; + +template +const T3 unicode_property_data::propertynametable[] = +{ + "*", // #0:unknown + "*", // #1:binary + "General_Category:gc", // #2 + "Script:sc", // #3 + "Script_Extensions:scx", // #4 + "" +}; + +template +const T4 unicode_property_data::rangetable[] = +{ + // #1 (0+725): gc=Other:C + // Cc:2 + Cf:21 + Cn:698 + Co:3 + Cs:1 + // #2 (0+2): gc=Control:Cc:cntrl + 0x0000, 0x001F, 0x007F, 0x009F, + // #3 (2+21): gc=Format:Cf + 0x00AD, 0x00AD, 0x0600, 0x0605, 0x061C, 0x061C, 0x06DD, 0x06DD, + 0x070F, 0x070F, 0x0890, 0x0891, 0x08E2, 0x08E2, 0x180E, 0x180E, + 0x200B, 0x200F, 0x202A, 0x202E, 0x2060, 0x2064, 0x2066, 0x206F, + 0xFEFF, 0xFEFF, 0xFFF9, 0xFFFB, 0x110BD, 0x110BD, 0x110CD, 0x110CD, + 0x13430, 0x13438, 0x1BCA0, 0x1BCA3, 0x1D173, 0x1D17A, 0xE0001, 0xE0001, + 0xE0020, 0xE007F, + // #4 (23+698): gc=Unassigned:Cn + 0x0378, 0x0379, 0x0380, 0x0383, 0x038B, 0x038B, 0x038D, 0x038D, + 0x03A2, 0x03A2, 0x0530, 0x0530, 0x0557, 0x0558, 0x058B, 0x058C, + 0x0590, 0x0590, 0x05C8, 0x05CF, 0x05EB, 0x05EE, 0x05F5, 0x05FF, + 0x070E, 0x070E, 0x074B, 0x074C, 0x07B2, 0x07BF, 0x07FB, 0x07FC, + 0x082E, 0x082F, 0x083F, 0x083F, 0x085C, 0x085D, 0x085F, 0x085F, + 0x086B, 0x086F, 0x088F, 0x088F, 0x0892, 0x0897, 0x0984, 0x0984, + 0x098D, 0x098E, 0x0991, 0x0992, 0x09A9, 0x09A9, 0x09B1, 0x09B1, + 0x09B3, 0x09B5, 0x09BA, 0x09BB, 0x09C5, 0x09C6, 0x09C9, 0x09CA, + 0x09CF, 0x09D6, 0x09D8, 0x09DB, 0x09DE, 0x09DE, 0x09E4, 0x09E5, + 0x09FF, 0x0A00, 0x0A04, 0x0A04, 0x0A0B, 0x0A0E, 0x0A11, 0x0A12, + 0x0A29, 0x0A29, 0x0A31, 0x0A31, 0x0A34, 0x0A34, 0x0A37, 0x0A37, + 0x0A3A, 0x0A3B, 0x0A3D, 0x0A3D, 0x0A43, 0x0A46, 0x0A49, 0x0A4A, + 0x0A4E, 0x0A50, 0x0A52, 0x0A58, 0x0A5D, 0x0A5D, 0x0A5F, 0x0A65, + 0x0A77, 0x0A80, 0x0A84, 0x0A84, 0x0A8E, 0x0A8E, 0x0A92, 0x0A92, + 0x0AA9, 0x0AA9, 0x0AB1, 0x0AB1, 0x0AB4, 0x0AB4, 0x0ABA, 0x0ABB, + 0x0AC6, 0x0AC6, 0x0ACA, 0x0ACA, 0x0ACE, 0x0ACF, 0x0AD1, 0x0ADF, + 0x0AE4, 0x0AE5, 0x0AF2, 0x0AF8, 0x0B00, 0x0B00, 0x0B04, 0x0B04, + 0x0B0D, 0x0B0E, 0x0B11, 0x0B12, 0x0B29, 0x0B29, 0x0B31, 0x0B31, + 0x0B34, 0x0B34, 0x0B3A, 0x0B3B, 0x0B45, 0x0B46, 0x0B49, 0x0B4A, + 0x0B4E, 0x0B54, 0x0B58, 0x0B5B, 0x0B5E, 0x0B5E, 0x0B64, 0x0B65, + 0x0B78, 0x0B81, 0x0B84, 0x0B84, 0x0B8B, 0x0B8D, 0x0B91, 0x0B91, + 0x0B96, 0x0B98, 0x0B9B, 0x0B9B, 0x0B9D, 0x0B9D, 0x0BA0, 0x0BA2, + 0x0BA5, 0x0BA7, 0x0BAB, 0x0BAD, 0x0BBA, 0x0BBD, 0x0BC3, 0x0BC5, + 0x0BC9, 0x0BC9, 0x0BCE, 0x0BCF, 0x0BD1, 0x0BD6, 0x0BD8, 0x0BE5, + 0x0BFB, 0x0BFF, 0x0C0D, 0x0C0D, 0x0C11, 0x0C11, 0x0C29, 0x0C29, + 0x0C3A, 0x0C3B, 0x0C45, 0x0C45, 0x0C49, 0x0C49, 0x0C4E, 0x0C54, + 0x0C57, 0x0C57, 0x0C5B, 0x0C5C, 0x0C5E, 0x0C5F, 0x0C64, 0x0C65, + 0x0C70, 0x0C76, 0x0C8D, 0x0C8D, 0x0C91, 0x0C91, 0x0CA9, 0x0CA9, + 0x0CB4, 0x0CB4, 0x0CBA, 0x0CBB, 0x0CC5, 0x0CC5, 0x0CC9, 0x0CC9, + 0x0CCE, 0x0CD4, 0x0CD7, 0x0CDC, 0x0CDF, 0x0CDF, 0x0CE4, 0x0CE5, + 0x0CF0, 0x0CF0, 0x0CF3, 0x0CFF, 0x0D0D, 0x0D0D, 0x0D11, 0x0D11, + 0x0D45, 0x0D45, 0x0D49, 0x0D49, 0x0D50, 0x0D53, 0x0D64, 0x0D65, + 0x0D80, 0x0D80, 0x0D84, 0x0D84, 0x0D97, 0x0D99, 0x0DB2, 0x0DB2, + 0x0DBC, 0x0DBC, 0x0DBE, 0x0DBF, 0x0DC7, 0x0DC9, 0x0DCB, 0x0DCE, + 0x0DD5, 0x0DD5, 0x0DD7, 0x0DD7, 0x0DE0, 0x0DE5, 0x0DF0, 0x0DF1, + 0x0DF5, 0x0E00, 0x0E3B, 0x0E3E, 0x0E5C, 0x0E80, 0x0E83, 0x0E83, + 0x0E85, 0x0E85, 0x0E8B, 0x0E8B, 0x0EA4, 0x0EA4, 0x0EA6, 0x0EA6, + 0x0EBE, 0x0EBF, 0x0EC5, 0x0EC5, 0x0EC7, 0x0EC7, 0x0ECE, 0x0ECF, + 0x0EDA, 0x0EDB, 0x0EE0, 0x0EFF, 0x0F48, 0x0F48, 0x0F6D, 0x0F70, + 0x0F98, 0x0F98, 0x0FBD, 0x0FBD, 0x0FCD, 0x0FCD, 0x0FDB, 0x0FFF, + 0x10C6, 0x10C6, 0x10C8, 0x10CC, 0x10CE, 0x10CF, 0x1249, 0x1249, + 0x124E, 0x124F, 0x1257, 0x1257, 0x1259, 0x1259, 0x125E, 0x125F, + 0x1289, 0x1289, 0x128E, 0x128F, 0x12B1, 0x12B1, 0x12B6, 0x12B7, + 0x12BF, 0x12BF, 0x12C1, 0x12C1, 0x12C6, 0x12C7, 0x12D7, 0x12D7, + 0x1311, 0x1311, 0x1316, 0x1317, 0x135B, 0x135C, 0x137D, 0x137F, + 0x139A, 0x139F, 0x13F6, 0x13F7, 0x13FE, 0x13FF, 0x169D, 0x169F, + 0x16F9, 0x16FF, 0x1716, 0x171E, 0x1737, 0x173F, 0x1754, 0x175F, + 0x176D, 0x176D, 0x1771, 0x1771, 0x1774, 0x177F, 0x17DE, 0x17DF, + 0x17EA, 0x17EF, 0x17FA, 0x17FF, 0x181A, 0x181F, 0x1879, 0x187F, + 0x18AB, 0x18AF, 0x18F6, 0x18FF, 0x191F, 0x191F, 0x192C, 0x192F, + 0x193C, 0x193F, 0x1941, 0x1943, 0x196E, 0x196F, 0x1975, 0x197F, + 0x19AC, 0x19AF, 0x19CA, 0x19CF, 0x19DB, 0x19DD, 0x1A1C, 0x1A1D, + 0x1A5F, 0x1A5F, 0x1A7D, 0x1A7E, 0x1A8A, 0x1A8F, 0x1A9A, 0x1A9F, + 0x1AAE, 0x1AAF, 0x1ACF, 0x1AFF, 0x1B4D, 0x1B4F, 0x1B7F, 0x1B7F, + 0x1BF4, 0x1BFB, 0x1C38, 0x1C3A, 0x1C4A, 0x1C4C, 0x1C89, 0x1C8F, + 0x1CBB, 0x1CBC, 0x1CC8, 0x1CCF, 0x1CFB, 0x1CFF, 0x1F16, 0x1F17, + 0x1F1E, 0x1F1F, 0x1F46, 0x1F47, 0x1F4E, 0x1F4F, 0x1F58, 0x1F58, + 0x1F5A, 0x1F5A, 0x1F5C, 0x1F5C, 0x1F5E, 0x1F5E, 0x1F7E, 0x1F7F, + 0x1FB5, 0x1FB5, 0x1FC5, 0x1FC5, 0x1FD4, 0x1FD5, 0x1FDC, 0x1FDC, + 0x1FF0, 0x1FF1, 0x1FF5, 0x1FF5, 0x1FFF, 0x1FFF, 0x2065, 0x2065, + 0x2072, 0x2073, 0x208F, 0x208F, 0x209D, 0x209F, 0x20C1, 0x20CF, + 0x20F1, 0x20FF, 0x218C, 0x218F, 0x2427, 0x243F, 0x244B, 0x245F, + 0x2B74, 0x2B75, 0x2B96, 0x2B96, 0x2CF4, 0x2CF8, 0x2D26, 0x2D26, + 0x2D28, 0x2D2C, 0x2D2E, 0x2D2F, 0x2D68, 0x2D6E, 0x2D71, 0x2D7E, + 0x2D97, 0x2D9F, 0x2DA7, 0x2DA7, 0x2DAF, 0x2DAF, 0x2DB7, 0x2DB7, + 0x2DBF, 0x2DBF, 0x2DC7, 0x2DC7, 0x2DCF, 0x2DCF, 0x2DD7, 0x2DD7, + 0x2DDF, 0x2DDF, 0x2E5E, 0x2E7F, 0x2E9A, 0x2E9A, 0x2EF4, 0x2EFF, + 0x2FD6, 0x2FEF, 0x2FFC, 0x2FFF, 0x3040, 0x3040, 0x3097, 0x3098, + 0x3100, 0x3104, 0x3130, 0x3130, 0x318F, 0x318F, 0x31E4, 0x31EF, + 0x321F, 0x321F, 0xA48D, 0xA48F, 0xA4C7, 0xA4CF, 0xA62C, 0xA63F, + 0xA6F8, 0xA6FF, 0xA7CB, 0xA7CF, 0xA7D2, 0xA7D2, 0xA7D4, 0xA7D4, + 0xA7DA, 0xA7F1, 0xA82D, 0xA82F, 0xA83A, 0xA83F, 0xA878, 0xA87F, + 0xA8C6, 0xA8CD, 0xA8DA, 0xA8DF, 0xA954, 0xA95E, 0xA97D, 0xA97F, + 0xA9CE, 0xA9CE, 0xA9DA, 0xA9DD, 0xA9FF, 0xA9FF, 0xAA37, 0xAA3F, + 0xAA4E, 0xAA4F, 0xAA5A, 0xAA5B, 0xAAC3, 0xAADA, 0xAAF7, 0xAB00, + 0xAB07, 0xAB08, 0xAB0F, 0xAB10, 0xAB17, 0xAB1F, 0xAB27, 0xAB27, + 0xAB2F, 0xAB2F, 0xAB6C, 0xAB6F, 0xABEE, 0xABEF, 0xABFA, 0xABFF, + 0xD7A4, 0xD7AF, 0xD7C7, 0xD7CA, 0xD7FC, 0xD7FF, 0xFA6E, 0xFA6F, + 0xFADA, 0xFAFF, 0xFB07, 0xFB12, 0xFB18, 0xFB1C, 0xFB37, 0xFB37, + 0xFB3D, 0xFB3D, 0xFB3F, 0xFB3F, 0xFB42, 0xFB42, 0xFB45, 0xFB45, + 0xFBC3, 0xFBD2, 0xFD90, 0xFD91, 0xFDC8, 0xFDCE, 0xFDD0, 0xFDEF, + 0xFE1A, 0xFE1F, 0xFE53, 0xFE53, 0xFE67, 0xFE67, 0xFE6C, 0xFE6F, + 0xFE75, 0xFE75, 0xFEFD, 0xFEFE, 0xFF00, 0xFF00, 0xFFBF, 0xFFC1, + 0xFFC8, 0xFFC9, 0xFFD0, 0xFFD1, 0xFFD8, 0xFFD9, 0xFFDD, 0xFFDF, + 0xFFE7, 0xFFE7, 0xFFEF, 0xFFF8, 0xFFFE, 0xFFFF, 0x1000C, 0x1000C, + 0x10027, 0x10027, 0x1003B, 0x1003B, 0x1003E, 0x1003E, 0x1004E, 0x1004F, + 0x1005E, 0x1007F, 0x100FB, 0x100FF, 0x10103, 0x10106, 0x10134, 0x10136, + 0x1018F, 0x1018F, 0x1019D, 0x1019F, 0x101A1, 0x101CF, 0x101FE, 0x1027F, + 0x1029D, 0x1029F, 0x102D1, 0x102DF, 0x102FC, 0x102FF, 0x10324, 0x1032C, + 0x1034B, 0x1034F, 0x1037B, 0x1037F, 0x1039E, 0x1039E, 0x103C4, 0x103C7, + 0x103D6, 0x103FF, 0x1049E, 0x1049F, 0x104AA, 0x104AF, 0x104D4, 0x104D7, + 0x104FC, 0x104FF, 0x10528, 0x1052F, 0x10564, 0x1056E, 0x1057B, 0x1057B, + 0x1058B, 0x1058B, 0x10593, 0x10593, 0x10596, 0x10596, 0x105A2, 0x105A2, + 0x105B2, 0x105B2, 0x105BA, 0x105BA, 0x105BD, 0x105FF, 0x10737, 0x1073F, + 0x10756, 0x1075F, 0x10768, 0x1077F, 0x10786, 0x10786, 0x107B1, 0x107B1, + 0x107BB, 0x107FF, 0x10806, 0x10807, 0x10809, 0x10809, 0x10836, 0x10836, + 0x10839, 0x1083B, 0x1083D, 0x1083E, 0x10856, 0x10856, 0x1089F, 0x108A6, + 0x108B0, 0x108DF, 0x108F3, 0x108F3, 0x108F6, 0x108FA, 0x1091C, 0x1091E, + 0x1093A, 0x1093E, 0x10940, 0x1097F, 0x109B8, 0x109BB, 0x109D0, 0x109D1, + 0x10A04, 0x10A04, 0x10A07, 0x10A0B, 0x10A14, 0x10A14, 0x10A18, 0x10A18, + 0x10A36, 0x10A37, 0x10A3B, 0x10A3E, 0x10A49, 0x10A4F, 0x10A59, 0x10A5F, + 0x10AA0, 0x10ABF, 0x10AE7, 0x10AEA, 0x10AF7, 0x10AFF, 0x10B36, 0x10B38, + 0x10B56, 0x10B57, 0x10B73, 0x10B77, 0x10B92, 0x10B98, 0x10B9D, 0x10BA8, + 0x10BB0, 0x10BFF, 0x10C49, 0x10C7F, 0x10CB3, 0x10CBF, 0x10CF3, 0x10CF9, + 0x10D28, 0x10D2F, 0x10D3A, 0x10E5F, 0x10E7F, 0x10E7F, 0x10EAA, 0x10EAA, + 0x10EAE, 0x10EAF, 0x10EB2, 0x10EFF, 0x10F28, 0x10F2F, 0x10F5A, 0x10F6F, + 0x10F8A, 0x10FAF, 0x10FCC, 0x10FDF, 0x10FF7, 0x10FFF, 0x1104E, 0x11051, + 0x11076, 0x1107E, 0x110C3, 0x110CC, 0x110CE, 0x110CF, 0x110E9, 0x110EF, + 0x110FA, 0x110FF, 0x11135, 0x11135, 0x11148, 0x1114F, 0x11177, 0x1117F, + 0x111E0, 0x111E0, 0x111F5, 0x111FF, 0x11212, 0x11212, 0x1123F, 0x1127F, + 0x11287, 0x11287, 0x11289, 0x11289, 0x1128E, 0x1128E, 0x1129E, 0x1129E, + 0x112AA, 0x112AF, 0x112EB, 0x112EF, 0x112FA, 0x112FF, 0x11304, 0x11304, + 0x1130D, 0x1130E, 0x11311, 0x11312, 0x11329, 0x11329, 0x11331, 0x11331, + 0x11334, 0x11334, 0x1133A, 0x1133A, 0x11345, 0x11346, 0x11349, 0x1134A, + 0x1134E, 0x1134F, 0x11351, 0x11356, 0x11358, 0x1135C, 0x11364, 0x11365, + 0x1136D, 0x1136F, 0x11375, 0x113FF, 0x1145C, 0x1145C, 0x11462, 0x1147F, + 0x114C8, 0x114CF, 0x114DA, 0x1157F, 0x115B6, 0x115B7, 0x115DE, 0x115FF, + 0x11645, 0x1164F, 0x1165A, 0x1165F, 0x1166D, 0x1167F, 0x116BA, 0x116BF, + 0x116CA, 0x116FF, 0x1171B, 0x1171C, 0x1172C, 0x1172F, 0x11747, 0x117FF, + 0x1183C, 0x1189F, 0x118F3, 0x118FE, 0x11907, 0x11908, 0x1190A, 0x1190B, + 0x11914, 0x11914, 0x11917, 0x11917, 0x11936, 0x11936, 0x11939, 0x1193A, + 0x11947, 0x1194F, 0x1195A, 0x1199F, 0x119A8, 0x119A9, 0x119D8, 0x119D9, + 0x119E5, 0x119FF, 0x11A48, 0x11A4F, 0x11AA3, 0x11AAF, 0x11AF9, 0x11BFF, + 0x11C09, 0x11C09, 0x11C37, 0x11C37, 0x11C46, 0x11C4F, 0x11C6D, 0x11C6F, + 0x11C90, 0x11C91, 0x11CA8, 0x11CA8, 0x11CB7, 0x11CFF, 0x11D07, 0x11D07, + 0x11D0A, 0x11D0A, 0x11D37, 0x11D39, 0x11D3B, 0x11D3B, 0x11D3E, 0x11D3E, + 0x11D48, 0x11D4F, 0x11D5A, 0x11D5F, 0x11D66, 0x11D66, 0x11D69, 0x11D69, + 0x11D8F, 0x11D8F, 0x11D92, 0x11D92, 0x11D99, 0x11D9F, 0x11DAA, 0x11EDF, + 0x11EF9, 0x11FAF, 0x11FB1, 0x11FBF, 0x11FF2, 0x11FFE, 0x1239A, 0x123FF, + 0x1246F, 0x1246F, 0x12475, 0x1247F, 0x12544, 0x12F8F, 0x12FF3, 0x12FFF, + 0x1342F, 0x1342F, 0x13439, 0x143FF, 0x14647, 0x167FF, 0x16A39, 0x16A3F, + 0x16A5F, 0x16A5F, 0x16A6A, 0x16A6D, 0x16ABF, 0x16ABF, 0x16ACA, 0x16ACF, + 0x16AEE, 0x16AEF, 0x16AF6, 0x16AFF, 0x16B46, 0x16B4F, 0x16B5A, 0x16B5A, + 0x16B62, 0x16B62, 0x16B78, 0x16B7C, 0x16B90, 0x16E3F, 0x16E9B, 0x16EFF, + 0x16F4B, 0x16F4E, 0x16F88, 0x16F8E, 0x16FA0, 0x16FDF, 0x16FE5, 0x16FEF, + 0x16FF2, 0x16FFF, 0x187F8, 0x187FF, 0x18CD6, 0x18CFF, 0x18D09, 0x1AFEF, + 0x1AFF4, 0x1AFF4, 0x1AFFC, 0x1AFFC, 0x1AFFF, 0x1AFFF, 0x1B123, 0x1B14F, + 0x1B153, 0x1B163, 0x1B168, 0x1B16F, 0x1B2FC, 0x1BBFF, 0x1BC6B, 0x1BC6F, + 0x1BC7D, 0x1BC7F, 0x1BC89, 0x1BC8F, 0x1BC9A, 0x1BC9B, 0x1BCA4, 0x1CEFF, + 0x1CF2E, 0x1CF2F, 0x1CF47, 0x1CF4F, 0x1CFC4, 0x1CFFF, 0x1D0F6, 0x1D0FF, + 0x1D127, 0x1D128, 0x1D1EB, 0x1D1FF, 0x1D246, 0x1D2DF, 0x1D2F4, 0x1D2FF, + 0x1D357, 0x1D35F, 0x1D379, 0x1D3FF, 0x1D455, 0x1D455, 0x1D49D, 0x1D49D, + 0x1D4A0, 0x1D4A1, 0x1D4A3, 0x1D4A4, 0x1D4A7, 0x1D4A8, 0x1D4AD, 0x1D4AD, + 0x1D4BA, 0x1D4BA, 0x1D4BC, 0x1D4BC, 0x1D4C4, 0x1D4C4, 0x1D506, 0x1D506, + 0x1D50B, 0x1D50C, 0x1D515, 0x1D515, 0x1D51D, 0x1D51D, 0x1D53A, 0x1D53A, + 0x1D53F, 0x1D53F, 0x1D545, 0x1D545, 0x1D547, 0x1D549, 0x1D551, 0x1D551, + 0x1D6A6, 0x1D6A7, 0x1D7CC, 0x1D7CD, 0x1DA8C, 0x1DA9A, 0x1DAA0, 0x1DAA0, + 0x1DAB0, 0x1DEFF, 0x1DF1F, 0x1DFFF, 0x1E007, 0x1E007, 0x1E019, 0x1E01A, + 0x1E022, 0x1E022, 0x1E025, 0x1E025, 0x1E02B, 0x1E0FF, 0x1E12D, 0x1E12F, + 0x1E13E, 0x1E13F, 0x1E14A, 0x1E14D, 0x1E150, 0x1E28F, 0x1E2AF, 0x1E2BF, + 0x1E2FA, 0x1E2FE, 0x1E300, 0x1E7DF, 0x1E7E7, 0x1E7E7, 0x1E7EC, 0x1E7EC, + 0x1E7EF, 0x1E7EF, 0x1E7FF, 0x1E7FF, 0x1E8C5, 0x1E8C6, 0x1E8D7, 0x1E8FF, + 0x1E94C, 0x1E94F, 0x1E95A, 0x1E95D, 0x1E960, 0x1EC70, 0x1ECB5, 0x1ED00, + 0x1ED3E, 0x1EDFF, 0x1EE04, 0x1EE04, 0x1EE20, 0x1EE20, 0x1EE23, 0x1EE23, + 0x1EE25, 0x1EE26, 0x1EE28, 0x1EE28, 0x1EE33, 0x1EE33, 0x1EE38, 0x1EE38, + 0x1EE3A, 0x1EE3A, 0x1EE3C, 0x1EE41, 0x1EE43, 0x1EE46, 0x1EE48, 0x1EE48, + 0x1EE4A, 0x1EE4A, 0x1EE4C, 0x1EE4C, 0x1EE50, 0x1EE50, 0x1EE53, 0x1EE53, + 0x1EE55, 0x1EE56, 0x1EE58, 0x1EE58, 0x1EE5A, 0x1EE5A, 0x1EE5C, 0x1EE5C, + 0x1EE5E, 0x1EE5E, 0x1EE60, 0x1EE60, 0x1EE63, 0x1EE63, 0x1EE65, 0x1EE66, + 0x1EE6B, 0x1EE6B, 0x1EE73, 0x1EE73, 0x1EE78, 0x1EE78, 0x1EE7D, 0x1EE7D, + 0x1EE7F, 0x1EE7F, 0x1EE8A, 0x1EE8A, 0x1EE9C, 0x1EEA0, 0x1EEA4, 0x1EEA4, + 0x1EEAA, 0x1EEAA, 0x1EEBC, 0x1EEEF, 0x1EEF2, 0x1EFFF, 0x1F02C, 0x1F02F, + 0x1F094, 0x1F09F, 0x1F0AF, 0x1F0B0, 0x1F0C0, 0x1F0C0, 0x1F0D0, 0x1F0D0, + 0x1F0F6, 0x1F0FF, 0x1F1AE, 0x1F1E5, 0x1F203, 0x1F20F, 0x1F23C, 0x1F23F, + 0x1F249, 0x1F24F, 0x1F252, 0x1F25F, 0x1F266, 0x1F2FF, 0x1F6D8, 0x1F6DC, + 0x1F6ED, 0x1F6EF, 0x1F6FD, 0x1F6FF, 0x1F774, 0x1F77F, 0x1F7D9, 0x1F7DF, + 0x1F7EC, 0x1F7EF, 0x1F7F1, 0x1F7FF, 0x1F80C, 0x1F80F, 0x1F848, 0x1F84F, + 0x1F85A, 0x1F85F, 0x1F888, 0x1F88F, 0x1F8AE, 0x1F8AF, 0x1F8B2, 0x1F8FF, + 0x1FA54, 0x1FA5F, 0x1FA6E, 0x1FA6F, 0x1FA75, 0x1FA77, 0x1FA7D, 0x1FA7F, + 0x1FA87, 0x1FA8F, 0x1FAAD, 0x1FAAF, 0x1FABB, 0x1FABF, 0x1FAC6, 0x1FACF, + 0x1FADA, 0x1FADF, 0x1FAE8, 0x1FAEF, 0x1FAF7, 0x1FAFF, 0x1FB93, 0x1FB93, + 0x1FBCB, 0x1FBEF, 0x1FBFA, 0x1FFFF, 0x2A6E0, 0x2A6FF, 0x2B739, 0x2B73F, + 0x2B81E, 0x2B81F, 0x2CEA2, 0x2CEAF, 0x2EBE1, 0x2F7FF, 0x2FA1E, 0x2FFFF, + 0x3134B, 0xE0000, 0xE0002, 0xE001F, 0xE0080, 0xE00FF, 0xE01F0, 0xEFFFF, + 0xFFFFE, 0xFFFFF, 0x10FFFE, 0x10FFFF, + // #5 (721+3): gc=Private_Use:Co + 0xE000, 0xF8FF, 0xF0000, 0xFFFFD, 0x100000, 0x10FFFD, + // #6 (724+1): gc=Surrogate:Cs + 0xD800, 0xDFFF, + // #7 (725+1883): gc=Letter:L + // Ll:657 + Lt:10 + Lu:646 + Lm:69 + Lo:501 + // #8 (725+1313): gc=Cased_Letter:LC + // Ll:657 + Lt:10 + Lu:646 + // #9 (725+657): gc=Lowercase_Letter:Ll + 0x0061, 0x007A, 0x00B5, 0x00B5, 0x00DF, 0x00F6, 0x00F8, 0x00FF, + 0x0101, 0x0101, 0x0103, 0x0103, 0x0105, 0x0105, 0x0107, 0x0107, + 0x0109, 0x0109, 0x010B, 0x010B, 0x010D, 0x010D, 0x010F, 0x010F, + 0x0111, 0x0111, 0x0113, 0x0113, 0x0115, 0x0115, 0x0117, 0x0117, + 0x0119, 0x0119, 0x011B, 0x011B, 0x011D, 0x011D, 0x011F, 0x011F, + 0x0121, 0x0121, 0x0123, 0x0123, 0x0125, 0x0125, 0x0127, 0x0127, + 0x0129, 0x0129, 0x012B, 0x012B, 0x012D, 0x012D, 0x012F, 0x012F, + 0x0131, 0x0131, 0x0133, 0x0133, 0x0135, 0x0135, 0x0137, 0x0138, + 0x013A, 0x013A, 0x013C, 0x013C, 0x013E, 0x013E, 0x0140, 0x0140, + 0x0142, 0x0142, 0x0144, 0x0144, 0x0146, 0x0146, 0x0148, 0x0149, + 0x014B, 0x014B, 0x014D, 0x014D, 0x014F, 0x014F, 0x0151, 0x0151, + 0x0153, 0x0153, 0x0155, 0x0155, 0x0157, 0x0157, 0x0159, 0x0159, + 0x015B, 0x015B, 0x015D, 0x015D, 0x015F, 0x015F, 0x0161, 0x0161, + 0x0163, 0x0163, 0x0165, 0x0165, 0x0167, 0x0167, 0x0169, 0x0169, + 0x016B, 0x016B, 0x016D, 0x016D, 0x016F, 0x016F, 0x0171, 0x0171, + 0x0173, 0x0173, 0x0175, 0x0175, 0x0177, 0x0177, 0x017A, 0x017A, + 0x017C, 0x017C, 0x017E, 0x0180, 0x0183, 0x0183, 0x0185, 0x0185, + 0x0188, 0x0188, 0x018C, 0x018D, 0x0192, 0x0192, 0x0195, 0x0195, + 0x0199, 0x019B, 0x019E, 0x019E, 0x01A1, 0x01A1, 0x01A3, 0x01A3, + 0x01A5, 0x01A5, 0x01A8, 0x01A8, 0x01AA, 0x01AB, 0x01AD, 0x01AD, + 0x01B0, 0x01B0, 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x01B9, 0x01BA, + 0x01BD, 0x01BF, 0x01C6, 0x01C6, 0x01C9, 0x01C9, 0x01CC, 0x01CC, + 0x01CE, 0x01CE, 0x01D0, 0x01D0, 0x01D2, 0x01D2, 0x01D4, 0x01D4, + 0x01D6, 0x01D6, 0x01D8, 0x01D8, 0x01DA, 0x01DA, 0x01DC, 0x01DD, + 0x01DF, 0x01DF, 0x01E1, 0x01E1, 0x01E3, 0x01E3, 0x01E5, 0x01E5, + 0x01E7, 0x01E7, 0x01E9, 0x01E9, 0x01EB, 0x01EB, 0x01ED, 0x01ED, + 0x01EF, 0x01F0, 0x01F3, 0x01F3, 0x01F5, 0x01F5, 0x01F9, 0x01F9, + 0x01FB, 0x01FB, 0x01FD, 0x01FD, 0x01FF, 0x01FF, 0x0201, 0x0201, + 0x0203, 0x0203, 0x0205, 0x0205, 0x0207, 0x0207, 0x0209, 0x0209, + 0x020B, 0x020B, 0x020D, 0x020D, 0x020F, 0x020F, 0x0211, 0x0211, + 0x0213, 0x0213, 0x0215, 0x0215, 0x0217, 0x0217, 0x0219, 0x0219, + 0x021B, 0x021B, 0x021D, 0x021D, 0x021F, 0x021F, 0x0221, 0x0221, + 0x0223, 0x0223, 0x0225, 0x0225, 0x0227, 0x0227, 0x0229, 0x0229, + 0x022B, 0x022B, 0x022D, 0x022D, 0x022F, 0x022F, 0x0231, 0x0231, + 0x0233, 0x0239, 0x023C, 0x023C, 0x023F, 0x0240, 0x0242, 0x0242, + 0x0247, 0x0247, 0x0249, 0x0249, 0x024B, 0x024B, 0x024D, 0x024D, + 0x024F, 0x0293, 0x0295, 0x02AF, 0x0371, 0x0371, 0x0373, 0x0373, + 0x0377, 0x0377, 0x037B, 0x037D, 0x0390, 0x0390, 0x03AC, 0x03CE, + 0x03D0, 0x03D1, 0x03D5, 0x03D7, 0x03D9, 0x03D9, 0x03DB, 0x03DB, + 0x03DD, 0x03DD, 0x03DF, 0x03DF, 0x03E1, 0x03E1, 0x03E3, 0x03E3, + 0x03E5, 0x03E5, 0x03E7, 0x03E7, 0x03E9, 0x03E9, 0x03EB, 0x03EB, + 0x03ED, 0x03ED, 0x03EF, 0x03F3, 0x03F5, 0x03F5, 0x03F8, 0x03F8, + 0x03FB, 0x03FC, 0x0430, 0x045F, 0x0461, 0x0461, 0x0463, 0x0463, + 0x0465, 0x0465, 0x0467, 0x0467, 0x0469, 0x0469, 0x046B, 0x046B, + 0x046D, 0x046D, 0x046F, 0x046F, 0x0471, 0x0471, 0x0473, 0x0473, + 0x0475, 0x0475, 0x0477, 0x0477, 0x0479, 0x0479, 0x047B, 0x047B, + 0x047D, 0x047D, 0x047F, 0x047F, 0x0481, 0x0481, 0x048B, 0x048B, + 0x048D, 0x048D, 0x048F, 0x048F, 0x0491, 0x0491, 0x0493, 0x0493, + 0x0495, 0x0495, 0x0497, 0x0497, 0x0499, 0x0499, 0x049B, 0x049B, + 0x049D, 0x049D, 0x049F, 0x049F, 0x04A1, 0x04A1, 0x04A3, 0x04A3, + 0x04A5, 0x04A5, 0x04A7, 0x04A7, 0x04A9, 0x04A9, 0x04AB, 0x04AB, + 0x04AD, 0x04AD, 0x04AF, 0x04AF, 0x04B1, 0x04B1, 0x04B3, 0x04B3, + 0x04B5, 0x04B5, 0x04B7, 0x04B7, 0x04B9, 0x04B9, 0x04BB, 0x04BB, + 0x04BD, 0x04BD, 0x04BF, 0x04BF, 0x04C2, 0x04C2, 0x04C4, 0x04C4, + 0x04C6, 0x04C6, 0x04C8, 0x04C8, 0x04CA, 0x04CA, 0x04CC, 0x04CC, + 0x04CE, 0x04CF, 0x04D1, 0x04D1, 0x04D3, 0x04D3, 0x04D5, 0x04D5, + 0x04D7, 0x04D7, 0x04D9, 0x04D9, 0x04DB, 0x04DB, 0x04DD, 0x04DD, + 0x04DF, 0x04DF, 0x04E1, 0x04E1, 0x04E3, 0x04E3, 0x04E5, 0x04E5, + 0x04E7, 0x04E7, 0x04E9, 0x04E9, 0x04EB, 0x04EB, 0x04ED, 0x04ED, + 0x04EF, 0x04EF, 0x04F1, 0x04F1, 0x04F3, 0x04F3, 0x04F5, 0x04F5, + 0x04F7, 0x04F7, 0x04F9, 0x04F9, 0x04FB, 0x04FB, 0x04FD, 0x04FD, + 0x04FF, 0x04FF, 0x0501, 0x0501, 0x0503, 0x0503, 0x0505, 0x0505, + 0x0507, 0x0507, 0x0509, 0x0509, 0x050B, 0x050B, 0x050D, 0x050D, + 0x050F, 0x050F, 0x0511, 0x0511, 0x0513, 0x0513, 0x0515, 0x0515, + 0x0517, 0x0517, 0x0519, 0x0519, 0x051B, 0x051B, 0x051D, 0x051D, + 0x051F, 0x051F, 0x0521, 0x0521, 0x0523, 0x0523, 0x0525, 0x0525, + 0x0527, 0x0527, 0x0529, 0x0529, 0x052B, 0x052B, 0x052D, 0x052D, + 0x052F, 0x052F, 0x0560, 0x0588, 0x10D0, 0x10FA, 0x10FD, 0x10FF, + 0x13F8, 0x13FD, 0x1C80, 0x1C88, 0x1D00, 0x1D2B, 0x1D6B, 0x1D77, + 0x1D79, 0x1D9A, 0x1E01, 0x1E01, 0x1E03, 0x1E03, 0x1E05, 0x1E05, + 0x1E07, 0x1E07, 0x1E09, 0x1E09, 0x1E0B, 0x1E0B, 0x1E0D, 0x1E0D, + 0x1E0F, 0x1E0F, 0x1E11, 0x1E11, 0x1E13, 0x1E13, 0x1E15, 0x1E15, + 0x1E17, 0x1E17, 0x1E19, 0x1E19, 0x1E1B, 0x1E1B, 0x1E1D, 0x1E1D, + 0x1E1F, 0x1E1F, 0x1E21, 0x1E21, 0x1E23, 0x1E23, 0x1E25, 0x1E25, + 0x1E27, 0x1E27, 0x1E29, 0x1E29, 0x1E2B, 0x1E2B, 0x1E2D, 0x1E2D, + 0x1E2F, 0x1E2F, 0x1E31, 0x1E31, 0x1E33, 0x1E33, 0x1E35, 0x1E35, + 0x1E37, 0x1E37, 0x1E39, 0x1E39, 0x1E3B, 0x1E3B, 0x1E3D, 0x1E3D, + 0x1E3F, 0x1E3F, 0x1E41, 0x1E41, 0x1E43, 0x1E43, 0x1E45, 0x1E45, + 0x1E47, 0x1E47, 0x1E49, 0x1E49, 0x1E4B, 0x1E4B, 0x1E4D, 0x1E4D, + 0x1E4F, 0x1E4F, 0x1E51, 0x1E51, 0x1E53, 0x1E53, 0x1E55, 0x1E55, + 0x1E57, 0x1E57, 0x1E59, 0x1E59, 0x1E5B, 0x1E5B, 0x1E5D, 0x1E5D, + 0x1E5F, 0x1E5F, 0x1E61, 0x1E61, 0x1E63, 0x1E63, 0x1E65, 0x1E65, + 0x1E67, 0x1E67, 0x1E69, 0x1E69, 0x1E6B, 0x1E6B, 0x1E6D, 0x1E6D, + 0x1E6F, 0x1E6F, 0x1E71, 0x1E71, 0x1E73, 0x1E73, 0x1E75, 0x1E75, + 0x1E77, 0x1E77, 0x1E79, 0x1E79, 0x1E7B, 0x1E7B, 0x1E7D, 0x1E7D, + 0x1E7F, 0x1E7F, 0x1E81, 0x1E81, 0x1E83, 0x1E83, 0x1E85, 0x1E85, + 0x1E87, 0x1E87, 0x1E89, 0x1E89, 0x1E8B, 0x1E8B, 0x1E8D, 0x1E8D, + 0x1E8F, 0x1E8F, 0x1E91, 0x1E91, 0x1E93, 0x1E93, 0x1E95, 0x1E9D, + 0x1E9F, 0x1E9F, 0x1EA1, 0x1EA1, 0x1EA3, 0x1EA3, 0x1EA5, 0x1EA5, + 0x1EA7, 0x1EA7, 0x1EA9, 0x1EA9, 0x1EAB, 0x1EAB, 0x1EAD, 0x1EAD, + 0x1EAF, 0x1EAF, 0x1EB1, 0x1EB1, 0x1EB3, 0x1EB3, 0x1EB5, 0x1EB5, + 0x1EB7, 0x1EB7, 0x1EB9, 0x1EB9, 0x1EBB, 0x1EBB, 0x1EBD, 0x1EBD, + 0x1EBF, 0x1EBF, 0x1EC1, 0x1EC1, 0x1EC3, 0x1EC3, 0x1EC5, 0x1EC5, + 0x1EC7, 0x1EC7, 0x1EC9, 0x1EC9, 0x1ECB, 0x1ECB, 0x1ECD, 0x1ECD, + 0x1ECF, 0x1ECF, 0x1ED1, 0x1ED1, 0x1ED3, 0x1ED3, 0x1ED5, 0x1ED5, + 0x1ED7, 0x1ED7, 0x1ED9, 0x1ED9, 0x1EDB, 0x1EDB, 0x1EDD, 0x1EDD, + 0x1EDF, 0x1EDF, 0x1EE1, 0x1EE1, 0x1EE3, 0x1EE3, 0x1EE5, 0x1EE5, + 0x1EE7, 0x1EE7, 0x1EE9, 0x1EE9, 0x1EEB, 0x1EEB, 0x1EED, 0x1EED, + 0x1EEF, 0x1EEF, 0x1EF1, 0x1EF1, 0x1EF3, 0x1EF3, 0x1EF5, 0x1EF5, + 0x1EF7, 0x1EF7, 0x1EF9, 0x1EF9, 0x1EFB, 0x1EFB, 0x1EFD, 0x1EFD, + 0x1EFF, 0x1F07, 0x1F10, 0x1F15, 0x1F20, 0x1F27, 0x1F30, 0x1F37, + 0x1F40, 0x1F45, 0x1F50, 0x1F57, 0x1F60, 0x1F67, 0x1F70, 0x1F7D, + 0x1F80, 0x1F87, 0x1F90, 0x1F97, 0x1FA0, 0x1FA7, 0x1FB0, 0x1FB4, + 0x1FB6, 0x1FB7, 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FC7, + 0x1FD0, 0x1FD3, 0x1FD6, 0x1FD7, 0x1FE0, 0x1FE7, 0x1FF2, 0x1FF4, + 0x1FF6, 0x1FF7, 0x210A, 0x210A, 0x210E, 0x210F, 0x2113, 0x2113, + 0x212F, 0x212F, 0x2134, 0x2134, 0x2139, 0x2139, 0x213C, 0x213D, + 0x2146, 0x2149, 0x214E, 0x214E, 0x2184, 0x2184, 0x2C30, 0x2C5F, + 0x2C61, 0x2C61, 0x2C65, 0x2C66, 0x2C68, 0x2C68, 0x2C6A, 0x2C6A, + 0x2C6C, 0x2C6C, 0x2C71, 0x2C71, 0x2C73, 0x2C74, 0x2C76, 0x2C7B, + 0x2C81, 0x2C81, 0x2C83, 0x2C83, 0x2C85, 0x2C85, 0x2C87, 0x2C87, + 0x2C89, 0x2C89, 0x2C8B, 0x2C8B, 0x2C8D, 0x2C8D, 0x2C8F, 0x2C8F, + 0x2C91, 0x2C91, 0x2C93, 0x2C93, 0x2C95, 0x2C95, 0x2C97, 0x2C97, + 0x2C99, 0x2C99, 0x2C9B, 0x2C9B, 0x2C9D, 0x2C9D, 0x2C9F, 0x2C9F, + 0x2CA1, 0x2CA1, 0x2CA3, 0x2CA3, 0x2CA5, 0x2CA5, 0x2CA7, 0x2CA7, + 0x2CA9, 0x2CA9, 0x2CAB, 0x2CAB, 0x2CAD, 0x2CAD, 0x2CAF, 0x2CAF, + 0x2CB1, 0x2CB1, 0x2CB3, 0x2CB3, 0x2CB5, 0x2CB5, 0x2CB7, 0x2CB7, + 0x2CB9, 0x2CB9, 0x2CBB, 0x2CBB, 0x2CBD, 0x2CBD, 0x2CBF, 0x2CBF, + 0x2CC1, 0x2CC1, 0x2CC3, 0x2CC3, 0x2CC5, 0x2CC5, 0x2CC7, 0x2CC7, + 0x2CC9, 0x2CC9, 0x2CCB, 0x2CCB, 0x2CCD, 0x2CCD, 0x2CCF, 0x2CCF, + 0x2CD1, 0x2CD1, 0x2CD3, 0x2CD3, 0x2CD5, 0x2CD5, 0x2CD7, 0x2CD7, + 0x2CD9, 0x2CD9, 0x2CDB, 0x2CDB, 0x2CDD, 0x2CDD, 0x2CDF, 0x2CDF, + 0x2CE1, 0x2CE1, 0x2CE3, 0x2CE4, 0x2CEC, 0x2CEC, 0x2CEE, 0x2CEE, + 0x2CF3, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, + 0xA641, 0xA641, 0xA643, 0xA643, 0xA645, 0xA645, 0xA647, 0xA647, + 0xA649, 0xA649, 0xA64B, 0xA64B, 0xA64D, 0xA64D, 0xA64F, 0xA64F, + 0xA651, 0xA651, 0xA653, 0xA653, 0xA655, 0xA655, 0xA657, 0xA657, + 0xA659, 0xA659, 0xA65B, 0xA65B, 0xA65D, 0xA65D, 0xA65F, 0xA65F, + 0xA661, 0xA661, 0xA663, 0xA663, 0xA665, 0xA665, 0xA667, 0xA667, + 0xA669, 0xA669, 0xA66B, 0xA66B, 0xA66D, 0xA66D, 0xA681, 0xA681, + 0xA683, 0xA683, 0xA685, 0xA685, 0xA687, 0xA687, 0xA689, 0xA689, + 0xA68B, 0xA68B, 0xA68D, 0xA68D, 0xA68F, 0xA68F, 0xA691, 0xA691, + 0xA693, 0xA693, 0xA695, 0xA695, 0xA697, 0xA697, 0xA699, 0xA699, + 0xA69B, 0xA69B, 0xA723, 0xA723, 0xA725, 0xA725, 0xA727, 0xA727, + 0xA729, 0xA729, 0xA72B, 0xA72B, 0xA72D, 0xA72D, 0xA72F, 0xA731, + 0xA733, 0xA733, 0xA735, 0xA735, 0xA737, 0xA737, 0xA739, 0xA739, + 0xA73B, 0xA73B, 0xA73D, 0xA73D, 0xA73F, 0xA73F, 0xA741, 0xA741, + 0xA743, 0xA743, 0xA745, 0xA745, 0xA747, 0xA747, 0xA749, 0xA749, + 0xA74B, 0xA74B, 0xA74D, 0xA74D, 0xA74F, 0xA74F, 0xA751, 0xA751, + 0xA753, 0xA753, 0xA755, 0xA755, 0xA757, 0xA757, 0xA759, 0xA759, + 0xA75B, 0xA75B, 0xA75D, 0xA75D, 0xA75F, 0xA75F, 0xA761, 0xA761, + 0xA763, 0xA763, 0xA765, 0xA765, 0xA767, 0xA767, 0xA769, 0xA769, + 0xA76B, 0xA76B, 0xA76D, 0xA76D, 0xA76F, 0xA76F, 0xA771, 0xA778, + 0xA77A, 0xA77A, 0xA77C, 0xA77C, 0xA77F, 0xA77F, 0xA781, 0xA781, + 0xA783, 0xA783, 0xA785, 0xA785, 0xA787, 0xA787, 0xA78C, 0xA78C, + 0xA78E, 0xA78E, 0xA791, 0xA791, 0xA793, 0xA795, 0xA797, 0xA797, + 0xA799, 0xA799, 0xA79B, 0xA79B, 0xA79D, 0xA79D, 0xA79F, 0xA79F, + 0xA7A1, 0xA7A1, 0xA7A3, 0xA7A3, 0xA7A5, 0xA7A5, 0xA7A7, 0xA7A7, + 0xA7A9, 0xA7A9, 0xA7AF, 0xA7AF, 0xA7B5, 0xA7B5, 0xA7B7, 0xA7B7, + 0xA7B9, 0xA7B9, 0xA7BB, 0xA7BB, 0xA7BD, 0xA7BD, 0xA7BF, 0xA7BF, + 0xA7C1, 0xA7C1, 0xA7C3, 0xA7C3, 0xA7C8, 0xA7C8, 0xA7CA, 0xA7CA, + 0xA7D1, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D5, 0xA7D7, 0xA7D7, + 0xA7D9, 0xA7D9, 0xA7F6, 0xA7F6, 0xA7FA, 0xA7FA, 0xAB30, 0xAB5A, + 0xAB60, 0xAB68, 0xAB70, 0xABBF, 0xFB00, 0xFB06, 0xFB13, 0xFB17, + 0xFF41, 0xFF5A, 0x10428, 0x1044F, 0x104D8, 0x104FB, 0x10597, 0x105A1, + 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10CC0, 0x10CF2, + 0x118C0, 0x118DF, 0x16E60, 0x16E7F, 0x1D41A, 0x1D433, 0x1D44E, 0x1D454, + 0x1D456, 0x1D467, 0x1D482, 0x1D49B, 0x1D4B6, 0x1D4B9, 0x1D4BB, 0x1D4BB, + 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D4CF, 0x1D4EA, 0x1D503, 0x1D51E, 0x1D537, + 0x1D552, 0x1D56B, 0x1D586, 0x1D59F, 0x1D5BA, 0x1D5D3, 0x1D5EE, 0x1D607, + 0x1D622, 0x1D63B, 0x1D656, 0x1D66F, 0x1D68A, 0x1D6A5, 0x1D6C2, 0x1D6DA, + 0x1D6DC, 0x1D6E1, 0x1D6FC, 0x1D714, 0x1D716, 0x1D71B, 0x1D736, 0x1D74E, + 0x1D750, 0x1D755, 0x1D770, 0x1D788, 0x1D78A, 0x1D78F, 0x1D7AA, 0x1D7C2, + 0x1D7C4, 0x1D7C9, 0x1D7CB, 0x1D7CB, 0x1DF00, 0x1DF09, 0x1DF0B, 0x1DF1E, + 0x1E922, 0x1E943, + // #10 (1382+10): gc=Titlecase_Letter:Lt + 0x01C5, 0x01C5, 0x01C8, 0x01C8, 0x01CB, 0x01CB, 0x01F2, 0x01F2, + 0x1F88, 0x1F8F, 0x1F98, 0x1F9F, 0x1FA8, 0x1FAF, 0x1FBC, 0x1FBC, + 0x1FCC, 0x1FCC, 0x1FFC, 0x1FFC, + // #11 (1392+646): gc=Uppercase_Letter:Lu + 0x0041, 0x005A, 0x00C0, 0x00D6, 0x00D8, 0x00DE, 0x0100, 0x0100, + 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106, 0x0108, 0x0108, + 0x010A, 0x010A, 0x010C, 0x010C, 0x010E, 0x010E, 0x0110, 0x0110, + 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116, 0x0118, 0x0118, + 0x011A, 0x011A, 0x011C, 0x011C, 0x011E, 0x011E, 0x0120, 0x0120, + 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126, 0x0128, 0x0128, + 0x012A, 0x012A, 0x012C, 0x012C, 0x012E, 0x012E, 0x0130, 0x0130, + 0x0132, 0x0132, 0x0134, 0x0134, 0x0136, 0x0136, 0x0139, 0x0139, + 0x013B, 0x013B, 0x013D, 0x013D, 0x013F, 0x013F, 0x0141, 0x0141, + 0x0143, 0x0143, 0x0145, 0x0145, 0x0147, 0x0147, 0x014A, 0x014A, + 0x014C, 0x014C, 0x014E, 0x014E, 0x0150, 0x0150, 0x0152, 0x0152, + 0x0154, 0x0154, 0x0156, 0x0156, 0x0158, 0x0158, 0x015A, 0x015A, + 0x015C, 0x015C, 0x015E, 0x015E, 0x0160, 0x0160, 0x0162, 0x0162, + 0x0164, 0x0164, 0x0166, 0x0166, 0x0168, 0x0168, 0x016A, 0x016A, + 0x016C, 0x016C, 0x016E, 0x016E, 0x0170, 0x0170, 0x0172, 0x0172, + 0x0174, 0x0174, 0x0176, 0x0176, 0x0178, 0x0179, 0x017B, 0x017B, + 0x017D, 0x017D, 0x0181, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187, + 0x0189, 0x018B, 0x018E, 0x0191, 0x0193, 0x0194, 0x0196, 0x0198, + 0x019C, 0x019D, 0x019F, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, + 0x01A6, 0x01A7, 0x01A9, 0x01A9, 0x01AC, 0x01AC, 0x01AE, 0x01AF, + 0x01B1, 0x01B3, 0x01B5, 0x01B5, 0x01B7, 0x01B8, 0x01BC, 0x01BC, + 0x01C4, 0x01C4, 0x01C7, 0x01C7, 0x01CA, 0x01CA, 0x01CD, 0x01CD, + 0x01CF, 0x01CF, 0x01D1, 0x01D1, 0x01D3, 0x01D3, 0x01D5, 0x01D5, + 0x01D7, 0x01D7, 0x01D9, 0x01D9, 0x01DB, 0x01DB, 0x01DE, 0x01DE, + 0x01E0, 0x01E0, 0x01E2, 0x01E2, 0x01E4, 0x01E4, 0x01E6, 0x01E6, + 0x01E8, 0x01E8, 0x01EA, 0x01EA, 0x01EC, 0x01EC, 0x01EE, 0x01EE, + 0x01F1, 0x01F1, 0x01F4, 0x01F4, 0x01F6, 0x01F8, 0x01FA, 0x01FA, + 0x01FC, 0x01FC, 0x01FE, 0x01FE, 0x0200, 0x0200, 0x0202, 0x0202, + 0x0204, 0x0204, 0x0206, 0x0206, 0x0208, 0x0208, 0x020A, 0x020A, + 0x020C, 0x020C, 0x020E, 0x020E, 0x0210, 0x0210, 0x0212, 0x0212, + 0x0214, 0x0214, 0x0216, 0x0216, 0x0218, 0x0218, 0x021A, 0x021A, + 0x021C, 0x021C, 0x021E, 0x021E, 0x0220, 0x0220, 0x0222, 0x0222, + 0x0224, 0x0224, 0x0226, 0x0226, 0x0228, 0x0228, 0x022A, 0x022A, + 0x022C, 0x022C, 0x022E, 0x022E, 0x0230, 0x0230, 0x0232, 0x0232, + 0x023A, 0x023B, 0x023D, 0x023E, 0x0241, 0x0241, 0x0243, 0x0246, + 0x0248, 0x0248, 0x024A, 0x024A, 0x024C, 0x024C, 0x024E, 0x024E, + 0x0370, 0x0370, 0x0372, 0x0372, 0x0376, 0x0376, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x038F, + 0x0391, 0x03A1, 0x03A3, 0x03AB, 0x03CF, 0x03CF, 0x03D2, 0x03D4, + 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, + 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, + 0x03E8, 0x03E8, 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, + 0x03F4, 0x03F4, 0x03F7, 0x03F7, 0x03F9, 0x03FA, 0x03FD, 0x042F, + 0x0460, 0x0460, 0x0462, 0x0462, 0x0464, 0x0464, 0x0466, 0x0466, + 0x0468, 0x0468, 0x046A, 0x046A, 0x046C, 0x046C, 0x046E, 0x046E, + 0x0470, 0x0470, 0x0472, 0x0472, 0x0474, 0x0474, 0x0476, 0x0476, + 0x0478, 0x0478, 0x047A, 0x047A, 0x047C, 0x047C, 0x047E, 0x047E, + 0x0480, 0x0480, 0x048A, 0x048A, 0x048C, 0x048C, 0x048E, 0x048E, + 0x0490, 0x0490, 0x0492, 0x0492, 0x0494, 0x0494, 0x0496, 0x0496, + 0x0498, 0x0498, 0x049A, 0x049A, 0x049C, 0x049C, 0x049E, 0x049E, + 0x04A0, 0x04A0, 0x04A2, 0x04A2, 0x04A4, 0x04A4, 0x04A6, 0x04A6, + 0x04A8, 0x04A8, 0x04AA, 0x04AA, 0x04AC, 0x04AC, 0x04AE, 0x04AE, + 0x04B0, 0x04B0, 0x04B2, 0x04B2, 0x04B4, 0x04B4, 0x04B6, 0x04B6, + 0x04B8, 0x04B8, 0x04BA, 0x04BA, 0x04BC, 0x04BC, 0x04BE, 0x04BE, + 0x04C0, 0x04C1, 0x04C3, 0x04C3, 0x04C5, 0x04C5, 0x04C7, 0x04C7, + 0x04C9, 0x04C9, 0x04CB, 0x04CB, 0x04CD, 0x04CD, 0x04D0, 0x04D0, + 0x04D2, 0x04D2, 0x04D4, 0x04D4, 0x04D6, 0x04D6, 0x04D8, 0x04D8, + 0x04DA, 0x04DA, 0x04DC, 0x04DC, 0x04DE, 0x04DE, 0x04E0, 0x04E0, + 0x04E2, 0x04E2, 0x04E4, 0x04E4, 0x04E6, 0x04E6, 0x04E8, 0x04E8, + 0x04EA, 0x04EA, 0x04EC, 0x04EC, 0x04EE, 0x04EE, 0x04F0, 0x04F0, + 0x04F2, 0x04F2, 0x04F4, 0x04F4, 0x04F6, 0x04F6, 0x04F8, 0x04F8, + 0x04FA, 0x04FA, 0x04FC, 0x04FC, 0x04FE, 0x04FE, 0x0500, 0x0500, + 0x0502, 0x0502, 0x0504, 0x0504, 0x0506, 0x0506, 0x0508, 0x0508, + 0x050A, 0x050A, 0x050C, 0x050C, 0x050E, 0x050E, 0x0510, 0x0510, + 0x0512, 0x0512, 0x0514, 0x0514, 0x0516, 0x0516, 0x0518, 0x0518, + 0x051A, 0x051A, 0x051C, 0x051C, 0x051E, 0x051E, 0x0520, 0x0520, + 0x0522, 0x0522, 0x0524, 0x0524, 0x0526, 0x0526, 0x0528, 0x0528, + 0x052A, 0x052A, 0x052C, 0x052C, 0x052E, 0x052E, 0x0531, 0x0556, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x13A0, 0x13F5, + 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1E00, 0x1E00, 0x1E02, 0x1E02, + 0x1E04, 0x1E04, 0x1E06, 0x1E06, 0x1E08, 0x1E08, 0x1E0A, 0x1E0A, + 0x1E0C, 0x1E0C, 0x1E0E, 0x1E0E, 0x1E10, 0x1E10, 0x1E12, 0x1E12, + 0x1E14, 0x1E14, 0x1E16, 0x1E16, 0x1E18, 0x1E18, 0x1E1A, 0x1E1A, + 0x1E1C, 0x1E1C, 0x1E1E, 0x1E1E, 0x1E20, 0x1E20, 0x1E22, 0x1E22, + 0x1E24, 0x1E24, 0x1E26, 0x1E26, 0x1E28, 0x1E28, 0x1E2A, 0x1E2A, + 0x1E2C, 0x1E2C, 0x1E2E, 0x1E2E, 0x1E30, 0x1E30, 0x1E32, 0x1E32, + 0x1E34, 0x1E34, 0x1E36, 0x1E36, 0x1E38, 0x1E38, 0x1E3A, 0x1E3A, + 0x1E3C, 0x1E3C, 0x1E3E, 0x1E3E, 0x1E40, 0x1E40, 0x1E42, 0x1E42, + 0x1E44, 0x1E44, 0x1E46, 0x1E46, 0x1E48, 0x1E48, 0x1E4A, 0x1E4A, + 0x1E4C, 0x1E4C, 0x1E4E, 0x1E4E, 0x1E50, 0x1E50, 0x1E52, 0x1E52, + 0x1E54, 0x1E54, 0x1E56, 0x1E56, 0x1E58, 0x1E58, 0x1E5A, 0x1E5A, + 0x1E5C, 0x1E5C, 0x1E5E, 0x1E5E, 0x1E60, 0x1E60, 0x1E62, 0x1E62, + 0x1E64, 0x1E64, 0x1E66, 0x1E66, 0x1E68, 0x1E68, 0x1E6A, 0x1E6A, + 0x1E6C, 0x1E6C, 0x1E6E, 0x1E6E, 0x1E70, 0x1E70, 0x1E72, 0x1E72, + 0x1E74, 0x1E74, 0x1E76, 0x1E76, 0x1E78, 0x1E78, 0x1E7A, 0x1E7A, + 0x1E7C, 0x1E7C, 0x1E7E, 0x1E7E, 0x1E80, 0x1E80, 0x1E82, 0x1E82, + 0x1E84, 0x1E84, 0x1E86, 0x1E86, 0x1E88, 0x1E88, 0x1E8A, 0x1E8A, + 0x1E8C, 0x1E8C, 0x1E8E, 0x1E8E, 0x1E90, 0x1E90, 0x1E92, 0x1E92, + 0x1E94, 0x1E94, 0x1E9E, 0x1E9E, 0x1EA0, 0x1EA0, 0x1EA2, 0x1EA2, + 0x1EA4, 0x1EA4, 0x1EA6, 0x1EA6, 0x1EA8, 0x1EA8, 0x1EAA, 0x1EAA, + 0x1EAC, 0x1EAC, 0x1EAE, 0x1EAE, 0x1EB0, 0x1EB0, 0x1EB2, 0x1EB2, + 0x1EB4, 0x1EB4, 0x1EB6, 0x1EB6, 0x1EB8, 0x1EB8, 0x1EBA, 0x1EBA, + 0x1EBC, 0x1EBC, 0x1EBE, 0x1EBE, 0x1EC0, 0x1EC0, 0x1EC2, 0x1EC2, + 0x1EC4, 0x1EC4, 0x1EC6, 0x1EC6, 0x1EC8, 0x1EC8, 0x1ECA, 0x1ECA, + 0x1ECC, 0x1ECC, 0x1ECE, 0x1ECE, 0x1ED0, 0x1ED0, 0x1ED2, 0x1ED2, + 0x1ED4, 0x1ED4, 0x1ED6, 0x1ED6, 0x1ED8, 0x1ED8, 0x1EDA, 0x1EDA, + 0x1EDC, 0x1EDC, 0x1EDE, 0x1EDE, 0x1EE0, 0x1EE0, 0x1EE2, 0x1EE2, + 0x1EE4, 0x1EE4, 0x1EE6, 0x1EE6, 0x1EE8, 0x1EE8, 0x1EEA, 0x1EEA, + 0x1EEC, 0x1EEC, 0x1EEE, 0x1EEE, 0x1EF0, 0x1EF0, 0x1EF2, 0x1EF2, + 0x1EF4, 0x1EF4, 0x1EF6, 0x1EF6, 0x1EF8, 0x1EF8, 0x1EFA, 0x1EFA, + 0x1EFC, 0x1EFC, 0x1EFE, 0x1EFE, 0x1F08, 0x1F0F, 0x1F18, 0x1F1D, + 0x1F28, 0x1F2F, 0x1F38, 0x1F3F, 0x1F48, 0x1F4D, 0x1F59, 0x1F59, + 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F5F, 0x1F68, 0x1F6F, + 0x1FB8, 0x1FBB, 0x1FC8, 0x1FCB, 0x1FD8, 0x1FDB, 0x1FE8, 0x1FEC, + 0x1FF8, 0x1FFB, 0x2102, 0x2102, 0x2107, 0x2107, 0x210B, 0x210D, + 0x2110, 0x2112, 0x2115, 0x2115, 0x2119, 0x211D, 0x2124, 0x2124, + 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x212D, 0x2130, 0x2133, + 0x213E, 0x213F, 0x2145, 0x2145, 0x2183, 0x2183, 0x2C00, 0x2C2F, + 0x2C60, 0x2C60, 0x2C62, 0x2C64, 0x2C67, 0x2C67, 0x2C69, 0x2C69, + 0x2C6B, 0x2C6B, 0x2C6D, 0x2C70, 0x2C72, 0x2C72, 0x2C75, 0x2C75, + 0x2C7E, 0x2C80, 0x2C82, 0x2C82, 0x2C84, 0x2C84, 0x2C86, 0x2C86, + 0x2C88, 0x2C88, 0x2C8A, 0x2C8A, 0x2C8C, 0x2C8C, 0x2C8E, 0x2C8E, + 0x2C90, 0x2C90, 0x2C92, 0x2C92, 0x2C94, 0x2C94, 0x2C96, 0x2C96, + 0x2C98, 0x2C98, 0x2C9A, 0x2C9A, 0x2C9C, 0x2C9C, 0x2C9E, 0x2C9E, + 0x2CA0, 0x2CA0, 0x2CA2, 0x2CA2, 0x2CA4, 0x2CA4, 0x2CA6, 0x2CA6, + 0x2CA8, 0x2CA8, 0x2CAA, 0x2CAA, 0x2CAC, 0x2CAC, 0x2CAE, 0x2CAE, + 0x2CB0, 0x2CB0, 0x2CB2, 0x2CB2, 0x2CB4, 0x2CB4, 0x2CB6, 0x2CB6, + 0x2CB8, 0x2CB8, 0x2CBA, 0x2CBA, 0x2CBC, 0x2CBC, 0x2CBE, 0x2CBE, + 0x2CC0, 0x2CC0, 0x2CC2, 0x2CC2, 0x2CC4, 0x2CC4, 0x2CC6, 0x2CC6, + 0x2CC8, 0x2CC8, 0x2CCA, 0x2CCA, 0x2CCC, 0x2CCC, 0x2CCE, 0x2CCE, + 0x2CD0, 0x2CD0, 0x2CD2, 0x2CD2, 0x2CD4, 0x2CD4, 0x2CD6, 0x2CD6, + 0x2CD8, 0x2CD8, 0x2CDA, 0x2CDA, 0x2CDC, 0x2CDC, 0x2CDE, 0x2CDE, + 0x2CE0, 0x2CE0, 0x2CE2, 0x2CE2, 0x2CEB, 0x2CEB, 0x2CED, 0x2CED, + 0x2CF2, 0x2CF2, 0xA640, 0xA640, 0xA642, 0xA642, 0xA644, 0xA644, + 0xA646, 0xA646, 0xA648, 0xA648, 0xA64A, 0xA64A, 0xA64C, 0xA64C, + 0xA64E, 0xA64E, 0xA650, 0xA650, 0xA652, 0xA652, 0xA654, 0xA654, + 0xA656, 0xA656, 0xA658, 0xA658, 0xA65A, 0xA65A, 0xA65C, 0xA65C, + 0xA65E, 0xA65E, 0xA660, 0xA660, 0xA662, 0xA662, 0xA664, 0xA664, + 0xA666, 0xA666, 0xA668, 0xA668, 0xA66A, 0xA66A, 0xA66C, 0xA66C, + 0xA680, 0xA680, 0xA682, 0xA682, 0xA684, 0xA684, 0xA686, 0xA686, + 0xA688, 0xA688, 0xA68A, 0xA68A, 0xA68C, 0xA68C, 0xA68E, 0xA68E, + 0xA690, 0xA690, 0xA692, 0xA692, 0xA694, 0xA694, 0xA696, 0xA696, + 0xA698, 0xA698, 0xA69A, 0xA69A, 0xA722, 0xA722, 0xA724, 0xA724, + 0xA726, 0xA726, 0xA728, 0xA728, 0xA72A, 0xA72A, 0xA72C, 0xA72C, + 0xA72E, 0xA72E, 0xA732, 0xA732, 0xA734, 0xA734, 0xA736, 0xA736, + 0xA738, 0xA738, 0xA73A, 0xA73A, 0xA73C, 0xA73C, 0xA73E, 0xA73E, + 0xA740, 0xA740, 0xA742, 0xA742, 0xA744, 0xA744, 0xA746, 0xA746, + 0xA748, 0xA748, 0xA74A, 0xA74A, 0xA74C, 0xA74C, 0xA74E, 0xA74E, + 0xA750, 0xA750, 0xA752, 0xA752, 0xA754, 0xA754, 0xA756, 0xA756, + 0xA758, 0xA758, 0xA75A, 0xA75A, 0xA75C, 0xA75C, 0xA75E, 0xA75E, + 0xA760, 0xA760, 0xA762, 0xA762, 0xA764, 0xA764, 0xA766, 0xA766, + 0xA768, 0xA768, 0xA76A, 0xA76A, 0xA76C, 0xA76C, 0xA76E, 0xA76E, + 0xA779, 0xA779, 0xA77B, 0xA77B, 0xA77D, 0xA77E, 0xA780, 0xA780, + 0xA782, 0xA782, 0xA784, 0xA784, 0xA786, 0xA786, 0xA78B, 0xA78B, + 0xA78D, 0xA78D, 0xA790, 0xA790, 0xA792, 0xA792, 0xA796, 0xA796, + 0xA798, 0xA798, 0xA79A, 0xA79A, 0xA79C, 0xA79C, 0xA79E, 0xA79E, + 0xA7A0, 0xA7A0, 0xA7A2, 0xA7A2, 0xA7A4, 0xA7A4, 0xA7A6, 0xA7A6, + 0xA7A8, 0xA7A8, 0xA7AA, 0xA7AE, 0xA7B0, 0xA7B4, 0xA7B6, 0xA7B6, + 0xA7B8, 0xA7B8, 0xA7BA, 0xA7BA, 0xA7BC, 0xA7BC, 0xA7BE, 0xA7BE, + 0xA7C0, 0xA7C0, 0xA7C2, 0xA7C2, 0xA7C4, 0xA7C7, 0xA7C9, 0xA7C9, + 0xA7D0, 0xA7D0, 0xA7D6, 0xA7D6, 0xA7D8, 0xA7D8, 0xA7F5, 0xA7F5, + 0xFF21, 0xFF3A, 0x10400, 0x10427, 0x104B0, 0x104D3, 0x10570, 0x1057A, + 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, 0x10C80, 0x10CB2, + 0x118A0, 0x118BF, 0x16E40, 0x16E5F, 0x1D400, 0x1D419, 0x1D434, 0x1D44D, + 0x1D468, 0x1D481, 0x1D49C, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, + 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B5, 0x1D4D0, 0x1D4E9, + 0x1D504, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, + 0x1D538, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, + 0x1D54A, 0x1D550, 0x1D56C, 0x1D585, 0x1D5A0, 0x1D5B9, 0x1D5D4, 0x1D5ED, + 0x1D608, 0x1D621, 0x1D63C, 0x1D655, 0x1D670, 0x1D689, 0x1D6A8, 0x1D6C0, + 0x1D6E2, 0x1D6FA, 0x1D71C, 0x1D734, 0x1D756, 0x1D76E, 0x1D790, 0x1D7A8, + 0x1D7CA, 0x1D7CA, 0x1E900, 0x1E921, + // #12 (2038+69): gc=Modifier_Letter:Lm + 0x02B0, 0x02C1, 0x02C6, 0x02D1, 0x02E0, 0x02E4, 0x02EC, 0x02EC, + 0x02EE, 0x02EE, 0x0374, 0x0374, 0x037A, 0x037A, 0x0559, 0x0559, + 0x0640, 0x0640, 0x06E5, 0x06E6, 0x07F4, 0x07F5, 0x07FA, 0x07FA, + 0x081A, 0x081A, 0x0824, 0x0824, 0x0828, 0x0828, 0x08C9, 0x08C9, + 0x0971, 0x0971, 0x0E46, 0x0E46, 0x0EC6, 0x0EC6, 0x10FC, 0x10FC, + 0x17D7, 0x17D7, 0x1843, 0x1843, 0x1AA7, 0x1AA7, 0x1C78, 0x1C7D, + 0x1D2C, 0x1D6A, 0x1D78, 0x1D78, 0x1D9B, 0x1DBF, 0x2071, 0x2071, + 0x207F, 0x207F, 0x2090, 0x209C, 0x2C7C, 0x2C7D, 0x2D6F, 0x2D6F, + 0x2E2F, 0x2E2F, 0x3005, 0x3005, 0x3031, 0x3035, 0x303B, 0x303B, + 0x309D, 0x309E, 0x30FC, 0x30FE, 0xA015, 0xA015, 0xA4F8, 0xA4FD, + 0xA60C, 0xA60C, 0xA67F, 0xA67F, 0xA69C, 0xA69D, 0xA717, 0xA71F, + 0xA770, 0xA770, 0xA788, 0xA788, 0xA7F2, 0xA7F4, 0xA7F8, 0xA7F9, + 0xA9CF, 0xA9CF, 0xA9E6, 0xA9E6, 0xAA70, 0xAA70, 0xAADD, 0xAADD, + 0xAAF3, 0xAAF4, 0xAB5C, 0xAB5F, 0xAB69, 0xAB69, 0xFF70, 0xFF70, + 0xFF9E, 0xFF9F, 0x10780, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, + 0x16B40, 0x16B43, 0x16F93, 0x16F9F, 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE3, + 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1E137, 0x1E13D, + 0x1E94B, 0x1E94B, + // #13 (2107+501): gc=Other_Letter:Lo + 0x00AA, 0x00AA, 0x00BA, 0x00BA, 0x01BB, 0x01BB, 0x01C0, 0x01C3, + 0x0294, 0x0294, 0x05D0, 0x05EA, 0x05EF, 0x05F2, 0x0620, 0x063F, + 0x0641, 0x064A, 0x066E, 0x066F, 0x0671, 0x06D3, 0x06D5, 0x06D5, + 0x06EE, 0x06EF, 0x06FA, 0x06FC, 0x06FF, 0x06FF, 0x0710, 0x0710, + 0x0712, 0x072F, 0x074D, 0x07A5, 0x07B1, 0x07B1, 0x07CA, 0x07EA, + 0x0800, 0x0815, 0x0840, 0x0858, 0x0860, 0x086A, 0x0870, 0x0887, + 0x0889, 0x088E, 0x08A0, 0x08C8, 0x0904, 0x0939, 0x093D, 0x093D, + 0x0950, 0x0950, 0x0958, 0x0961, 0x0972, 0x0980, 0x0985, 0x098C, + 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B2, 0x09B2, + 0x09B6, 0x09B9, 0x09BD, 0x09BD, 0x09CE, 0x09CE, 0x09DC, 0x09DD, + 0x09DF, 0x09E1, 0x09F0, 0x09F1, 0x09FC, 0x09FC, 0x0A05, 0x0A0A, + 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, + 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, + 0x0A72, 0x0A74, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABD, 0x0ABD, + 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE1, 0x0AF9, 0x0AF9, 0x0B05, 0x0B0C, + 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, + 0x0B35, 0x0B39, 0x0B3D, 0x0B3D, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, + 0x0B71, 0x0B71, 0x0B83, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, + 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, + 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BD0, 0x0BD0, + 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C39, + 0x0C3D, 0x0C3D, 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, 0x0C60, 0x0C61, + 0x0C80, 0x0C80, 0x0C85, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, + 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBD, 0x0CBD, 0x0CDD, 0x0CDE, + 0x0CE0, 0x0CE1, 0x0CF1, 0x0CF2, 0x0D04, 0x0D0C, 0x0D0E, 0x0D10, + 0x0D12, 0x0D3A, 0x0D3D, 0x0D3D, 0x0D4E, 0x0D4E, 0x0D54, 0x0D56, + 0x0D5F, 0x0D61, 0x0D7A, 0x0D7F, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, + 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0E01, 0x0E30, + 0x0E32, 0x0E33, 0x0E40, 0x0E45, 0x0E81, 0x0E82, 0x0E84, 0x0E84, + 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, 0x0EA7, 0x0EB0, + 0x0EB2, 0x0EB3, 0x0EBD, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EDC, 0x0EDF, + 0x0F00, 0x0F00, 0x0F40, 0x0F47, 0x0F49, 0x0F6C, 0x0F88, 0x0F8C, + 0x1000, 0x102A, 0x103F, 0x103F, 0x1050, 0x1055, 0x105A, 0x105D, + 0x1061, 0x1061, 0x1065, 0x1066, 0x106E, 0x1070, 0x1075, 0x1081, + 0x108E, 0x108E, 0x1100, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, + 0x1258, 0x1258, 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, + 0x1290, 0x12B0, 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, + 0x12C2, 0x12C5, 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, + 0x1318, 0x135A, 0x1380, 0x138F, 0x1401, 0x166C, 0x166F, 0x167F, + 0x1681, 0x169A, 0x16A0, 0x16EA, 0x16F1, 0x16F8, 0x1700, 0x1711, + 0x171F, 0x1731, 0x1740, 0x1751, 0x1760, 0x176C, 0x176E, 0x1770, + 0x1780, 0x17B3, 0x17DC, 0x17DC, 0x1820, 0x1842, 0x1844, 0x1878, + 0x1880, 0x1884, 0x1887, 0x18A8, 0x18AA, 0x18AA, 0x18B0, 0x18F5, + 0x1900, 0x191E, 0x1950, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, + 0x19B0, 0x19C9, 0x1A00, 0x1A16, 0x1A20, 0x1A54, 0x1B05, 0x1B33, + 0x1B45, 0x1B4C, 0x1B83, 0x1BA0, 0x1BAE, 0x1BAF, 0x1BBA, 0x1BE5, + 0x1C00, 0x1C23, 0x1C4D, 0x1C4F, 0x1C5A, 0x1C77, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF6, 0x1CFA, 0x1CFA, 0x2135, 0x2138, + 0x2D30, 0x2D67, 0x2D80, 0x2D96, 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, + 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, + 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, 0x3006, 0x3006, 0x303C, 0x303C, + 0x3041, 0x3096, 0x309F, 0x309F, 0x30A1, 0x30FA, 0x30FF, 0x30FF, + 0x3105, 0x312F, 0x3131, 0x318E, 0x31A0, 0x31BF, 0x31F0, 0x31FF, + 0x3400, 0x4DBF, 0x4E00, 0xA014, 0xA016, 0xA48C, 0xA4D0, 0xA4F7, + 0xA500, 0xA60B, 0xA610, 0xA61F, 0xA62A, 0xA62B, 0xA66E, 0xA66E, + 0xA6A0, 0xA6E5, 0xA78F, 0xA78F, 0xA7F7, 0xA7F7, 0xA7FB, 0xA801, + 0xA803, 0xA805, 0xA807, 0xA80A, 0xA80C, 0xA822, 0xA840, 0xA873, + 0xA882, 0xA8B3, 0xA8F2, 0xA8F7, 0xA8FB, 0xA8FB, 0xA8FD, 0xA8FE, + 0xA90A, 0xA925, 0xA930, 0xA946, 0xA960, 0xA97C, 0xA984, 0xA9B2, + 0xA9E0, 0xA9E4, 0xA9E7, 0xA9EF, 0xA9FA, 0xA9FE, 0xAA00, 0xAA28, + 0xAA40, 0xAA42, 0xAA44, 0xAA4B, 0xAA60, 0xAA6F, 0xAA71, 0xAA76, + 0xAA7A, 0xAA7A, 0xAA7E, 0xAAAF, 0xAAB1, 0xAAB1, 0xAAB5, 0xAAB6, + 0xAAB9, 0xAABD, 0xAAC0, 0xAAC0, 0xAAC2, 0xAAC2, 0xAADB, 0xAADC, + 0xAAE0, 0xAAEA, 0xAAF2, 0xAAF2, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, + 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xABC0, 0xABE2, + 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, + 0xFA70, 0xFAD9, 0xFB1D, 0xFB1D, 0xFB1F, 0xFB28, 0xFB2A, 0xFB36, + 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, + 0xFB46, 0xFBB1, 0xFBD3, 0xFD3D, 0xFD50, 0xFD8F, 0xFD92, 0xFDC7, + 0xFDF0, 0xFDFB, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0xFF66, 0xFF6F, + 0xFF71, 0xFF9D, 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, + 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, 0x10000, 0x1000B, 0x1000D, 0x10026, + 0x10028, 0x1003A, 0x1003C, 0x1003D, 0x1003F, 0x1004D, 0x10050, 0x1005D, + 0x10080, 0x100FA, 0x10280, 0x1029C, 0x102A0, 0x102D0, 0x10300, 0x1031F, + 0x1032D, 0x10340, 0x10342, 0x10349, 0x10350, 0x10375, 0x10380, 0x1039D, + 0x103A0, 0x103C3, 0x103C8, 0x103CF, 0x10450, 0x1049D, 0x10500, 0x10527, + 0x10530, 0x10563, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10800, 0x10805, 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, + 0x1083C, 0x1083C, 0x1083F, 0x10855, 0x10860, 0x10876, 0x10880, 0x1089E, + 0x108E0, 0x108F2, 0x108F4, 0x108F5, 0x10900, 0x10915, 0x10920, 0x10939, + 0x10980, 0x109B7, 0x109BE, 0x109BF, 0x10A00, 0x10A00, 0x10A10, 0x10A13, + 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A60, 0x10A7C, 0x10A80, 0x10A9C, + 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE4, 0x10B00, 0x10B35, 0x10B40, 0x10B55, + 0x10B60, 0x10B72, 0x10B80, 0x10B91, 0x10C00, 0x10C48, 0x10D00, 0x10D23, + 0x10E80, 0x10EA9, 0x10EB0, 0x10EB1, 0x10F00, 0x10F1C, 0x10F27, 0x10F27, + 0x10F30, 0x10F45, 0x10F70, 0x10F81, 0x10FB0, 0x10FC4, 0x10FE0, 0x10FF6, + 0x11003, 0x11037, 0x11071, 0x11072, 0x11075, 0x11075, 0x11083, 0x110AF, + 0x110D0, 0x110E8, 0x11103, 0x11126, 0x11144, 0x11144, 0x11147, 0x11147, + 0x11150, 0x11172, 0x11176, 0x11176, 0x11183, 0x111B2, 0x111C1, 0x111C4, + 0x111DA, 0x111DA, 0x111DC, 0x111DC, 0x11200, 0x11211, 0x11213, 0x1122B, + 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, + 0x1129F, 0x112A8, 0x112B0, 0x112DE, 0x11305, 0x1130C, 0x1130F, 0x11310, + 0x11313, 0x11328, 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, + 0x1133D, 0x1133D, 0x11350, 0x11350, 0x1135D, 0x11361, 0x11400, 0x11434, + 0x11447, 0x1144A, 0x1145F, 0x11461, 0x11480, 0x114AF, 0x114C4, 0x114C5, + 0x114C7, 0x114C7, 0x11580, 0x115AE, 0x115D8, 0x115DB, 0x11600, 0x1162F, + 0x11644, 0x11644, 0x11680, 0x116AA, 0x116B8, 0x116B8, 0x11700, 0x1171A, + 0x11740, 0x11746, 0x11800, 0x1182B, 0x118FF, 0x11906, 0x11909, 0x11909, + 0x1190C, 0x11913, 0x11915, 0x11916, 0x11918, 0x1192F, 0x1193F, 0x1193F, + 0x11941, 0x11941, 0x119A0, 0x119A7, 0x119AA, 0x119D0, 0x119E1, 0x119E1, + 0x119E3, 0x119E3, 0x11A00, 0x11A00, 0x11A0B, 0x11A32, 0x11A3A, 0x11A3A, + 0x11A50, 0x11A50, 0x11A5C, 0x11A89, 0x11A9D, 0x11A9D, 0x11AB0, 0x11AF8, + 0x11C00, 0x11C08, 0x11C0A, 0x11C2E, 0x11C40, 0x11C40, 0x11C72, 0x11C8F, + 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D30, 0x11D46, 0x11D46, + 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D89, 0x11D98, 0x11D98, + 0x11EE0, 0x11EF2, 0x11FB0, 0x11FB0, 0x12000, 0x12399, 0x12480, 0x12543, + 0x12F90, 0x12FF0, 0x13000, 0x1342E, 0x14400, 0x14646, 0x16800, 0x16A38, + 0x16A40, 0x16A5E, 0x16A70, 0x16ABE, 0x16AD0, 0x16AED, 0x16B00, 0x16B2F, + 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, 0x16F00, 0x16F4A, 0x16F50, 0x16F50, + 0x17000, 0x187F7, 0x18800, 0x18CD5, 0x18D00, 0x18D08, 0x1B000, 0x1B122, + 0x1B150, 0x1B152, 0x1B164, 0x1B167, 0x1B170, 0x1B2FB, 0x1BC00, 0x1BC6A, + 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, 0x1DF0A, 0x1DF0A, + 0x1E100, 0x1E12C, 0x1E14E, 0x1E14E, 0x1E290, 0x1E2AD, 0x1E2C0, 0x1E2EB, + 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, + 0x1E800, 0x1E8C4, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, + 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, + 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, + 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, + 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, + 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, + 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, + 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, + 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, + 0x30000, 0x3134A, + // #14 (2608+518): gc=Mark:M:Combining_Mark + // Mc:177 + Me:5 + Mn:336 + // #15 (2608+177): gc=Spacing_Mark:Mc + 0x0903, 0x0903, 0x093B, 0x093B, 0x093E, 0x0940, 0x0949, 0x094C, + 0x094E, 0x094F, 0x0982, 0x0983, 0x09BE, 0x09C0, 0x09C7, 0x09C8, + 0x09CB, 0x09CC, 0x09D7, 0x09D7, 0x0A03, 0x0A03, 0x0A3E, 0x0A40, + 0x0A83, 0x0A83, 0x0ABE, 0x0AC0, 0x0AC9, 0x0AC9, 0x0ACB, 0x0ACC, + 0x0B02, 0x0B03, 0x0B3E, 0x0B3E, 0x0B40, 0x0B40, 0x0B47, 0x0B48, + 0x0B4B, 0x0B4C, 0x0B57, 0x0B57, 0x0BBE, 0x0BBF, 0x0BC1, 0x0BC2, + 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCC, 0x0BD7, 0x0BD7, 0x0C01, 0x0C03, + 0x0C41, 0x0C44, 0x0C82, 0x0C83, 0x0CBE, 0x0CBE, 0x0CC0, 0x0CC4, + 0x0CC7, 0x0CC8, 0x0CCA, 0x0CCB, 0x0CD5, 0x0CD6, 0x0D02, 0x0D03, + 0x0D3E, 0x0D40, 0x0D46, 0x0D48, 0x0D4A, 0x0D4C, 0x0D57, 0x0D57, + 0x0D82, 0x0D83, 0x0DCF, 0x0DD1, 0x0DD8, 0x0DDF, 0x0DF2, 0x0DF3, + 0x0F3E, 0x0F3F, 0x0F7F, 0x0F7F, 0x102B, 0x102C, 0x1031, 0x1031, + 0x1038, 0x1038, 0x103B, 0x103C, 0x1056, 0x1057, 0x1062, 0x1064, + 0x1067, 0x106D, 0x1083, 0x1084, 0x1087, 0x108C, 0x108F, 0x108F, + 0x109A, 0x109C, 0x1715, 0x1715, 0x1734, 0x1734, 0x17B6, 0x17B6, + 0x17BE, 0x17C5, 0x17C7, 0x17C8, 0x1923, 0x1926, 0x1929, 0x192B, + 0x1930, 0x1931, 0x1933, 0x1938, 0x1A19, 0x1A1A, 0x1A55, 0x1A55, + 0x1A57, 0x1A57, 0x1A61, 0x1A61, 0x1A63, 0x1A64, 0x1A6D, 0x1A72, + 0x1B04, 0x1B04, 0x1B35, 0x1B35, 0x1B3B, 0x1B3B, 0x1B3D, 0x1B41, + 0x1B43, 0x1B44, 0x1B82, 0x1B82, 0x1BA1, 0x1BA1, 0x1BA6, 0x1BA7, + 0x1BAA, 0x1BAA, 0x1BE7, 0x1BE7, 0x1BEA, 0x1BEC, 0x1BEE, 0x1BEE, + 0x1BF2, 0x1BF3, 0x1C24, 0x1C2B, 0x1C34, 0x1C35, 0x1CE1, 0x1CE1, + 0x1CF7, 0x1CF7, 0x302E, 0x302F, 0xA823, 0xA824, 0xA827, 0xA827, + 0xA880, 0xA881, 0xA8B4, 0xA8C3, 0xA952, 0xA953, 0xA983, 0xA983, + 0xA9B4, 0xA9B5, 0xA9BA, 0xA9BB, 0xA9BE, 0xA9C0, 0xAA2F, 0xAA30, + 0xAA33, 0xAA34, 0xAA4D, 0xAA4D, 0xAA7B, 0xAA7B, 0xAA7D, 0xAA7D, + 0xAAEB, 0xAAEB, 0xAAEE, 0xAAEF, 0xAAF5, 0xAAF5, 0xABE3, 0xABE4, + 0xABE6, 0xABE7, 0xABE9, 0xABEA, 0xABEC, 0xABEC, 0x11000, 0x11000, + 0x11002, 0x11002, 0x11082, 0x11082, 0x110B0, 0x110B2, 0x110B7, 0x110B8, + 0x1112C, 0x1112C, 0x11145, 0x11146, 0x11182, 0x11182, 0x111B3, 0x111B5, + 0x111BF, 0x111C0, 0x111CE, 0x111CE, 0x1122C, 0x1122E, 0x11232, 0x11233, + 0x11235, 0x11235, 0x112E0, 0x112E2, 0x11302, 0x11303, 0x1133E, 0x1133F, + 0x11341, 0x11344, 0x11347, 0x11348, 0x1134B, 0x1134D, 0x11357, 0x11357, + 0x11362, 0x11363, 0x11435, 0x11437, 0x11440, 0x11441, 0x11445, 0x11445, + 0x114B0, 0x114B2, 0x114B9, 0x114B9, 0x114BB, 0x114BE, 0x114C1, 0x114C1, + 0x115AF, 0x115B1, 0x115B8, 0x115BB, 0x115BE, 0x115BE, 0x11630, 0x11632, + 0x1163B, 0x1163C, 0x1163E, 0x1163E, 0x116AC, 0x116AC, 0x116AE, 0x116AF, + 0x116B6, 0x116B6, 0x11720, 0x11721, 0x11726, 0x11726, 0x1182C, 0x1182E, + 0x11838, 0x11838, 0x11930, 0x11935, 0x11937, 0x11938, 0x1193D, 0x1193D, + 0x11940, 0x11940, 0x11942, 0x11942, 0x119D1, 0x119D3, 0x119DC, 0x119DF, + 0x119E4, 0x119E4, 0x11A39, 0x11A39, 0x11A57, 0x11A58, 0x11A97, 0x11A97, + 0x11C2F, 0x11C2F, 0x11C3E, 0x11C3E, 0x11CA9, 0x11CA9, 0x11CB1, 0x11CB1, + 0x11CB4, 0x11CB4, 0x11D8A, 0x11D8E, 0x11D93, 0x11D94, 0x11D96, 0x11D96, + 0x11EF5, 0x11EF6, 0x16F51, 0x16F87, 0x16FF0, 0x16FF1, 0x1D165, 0x1D166, + 0x1D16D, 0x1D172, + // #16 (2785+5): gc=Enclosing_Mark:Me + 0x0488, 0x0489, 0x1ABE, 0x1ABE, 0x20DD, 0x20E0, 0x20E2, 0x20E4, + 0xA670, 0xA672, + // #17 (2790+336): gc=Nonspacing_Mark:Mn + 0x0300, 0x036F, 0x0483, 0x0487, 0x0591, 0x05BD, 0x05BF, 0x05BF, + 0x05C1, 0x05C2, 0x05C4, 0x05C5, 0x05C7, 0x05C7, 0x0610, 0x061A, + 0x064B, 0x065F, 0x0670, 0x0670, 0x06D6, 0x06DC, 0x06DF, 0x06E4, + 0x06E7, 0x06E8, 0x06EA, 0x06ED, 0x0711, 0x0711, 0x0730, 0x074A, + 0x07A6, 0x07B0, 0x07EB, 0x07F3, 0x07FD, 0x07FD, 0x0816, 0x0819, + 0x081B, 0x0823, 0x0825, 0x0827, 0x0829, 0x082D, 0x0859, 0x085B, + 0x0898, 0x089F, 0x08CA, 0x08E1, 0x08E3, 0x0902, 0x093A, 0x093A, + 0x093C, 0x093C, 0x0941, 0x0948, 0x094D, 0x094D, 0x0951, 0x0957, + 0x0962, 0x0963, 0x0981, 0x0981, 0x09BC, 0x09BC, 0x09C1, 0x09C4, + 0x09CD, 0x09CD, 0x09E2, 0x09E3, 0x09FE, 0x09FE, 0x0A01, 0x0A02, + 0x0A3C, 0x0A3C, 0x0A41, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, + 0x0A51, 0x0A51, 0x0A70, 0x0A71, 0x0A75, 0x0A75, 0x0A81, 0x0A82, + 0x0ABC, 0x0ABC, 0x0AC1, 0x0AC5, 0x0AC7, 0x0AC8, 0x0ACD, 0x0ACD, + 0x0AE2, 0x0AE3, 0x0AFA, 0x0AFF, 0x0B01, 0x0B01, 0x0B3C, 0x0B3C, + 0x0B3F, 0x0B3F, 0x0B41, 0x0B44, 0x0B4D, 0x0B4D, 0x0B55, 0x0B56, + 0x0B62, 0x0B63, 0x0B82, 0x0B82, 0x0BC0, 0x0BC0, 0x0BCD, 0x0BCD, + 0x0C00, 0x0C00, 0x0C04, 0x0C04, 0x0C3C, 0x0C3C, 0x0C3E, 0x0C40, + 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C62, 0x0C63, + 0x0C81, 0x0C81, 0x0CBC, 0x0CBC, 0x0CBF, 0x0CBF, 0x0CC6, 0x0CC6, + 0x0CCC, 0x0CCD, 0x0CE2, 0x0CE3, 0x0D00, 0x0D01, 0x0D3B, 0x0D3C, + 0x0D41, 0x0D44, 0x0D4D, 0x0D4D, 0x0D62, 0x0D63, 0x0D81, 0x0D81, + 0x0DCA, 0x0DCA, 0x0DD2, 0x0DD4, 0x0DD6, 0x0DD6, 0x0E31, 0x0E31, + 0x0E34, 0x0E3A, 0x0E47, 0x0E4E, 0x0EB1, 0x0EB1, 0x0EB4, 0x0EBC, + 0x0EC8, 0x0ECD, 0x0F18, 0x0F19, 0x0F35, 0x0F35, 0x0F37, 0x0F37, + 0x0F39, 0x0F39, 0x0F71, 0x0F7E, 0x0F80, 0x0F84, 0x0F86, 0x0F87, + 0x0F8D, 0x0F97, 0x0F99, 0x0FBC, 0x0FC6, 0x0FC6, 0x102D, 0x1030, + 0x1032, 0x1037, 0x1039, 0x103A, 0x103D, 0x103E, 0x1058, 0x1059, + 0x105E, 0x1060, 0x1071, 0x1074, 0x1082, 0x1082, 0x1085, 0x1086, + 0x108D, 0x108D, 0x109D, 0x109D, 0x135D, 0x135F, 0x1712, 0x1714, + 0x1732, 0x1733, 0x1752, 0x1753, 0x1772, 0x1773, 0x17B4, 0x17B5, + 0x17B7, 0x17BD, 0x17C6, 0x17C6, 0x17C9, 0x17D3, 0x17DD, 0x17DD, + 0x180B, 0x180D, 0x180F, 0x180F, 0x1885, 0x1886, 0x18A9, 0x18A9, + 0x1920, 0x1922, 0x1927, 0x1928, 0x1932, 0x1932, 0x1939, 0x193B, + 0x1A17, 0x1A18, 0x1A1B, 0x1A1B, 0x1A56, 0x1A56, 0x1A58, 0x1A5E, + 0x1A60, 0x1A60, 0x1A62, 0x1A62, 0x1A65, 0x1A6C, 0x1A73, 0x1A7C, + 0x1A7F, 0x1A7F, 0x1AB0, 0x1ABD, 0x1ABF, 0x1ACE, 0x1B00, 0x1B03, + 0x1B34, 0x1B34, 0x1B36, 0x1B3A, 0x1B3C, 0x1B3C, 0x1B42, 0x1B42, + 0x1B6B, 0x1B73, 0x1B80, 0x1B81, 0x1BA2, 0x1BA5, 0x1BA8, 0x1BA9, + 0x1BAB, 0x1BAD, 0x1BE6, 0x1BE6, 0x1BE8, 0x1BE9, 0x1BED, 0x1BED, + 0x1BEF, 0x1BF1, 0x1C2C, 0x1C33, 0x1C36, 0x1C37, 0x1CD0, 0x1CD2, + 0x1CD4, 0x1CE0, 0x1CE2, 0x1CE8, 0x1CED, 0x1CED, 0x1CF4, 0x1CF4, + 0x1CF8, 0x1CF9, 0x1DC0, 0x1DFF, 0x20D0, 0x20DC, 0x20E1, 0x20E1, + 0x20E5, 0x20F0, 0x2CEF, 0x2CF1, 0x2D7F, 0x2D7F, 0x2DE0, 0x2DFF, + 0x302A, 0x302D, 0x3099, 0x309A, 0xA66F, 0xA66F, 0xA674, 0xA67D, + 0xA69E, 0xA69F, 0xA6F0, 0xA6F1, 0xA802, 0xA802, 0xA806, 0xA806, + 0xA80B, 0xA80B, 0xA825, 0xA826, 0xA82C, 0xA82C, 0xA8C4, 0xA8C5, + 0xA8E0, 0xA8F1, 0xA8FF, 0xA8FF, 0xA926, 0xA92D, 0xA947, 0xA951, + 0xA980, 0xA982, 0xA9B3, 0xA9B3, 0xA9B6, 0xA9B9, 0xA9BC, 0xA9BD, + 0xA9E5, 0xA9E5, 0xAA29, 0xAA2E, 0xAA31, 0xAA32, 0xAA35, 0xAA36, + 0xAA43, 0xAA43, 0xAA4C, 0xAA4C, 0xAA7C, 0xAA7C, 0xAAB0, 0xAAB0, + 0xAAB2, 0xAAB4, 0xAAB7, 0xAAB8, 0xAABE, 0xAABF, 0xAAC1, 0xAAC1, + 0xAAEC, 0xAAED, 0xAAF6, 0xAAF6, 0xABE5, 0xABE5, 0xABE8, 0xABE8, + 0xABED, 0xABED, 0xFB1E, 0xFB1E, 0xFE00, 0xFE0F, 0xFE20, 0xFE2F, + 0x101FD, 0x101FD, 0x102E0, 0x102E0, 0x10376, 0x1037A, 0x10A01, 0x10A03, + 0x10A05, 0x10A06, 0x10A0C, 0x10A0F, 0x10A38, 0x10A3A, 0x10A3F, 0x10A3F, + 0x10AE5, 0x10AE6, 0x10D24, 0x10D27, 0x10EAB, 0x10EAC, 0x10F46, 0x10F50, + 0x10F82, 0x10F85, 0x11001, 0x11001, 0x11038, 0x11046, 0x11070, 0x11070, + 0x11073, 0x11074, 0x1107F, 0x11081, 0x110B3, 0x110B6, 0x110B9, 0x110BA, + 0x110C2, 0x110C2, 0x11100, 0x11102, 0x11127, 0x1112B, 0x1112D, 0x11134, + 0x11173, 0x11173, 0x11180, 0x11181, 0x111B6, 0x111BE, 0x111C9, 0x111CC, + 0x111CF, 0x111CF, 0x1122F, 0x11231, 0x11234, 0x11234, 0x11236, 0x11237, + 0x1123E, 0x1123E, 0x112DF, 0x112DF, 0x112E3, 0x112EA, 0x11300, 0x11301, + 0x1133B, 0x1133C, 0x11340, 0x11340, 0x11366, 0x1136C, 0x11370, 0x11374, + 0x11438, 0x1143F, 0x11442, 0x11444, 0x11446, 0x11446, 0x1145E, 0x1145E, + 0x114B3, 0x114B8, 0x114BA, 0x114BA, 0x114BF, 0x114C0, 0x114C2, 0x114C3, + 0x115B2, 0x115B5, 0x115BC, 0x115BD, 0x115BF, 0x115C0, 0x115DC, 0x115DD, + 0x11633, 0x1163A, 0x1163D, 0x1163D, 0x1163F, 0x11640, 0x116AB, 0x116AB, + 0x116AD, 0x116AD, 0x116B0, 0x116B5, 0x116B7, 0x116B7, 0x1171D, 0x1171F, + 0x11722, 0x11725, 0x11727, 0x1172B, 0x1182F, 0x11837, 0x11839, 0x1183A, + 0x1193B, 0x1193C, 0x1193E, 0x1193E, 0x11943, 0x11943, 0x119D4, 0x119D7, + 0x119DA, 0x119DB, 0x119E0, 0x119E0, 0x11A01, 0x11A0A, 0x11A33, 0x11A38, + 0x11A3B, 0x11A3E, 0x11A47, 0x11A47, 0x11A51, 0x11A56, 0x11A59, 0x11A5B, + 0x11A8A, 0x11A96, 0x11A98, 0x11A99, 0x11C30, 0x11C36, 0x11C38, 0x11C3D, + 0x11C3F, 0x11C3F, 0x11C92, 0x11CA7, 0x11CAA, 0x11CB0, 0x11CB2, 0x11CB3, + 0x11CB5, 0x11CB6, 0x11D31, 0x11D36, 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, + 0x11D3F, 0x11D45, 0x11D47, 0x11D47, 0x11D90, 0x11D91, 0x11D95, 0x11D95, + 0x11D97, 0x11D97, 0x11EF3, 0x11EF4, 0x16AF0, 0x16AF4, 0x16B30, 0x16B36, + 0x16F4F, 0x16F4F, 0x16F8F, 0x16F92, 0x16FE4, 0x16FE4, 0x1BC9D, 0x1BC9E, + 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1D167, 0x1D169, 0x1D17B, 0x1D182, + 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0x1D242, 0x1D244, 0x1DA00, 0x1DA36, + 0x1DA3B, 0x1DA6C, 0x1DA75, 0x1DA75, 0x1DA84, 0x1DA84, 0x1DA9B, 0x1DA9F, + 0x1DAA1, 0x1DAAF, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, 0x1E130, 0x1E136, 0x1E2AE, 0x1E2AE, + 0x1E2EC, 0x1E2EF, 0x1E8D0, 0x1E8D6, 0x1E944, 0x1E94A, 0xE0100, 0xE01EF, + // #18 (3126+145): gc=Number:N + // Nd:62 + Nl:12 + No:71 + // #19 (3126+62): gc=Decimal_Number:Nd:digit + 0x0030, 0x0039, 0x0660, 0x0669, 0x06F0, 0x06F9, 0x07C0, 0x07C9, + 0x0966, 0x096F, 0x09E6, 0x09EF, 0x0A66, 0x0A6F, 0x0AE6, 0x0AEF, + 0x0B66, 0x0B6F, 0x0BE6, 0x0BEF, 0x0C66, 0x0C6F, 0x0CE6, 0x0CEF, + 0x0D66, 0x0D6F, 0x0DE6, 0x0DEF, 0x0E50, 0x0E59, 0x0ED0, 0x0ED9, + 0x0F20, 0x0F29, 0x1040, 0x1049, 0x1090, 0x1099, 0x17E0, 0x17E9, + 0x1810, 0x1819, 0x1946, 0x194F, 0x19D0, 0x19D9, 0x1A80, 0x1A89, + 0x1A90, 0x1A99, 0x1B50, 0x1B59, 0x1BB0, 0x1BB9, 0x1C40, 0x1C49, + 0x1C50, 0x1C59, 0xA620, 0xA629, 0xA8D0, 0xA8D9, 0xA900, 0xA909, + 0xA9D0, 0xA9D9, 0xA9F0, 0xA9F9, 0xAA50, 0xAA59, 0xABF0, 0xABF9, + 0xFF10, 0xFF19, 0x104A0, 0x104A9, 0x10D30, 0x10D39, 0x11066, 0x1106F, + 0x110F0, 0x110F9, 0x11136, 0x1113F, 0x111D0, 0x111D9, 0x112F0, 0x112F9, + 0x11450, 0x11459, 0x114D0, 0x114D9, 0x11650, 0x11659, 0x116C0, 0x116C9, + 0x11730, 0x11739, 0x118E0, 0x118E9, 0x11950, 0x11959, 0x11C50, 0x11C59, + 0x11D50, 0x11D59, 0x11DA0, 0x11DA9, 0x16A60, 0x16A69, 0x16AC0, 0x16AC9, + 0x16B50, 0x16B59, 0x1D7CE, 0x1D7FF, 0x1E140, 0x1E149, 0x1E2F0, 0x1E2F9, + 0x1E950, 0x1E959, 0x1FBF0, 0x1FBF9, + // #20 (3188+12): gc=Letter_Number:Nl + 0x16EE, 0x16F0, 0x2160, 0x2182, 0x2185, 0x2188, 0x3007, 0x3007, + 0x3021, 0x3029, 0x3038, 0x303A, 0xA6E6, 0xA6EF, 0x10140, 0x10174, + 0x10341, 0x10341, 0x1034A, 0x1034A, 0x103D1, 0x103D5, 0x12400, 0x1246E, + // #21 (3200+71): gc=Other_Number:No + 0x00B2, 0x00B3, 0x00B9, 0x00B9, 0x00BC, 0x00BE, 0x09F4, 0x09F9, + 0x0B72, 0x0B77, 0x0BF0, 0x0BF2, 0x0C78, 0x0C7E, 0x0D58, 0x0D5E, + 0x0D70, 0x0D78, 0x0F2A, 0x0F33, 0x1369, 0x137C, 0x17F0, 0x17F9, + 0x19DA, 0x19DA, 0x2070, 0x2070, 0x2074, 0x2079, 0x2080, 0x2089, + 0x2150, 0x215F, 0x2189, 0x2189, 0x2460, 0x249B, 0x24EA, 0x24FF, + 0x2776, 0x2793, 0x2CFD, 0x2CFD, 0x3192, 0x3195, 0x3220, 0x3229, + 0x3248, 0x324F, 0x3251, 0x325F, 0x3280, 0x3289, 0x32B1, 0x32BF, + 0xA830, 0xA835, 0x10107, 0x10133, 0x10175, 0x10178, 0x1018A, 0x1018B, + 0x102E1, 0x102FB, 0x10320, 0x10323, 0x10858, 0x1085F, 0x10879, 0x1087F, + 0x108A7, 0x108AF, 0x108FB, 0x108FF, 0x10916, 0x1091B, 0x109BC, 0x109BD, + 0x109C0, 0x109CF, 0x109D2, 0x109FF, 0x10A40, 0x10A48, 0x10A7D, 0x10A7E, + 0x10A9D, 0x10A9F, 0x10AEB, 0x10AEF, 0x10B58, 0x10B5F, 0x10B78, 0x10B7F, + 0x10BA9, 0x10BAF, 0x10CFA, 0x10CFF, 0x10E60, 0x10E7E, 0x10F1D, 0x10F26, + 0x10F51, 0x10F54, 0x10FC5, 0x10FCB, 0x11052, 0x11065, 0x111E1, 0x111F4, + 0x1173A, 0x1173B, 0x118EA, 0x118F2, 0x11C5A, 0x11C6C, 0x11FC0, 0x11FD4, + 0x16B5B, 0x16B61, 0x16E80, 0x16E96, 0x1D2E0, 0x1D2F3, 0x1D360, 0x1D378, + 0x1E8C7, 0x1E8CF, 0x1EC71, 0x1ECAB, 0x1ECAD, 0x1ECAF, 0x1ECB1, 0x1ECB4, + 0x1ED01, 0x1ED2D, 0x1ED2F, 0x1ED3D, 0x1F100, 0x1F10C, + // #22 (3271+386): gc=Punctuation:P:punct + // Pc:6 + Pd:19 + Pe:76 + Pf:10 + Pi:11 + Po:185 + Ps:79 + // #23 (3271+6): gc=Connector_Punctuation:Pc + 0x005F, 0x005F, 0x203F, 0x2040, 0x2054, 0x2054, 0xFE33, 0xFE34, + 0xFE4D, 0xFE4F, 0xFF3F, 0xFF3F, + // #24 (3277+19): gc=Dash_Punctuation:Pd + 0x002D, 0x002D, 0x058A, 0x058A, 0x05BE, 0x05BE, 0x1400, 0x1400, + 0x1806, 0x1806, 0x2010, 0x2015, 0x2E17, 0x2E17, 0x2E1A, 0x2E1A, + 0x2E3A, 0x2E3B, 0x2E40, 0x2E40, 0x2E5D, 0x2E5D, 0x301C, 0x301C, + 0x3030, 0x3030, 0x30A0, 0x30A0, 0xFE31, 0xFE32, 0xFE58, 0xFE58, + 0xFE63, 0xFE63, 0xFF0D, 0xFF0D, 0x10EAD, 0x10EAD, + // #25 (3296+76): gc=Close_Punctuation:Pe + 0x0029, 0x0029, 0x005D, 0x005D, 0x007D, 0x007D, 0x0F3B, 0x0F3B, + 0x0F3D, 0x0F3D, 0x169C, 0x169C, 0x2046, 0x2046, 0x207E, 0x207E, + 0x208E, 0x208E, 0x2309, 0x2309, 0x230B, 0x230B, 0x232A, 0x232A, + 0x2769, 0x2769, 0x276B, 0x276B, 0x276D, 0x276D, 0x276F, 0x276F, + 0x2771, 0x2771, 0x2773, 0x2773, 0x2775, 0x2775, 0x27C6, 0x27C6, + 0x27E7, 0x27E7, 0x27E9, 0x27E9, 0x27EB, 0x27EB, 0x27ED, 0x27ED, + 0x27EF, 0x27EF, 0x2984, 0x2984, 0x2986, 0x2986, 0x2988, 0x2988, + 0x298A, 0x298A, 0x298C, 0x298C, 0x298E, 0x298E, 0x2990, 0x2990, + 0x2992, 0x2992, 0x2994, 0x2994, 0x2996, 0x2996, 0x2998, 0x2998, + 0x29D9, 0x29D9, 0x29DB, 0x29DB, 0x29FD, 0x29FD, 0x2E23, 0x2E23, + 0x2E25, 0x2E25, 0x2E27, 0x2E27, 0x2E29, 0x2E29, 0x2E56, 0x2E56, + 0x2E58, 0x2E58, 0x2E5A, 0x2E5A, 0x2E5C, 0x2E5C, 0x3009, 0x3009, + 0x300B, 0x300B, 0x300D, 0x300D, 0x300F, 0x300F, 0x3011, 0x3011, + 0x3015, 0x3015, 0x3017, 0x3017, 0x3019, 0x3019, 0x301B, 0x301B, + 0x301E, 0x301F, 0xFD3E, 0xFD3E, 0xFE18, 0xFE18, 0xFE36, 0xFE36, + 0xFE38, 0xFE38, 0xFE3A, 0xFE3A, 0xFE3C, 0xFE3C, 0xFE3E, 0xFE3E, + 0xFE40, 0xFE40, 0xFE42, 0xFE42, 0xFE44, 0xFE44, 0xFE48, 0xFE48, + 0xFE5A, 0xFE5A, 0xFE5C, 0xFE5C, 0xFE5E, 0xFE5E, 0xFF09, 0xFF09, + 0xFF3D, 0xFF3D, 0xFF5D, 0xFF5D, 0xFF60, 0xFF60, 0xFF63, 0xFF63, + // #26 (3372+10): gc=Final_Punctuation:Pf + 0x00BB, 0x00BB, 0x2019, 0x2019, 0x201D, 0x201D, 0x203A, 0x203A, + 0x2E03, 0x2E03, 0x2E05, 0x2E05, 0x2E0A, 0x2E0A, 0x2E0D, 0x2E0D, + 0x2E1D, 0x2E1D, 0x2E21, 0x2E21, + // #27 (3382+11): gc=Initial_Punctuation:Pi + 0x00AB, 0x00AB, 0x2018, 0x2018, 0x201B, 0x201C, 0x201F, 0x201F, + 0x2039, 0x2039, 0x2E02, 0x2E02, 0x2E04, 0x2E04, 0x2E09, 0x2E09, + 0x2E0C, 0x2E0C, 0x2E1C, 0x2E1C, 0x2E20, 0x2E20, + // #28 (3393+185): gc=Other_Punctuation:Po + 0x0021, 0x0023, 0x0025, 0x0027, 0x002A, 0x002A, 0x002C, 0x002C, + 0x002E, 0x002F, 0x003A, 0x003B, 0x003F, 0x0040, 0x005C, 0x005C, + 0x00A1, 0x00A1, 0x00A7, 0x00A7, 0x00B6, 0x00B7, 0x00BF, 0x00BF, + 0x037E, 0x037E, 0x0387, 0x0387, 0x055A, 0x055F, 0x0589, 0x0589, + 0x05C0, 0x05C0, 0x05C3, 0x05C3, 0x05C6, 0x05C6, 0x05F3, 0x05F4, + 0x0609, 0x060A, 0x060C, 0x060D, 0x061B, 0x061B, 0x061D, 0x061F, + 0x066A, 0x066D, 0x06D4, 0x06D4, 0x0700, 0x070D, 0x07F7, 0x07F9, + 0x0830, 0x083E, 0x085E, 0x085E, 0x0964, 0x0965, 0x0970, 0x0970, + 0x09FD, 0x09FD, 0x0A76, 0x0A76, 0x0AF0, 0x0AF0, 0x0C77, 0x0C77, + 0x0C84, 0x0C84, 0x0DF4, 0x0DF4, 0x0E4F, 0x0E4F, 0x0E5A, 0x0E5B, + 0x0F04, 0x0F12, 0x0F14, 0x0F14, 0x0F85, 0x0F85, 0x0FD0, 0x0FD4, + 0x0FD9, 0x0FDA, 0x104A, 0x104F, 0x10FB, 0x10FB, 0x1360, 0x1368, + 0x166E, 0x166E, 0x16EB, 0x16ED, 0x1735, 0x1736, 0x17D4, 0x17D6, + 0x17D8, 0x17DA, 0x1800, 0x1805, 0x1807, 0x180A, 0x1944, 0x1945, + 0x1A1E, 0x1A1F, 0x1AA0, 0x1AA6, 0x1AA8, 0x1AAD, 0x1B5A, 0x1B60, + 0x1B7D, 0x1B7E, 0x1BFC, 0x1BFF, 0x1C3B, 0x1C3F, 0x1C7E, 0x1C7F, + 0x1CC0, 0x1CC7, 0x1CD3, 0x1CD3, 0x2016, 0x2017, 0x2020, 0x2027, + 0x2030, 0x2038, 0x203B, 0x203E, 0x2041, 0x2043, 0x2047, 0x2051, + 0x2053, 0x2053, 0x2055, 0x205E, 0x2CF9, 0x2CFC, 0x2CFE, 0x2CFF, + 0x2D70, 0x2D70, 0x2E00, 0x2E01, 0x2E06, 0x2E08, 0x2E0B, 0x2E0B, + 0x2E0E, 0x2E16, 0x2E18, 0x2E19, 0x2E1B, 0x2E1B, 0x2E1E, 0x2E1F, + 0x2E2A, 0x2E2E, 0x2E30, 0x2E39, 0x2E3C, 0x2E3F, 0x2E41, 0x2E41, + 0x2E43, 0x2E4F, 0x2E52, 0x2E54, 0x3001, 0x3003, 0x303D, 0x303D, + 0x30FB, 0x30FB, 0xA4FE, 0xA4FF, 0xA60D, 0xA60F, 0xA673, 0xA673, + 0xA67E, 0xA67E, 0xA6F2, 0xA6F7, 0xA874, 0xA877, 0xA8CE, 0xA8CF, + 0xA8F8, 0xA8FA, 0xA8FC, 0xA8FC, 0xA92E, 0xA92F, 0xA95F, 0xA95F, + 0xA9C1, 0xA9CD, 0xA9DE, 0xA9DF, 0xAA5C, 0xAA5F, 0xAADE, 0xAADF, + 0xAAF0, 0xAAF1, 0xABEB, 0xABEB, 0xFE10, 0xFE16, 0xFE19, 0xFE19, + 0xFE30, 0xFE30, 0xFE45, 0xFE46, 0xFE49, 0xFE4C, 0xFE50, 0xFE52, + 0xFE54, 0xFE57, 0xFE5F, 0xFE61, 0xFE68, 0xFE68, 0xFE6A, 0xFE6B, + 0xFF01, 0xFF03, 0xFF05, 0xFF07, 0xFF0A, 0xFF0A, 0xFF0C, 0xFF0C, + 0xFF0E, 0xFF0F, 0xFF1A, 0xFF1B, 0xFF1F, 0xFF20, 0xFF3C, 0xFF3C, + 0xFF61, 0xFF61, 0xFF64, 0xFF65, 0x10100, 0x10102, 0x1039F, 0x1039F, + 0x103D0, 0x103D0, 0x1056F, 0x1056F, 0x10857, 0x10857, 0x1091F, 0x1091F, + 0x1093F, 0x1093F, 0x10A50, 0x10A58, 0x10A7F, 0x10A7F, 0x10AF0, 0x10AF6, + 0x10B39, 0x10B3F, 0x10B99, 0x10B9C, 0x10F55, 0x10F59, 0x10F86, 0x10F89, + 0x11047, 0x1104D, 0x110BB, 0x110BC, 0x110BE, 0x110C1, 0x11140, 0x11143, + 0x11174, 0x11175, 0x111C5, 0x111C8, 0x111CD, 0x111CD, 0x111DB, 0x111DB, + 0x111DD, 0x111DF, 0x11238, 0x1123D, 0x112A9, 0x112A9, 0x1144B, 0x1144F, + 0x1145A, 0x1145B, 0x1145D, 0x1145D, 0x114C6, 0x114C6, 0x115C1, 0x115D7, + 0x11641, 0x11643, 0x11660, 0x1166C, 0x116B9, 0x116B9, 0x1173C, 0x1173E, + 0x1183B, 0x1183B, 0x11944, 0x11946, 0x119E2, 0x119E2, 0x11A3F, 0x11A46, + 0x11A9A, 0x11A9C, 0x11A9E, 0x11AA2, 0x11C41, 0x11C45, 0x11C70, 0x11C71, + 0x11EF7, 0x11EF8, 0x11FFF, 0x11FFF, 0x12470, 0x12474, 0x12FF1, 0x12FF2, + 0x16A6E, 0x16A6F, 0x16AF5, 0x16AF5, 0x16B37, 0x16B3B, 0x16B44, 0x16B44, + 0x16E97, 0x16E9A, 0x16FE2, 0x16FE2, 0x1BC9F, 0x1BC9F, 0x1DA87, 0x1DA8B, + 0x1E95E, 0x1E95F, + // #29 (3578+79): gc=Open_Punctuation:Ps + 0x0028, 0x0028, 0x005B, 0x005B, 0x007B, 0x007B, 0x0F3A, 0x0F3A, + 0x0F3C, 0x0F3C, 0x169B, 0x169B, 0x201A, 0x201A, 0x201E, 0x201E, + 0x2045, 0x2045, 0x207D, 0x207D, 0x208D, 0x208D, 0x2308, 0x2308, + 0x230A, 0x230A, 0x2329, 0x2329, 0x2768, 0x2768, 0x276A, 0x276A, + 0x276C, 0x276C, 0x276E, 0x276E, 0x2770, 0x2770, 0x2772, 0x2772, + 0x2774, 0x2774, 0x27C5, 0x27C5, 0x27E6, 0x27E6, 0x27E8, 0x27E8, + 0x27EA, 0x27EA, 0x27EC, 0x27EC, 0x27EE, 0x27EE, 0x2983, 0x2983, + 0x2985, 0x2985, 0x2987, 0x2987, 0x2989, 0x2989, 0x298B, 0x298B, + 0x298D, 0x298D, 0x298F, 0x298F, 0x2991, 0x2991, 0x2993, 0x2993, + 0x2995, 0x2995, 0x2997, 0x2997, 0x29D8, 0x29D8, 0x29DA, 0x29DA, + 0x29FC, 0x29FC, 0x2E22, 0x2E22, 0x2E24, 0x2E24, 0x2E26, 0x2E26, + 0x2E28, 0x2E28, 0x2E42, 0x2E42, 0x2E55, 0x2E55, 0x2E57, 0x2E57, + 0x2E59, 0x2E59, 0x2E5B, 0x2E5B, 0x3008, 0x3008, 0x300A, 0x300A, + 0x300C, 0x300C, 0x300E, 0x300E, 0x3010, 0x3010, 0x3014, 0x3014, + 0x3016, 0x3016, 0x3018, 0x3018, 0x301A, 0x301A, 0x301D, 0x301D, + 0xFD3F, 0xFD3F, 0xFE17, 0xFE17, 0xFE35, 0xFE35, 0xFE37, 0xFE37, + 0xFE39, 0xFE39, 0xFE3B, 0xFE3B, 0xFE3D, 0xFE3D, 0xFE3F, 0xFE3F, + 0xFE41, 0xFE41, 0xFE43, 0xFE43, 0xFE47, 0xFE47, 0xFE59, 0xFE59, + 0xFE5B, 0xFE5B, 0xFE5D, 0xFE5D, 0xFF08, 0xFF08, 0xFF3B, 0xFF3B, + 0xFF5B, 0xFF5B, 0xFF5F, 0xFF5F, 0xFF62, 0xFF62, + // #30 (3657+302): gc=Symbol:S + // Sc:21 + Sk:31 + Sm:64 + So:186 + // #31 (3657+21): gc=Currency_Symbol:Sc + 0x0024, 0x0024, 0x00A2, 0x00A5, 0x058F, 0x058F, 0x060B, 0x060B, + 0x07FE, 0x07FF, 0x09F2, 0x09F3, 0x09FB, 0x09FB, 0x0AF1, 0x0AF1, + 0x0BF9, 0x0BF9, 0x0E3F, 0x0E3F, 0x17DB, 0x17DB, 0x20A0, 0x20C0, + 0xA838, 0xA838, 0xFDFC, 0xFDFC, 0xFE69, 0xFE69, 0xFF04, 0xFF04, + 0xFFE0, 0xFFE1, 0xFFE5, 0xFFE6, 0x11FDD, 0x11FE0, 0x1E2FF, 0x1E2FF, + 0x1ECB0, 0x1ECB0, + // #32 (3678+31): gc=Modifier_Symbol:Sk + 0x005E, 0x005E, 0x0060, 0x0060, 0x00A8, 0x00A8, 0x00AF, 0x00AF, + 0x00B4, 0x00B4, 0x00B8, 0x00B8, 0x02C2, 0x02C5, 0x02D2, 0x02DF, + 0x02E5, 0x02EB, 0x02ED, 0x02ED, 0x02EF, 0x02FF, 0x0375, 0x0375, + 0x0384, 0x0385, 0x0888, 0x0888, 0x1FBD, 0x1FBD, 0x1FBF, 0x1FC1, + 0x1FCD, 0x1FCF, 0x1FDD, 0x1FDF, 0x1FED, 0x1FEF, 0x1FFD, 0x1FFE, + 0x309B, 0x309C, 0xA700, 0xA716, 0xA720, 0xA721, 0xA789, 0xA78A, + 0xAB5B, 0xAB5B, 0xAB6A, 0xAB6B, 0xFBB2, 0xFBC2, 0xFF3E, 0xFF3E, + 0xFF40, 0xFF40, 0xFFE3, 0xFFE3, 0x1F3FB, 0x1F3FF, + // #33 (3709+64): gc=Math_Symbol:Sm + 0x002B, 0x002B, 0x003C, 0x003E, 0x007C, 0x007C, 0x007E, 0x007E, + 0x00AC, 0x00AC, 0x00B1, 0x00B1, 0x00D7, 0x00D7, 0x00F7, 0x00F7, + 0x03F6, 0x03F6, 0x0606, 0x0608, 0x2044, 0x2044, 0x2052, 0x2052, + 0x207A, 0x207C, 0x208A, 0x208C, 0x2118, 0x2118, 0x2140, 0x2144, + 0x214B, 0x214B, 0x2190, 0x2194, 0x219A, 0x219B, 0x21A0, 0x21A0, + 0x21A3, 0x21A3, 0x21A6, 0x21A6, 0x21AE, 0x21AE, 0x21CE, 0x21CF, + 0x21D2, 0x21D2, 0x21D4, 0x21D4, 0x21F4, 0x22FF, 0x2320, 0x2321, + 0x237C, 0x237C, 0x239B, 0x23B3, 0x23DC, 0x23E1, 0x25B7, 0x25B7, + 0x25C1, 0x25C1, 0x25F8, 0x25FF, 0x266F, 0x266F, 0x27C0, 0x27C4, + 0x27C7, 0x27E5, 0x27F0, 0x27FF, 0x2900, 0x2982, 0x2999, 0x29D7, + 0x29DC, 0x29FB, 0x29FE, 0x2AFF, 0x2B30, 0x2B44, 0x2B47, 0x2B4C, + 0xFB29, 0xFB29, 0xFE62, 0xFE62, 0xFE64, 0xFE66, 0xFF0B, 0xFF0B, + 0xFF1C, 0xFF1E, 0xFF5C, 0xFF5C, 0xFF5E, 0xFF5E, 0xFFE2, 0xFFE2, + 0xFFE9, 0xFFEC, 0x1D6C1, 0x1D6C1, 0x1D6DB, 0x1D6DB, 0x1D6FB, 0x1D6FB, + 0x1D715, 0x1D715, 0x1D735, 0x1D735, 0x1D74F, 0x1D74F, 0x1D76F, 0x1D76F, + 0x1D789, 0x1D789, 0x1D7A9, 0x1D7A9, 0x1D7C3, 0x1D7C3, 0x1EEF0, 0x1EEF1, + // #34 (3773+186): gc=Other_Symbol:So + 0x00A6, 0x00A6, 0x00A9, 0x00A9, 0x00AE, 0x00AE, 0x00B0, 0x00B0, + 0x0482, 0x0482, 0x058D, 0x058E, 0x060E, 0x060F, 0x06DE, 0x06DE, + 0x06E9, 0x06E9, 0x06FD, 0x06FE, 0x07F6, 0x07F6, 0x09FA, 0x09FA, + 0x0B70, 0x0B70, 0x0BF3, 0x0BF8, 0x0BFA, 0x0BFA, 0x0C7F, 0x0C7F, + 0x0D4F, 0x0D4F, 0x0D79, 0x0D79, 0x0F01, 0x0F03, 0x0F13, 0x0F13, + 0x0F15, 0x0F17, 0x0F1A, 0x0F1F, 0x0F34, 0x0F34, 0x0F36, 0x0F36, + 0x0F38, 0x0F38, 0x0FBE, 0x0FC5, 0x0FC7, 0x0FCC, 0x0FCE, 0x0FCF, + 0x0FD5, 0x0FD8, 0x109E, 0x109F, 0x1390, 0x1399, 0x166D, 0x166D, + 0x1940, 0x1940, 0x19DE, 0x19FF, 0x1B61, 0x1B6A, 0x1B74, 0x1B7C, + 0x2100, 0x2101, 0x2103, 0x2106, 0x2108, 0x2109, 0x2114, 0x2114, + 0x2116, 0x2117, 0x211E, 0x2123, 0x2125, 0x2125, 0x2127, 0x2127, + 0x2129, 0x2129, 0x212E, 0x212E, 0x213A, 0x213B, 0x214A, 0x214A, + 0x214C, 0x214D, 0x214F, 0x214F, 0x218A, 0x218B, 0x2195, 0x2199, + 0x219C, 0x219F, 0x21A1, 0x21A2, 0x21A4, 0x21A5, 0x21A7, 0x21AD, + 0x21AF, 0x21CD, 0x21D0, 0x21D1, 0x21D3, 0x21D3, 0x21D5, 0x21F3, + 0x2300, 0x2307, 0x230C, 0x231F, 0x2322, 0x2328, 0x232B, 0x237B, + 0x237D, 0x239A, 0x23B4, 0x23DB, 0x23E2, 0x2426, 0x2440, 0x244A, + 0x249C, 0x24E9, 0x2500, 0x25B6, 0x25B8, 0x25C0, 0x25C2, 0x25F7, + 0x2600, 0x266E, 0x2670, 0x2767, 0x2794, 0x27BF, 0x2800, 0x28FF, + 0x2B00, 0x2B2F, 0x2B45, 0x2B46, 0x2B4D, 0x2B73, 0x2B76, 0x2B95, + 0x2B97, 0x2BFF, 0x2CE5, 0x2CEA, 0x2E50, 0x2E51, 0x2E80, 0x2E99, + 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, 0x2FF0, 0x2FFB, 0x3004, 0x3004, + 0x3012, 0x3013, 0x3020, 0x3020, 0x3036, 0x3037, 0x303E, 0x303F, + 0x3190, 0x3191, 0x3196, 0x319F, 0x31C0, 0x31E3, 0x3200, 0x321E, + 0x322A, 0x3247, 0x3250, 0x3250, 0x3260, 0x327F, 0x328A, 0x32B0, + 0x32C0, 0x33FF, 0x4DC0, 0x4DFF, 0xA490, 0xA4C6, 0xA828, 0xA82B, + 0xA836, 0xA837, 0xA839, 0xA839, 0xAA77, 0xAA79, 0xFD40, 0xFD4F, + 0xFDCF, 0xFDCF, 0xFDFD, 0xFDFF, 0xFFE4, 0xFFE4, 0xFFE8, 0xFFE8, + 0xFFED, 0xFFEE, 0xFFFC, 0xFFFD, 0x10137, 0x1013F, 0x10179, 0x10189, + 0x1018C, 0x1018E, 0x10190, 0x1019C, 0x101A0, 0x101A0, 0x101D0, 0x101FC, + 0x10877, 0x10878, 0x10AC8, 0x10AC8, 0x1173F, 0x1173F, 0x11FD5, 0x11FDC, + 0x11FE1, 0x11FF1, 0x16B3C, 0x16B3F, 0x16B45, 0x16B45, 0x1BC9C, 0x1BC9C, + 0x1CF50, 0x1CFC3, 0x1D000, 0x1D0F5, 0x1D100, 0x1D126, 0x1D129, 0x1D164, + 0x1D16A, 0x1D16C, 0x1D183, 0x1D184, 0x1D18C, 0x1D1A9, 0x1D1AE, 0x1D1EA, + 0x1D200, 0x1D241, 0x1D245, 0x1D245, 0x1D300, 0x1D356, 0x1D800, 0x1D9FF, + 0x1DA37, 0x1DA3A, 0x1DA6D, 0x1DA74, 0x1DA76, 0x1DA83, 0x1DA85, 0x1DA86, + 0x1E14F, 0x1E14F, 0x1ECAC, 0x1ECAC, 0x1ED2E, 0x1ED2E, 0x1F000, 0x1F02B, + 0x1F030, 0x1F093, 0x1F0A0, 0x1F0AE, 0x1F0B1, 0x1F0BF, 0x1F0C1, 0x1F0CF, + 0x1F0D1, 0x1F0F5, 0x1F10D, 0x1F1AD, 0x1F1E6, 0x1F202, 0x1F210, 0x1F23B, + 0x1F240, 0x1F248, 0x1F250, 0x1F251, 0x1F260, 0x1F265, 0x1F300, 0x1F3FA, + 0x1F400, 0x1F6D7, 0x1F6DD, 0x1F6EC, 0x1F6F0, 0x1F6FC, 0x1F700, 0x1F773, + 0x1F780, 0x1F7D8, 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, 0x1F800, 0x1F80B, + 0x1F810, 0x1F847, 0x1F850, 0x1F859, 0x1F860, 0x1F887, 0x1F890, 0x1F8AD, + 0x1F8B0, 0x1F8B1, 0x1F900, 0x1FA53, 0x1FA60, 0x1FA6D, 0x1FA70, 0x1FA74, + 0x1FA78, 0x1FA7C, 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, 0x1FAB0, 0x1FABA, + 0x1FAC0, 0x1FAC5, 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, 0x1FAF0, 0x1FAF6, + 0x1FB00, 0x1FB92, 0x1FB94, 0x1FBCA, + // #35 (3959+9): gc=Separator:Z + // Zl:1 + Zp:1 + Zs:7 + // #36 (3959+1): gc=Line_Separator:Zl + 0x2028, 0x2028, + // #37 (3960+1): gc=Paragraph_Separator:Zp + 0x2029, 0x2029, + // #38 (3961+7): gc=Space_Separator:Zs + 0x0020, 0x0020, 0x00A0, 0x00A0, 0x1680, 0x1680, 0x2000, 0x200A, + 0x202F, 0x202F, 0x205F, 0x205F, 0x3000, 0x3000, + // #39 (3968+1): bp=ASCII + 0x0000, 0x007F, + // #40 (3969+3): bp=ASCII_Hex_Digit:AHex + 0x0030, 0x0039, 0x0041, 0x0046, 0x0061, 0x0066, + // #41 (3972+722): bp=Alphabetic:Alpha + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00B5, 0x00B5, + 0x00BA, 0x00BA, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02C1, + 0x02C6, 0x02D1, 0x02E0, 0x02E4, 0x02EC, 0x02EC, 0x02EE, 0x02EE, + 0x0345, 0x0345, 0x0370, 0x0374, 0x0376, 0x0377, 0x037A, 0x037D, + 0x037F, 0x037F, 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, + 0x038E, 0x03A1, 0x03A3, 0x03F5, 0x03F7, 0x0481, 0x048A, 0x052F, + 0x0531, 0x0556, 0x0559, 0x0559, 0x0560, 0x0588, 0x05B0, 0x05BD, + 0x05BF, 0x05BF, 0x05C1, 0x05C2, 0x05C4, 0x05C5, 0x05C7, 0x05C7, + 0x05D0, 0x05EA, 0x05EF, 0x05F2, 0x0610, 0x061A, 0x0620, 0x0657, + 0x0659, 0x065F, 0x066E, 0x06D3, 0x06D5, 0x06DC, 0x06E1, 0x06E8, + 0x06ED, 0x06EF, 0x06FA, 0x06FC, 0x06FF, 0x06FF, 0x0710, 0x073F, + 0x074D, 0x07B1, 0x07CA, 0x07EA, 0x07F4, 0x07F5, 0x07FA, 0x07FA, + 0x0800, 0x0817, 0x081A, 0x082C, 0x0840, 0x0858, 0x0860, 0x086A, + 0x0870, 0x0887, 0x0889, 0x088E, 0x08A0, 0x08C9, 0x08D4, 0x08DF, + 0x08E3, 0x08E9, 0x08F0, 0x093B, 0x093D, 0x094C, 0x094E, 0x0950, + 0x0955, 0x0963, 0x0971, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, + 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, + 0x09BD, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CC, 0x09CE, 0x09CE, + 0x09D7, 0x09D7, 0x09DC, 0x09DD, 0x09DF, 0x09E3, 0x09F0, 0x09F1, + 0x09FC, 0x09FC, 0x0A01, 0x0A03, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, + 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, + 0x0A38, 0x0A39, 0x0A3E, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4C, + 0x0A51, 0x0A51, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A70, 0x0A75, + 0x0A81, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABD, 0x0AC5, + 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACC, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, + 0x0AF9, 0x0AFC, 0x0B01, 0x0B03, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, + 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B35, 0x0B39, + 0x0B3D, 0x0B44, 0x0B47, 0x0B48, 0x0B4B, 0x0B4C, 0x0B56, 0x0B57, + 0x0B5C, 0x0B5D, 0x0B5F, 0x0B63, 0x0B71, 0x0B71, 0x0B82, 0x0B83, + 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, + 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, + 0x0BAE, 0x0BB9, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCC, + 0x0BD0, 0x0BD0, 0x0BD7, 0x0BD7, 0x0C00, 0x0C03, 0x0C05, 0x0C0C, + 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C39, 0x0C3D, 0x0C44, + 0x0C46, 0x0C48, 0x0C4A, 0x0C4C, 0x0C55, 0x0C56, 0x0C58, 0x0C5A, + 0x0C5D, 0x0C5D, 0x0C60, 0x0C63, 0x0C80, 0x0C83, 0x0C85, 0x0C8C, + 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, + 0x0CBD, 0x0CC4, 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCC, 0x0CD5, 0x0CD6, + 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE3, 0x0CF1, 0x0CF2, 0x0D00, 0x0D0C, + 0x0D0E, 0x0D10, 0x0D12, 0x0D3A, 0x0D3D, 0x0D44, 0x0D46, 0x0D48, + 0x0D4A, 0x0D4C, 0x0D4E, 0x0D4E, 0x0D54, 0x0D57, 0x0D5F, 0x0D63, + 0x0D7A, 0x0D7F, 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, + 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCF, 0x0DD4, + 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DF2, 0x0DF3, 0x0E01, 0x0E3A, + 0x0E40, 0x0E46, 0x0E4D, 0x0E4D, 0x0E81, 0x0E82, 0x0E84, 0x0E84, + 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, 0x0EA7, 0x0EB9, + 0x0EBB, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0ECD, 0x0ECD, + 0x0EDC, 0x0EDF, 0x0F00, 0x0F00, 0x0F40, 0x0F47, 0x0F49, 0x0F6C, + 0x0F71, 0x0F81, 0x0F88, 0x0F97, 0x0F99, 0x0FBC, 0x1000, 0x1036, + 0x1038, 0x1038, 0x103B, 0x103F, 0x1050, 0x108F, 0x109A, 0x109D, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x1380, 0x138F, 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0x1401, 0x166C, + 0x166F, 0x167F, 0x1681, 0x169A, 0x16A0, 0x16EA, 0x16EE, 0x16F8, + 0x1700, 0x1713, 0x171F, 0x1733, 0x1740, 0x1753, 0x1760, 0x176C, + 0x176E, 0x1770, 0x1772, 0x1773, 0x1780, 0x17B3, 0x17B6, 0x17C8, + 0x17D7, 0x17D7, 0x17DC, 0x17DC, 0x1820, 0x1878, 0x1880, 0x18AA, + 0x18B0, 0x18F5, 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x1938, + 0x1950, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, 0x19B0, 0x19C9, + 0x1A00, 0x1A1B, 0x1A20, 0x1A5E, 0x1A61, 0x1A74, 0x1AA7, 0x1AA7, + 0x1ABF, 0x1AC0, 0x1ACC, 0x1ACE, 0x1B00, 0x1B33, 0x1B35, 0x1B43, + 0x1B45, 0x1B4C, 0x1B80, 0x1BA9, 0x1BAC, 0x1BAF, 0x1BBA, 0x1BE5, + 0x1BE7, 0x1BF1, 0x1C00, 0x1C36, 0x1C4D, 0x1C4F, 0x1C5A, 0x1C7D, + 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF6, 0x1CFA, 0x1CFA, 0x1D00, 0x1DBF, + 0x1DE7, 0x1DF4, 0x1E00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, + 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, + 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, + 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, + 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, + 0x2071, 0x2071, 0x207F, 0x207F, 0x2090, 0x209C, 0x2102, 0x2102, + 0x2107, 0x2107, 0x210A, 0x2113, 0x2115, 0x2115, 0x2119, 0x211D, + 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x212D, + 0x212F, 0x2139, 0x213C, 0x213F, 0x2145, 0x2149, 0x214E, 0x214E, + 0x2160, 0x2188, 0x24B6, 0x24E9, 0x2C00, 0x2CE4, 0x2CEB, 0x2CEE, + 0x2CF2, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, + 0x2D30, 0x2D67, 0x2D6F, 0x2D6F, 0x2D80, 0x2D96, 0x2DA0, 0x2DA6, + 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, + 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, 0x2DE0, 0x2DFF, + 0x2E2F, 0x2E2F, 0x3005, 0x3007, 0x3021, 0x3029, 0x3031, 0x3035, + 0x3038, 0x303C, 0x3041, 0x3096, 0x309D, 0x309F, 0x30A1, 0x30FA, + 0x30FC, 0x30FF, 0x3105, 0x312F, 0x3131, 0x318E, 0x31A0, 0x31BF, + 0x31F0, 0x31FF, 0x3400, 0x4DBF, 0x4E00, 0xA48C, 0xA4D0, 0xA4FD, + 0xA500, 0xA60C, 0xA610, 0xA61F, 0xA62A, 0xA62B, 0xA640, 0xA66E, + 0xA674, 0xA67B, 0xA67F, 0xA6EF, 0xA717, 0xA71F, 0xA722, 0xA788, + 0xA78B, 0xA7CA, 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, + 0xA7F2, 0xA805, 0xA807, 0xA827, 0xA840, 0xA873, 0xA880, 0xA8C3, + 0xA8C5, 0xA8C5, 0xA8F2, 0xA8F7, 0xA8FB, 0xA8FB, 0xA8FD, 0xA8FF, + 0xA90A, 0xA92A, 0xA930, 0xA952, 0xA960, 0xA97C, 0xA980, 0xA9B2, + 0xA9B4, 0xA9BF, 0xA9CF, 0xA9CF, 0xA9E0, 0xA9EF, 0xA9FA, 0xA9FE, + 0xAA00, 0xAA36, 0xAA40, 0xAA4D, 0xAA60, 0xAA76, 0xAA7A, 0xAABE, + 0xAAC0, 0xAAC0, 0xAAC2, 0xAAC2, 0xAADB, 0xAADD, 0xAAE0, 0xAAEF, + 0xAAF2, 0xAAF5, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, 0xAB11, 0xAB16, + 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB5A, 0xAB5C, 0xAB69, + 0xAB70, 0xABEA, 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, + 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0xFB00, 0xFB06, 0xFB13, 0xFB17, + 0xFB1D, 0xFB28, 0xFB2A, 0xFB36, 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, + 0xFB40, 0xFB41, 0xFB43, 0xFB44, 0xFB46, 0xFBB1, 0xFBD3, 0xFD3D, + 0xFD50, 0xFD8F, 0xFD92, 0xFDC7, 0xFDF0, 0xFDFB, 0xFE70, 0xFE74, + 0xFE76, 0xFEFC, 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0xFF66, 0xFFBE, + 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, + 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, + 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, 0x10140, 0x10174, + 0x10280, 0x1029C, 0x102A0, 0x102D0, 0x10300, 0x1031F, 0x1032D, 0x1034A, + 0x10350, 0x1037A, 0x10380, 0x1039D, 0x103A0, 0x103C3, 0x103C8, 0x103CF, + 0x103D1, 0x103D5, 0x10400, 0x1049D, 0x104B0, 0x104D3, 0x104D8, 0x104FB, + 0x10500, 0x10527, 0x10530, 0x10563, 0x10570, 0x1057A, 0x1057C, 0x1058A, + 0x1058C, 0x10592, 0x10594, 0x10595, 0x10597, 0x105A1, 0x105A3, 0x105B1, + 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10600, 0x10736, 0x10740, 0x10755, + 0x10760, 0x10767, 0x10780, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, + 0x10800, 0x10805, 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, + 0x1083C, 0x1083C, 0x1083F, 0x10855, 0x10860, 0x10876, 0x10880, 0x1089E, + 0x108E0, 0x108F2, 0x108F4, 0x108F5, 0x10900, 0x10915, 0x10920, 0x10939, + 0x10980, 0x109B7, 0x109BE, 0x109BF, 0x10A00, 0x10A03, 0x10A05, 0x10A06, + 0x10A0C, 0x10A13, 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A60, 0x10A7C, + 0x10A80, 0x10A9C, 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE4, 0x10B00, 0x10B35, + 0x10B40, 0x10B55, 0x10B60, 0x10B72, 0x10B80, 0x10B91, 0x10C00, 0x10C48, + 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10D00, 0x10D27, 0x10E80, 0x10EA9, + 0x10EAB, 0x10EAC, 0x10EB0, 0x10EB1, 0x10F00, 0x10F1C, 0x10F27, 0x10F27, + 0x10F30, 0x10F45, 0x10F70, 0x10F81, 0x10FB0, 0x10FC4, 0x10FE0, 0x10FF6, + 0x11000, 0x11045, 0x11071, 0x11075, 0x11082, 0x110B8, 0x110C2, 0x110C2, + 0x110D0, 0x110E8, 0x11100, 0x11132, 0x11144, 0x11147, 0x11150, 0x11172, + 0x11176, 0x11176, 0x11180, 0x111BF, 0x111C1, 0x111C4, 0x111CE, 0x111CF, + 0x111DA, 0x111DA, 0x111DC, 0x111DC, 0x11200, 0x11211, 0x11213, 0x11234, + 0x11237, 0x11237, 0x1123E, 0x1123E, 0x11280, 0x11286, 0x11288, 0x11288, + 0x1128A, 0x1128D, 0x1128F, 0x1129D, 0x1129F, 0x112A8, 0x112B0, 0x112E8, + 0x11300, 0x11303, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, + 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133D, 0x11344, + 0x11347, 0x11348, 0x1134B, 0x1134C, 0x11350, 0x11350, 0x11357, 0x11357, + 0x1135D, 0x11363, 0x11400, 0x11441, 0x11443, 0x11445, 0x11447, 0x1144A, + 0x1145F, 0x11461, 0x11480, 0x114C1, 0x114C4, 0x114C5, 0x114C7, 0x114C7, + 0x11580, 0x115B5, 0x115B8, 0x115BE, 0x115D8, 0x115DD, 0x11600, 0x1163E, + 0x11640, 0x11640, 0x11644, 0x11644, 0x11680, 0x116B5, 0x116B8, 0x116B8, + 0x11700, 0x1171A, 0x1171D, 0x1172A, 0x11740, 0x11746, 0x11800, 0x11838, + 0x118A0, 0x118DF, 0x118FF, 0x11906, 0x11909, 0x11909, 0x1190C, 0x11913, + 0x11915, 0x11916, 0x11918, 0x11935, 0x11937, 0x11938, 0x1193B, 0x1193C, + 0x1193F, 0x11942, 0x119A0, 0x119A7, 0x119AA, 0x119D7, 0x119DA, 0x119DF, + 0x119E1, 0x119E1, 0x119E3, 0x119E4, 0x11A00, 0x11A32, 0x11A35, 0x11A3E, + 0x11A50, 0x11A97, 0x11A9D, 0x11A9D, 0x11AB0, 0x11AF8, 0x11C00, 0x11C08, + 0x11C0A, 0x11C36, 0x11C38, 0x11C3E, 0x11C40, 0x11C40, 0x11C72, 0x11C8F, + 0x11C92, 0x11CA7, 0x11CA9, 0x11CB6, 0x11D00, 0x11D06, 0x11D08, 0x11D09, + 0x11D0B, 0x11D36, 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D41, + 0x11D43, 0x11D43, 0x11D46, 0x11D47, 0x11D60, 0x11D65, 0x11D67, 0x11D68, + 0x11D6A, 0x11D8E, 0x11D90, 0x11D91, 0x11D93, 0x11D96, 0x11D98, 0x11D98, + 0x11EE0, 0x11EF6, 0x11FB0, 0x11FB0, 0x12000, 0x12399, 0x12400, 0x1246E, + 0x12480, 0x12543, 0x12F90, 0x12FF0, 0x13000, 0x1342E, 0x14400, 0x14646, + 0x16800, 0x16A38, 0x16A40, 0x16A5E, 0x16A70, 0x16ABE, 0x16AD0, 0x16AED, + 0x16B00, 0x16B2F, 0x16B40, 0x16B43, 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, + 0x16E40, 0x16E7F, 0x16F00, 0x16F4A, 0x16F4F, 0x16F87, 0x16F8F, 0x16F9F, + 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE3, 0x16FF0, 0x16FF1, 0x17000, 0x187F7, + 0x18800, 0x18CD5, 0x18D00, 0x18D08, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, + 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B122, 0x1B150, 0x1B152, 0x1B164, 0x1B167, + 0x1B170, 0x1B2FB, 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, + 0x1BC90, 0x1BC99, 0x1BC9E, 0x1BC9E, 0x1D400, 0x1D454, 0x1D456, 0x1D49C, + 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, + 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, + 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, + 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, + 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D6C0, 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6FA, + 0x1D6FC, 0x1D714, 0x1D716, 0x1D734, 0x1D736, 0x1D74E, 0x1D750, 0x1D76E, + 0x1D770, 0x1D788, 0x1D78A, 0x1D7A8, 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7CB, + 0x1DF00, 0x1DF1E, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, 0x1E100, 0x1E12C, 0x1E137, 0x1E13D, + 0x1E14E, 0x1E14E, 0x1E290, 0x1E2AD, 0x1E2C0, 0x1E2EB, 0x1E7E0, 0x1E7E6, + 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, 0x1E800, 0x1E8C4, + 0x1E900, 0x1E943, 0x1E947, 0x1E947, 0x1E94B, 0x1E94B, 0x1EE00, 0x1EE03, + 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, + 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, + 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, + 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, + 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, + 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, + 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, + 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, + 0x1F130, 0x1F149, 0x1F150, 0x1F169, 0x1F170, 0x1F189, 0x20000, 0x2A6DF, + 0x2A700, 0x2B738, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, + 0x2F800, 0x2FA1D, 0x30000, 0x3134A, + // #42 (4694+1): bp=Any + 0x0000, 0x10FFFF, + // #43 (4695+0): bp=Assigned + + // #44 (4695+4): bp=Bidi_Control:Bidi_C + 0x061C, 0x061C, 0x200E, 0x200F, 0x202A, 0x202E, 0x2066, 0x2069, + // #45 (4699+114): bp=Bidi_Mirrored:Bidi_M + 0x0028, 0x0029, 0x003C, 0x003C, 0x003E, 0x003E, 0x005B, 0x005B, + 0x005D, 0x005D, 0x007B, 0x007B, 0x007D, 0x007D, 0x00AB, 0x00AB, + 0x00BB, 0x00BB, 0x0F3A, 0x0F3D, 0x169B, 0x169C, 0x2039, 0x203A, + 0x2045, 0x2046, 0x207D, 0x207E, 0x208D, 0x208E, 0x2140, 0x2140, + 0x2201, 0x2204, 0x2208, 0x220D, 0x2211, 0x2211, 0x2215, 0x2216, + 0x221A, 0x221D, 0x221F, 0x2222, 0x2224, 0x2224, 0x2226, 0x2226, + 0x222B, 0x2233, 0x2239, 0x2239, 0x223B, 0x224C, 0x2252, 0x2255, + 0x225F, 0x2260, 0x2262, 0x2262, 0x2264, 0x226B, 0x226E, 0x228C, + 0x228F, 0x2292, 0x2298, 0x2298, 0x22A2, 0x22A3, 0x22A6, 0x22B8, + 0x22BE, 0x22BF, 0x22C9, 0x22CD, 0x22D0, 0x22D1, 0x22D6, 0x22ED, + 0x22F0, 0x22FF, 0x2308, 0x230B, 0x2320, 0x2321, 0x2329, 0x232A, + 0x2768, 0x2775, 0x27C0, 0x27C0, 0x27C3, 0x27C6, 0x27C8, 0x27C9, + 0x27CB, 0x27CD, 0x27D3, 0x27D6, 0x27DC, 0x27DE, 0x27E2, 0x27EF, + 0x2983, 0x2998, 0x299B, 0x29A0, 0x29A2, 0x29AF, 0x29B8, 0x29B8, + 0x29C0, 0x29C5, 0x29C9, 0x29C9, 0x29CE, 0x29D2, 0x29D4, 0x29D5, + 0x29D8, 0x29DC, 0x29E1, 0x29E1, 0x29E3, 0x29E5, 0x29E8, 0x29E9, + 0x29F4, 0x29F9, 0x29FC, 0x29FD, 0x2A0A, 0x2A1C, 0x2A1E, 0x2A21, + 0x2A24, 0x2A24, 0x2A26, 0x2A26, 0x2A29, 0x2A29, 0x2A2B, 0x2A2E, + 0x2A34, 0x2A35, 0x2A3C, 0x2A3E, 0x2A57, 0x2A58, 0x2A64, 0x2A65, + 0x2A6A, 0x2A6D, 0x2A6F, 0x2A70, 0x2A73, 0x2A74, 0x2A79, 0x2AA3, + 0x2AA6, 0x2AAD, 0x2AAF, 0x2AD6, 0x2ADC, 0x2ADC, 0x2ADE, 0x2ADE, + 0x2AE2, 0x2AE6, 0x2AEC, 0x2AEE, 0x2AF3, 0x2AF3, 0x2AF7, 0x2AFB, + 0x2AFD, 0x2AFD, 0x2BFE, 0x2BFE, 0x2E02, 0x2E05, 0x2E09, 0x2E0A, + 0x2E0C, 0x2E0D, 0x2E1C, 0x2E1D, 0x2E20, 0x2E29, 0x2E55, 0x2E5C, + 0x3008, 0x3011, 0x3014, 0x301B, 0xFE59, 0xFE5E, 0xFE64, 0xFE65, + 0xFF08, 0xFF09, 0xFF1C, 0xFF1C, 0xFF1E, 0xFF1E, 0xFF3B, 0xFF3B, + 0xFF3D, 0xFF3D, 0xFF5B, 0xFF5B, 0xFF5D, 0xFF5D, 0xFF5F, 0xFF60, + 0xFF62, 0xFF63, 0x1D6DB, 0x1D6DB, 0x1D715, 0x1D715, 0x1D74F, 0x1D74F, + 0x1D789, 0x1D789, 0x1D7C3, 0x1D7C3, + // #46 (4813+427): bp=Case_Ignorable:CI + 0x0027, 0x0027, 0x002E, 0x002E, 0x003A, 0x003A, 0x005E, 0x005E, + 0x0060, 0x0060, 0x00A8, 0x00A8, 0x00AD, 0x00AD, 0x00AF, 0x00AF, + 0x00B4, 0x00B4, 0x00B7, 0x00B8, 0x02B0, 0x036F, 0x0374, 0x0375, + 0x037A, 0x037A, 0x0384, 0x0385, 0x0387, 0x0387, 0x0483, 0x0489, + 0x0559, 0x0559, 0x055F, 0x055F, 0x0591, 0x05BD, 0x05BF, 0x05BF, + 0x05C1, 0x05C2, 0x05C4, 0x05C5, 0x05C7, 0x05C7, 0x05F4, 0x05F4, + 0x0600, 0x0605, 0x0610, 0x061A, 0x061C, 0x061C, 0x0640, 0x0640, + 0x064B, 0x065F, 0x0670, 0x0670, 0x06D6, 0x06DD, 0x06DF, 0x06E8, + 0x06EA, 0x06ED, 0x070F, 0x070F, 0x0711, 0x0711, 0x0730, 0x074A, + 0x07A6, 0x07B0, 0x07EB, 0x07F5, 0x07FA, 0x07FA, 0x07FD, 0x07FD, + 0x0816, 0x082D, 0x0859, 0x085B, 0x0888, 0x0888, 0x0890, 0x0891, + 0x0898, 0x089F, 0x08C9, 0x0902, 0x093A, 0x093A, 0x093C, 0x093C, + 0x0941, 0x0948, 0x094D, 0x094D, 0x0951, 0x0957, 0x0962, 0x0963, + 0x0971, 0x0971, 0x0981, 0x0981, 0x09BC, 0x09BC, 0x09C1, 0x09C4, + 0x09CD, 0x09CD, 0x09E2, 0x09E3, 0x09FE, 0x09FE, 0x0A01, 0x0A02, + 0x0A3C, 0x0A3C, 0x0A41, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, + 0x0A51, 0x0A51, 0x0A70, 0x0A71, 0x0A75, 0x0A75, 0x0A81, 0x0A82, + 0x0ABC, 0x0ABC, 0x0AC1, 0x0AC5, 0x0AC7, 0x0AC8, 0x0ACD, 0x0ACD, + 0x0AE2, 0x0AE3, 0x0AFA, 0x0AFF, 0x0B01, 0x0B01, 0x0B3C, 0x0B3C, + 0x0B3F, 0x0B3F, 0x0B41, 0x0B44, 0x0B4D, 0x0B4D, 0x0B55, 0x0B56, + 0x0B62, 0x0B63, 0x0B82, 0x0B82, 0x0BC0, 0x0BC0, 0x0BCD, 0x0BCD, + 0x0C00, 0x0C00, 0x0C04, 0x0C04, 0x0C3C, 0x0C3C, 0x0C3E, 0x0C40, + 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C62, 0x0C63, + 0x0C81, 0x0C81, 0x0CBC, 0x0CBC, 0x0CBF, 0x0CBF, 0x0CC6, 0x0CC6, + 0x0CCC, 0x0CCD, 0x0CE2, 0x0CE3, 0x0D00, 0x0D01, 0x0D3B, 0x0D3C, + 0x0D41, 0x0D44, 0x0D4D, 0x0D4D, 0x0D62, 0x0D63, 0x0D81, 0x0D81, + 0x0DCA, 0x0DCA, 0x0DD2, 0x0DD4, 0x0DD6, 0x0DD6, 0x0E31, 0x0E31, + 0x0E34, 0x0E3A, 0x0E46, 0x0E4E, 0x0EB1, 0x0EB1, 0x0EB4, 0x0EBC, + 0x0EC6, 0x0EC6, 0x0EC8, 0x0ECD, 0x0F18, 0x0F19, 0x0F35, 0x0F35, + 0x0F37, 0x0F37, 0x0F39, 0x0F39, 0x0F71, 0x0F7E, 0x0F80, 0x0F84, + 0x0F86, 0x0F87, 0x0F8D, 0x0F97, 0x0F99, 0x0FBC, 0x0FC6, 0x0FC6, + 0x102D, 0x1030, 0x1032, 0x1037, 0x1039, 0x103A, 0x103D, 0x103E, + 0x1058, 0x1059, 0x105E, 0x1060, 0x1071, 0x1074, 0x1082, 0x1082, + 0x1085, 0x1086, 0x108D, 0x108D, 0x109D, 0x109D, 0x10FC, 0x10FC, + 0x135D, 0x135F, 0x1712, 0x1714, 0x1732, 0x1733, 0x1752, 0x1753, + 0x1772, 0x1773, 0x17B4, 0x17B5, 0x17B7, 0x17BD, 0x17C6, 0x17C6, + 0x17C9, 0x17D3, 0x17D7, 0x17D7, 0x17DD, 0x17DD, 0x180B, 0x180F, + 0x1843, 0x1843, 0x1885, 0x1886, 0x18A9, 0x18A9, 0x1920, 0x1922, + 0x1927, 0x1928, 0x1932, 0x1932, 0x1939, 0x193B, 0x1A17, 0x1A18, + 0x1A1B, 0x1A1B, 0x1A56, 0x1A56, 0x1A58, 0x1A5E, 0x1A60, 0x1A60, + 0x1A62, 0x1A62, 0x1A65, 0x1A6C, 0x1A73, 0x1A7C, 0x1A7F, 0x1A7F, + 0x1AA7, 0x1AA7, 0x1AB0, 0x1ACE, 0x1B00, 0x1B03, 0x1B34, 0x1B34, + 0x1B36, 0x1B3A, 0x1B3C, 0x1B3C, 0x1B42, 0x1B42, 0x1B6B, 0x1B73, + 0x1B80, 0x1B81, 0x1BA2, 0x1BA5, 0x1BA8, 0x1BA9, 0x1BAB, 0x1BAD, + 0x1BE6, 0x1BE6, 0x1BE8, 0x1BE9, 0x1BED, 0x1BED, 0x1BEF, 0x1BF1, + 0x1C2C, 0x1C33, 0x1C36, 0x1C37, 0x1C78, 0x1C7D, 0x1CD0, 0x1CD2, + 0x1CD4, 0x1CE0, 0x1CE2, 0x1CE8, 0x1CED, 0x1CED, 0x1CF4, 0x1CF4, + 0x1CF8, 0x1CF9, 0x1D2C, 0x1D6A, 0x1D78, 0x1D78, 0x1D9B, 0x1DFF, + 0x1FBD, 0x1FBD, 0x1FBF, 0x1FC1, 0x1FCD, 0x1FCF, 0x1FDD, 0x1FDF, + 0x1FED, 0x1FEF, 0x1FFD, 0x1FFE, 0x200B, 0x200F, 0x2018, 0x2019, + 0x2024, 0x2024, 0x2027, 0x2027, 0x202A, 0x202E, 0x2060, 0x2064, + 0x2066, 0x206F, 0x2071, 0x2071, 0x207F, 0x207F, 0x2090, 0x209C, + 0x20D0, 0x20F0, 0x2C7C, 0x2C7D, 0x2CEF, 0x2CF1, 0x2D6F, 0x2D6F, + 0x2D7F, 0x2D7F, 0x2DE0, 0x2DFF, 0x2E2F, 0x2E2F, 0x3005, 0x3005, + 0x302A, 0x302D, 0x3031, 0x3035, 0x303B, 0x303B, 0x3099, 0x309E, + 0x30FC, 0x30FE, 0xA015, 0xA015, 0xA4F8, 0xA4FD, 0xA60C, 0xA60C, + 0xA66F, 0xA672, 0xA674, 0xA67D, 0xA67F, 0xA67F, 0xA69C, 0xA69F, + 0xA6F0, 0xA6F1, 0xA700, 0xA721, 0xA770, 0xA770, 0xA788, 0xA78A, + 0xA7F2, 0xA7F4, 0xA7F8, 0xA7F9, 0xA802, 0xA802, 0xA806, 0xA806, + 0xA80B, 0xA80B, 0xA825, 0xA826, 0xA82C, 0xA82C, 0xA8C4, 0xA8C5, + 0xA8E0, 0xA8F1, 0xA8FF, 0xA8FF, 0xA926, 0xA92D, 0xA947, 0xA951, + 0xA980, 0xA982, 0xA9B3, 0xA9B3, 0xA9B6, 0xA9B9, 0xA9BC, 0xA9BD, + 0xA9CF, 0xA9CF, 0xA9E5, 0xA9E6, 0xAA29, 0xAA2E, 0xAA31, 0xAA32, + 0xAA35, 0xAA36, 0xAA43, 0xAA43, 0xAA4C, 0xAA4C, 0xAA70, 0xAA70, + 0xAA7C, 0xAA7C, 0xAAB0, 0xAAB0, 0xAAB2, 0xAAB4, 0xAAB7, 0xAAB8, + 0xAABE, 0xAABF, 0xAAC1, 0xAAC1, 0xAADD, 0xAADD, 0xAAEC, 0xAAED, + 0xAAF3, 0xAAF4, 0xAAF6, 0xAAF6, 0xAB5B, 0xAB5F, 0xAB69, 0xAB6B, + 0xABE5, 0xABE5, 0xABE8, 0xABE8, 0xABED, 0xABED, 0xFB1E, 0xFB1E, + 0xFBB2, 0xFBC2, 0xFE00, 0xFE0F, 0xFE13, 0xFE13, 0xFE20, 0xFE2F, + 0xFE52, 0xFE52, 0xFE55, 0xFE55, 0xFEFF, 0xFEFF, 0xFF07, 0xFF07, + 0xFF0E, 0xFF0E, 0xFF1A, 0xFF1A, 0xFF3E, 0xFF3E, 0xFF40, 0xFF40, + 0xFF70, 0xFF70, 0xFF9E, 0xFF9F, 0xFFE3, 0xFFE3, 0xFFF9, 0xFFFB, + 0x101FD, 0x101FD, 0x102E0, 0x102E0, 0x10376, 0x1037A, 0x10780, 0x10785, + 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10A01, 0x10A03, 0x10A05, 0x10A06, + 0x10A0C, 0x10A0F, 0x10A38, 0x10A3A, 0x10A3F, 0x10A3F, 0x10AE5, 0x10AE6, + 0x10D24, 0x10D27, 0x10EAB, 0x10EAC, 0x10F46, 0x10F50, 0x10F82, 0x10F85, + 0x11001, 0x11001, 0x11038, 0x11046, 0x11070, 0x11070, 0x11073, 0x11074, + 0x1107F, 0x11081, 0x110B3, 0x110B6, 0x110B9, 0x110BA, 0x110BD, 0x110BD, + 0x110C2, 0x110C2, 0x110CD, 0x110CD, 0x11100, 0x11102, 0x11127, 0x1112B, + 0x1112D, 0x11134, 0x11173, 0x11173, 0x11180, 0x11181, 0x111B6, 0x111BE, + 0x111C9, 0x111CC, 0x111CF, 0x111CF, 0x1122F, 0x11231, 0x11234, 0x11234, + 0x11236, 0x11237, 0x1123E, 0x1123E, 0x112DF, 0x112DF, 0x112E3, 0x112EA, + 0x11300, 0x11301, 0x1133B, 0x1133C, 0x11340, 0x11340, 0x11366, 0x1136C, + 0x11370, 0x11374, 0x11438, 0x1143F, 0x11442, 0x11444, 0x11446, 0x11446, + 0x1145E, 0x1145E, 0x114B3, 0x114B8, 0x114BA, 0x114BA, 0x114BF, 0x114C0, + 0x114C2, 0x114C3, 0x115B2, 0x115B5, 0x115BC, 0x115BD, 0x115BF, 0x115C0, + 0x115DC, 0x115DD, 0x11633, 0x1163A, 0x1163D, 0x1163D, 0x1163F, 0x11640, + 0x116AB, 0x116AB, 0x116AD, 0x116AD, 0x116B0, 0x116B5, 0x116B7, 0x116B7, + 0x1171D, 0x1171F, 0x11722, 0x11725, 0x11727, 0x1172B, 0x1182F, 0x11837, + 0x11839, 0x1183A, 0x1193B, 0x1193C, 0x1193E, 0x1193E, 0x11943, 0x11943, + 0x119D4, 0x119D7, 0x119DA, 0x119DB, 0x119E0, 0x119E0, 0x11A01, 0x11A0A, + 0x11A33, 0x11A38, 0x11A3B, 0x11A3E, 0x11A47, 0x11A47, 0x11A51, 0x11A56, + 0x11A59, 0x11A5B, 0x11A8A, 0x11A96, 0x11A98, 0x11A99, 0x11C30, 0x11C36, + 0x11C38, 0x11C3D, 0x11C3F, 0x11C3F, 0x11C92, 0x11CA7, 0x11CAA, 0x11CB0, + 0x11CB2, 0x11CB3, 0x11CB5, 0x11CB6, 0x11D31, 0x11D36, 0x11D3A, 0x11D3A, + 0x11D3C, 0x11D3D, 0x11D3F, 0x11D45, 0x11D47, 0x11D47, 0x11D90, 0x11D91, + 0x11D95, 0x11D95, 0x11D97, 0x11D97, 0x11EF3, 0x11EF4, 0x13430, 0x13438, + 0x16AF0, 0x16AF4, 0x16B30, 0x16B36, 0x16B40, 0x16B43, 0x16F4F, 0x16F4F, + 0x16F8F, 0x16F9F, 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE4, 0x1AFF0, 0x1AFF3, + 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1BC9D, 0x1BC9E, 0x1BCA0, 0x1BCA3, + 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1D167, 0x1D169, 0x1D173, 0x1D182, + 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0x1D242, 0x1D244, 0x1DA00, 0x1DA36, + 0x1DA3B, 0x1DA6C, 0x1DA75, 0x1DA75, 0x1DA84, 0x1DA84, 0x1DA9B, 0x1DA9F, + 0x1DAA1, 0x1DAAF, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, 0x1E130, 0x1E13D, 0x1E2AE, 0x1E2AE, + 0x1E2EC, 0x1E2EF, 0x1E8D0, 0x1E8D6, 0x1E944, 0x1E94B, 0x1F3FB, 0x1F3FF, + 0xE0001, 0xE0001, 0xE0020, 0xE007F, 0xE0100, 0xE01EF, + // #47 (5240+155): bp=Cased + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00B5, 0x00B5, + 0x00BA, 0x00BA, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x01BA, + 0x01BC, 0x01BF, 0x01C4, 0x0293, 0x0295, 0x02B8, 0x02C0, 0x02C1, + 0x02E0, 0x02E4, 0x0345, 0x0345, 0x0370, 0x0373, 0x0376, 0x0377, + 0x037A, 0x037D, 0x037F, 0x037F, 0x0386, 0x0386, 0x0388, 0x038A, + 0x038C, 0x038C, 0x038E, 0x03A1, 0x03A3, 0x03F5, 0x03F7, 0x0481, + 0x048A, 0x052F, 0x0531, 0x0556, 0x0560, 0x0588, 0x10A0, 0x10C5, + 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, 0x10FD, 0x10FF, + 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0x1C80, 0x1C88, 0x1C90, 0x1CBA, + 0x1CBD, 0x1CBF, 0x1D00, 0x1DBF, 0x1E00, 0x1F15, 0x1F18, 0x1F1D, + 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, + 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, + 0x1FB6, 0x1FBC, 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, + 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, + 0x1FF6, 0x1FFC, 0x2071, 0x2071, 0x207F, 0x207F, 0x2090, 0x209C, + 0x2102, 0x2102, 0x2107, 0x2107, 0x210A, 0x2113, 0x2115, 0x2115, + 0x2119, 0x211D, 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, + 0x212A, 0x212D, 0x212F, 0x2134, 0x2139, 0x2139, 0x213C, 0x213F, + 0x2145, 0x2149, 0x214E, 0x214E, 0x2160, 0x217F, 0x2183, 0x2184, + 0x24B6, 0x24E9, 0x2C00, 0x2CE4, 0x2CEB, 0x2CEE, 0x2CF2, 0x2CF3, + 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, 0xA640, 0xA66D, + 0xA680, 0xA69D, 0xA722, 0xA787, 0xA78B, 0xA78E, 0xA790, 0xA7CA, + 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, 0xA7F5, 0xA7F6, + 0xA7F8, 0xA7FA, 0xAB30, 0xAB5A, 0xAB5C, 0xAB68, 0xAB70, 0xABBF, + 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, + 0x10400, 0x1044F, 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10570, 0x1057A, + 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, 0x10597, 0x105A1, + 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10780, 0x10780, + 0x10783, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10C80, 0x10CB2, + 0x10CC0, 0x10CF2, 0x118A0, 0x118DF, 0x16E40, 0x16E7F, 0x1D400, 0x1D454, + 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, + 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, + 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, + 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, + 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D6C0, 0x1D6C2, 0x1D6DA, + 0x1D6DC, 0x1D6FA, 0x1D6FC, 0x1D714, 0x1D716, 0x1D734, 0x1D736, 0x1D74E, + 0x1D750, 0x1D76E, 0x1D770, 0x1D788, 0x1D78A, 0x1D7A8, 0x1D7AA, 0x1D7C2, + 0x1D7C4, 0x1D7CB, 0x1DF00, 0x1DF09, 0x1DF0B, 0x1DF1E, 0x1E900, 0x1E943, + 0x1F130, 0x1F149, 0x1F150, 0x1F169, 0x1F170, 0x1F189, + // #48 (5395+622): bp=Changes_When_Casefolded:CWCF + 0x0041, 0x005A, 0x00B5, 0x00B5, 0x00C0, 0x00D6, 0x00D8, 0x00DF, + 0x0100, 0x0100, 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106, + 0x0108, 0x0108, 0x010A, 0x010A, 0x010C, 0x010C, 0x010E, 0x010E, + 0x0110, 0x0110, 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116, + 0x0118, 0x0118, 0x011A, 0x011A, 0x011C, 0x011C, 0x011E, 0x011E, + 0x0120, 0x0120, 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126, + 0x0128, 0x0128, 0x012A, 0x012A, 0x012C, 0x012C, 0x012E, 0x012E, + 0x0130, 0x0130, 0x0132, 0x0132, 0x0134, 0x0134, 0x0136, 0x0136, + 0x0139, 0x0139, 0x013B, 0x013B, 0x013D, 0x013D, 0x013F, 0x013F, + 0x0141, 0x0141, 0x0143, 0x0143, 0x0145, 0x0145, 0x0147, 0x0147, + 0x0149, 0x014A, 0x014C, 0x014C, 0x014E, 0x014E, 0x0150, 0x0150, + 0x0152, 0x0152, 0x0154, 0x0154, 0x0156, 0x0156, 0x0158, 0x0158, + 0x015A, 0x015A, 0x015C, 0x015C, 0x015E, 0x015E, 0x0160, 0x0160, + 0x0162, 0x0162, 0x0164, 0x0164, 0x0166, 0x0166, 0x0168, 0x0168, + 0x016A, 0x016A, 0x016C, 0x016C, 0x016E, 0x016E, 0x0170, 0x0170, + 0x0172, 0x0172, 0x0174, 0x0174, 0x0176, 0x0176, 0x0178, 0x0179, + 0x017B, 0x017B, 0x017D, 0x017D, 0x017F, 0x017F, 0x0181, 0x0182, + 0x0184, 0x0184, 0x0186, 0x0187, 0x0189, 0x018B, 0x018E, 0x0191, + 0x0193, 0x0194, 0x0196, 0x0198, 0x019C, 0x019D, 0x019F, 0x01A0, + 0x01A2, 0x01A2, 0x01A4, 0x01A4, 0x01A6, 0x01A7, 0x01A9, 0x01A9, + 0x01AC, 0x01AC, 0x01AE, 0x01AF, 0x01B1, 0x01B3, 0x01B5, 0x01B5, + 0x01B7, 0x01B8, 0x01BC, 0x01BC, 0x01C4, 0x01C5, 0x01C7, 0x01C8, + 0x01CA, 0x01CB, 0x01CD, 0x01CD, 0x01CF, 0x01CF, 0x01D1, 0x01D1, + 0x01D3, 0x01D3, 0x01D5, 0x01D5, 0x01D7, 0x01D7, 0x01D9, 0x01D9, + 0x01DB, 0x01DB, 0x01DE, 0x01DE, 0x01E0, 0x01E0, 0x01E2, 0x01E2, + 0x01E4, 0x01E4, 0x01E6, 0x01E6, 0x01E8, 0x01E8, 0x01EA, 0x01EA, + 0x01EC, 0x01EC, 0x01EE, 0x01EE, 0x01F1, 0x01F2, 0x01F4, 0x01F4, + 0x01F6, 0x01F8, 0x01FA, 0x01FA, 0x01FC, 0x01FC, 0x01FE, 0x01FE, + 0x0200, 0x0200, 0x0202, 0x0202, 0x0204, 0x0204, 0x0206, 0x0206, + 0x0208, 0x0208, 0x020A, 0x020A, 0x020C, 0x020C, 0x020E, 0x020E, + 0x0210, 0x0210, 0x0212, 0x0212, 0x0214, 0x0214, 0x0216, 0x0216, + 0x0218, 0x0218, 0x021A, 0x021A, 0x021C, 0x021C, 0x021E, 0x021E, + 0x0220, 0x0220, 0x0222, 0x0222, 0x0224, 0x0224, 0x0226, 0x0226, + 0x0228, 0x0228, 0x022A, 0x022A, 0x022C, 0x022C, 0x022E, 0x022E, + 0x0230, 0x0230, 0x0232, 0x0232, 0x023A, 0x023B, 0x023D, 0x023E, + 0x0241, 0x0241, 0x0243, 0x0246, 0x0248, 0x0248, 0x024A, 0x024A, + 0x024C, 0x024C, 0x024E, 0x024E, 0x0345, 0x0345, 0x0370, 0x0370, + 0x0372, 0x0372, 0x0376, 0x0376, 0x037F, 0x037F, 0x0386, 0x0386, + 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x038F, 0x0391, 0x03A1, + 0x03A3, 0x03AB, 0x03C2, 0x03C2, 0x03CF, 0x03D1, 0x03D5, 0x03D6, + 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, + 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, + 0x03E8, 0x03E8, 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, + 0x03F0, 0x03F1, 0x03F4, 0x03F5, 0x03F7, 0x03F7, 0x03F9, 0x03FA, + 0x03FD, 0x042F, 0x0460, 0x0460, 0x0462, 0x0462, 0x0464, 0x0464, + 0x0466, 0x0466, 0x0468, 0x0468, 0x046A, 0x046A, 0x046C, 0x046C, + 0x046E, 0x046E, 0x0470, 0x0470, 0x0472, 0x0472, 0x0474, 0x0474, + 0x0476, 0x0476, 0x0478, 0x0478, 0x047A, 0x047A, 0x047C, 0x047C, + 0x047E, 0x047E, 0x0480, 0x0480, 0x048A, 0x048A, 0x048C, 0x048C, + 0x048E, 0x048E, 0x0490, 0x0490, 0x0492, 0x0492, 0x0494, 0x0494, + 0x0496, 0x0496, 0x0498, 0x0498, 0x049A, 0x049A, 0x049C, 0x049C, + 0x049E, 0x049E, 0x04A0, 0x04A0, 0x04A2, 0x04A2, 0x04A4, 0x04A4, + 0x04A6, 0x04A6, 0x04A8, 0x04A8, 0x04AA, 0x04AA, 0x04AC, 0x04AC, + 0x04AE, 0x04AE, 0x04B0, 0x04B0, 0x04B2, 0x04B2, 0x04B4, 0x04B4, + 0x04B6, 0x04B6, 0x04B8, 0x04B8, 0x04BA, 0x04BA, 0x04BC, 0x04BC, + 0x04BE, 0x04BE, 0x04C0, 0x04C1, 0x04C3, 0x04C3, 0x04C5, 0x04C5, + 0x04C7, 0x04C7, 0x04C9, 0x04C9, 0x04CB, 0x04CB, 0x04CD, 0x04CD, + 0x04D0, 0x04D0, 0x04D2, 0x04D2, 0x04D4, 0x04D4, 0x04D6, 0x04D6, + 0x04D8, 0x04D8, 0x04DA, 0x04DA, 0x04DC, 0x04DC, 0x04DE, 0x04DE, + 0x04E0, 0x04E0, 0x04E2, 0x04E2, 0x04E4, 0x04E4, 0x04E6, 0x04E6, + 0x04E8, 0x04E8, 0x04EA, 0x04EA, 0x04EC, 0x04EC, 0x04EE, 0x04EE, + 0x04F0, 0x04F0, 0x04F2, 0x04F2, 0x04F4, 0x04F4, 0x04F6, 0x04F6, + 0x04F8, 0x04F8, 0x04FA, 0x04FA, 0x04FC, 0x04FC, 0x04FE, 0x04FE, + 0x0500, 0x0500, 0x0502, 0x0502, 0x0504, 0x0504, 0x0506, 0x0506, + 0x0508, 0x0508, 0x050A, 0x050A, 0x050C, 0x050C, 0x050E, 0x050E, + 0x0510, 0x0510, 0x0512, 0x0512, 0x0514, 0x0514, 0x0516, 0x0516, + 0x0518, 0x0518, 0x051A, 0x051A, 0x051C, 0x051C, 0x051E, 0x051E, + 0x0520, 0x0520, 0x0522, 0x0522, 0x0524, 0x0524, 0x0526, 0x0526, + 0x0528, 0x0528, 0x052A, 0x052A, 0x052C, 0x052C, 0x052E, 0x052E, + 0x0531, 0x0556, 0x0587, 0x0587, 0x10A0, 0x10C5, 0x10C7, 0x10C7, + 0x10CD, 0x10CD, 0x13F8, 0x13FD, 0x1C80, 0x1C88, 0x1C90, 0x1CBA, + 0x1CBD, 0x1CBF, 0x1E00, 0x1E00, 0x1E02, 0x1E02, 0x1E04, 0x1E04, + 0x1E06, 0x1E06, 0x1E08, 0x1E08, 0x1E0A, 0x1E0A, 0x1E0C, 0x1E0C, + 0x1E0E, 0x1E0E, 0x1E10, 0x1E10, 0x1E12, 0x1E12, 0x1E14, 0x1E14, + 0x1E16, 0x1E16, 0x1E18, 0x1E18, 0x1E1A, 0x1E1A, 0x1E1C, 0x1E1C, + 0x1E1E, 0x1E1E, 0x1E20, 0x1E20, 0x1E22, 0x1E22, 0x1E24, 0x1E24, + 0x1E26, 0x1E26, 0x1E28, 0x1E28, 0x1E2A, 0x1E2A, 0x1E2C, 0x1E2C, + 0x1E2E, 0x1E2E, 0x1E30, 0x1E30, 0x1E32, 0x1E32, 0x1E34, 0x1E34, + 0x1E36, 0x1E36, 0x1E38, 0x1E38, 0x1E3A, 0x1E3A, 0x1E3C, 0x1E3C, + 0x1E3E, 0x1E3E, 0x1E40, 0x1E40, 0x1E42, 0x1E42, 0x1E44, 0x1E44, + 0x1E46, 0x1E46, 0x1E48, 0x1E48, 0x1E4A, 0x1E4A, 0x1E4C, 0x1E4C, + 0x1E4E, 0x1E4E, 0x1E50, 0x1E50, 0x1E52, 0x1E52, 0x1E54, 0x1E54, + 0x1E56, 0x1E56, 0x1E58, 0x1E58, 0x1E5A, 0x1E5A, 0x1E5C, 0x1E5C, + 0x1E5E, 0x1E5E, 0x1E60, 0x1E60, 0x1E62, 0x1E62, 0x1E64, 0x1E64, + 0x1E66, 0x1E66, 0x1E68, 0x1E68, 0x1E6A, 0x1E6A, 0x1E6C, 0x1E6C, + 0x1E6E, 0x1E6E, 0x1E70, 0x1E70, 0x1E72, 0x1E72, 0x1E74, 0x1E74, + 0x1E76, 0x1E76, 0x1E78, 0x1E78, 0x1E7A, 0x1E7A, 0x1E7C, 0x1E7C, + 0x1E7E, 0x1E7E, 0x1E80, 0x1E80, 0x1E82, 0x1E82, 0x1E84, 0x1E84, + 0x1E86, 0x1E86, 0x1E88, 0x1E88, 0x1E8A, 0x1E8A, 0x1E8C, 0x1E8C, + 0x1E8E, 0x1E8E, 0x1E90, 0x1E90, 0x1E92, 0x1E92, 0x1E94, 0x1E94, + 0x1E9A, 0x1E9B, 0x1E9E, 0x1E9E, 0x1EA0, 0x1EA0, 0x1EA2, 0x1EA2, + 0x1EA4, 0x1EA4, 0x1EA6, 0x1EA6, 0x1EA8, 0x1EA8, 0x1EAA, 0x1EAA, + 0x1EAC, 0x1EAC, 0x1EAE, 0x1EAE, 0x1EB0, 0x1EB0, 0x1EB2, 0x1EB2, + 0x1EB4, 0x1EB4, 0x1EB6, 0x1EB6, 0x1EB8, 0x1EB8, 0x1EBA, 0x1EBA, + 0x1EBC, 0x1EBC, 0x1EBE, 0x1EBE, 0x1EC0, 0x1EC0, 0x1EC2, 0x1EC2, + 0x1EC4, 0x1EC4, 0x1EC6, 0x1EC6, 0x1EC8, 0x1EC8, 0x1ECA, 0x1ECA, + 0x1ECC, 0x1ECC, 0x1ECE, 0x1ECE, 0x1ED0, 0x1ED0, 0x1ED2, 0x1ED2, + 0x1ED4, 0x1ED4, 0x1ED6, 0x1ED6, 0x1ED8, 0x1ED8, 0x1EDA, 0x1EDA, + 0x1EDC, 0x1EDC, 0x1EDE, 0x1EDE, 0x1EE0, 0x1EE0, 0x1EE2, 0x1EE2, + 0x1EE4, 0x1EE4, 0x1EE6, 0x1EE6, 0x1EE8, 0x1EE8, 0x1EEA, 0x1EEA, + 0x1EEC, 0x1EEC, 0x1EEE, 0x1EEE, 0x1EF0, 0x1EF0, 0x1EF2, 0x1EF2, + 0x1EF4, 0x1EF4, 0x1EF6, 0x1EF6, 0x1EF8, 0x1EF8, 0x1EFA, 0x1EFA, + 0x1EFC, 0x1EFC, 0x1EFE, 0x1EFE, 0x1F08, 0x1F0F, 0x1F18, 0x1F1D, + 0x1F28, 0x1F2F, 0x1F38, 0x1F3F, 0x1F48, 0x1F4D, 0x1F59, 0x1F59, + 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F5F, 0x1F68, 0x1F6F, + 0x1F80, 0x1FAF, 0x1FB2, 0x1FB4, 0x1FB7, 0x1FBC, 0x1FC2, 0x1FC4, + 0x1FC7, 0x1FCC, 0x1FD8, 0x1FDB, 0x1FE8, 0x1FEC, 0x1FF2, 0x1FF4, + 0x1FF7, 0x1FFC, 0x2126, 0x2126, 0x212A, 0x212B, 0x2132, 0x2132, + 0x2160, 0x216F, 0x2183, 0x2183, 0x24B6, 0x24CF, 0x2C00, 0x2C2F, + 0x2C60, 0x2C60, 0x2C62, 0x2C64, 0x2C67, 0x2C67, 0x2C69, 0x2C69, + 0x2C6B, 0x2C6B, 0x2C6D, 0x2C70, 0x2C72, 0x2C72, 0x2C75, 0x2C75, + 0x2C7E, 0x2C80, 0x2C82, 0x2C82, 0x2C84, 0x2C84, 0x2C86, 0x2C86, + 0x2C88, 0x2C88, 0x2C8A, 0x2C8A, 0x2C8C, 0x2C8C, 0x2C8E, 0x2C8E, + 0x2C90, 0x2C90, 0x2C92, 0x2C92, 0x2C94, 0x2C94, 0x2C96, 0x2C96, + 0x2C98, 0x2C98, 0x2C9A, 0x2C9A, 0x2C9C, 0x2C9C, 0x2C9E, 0x2C9E, + 0x2CA0, 0x2CA0, 0x2CA2, 0x2CA2, 0x2CA4, 0x2CA4, 0x2CA6, 0x2CA6, + 0x2CA8, 0x2CA8, 0x2CAA, 0x2CAA, 0x2CAC, 0x2CAC, 0x2CAE, 0x2CAE, + 0x2CB0, 0x2CB0, 0x2CB2, 0x2CB2, 0x2CB4, 0x2CB4, 0x2CB6, 0x2CB6, + 0x2CB8, 0x2CB8, 0x2CBA, 0x2CBA, 0x2CBC, 0x2CBC, 0x2CBE, 0x2CBE, + 0x2CC0, 0x2CC0, 0x2CC2, 0x2CC2, 0x2CC4, 0x2CC4, 0x2CC6, 0x2CC6, + 0x2CC8, 0x2CC8, 0x2CCA, 0x2CCA, 0x2CCC, 0x2CCC, 0x2CCE, 0x2CCE, + 0x2CD0, 0x2CD0, 0x2CD2, 0x2CD2, 0x2CD4, 0x2CD4, 0x2CD6, 0x2CD6, + 0x2CD8, 0x2CD8, 0x2CDA, 0x2CDA, 0x2CDC, 0x2CDC, 0x2CDE, 0x2CDE, + 0x2CE0, 0x2CE0, 0x2CE2, 0x2CE2, 0x2CEB, 0x2CEB, 0x2CED, 0x2CED, + 0x2CF2, 0x2CF2, 0xA640, 0xA640, 0xA642, 0xA642, 0xA644, 0xA644, + 0xA646, 0xA646, 0xA648, 0xA648, 0xA64A, 0xA64A, 0xA64C, 0xA64C, + 0xA64E, 0xA64E, 0xA650, 0xA650, 0xA652, 0xA652, 0xA654, 0xA654, + 0xA656, 0xA656, 0xA658, 0xA658, 0xA65A, 0xA65A, 0xA65C, 0xA65C, + 0xA65E, 0xA65E, 0xA660, 0xA660, 0xA662, 0xA662, 0xA664, 0xA664, + 0xA666, 0xA666, 0xA668, 0xA668, 0xA66A, 0xA66A, 0xA66C, 0xA66C, + 0xA680, 0xA680, 0xA682, 0xA682, 0xA684, 0xA684, 0xA686, 0xA686, + 0xA688, 0xA688, 0xA68A, 0xA68A, 0xA68C, 0xA68C, 0xA68E, 0xA68E, + 0xA690, 0xA690, 0xA692, 0xA692, 0xA694, 0xA694, 0xA696, 0xA696, + 0xA698, 0xA698, 0xA69A, 0xA69A, 0xA722, 0xA722, 0xA724, 0xA724, + 0xA726, 0xA726, 0xA728, 0xA728, 0xA72A, 0xA72A, 0xA72C, 0xA72C, + 0xA72E, 0xA72E, 0xA732, 0xA732, 0xA734, 0xA734, 0xA736, 0xA736, + 0xA738, 0xA738, 0xA73A, 0xA73A, 0xA73C, 0xA73C, 0xA73E, 0xA73E, + 0xA740, 0xA740, 0xA742, 0xA742, 0xA744, 0xA744, 0xA746, 0xA746, + 0xA748, 0xA748, 0xA74A, 0xA74A, 0xA74C, 0xA74C, 0xA74E, 0xA74E, + 0xA750, 0xA750, 0xA752, 0xA752, 0xA754, 0xA754, 0xA756, 0xA756, + 0xA758, 0xA758, 0xA75A, 0xA75A, 0xA75C, 0xA75C, 0xA75E, 0xA75E, + 0xA760, 0xA760, 0xA762, 0xA762, 0xA764, 0xA764, 0xA766, 0xA766, + 0xA768, 0xA768, 0xA76A, 0xA76A, 0xA76C, 0xA76C, 0xA76E, 0xA76E, + 0xA779, 0xA779, 0xA77B, 0xA77B, 0xA77D, 0xA77E, 0xA780, 0xA780, + 0xA782, 0xA782, 0xA784, 0xA784, 0xA786, 0xA786, 0xA78B, 0xA78B, + 0xA78D, 0xA78D, 0xA790, 0xA790, 0xA792, 0xA792, 0xA796, 0xA796, + 0xA798, 0xA798, 0xA79A, 0xA79A, 0xA79C, 0xA79C, 0xA79E, 0xA79E, + 0xA7A0, 0xA7A0, 0xA7A2, 0xA7A2, 0xA7A4, 0xA7A4, 0xA7A6, 0xA7A6, + 0xA7A8, 0xA7A8, 0xA7AA, 0xA7AE, 0xA7B0, 0xA7B4, 0xA7B6, 0xA7B6, + 0xA7B8, 0xA7B8, 0xA7BA, 0xA7BA, 0xA7BC, 0xA7BC, 0xA7BE, 0xA7BE, + 0xA7C0, 0xA7C0, 0xA7C2, 0xA7C2, 0xA7C4, 0xA7C7, 0xA7C9, 0xA7C9, + 0xA7D0, 0xA7D0, 0xA7D6, 0xA7D6, 0xA7D8, 0xA7D8, 0xA7F5, 0xA7F5, + 0xAB70, 0xABBF, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFF21, 0xFF3A, + 0x10400, 0x10427, 0x104B0, 0x104D3, 0x10570, 0x1057A, 0x1057C, 0x1058A, + 0x1058C, 0x10592, 0x10594, 0x10595, 0x10C80, 0x10CB2, 0x118A0, 0x118BF, + 0x16E40, 0x16E5F, 0x1E900, 0x1E921, + // #49 (6017+131): bp=Changes_When_Casemapped:CWCM + 0x0041, 0x005A, 0x0061, 0x007A, 0x00B5, 0x00B5, 0x00C0, 0x00D6, + 0x00D8, 0x00F6, 0x00F8, 0x0137, 0x0139, 0x018C, 0x018E, 0x019A, + 0x019C, 0x01A9, 0x01AC, 0x01B9, 0x01BC, 0x01BD, 0x01BF, 0x01BF, + 0x01C4, 0x0220, 0x0222, 0x0233, 0x023A, 0x0254, 0x0256, 0x0257, + 0x0259, 0x0259, 0x025B, 0x025C, 0x0260, 0x0261, 0x0263, 0x0263, + 0x0265, 0x0266, 0x0268, 0x026C, 0x026F, 0x026F, 0x0271, 0x0272, + 0x0275, 0x0275, 0x027D, 0x027D, 0x0280, 0x0280, 0x0282, 0x0283, + 0x0287, 0x028C, 0x0292, 0x0292, 0x029D, 0x029E, 0x0345, 0x0345, + 0x0370, 0x0373, 0x0376, 0x0377, 0x037B, 0x037D, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, + 0x03A3, 0x03D1, 0x03D5, 0x03F5, 0x03F7, 0x03FB, 0x03FD, 0x0481, + 0x048A, 0x052F, 0x0531, 0x0556, 0x0561, 0x0587, 0x10A0, 0x10C5, + 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, 0x10FD, 0x10FF, + 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0x1C80, 0x1C88, 0x1C90, 0x1CBA, + 0x1CBD, 0x1CBF, 0x1D79, 0x1D79, 0x1D7D, 0x1D7D, 0x1D8E, 0x1D8E, + 0x1E00, 0x1E9B, 0x1E9E, 0x1E9E, 0x1EA0, 0x1F15, 0x1F18, 0x1F1D, + 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, + 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, + 0x1FB6, 0x1FBC, 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, + 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, + 0x1FF6, 0x1FFC, 0x2126, 0x2126, 0x212A, 0x212B, 0x2132, 0x2132, + 0x214E, 0x214E, 0x2160, 0x217F, 0x2183, 0x2184, 0x24B6, 0x24E9, + 0x2C00, 0x2C70, 0x2C72, 0x2C73, 0x2C75, 0x2C76, 0x2C7E, 0x2CE3, + 0x2CEB, 0x2CEE, 0x2CF2, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, + 0x2D2D, 0x2D2D, 0xA640, 0xA66D, 0xA680, 0xA69B, 0xA722, 0xA72F, + 0xA732, 0xA76F, 0xA779, 0xA787, 0xA78B, 0xA78D, 0xA790, 0xA794, + 0xA796, 0xA7AE, 0xA7B0, 0xA7CA, 0xA7D0, 0xA7D1, 0xA7D6, 0xA7D9, + 0xA7F5, 0xA7F6, 0xAB53, 0xAB53, 0xAB70, 0xABBF, 0xFB00, 0xFB06, + 0xFB13, 0xFB17, 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0x10400, 0x1044F, + 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10570, 0x1057A, 0x1057C, 0x1058A, + 0x1058C, 0x10592, 0x10594, 0x10595, 0x10597, 0x105A1, 0x105A3, 0x105B1, + 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, + 0x118A0, 0x118DF, 0x16E40, 0x16E7F, 0x1E900, 0x1E943, + // #50 (6148+609): bp=Changes_When_Lowercased:CWL + 0x0041, 0x005A, 0x00C0, 0x00D6, 0x00D8, 0x00DE, 0x0100, 0x0100, + 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106, 0x0108, 0x0108, + 0x010A, 0x010A, 0x010C, 0x010C, 0x010E, 0x010E, 0x0110, 0x0110, + 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116, 0x0118, 0x0118, + 0x011A, 0x011A, 0x011C, 0x011C, 0x011E, 0x011E, 0x0120, 0x0120, + 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126, 0x0128, 0x0128, + 0x012A, 0x012A, 0x012C, 0x012C, 0x012E, 0x012E, 0x0130, 0x0130, + 0x0132, 0x0132, 0x0134, 0x0134, 0x0136, 0x0136, 0x0139, 0x0139, + 0x013B, 0x013B, 0x013D, 0x013D, 0x013F, 0x013F, 0x0141, 0x0141, + 0x0143, 0x0143, 0x0145, 0x0145, 0x0147, 0x0147, 0x014A, 0x014A, + 0x014C, 0x014C, 0x014E, 0x014E, 0x0150, 0x0150, 0x0152, 0x0152, + 0x0154, 0x0154, 0x0156, 0x0156, 0x0158, 0x0158, 0x015A, 0x015A, + 0x015C, 0x015C, 0x015E, 0x015E, 0x0160, 0x0160, 0x0162, 0x0162, + 0x0164, 0x0164, 0x0166, 0x0166, 0x0168, 0x0168, 0x016A, 0x016A, + 0x016C, 0x016C, 0x016E, 0x016E, 0x0170, 0x0170, 0x0172, 0x0172, + 0x0174, 0x0174, 0x0176, 0x0176, 0x0178, 0x0179, 0x017B, 0x017B, + 0x017D, 0x017D, 0x0181, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187, + 0x0189, 0x018B, 0x018E, 0x0191, 0x0193, 0x0194, 0x0196, 0x0198, + 0x019C, 0x019D, 0x019F, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, + 0x01A6, 0x01A7, 0x01A9, 0x01A9, 0x01AC, 0x01AC, 0x01AE, 0x01AF, + 0x01B1, 0x01B3, 0x01B5, 0x01B5, 0x01B7, 0x01B8, 0x01BC, 0x01BC, + 0x01C4, 0x01C5, 0x01C7, 0x01C8, 0x01CA, 0x01CB, 0x01CD, 0x01CD, + 0x01CF, 0x01CF, 0x01D1, 0x01D1, 0x01D3, 0x01D3, 0x01D5, 0x01D5, + 0x01D7, 0x01D7, 0x01D9, 0x01D9, 0x01DB, 0x01DB, 0x01DE, 0x01DE, + 0x01E0, 0x01E0, 0x01E2, 0x01E2, 0x01E4, 0x01E4, 0x01E6, 0x01E6, + 0x01E8, 0x01E8, 0x01EA, 0x01EA, 0x01EC, 0x01EC, 0x01EE, 0x01EE, + 0x01F1, 0x01F2, 0x01F4, 0x01F4, 0x01F6, 0x01F8, 0x01FA, 0x01FA, + 0x01FC, 0x01FC, 0x01FE, 0x01FE, 0x0200, 0x0200, 0x0202, 0x0202, + 0x0204, 0x0204, 0x0206, 0x0206, 0x0208, 0x0208, 0x020A, 0x020A, + 0x020C, 0x020C, 0x020E, 0x020E, 0x0210, 0x0210, 0x0212, 0x0212, + 0x0214, 0x0214, 0x0216, 0x0216, 0x0218, 0x0218, 0x021A, 0x021A, + 0x021C, 0x021C, 0x021E, 0x021E, 0x0220, 0x0220, 0x0222, 0x0222, + 0x0224, 0x0224, 0x0226, 0x0226, 0x0228, 0x0228, 0x022A, 0x022A, + 0x022C, 0x022C, 0x022E, 0x022E, 0x0230, 0x0230, 0x0232, 0x0232, + 0x023A, 0x023B, 0x023D, 0x023E, 0x0241, 0x0241, 0x0243, 0x0246, + 0x0248, 0x0248, 0x024A, 0x024A, 0x024C, 0x024C, 0x024E, 0x024E, + 0x0370, 0x0370, 0x0372, 0x0372, 0x0376, 0x0376, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x038F, + 0x0391, 0x03A1, 0x03A3, 0x03AB, 0x03CF, 0x03CF, 0x03D8, 0x03D8, + 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, 0x03E0, 0x03E0, + 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, 0x03E8, 0x03E8, + 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, 0x03F4, 0x03F4, + 0x03F7, 0x03F7, 0x03F9, 0x03FA, 0x03FD, 0x042F, 0x0460, 0x0460, + 0x0462, 0x0462, 0x0464, 0x0464, 0x0466, 0x0466, 0x0468, 0x0468, + 0x046A, 0x046A, 0x046C, 0x046C, 0x046E, 0x046E, 0x0470, 0x0470, + 0x0472, 0x0472, 0x0474, 0x0474, 0x0476, 0x0476, 0x0478, 0x0478, + 0x047A, 0x047A, 0x047C, 0x047C, 0x047E, 0x047E, 0x0480, 0x0480, + 0x048A, 0x048A, 0x048C, 0x048C, 0x048E, 0x048E, 0x0490, 0x0490, + 0x0492, 0x0492, 0x0494, 0x0494, 0x0496, 0x0496, 0x0498, 0x0498, + 0x049A, 0x049A, 0x049C, 0x049C, 0x049E, 0x049E, 0x04A0, 0x04A0, + 0x04A2, 0x04A2, 0x04A4, 0x04A4, 0x04A6, 0x04A6, 0x04A8, 0x04A8, + 0x04AA, 0x04AA, 0x04AC, 0x04AC, 0x04AE, 0x04AE, 0x04B0, 0x04B0, + 0x04B2, 0x04B2, 0x04B4, 0x04B4, 0x04B6, 0x04B6, 0x04B8, 0x04B8, + 0x04BA, 0x04BA, 0x04BC, 0x04BC, 0x04BE, 0x04BE, 0x04C0, 0x04C1, + 0x04C3, 0x04C3, 0x04C5, 0x04C5, 0x04C7, 0x04C7, 0x04C9, 0x04C9, + 0x04CB, 0x04CB, 0x04CD, 0x04CD, 0x04D0, 0x04D0, 0x04D2, 0x04D2, + 0x04D4, 0x04D4, 0x04D6, 0x04D6, 0x04D8, 0x04D8, 0x04DA, 0x04DA, + 0x04DC, 0x04DC, 0x04DE, 0x04DE, 0x04E0, 0x04E0, 0x04E2, 0x04E2, + 0x04E4, 0x04E4, 0x04E6, 0x04E6, 0x04E8, 0x04E8, 0x04EA, 0x04EA, + 0x04EC, 0x04EC, 0x04EE, 0x04EE, 0x04F0, 0x04F0, 0x04F2, 0x04F2, + 0x04F4, 0x04F4, 0x04F6, 0x04F6, 0x04F8, 0x04F8, 0x04FA, 0x04FA, + 0x04FC, 0x04FC, 0x04FE, 0x04FE, 0x0500, 0x0500, 0x0502, 0x0502, + 0x0504, 0x0504, 0x0506, 0x0506, 0x0508, 0x0508, 0x050A, 0x050A, + 0x050C, 0x050C, 0x050E, 0x050E, 0x0510, 0x0510, 0x0512, 0x0512, + 0x0514, 0x0514, 0x0516, 0x0516, 0x0518, 0x0518, 0x051A, 0x051A, + 0x051C, 0x051C, 0x051E, 0x051E, 0x0520, 0x0520, 0x0522, 0x0522, + 0x0524, 0x0524, 0x0526, 0x0526, 0x0528, 0x0528, 0x052A, 0x052A, + 0x052C, 0x052C, 0x052E, 0x052E, 0x0531, 0x0556, 0x10A0, 0x10C5, + 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x13A0, 0x13F5, 0x1C90, 0x1CBA, + 0x1CBD, 0x1CBF, 0x1E00, 0x1E00, 0x1E02, 0x1E02, 0x1E04, 0x1E04, + 0x1E06, 0x1E06, 0x1E08, 0x1E08, 0x1E0A, 0x1E0A, 0x1E0C, 0x1E0C, + 0x1E0E, 0x1E0E, 0x1E10, 0x1E10, 0x1E12, 0x1E12, 0x1E14, 0x1E14, + 0x1E16, 0x1E16, 0x1E18, 0x1E18, 0x1E1A, 0x1E1A, 0x1E1C, 0x1E1C, + 0x1E1E, 0x1E1E, 0x1E20, 0x1E20, 0x1E22, 0x1E22, 0x1E24, 0x1E24, + 0x1E26, 0x1E26, 0x1E28, 0x1E28, 0x1E2A, 0x1E2A, 0x1E2C, 0x1E2C, + 0x1E2E, 0x1E2E, 0x1E30, 0x1E30, 0x1E32, 0x1E32, 0x1E34, 0x1E34, + 0x1E36, 0x1E36, 0x1E38, 0x1E38, 0x1E3A, 0x1E3A, 0x1E3C, 0x1E3C, + 0x1E3E, 0x1E3E, 0x1E40, 0x1E40, 0x1E42, 0x1E42, 0x1E44, 0x1E44, + 0x1E46, 0x1E46, 0x1E48, 0x1E48, 0x1E4A, 0x1E4A, 0x1E4C, 0x1E4C, + 0x1E4E, 0x1E4E, 0x1E50, 0x1E50, 0x1E52, 0x1E52, 0x1E54, 0x1E54, + 0x1E56, 0x1E56, 0x1E58, 0x1E58, 0x1E5A, 0x1E5A, 0x1E5C, 0x1E5C, + 0x1E5E, 0x1E5E, 0x1E60, 0x1E60, 0x1E62, 0x1E62, 0x1E64, 0x1E64, + 0x1E66, 0x1E66, 0x1E68, 0x1E68, 0x1E6A, 0x1E6A, 0x1E6C, 0x1E6C, + 0x1E6E, 0x1E6E, 0x1E70, 0x1E70, 0x1E72, 0x1E72, 0x1E74, 0x1E74, + 0x1E76, 0x1E76, 0x1E78, 0x1E78, 0x1E7A, 0x1E7A, 0x1E7C, 0x1E7C, + 0x1E7E, 0x1E7E, 0x1E80, 0x1E80, 0x1E82, 0x1E82, 0x1E84, 0x1E84, + 0x1E86, 0x1E86, 0x1E88, 0x1E88, 0x1E8A, 0x1E8A, 0x1E8C, 0x1E8C, + 0x1E8E, 0x1E8E, 0x1E90, 0x1E90, 0x1E92, 0x1E92, 0x1E94, 0x1E94, + 0x1E9E, 0x1E9E, 0x1EA0, 0x1EA0, 0x1EA2, 0x1EA2, 0x1EA4, 0x1EA4, + 0x1EA6, 0x1EA6, 0x1EA8, 0x1EA8, 0x1EAA, 0x1EAA, 0x1EAC, 0x1EAC, + 0x1EAE, 0x1EAE, 0x1EB0, 0x1EB0, 0x1EB2, 0x1EB2, 0x1EB4, 0x1EB4, + 0x1EB6, 0x1EB6, 0x1EB8, 0x1EB8, 0x1EBA, 0x1EBA, 0x1EBC, 0x1EBC, + 0x1EBE, 0x1EBE, 0x1EC0, 0x1EC0, 0x1EC2, 0x1EC2, 0x1EC4, 0x1EC4, + 0x1EC6, 0x1EC6, 0x1EC8, 0x1EC8, 0x1ECA, 0x1ECA, 0x1ECC, 0x1ECC, + 0x1ECE, 0x1ECE, 0x1ED0, 0x1ED0, 0x1ED2, 0x1ED2, 0x1ED4, 0x1ED4, + 0x1ED6, 0x1ED6, 0x1ED8, 0x1ED8, 0x1EDA, 0x1EDA, 0x1EDC, 0x1EDC, + 0x1EDE, 0x1EDE, 0x1EE0, 0x1EE0, 0x1EE2, 0x1EE2, 0x1EE4, 0x1EE4, + 0x1EE6, 0x1EE6, 0x1EE8, 0x1EE8, 0x1EEA, 0x1EEA, 0x1EEC, 0x1EEC, + 0x1EEE, 0x1EEE, 0x1EF0, 0x1EF0, 0x1EF2, 0x1EF2, 0x1EF4, 0x1EF4, + 0x1EF6, 0x1EF6, 0x1EF8, 0x1EF8, 0x1EFA, 0x1EFA, 0x1EFC, 0x1EFC, + 0x1EFE, 0x1EFE, 0x1F08, 0x1F0F, 0x1F18, 0x1F1D, 0x1F28, 0x1F2F, + 0x1F38, 0x1F3F, 0x1F48, 0x1F4D, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, + 0x1F5D, 0x1F5D, 0x1F5F, 0x1F5F, 0x1F68, 0x1F6F, 0x1F88, 0x1F8F, + 0x1F98, 0x1F9F, 0x1FA8, 0x1FAF, 0x1FB8, 0x1FBC, 0x1FC8, 0x1FCC, + 0x1FD8, 0x1FDB, 0x1FE8, 0x1FEC, 0x1FF8, 0x1FFC, 0x2126, 0x2126, + 0x212A, 0x212B, 0x2132, 0x2132, 0x2160, 0x216F, 0x2183, 0x2183, + 0x24B6, 0x24CF, 0x2C00, 0x2C2F, 0x2C60, 0x2C60, 0x2C62, 0x2C64, + 0x2C67, 0x2C67, 0x2C69, 0x2C69, 0x2C6B, 0x2C6B, 0x2C6D, 0x2C70, + 0x2C72, 0x2C72, 0x2C75, 0x2C75, 0x2C7E, 0x2C80, 0x2C82, 0x2C82, + 0x2C84, 0x2C84, 0x2C86, 0x2C86, 0x2C88, 0x2C88, 0x2C8A, 0x2C8A, + 0x2C8C, 0x2C8C, 0x2C8E, 0x2C8E, 0x2C90, 0x2C90, 0x2C92, 0x2C92, + 0x2C94, 0x2C94, 0x2C96, 0x2C96, 0x2C98, 0x2C98, 0x2C9A, 0x2C9A, + 0x2C9C, 0x2C9C, 0x2C9E, 0x2C9E, 0x2CA0, 0x2CA0, 0x2CA2, 0x2CA2, + 0x2CA4, 0x2CA4, 0x2CA6, 0x2CA6, 0x2CA8, 0x2CA8, 0x2CAA, 0x2CAA, + 0x2CAC, 0x2CAC, 0x2CAE, 0x2CAE, 0x2CB0, 0x2CB0, 0x2CB2, 0x2CB2, + 0x2CB4, 0x2CB4, 0x2CB6, 0x2CB6, 0x2CB8, 0x2CB8, 0x2CBA, 0x2CBA, + 0x2CBC, 0x2CBC, 0x2CBE, 0x2CBE, 0x2CC0, 0x2CC0, 0x2CC2, 0x2CC2, + 0x2CC4, 0x2CC4, 0x2CC6, 0x2CC6, 0x2CC8, 0x2CC8, 0x2CCA, 0x2CCA, + 0x2CCC, 0x2CCC, 0x2CCE, 0x2CCE, 0x2CD0, 0x2CD0, 0x2CD2, 0x2CD2, + 0x2CD4, 0x2CD4, 0x2CD6, 0x2CD6, 0x2CD8, 0x2CD8, 0x2CDA, 0x2CDA, + 0x2CDC, 0x2CDC, 0x2CDE, 0x2CDE, 0x2CE0, 0x2CE0, 0x2CE2, 0x2CE2, + 0x2CEB, 0x2CEB, 0x2CED, 0x2CED, 0x2CF2, 0x2CF2, 0xA640, 0xA640, + 0xA642, 0xA642, 0xA644, 0xA644, 0xA646, 0xA646, 0xA648, 0xA648, + 0xA64A, 0xA64A, 0xA64C, 0xA64C, 0xA64E, 0xA64E, 0xA650, 0xA650, + 0xA652, 0xA652, 0xA654, 0xA654, 0xA656, 0xA656, 0xA658, 0xA658, + 0xA65A, 0xA65A, 0xA65C, 0xA65C, 0xA65E, 0xA65E, 0xA660, 0xA660, + 0xA662, 0xA662, 0xA664, 0xA664, 0xA666, 0xA666, 0xA668, 0xA668, + 0xA66A, 0xA66A, 0xA66C, 0xA66C, 0xA680, 0xA680, 0xA682, 0xA682, + 0xA684, 0xA684, 0xA686, 0xA686, 0xA688, 0xA688, 0xA68A, 0xA68A, + 0xA68C, 0xA68C, 0xA68E, 0xA68E, 0xA690, 0xA690, 0xA692, 0xA692, + 0xA694, 0xA694, 0xA696, 0xA696, 0xA698, 0xA698, 0xA69A, 0xA69A, + 0xA722, 0xA722, 0xA724, 0xA724, 0xA726, 0xA726, 0xA728, 0xA728, + 0xA72A, 0xA72A, 0xA72C, 0xA72C, 0xA72E, 0xA72E, 0xA732, 0xA732, + 0xA734, 0xA734, 0xA736, 0xA736, 0xA738, 0xA738, 0xA73A, 0xA73A, + 0xA73C, 0xA73C, 0xA73E, 0xA73E, 0xA740, 0xA740, 0xA742, 0xA742, + 0xA744, 0xA744, 0xA746, 0xA746, 0xA748, 0xA748, 0xA74A, 0xA74A, + 0xA74C, 0xA74C, 0xA74E, 0xA74E, 0xA750, 0xA750, 0xA752, 0xA752, + 0xA754, 0xA754, 0xA756, 0xA756, 0xA758, 0xA758, 0xA75A, 0xA75A, + 0xA75C, 0xA75C, 0xA75E, 0xA75E, 0xA760, 0xA760, 0xA762, 0xA762, + 0xA764, 0xA764, 0xA766, 0xA766, 0xA768, 0xA768, 0xA76A, 0xA76A, + 0xA76C, 0xA76C, 0xA76E, 0xA76E, 0xA779, 0xA779, 0xA77B, 0xA77B, + 0xA77D, 0xA77E, 0xA780, 0xA780, 0xA782, 0xA782, 0xA784, 0xA784, + 0xA786, 0xA786, 0xA78B, 0xA78B, 0xA78D, 0xA78D, 0xA790, 0xA790, + 0xA792, 0xA792, 0xA796, 0xA796, 0xA798, 0xA798, 0xA79A, 0xA79A, + 0xA79C, 0xA79C, 0xA79E, 0xA79E, 0xA7A0, 0xA7A0, 0xA7A2, 0xA7A2, + 0xA7A4, 0xA7A4, 0xA7A6, 0xA7A6, 0xA7A8, 0xA7A8, 0xA7AA, 0xA7AE, + 0xA7B0, 0xA7B4, 0xA7B6, 0xA7B6, 0xA7B8, 0xA7B8, 0xA7BA, 0xA7BA, + 0xA7BC, 0xA7BC, 0xA7BE, 0xA7BE, 0xA7C0, 0xA7C0, 0xA7C2, 0xA7C2, + 0xA7C4, 0xA7C7, 0xA7C9, 0xA7C9, 0xA7D0, 0xA7D0, 0xA7D6, 0xA7D6, + 0xA7D8, 0xA7D8, 0xA7F5, 0xA7F5, 0xFF21, 0xFF3A, 0x10400, 0x10427, + 0x104B0, 0x104D3, 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, + 0x10594, 0x10595, 0x10C80, 0x10CB2, 0x118A0, 0x118BF, 0x16E40, 0x16E5F, + 0x1E900, 0x1E921, + // #51 (6757+838): bp=Changes_When_NFKC_Casefolded:CWKCF + 0x0041, 0x005A, 0x00A0, 0x00A0, 0x00A8, 0x00A8, 0x00AA, 0x00AA, + 0x00AD, 0x00AD, 0x00AF, 0x00AF, 0x00B2, 0x00B5, 0x00B8, 0x00BA, + 0x00BC, 0x00BE, 0x00C0, 0x00D6, 0x00D8, 0x00DF, 0x0100, 0x0100, + 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106, 0x0108, 0x0108, + 0x010A, 0x010A, 0x010C, 0x010C, 0x010E, 0x010E, 0x0110, 0x0110, + 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116, 0x0118, 0x0118, + 0x011A, 0x011A, 0x011C, 0x011C, 0x011E, 0x011E, 0x0120, 0x0120, + 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126, 0x0128, 0x0128, + 0x012A, 0x012A, 0x012C, 0x012C, 0x012E, 0x012E, 0x0130, 0x0130, + 0x0132, 0x0134, 0x0136, 0x0136, 0x0139, 0x0139, 0x013B, 0x013B, + 0x013D, 0x013D, 0x013F, 0x0141, 0x0143, 0x0143, 0x0145, 0x0145, + 0x0147, 0x0147, 0x0149, 0x014A, 0x014C, 0x014C, 0x014E, 0x014E, + 0x0150, 0x0150, 0x0152, 0x0152, 0x0154, 0x0154, 0x0156, 0x0156, + 0x0158, 0x0158, 0x015A, 0x015A, 0x015C, 0x015C, 0x015E, 0x015E, + 0x0160, 0x0160, 0x0162, 0x0162, 0x0164, 0x0164, 0x0166, 0x0166, + 0x0168, 0x0168, 0x016A, 0x016A, 0x016C, 0x016C, 0x016E, 0x016E, + 0x0170, 0x0170, 0x0172, 0x0172, 0x0174, 0x0174, 0x0176, 0x0176, + 0x0178, 0x0179, 0x017B, 0x017B, 0x017D, 0x017D, 0x017F, 0x017F, + 0x0181, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187, 0x0189, 0x018B, + 0x018E, 0x0191, 0x0193, 0x0194, 0x0196, 0x0198, 0x019C, 0x019D, + 0x019F, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, 0x01A6, 0x01A7, + 0x01A9, 0x01A9, 0x01AC, 0x01AC, 0x01AE, 0x01AF, 0x01B1, 0x01B3, + 0x01B5, 0x01B5, 0x01B7, 0x01B8, 0x01BC, 0x01BC, 0x01C4, 0x01CD, + 0x01CF, 0x01CF, 0x01D1, 0x01D1, 0x01D3, 0x01D3, 0x01D5, 0x01D5, + 0x01D7, 0x01D7, 0x01D9, 0x01D9, 0x01DB, 0x01DB, 0x01DE, 0x01DE, + 0x01E0, 0x01E0, 0x01E2, 0x01E2, 0x01E4, 0x01E4, 0x01E6, 0x01E6, + 0x01E8, 0x01E8, 0x01EA, 0x01EA, 0x01EC, 0x01EC, 0x01EE, 0x01EE, + 0x01F1, 0x01F4, 0x01F6, 0x01F8, 0x01FA, 0x01FA, 0x01FC, 0x01FC, + 0x01FE, 0x01FE, 0x0200, 0x0200, 0x0202, 0x0202, 0x0204, 0x0204, + 0x0206, 0x0206, 0x0208, 0x0208, 0x020A, 0x020A, 0x020C, 0x020C, + 0x020E, 0x020E, 0x0210, 0x0210, 0x0212, 0x0212, 0x0214, 0x0214, + 0x0216, 0x0216, 0x0218, 0x0218, 0x021A, 0x021A, 0x021C, 0x021C, + 0x021E, 0x021E, 0x0220, 0x0220, 0x0222, 0x0222, 0x0224, 0x0224, + 0x0226, 0x0226, 0x0228, 0x0228, 0x022A, 0x022A, 0x022C, 0x022C, + 0x022E, 0x022E, 0x0230, 0x0230, 0x0232, 0x0232, 0x023A, 0x023B, + 0x023D, 0x023E, 0x0241, 0x0241, 0x0243, 0x0246, 0x0248, 0x0248, + 0x024A, 0x024A, 0x024C, 0x024C, 0x024E, 0x024E, 0x02B0, 0x02B8, + 0x02D8, 0x02DD, 0x02E0, 0x02E4, 0x0340, 0x0341, 0x0343, 0x0345, + 0x034F, 0x034F, 0x0370, 0x0370, 0x0372, 0x0372, 0x0374, 0x0374, + 0x0376, 0x0376, 0x037A, 0x037A, 0x037E, 0x037F, 0x0384, 0x038A, + 0x038C, 0x038C, 0x038E, 0x038F, 0x0391, 0x03A1, 0x03A3, 0x03AB, + 0x03C2, 0x03C2, 0x03CF, 0x03D6, 0x03D8, 0x03D8, 0x03DA, 0x03DA, + 0x03DC, 0x03DC, 0x03DE, 0x03DE, 0x03E0, 0x03E0, 0x03E2, 0x03E2, + 0x03E4, 0x03E4, 0x03E6, 0x03E6, 0x03E8, 0x03E8, 0x03EA, 0x03EA, + 0x03EC, 0x03EC, 0x03EE, 0x03EE, 0x03F0, 0x03F2, 0x03F4, 0x03F5, + 0x03F7, 0x03F7, 0x03F9, 0x03FA, 0x03FD, 0x042F, 0x0460, 0x0460, + 0x0462, 0x0462, 0x0464, 0x0464, 0x0466, 0x0466, 0x0468, 0x0468, + 0x046A, 0x046A, 0x046C, 0x046C, 0x046E, 0x046E, 0x0470, 0x0470, + 0x0472, 0x0472, 0x0474, 0x0474, 0x0476, 0x0476, 0x0478, 0x0478, + 0x047A, 0x047A, 0x047C, 0x047C, 0x047E, 0x047E, 0x0480, 0x0480, + 0x048A, 0x048A, 0x048C, 0x048C, 0x048E, 0x048E, 0x0490, 0x0490, + 0x0492, 0x0492, 0x0494, 0x0494, 0x0496, 0x0496, 0x0498, 0x0498, + 0x049A, 0x049A, 0x049C, 0x049C, 0x049E, 0x049E, 0x04A0, 0x04A0, + 0x04A2, 0x04A2, 0x04A4, 0x04A4, 0x04A6, 0x04A6, 0x04A8, 0x04A8, + 0x04AA, 0x04AA, 0x04AC, 0x04AC, 0x04AE, 0x04AE, 0x04B0, 0x04B0, + 0x04B2, 0x04B2, 0x04B4, 0x04B4, 0x04B6, 0x04B6, 0x04B8, 0x04B8, + 0x04BA, 0x04BA, 0x04BC, 0x04BC, 0x04BE, 0x04BE, 0x04C0, 0x04C1, + 0x04C3, 0x04C3, 0x04C5, 0x04C5, 0x04C7, 0x04C7, 0x04C9, 0x04C9, + 0x04CB, 0x04CB, 0x04CD, 0x04CD, 0x04D0, 0x04D0, 0x04D2, 0x04D2, + 0x04D4, 0x04D4, 0x04D6, 0x04D6, 0x04D8, 0x04D8, 0x04DA, 0x04DA, + 0x04DC, 0x04DC, 0x04DE, 0x04DE, 0x04E0, 0x04E0, 0x04E2, 0x04E2, + 0x04E4, 0x04E4, 0x04E6, 0x04E6, 0x04E8, 0x04E8, 0x04EA, 0x04EA, + 0x04EC, 0x04EC, 0x04EE, 0x04EE, 0x04F0, 0x04F0, 0x04F2, 0x04F2, + 0x04F4, 0x04F4, 0x04F6, 0x04F6, 0x04F8, 0x04F8, 0x04FA, 0x04FA, + 0x04FC, 0x04FC, 0x04FE, 0x04FE, 0x0500, 0x0500, 0x0502, 0x0502, + 0x0504, 0x0504, 0x0506, 0x0506, 0x0508, 0x0508, 0x050A, 0x050A, + 0x050C, 0x050C, 0x050E, 0x050E, 0x0510, 0x0510, 0x0512, 0x0512, + 0x0514, 0x0514, 0x0516, 0x0516, 0x0518, 0x0518, 0x051A, 0x051A, + 0x051C, 0x051C, 0x051E, 0x051E, 0x0520, 0x0520, 0x0522, 0x0522, + 0x0524, 0x0524, 0x0526, 0x0526, 0x0528, 0x0528, 0x052A, 0x052A, + 0x052C, 0x052C, 0x052E, 0x052E, 0x0531, 0x0556, 0x0587, 0x0587, + 0x061C, 0x061C, 0x0675, 0x0678, 0x0958, 0x095F, 0x09DC, 0x09DD, + 0x09DF, 0x09DF, 0x0A33, 0x0A33, 0x0A36, 0x0A36, 0x0A59, 0x0A5B, + 0x0A5E, 0x0A5E, 0x0B5C, 0x0B5D, 0x0E33, 0x0E33, 0x0EB3, 0x0EB3, + 0x0EDC, 0x0EDD, 0x0F0C, 0x0F0C, 0x0F43, 0x0F43, 0x0F4D, 0x0F4D, + 0x0F52, 0x0F52, 0x0F57, 0x0F57, 0x0F5C, 0x0F5C, 0x0F69, 0x0F69, + 0x0F73, 0x0F73, 0x0F75, 0x0F79, 0x0F81, 0x0F81, 0x0F93, 0x0F93, + 0x0F9D, 0x0F9D, 0x0FA2, 0x0FA2, 0x0FA7, 0x0FA7, 0x0FAC, 0x0FAC, + 0x0FB9, 0x0FB9, 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, + 0x10FC, 0x10FC, 0x115F, 0x1160, 0x13F8, 0x13FD, 0x17B4, 0x17B5, + 0x180B, 0x180F, 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, + 0x1D2C, 0x1D2E, 0x1D30, 0x1D3A, 0x1D3C, 0x1D4D, 0x1D4F, 0x1D6A, + 0x1D78, 0x1D78, 0x1D9B, 0x1DBF, 0x1E00, 0x1E00, 0x1E02, 0x1E02, + 0x1E04, 0x1E04, 0x1E06, 0x1E06, 0x1E08, 0x1E08, 0x1E0A, 0x1E0A, + 0x1E0C, 0x1E0C, 0x1E0E, 0x1E0E, 0x1E10, 0x1E10, 0x1E12, 0x1E12, + 0x1E14, 0x1E14, 0x1E16, 0x1E16, 0x1E18, 0x1E18, 0x1E1A, 0x1E1A, + 0x1E1C, 0x1E1C, 0x1E1E, 0x1E1E, 0x1E20, 0x1E20, 0x1E22, 0x1E22, + 0x1E24, 0x1E24, 0x1E26, 0x1E26, 0x1E28, 0x1E28, 0x1E2A, 0x1E2A, + 0x1E2C, 0x1E2C, 0x1E2E, 0x1E2E, 0x1E30, 0x1E30, 0x1E32, 0x1E32, + 0x1E34, 0x1E34, 0x1E36, 0x1E36, 0x1E38, 0x1E38, 0x1E3A, 0x1E3A, + 0x1E3C, 0x1E3C, 0x1E3E, 0x1E3E, 0x1E40, 0x1E40, 0x1E42, 0x1E42, + 0x1E44, 0x1E44, 0x1E46, 0x1E46, 0x1E48, 0x1E48, 0x1E4A, 0x1E4A, + 0x1E4C, 0x1E4C, 0x1E4E, 0x1E4E, 0x1E50, 0x1E50, 0x1E52, 0x1E52, + 0x1E54, 0x1E54, 0x1E56, 0x1E56, 0x1E58, 0x1E58, 0x1E5A, 0x1E5A, + 0x1E5C, 0x1E5C, 0x1E5E, 0x1E5E, 0x1E60, 0x1E60, 0x1E62, 0x1E62, + 0x1E64, 0x1E64, 0x1E66, 0x1E66, 0x1E68, 0x1E68, 0x1E6A, 0x1E6A, + 0x1E6C, 0x1E6C, 0x1E6E, 0x1E6E, 0x1E70, 0x1E70, 0x1E72, 0x1E72, + 0x1E74, 0x1E74, 0x1E76, 0x1E76, 0x1E78, 0x1E78, 0x1E7A, 0x1E7A, + 0x1E7C, 0x1E7C, 0x1E7E, 0x1E7E, 0x1E80, 0x1E80, 0x1E82, 0x1E82, + 0x1E84, 0x1E84, 0x1E86, 0x1E86, 0x1E88, 0x1E88, 0x1E8A, 0x1E8A, + 0x1E8C, 0x1E8C, 0x1E8E, 0x1E8E, 0x1E90, 0x1E90, 0x1E92, 0x1E92, + 0x1E94, 0x1E94, 0x1E9A, 0x1E9B, 0x1E9E, 0x1E9E, 0x1EA0, 0x1EA0, + 0x1EA2, 0x1EA2, 0x1EA4, 0x1EA4, 0x1EA6, 0x1EA6, 0x1EA8, 0x1EA8, + 0x1EAA, 0x1EAA, 0x1EAC, 0x1EAC, 0x1EAE, 0x1EAE, 0x1EB0, 0x1EB0, + 0x1EB2, 0x1EB2, 0x1EB4, 0x1EB4, 0x1EB6, 0x1EB6, 0x1EB8, 0x1EB8, + 0x1EBA, 0x1EBA, 0x1EBC, 0x1EBC, 0x1EBE, 0x1EBE, 0x1EC0, 0x1EC0, + 0x1EC2, 0x1EC2, 0x1EC4, 0x1EC4, 0x1EC6, 0x1EC6, 0x1EC8, 0x1EC8, + 0x1ECA, 0x1ECA, 0x1ECC, 0x1ECC, 0x1ECE, 0x1ECE, 0x1ED0, 0x1ED0, + 0x1ED2, 0x1ED2, 0x1ED4, 0x1ED4, 0x1ED6, 0x1ED6, 0x1ED8, 0x1ED8, + 0x1EDA, 0x1EDA, 0x1EDC, 0x1EDC, 0x1EDE, 0x1EDE, 0x1EE0, 0x1EE0, + 0x1EE2, 0x1EE2, 0x1EE4, 0x1EE4, 0x1EE6, 0x1EE6, 0x1EE8, 0x1EE8, + 0x1EEA, 0x1EEA, 0x1EEC, 0x1EEC, 0x1EEE, 0x1EEE, 0x1EF0, 0x1EF0, + 0x1EF2, 0x1EF2, 0x1EF4, 0x1EF4, 0x1EF6, 0x1EF6, 0x1EF8, 0x1EF8, + 0x1EFA, 0x1EFA, 0x1EFC, 0x1EFC, 0x1EFE, 0x1EFE, 0x1F08, 0x1F0F, + 0x1F18, 0x1F1D, 0x1F28, 0x1F2F, 0x1F38, 0x1F3F, 0x1F48, 0x1F4D, + 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F5F, + 0x1F68, 0x1F6F, 0x1F71, 0x1F71, 0x1F73, 0x1F73, 0x1F75, 0x1F75, + 0x1F77, 0x1F77, 0x1F79, 0x1F79, 0x1F7B, 0x1F7B, 0x1F7D, 0x1F7D, + 0x1F80, 0x1FAF, 0x1FB2, 0x1FB4, 0x1FB7, 0x1FC4, 0x1FC7, 0x1FCF, + 0x1FD3, 0x1FD3, 0x1FD8, 0x1FDB, 0x1FDD, 0x1FDF, 0x1FE3, 0x1FE3, + 0x1FE8, 0x1FEF, 0x1FF2, 0x1FF4, 0x1FF7, 0x1FFE, 0x2000, 0x200F, + 0x2011, 0x2011, 0x2017, 0x2017, 0x2024, 0x2026, 0x202A, 0x202F, + 0x2033, 0x2034, 0x2036, 0x2037, 0x203C, 0x203C, 0x203E, 0x203E, + 0x2047, 0x2049, 0x2057, 0x2057, 0x205F, 0x2071, 0x2074, 0x208E, + 0x2090, 0x209C, 0x20A8, 0x20A8, 0x2100, 0x2103, 0x2105, 0x2107, + 0x2109, 0x2113, 0x2115, 0x2116, 0x2119, 0x211D, 0x2120, 0x2122, + 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x212D, + 0x212F, 0x2139, 0x213B, 0x2140, 0x2145, 0x2149, 0x2150, 0x217F, + 0x2183, 0x2183, 0x2189, 0x2189, 0x222C, 0x222D, 0x222F, 0x2230, + 0x2329, 0x232A, 0x2460, 0x24EA, 0x2A0C, 0x2A0C, 0x2A74, 0x2A76, + 0x2ADC, 0x2ADC, 0x2C00, 0x2C2F, 0x2C60, 0x2C60, 0x2C62, 0x2C64, + 0x2C67, 0x2C67, 0x2C69, 0x2C69, 0x2C6B, 0x2C6B, 0x2C6D, 0x2C70, + 0x2C72, 0x2C72, 0x2C75, 0x2C75, 0x2C7C, 0x2C80, 0x2C82, 0x2C82, + 0x2C84, 0x2C84, 0x2C86, 0x2C86, 0x2C88, 0x2C88, 0x2C8A, 0x2C8A, + 0x2C8C, 0x2C8C, 0x2C8E, 0x2C8E, 0x2C90, 0x2C90, 0x2C92, 0x2C92, + 0x2C94, 0x2C94, 0x2C96, 0x2C96, 0x2C98, 0x2C98, 0x2C9A, 0x2C9A, + 0x2C9C, 0x2C9C, 0x2C9E, 0x2C9E, 0x2CA0, 0x2CA0, 0x2CA2, 0x2CA2, + 0x2CA4, 0x2CA4, 0x2CA6, 0x2CA6, 0x2CA8, 0x2CA8, 0x2CAA, 0x2CAA, + 0x2CAC, 0x2CAC, 0x2CAE, 0x2CAE, 0x2CB0, 0x2CB0, 0x2CB2, 0x2CB2, + 0x2CB4, 0x2CB4, 0x2CB6, 0x2CB6, 0x2CB8, 0x2CB8, 0x2CBA, 0x2CBA, + 0x2CBC, 0x2CBC, 0x2CBE, 0x2CBE, 0x2CC0, 0x2CC0, 0x2CC2, 0x2CC2, + 0x2CC4, 0x2CC4, 0x2CC6, 0x2CC6, 0x2CC8, 0x2CC8, 0x2CCA, 0x2CCA, + 0x2CCC, 0x2CCC, 0x2CCE, 0x2CCE, 0x2CD0, 0x2CD0, 0x2CD2, 0x2CD2, + 0x2CD4, 0x2CD4, 0x2CD6, 0x2CD6, 0x2CD8, 0x2CD8, 0x2CDA, 0x2CDA, + 0x2CDC, 0x2CDC, 0x2CDE, 0x2CDE, 0x2CE0, 0x2CE0, 0x2CE2, 0x2CE2, + 0x2CEB, 0x2CEB, 0x2CED, 0x2CED, 0x2CF2, 0x2CF2, 0x2D6F, 0x2D6F, + 0x2E9F, 0x2E9F, 0x2EF3, 0x2EF3, 0x2F00, 0x2FD5, 0x3000, 0x3000, + 0x3036, 0x3036, 0x3038, 0x303A, 0x309B, 0x309C, 0x309F, 0x309F, + 0x30FF, 0x30FF, 0x3131, 0x318E, 0x3192, 0x319F, 0x3200, 0x321E, + 0x3220, 0x3247, 0x3250, 0x327E, 0x3280, 0x33FF, 0xA640, 0xA640, + 0xA642, 0xA642, 0xA644, 0xA644, 0xA646, 0xA646, 0xA648, 0xA648, + 0xA64A, 0xA64A, 0xA64C, 0xA64C, 0xA64E, 0xA64E, 0xA650, 0xA650, + 0xA652, 0xA652, 0xA654, 0xA654, 0xA656, 0xA656, 0xA658, 0xA658, + 0xA65A, 0xA65A, 0xA65C, 0xA65C, 0xA65E, 0xA65E, 0xA660, 0xA660, + 0xA662, 0xA662, 0xA664, 0xA664, 0xA666, 0xA666, 0xA668, 0xA668, + 0xA66A, 0xA66A, 0xA66C, 0xA66C, 0xA680, 0xA680, 0xA682, 0xA682, + 0xA684, 0xA684, 0xA686, 0xA686, 0xA688, 0xA688, 0xA68A, 0xA68A, + 0xA68C, 0xA68C, 0xA68E, 0xA68E, 0xA690, 0xA690, 0xA692, 0xA692, + 0xA694, 0xA694, 0xA696, 0xA696, 0xA698, 0xA698, 0xA69A, 0xA69A, + 0xA69C, 0xA69D, 0xA722, 0xA722, 0xA724, 0xA724, 0xA726, 0xA726, + 0xA728, 0xA728, 0xA72A, 0xA72A, 0xA72C, 0xA72C, 0xA72E, 0xA72E, + 0xA732, 0xA732, 0xA734, 0xA734, 0xA736, 0xA736, 0xA738, 0xA738, + 0xA73A, 0xA73A, 0xA73C, 0xA73C, 0xA73E, 0xA73E, 0xA740, 0xA740, + 0xA742, 0xA742, 0xA744, 0xA744, 0xA746, 0xA746, 0xA748, 0xA748, + 0xA74A, 0xA74A, 0xA74C, 0xA74C, 0xA74E, 0xA74E, 0xA750, 0xA750, + 0xA752, 0xA752, 0xA754, 0xA754, 0xA756, 0xA756, 0xA758, 0xA758, + 0xA75A, 0xA75A, 0xA75C, 0xA75C, 0xA75E, 0xA75E, 0xA760, 0xA760, + 0xA762, 0xA762, 0xA764, 0xA764, 0xA766, 0xA766, 0xA768, 0xA768, + 0xA76A, 0xA76A, 0xA76C, 0xA76C, 0xA76E, 0xA76E, 0xA770, 0xA770, + 0xA779, 0xA779, 0xA77B, 0xA77B, 0xA77D, 0xA77E, 0xA780, 0xA780, + 0xA782, 0xA782, 0xA784, 0xA784, 0xA786, 0xA786, 0xA78B, 0xA78B, + 0xA78D, 0xA78D, 0xA790, 0xA790, 0xA792, 0xA792, 0xA796, 0xA796, + 0xA798, 0xA798, 0xA79A, 0xA79A, 0xA79C, 0xA79C, 0xA79E, 0xA79E, + 0xA7A0, 0xA7A0, 0xA7A2, 0xA7A2, 0xA7A4, 0xA7A4, 0xA7A6, 0xA7A6, + 0xA7A8, 0xA7A8, 0xA7AA, 0xA7AE, 0xA7B0, 0xA7B4, 0xA7B6, 0xA7B6, + 0xA7B8, 0xA7B8, 0xA7BA, 0xA7BA, 0xA7BC, 0xA7BC, 0xA7BE, 0xA7BE, + 0xA7C0, 0xA7C0, 0xA7C2, 0xA7C2, 0xA7C4, 0xA7C7, 0xA7C9, 0xA7C9, + 0xA7D0, 0xA7D0, 0xA7D6, 0xA7D6, 0xA7D8, 0xA7D8, 0xA7F2, 0xA7F5, + 0xA7F8, 0xA7F9, 0xAB5C, 0xAB5F, 0xAB69, 0xAB69, 0xAB70, 0xABBF, + 0xF900, 0xFA0D, 0xFA10, 0xFA10, 0xFA12, 0xFA12, 0xFA15, 0xFA1E, + 0xFA20, 0xFA20, 0xFA22, 0xFA22, 0xFA25, 0xFA26, 0xFA2A, 0xFA6D, + 0xFA70, 0xFAD9, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFB1D, 0xFB1D, + 0xFB1F, 0xFB36, 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, + 0xFB43, 0xFB44, 0xFB46, 0xFBB1, 0xFBD3, 0xFD3D, 0xFD50, 0xFD8F, + 0xFD92, 0xFDC7, 0xFDF0, 0xFDFC, 0xFE00, 0xFE19, 0xFE30, 0xFE44, + 0xFE47, 0xFE52, 0xFE54, 0xFE66, 0xFE68, 0xFE6B, 0xFE70, 0xFE72, + 0xFE74, 0xFE74, 0xFE76, 0xFEFC, 0xFEFF, 0xFEFF, 0xFF01, 0xFFBE, + 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, + 0xFFE0, 0xFFE6, 0xFFE8, 0xFFEE, 0xFFF0, 0xFFF8, 0x10400, 0x10427, + 0x104B0, 0x104D3, 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, + 0x10594, 0x10595, 0x10781, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, + 0x10C80, 0x10CB2, 0x118A0, 0x118BF, 0x16E40, 0x16E5F, 0x1BCA0, 0x1BCA3, + 0x1D15E, 0x1D164, 0x1D173, 0x1D17A, 0x1D1BB, 0x1D1C0, 0x1D400, 0x1D454, + 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, + 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, + 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, + 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, + 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D7CB, 0x1D7CE, 0x1D7FF, + 0x1E900, 0x1E921, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, + 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, + 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, + 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, + 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, + 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, + 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, + 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1F100, 0x1F10A, 0x1F110, 0x1F12E, + 0x1F130, 0x1F14F, 0x1F16A, 0x1F16C, 0x1F190, 0x1F190, 0x1F200, 0x1F202, + 0x1F210, 0x1F23B, 0x1F240, 0x1F248, 0x1F250, 0x1F251, 0x1FBF0, 0x1FBF9, + 0x2F800, 0x2FA1D, 0xE0000, 0xE0FFF, + // #52 (7595+626): bp=Changes_When_Titlecased:CWT + 0x0061, 0x007A, 0x00B5, 0x00B5, 0x00DF, 0x00F6, 0x00F8, 0x00FF, + 0x0101, 0x0101, 0x0103, 0x0103, 0x0105, 0x0105, 0x0107, 0x0107, + 0x0109, 0x0109, 0x010B, 0x010B, 0x010D, 0x010D, 0x010F, 0x010F, + 0x0111, 0x0111, 0x0113, 0x0113, 0x0115, 0x0115, 0x0117, 0x0117, + 0x0119, 0x0119, 0x011B, 0x011B, 0x011D, 0x011D, 0x011F, 0x011F, + 0x0121, 0x0121, 0x0123, 0x0123, 0x0125, 0x0125, 0x0127, 0x0127, + 0x0129, 0x0129, 0x012B, 0x012B, 0x012D, 0x012D, 0x012F, 0x012F, + 0x0131, 0x0131, 0x0133, 0x0133, 0x0135, 0x0135, 0x0137, 0x0137, + 0x013A, 0x013A, 0x013C, 0x013C, 0x013E, 0x013E, 0x0140, 0x0140, + 0x0142, 0x0142, 0x0144, 0x0144, 0x0146, 0x0146, 0x0148, 0x0149, + 0x014B, 0x014B, 0x014D, 0x014D, 0x014F, 0x014F, 0x0151, 0x0151, + 0x0153, 0x0153, 0x0155, 0x0155, 0x0157, 0x0157, 0x0159, 0x0159, + 0x015B, 0x015B, 0x015D, 0x015D, 0x015F, 0x015F, 0x0161, 0x0161, + 0x0163, 0x0163, 0x0165, 0x0165, 0x0167, 0x0167, 0x0169, 0x0169, + 0x016B, 0x016B, 0x016D, 0x016D, 0x016F, 0x016F, 0x0171, 0x0171, + 0x0173, 0x0173, 0x0175, 0x0175, 0x0177, 0x0177, 0x017A, 0x017A, + 0x017C, 0x017C, 0x017E, 0x0180, 0x0183, 0x0183, 0x0185, 0x0185, + 0x0188, 0x0188, 0x018C, 0x018C, 0x0192, 0x0192, 0x0195, 0x0195, + 0x0199, 0x019A, 0x019E, 0x019E, 0x01A1, 0x01A1, 0x01A3, 0x01A3, + 0x01A5, 0x01A5, 0x01A8, 0x01A8, 0x01AD, 0x01AD, 0x01B0, 0x01B0, + 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x01B9, 0x01B9, 0x01BD, 0x01BD, + 0x01BF, 0x01BF, 0x01C4, 0x01C4, 0x01C6, 0x01C7, 0x01C9, 0x01CA, + 0x01CC, 0x01CC, 0x01CE, 0x01CE, 0x01D0, 0x01D0, 0x01D2, 0x01D2, + 0x01D4, 0x01D4, 0x01D6, 0x01D6, 0x01D8, 0x01D8, 0x01DA, 0x01DA, + 0x01DC, 0x01DD, 0x01DF, 0x01DF, 0x01E1, 0x01E1, 0x01E3, 0x01E3, + 0x01E5, 0x01E5, 0x01E7, 0x01E7, 0x01E9, 0x01E9, 0x01EB, 0x01EB, + 0x01ED, 0x01ED, 0x01EF, 0x01F1, 0x01F3, 0x01F3, 0x01F5, 0x01F5, + 0x01F9, 0x01F9, 0x01FB, 0x01FB, 0x01FD, 0x01FD, 0x01FF, 0x01FF, + 0x0201, 0x0201, 0x0203, 0x0203, 0x0205, 0x0205, 0x0207, 0x0207, + 0x0209, 0x0209, 0x020B, 0x020B, 0x020D, 0x020D, 0x020F, 0x020F, + 0x0211, 0x0211, 0x0213, 0x0213, 0x0215, 0x0215, 0x0217, 0x0217, + 0x0219, 0x0219, 0x021B, 0x021B, 0x021D, 0x021D, 0x021F, 0x021F, + 0x0223, 0x0223, 0x0225, 0x0225, 0x0227, 0x0227, 0x0229, 0x0229, + 0x022B, 0x022B, 0x022D, 0x022D, 0x022F, 0x022F, 0x0231, 0x0231, + 0x0233, 0x0233, 0x023C, 0x023C, 0x023F, 0x0240, 0x0242, 0x0242, + 0x0247, 0x0247, 0x0249, 0x0249, 0x024B, 0x024B, 0x024D, 0x024D, + 0x024F, 0x0254, 0x0256, 0x0257, 0x0259, 0x0259, 0x025B, 0x025C, + 0x0260, 0x0261, 0x0263, 0x0263, 0x0265, 0x0266, 0x0268, 0x026C, + 0x026F, 0x026F, 0x0271, 0x0272, 0x0275, 0x0275, 0x027D, 0x027D, + 0x0280, 0x0280, 0x0282, 0x0283, 0x0287, 0x028C, 0x0292, 0x0292, + 0x029D, 0x029E, 0x0345, 0x0345, 0x0371, 0x0371, 0x0373, 0x0373, + 0x0377, 0x0377, 0x037B, 0x037D, 0x0390, 0x0390, 0x03AC, 0x03CE, + 0x03D0, 0x03D1, 0x03D5, 0x03D7, 0x03D9, 0x03D9, 0x03DB, 0x03DB, + 0x03DD, 0x03DD, 0x03DF, 0x03DF, 0x03E1, 0x03E1, 0x03E3, 0x03E3, + 0x03E5, 0x03E5, 0x03E7, 0x03E7, 0x03E9, 0x03E9, 0x03EB, 0x03EB, + 0x03ED, 0x03ED, 0x03EF, 0x03F3, 0x03F5, 0x03F5, 0x03F8, 0x03F8, + 0x03FB, 0x03FB, 0x0430, 0x045F, 0x0461, 0x0461, 0x0463, 0x0463, + 0x0465, 0x0465, 0x0467, 0x0467, 0x0469, 0x0469, 0x046B, 0x046B, + 0x046D, 0x046D, 0x046F, 0x046F, 0x0471, 0x0471, 0x0473, 0x0473, + 0x0475, 0x0475, 0x0477, 0x0477, 0x0479, 0x0479, 0x047B, 0x047B, + 0x047D, 0x047D, 0x047F, 0x047F, 0x0481, 0x0481, 0x048B, 0x048B, + 0x048D, 0x048D, 0x048F, 0x048F, 0x0491, 0x0491, 0x0493, 0x0493, + 0x0495, 0x0495, 0x0497, 0x0497, 0x0499, 0x0499, 0x049B, 0x049B, + 0x049D, 0x049D, 0x049F, 0x049F, 0x04A1, 0x04A1, 0x04A3, 0x04A3, + 0x04A5, 0x04A5, 0x04A7, 0x04A7, 0x04A9, 0x04A9, 0x04AB, 0x04AB, + 0x04AD, 0x04AD, 0x04AF, 0x04AF, 0x04B1, 0x04B1, 0x04B3, 0x04B3, + 0x04B5, 0x04B5, 0x04B7, 0x04B7, 0x04B9, 0x04B9, 0x04BB, 0x04BB, + 0x04BD, 0x04BD, 0x04BF, 0x04BF, 0x04C2, 0x04C2, 0x04C4, 0x04C4, + 0x04C6, 0x04C6, 0x04C8, 0x04C8, 0x04CA, 0x04CA, 0x04CC, 0x04CC, + 0x04CE, 0x04CF, 0x04D1, 0x04D1, 0x04D3, 0x04D3, 0x04D5, 0x04D5, + 0x04D7, 0x04D7, 0x04D9, 0x04D9, 0x04DB, 0x04DB, 0x04DD, 0x04DD, + 0x04DF, 0x04DF, 0x04E1, 0x04E1, 0x04E3, 0x04E3, 0x04E5, 0x04E5, + 0x04E7, 0x04E7, 0x04E9, 0x04E9, 0x04EB, 0x04EB, 0x04ED, 0x04ED, + 0x04EF, 0x04EF, 0x04F1, 0x04F1, 0x04F3, 0x04F3, 0x04F5, 0x04F5, + 0x04F7, 0x04F7, 0x04F9, 0x04F9, 0x04FB, 0x04FB, 0x04FD, 0x04FD, + 0x04FF, 0x04FF, 0x0501, 0x0501, 0x0503, 0x0503, 0x0505, 0x0505, + 0x0507, 0x0507, 0x0509, 0x0509, 0x050B, 0x050B, 0x050D, 0x050D, + 0x050F, 0x050F, 0x0511, 0x0511, 0x0513, 0x0513, 0x0515, 0x0515, + 0x0517, 0x0517, 0x0519, 0x0519, 0x051B, 0x051B, 0x051D, 0x051D, + 0x051F, 0x051F, 0x0521, 0x0521, 0x0523, 0x0523, 0x0525, 0x0525, + 0x0527, 0x0527, 0x0529, 0x0529, 0x052B, 0x052B, 0x052D, 0x052D, + 0x052F, 0x052F, 0x0561, 0x0587, 0x13F8, 0x13FD, 0x1C80, 0x1C88, + 0x1D79, 0x1D79, 0x1D7D, 0x1D7D, 0x1D8E, 0x1D8E, 0x1E01, 0x1E01, + 0x1E03, 0x1E03, 0x1E05, 0x1E05, 0x1E07, 0x1E07, 0x1E09, 0x1E09, + 0x1E0B, 0x1E0B, 0x1E0D, 0x1E0D, 0x1E0F, 0x1E0F, 0x1E11, 0x1E11, + 0x1E13, 0x1E13, 0x1E15, 0x1E15, 0x1E17, 0x1E17, 0x1E19, 0x1E19, + 0x1E1B, 0x1E1B, 0x1E1D, 0x1E1D, 0x1E1F, 0x1E1F, 0x1E21, 0x1E21, + 0x1E23, 0x1E23, 0x1E25, 0x1E25, 0x1E27, 0x1E27, 0x1E29, 0x1E29, + 0x1E2B, 0x1E2B, 0x1E2D, 0x1E2D, 0x1E2F, 0x1E2F, 0x1E31, 0x1E31, + 0x1E33, 0x1E33, 0x1E35, 0x1E35, 0x1E37, 0x1E37, 0x1E39, 0x1E39, + 0x1E3B, 0x1E3B, 0x1E3D, 0x1E3D, 0x1E3F, 0x1E3F, 0x1E41, 0x1E41, + 0x1E43, 0x1E43, 0x1E45, 0x1E45, 0x1E47, 0x1E47, 0x1E49, 0x1E49, + 0x1E4B, 0x1E4B, 0x1E4D, 0x1E4D, 0x1E4F, 0x1E4F, 0x1E51, 0x1E51, + 0x1E53, 0x1E53, 0x1E55, 0x1E55, 0x1E57, 0x1E57, 0x1E59, 0x1E59, + 0x1E5B, 0x1E5B, 0x1E5D, 0x1E5D, 0x1E5F, 0x1E5F, 0x1E61, 0x1E61, + 0x1E63, 0x1E63, 0x1E65, 0x1E65, 0x1E67, 0x1E67, 0x1E69, 0x1E69, + 0x1E6B, 0x1E6B, 0x1E6D, 0x1E6D, 0x1E6F, 0x1E6F, 0x1E71, 0x1E71, + 0x1E73, 0x1E73, 0x1E75, 0x1E75, 0x1E77, 0x1E77, 0x1E79, 0x1E79, + 0x1E7B, 0x1E7B, 0x1E7D, 0x1E7D, 0x1E7F, 0x1E7F, 0x1E81, 0x1E81, + 0x1E83, 0x1E83, 0x1E85, 0x1E85, 0x1E87, 0x1E87, 0x1E89, 0x1E89, + 0x1E8B, 0x1E8B, 0x1E8D, 0x1E8D, 0x1E8F, 0x1E8F, 0x1E91, 0x1E91, + 0x1E93, 0x1E93, 0x1E95, 0x1E9B, 0x1EA1, 0x1EA1, 0x1EA3, 0x1EA3, + 0x1EA5, 0x1EA5, 0x1EA7, 0x1EA7, 0x1EA9, 0x1EA9, 0x1EAB, 0x1EAB, + 0x1EAD, 0x1EAD, 0x1EAF, 0x1EAF, 0x1EB1, 0x1EB1, 0x1EB3, 0x1EB3, + 0x1EB5, 0x1EB5, 0x1EB7, 0x1EB7, 0x1EB9, 0x1EB9, 0x1EBB, 0x1EBB, + 0x1EBD, 0x1EBD, 0x1EBF, 0x1EBF, 0x1EC1, 0x1EC1, 0x1EC3, 0x1EC3, + 0x1EC5, 0x1EC5, 0x1EC7, 0x1EC7, 0x1EC9, 0x1EC9, 0x1ECB, 0x1ECB, + 0x1ECD, 0x1ECD, 0x1ECF, 0x1ECF, 0x1ED1, 0x1ED1, 0x1ED3, 0x1ED3, + 0x1ED5, 0x1ED5, 0x1ED7, 0x1ED7, 0x1ED9, 0x1ED9, 0x1EDB, 0x1EDB, + 0x1EDD, 0x1EDD, 0x1EDF, 0x1EDF, 0x1EE1, 0x1EE1, 0x1EE3, 0x1EE3, + 0x1EE5, 0x1EE5, 0x1EE7, 0x1EE7, 0x1EE9, 0x1EE9, 0x1EEB, 0x1EEB, + 0x1EED, 0x1EED, 0x1EEF, 0x1EEF, 0x1EF1, 0x1EF1, 0x1EF3, 0x1EF3, + 0x1EF5, 0x1EF5, 0x1EF7, 0x1EF7, 0x1EF9, 0x1EF9, 0x1EFB, 0x1EFB, + 0x1EFD, 0x1EFD, 0x1EFF, 0x1F07, 0x1F10, 0x1F15, 0x1F20, 0x1F27, + 0x1F30, 0x1F37, 0x1F40, 0x1F45, 0x1F50, 0x1F57, 0x1F60, 0x1F67, + 0x1F70, 0x1F7D, 0x1F80, 0x1F87, 0x1F90, 0x1F97, 0x1FA0, 0x1FA7, + 0x1FB0, 0x1FB4, 0x1FB6, 0x1FB7, 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, + 0x1FC6, 0x1FC7, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FD7, 0x1FE0, 0x1FE7, + 0x1FF2, 0x1FF4, 0x1FF6, 0x1FF7, 0x214E, 0x214E, 0x2170, 0x217F, + 0x2184, 0x2184, 0x24D0, 0x24E9, 0x2C30, 0x2C5F, 0x2C61, 0x2C61, + 0x2C65, 0x2C66, 0x2C68, 0x2C68, 0x2C6A, 0x2C6A, 0x2C6C, 0x2C6C, + 0x2C73, 0x2C73, 0x2C76, 0x2C76, 0x2C81, 0x2C81, 0x2C83, 0x2C83, + 0x2C85, 0x2C85, 0x2C87, 0x2C87, 0x2C89, 0x2C89, 0x2C8B, 0x2C8B, + 0x2C8D, 0x2C8D, 0x2C8F, 0x2C8F, 0x2C91, 0x2C91, 0x2C93, 0x2C93, + 0x2C95, 0x2C95, 0x2C97, 0x2C97, 0x2C99, 0x2C99, 0x2C9B, 0x2C9B, + 0x2C9D, 0x2C9D, 0x2C9F, 0x2C9F, 0x2CA1, 0x2CA1, 0x2CA3, 0x2CA3, + 0x2CA5, 0x2CA5, 0x2CA7, 0x2CA7, 0x2CA9, 0x2CA9, 0x2CAB, 0x2CAB, + 0x2CAD, 0x2CAD, 0x2CAF, 0x2CAF, 0x2CB1, 0x2CB1, 0x2CB3, 0x2CB3, + 0x2CB5, 0x2CB5, 0x2CB7, 0x2CB7, 0x2CB9, 0x2CB9, 0x2CBB, 0x2CBB, + 0x2CBD, 0x2CBD, 0x2CBF, 0x2CBF, 0x2CC1, 0x2CC1, 0x2CC3, 0x2CC3, + 0x2CC5, 0x2CC5, 0x2CC7, 0x2CC7, 0x2CC9, 0x2CC9, 0x2CCB, 0x2CCB, + 0x2CCD, 0x2CCD, 0x2CCF, 0x2CCF, 0x2CD1, 0x2CD1, 0x2CD3, 0x2CD3, + 0x2CD5, 0x2CD5, 0x2CD7, 0x2CD7, 0x2CD9, 0x2CD9, 0x2CDB, 0x2CDB, + 0x2CDD, 0x2CDD, 0x2CDF, 0x2CDF, 0x2CE1, 0x2CE1, 0x2CE3, 0x2CE3, + 0x2CEC, 0x2CEC, 0x2CEE, 0x2CEE, 0x2CF3, 0x2CF3, 0x2D00, 0x2D25, + 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, 0xA641, 0xA641, 0xA643, 0xA643, + 0xA645, 0xA645, 0xA647, 0xA647, 0xA649, 0xA649, 0xA64B, 0xA64B, + 0xA64D, 0xA64D, 0xA64F, 0xA64F, 0xA651, 0xA651, 0xA653, 0xA653, + 0xA655, 0xA655, 0xA657, 0xA657, 0xA659, 0xA659, 0xA65B, 0xA65B, + 0xA65D, 0xA65D, 0xA65F, 0xA65F, 0xA661, 0xA661, 0xA663, 0xA663, + 0xA665, 0xA665, 0xA667, 0xA667, 0xA669, 0xA669, 0xA66B, 0xA66B, + 0xA66D, 0xA66D, 0xA681, 0xA681, 0xA683, 0xA683, 0xA685, 0xA685, + 0xA687, 0xA687, 0xA689, 0xA689, 0xA68B, 0xA68B, 0xA68D, 0xA68D, + 0xA68F, 0xA68F, 0xA691, 0xA691, 0xA693, 0xA693, 0xA695, 0xA695, + 0xA697, 0xA697, 0xA699, 0xA699, 0xA69B, 0xA69B, 0xA723, 0xA723, + 0xA725, 0xA725, 0xA727, 0xA727, 0xA729, 0xA729, 0xA72B, 0xA72B, + 0xA72D, 0xA72D, 0xA72F, 0xA72F, 0xA733, 0xA733, 0xA735, 0xA735, + 0xA737, 0xA737, 0xA739, 0xA739, 0xA73B, 0xA73B, 0xA73D, 0xA73D, + 0xA73F, 0xA73F, 0xA741, 0xA741, 0xA743, 0xA743, 0xA745, 0xA745, + 0xA747, 0xA747, 0xA749, 0xA749, 0xA74B, 0xA74B, 0xA74D, 0xA74D, + 0xA74F, 0xA74F, 0xA751, 0xA751, 0xA753, 0xA753, 0xA755, 0xA755, + 0xA757, 0xA757, 0xA759, 0xA759, 0xA75B, 0xA75B, 0xA75D, 0xA75D, + 0xA75F, 0xA75F, 0xA761, 0xA761, 0xA763, 0xA763, 0xA765, 0xA765, + 0xA767, 0xA767, 0xA769, 0xA769, 0xA76B, 0xA76B, 0xA76D, 0xA76D, + 0xA76F, 0xA76F, 0xA77A, 0xA77A, 0xA77C, 0xA77C, 0xA77F, 0xA77F, + 0xA781, 0xA781, 0xA783, 0xA783, 0xA785, 0xA785, 0xA787, 0xA787, + 0xA78C, 0xA78C, 0xA791, 0xA791, 0xA793, 0xA794, 0xA797, 0xA797, + 0xA799, 0xA799, 0xA79B, 0xA79B, 0xA79D, 0xA79D, 0xA79F, 0xA79F, + 0xA7A1, 0xA7A1, 0xA7A3, 0xA7A3, 0xA7A5, 0xA7A5, 0xA7A7, 0xA7A7, + 0xA7A9, 0xA7A9, 0xA7B5, 0xA7B5, 0xA7B7, 0xA7B7, 0xA7B9, 0xA7B9, + 0xA7BB, 0xA7BB, 0xA7BD, 0xA7BD, 0xA7BF, 0xA7BF, 0xA7C1, 0xA7C1, + 0xA7C3, 0xA7C3, 0xA7C8, 0xA7C8, 0xA7CA, 0xA7CA, 0xA7D1, 0xA7D1, + 0xA7D7, 0xA7D7, 0xA7D9, 0xA7D9, 0xA7F6, 0xA7F6, 0xAB53, 0xAB53, + 0xAB70, 0xABBF, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFF41, 0xFF5A, + 0x10428, 0x1044F, 0x104D8, 0x104FB, 0x10597, 0x105A1, 0x105A3, 0x105B1, + 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10CC0, 0x10CF2, 0x118C0, 0x118DF, + 0x16E60, 0x16E7F, 0x1E922, 0x1E943, + // #53 (8221+627): bp=Changes_When_Uppercased:CWU + 0x0061, 0x007A, 0x00B5, 0x00B5, 0x00DF, 0x00F6, 0x00F8, 0x00FF, + 0x0101, 0x0101, 0x0103, 0x0103, 0x0105, 0x0105, 0x0107, 0x0107, + 0x0109, 0x0109, 0x010B, 0x010B, 0x010D, 0x010D, 0x010F, 0x010F, + 0x0111, 0x0111, 0x0113, 0x0113, 0x0115, 0x0115, 0x0117, 0x0117, + 0x0119, 0x0119, 0x011B, 0x011B, 0x011D, 0x011D, 0x011F, 0x011F, + 0x0121, 0x0121, 0x0123, 0x0123, 0x0125, 0x0125, 0x0127, 0x0127, + 0x0129, 0x0129, 0x012B, 0x012B, 0x012D, 0x012D, 0x012F, 0x012F, + 0x0131, 0x0131, 0x0133, 0x0133, 0x0135, 0x0135, 0x0137, 0x0137, + 0x013A, 0x013A, 0x013C, 0x013C, 0x013E, 0x013E, 0x0140, 0x0140, + 0x0142, 0x0142, 0x0144, 0x0144, 0x0146, 0x0146, 0x0148, 0x0149, + 0x014B, 0x014B, 0x014D, 0x014D, 0x014F, 0x014F, 0x0151, 0x0151, + 0x0153, 0x0153, 0x0155, 0x0155, 0x0157, 0x0157, 0x0159, 0x0159, + 0x015B, 0x015B, 0x015D, 0x015D, 0x015F, 0x015F, 0x0161, 0x0161, + 0x0163, 0x0163, 0x0165, 0x0165, 0x0167, 0x0167, 0x0169, 0x0169, + 0x016B, 0x016B, 0x016D, 0x016D, 0x016F, 0x016F, 0x0171, 0x0171, + 0x0173, 0x0173, 0x0175, 0x0175, 0x0177, 0x0177, 0x017A, 0x017A, + 0x017C, 0x017C, 0x017E, 0x0180, 0x0183, 0x0183, 0x0185, 0x0185, + 0x0188, 0x0188, 0x018C, 0x018C, 0x0192, 0x0192, 0x0195, 0x0195, + 0x0199, 0x019A, 0x019E, 0x019E, 0x01A1, 0x01A1, 0x01A3, 0x01A3, + 0x01A5, 0x01A5, 0x01A8, 0x01A8, 0x01AD, 0x01AD, 0x01B0, 0x01B0, + 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x01B9, 0x01B9, 0x01BD, 0x01BD, + 0x01BF, 0x01BF, 0x01C5, 0x01C6, 0x01C8, 0x01C9, 0x01CB, 0x01CC, + 0x01CE, 0x01CE, 0x01D0, 0x01D0, 0x01D2, 0x01D2, 0x01D4, 0x01D4, + 0x01D6, 0x01D6, 0x01D8, 0x01D8, 0x01DA, 0x01DA, 0x01DC, 0x01DD, + 0x01DF, 0x01DF, 0x01E1, 0x01E1, 0x01E3, 0x01E3, 0x01E5, 0x01E5, + 0x01E7, 0x01E7, 0x01E9, 0x01E9, 0x01EB, 0x01EB, 0x01ED, 0x01ED, + 0x01EF, 0x01F0, 0x01F2, 0x01F3, 0x01F5, 0x01F5, 0x01F9, 0x01F9, + 0x01FB, 0x01FB, 0x01FD, 0x01FD, 0x01FF, 0x01FF, 0x0201, 0x0201, + 0x0203, 0x0203, 0x0205, 0x0205, 0x0207, 0x0207, 0x0209, 0x0209, + 0x020B, 0x020B, 0x020D, 0x020D, 0x020F, 0x020F, 0x0211, 0x0211, + 0x0213, 0x0213, 0x0215, 0x0215, 0x0217, 0x0217, 0x0219, 0x0219, + 0x021B, 0x021B, 0x021D, 0x021D, 0x021F, 0x021F, 0x0223, 0x0223, + 0x0225, 0x0225, 0x0227, 0x0227, 0x0229, 0x0229, 0x022B, 0x022B, + 0x022D, 0x022D, 0x022F, 0x022F, 0x0231, 0x0231, 0x0233, 0x0233, + 0x023C, 0x023C, 0x023F, 0x0240, 0x0242, 0x0242, 0x0247, 0x0247, + 0x0249, 0x0249, 0x024B, 0x024B, 0x024D, 0x024D, 0x024F, 0x0254, + 0x0256, 0x0257, 0x0259, 0x0259, 0x025B, 0x025C, 0x0260, 0x0261, + 0x0263, 0x0263, 0x0265, 0x0266, 0x0268, 0x026C, 0x026F, 0x026F, + 0x0271, 0x0272, 0x0275, 0x0275, 0x027D, 0x027D, 0x0280, 0x0280, + 0x0282, 0x0283, 0x0287, 0x028C, 0x0292, 0x0292, 0x029D, 0x029E, + 0x0345, 0x0345, 0x0371, 0x0371, 0x0373, 0x0373, 0x0377, 0x0377, + 0x037B, 0x037D, 0x0390, 0x0390, 0x03AC, 0x03CE, 0x03D0, 0x03D1, + 0x03D5, 0x03D7, 0x03D9, 0x03D9, 0x03DB, 0x03DB, 0x03DD, 0x03DD, + 0x03DF, 0x03DF, 0x03E1, 0x03E1, 0x03E3, 0x03E3, 0x03E5, 0x03E5, + 0x03E7, 0x03E7, 0x03E9, 0x03E9, 0x03EB, 0x03EB, 0x03ED, 0x03ED, + 0x03EF, 0x03F3, 0x03F5, 0x03F5, 0x03F8, 0x03F8, 0x03FB, 0x03FB, + 0x0430, 0x045F, 0x0461, 0x0461, 0x0463, 0x0463, 0x0465, 0x0465, + 0x0467, 0x0467, 0x0469, 0x0469, 0x046B, 0x046B, 0x046D, 0x046D, + 0x046F, 0x046F, 0x0471, 0x0471, 0x0473, 0x0473, 0x0475, 0x0475, + 0x0477, 0x0477, 0x0479, 0x0479, 0x047B, 0x047B, 0x047D, 0x047D, + 0x047F, 0x047F, 0x0481, 0x0481, 0x048B, 0x048B, 0x048D, 0x048D, + 0x048F, 0x048F, 0x0491, 0x0491, 0x0493, 0x0493, 0x0495, 0x0495, + 0x0497, 0x0497, 0x0499, 0x0499, 0x049B, 0x049B, 0x049D, 0x049D, + 0x049F, 0x049F, 0x04A1, 0x04A1, 0x04A3, 0x04A3, 0x04A5, 0x04A5, + 0x04A7, 0x04A7, 0x04A9, 0x04A9, 0x04AB, 0x04AB, 0x04AD, 0x04AD, + 0x04AF, 0x04AF, 0x04B1, 0x04B1, 0x04B3, 0x04B3, 0x04B5, 0x04B5, + 0x04B7, 0x04B7, 0x04B9, 0x04B9, 0x04BB, 0x04BB, 0x04BD, 0x04BD, + 0x04BF, 0x04BF, 0x04C2, 0x04C2, 0x04C4, 0x04C4, 0x04C6, 0x04C6, + 0x04C8, 0x04C8, 0x04CA, 0x04CA, 0x04CC, 0x04CC, 0x04CE, 0x04CF, + 0x04D1, 0x04D1, 0x04D3, 0x04D3, 0x04D5, 0x04D5, 0x04D7, 0x04D7, + 0x04D9, 0x04D9, 0x04DB, 0x04DB, 0x04DD, 0x04DD, 0x04DF, 0x04DF, + 0x04E1, 0x04E1, 0x04E3, 0x04E3, 0x04E5, 0x04E5, 0x04E7, 0x04E7, + 0x04E9, 0x04E9, 0x04EB, 0x04EB, 0x04ED, 0x04ED, 0x04EF, 0x04EF, + 0x04F1, 0x04F1, 0x04F3, 0x04F3, 0x04F5, 0x04F5, 0x04F7, 0x04F7, + 0x04F9, 0x04F9, 0x04FB, 0x04FB, 0x04FD, 0x04FD, 0x04FF, 0x04FF, + 0x0501, 0x0501, 0x0503, 0x0503, 0x0505, 0x0505, 0x0507, 0x0507, + 0x0509, 0x0509, 0x050B, 0x050B, 0x050D, 0x050D, 0x050F, 0x050F, + 0x0511, 0x0511, 0x0513, 0x0513, 0x0515, 0x0515, 0x0517, 0x0517, + 0x0519, 0x0519, 0x051B, 0x051B, 0x051D, 0x051D, 0x051F, 0x051F, + 0x0521, 0x0521, 0x0523, 0x0523, 0x0525, 0x0525, 0x0527, 0x0527, + 0x0529, 0x0529, 0x052B, 0x052B, 0x052D, 0x052D, 0x052F, 0x052F, + 0x0561, 0x0587, 0x10D0, 0x10FA, 0x10FD, 0x10FF, 0x13F8, 0x13FD, + 0x1C80, 0x1C88, 0x1D79, 0x1D79, 0x1D7D, 0x1D7D, 0x1D8E, 0x1D8E, + 0x1E01, 0x1E01, 0x1E03, 0x1E03, 0x1E05, 0x1E05, 0x1E07, 0x1E07, + 0x1E09, 0x1E09, 0x1E0B, 0x1E0B, 0x1E0D, 0x1E0D, 0x1E0F, 0x1E0F, + 0x1E11, 0x1E11, 0x1E13, 0x1E13, 0x1E15, 0x1E15, 0x1E17, 0x1E17, + 0x1E19, 0x1E19, 0x1E1B, 0x1E1B, 0x1E1D, 0x1E1D, 0x1E1F, 0x1E1F, + 0x1E21, 0x1E21, 0x1E23, 0x1E23, 0x1E25, 0x1E25, 0x1E27, 0x1E27, + 0x1E29, 0x1E29, 0x1E2B, 0x1E2B, 0x1E2D, 0x1E2D, 0x1E2F, 0x1E2F, + 0x1E31, 0x1E31, 0x1E33, 0x1E33, 0x1E35, 0x1E35, 0x1E37, 0x1E37, + 0x1E39, 0x1E39, 0x1E3B, 0x1E3B, 0x1E3D, 0x1E3D, 0x1E3F, 0x1E3F, + 0x1E41, 0x1E41, 0x1E43, 0x1E43, 0x1E45, 0x1E45, 0x1E47, 0x1E47, + 0x1E49, 0x1E49, 0x1E4B, 0x1E4B, 0x1E4D, 0x1E4D, 0x1E4F, 0x1E4F, + 0x1E51, 0x1E51, 0x1E53, 0x1E53, 0x1E55, 0x1E55, 0x1E57, 0x1E57, + 0x1E59, 0x1E59, 0x1E5B, 0x1E5B, 0x1E5D, 0x1E5D, 0x1E5F, 0x1E5F, + 0x1E61, 0x1E61, 0x1E63, 0x1E63, 0x1E65, 0x1E65, 0x1E67, 0x1E67, + 0x1E69, 0x1E69, 0x1E6B, 0x1E6B, 0x1E6D, 0x1E6D, 0x1E6F, 0x1E6F, + 0x1E71, 0x1E71, 0x1E73, 0x1E73, 0x1E75, 0x1E75, 0x1E77, 0x1E77, + 0x1E79, 0x1E79, 0x1E7B, 0x1E7B, 0x1E7D, 0x1E7D, 0x1E7F, 0x1E7F, + 0x1E81, 0x1E81, 0x1E83, 0x1E83, 0x1E85, 0x1E85, 0x1E87, 0x1E87, + 0x1E89, 0x1E89, 0x1E8B, 0x1E8B, 0x1E8D, 0x1E8D, 0x1E8F, 0x1E8F, + 0x1E91, 0x1E91, 0x1E93, 0x1E93, 0x1E95, 0x1E9B, 0x1EA1, 0x1EA1, + 0x1EA3, 0x1EA3, 0x1EA5, 0x1EA5, 0x1EA7, 0x1EA7, 0x1EA9, 0x1EA9, + 0x1EAB, 0x1EAB, 0x1EAD, 0x1EAD, 0x1EAF, 0x1EAF, 0x1EB1, 0x1EB1, + 0x1EB3, 0x1EB3, 0x1EB5, 0x1EB5, 0x1EB7, 0x1EB7, 0x1EB9, 0x1EB9, + 0x1EBB, 0x1EBB, 0x1EBD, 0x1EBD, 0x1EBF, 0x1EBF, 0x1EC1, 0x1EC1, + 0x1EC3, 0x1EC3, 0x1EC5, 0x1EC5, 0x1EC7, 0x1EC7, 0x1EC9, 0x1EC9, + 0x1ECB, 0x1ECB, 0x1ECD, 0x1ECD, 0x1ECF, 0x1ECF, 0x1ED1, 0x1ED1, + 0x1ED3, 0x1ED3, 0x1ED5, 0x1ED5, 0x1ED7, 0x1ED7, 0x1ED9, 0x1ED9, + 0x1EDB, 0x1EDB, 0x1EDD, 0x1EDD, 0x1EDF, 0x1EDF, 0x1EE1, 0x1EE1, + 0x1EE3, 0x1EE3, 0x1EE5, 0x1EE5, 0x1EE7, 0x1EE7, 0x1EE9, 0x1EE9, + 0x1EEB, 0x1EEB, 0x1EED, 0x1EED, 0x1EEF, 0x1EEF, 0x1EF1, 0x1EF1, + 0x1EF3, 0x1EF3, 0x1EF5, 0x1EF5, 0x1EF7, 0x1EF7, 0x1EF9, 0x1EF9, + 0x1EFB, 0x1EFB, 0x1EFD, 0x1EFD, 0x1EFF, 0x1F07, 0x1F10, 0x1F15, + 0x1F20, 0x1F27, 0x1F30, 0x1F37, 0x1F40, 0x1F45, 0x1F50, 0x1F57, + 0x1F60, 0x1F67, 0x1F70, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FB7, + 0x1FBC, 0x1FBC, 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FC7, + 0x1FCC, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FD7, 0x1FE0, 0x1FE7, + 0x1FF2, 0x1FF4, 0x1FF6, 0x1FF7, 0x1FFC, 0x1FFC, 0x214E, 0x214E, + 0x2170, 0x217F, 0x2184, 0x2184, 0x24D0, 0x24E9, 0x2C30, 0x2C5F, + 0x2C61, 0x2C61, 0x2C65, 0x2C66, 0x2C68, 0x2C68, 0x2C6A, 0x2C6A, + 0x2C6C, 0x2C6C, 0x2C73, 0x2C73, 0x2C76, 0x2C76, 0x2C81, 0x2C81, + 0x2C83, 0x2C83, 0x2C85, 0x2C85, 0x2C87, 0x2C87, 0x2C89, 0x2C89, + 0x2C8B, 0x2C8B, 0x2C8D, 0x2C8D, 0x2C8F, 0x2C8F, 0x2C91, 0x2C91, + 0x2C93, 0x2C93, 0x2C95, 0x2C95, 0x2C97, 0x2C97, 0x2C99, 0x2C99, + 0x2C9B, 0x2C9B, 0x2C9D, 0x2C9D, 0x2C9F, 0x2C9F, 0x2CA1, 0x2CA1, + 0x2CA3, 0x2CA3, 0x2CA5, 0x2CA5, 0x2CA7, 0x2CA7, 0x2CA9, 0x2CA9, + 0x2CAB, 0x2CAB, 0x2CAD, 0x2CAD, 0x2CAF, 0x2CAF, 0x2CB1, 0x2CB1, + 0x2CB3, 0x2CB3, 0x2CB5, 0x2CB5, 0x2CB7, 0x2CB7, 0x2CB9, 0x2CB9, + 0x2CBB, 0x2CBB, 0x2CBD, 0x2CBD, 0x2CBF, 0x2CBF, 0x2CC1, 0x2CC1, + 0x2CC3, 0x2CC3, 0x2CC5, 0x2CC5, 0x2CC7, 0x2CC7, 0x2CC9, 0x2CC9, + 0x2CCB, 0x2CCB, 0x2CCD, 0x2CCD, 0x2CCF, 0x2CCF, 0x2CD1, 0x2CD1, + 0x2CD3, 0x2CD3, 0x2CD5, 0x2CD5, 0x2CD7, 0x2CD7, 0x2CD9, 0x2CD9, + 0x2CDB, 0x2CDB, 0x2CDD, 0x2CDD, 0x2CDF, 0x2CDF, 0x2CE1, 0x2CE1, + 0x2CE3, 0x2CE3, 0x2CEC, 0x2CEC, 0x2CEE, 0x2CEE, 0x2CF3, 0x2CF3, + 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, 0xA641, 0xA641, + 0xA643, 0xA643, 0xA645, 0xA645, 0xA647, 0xA647, 0xA649, 0xA649, + 0xA64B, 0xA64B, 0xA64D, 0xA64D, 0xA64F, 0xA64F, 0xA651, 0xA651, + 0xA653, 0xA653, 0xA655, 0xA655, 0xA657, 0xA657, 0xA659, 0xA659, + 0xA65B, 0xA65B, 0xA65D, 0xA65D, 0xA65F, 0xA65F, 0xA661, 0xA661, + 0xA663, 0xA663, 0xA665, 0xA665, 0xA667, 0xA667, 0xA669, 0xA669, + 0xA66B, 0xA66B, 0xA66D, 0xA66D, 0xA681, 0xA681, 0xA683, 0xA683, + 0xA685, 0xA685, 0xA687, 0xA687, 0xA689, 0xA689, 0xA68B, 0xA68B, + 0xA68D, 0xA68D, 0xA68F, 0xA68F, 0xA691, 0xA691, 0xA693, 0xA693, + 0xA695, 0xA695, 0xA697, 0xA697, 0xA699, 0xA699, 0xA69B, 0xA69B, + 0xA723, 0xA723, 0xA725, 0xA725, 0xA727, 0xA727, 0xA729, 0xA729, + 0xA72B, 0xA72B, 0xA72D, 0xA72D, 0xA72F, 0xA72F, 0xA733, 0xA733, + 0xA735, 0xA735, 0xA737, 0xA737, 0xA739, 0xA739, 0xA73B, 0xA73B, + 0xA73D, 0xA73D, 0xA73F, 0xA73F, 0xA741, 0xA741, 0xA743, 0xA743, + 0xA745, 0xA745, 0xA747, 0xA747, 0xA749, 0xA749, 0xA74B, 0xA74B, + 0xA74D, 0xA74D, 0xA74F, 0xA74F, 0xA751, 0xA751, 0xA753, 0xA753, + 0xA755, 0xA755, 0xA757, 0xA757, 0xA759, 0xA759, 0xA75B, 0xA75B, + 0xA75D, 0xA75D, 0xA75F, 0xA75F, 0xA761, 0xA761, 0xA763, 0xA763, + 0xA765, 0xA765, 0xA767, 0xA767, 0xA769, 0xA769, 0xA76B, 0xA76B, + 0xA76D, 0xA76D, 0xA76F, 0xA76F, 0xA77A, 0xA77A, 0xA77C, 0xA77C, + 0xA77F, 0xA77F, 0xA781, 0xA781, 0xA783, 0xA783, 0xA785, 0xA785, + 0xA787, 0xA787, 0xA78C, 0xA78C, 0xA791, 0xA791, 0xA793, 0xA794, + 0xA797, 0xA797, 0xA799, 0xA799, 0xA79B, 0xA79B, 0xA79D, 0xA79D, + 0xA79F, 0xA79F, 0xA7A1, 0xA7A1, 0xA7A3, 0xA7A3, 0xA7A5, 0xA7A5, + 0xA7A7, 0xA7A7, 0xA7A9, 0xA7A9, 0xA7B5, 0xA7B5, 0xA7B7, 0xA7B7, + 0xA7B9, 0xA7B9, 0xA7BB, 0xA7BB, 0xA7BD, 0xA7BD, 0xA7BF, 0xA7BF, + 0xA7C1, 0xA7C1, 0xA7C3, 0xA7C3, 0xA7C8, 0xA7C8, 0xA7CA, 0xA7CA, + 0xA7D1, 0xA7D1, 0xA7D7, 0xA7D7, 0xA7D9, 0xA7D9, 0xA7F6, 0xA7F6, + 0xAB53, 0xAB53, 0xAB70, 0xABBF, 0xFB00, 0xFB06, 0xFB13, 0xFB17, + 0xFF41, 0xFF5A, 0x10428, 0x1044F, 0x104D8, 0x104FB, 0x10597, 0x105A1, + 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10CC0, 0x10CF2, + 0x118C0, 0x118DF, 0x16E60, 0x16E7F, 0x1E922, 0x1E943, + // #54 (8848+23): bp=Dash + 0x002D, 0x002D, 0x058A, 0x058A, 0x05BE, 0x05BE, 0x1400, 0x1400, + 0x1806, 0x1806, 0x2010, 0x2015, 0x2053, 0x2053, 0x207B, 0x207B, + 0x208B, 0x208B, 0x2212, 0x2212, 0x2E17, 0x2E17, 0x2E1A, 0x2E1A, + 0x2E3A, 0x2E3B, 0x2E40, 0x2E40, 0x2E5D, 0x2E5D, 0x301C, 0x301C, + 0x3030, 0x3030, 0x30A0, 0x30A0, 0xFE31, 0xFE32, 0xFE58, 0xFE58, + 0xFE63, 0xFE63, 0xFF0D, 0xFF0D, 0x10EAD, 0x10EAD, + // #55 (8871+17): bp=Default_Ignorable_Code_Point:DI + 0x00AD, 0x00AD, 0x034F, 0x034F, 0x061C, 0x061C, 0x115F, 0x1160, + 0x17B4, 0x17B5, 0x180B, 0x180F, 0x200B, 0x200F, 0x202A, 0x202E, + 0x2060, 0x206F, 0x3164, 0x3164, 0xFE00, 0xFE0F, 0xFEFF, 0xFEFF, + 0xFFA0, 0xFFA0, 0xFFF0, 0xFFF8, 0x1BCA0, 0x1BCA3, 0x1D173, 0x1D17A, + 0xE0000, 0xE0FFF, + // #56 (8888+8): bp=Deprecated:Dep + 0x0149, 0x0149, 0x0673, 0x0673, 0x0F77, 0x0F77, 0x0F79, 0x0F79, + 0x17A3, 0x17A4, 0x206A, 0x206F, 0x2329, 0x232A, 0xE0001, 0xE0001, + // #57 (8896+192): bp=Diacritic:Dia + 0x005E, 0x005E, 0x0060, 0x0060, 0x00A8, 0x00A8, 0x00AF, 0x00AF, + 0x00B4, 0x00B4, 0x00B7, 0x00B8, 0x02B0, 0x034E, 0x0350, 0x0357, + 0x035D, 0x0362, 0x0374, 0x0375, 0x037A, 0x037A, 0x0384, 0x0385, + 0x0483, 0x0487, 0x0559, 0x0559, 0x0591, 0x05A1, 0x05A3, 0x05BD, + 0x05BF, 0x05BF, 0x05C1, 0x05C2, 0x05C4, 0x05C4, 0x064B, 0x0652, + 0x0657, 0x0658, 0x06DF, 0x06E0, 0x06E5, 0x06E6, 0x06EA, 0x06EC, + 0x0730, 0x074A, 0x07A6, 0x07B0, 0x07EB, 0x07F5, 0x0818, 0x0819, + 0x0898, 0x089F, 0x08C9, 0x08D2, 0x08E3, 0x08FE, 0x093C, 0x093C, + 0x094D, 0x094D, 0x0951, 0x0954, 0x0971, 0x0971, 0x09BC, 0x09BC, + 0x09CD, 0x09CD, 0x0A3C, 0x0A3C, 0x0A4D, 0x0A4D, 0x0ABC, 0x0ABC, + 0x0ACD, 0x0ACD, 0x0AFD, 0x0AFF, 0x0B3C, 0x0B3C, 0x0B4D, 0x0B4D, + 0x0B55, 0x0B55, 0x0BCD, 0x0BCD, 0x0C3C, 0x0C3C, 0x0C4D, 0x0C4D, + 0x0CBC, 0x0CBC, 0x0CCD, 0x0CCD, 0x0D3B, 0x0D3C, 0x0D4D, 0x0D4D, + 0x0DCA, 0x0DCA, 0x0E47, 0x0E4C, 0x0E4E, 0x0E4E, 0x0EBA, 0x0EBA, + 0x0EC8, 0x0ECC, 0x0F18, 0x0F19, 0x0F35, 0x0F35, 0x0F37, 0x0F37, + 0x0F39, 0x0F39, 0x0F3E, 0x0F3F, 0x0F82, 0x0F84, 0x0F86, 0x0F87, + 0x0FC6, 0x0FC6, 0x1037, 0x1037, 0x1039, 0x103A, 0x1063, 0x1064, + 0x1069, 0x106D, 0x1087, 0x108D, 0x108F, 0x108F, 0x109A, 0x109B, + 0x135D, 0x135F, 0x1714, 0x1715, 0x17C9, 0x17D3, 0x17DD, 0x17DD, + 0x1939, 0x193B, 0x1A75, 0x1A7C, 0x1A7F, 0x1A7F, 0x1AB0, 0x1ABE, + 0x1AC1, 0x1ACB, 0x1B34, 0x1B34, 0x1B44, 0x1B44, 0x1B6B, 0x1B73, + 0x1BAA, 0x1BAB, 0x1C36, 0x1C37, 0x1C78, 0x1C7D, 0x1CD0, 0x1CE8, + 0x1CED, 0x1CED, 0x1CF4, 0x1CF4, 0x1CF7, 0x1CF9, 0x1D2C, 0x1D6A, + 0x1DC4, 0x1DCF, 0x1DF5, 0x1DFF, 0x1FBD, 0x1FBD, 0x1FBF, 0x1FC1, + 0x1FCD, 0x1FCF, 0x1FDD, 0x1FDF, 0x1FED, 0x1FEF, 0x1FFD, 0x1FFE, + 0x2CEF, 0x2CF1, 0x2E2F, 0x2E2F, 0x302A, 0x302F, 0x3099, 0x309C, + 0x30FC, 0x30FC, 0xA66F, 0xA66F, 0xA67C, 0xA67D, 0xA67F, 0xA67F, + 0xA69C, 0xA69D, 0xA6F0, 0xA6F1, 0xA700, 0xA721, 0xA788, 0xA78A, + 0xA7F8, 0xA7F9, 0xA8C4, 0xA8C4, 0xA8E0, 0xA8F1, 0xA92B, 0xA92E, + 0xA953, 0xA953, 0xA9B3, 0xA9B3, 0xA9C0, 0xA9C0, 0xA9E5, 0xA9E5, + 0xAA7B, 0xAA7D, 0xAABF, 0xAAC2, 0xAAF6, 0xAAF6, 0xAB5B, 0xAB5F, + 0xAB69, 0xAB6B, 0xABEC, 0xABED, 0xFB1E, 0xFB1E, 0xFE20, 0xFE2F, + 0xFF3E, 0xFF3E, 0xFF40, 0xFF40, 0xFF70, 0xFF70, 0xFF9E, 0xFF9F, + 0xFFE3, 0xFFE3, 0x102E0, 0x102E0, 0x10780, 0x10785, 0x10787, 0x107B0, + 0x107B2, 0x107BA, 0x10AE5, 0x10AE6, 0x10D22, 0x10D27, 0x10F46, 0x10F50, + 0x10F82, 0x10F85, 0x11046, 0x11046, 0x11070, 0x11070, 0x110B9, 0x110BA, + 0x11133, 0x11134, 0x11173, 0x11173, 0x111C0, 0x111C0, 0x111CA, 0x111CC, + 0x11235, 0x11236, 0x112E9, 0x112EA, 0x1133C, 0x1133C, 0x1134D, 0x1134D, + 0x11366, 0x1136C, 0x11370, 0x11374, 0x11442, 0x11442, 0x11446, 0x11446, + 0x114C2, 0x114C3, 0x115BF, 0x115C0, 0x1163F, 0x1163F, 0x116B6, 0x116B7, + 0x1172B, 0x1172B, 0x11839, 0x1183A, 0x1193D, 0x1193E, 0x11943, 0x11943, + 0x119E0, 0x119E0, 0x11A34, 0x11A34, 0x11A47, 0x11A47, 0x11A99, 0x11A99, + 0x11C3F, 0x11C3F, 0x11D42, 0x11D42, 0x11D44, 0x11D45, 0x11D97, 0x11D97, + 0x16AF0, 0x16AF4, 0x16B30, 0x16B36, 0x16F8F, 0x16F9F, 0x16FF0, 0x16FF1, + 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1CF00, 0x1CF2D, + 0x1CF30, 0x1CF46, 0x1D167, 0x1D169, 0x1D16D, 0x1D172, 0x1D17B, 0x1D182, + 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0x1E130, 0x1E136, 0x1E2AE, 0x1E2AE, + 0x1E2EC, 0x1E2EF, 0x1E8D0, 0x1E8D6, 0x1E944, 0x1E946, 0x1E948, 0x1E94A, + // #58 (9088+153): bp=Emoji + 0x0023, 0x0023, 0x002A, 0x002A, 0x0030, 0x0039, 0x00A9, 0x00A9, + 0x00AE, 0x00AE, 0x203C, 0x203C, 0x2049, 0x2049, 0x2122, 0x2122, + 0x2139, 0x2139, 0x2194, 0x2199, 0x21A9, 0x21AA, 0x231A, 0x231B, + 0x2328, 0x2328, 0x23CF, 0x23CF, 0x23E9, 0x23F3, 0x23F8, 0x23FA, + 0x24C2, 0x24C2, 0x25AA, 0x25AB, 0x25B6, 0x25B6, 0x25C0, 0x25C0, + 0x25FB, 0x25FE, 0x2600, 0x2604, 0x260E, 0x260E, 0x2611, 0x2611, + 0x2614, 0x2615, 0x2618, 0x2618, 0x261D, 0x261D, 0x2620, 0x2620, + 0x2622, 0x2623, 0x2626, 0x2626, 0x262A, 0x262A, 0x262E, 0x262F, + 0x2638, 0x263A, 0x2640, 0x2640, 0x2642, 0x2642, 0x2648, 0x2653, + 0x265F, 0x2660, 0x2663, 0x2663, 0x2665, 0x2666, 0x2668, 0x2668, + 0x267B, 0x267B, 0x267E, 0x267F, 0x2692, 0x2697, 0x2699, 0x2699, + 0x269B, 0x269C, 0x26A0, 0x26A1, 0x26A7, 0x26A7, 0x26AA, 0x26AB, + 0x26B0, 0x26B1, 0x26BD, 0x26BE, 0x26C4, 0x26C5, 0x26C8, 0x26C8, + 0x26CE, 0x26CF, 0x26D1, 0x26D1, 0x26D3, 0x26D4, 0x26E9, 0x26EA, + 0x26F0, 0x26F5, 0x26F7, 0x26FA, 0x26FD, 0x26FD, 0x2702, 0x2702, + 0x2705, 0x2705, 0x2708, 0x270D, 0x270F, 0x270F, 0x2712, 0x2712, + 0x2714, 0x2714, 0x2716, 0x2716, 0x271D, 0x271D, 0x2721, 0x2721, + 0x2728, 0x2728, 0x2733, 0x2734, 0x2744, 0x2744, 0x2747, 0x2747, + 0x274C, 0x274C, 0x274E, 0x274E, 0x2753, 0x2755, 0x2757, 0x2757, + 0x2763, 0x2764, 0x2795, 0x2797, 0x27A1, 0x27A1, 0x27B0, 0x27B0, + 0x27BF, 0x27BF, 0x2934, 0x2935, 0x2B05, 0x2B07, 0x2B1B, 0x2B1C, + 0x2B50, 0x2B50, 0x2B55, 0x2B55, 0x3030, 0x3030, 0x303D, 0x303D, + 0x3297, 0x3297, 0x3299, 0x3299, 0x1F004, 0x1F004, 0x1F0CF, 0x1F0CF, + 0x1F170, 0x1F171, 0x1F17E, 0x1F17F, 0x1F18E, 0x1F18E, 0x1F191, 0x1F19A, + 0x1F1E6, 0x1F1FF, 0x1F201, 0x1F202, 0x1F21A, 0x1F21A, 0x1F22F, 0x1F22F, + 0x1F232, 0x1F23A, 0x1F250, 0x1F251, 0x1F300, 0x1F321, 0x1F324, 0x1F393, + 0x1F396, 0x1F397, 0x1F399, 0x1F39B, 0x1F39E, 0x1F3F0, 0x1F3F3, 0x1F3F5, + 0x1F3F7, 0x1F4FD, 0x1F4FF, 0x1F53D, 0x1F549, 0x1F54E, 0x1F550, 0x1F567, + 0x1F56F, 0x1F570, 0x1F573, 0x1F57A, 0x1F587, 0x1F587, 0x1F58A, 0x1F58D, + 0x1F590, 0x1F590, 0x1F595, 0x1F596, 0x1F5A4, 0x1F5A5, 0x1F5A8, 0x1F5A8, + 0x1F5B1, 0x1F5B2, 0x1F5BC, 0x1F5BC, 0x1F5C2, 0x1F5C4, 0x1F5D1, 0x1F5D3, + 0x1F5DC, 0x1F5DE, 0x1F5E1, 0x1F5E1, 0x1F5E3, 0x1F5E3, 0x1F5E8, 0x1F5E8, + 0x1F5EF, 0x1F5EF, 0x1F5F3, 0x1F5F3, 0x1F5FA, 0x1F64F, 0x1F680, 0x1F6C5, + 0x1F6CB, 0x1F6D2, 0x1F6D5, 0x1F6D7, 0x1F6DD, 0x1F6E5, 0x1F6E9, 0x1F6E9, + 0x1F6EB, 0x1F6EC, 0x1F6F0, 0x1F6F0, 0x1F6F3, 0x1F6FC, 0x1F7E0, 0x1F7EB, + 0x1F7F0, 0x1F7F0, 0x1F90C, 0x1F93A, 0x1F93C, 0x1F945, 0x1F947, 0x1F9FF, + 0x1FA70, 0x1FA74, 0x1FA78, 0x1FA7C, 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, + 0x1FAB0, 0x1FABA, 0x1FAC0, 0x1FAC5, 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, + 0x1FAF0, 0x1FAF6, + // #59 (9241+10): bp=Emoji_Component:EComp + 0x0023, 0x0023, 0x002A, 0x002A, 0x0030, 0x0039, 0x200D, 0x200D, + 0x20E3, 0x20E3, 0xFE0F, 0xFE0F, 0x1F1E6, 0x1F1FF, 0x1F3FB, 0x1F3FF, + 0x1F9B0, 0x1F9B3, 0xE0020, 0xE007F, + // #60 (9251+1): bp=Emoji_Modifier:EMod + 0x1F3FB, 0x1F3FF, + // #61 (9252+40): bp=Emoji_Modifier_Base:EBase + 0x261D, 0x261D, 0x26F9, 0x26F9, 0x270A, 0x270D, 0x1F385, 0x1F385, + 0x1F3C2, 0x1F3C4, 0x1F3C7, 0x1F3C7, 0x1F3CA, 0x1F3CC, 0x1F442, 0x1F443, + 0x1F446, 0x1F450, 0x1F466, 0x1F478, 0x1F47C, 0x1F47C, 0x1F481, 0x1F483, + 0x1F485, 0x1F487, 0x1F48F, 0x1F48F, 0x1F491, 0x1F491, 0x1F4AA, 0x1F4AA, + 0x1F574, 0x1F575, 0x1F57A, 0x1F57A, 0x1F590, 0x1F590, 0x1F595, 0x1F596, + 0x1F645, 0x1F647, 0x1F64B, 0x1F64F, 0x1F6A3, 0x1F6A3, 0x1F6B4, 0x1F6B6, + 0x1F6C0, 0x1F6C0, 0x1F6CC, 0x1F6CC, 0x1F90C, 0x1F90C, 0x1F90F, 0x1F90F, + 0x1F918, 0x1F91F, 0x1F926, 0x1F926, 0x1F930, 0x1F939, 0x1F93C, 0x1F93E, + 0x1F977, 0x1F977, 0x1F9B5, 0x1F9B6, 0x1F9B8, 0x1F9B9, 0x1F9BB, 0x1F9BB, + 0x1F9CD, 0x1F9CF, 0x1F9D1, 0x1F9DD, 0x1FAC3, 0x1FAC5, 0x1FAF0, 0x1FAF6, + // #62 (9292+83): bp=Emoji_Presentation:EPres + 0x231A, 0x231B, 0x23E9, 0x23EC, 0x23F0, 0x23F0, 0x23F3, 0x23F3, + 0x25FD, 0x25FE, 0x2614, 0x2615, 0x2648, 0x2653, 0x267F, 0x267F, + 0x2693, 0x2693, 0x26A1, 0x26A1, 0x26AA, 0x26AB, 0x26BD, 0x26BE, + 0x26C4, 0x26C5, 0x26CE, 0x26CE, 0x26D4, 0x26D4, 0x26EA, 0x26EA, + 0x26F2, 0x26F3, 0x26F5, 0x26F5, 0x26FA, 0x26FA, 0x26FD, 0x26FD, + 0x2705, 0x2705, 0x270A, 0x270B, 0x2728, 0x2728, 0x274C, 0x274C, + 0x274E, 0x274E, 0x2753, 0x2755, 0x2757, 0x2757, 0x2795, 0x2797, + 0x27B0, 0x27B0, 0x27BF, 0x27BF, 0x2B1B, 0x2B1C, 0x2B50, 0x2B50, + 0x2B55, 0x2B55, 0x1F004, 0x1F004, 0x1F0CF, 0x1F0CF, 0x1F18E, 0x1F18E, + 0x1F191, 0x1F19A, 0x1F1E6, 0x1F1FF, 0x1F201, 0x1F201, 0x1F21A, 0x1F21A, + 0x1F22F, 0x1F22F, 0x1F232, 0x1F236, 0x1F238, 0x1F23A, 0x1F250, 0x1F251, + 0x1F300, 0x1F320, 0x1F32D, 0x1F335, 0x1F337, 0x1F37C, 0x1F37E, 0x1F393, + 0x1F3A0, 0x1F3CA, 0x1F3CF, 0x1F3D3, 0x1F3E0, 0x1F3F0, 0x1F3F4, 0x1F3F4, + 0x1F3F8, 0x1F43E, 0x1F440, 0x1F440, 0x1F442, 0x1F4FC, 0x1F4FF, 0x1F53D, + 0x1F54B, 0x1F54E, 0x1F550, 0x1F567, 0x1F57A, 0x1F57A, 0x1F595, 0x1F596, + 0x1F5A4, 0x1F5A4, 0x1F5FB, 0x1F64F, 0x1F680, 0x1F6C5, 0x1F6CC, 0x1F6CC, + 0x1F6D0, 0x1F6D2, 0x1F6D5, 0x1F6D7, 0x1F6DD, 0x1F6DF, 0x1F6EB, 0x1F6EC, + 0x1F6F4, 0x1F6FC, 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, 0x1F90C, 0x1F93A, + 0x1F93C, 0x1F945, 0x1F947, 0x1F9FF, 0x1FA70, 0x1FA74, 0x1FA78, 0x1FA7C, + 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, 0x1FAB0, 0x1FABA, 0x1FAC0, 0x1FAC5, + 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, 0x1FAF0, 0x1FAF6, + // #63 (9375+78): bp=Extended_Pictographic:ExtPict + 0x00A9, 0x00A9, 0x00AE, 0x00AE, 0x203C, 0x203C, 0x2049, 0x2049, + 0x2122, 0x2122, 0x2139, 0x2139, 0x2194, 0x2199, 0x21A9, 0x21AA, + 0x231A, 0x231B, 0x2328, 0x2328, 0x2388, 0x2388, 0x23CF, 0x23CF, + 0x23E9, 0x23F3, 0x23F8, 0x23FA, 0x24C2, 0x24C2, 0x25AA, 0x25AB, + 0x25B6, 0x25B6, 0x25C0, 0x25C0, 0x25FB, 0x25FE, 0x2600, 0x2605, + 0x2607, 0x2612, 0x2614, 0x2685, 0x2690, 0x2705, 0x2708, 0x2712, + 0x2714, 0x2714, 0x2716, 0x2716, 0x271D, 0x271D, 0x2721, 0x2721, + 0x2728, 0x2728, 0x2733, 0x2734, 0x2744, 0x2744, 0x2747, 0x2747, + 0x274C, 0x274C, 0x274E, 0x274E, 0x2753, 0x2755, 0x2757, 0x2757, + 0x2763, 0x2767, 0x2795, 0x2797, 0x27A1, 0x27A1, 0x27B0, 0x27B0, + 0x27BF, 0x27BF, 0x2934, 0x2935, 0x2B05, 0x2B07, 0x2B1B, 0x2B1C, + 0x2B50, 0x2B50, 0x2B55, 0x2B55, 0x3030, 0x3030, 0x303D, 0x303D, + 0x3297, 0x3297, 0x3299, 0x3299, 0x1F000, 0x1F0FF, 0x1F10D, 0x1F10F, + 0x1F12F, 0x1F12F, 0x1F16C, 0x1F171, 0x1F17E, 0x1F17F, 0x1F18E, 0x1F18E, + 0x1F191, 0x1F19A, 0x1F1AD, 0x1F1E5, 0x1F201, 0x1F20F, 0x1F21A, 0x1F21A, + 0x1F22F, 0x1F22F, 0x1F232, 0x1F23A, 0x1F23C, 0x1F23F, 0x1F249, 0x1F3FA, + 0x1F400, 0x1F53D, 0x1F546, 0x1F64F, 0x1F680, 0x1F6FF, 0x1F774, 0x1F77F, + 0x1F7D5, 0x1F7FF, 0x1F80C, 0x1F80F, 0x1F848, 0x1F84F, 0x1F85A, 0x1F85F, + 0x1F888, 0x1F88F, 0x1F8AE, 0x1F8FF, 0x1F90C, 0x1F93A, 0x1F93C, 0x1F945, + 0x1F947, 0x1FAFF, 0x1FC00, 0x1FFFD, + // #64 (9453+33): bp=Extender:Ext + 0x00B7, 0x00B7, 0x02D0, 0x02D1, 0x0640, 0x0640, 0x07FA, 0x07FA, + 0x0B55, 0x0B55, 0x0E46, 0x0E46, 0x0EC6, 0x0EC6, 0x180A, 0x180A, + 0x1843, 0x1843, 0x1AA7, 0x1AA7, 0x1C36, 0x1C36, 0x1C7B, 0x1C7B, + 0x3005, 0x3005, 0x3031, 0x3035, 0x309D, 0x309E, 0x30FC, 0x30FE, + 0xA015, 0xA015, 0xA60C, 0xA60C, 0xA9CF, 0xA9CF, 0xA9E6, 0xA9E6, + 0xAA70, 0xAA70, 0xAADD, 0xAADD, 0xAAF3, 0xAAF4, 0xFF70, 0xFF70, + 0x10781, 0x10782, 0x1135D, 0x1135D, 0x115C6, 0x115C8, 0x11A98, 0x11A98, + 0x16B42, 0x16B43, 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE3, 0x1E13C, 0x1E13D, + 0x1E944, 0x1E946, + // #65 (9486+861): bp=Grapheme_Base:Gr_Base + 0x0020, 0x007E, 0x00A0, 0x00AC, 0x00AE, 0x02FF, 0x0370, 0x0377, + 0x037A, 0x037F, 0x0384, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, + 0x03A3, 0x0482, 0x048A, 0x052F, 0x0531, 0x0556, 0x0559, 0x058A, + 0x058D, 0x058F, 0x05BE, 0x05BE, 0x05C0, 0x05C0, 0x05C3, 0x05C3, + 0x05C6, 0x05C6, 0x05D0, 0x05EA, 0x05EF, 0x05F4, 0x0606, 0x060F, + 0x061B, 0x061B, 0x061D, 0x064A, 0x0660, 0x066F, 0x0671, 0x06D5, + 0x06DE, 0x06DE, 0x06E5, 0x06E6, 0x06E9, 0x06E9, 0x06EE, 0x070D, + 0x0710, 0x0710, 0x0712, 0x072F, 0x074D, 0x07A5, 0x07B1, 0x07B1, + 0x07C0, 0x07EA, 0x07F4, 0x07FA, 0x07FE, 0x0815, 0x081A, 0x081A, + 0x0824, 0x0824, 0x0828, 0x0828, 0x0830, 0x083E, 0x0840, 0x0858, + 0x085E, 0x085E, 0x0860, 0x086A, 0x0870, 0x088E, 0x08A0, 0x08C9, + 0x0903, 0x0939, 0x093B, 0x093B, 0x093D, 0x0940, 0x0949, 0x094C, + 0x094E, 0x0950, 0x0958, 0x0961, 0x0964, 0x0980, 0x0982, 0x0983, + 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, + 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BD, 0x09BD, 0x09BF, 0x09C0, + 0x09C7, 0x09C8, 0x09CB, 0x09CC, 0x09CE, 0x09CE, 0x09DC, 0x09DD, + 0x09DF, 0x09E1, 0x09E6, 0x09FD, 0x0A03, 0x0A03, 0x0A05, 0x0A0A, + 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, + 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A3E, 0x0A40, 0x0A59, 0x0A5C, + 0x0A5E, 0x0A5E, 0x0A66, 0x0A6F, 0x0A72, 0x0A74, 0x0A76, 0x0A76, + 0x0A83, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABD, 0x0AC0, + 0x0AC9, 0x0AC9, 0x0ACB, 0x0ACC, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE1, + 0x0AE6, 0x0AF1, 0x0AF9, 0x0AF9, 0x0B02, 0x0B03, 0x0B05, 0x0B0C, + 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, + 0x0B35, 0x0B39, 0x0B3D, 0x0B3D, 0x0B40, 0x0B40, 0x0B47, 0x0B48, + 0x0B4B, 0x0B4C, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, 0x0B66, 0x0B77, + 0x0B83, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, + 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, + 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BBF, 0x0BBF, 0x0BC1, 0x0BC2, + 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCC, 0x0BD0, 0x0BD0, 0x0BE6, 0x0BFA, + 0x0C01, 0x0C03, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, + 0x0C2A, 0x0C39, 0x0C3D, 0x0C3D, 0x0C41, 0x0C44, 0x0C58, 0x0C5A, + 0x0C5D, 0x0C5D, 0x0C60, 0x0C61, 0x0C66, 0x0C6F, 0x0C77, 0x0C80, + 0x0C82, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, + 0x0CB5, 0x0CB9, 0x0CBD, 0x0CBE, 0x0CC0, 0x0CC1, 0x0CC3, 0x0CC4, + 0x0CC7, 0x0CC8, 0x0CCA, 0x0CCB, 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE1, + 0x0CE6, 0x0CEF, 0x0CF1, 0x0CF2, 0x0D02, 0x0D0C, 0x0D0E, 0x0D10, + 0x0D12, 0x0D3A, 0x0D3D, 0x0D3D, 0x0D3F, 0x0D40, 0x0D46, 0x0D48, + 0x0D4A, 0x0D4C, 0x0D4E, 0x0D4F, 0x0D54, 0x0D56, 0x0D58, 0x0D61, + 0x0D66, 0x0D7F, 0x0D82, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, + 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DD0, 0x0DD1, + 0x0DD8, 0x0DDE, 0x0DE6, 0x0DEF, 0x0DF2, 0x0DF4, 0x0E01, 0x0E30, + 0x0E32, 0x0E33, 0x0E3F, 0x0E46, 0x0E4F, 0x0E5B, 0x0E81, 0x0E82, + 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, + 0x0EA7, 0x0EB0, 0x0EB2, 0x0EB3, 0x0EBD, 0x0EBD, 0x0EC0, 0x0EC4, + 0x0EC6, 0x0EC6, 0x0ED0, 0x0ED9, 0x0EDC, 0x0EDF, 0x0F00, 0x0F17, + 0x0F1A, 0x0F34, 0x0F36, 0x0F36, 0x0F38, 0x0F38, 0x0F3A, 0x0F47, + 0x0F49, 0x0F6C, 0x0F7F, 0x0F7F, 0x0F85, 0x0F85, 0x0F88, 0x0F8C, + 0x0FBE, 0x0FC5, 0x0FC7, 0x0FCC, 0x0FCE, 0x0FDA, 0x1000, 0x102C, + 0x1031, 0x1031, 0x1038, 0x1038, 0x103B, 0x103C, 0x103F, 0x1057, + 0x105A, 0x105D, 0x1061, 0x1070, 0x1075, 0x1081, 0x1083, 0x1084, + 0x1087, 0x108C, 0x108E, 0x109C, 0x109E, 0x10C5, 0x10C7, 0x10C7, + 0x10CD, 0x10CD, 0x10D0, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, + 0x1258, 0x1258, 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, + 0x1290, 0x12B0, 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, + 0x12C2, 0x12C5, 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, + 0x1318, 0x135A, 0x1360, 0x137C, 0x1380, 0x1399, 0x13A0, 0x13F5, + 0x13F8, 0x13FD, 0x1400, 0x169C, 0x16A0, 0x16F8, 0x1700, 0x1711, + 0x1715, 0x1715, 0x171F, 0x1731, 0x1734, 0x1736, 0x1740, 0x1751, + 0x1760, 0x176C, 0x176E, 0x1770, 0x1780, 0x17B3, 0x17B6, 0x17B6, + 0x17BE, 0x17C5, 0x17C7, 0x17C8, 0x17D4, 0x17DC, 0x17E0, 0x17E9, + 0x17F0, 0x17F9, 0x1800, 0x180A, 0x1810, 0x1819, 0x1820, 0x1878, + 0x1880, 0x1884, 0x1887, 0x18A8, 0x18AA, 0x18AA, 0x18B0, 0x18F5, + 0x1900, 0x191E, 0x1923, 0x1926, 0x1929, 0x192B, 0x1930, 0x1931, + 0x1933, 0x1938, 0x1940, 0x1940, 0x1944, 0x196D, 0x1970, 0x1974, + 0x1980, 0x19AB, 0x19B0, 0x19C9, 0x19D0, 0x19DA, 0x19DE, 0x1A16, + 0x1A19, 0x1A1A, 0x1A1E, 0x1A55, 0x1A57, 0x1A57, 0x1A61, 0x1A61, + 0x1A63, 0x1A64, 0x1A6D, 0x1A72, 0x1A80, 0x1A89, 0x1A90, 0x1A99, + 0x1AA0, 0x1AAD, 0x1B04, 0x1B33, 0x1B3B, 0x1B3B, 0x1B3D, 0x1B41, + 0x1B43, 0x1B4C, 0x1B50, 0x1B6A, 0x1B74, 0x1B7E, 0x1B82, 0x1BA1, + 0x1BA6, 0x1BA7, 0x1BAA, 0x1BAA, 0x1BAE, 0x1BE5, 0x1BE7, 0x1BE7, + 0x1BEA, 0x1BEC, 0x1BEE, 0x1BEE, 0x1BF2, 0x1BF3, 0x1BFC, 0x1C2B, + 0x1C34, 0x1C35, 0x1C3B, 0x1C49, 0x1C4D, 0x1C88, 0x1C90, 0x1CBA, + 0x1CBD, 0x1CC7, 0x1CD3, 0x1CD3, 0x1CE1, 0x1CE1, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF7, 0x1CFA, 0x1CFA, 0x1D00, 0x1DBF, + 0x1E00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, + 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, + 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FC4, 0x1FC6, 0x1FD3, + 0x1FD6, 0x1FDB, 0x1FDD, 0x1FEF, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFE, + 0x2000, 0x200A, 0x2010, 0x2027, 0x202F, 0x205F, 0x2070, 0x2071, + 0x2074, 0x208E, 0x2090, 0x209C, 0x20A0, 0x20C0, 0x2100, 0x218B, + 0x2190, 0x2426, 0x2440, 0x244A, 0x2460, 0x2B73, 0x2B76, 0x2B95, + 0x2B97, 0x2CEE, 0x2CF2, 0x2CF3, 0x2CF9, 0x2D25, 0x2D27, 0x2D27, + 0x2D2D, 0x2D2D, 0x2D30, 0x2D67, 0x2D6F, 0x2D70, 0x2D80, 0x2D96, + 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, + 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, + 0x2E00, 0x2E5D, 0x2E80, 0x2E99, 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, + 0x2FF0, 0x2FFB, 0x3000, 0x3029, 0x3030, 0x303F, 0x3041, 0x3096, + 0x309B, 0x30FF, 0x3105, 0x312F, 0x3131, 0x318E, 0x3190, 0x31E3, + 0x31F0, 0x321E, 0x3220, 0xA48C, 0xA490, 0xA4C6, 0xA4D0, 0xA62B, + 0xA640, 0xA66E, 0xA673, 0xA673, 0xA67E, 0xA69D, 0xA6A0, 0xA6EF, + 0xA6F2, 0xA6F7, 0xA700, 0xA7CA, 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, + 0xA7D5, 0xA7D9, 0xA7F2, 0xA801, 0xA803, 0xA805, 0xA807, 0xA80A, + 0xA80C, 0xA824, 0xA827, 0xA82B, 0xA830, 0xA839, 0xA840, 0xA877, + 0xA880, 0xA8C3, 0xA8CE, 0xA8D9, 0xA8F2, 0xA8FE, 0xA900, 0xA925, + 0xA92E, 0xA946, 0xA952, 0xA953, 0xA95F, 0xA97C, 0xA983, 0xA9B2, + 0xA9B4, 0xA9B5, 0xA9BA, 0xA9BB, 0xA9BE, 0xA9CD, 0xA9CF, 0xA9D9, + 0xA9DE, 0xA9E4, 0xA9E6, 0xA9FE, 0xAA00, 0xAA28, 0xAA2F, 0xAA30, + 0xAA33, 0xAA34, 0xAA40, 0xAA42, 0xAA44, 0xAA4B, 0xAA4D, 0xAA4D, + 0xAA50, 0xAA59, 0xAA5C, 0xAA7B, 0xAA7D, 0xAAAF, 0xAAB1, 0xAAB1, + 0xAAB5, 0xAAB6, 0xAAB9, 0xAABD, 0xAAC0, 0xAAC0, 0xAAC2, 0xAAC2, + 0xAADB, 0xAAEB, 0xAAEE, 0xAAF5, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, + 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB6B, + 0xAB70, 0xABE4, 0xABE6, 0xABE7, 0xABE9, 0xABEC, 0xABF0, 0xABF9, + 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, + 0xFA70, 0xFAD9, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFB1D, 0xFB1D, + 0xFB1F, 0xFB36, 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, + 0xFB43, 0xFB44, 0xFB46, 0xFBC2, 0xFBD3, 0xFD8F, 0xFD92, 0xFDC7, + 0xFDCF, 0xFDCF, 0xFDF0, 0xFDFF, 0xFE10, 0xFE19, 0xFE30, 0xFE52, + 0xFE54, 0xFE66, 0xFE68, 0xFE6B, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, + 0xFF01, 0xFF9D, 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, + 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, 0xFFE0, 0xFFE6, 0xFFE8, 0xFFEE, + 0xFFFC, 0xFFFD, 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, + 0x1003C, 0x1003D, 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, + 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1018E, 0x10190, 0x1019C, + 0x101A0, 0x101A0, 0x101D0, 0x101FC, 0x10280, 0x1029C, 0x102A0, 0x102D0, + 0x102E1, 0x102FB, 0x10300, 0x10323, 0x1032D, 0x1034A, 0x10350, 0x10375, + 0x10380, 0x1039D, 0x1039F, 0x103C3, 0x103C8, 0x103D5, 0x10400, 0x1049D, + 0x104A0, 0x104A9, 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10500, 0x10527, + 0x10530, 0x10563, 0x1056F, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, + 0x10594, 0x10595, 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, + 0x105BB, 0x105BC, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10800, 0x10805, + 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, + 0x1083F, 0x10855, 0x10857, 0x1089E, 0x108A7, 0x108AF, 0x108E0, 0x108F2, + 0x108F4, 0x108F5, 0x108FB, 0x1091B, 0x1091F, 0x10939, 0x1093F, 0x1093F, + 0x10980, 0x109B7, 0x109BC, 0x109CF, 0x109D2, 0x10A00, 0x10A10, 0x10A13, + 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A40, 0x10A48, 0x10A50, 0x10A58, + 0x10A60, 0x10A9F, 0x10AC0, 0x10AE4, 0x10AEB, 0x10AF6, 0x10B00, 0x10B35, + 0x10B39, 0x10B55, 0x10B58, 0x10B72, 0x10B78, 0x10B91, 0x10B99, 0x10B9C, + 0x10BA9, 0x10BAF, 0x10C00, 0x10C48, 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, + 0x10CFA, 0x10D23, 0x10D30, 0x10D39, 0x10E60, 0x10E7E, 0x10E80, 0x10EA9, + 0x10EAD, 0x10EAD, 0x10EB0, 0x10EB1, 0x10F00, 0x10F27, 0x10F30, 0x10F45, + 0x10F51, 0x10F59, 0x10F70, 0x10F81, 0x10F86, 0x10F89, 0x10FB0, 0x10FCB, + 0x10FE0, 0x10FF6, 0x11000, 0x11000, 0x11002, 0x11037, 0x11047, 0x1104D, + 0x11052, 0x1106F, 0x11071, 0x11072, 0x11075, 0x11075, 0x11082, 0x110B2, + 0x110B7, 0x110B8, 0x110BB, 0x110BC, 0x110BE, 0x110C1, 0x110D0, 0x110E8, + 0x110F0, 0x110F9, 0x11103, 0x11126, 0x1112C, 0x1112C, 0x11136, 0x11147, + 0x11150, 0x11172, 0x11174, 0x11176, 0x11182, 0x111B5, 0x111BF, 0x111C8, + 0x111CD, 0x111CE, 0x111D0, 0x111DF, 0x111E1, 0x111F4, 0x11200, 0x11211, + 0x11213, 0x1122E, 0x11232, 0x11233, 0x11235, 0x11235, 0x11238, 0x1123D, + 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, + 0x1129F, 0x112A9, 0x112B0, 0x112DE, 0x112E0, 0x112E2, 0x112F0, 0x112F9, + 0x11302, 0x11303, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, + 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133D, 0x1133D, + 0x1133F, 0x1133F, 0x11341, 0x11344, 0x11347, 0x11348, 0x1134B, 0x1134D, + 0x11350, 0x11350, 0x1135D, 0x11363, 0x11400, 0x11437, 0x11440, 0x11441, + 0x11445, 0x11445, 0x11447, 0x1145B, 0x1145D, 0x1145D, 0x1145F, 0x11461, + 0x11480, 0x114AF, 0x114B1, 0x114B2, 0x114B9, 0x114B9, 0x114BB, 0x114BC, + 0x114BE, 0x114BE, 0x114C1, 0x114C1, 0x114C4, 0x114C7, 0x114D0, 0x114D9, + 0x11580, 0x115AE, 0x115B0, 0x115B1, 0x115B8, 0x115BB, 0x115BE, 0x115BE, + 0x115C1, 0x115DB, 0x11600, 0x11632, 0x1163B, 0x1163C, 0x1163E, 0x1163E, + 0x11641, 0x11644, 0x11650, 0x11659, 0x11660, 0x1166C, 0x11680, 0x116AA, + 0x116AC, 0x116AC, 0x116AE, 0x116AF, 0x116B6, 0x116B6, 0x116B8, 0x116B9, + 0x116C0, 0x116C9, 0x11700, 0x1171A, 0x11720, 0x11721, 0x11726, 0x11726, + 0x11730, 0x11746, 0x11800, 0x1182E, 0x11838, 0x11838, 0x1183B, 0x1183B, + 0x118A0, 0x118F2, 0x118FF, 0x11906, 0x11909, 0x11909, 0x1190C, 0x11913, + 0x11915, 0x11916, 0x11918, 0x1192F, 0x11931, 0x11935, 0x11937, 0x11938, + 0x1193D, 0x1193D, 0x1193F, 0x11942, 0x11944, 0x11946, 0x11950, 0x11959, + 0x119A0, 0x119A7, 0x119AA, 0x119D3, 0x119DC, 0x119DF, 0x119E1, 0x119E4, + 0x11A00, 0x11A00, 0x11A0B, 0x11A32, 0x11A39, 0x11A3A, 0x11A3F, 0x11A46, + 0x11A50, 0x11A50, 0x11A57, 0x11A58, 0x11A5C, 0x11A89, 0x11A97, 0x11A97, + 0x11A9A, 0x11AA2, 0x11AB0, 0x11AF8, 0x11C00, 0x11C08, 0x11C0A, 0x11C2F, + 0x11C3E, 0x11C3E, 0x11C40, 0x11C45, 0x11C50, 0x11C6C, 0x11C70, 0x11C8F, + 0x11CA9, 0x11CA9, 0x11CB1, 0x11CB1, 0x11CB4, 0x11CB4, 0x11D00, 0x11D06, + 0x11D08, 0x11D09, 0x11D0B, 0x11D30, 0x11D46, 0x11D46, 0x11D50, 0x11D59, + 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, 0x11D93, 0x11D94, + 0x11D96, 0x11D96, 0x11D98, 0x11D98, 0x11DA0, 0x11DA9, 0x11EE0, 0x11EF2, + 0x11EF5, 0x11EF8, 0x11FB0, 0x11FB0, 0x11FC0, 0x11FF1, 0x11FFF, 0x12399, + 0x12400, 0x1246E, 0x12470, 0x12474, 0x12480, 0x12543, 0x12F90, 0x12FF2, + 0x13000, 0x1342E, 0x14400, 0x14646, 0x16800, 0x16A38, 0x16A40, 0x16A5E, + 0x16A60, 0x16A69, 0x16A6E, 0x16ABE, 0x16AC0, 0x16AC9, 0x16AD0, 0x16AED, + 0x16AF5, 0x16AF5, 0x16B00, 0x16B2F, 0x16B37, 0x16B45, 0x16B50, 0x16B59, + 0x16B5B, 0x16B61, 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, 0x16E40, 0x16E9A, + 0x16F00, 0x16F4A, 0x16F50, 0x16F87, 0x16F93, 0x16F9F, 0x16FE0, 0x16FE3, + 0x16FF0, 0x16FF1, 0x17000, 0x187F7, 0x18800, 0x18CD5, 0x18D00, 0x18D08, + 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B122, + 0x1B150, 0x1B152, 0x1B164, 0x1B167, 0x1B170, 0x1B2FB, 0x1BC00, 0x1BC6A, + 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, 0x1BC9C, 0x1BC9C, + 0x1BC9F, 0x1BC9F, 0x1CF50, 0x1CFC3, 0x1D000, 0x1D0F5, 0x1D100, 0x1D126, + 0x1D129, 0x1D164, 0x1D166, 0x1D166, 0x1D16A, 0x1D16D, 0x1D183, 0x1D184, + 0x1D18C, 0x1D1A9, 0x1D1AE, 0x1D1EA, 0x1D200, 0x1D241, 0x1D245, 0x1D245, + 0x1D2E0, 0x1D2F3, 0x1D300, 0x1D356, 0x1D360, 0x1D378, 0x1D400, 0x1D454, + 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, + 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, + 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, + 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, + 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D7CB, 0x1D7CE, 0x1D9FF, + 0x1DA37, 0x1DA3A, 0x1DA6D, 0x1DA74, 0x1DA76, 0x1DA83, 0x1DA85, 0x1DA8B, + 0x1DF00, 0x1DF1E, 0x1E100, 0x1E12C, 0x1E137, 0x1E13D, 0x1E140, 0x1E149, + 0x1E14E, 0x1E14F, 0x1E290, 0x1E2AD, 0x1E2C0, 0x1E2EB, 0x1E2F0, 0x1E2F9, + 0x1E2FF, 0x1E2FF, 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, + 0x1E7F0, 0x1E7FE, 0x1E800, 0x1E8C4, 0x1E8C7, 0x1E8CF, 0x1E900, 0x1E943, + 0x1E94B, 0x1E94B, 0x1E950, 0x1E959, 0x1E95E, 0x1E95F, 0x1EC71, 0x1ECB4, + 0x1ED01, 0x1ED3D, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, + 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, + 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, + 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, + 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, + 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, + 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, + 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1EEF0, 0x1EEF1, 0x1F000, 0x1F02B, + 0x1F030, 0x1F093, 0x1F0A0, 0x1F0AE, 0x1F0B1, 0x1F0BF, 0x1F0C1, 0x1F0CF, + 0x1F0D1, 0x1F0F5, 0x1F100, 0x1F1AD, 0x1F1E6, 0x1F202, 0x1F210, 0x1F23B, + 0x1F240, 0x1F248, 0x1F250, 0x1F251, 0x1F260, 0x1F265, 0x1F300, 0x1F6D7, + 0x1F6DD, 0x1F6EC, 0x1F6F0, 0x1F6FC, 0x1F700, 0x1F773, 0x1F780, 0x1F7D8, + 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, 0x1F800, 0x1F80B, 0x1F810, 0x1F847, + 0x1F850, 0x1F859, 0x1F860, 0x1F887, 0x1F890, 0x1F8AD, 0x1F8B0, 0x1F8B1, + 0x1F900, 0x1FA53, 0x1FA60, 0x1FA6D, 0x1FA70, 0x1FA74, 0x1FA78, 0x1FA7C, + 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, 0x1FAB0, 0x1FABA, 0x1FAC0, 0x1FAC5, + 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, 0x1FAF0, 0x1FAF6, 0x1FB00, 0x1FB92, + 0x1FB94, 0x1FBCA, 0x1FBF0, 0x1FBF9, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, + 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, + 0x30000, 0x3134A, + // #66 (10347+353): bp=Grapheme_Extend:Gr_Ext + 0x0300, 0x036F, 0x0483, 0x0489, 0x0591, 0x05BD, 0x05BF, 0x05BF, + 0x05C1, 0x05C2, 0x05C4, 0x05C5, 0x05C7, 0x05C7, 0x0610, 0x061A, + 0x064B, 0x065F, 0x0670, 0x0670, 0x06D6, 0x06DC, 0x06DF, 0x06E4, + 0x06E7, 0x06E8, 0x06EA, 0x06ED, 0x0711, 0x0711, 0x0730, 0x074A, + 0x07A6, 0x07B0, 0x07EB, 0x07F3, 0x07FD, 0x07FD, 0x0816, 0x0819, + 0x081B, 0x0823, 0x0825, 0x0827, 0x0829, 0x082D, 0x0859, 0x085B, + 0x0898, 0x089F, 0x08CA, 0x08E1, 0x08E3, 0x0902, 0x093A, 0x093A, + 0x093C, 0x093C, 0x0941, 0x0948, 0x094D, 0x094D, 0x0951, 0x0957, + 0x0962, 0x0963, 0x0981, 0x0981, 0x09BC, 0x09BC, 0x09BE, 0x09BE, + 0x09C1, 0x09C4, 0x09CD, 0x09CD, 0x09D7, 0x09D7, 0x09E2, 0x09E3, + 0x09FE, 0x09FE, 0x0A01, 0x0A02, 0x0A3C, 0x0A3C, 0x0A41, 0x0A42, + 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A51, 0x0A51, 0x0A70, 0x0A71, + 0x0A75, 0x0A75, 0x0A81, 0x0A82, 0x0ABC, 0x0ABC, 0x0AC1, 0x0AC5, + 0x0AC7, 0x0AC8, 0x0ACD, 0x0ACD, 0x0AE2, 0x0AE3, 0x0AFA, 0x0AFF, + 0x0B01, 0x0B01, 0x0B3C, 0x0B3C, 0x0B3E, 0x0B3F, 0x0B41, 0x0B44, + 0x0B4D, 0x0B4D, 0x0B55, 0x0B57, 0x0B62, 0x0B63, 0x0B82, 0x0B82, + 0x0BBE, 0x0BBE, 0x0BC0, 0x0BC0, 0x0BCD, 0x0BCD, 0x0BD7, 0x0BD7, + 0x0C00, 0x0C00, 0x0C04, 0x0C04, 0x0C3C, 0x0C3C, 0x0C3E, 0x0C40, + 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C62, 0x0C63, + 0x0C81, 0x0C81, 0x0CBC, 0x0CBC, 0x0CBF, 0x0CBF, 0x0CC2, 0x0CC2, + 0x0CC6, 0x0CC6, 0x0CCC, 0x0CCD, 0x0CD5, 0x0CD6, 0x0CE2, 0x0CE3, + 0x0D00, 0x0D01, 0x0D3B, 0x0D3C, 0x0D3E, 0x0D3E, 0x0D41, 0x0D44, + 0x0D4D, 0x0D4D, 0x0D57, 0x0D57, 0x0D62, 0x0D63, 0x0D81, 0x0D81, + 0x0DCA, 0x0DCA, 0x0DCF, 0x0DCF, 0x0DD2, 0x0DD4, 0x0DD6, 0x0DD6, + 0x0DDF, 0x0DDF, 0x0E31, 0x0E31, 0x0E34, 0x0E3A, 0x0E47, 0x0E4E, + 0x0EB1, 0x0EB1, 0x0EB4, 0x0EBC, 0x0EC8, 0x0ECD, 0x0F18, 0x0F19, + 0x0F35, 0x0F35, 0x0F37, 0x0F37, 0x0F39, 0x0F39, 0x0F71, 0x0F7E, + 0x0F80, 0x0F84, 0x0F86, 0x0F87, 0x0F8D, 0x0F97, 0x0F99, 0x0FBC, + 0x0FC6, 0x0FC6, 0x102D, 0x1030, 0x1032, 0x1037, 0x1039, 0x103A, + 0x103D, 0x103E, 0x1058, 0x1059, 0x105E, 0x1060, 0x1071, 0x1074, + 0x1082, 0x1082, 0x1085, 0x1086, 0x108D, 0x108D, 0x109D, 0x109D, + 0x135D, 0x135F, 0x1712, 0x1714, 0x1732, 0x1733, 0x1752, 0x1753, + 0x1772, 0x1773, 0x17B4, 0x17B5, 0x17B7, 0x17BD, 0x17C6, 0x17C6, + 0x17C9, 0x17D3, 0x17DD, 0x17DD, 0x180B, 0x180D, 0x180F, 0x180F, + 0x1885, 0x1886, 0x18A9, 0x18A9, 0x1920, 0x1922, 0x1927, 0x1928, + 0x1932, 0x1932, 0x1939, 0x193B, 0x1A17, 0x1A18, 0x1A1B, 0x1A1B, + 0x1A56, 0x1A56, 0x1A58, 0x1A5E, 0x1A60, 0x1A60, 0x1A62, 0x1A62, + 0x1A65, 0x1A6C, 0x1A73, 0x1A7C, 0x1A7F, 0x1A7F, 0x1AB0, 0x1ACE, + 0x1B00, 0x1B03, 0x1B34, 0x1B3A, 0x1B3C, 0x1B3C, 0x1B42, 0x1B42, + 0x1B6B, 0x1B73, 0x1B80, 0x1B81, 0x1BA2, 0x1BA5, 0x1BA8, 0x1BA9, + 0x1BAB, 0x1BAD, 0x1BE6, 0x1BE6, 0x1BE8, 0x1BE9, 0x1BED, 0x1BED, + 0x1BEF, 0x1BF1, 0x1C2C, 0x1C33, 0x1C36, 0x1C37, 0x1CD0, 0x1CD2, + 0x1CD4, 0x1CE0, 0x1CE2, 0x1CE8, 0x1CED, 0x1CED, 0x1CF4, 0x1CF4, + 0x1CF8, 0x1CF9, 0x1DC0, 0x1DFF, 0x200C, 0x200C, 0x20D0, 0x20F0, + 0x2CEF, 0x2CF1, 0x2D7F, 0x2D7F, 0x2DE0, 0x2DFF, 0x302A, 0x302F, + 0x3099, 0x309A, 0xA66F, 0xA672, 0xA674, 0xA67D, 0xA69E, 0xA69F, + 0xA6F0, 0xA6F1, 0xA802, 0xA802, 0xA806, 0xA806, 0xA80B, 0xA80B, + 0xA825, 0xA826, 0xA82C, 0xA82C, 0xA8C4, 0xA8C5, 0xA8E0, 0xA8F1, + 0xA8FF, 0xA8FF, 0xA926, 0xA92D, 0xA947, 0xA951, 0xA980, 0xA982, + 0xA9B3, 0xA9B3, 0xA9B6, 0xA9B9, 0xA9BC, 0xA9BD, 0xA9E5, 0xA9E5, + 0xAA29, 0xAA2E, 0xAA31, 0xAA32, 0xAA35, 0xAA36, 0xAA43, 0xAA43, + 0xAA4C, 0xAA4C, 0xAA7C, 0xAA7C, 0xAAB0, 0xAAB0, 0xAAB2, 0xAAB4, + 0xAAB7, 0xAAB8, 0xAABE, 0xAABF, 0xAAC1, 0xAAC1, 0xAAEC, 0xAAED, + 0xAAF6, 0xAAF6, 0xABE5, 0xABE5, 0xABE8, 0xABE8, 0xABED, 0xABED, + 0xFB1E, 0xFB1E, 0xFE00, 0xFE0F, 0xFE20, 0xFE2F, 0xFF9E, 0xFF9F, + 0x101FD, 0x101FD, 0x102E0, 0x102E0, 0x10376, 0x1037A, 0x10A01, 0x10A03, + 0x10A05, 0x10A06, 0x10A0C, 0x10A0F, 0x10A38, 0x10A3A, 0x10A3F, 0x10A3F, + 0x10AE5, 0x10AE6, 0x10D24, 0x10D27, 0x10EAB, 0x10EAC, 0x10F46, 0x10F50, + 0x10F82, 0x10F85, 0x11001, 0x11001, 0x11038, 0x11046, 0x11070, 0x11070, + 0x11073, 0x11074, 0x1107F, 0x11081, 0x110B3, 0x110B6, 0x110B9, 0x110BA, + 0x110C2, 0x110C2, 0x11100, 0x11102, 0x11127, 0x1112B, 0x1112D, 0x11134, + 0x11173, 0x11173, 0x11180, 0x11181, 0x111B6, 0x111BE, 0x111C9, 0x111CC, + 0x111CF, 0x111CF, 0x1122F, 0x11231, 0x11234, 0x11234, 0x11236, 0x11237, + 0x1123E, 0x1123E, 0x112DF, 0x112DF, 0x112E3, 0x112EA, 0x11300, 0x11301, + 0x1133B, 0x1133C, 0x1133E, 0x1133E, 0x11340, 0x11340, 0x11357, 0x11357, + 0x11366, 0x1136C, 0x11370, 0x11374, 0x11438, 0x1143F, 0x11442, 0x11444, + 0x11446, 0x11446, 0x1145E, 0x1145E, 0x114B0, 0x114B0, 0x114B3, 0x114B8, + 0x114BA, 0x114BA, 0x114BD, 0x114BD, 0x114BF, 0x114C0, 0x114C2, 0x114C3, + 0x115AF, 0x115AF, 0x115B2, 0x115B5, 0x115BC, 0x115BD, 0x115BF, 0x115C0, + 0x115DC, 0x115DD, 0x11633, 0x1163A, 0x1163D, 0x1163D, 0x1163F, 0x11640, + 0x116AB, 0x116AB, 0x116AD, 0x116AD, 0x116B0, 0x116B5, 0x116B7, 0x116B7, + 0x1171D, 0x1171F, 0x11722, 0x11725, 0x11727, 0x1172B, 0x1182F, 0x11837, + 0x11839, 0x1183A, 0x11930, 0x11930, 0x1193B, 0x1193C, 0x1193E, 0x1193E, + 0x11943, 0x11943, 0x119D4, 0x119D7, 0x119DA, 0x119DB, 0x119E0, 0x119E0, + 0x11A01, 0x11A0A, 0x11A33, 0x11A38, 0x11A3B, 0x11A3E, 0x11A47, 0x11A47, + 0x11A51, 0x11A56, 0x11A59, 0x11A5B, 0x11A8A, 0x11A96, 0x11A98, 0x11A99, + 0x11C30, 0x11C36, 0x11C38, 0x11C3D, 0x11C3F, 0x11C3F, 0x11C92, 0x11CA7, + 0x11CAA, 0x11CB0, 0x11CB2, 0x11CB3, 0x11CB5, 0x11CB6, 0x11D31, 0x11D36, + 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D45, 0x11D47, 0x11D47, + 0x11D90, 0x11D91, 0x11D95, 0x11D95, 0x11D97, 0x11D97, 0x11EF3, 0x11EF4, + 0x16AF0, 0x16AF4, 0x16B30, 0x16B36, 0x16F4F, 0x16F4F, 0x16F8F, 0x16F92, + 0x16FE4, 0x16FE4, 0x1BC9D, 0x1BC9E, 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, + 0x1D165, 0x1D165, 0x1D167, 0x1D169, 0x1D16E, 0x1D172, 0x1D17B, 0x1D182, + 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0x1D242, 0x1D244, 0x1DA00, 0x1DA36, + 0x1DA3B, 0x1DA6C, 0x1DA75, 0x1DA75, 0x1DA84, 0x1DA84, 0x1DA9B, 0x1DA9F, + 0x1DAA1, 0x1DAAF, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, 0x1E130, 0x1E136, 0x1E2AE, 0x1E2AE, + 0x1E2EC, 0x1E2EF, 0x1E8D0, 0x1E8D6, 0x1E944, 0x1E94A, 0xE0020, 0xE007F, + 0xE0100, 0xE01EF, + // #67 (10700+6): bp=Hex_Digit:Hex + 0x0030, 0x0039, 0x0041, 0x0046, 0x0061, 0x0066, 0xFF10, 0xFF19, + 0xFF21, 0xFF26, 0xFF41, 0xFF46, + // #68 (10706+2): bp=IDS_Binary_Operator:IDSB + 0x2FF0, 0x2FF1, 0x2FF4, 0x2FFB, + // #69 (10708+1): bp=IDS_Trinary_Operator:IDST + 0x2FF2, 0x2FF3, + // #70 (10709+756): bp=ID_Continue:IDC + 0x0030, 0x0039, 0x0041, 0x005A, 0x005F, 0x005F, 0x0061, 0x007A, + 0x00AA, 0x00AA, 0x00B5, 0x00B5, 0x00B7, 0x00B7, 0x00BA, 0x00BA, + 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02C1, 0x02C6, 0x02D1, + 0x02E0, 0x02E4, 0x02EC, 0x02EC, 0x02EE, 0x02EE, 0x0300, 0x0374, + 0x0376, 0x0377, 0x037A, 0x037D, 0x037F, 0x037F, 0x0386, 0x038A, + 0x038C, 0x038C, 0x038E, 0x03A1, 0x03A3, 0x03F5, 0x03F7, 0x0481, + 0x0483, 0x0487, 0x048A, 0x052F, 0x0531, 0x0556, 0x0559, 0x0559, + 0x0560, 0x0588, 0x0591, 0x05BD, 0x05BF, 0x05BF, 0x05C1, 0x05C2, + 0x05C4, 0x05C5, 0x05C7, 0x05C7, 0x05D0, 0x05EA, 0x05EF, 0x05F2, + 0x0610, 0x061A, 0x0620, 0x0669, 0x066E, 0x06D3, 0x06D5, 0x06DC, + 0x06DF, 0x06E8, 0x06EA, 0x06FC, 0x06FF, 0x06FF, 0x0710, 0x074A, + 0x074D, 0x07B1, 0x07C0, 0x07F5, 0x07FA, 0x07FA, 0x07FD, 0x07FD, + 0x0800, 0x082D, 0x0840, 0x085B, 0x0860, 0x086A, 0x0870, 0x0887, + 0x0889, 0x088E, 0x0898, 0x08E1, 0x08E3, 0x0963, 0x0966, 0x096F, + 0x0971, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, + 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BC, 0x09C4, + 0x09C7, 0x09C8, 0x09CB, 0x09CE, 0x09D7, 0x09D7, 0x09DC, 0x09DD, + 0x09DF, 0x09E3, 0x09E6, 0x09F1, 0x09FC, 0x09FC, 0x09FE, 0x09FE, + 0x0A01, 0x0A03, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, + 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, + 0x0A3C, 0x0A3C, 0x0A3E, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, + 0x0A51, 0x0A51, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A66, 0x0A75, + 0x0A81, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABC, 0x0AC5, + 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, + 0x0AE6, 0x0AEF, 0x0AF9, 0x0AFF, 0x0B01, 0x0B03, 0x0B05, 0x0B0C, + 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, + 0x0B35, 0x0B39, 0x0B3C, 0x0B44, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, + 0x0B55, 0x0B57, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B63, 0x0B66, 0x0B6F, + 0x0B71, 0x0B71, 0x0B82, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, + 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, + 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BBE, 0x0BC2, + 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0BD0, 0x0BD0, 0x0BD7, 0x0BD7, + 0x0BE6, 0x0BEF, 0x0C00, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, + 0x0C2A, 0x0C39, 0x0C3C, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, + 0x0C55, 0x0C56, 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, 0x0C60, 0x0C63, + 0x0C66, 0x0C6F, 0x0C80, 0x0C83, 0x0C85, 0x0C8C, 0x0C8E, 0x0C90, + 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBC, 0x0CC4, + 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0CDD, 0x0CDE, + 0x0CE0, 0x0CE3, 0x0CE6, 0x0CEF, 0x0CF1, 0x0CF2, 0x0D00, 0x0D0C, + 0x0D0E, 0x0D10, 0x0D12, 0x0D44, 0x0D46, 0x0D48, 0x0D4A, 0x0D4E, + 0x0D54, 0x0D57, 0x0D5F, 0x0D63, 0x0D66, 0x0D6F, 0x0D7A, 0x0D7F, + 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, + 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCA, 0x0DCA, 0x0DCF, 0x0DD4, + 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DE6, 0x0DEF, 0x0DF2, 0x0DF3, + 0x0E01, 0x0E3A, 0x0E40, 0x0E4E, 0x0E50, 0x0E59, 0x0E81, 0x0E82, + 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, + 0x0EA7, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0EC8, 0x0ECD, + 0x0ED0, 0x0ED9, 0x0EDC, 0x0EDF, 0x0F00, 0x0F00, 0x0F18, 0x0F19, + 0x0F20, 0x0F29, 0x0F35, 0x0F35, 0x0F37, 0x0F37, 0x0F39, 0x0F39, + 0x0F3E, 0x0F47, 0x0F49, 0x0F6C, 0x0F71, 0x0F84, 0x0F86, 0x0F97, + 0x0F99, 0x0FBC, 0x0FC6, 0x0FC6, 0x1000, 0x1049, 0x1050, 0x109D, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x135D, 0x135F, 0x1369, 0x1371, 0x1380, 0x138F, 0x13A0, 0x13F5, + 0x13F8, 0x13FD, 0x1401, 0x166C, 0x166F, 0x167F, 0x1681, 0x169A, + 0x16A0, 0x16EA, 0x16EE, 0x16F8, 0x1700, 0x1715, 0x171F, 0x1734, + 0x1740, 0x1753, 0x1760, 0x176C, 0x176E, 0x1770, 0x1772, 0x1773, + 0x1780, 0x17D3, 0x17D7, 0x17D7, 0x17DC, 0x17DD, 0x17E0, 0x17E9, + 0x180B, 0x180D, 0x180F, 0x1819, 0x1820, 0x1878, 0x1880, 0x18AA, + 0x18B0, 0x18F5, 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x193B, + 0x1946, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, 0x19B0, 0x19C9, + 0x19D0, 0x19DA, 0x1A00, 0x1A1B, 0x1A20, 0x1A5E, 0x1A60, 0x1A7C, + 0x1A7F, 0x1A89, 0x1A90, 0x1A99, 0x1AA7, 0x1AA7, 0x1AB0, 0x1ABD, + 0x1ABF, 0x1ACE, 0x1B00, 0x1B4C, 0x1B50, 0x1B59, 0x1B6B, 0x1B73, + 0x1B80, 0x1BF3, 0x1C00, 0x1C37, 0x1C40, 0x1C49, 0x1C4D, 0x1C7D, + 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1CD0, 0x1CD2, + 0x1CD4, 0x1CFA, 0x1D00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, + 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, + 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, + 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, + 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, + 0x203F, 0x2040, 0x2054, 0x2054, 0x2071, 0x2071, 0x207F, 0x207F, + 0x2090, 0x209C, 0x20D0, 0x20DC, 0x20E1, 0x20E1, 0x20E5, 0x20F0, + 0x2102, 0x2102, 0x2107, 0x2107, 0x210A, 0x2113, 0x2115, 0x2115, + 0x2118, 0x211D, 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, + 0x212A, 0x2139, 0x213C, 0x213F, 0x2145, 0x2149, 0x214E, 0x214E, + 0x2160, 0x2188, 0x2C00, 0x2CE4, 0x2CEB, 0x2CF3, 0x2D00, 0x2D25, + 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, 0x2D30, 0x2D67, 0x2D6F, 0x2D6F, + 0x2D7F, 0x2D96, 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, + 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, + 0x2DD8, 0x2DDE, 0x2DE0, 0x2DFF, 0x3005, 0x3007, 0x3021, 0x302F, + 0x3031, 0x3035, 0x3038, 0x303C, 0x3041, 0x3096, 0x3099, 0x309F, + 0x30A1, 0x30FA, 0x30FC, 0x30FF, 0x3105, 0x312F, 0x3131, 0x318E, + 0x31A0, 0x31BF, 0x31F0, 0x31FF, 0x3400, 0x4DBF, 0x4E00, 0xA48C, + 0xA4D0, 0xA4FD, 0xA500, 0xA60C, 0xA610, 0xA62B, 0xA640, 0xA66F, + 0xA674, 0xA67D, 0xA67F, 0xA6F1, 0xA717, 0xA71F, 0xA722, 0xA788, + 0xA78B, 0xA7CA, 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, + 0xA7F2, 0xA827, 0xA82C, 0xA82C, 0xA840, 0xA873, 0xA880, 0xA8C5, + 0xA8D0, 0xA8D9, 0xA8E0, 0xA8F7, 0xA8FB, 0xA8FB, 0xA8FD, 0xA92D, + 0xA930, 0xA953, 0xA960, 0xA97C, 0xA980, 0xA9C0, 0xA9CF, 0xA9D9, + 0xA9E0, 0xA9FE, 0xAA00, 0xAA36, 0xAA40, 0xAA4D, 0xAA50, 0xAA59, + 0xAA60, 0xAA76, 0xAA7A, 0xAAC2, 0xAADB, 0xAADD, 0xAAE0, 0xAAEF, + 0xAAF2, 0xAAF6, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, 0xAB11, 0xAB16, + 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB5A, 0xAB5C, 0xAB69, + 0xAB70, 0xABEA, 0xABEC, 0xABED, 0xABF0, 0xABF9, 0xAC00, 0xD7A3, + 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, + 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFB1D, 0xFB28, 0xFB2A, 0xFB36, + 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, + 0xFB46, 0xFBB1, 0xFBD3, 0xFD3D, 0xFD50, 0xFD8F, 0xFD92, 0xFDC7, + 0xFDF0, 0xFDFB, 0xFE00, 0xFE0F, 0xFE20, 0xFE2F, 0xFE33, 0xFE34, + 0xFE4D, 0xFE4F, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0xFF10, 0xFF19, + 0xFF21, 0xFF3A, 0xFF3F, 0xFF3F, 0xFF41, 0xFF5A, 0xFF66, 0xFFBE, + 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, + 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, + 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, 0x10140, 0x10174, + 0x101FD, 0x101FD, 0x10280, 0x1029C, 0x102A0, 0x102D0, 0x102E0, 0x102E0, + 0x10300, 0x1031F, 0x1032D, 0x1034A, 0x10350, 0x1037A, 0x10380, 0x1039D, + 0x103A0, 0x103C3, 0x103C8, 0x103CF, 0x103D1, 0x103D5, 0x10400, 0x1049D, + 0x104A0, 0x104A9, 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10500, 0x10527, + 0x10530, 0x10563, 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, + 0x10594, 0x10595, 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, + 0x105BB, 0x105BC, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10800, 0x10805, + 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, + 0x1083F, 0x10855, 0x10860, 0x10876, 0x10880, 0x1089E, 0x108E0, 0x108F2, + 0x108F4, 0x108F5, 0x10900, 0x10915, 0x10920, 0x10939, 0x10980, 0x109B7, + 0x109BE, 0x109BF, 0x10A00, 0x10A03, 0x10A05, 0x10A06, 0x10A0C, 0x10A13, + 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A38, 0x10A3A, 0x10A3F, 0x10A3F, + 0x10A60, 0x10A7C, 0x10A80, 0x10A9C, 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE6, + 0x10B00, 0x10B35, 0x10B40, 0x10B55, 0x10B60, 0x10B72, 0x10B80, 0x10B91, + 0x10C00, 0x10C48, 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10D00, 0x10D27, + 0x10D30, 0x10D39, 0x10E80, 0x10EA9, 0x10EAB, 0x10EAC, 0x10EB0, 0x10EB1, + 0x10F00, 0x10F1C, 0x10F27, 0x10F27, 0x10F30, 0x10F50, 0x10F70, 0x10F85, + 0x10FB0, 0x10FC4, 0x10FE0, 0x10FF6, 0x11000, 0x11046, 0x11066, 0x11075, + 0x1107F, 0x110BA, 0x110C2, 0x110C2, 0x110D0, 0x110E8, 0x110F0, 0x110F9, + 0x11100, 0x11134, 0x11136, 0x1113F, 0x11144, 0x11147, 0x11150, 0x11173, + 0x11176, 0x11176, 0x11180, 0x111C4, 0x111C9, 0x111CC, 0x111CE, 0x111DA, + 0x111DC, 0x111DC, 0x11200, 0x11211, 0x11213, 0x11237, 0x1123E, 0x1123E, + 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, + 0x1129F, 0x112A8, 0x112B0, 0x112EA, 0x112F0, 0x112F9, 0x11300, 0x11303, + 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, 0x1132A, 0x11330, + 0x11332, 0x11333, 0x11335, 0x11339, 0x1133B, 0x11344, 0x11347, 0x11348, + 0x1134B, 0x1134D, 0x11350, 0x11350, 0x11357, 0x11357, 0x1135D, 0x11363, + 0x11366, 0x1136C, 0x11370, 0x11374, 0x11400, 0x1144A, 0x11450, 0x11459, + 0x1145E, 0x11461, 0x11480, 0x114C5, 0x114C7, 0x114C7, 0x114D0, 0x114D9, + 0x11580, 0x115B5, 0x115B8, 0x115C0, 0x115D8, 0x115DD, 0x11600, 0x11640, + 0x11644, 0x11644, 0x11650, 0x11659, 0x11680, 0x116B8, 0x116C0, 0x116C9, + 0x11700, 0x1171A, 0x1171D, 0x1172B, 0x11730, 0x11739, 0x11740, 0x11746, + 0x11800, 0x1183A, 0x118A0, 0x118E9, 0x118FF, 0x11906, 0x11909, 0x11909, + 0x1190C, 0x11913, 0x11915, 0x11916, 0x11918, 0x11935, 0x11937, 0x11938, + 0x1193B, 0x11943, 0x11950, 0x11959, 0x119A0, 0x119A7, 0x119AA, 0x119D7, + 0x119DA, 0x119E1, 0x119E3, 0x119E4, 0x11A00, 0x11A3E, 0x11A47, 0x11A47, + 0x11A50, 0x11A99, 0x11A9D, 0x11A9D, 0x11AB0, 0x11AF8, 0x11C00, 0x11C08, + 0x11C0A, 0x11C36, 0x11C38, 0x11C40, 0x11C50, 0x11C59, 0x11C72, 0x11C8F, + 0x11C92, 0x11CA7, 0x11CA9, 0x11CB6, 0x11D00, 0x11D06, 0x11D08, 0x11D09, + 0x11D0B, 0x11D36, 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D47, + 0x11D50, 0x11D59, 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, + 0x11D90, 0x11D91, 0x11D93, 0x11D98, 0x11DA0, 0x11DA9, 0x11EE0, 0x11EF6, + 0x11FB0, 0x11FB0, 0x12000, 0x12399, 0x12400, 0x1246E, 0x12480, 0x12543, + 0x12F90, 0x12FF0, 0x13000, 0x1342E, 0x14400, 0x14646, 0x16800, 0x16A38, + 0x16A40, 0x16A5E, 0x16A60, 0x16A69, 0x16A70, 0x16ABE, 0x16AC0, 0x16AC9, + 0x16AD0, 0x16AED, 0x16AF0, 0x16AF4, 0x16B00, 0x16B36, 0x16B40, 0x16B43, + 0x16B50, 0x16B59, 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, 0x16E40, 0x16E7F, + 0x16F00, 0x16F4A, 0x16F4F, 0x16F87, 0x16F8F, 0x16F9F, 0x16FE0, 0x16FE1, + 0x16FE3, 0x16FE4, 0x16FF0, 0x16FF1, 0x17000, 0x187F7, 0x18800, 0x18CD5, + 0x18D00, 0x18D08, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, + 0x1B000, 0x1B122, 0x1B150, 0x1B152, 0x1B164, 0x1B167, 0x1B170, 0x1B2FB, + 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, + 0x1BC9D, 0x1BC9E, 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1D165, 0x1D169, + 0x1D16D, 0x1D172, 0x1D17B, 0x1D182, 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, + 0x1D242, 0x1D244, 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, + 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, + 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, + 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, + 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, + 0x1D6A8, 0x1D6C0, 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6FA, 0x1D6FC, 0x1D714, + 0x1D716, 0x1D734, 0x1D736, 0x1D74E, 0x1D750, 0x1D76E, 0x1D770, 0x1D788, + 0x1D78A, 0x1D7A8, 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7CB, 0x1D7CE, 0x1D7FF, + 0x1DA00, 0x1DA36, 0x1DA3B, 0x1DA6C, 0x1DA75, 0x1DA75, 0x1DA84, 0x1DA84, + 0x1DA9B, 0x1DA9F, 0x1DAA1, 0x1DAAF, 0x1DF00, 0x1DF1E, 0x1E000, 0x1E006, + 0x1E008, 0x1E018, 0x1E01B, 0x1E021, 0x1E023, 0x1E024, 0x1E026, 0x1E02A, + 0x1E100, 0x1E12C, 0x1E130, 0x1E13D, 0x1E140, 0x1E149, 0x1E14E, 0x1E14E, + 0x1E290, 0x1E2AE, 0x1E2C0, 0x1E2F9, 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, + 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, 0x1E800, 0x1E8C4, 0x1E8D0, 0x1E8D6, + 0x1E900, 0x1E94B, 0x1E950, 0x1E959, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, + 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, + 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, + 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, + 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, + 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, + 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, + 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, + 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1FBF0, 0x1FBF9, + 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, + 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, 0xE0100, 0xE01EF, + // #71 (11465+648): bp=ID_Start:IDS + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00B5, 0x00B5, + 0x00BA, 0x00BA, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02C1, + 0x02C6, 0x02D1, 0x02E0, 0x02E4, 0x02EC, 0x02EC, 0x02EE, 0x02EE, + 0x0370, 0x0374, 0x0376, 0x0377, 0x037A, 0x037D, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, + 0x03A3, 0x03F5, 0x03F7, 0x0481, 0x048A, 0x052F, 0x0531, 0x0556, + 0x0559, 0x0559, 0x0560, 0x0588, 0x05D0, 0x05EA, 0x05EF, 0x05F2, + 0x0620, 0x064A, 0x066E, 0x066F, 0x0671, 0x06D3, 0x06D5, 0x06D5, + 0x06E5, 0x06E6, 0x06EE, 0x06EF, 0x06FA, 0x06FC, 0x06FF, 0x06FF, + 0x0710, 0x0710, 0x0712, 0x072F, 0x074D, 0x07A5, 0x07B1, 0x07B1, + 0x07CA, 0x07EA, 0x07F4, 0x07F5, 0x07FA, 0x07FA, 0x0800, 0x0815, + 0x081A, 0x081A, 0x0824, 0x0824, 0x0828, 0x0828, 0x0840, 0x0858, + 0x0860, 0x086A, 0x0870, 0x0887, 0x0889, 0x088E, 0x08A0, 0x08C9, + 0x0904, 0x0939, 0x093D, 0x093D, 0x0950, 0x0950, 0x0958, 0x0961, + 0x0971, 0x0980, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, + 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BD, 0x09BD, + 0x09CE, 0x09CE, 0x09DC, 0x09DD, 0x09DF, 0x09E1, 0x09F0, 0x09F1, + 0x09FC, 0x09FC, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, + 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, + 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A72, 0x0A74, 0x0A85, 0x0A8D, + 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, + 0x0AB5, 0x0AB9, 0x0ABD, 0x0ABD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE1, + 0x0AF9, 0x0AF9, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, + 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B35, 0x0B39, 0x0B3D, 0x0B3D, + 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, 0x0B71, 0x0B71, 0x0B83, 0x0B83, + 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, + 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, + 0x0BAE, 0x0BB9, 0x0BD0, 0x0BD0, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, + 0x0C12, 0x0C28, 0x0C2A, 0x0C39, 0x0C3D, 0x0C3D, 0x0C58, 0x0C5A, + 0x0C5D, 0x0C5D, 0x0C60, 0x0C61, 0x0C80, 0x0C80, 0x0C85, 0x0C8C, + 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, + 0x0CBD, 0x0CBD, 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE1, 0x0CF1, 0x0CF2, + 0x0D04, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D3A, 0x0D3D, 0x0D3D, + 0x0D4E, 0x0D4E, 0x0D54, 0x0D56, 0x0D5F, 0x0D61, 0x0D7A, 0x0D7F, + 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, + 0x0DC0, 0x0DC6, 0x0E01, 0x0E30, 0x0E32, 0x0E33, 0x0E40, 0x0E46, + 0x0E81, 0x0E82, 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, + 0x0EA5, 0x0EA5, 0x0EA7, 0x0EB0, 0x0EB2, 0x0EB3, 0x0EBD, 0x0EBD, + 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0EDC, 0x0EDF, 0x0F00, 0x0F00, + 0x0F40, 0x0F47, 0x0F49, 0x0F6C, 0x0F88, 0x0F8C, 0x1000, 0x102A, + 0x103F, 0x103F, 0x1050, 0x1055, 0x105A, 0x105D, 0x1061, 0x1061, + 0x1065, 0x1066, 0x106E, 0x1070, 0x1075, 0x1081, 0x108E, 0x108E, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x1380, 0x138F, 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0x1401, 0x166C, + 0x166F, 0x167F, 0x1681, 0x169A, 0x16A0, 0x16EA, 0x16EE, 0x16F8, + 0x1700, 0x1711, 0x171F, 0x1731, 0x1740, 0x1751, 0x1760, 0x176C, + 0x176E, 0x1770, 0x1780, 0x17B3, 0x17D7, 0x17D7, 0x17DC, 0x17DC, + 0x1820, 0x1878, 0x1880, 0x18A8, 0x18AA, 0x18AA, 0x18B0, 0x18F5, + 0x1900, 0x191E, 0x1950, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, + 0x19B0, 0x19C9, 0x1A00, 0x1A16, 0x1A20, 0x1A54, 0x1AA7, 0x1AA7, + 0x1B05, 0x1B33, 0x1B45, 0x1B4C, 0x1B83, 0x1BA0, 0x1BAE, 0x1BAF, + 0x1BBA, 0x1BE5, 0x1C00, 0x1C23, 0x1C4D, 0x1C4F, 0x1C5A, 0x1C7D, + 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF6, 0x1CFA, 0x1CFA, 0x1D00, 0x1DBF, + 0x1E00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, + 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, + 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, 0x1FBE, 0x1FBE, + 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, + 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, 0x2071, 0x2071, + 0x207F, 0x207F, 0x2090, 0x209C, 0x2102, 0x2102, 0x2107, 0x2107, + 0x210A, 0x2113, 0x2115, 0x2115, 0x2118, 0x211D, 0x2124, 0x2124, + 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x2139, 0x213C, 0x213F, + 0x2145, 0x2149, 0x214E, 0x214E, 0x2160, 0x2188, 0x2C00, 0x2CE4, + 0x2CEB, 0x2CEE, 0x2CF2, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, + 0x2D2D, 0x2D2D, 0x2D30, 0x2D67, 0x2D6F, 0x2D6F, 0x2D80, 0x2D96, + 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, + 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, + 0x3005, 0x3007, 0x3021, 0x3029, 0x3031, 0x3035, 0x3038, 0x303C, + 0x3041, 0x3096, 0x309B, 0x309F, 0x30A1, 0x30FA, 0x30FC, 0x30FF, + 0x3105, 0x312F, 0x3131, 0x318E, 0x31A0, 0x31BF, 0x31F0, 0x31FF, + 0x3400, 0x4DBF, 0x4E00, 0xA48C, 0xA4D0, 0xA4FD, 0xA500, 0xA60C, + 0xA610, 0xA61F, 0xA62A, 0xA62B, 0xA640, 0xA66E, 0xA67F, 0xA69D, + 0xA6A0, 0xA6EF, 0xA717, 0xA71F, 0xA722, 0xA788, 0xA78B, 0xA7CA, + 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, 0xA7F2, 0xA801, + 0xA803, 0xA805, 0xA807, 0xA80A, 0xA80C, 0xA822, 0xA840, 0xA873, + 0xA882, 0xA8B3, 0xA8F2, 0xA8F7, 0xA8FB, 0xA8FB, 0xA8FD, 0xA8FE, + 0xA90A, 0xA925, 0xA930, 0xA946, 0xA960, 0xA97C, 0xA984, 0xA9B2, + 0xA9CF, 0xA9CF, 0xA9E0, 0xA9E4, 0xA9E6, 0xA9EF, 0xA9FA, 0xA9FE, + 0xAA00, 0xAA28, 0xAA40, 0xAA42, 0xAA44, 0xAA4B, 0xAA60, 0xAA76, + 0xAA7A, 0xAA7A, 0xAA7E, 0xAAAF, 0xAAB1, 0xAAB1, 0xAAB5, 0xAAB6, + 0xAAB9, 0xAABD, 0xAAC0, 0xAAC0, 0xAAC2, 0xAAC2, 0xAADB, 0xAADD, + 0xAAE0, 0xAAEA, 0xAAF2, 0xAAF4, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, + 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB5A, + 0xAB5C, 0xAB69, 0xAB70, 0xABE2, 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, + 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0xFB00, 0xFB06, + 0xFB13, 0xFB17, 0xFB1D, 0xFB1D, 0xFB1F, 0xFB28, 0xFB2A, 0xFB36, + 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, + 0xFB46, 0xFBB1, 0xFBD3, 0xFD3D, 0xFD50, 0xFD8F, 0xFD92, 0xFDC7, + 0xFDF0, 0xFDFB, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0xFF21, 0xFF3A, + 0xFF41, 0xFF5A, 0xFF66, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, + 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, 0x10000, 0x1000B, 0x1000D, 0x10026, + 0x10028, 0x1003A, 0x1003C, 0x1003D, 0x1003F, 0x1004D, 0x10050, 0x1005D, + 0x10080, 0x100FA, 0x10140, 0x10174, 0x10280, 0x1029C, 0x102A0, 0x102D0, + 0x10300, 0x1031F, 0x1032D, 0x1034A, 0x10350, 0x10375, 0x10380, 0x1039D, + 0x103A0, 0x103C3, 0x103C8, 0x103CF, 0x103D1, 0x103D5, 0x10400, 0x1049D, + 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, + 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, + 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, 0x10780, 0x10785, + 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10800, 0x10805, 0x10808, 0x10808, + 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, 0x1083F, 0x10855, + 0x10860, 0x10876, 0x10880, 0x1089E, 0x108E0, 0x108F2, 0x108F4, 0x108F5, + 0x10900, 0x10915, 0x10920, 0x10939, 0x10980, 0x109B7, 0x109BE, 0x109BF, + 0x10A00, 0x10A00, 0x10A10, 0x10A13, 0x10A15, 0x10A17, 0x10A19, 0x10A35, + 0x10A60, 0x10A7C, 0x10A80, 0x10A9C, 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE4, + 0x10B00, 0x10B35, 0x10B40, 0x10B55, 0x10B60, 0x10B72, 0x10B80, 0x10B91, + 0x10C00, 0x10C48, 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10D00, 0x10D23, + 0x10E80, 0x10EA9, 0x10EB0, 0x10EB1, 0x10F00, 0x10F1C, 0x10F27, 0x10F27, + 0x10F30, 0x10F45, 0x10F70, 0x10F81, 0x10FB0, 0x10FC4, 0x10FE0, 0x10FF6, + 0x11003, 0x11037, 0x11071, 0x11072, 0x11075, 0x11075, 0x11083, 0x110AF, + 0x110D0, 0x110E8, 0x11103, 0x11126, 0x11144, 0x11144, 0x11147, 0x11147, + 0x11150, 0x11172, 0x11176, 0x11176, 0x11183, 0x111B2, 0x111C1, 0x111C4, + 0x111DA, 0x111DA, 0x111DC, 0x111DC, 0x11200, 0x11211, 0x11213, 0x1122B, + 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, + 0x1129F, 0x112A8, 0x112B0, 0x112DE, 0x11305, 0x1130C, 0x1130F, 0x11310, + 0x11313, 0x11328, 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, + 0x1133D, 0x1133D, 0x11350, 0x11350, 0x1135D, 0x11361, 0x11400, 0x11434, + 0x11447, 0x1144A, 0x1145F, 0x11461, 0x11480, 0x114AF, 0x114C4, 0x114C5, + 0x114C7, 0x114C7, 0x11580, 0x115AE, 0x115D8, 0x115DB, 0x11600, 0x1162F, + 0x11644, 0x11644, 0x11680, 0x116AA, 0x116B8, 0x116B8, 0x11700, 0x1171A, + 0x11740, 0x11746, 0x11800, 0x1182B, 0x118A0, 0x118DF, 0x118FF, 0x11906, + 0x11909, 0x11909, 0x1190C, 0x11913, 0x11915, 0x11916, 0x11918, 0x1192F, + 0x1193F, 0x1193F, 0x11941, 0x11941, 0x119A0, 0x119A7, 0x119AA, 0x119D0, + 0x119E1, 0x119E1, 0x119E3, 0x119E3, 0x11A00, 0x11A00, 0x11A0B, 0x11A32, + 0x11A3A, 0x11A3A, 0x11A50, 0x11A50, 0x11A5C, 0x11A89, 0x11A9D, 0x11A9D, + 0x11AB0, 0x11AF8, 0x11C00, 0x11C08, 0x11C0A, 0x11C2E, 0x11C40, 0x11C40, + 0x11C72, 0x11C8F, 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D30, + 0x11D46, 0x11D46, 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D89, + 0x11D98, 0x11D98, 0x11EE0, 0x11EF2, 0x11FB0, 0x11FB0, 0x12000, 0x12399, + 0x12400, 0x1246E, 0x12480, 0x12543, 0x12F90, 0x12FF0, 0x13000, 0x1342E, + 0x14400, 0x14646, 0x16800, 0x16A38, 0x16A40, 0x16A5E, 0x16A70, 0x16ABE, + 0x16AD0, 0x16AED, 0x16B00, 0x16B2F, 0x16B40, 0x16B43, 0x16B63, 0x16B77, + 0x16B7D, 0x16B8F, 0x16E40, 0x16E7F, 0x16F00, 0x16F4A, 0x16F50, 0x16F50, + 0x16F93, 0x16F9F, 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE3, 0x17000, 0x187F7, + 0x18800, 0x18CD5, 0x18D00, 0x18D08, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, + 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B122, 0x1B150, 0x1B152, 0x1B164, 0x1B167, + 0x1B170, 0x1B2FB, 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, + 0x1BC90, 0x1BC99, 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, + 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, + 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, + 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, + 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, + 0x1D6A8, 0x1D6C0, 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6FA, 0x1D6FC, 0x1D714, + 0x1D716, 0x1D734, 0x1D736, 0x1D74E, 0x1D750, 0x1D76E, 0x1D770, 0x1D788, + 0x1D78A, 0x1D7A8, 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7CB, 0x1DF00, 0x1DF1E, + 0x1E100, 0x1E12C, 0x1E137, 0x1E13D, 0x1E14E, 0x1E14E, 0x1E290, 0x1E2AD, + 0x1E2C0, 0x1E2EB, 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, + 0x1E7F0, 0x1E7FE, 0x1E800, 0x1E8C4, 0x1E900, 0x1E943, 0x1E94B, 0x1E94B, + 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, + 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, + 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, + 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, + 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, + 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, + 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, + 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, + 0x1EEAB, 0x1EEBB, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, + 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, + // #72 (12113+19): bp=Ideographic:Ideo + 0x3006, 0x3007, 0x3021, 0x3029, 0x3038, 0x303A, 0x3400, 0x4DBF, + 0x4E00, 0x9FFF, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0x16FE4, 0x16FE4, + 0x17000, 0x187F7, 0x18800, 0x18CD5, 0x18D00, 0x18D08, 0x1B170, 0x1B2FB, + 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, + 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, + // #73 (12132+1): bp=Join_Control:Join_C + 0x200C, 0x200D, + // #74 (12133+7): bp=Logical_Order_Exception:LOE + 0x0E40, 0x0E44, 0x0EC0, 0x0EC4, 0x19B5, 0x19B7, 0x19BA, 0x19BA, + 0xAAB5, 0xAAB6, 0xAAB9, 0xAAB9, 0xAABB, 0xAABC, + // #75 (12140+668): bp=Lowercase:Lower + 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00B5, 0x00B5, 0x00BA, 0x00BA, + 0x00DF, 0x00F6, 0x00F8, 0x00FF, 0x0101, 0x0101, 0x0103, 0x0103, + 0x0105, 0x0105, 0x0107, 0x0107, 0x0109, 0x0109, 0x010B, 0x010B, + 0x010D, 0x010D, 0x010F, 0x010F, 0x0111, 0x0111, 0x0113, 0x0113, + 0x0115, 0x0115, 0x0117, 0x0117, 0x0119, 0x0119, 0x011B, 0x011B, + 0x011D, 0x011D, 0x011F, 0x011F, 0x0121, 0x0121, 0x0123, 0x0123, + 0x0125, 0x0125, 0x0127, 0x0127, 0x0129, 0x0129, 0x012B, 0x012B, + 0x012D, 0x012D, 0x012F, 0x012F, 0x0131, 0x0131, 0x0133, 0x0133, + 0x0135, 0x0135, 0x0137, 0x0138, 0x013A, 0x013A, 0x013C, 0x013C, + 0x013E, 0x013E, 0x0140, 0x0140, 0x0142, 0x0142, 0x0144, 0x0144, + 0x0146, 0x0146, 0x0148, 0x0149, 0x014B, 0x014B, 0x014D, 0x014D, + 0x014F, 0x014F, 0x0151, 0x0151, 0x0153, 0x0153, 0x0155, 0x0155, + 0x0157, 0x0157, 0x0159, 0x0159, 0x015B, 0x015B, 0x015D, 0x015D, + 0x015F, 0x015F, 0x0161, 0x0161, 0x0163, 0x0163, 0x0165, 0x0165, + 0x0167, 0x0167, 0x0169, 0x0169, 0x016B, 0x016B, 0x016D, 0x016D, + 0x016F, 0x016F, 0x0171, 0x0171, 0x0173, 0x0173, 0x0175, 0x0175, + 0x0177, 0x0177, 0x017A, 0x017A, 0x017C, 0x017C, 0x017E, 0x0180, + 0x0183, 0x0183, 0x0185, 0x0185, 0x0188, 0x0188, 0x018C, 0x018D, + 0x0192, 0x0192, 0x0195, 0x0195, 0x0199, 0x019B, 0x019E, 0x019E, + 0x01A1, 0x01A1, 0x01A3, 0x01A3, 0x01A5, 0x01A5, 0x01A8, 0x01A8, + 0x01AA, 0x01AB, 0x01AD, 0x01AD, 0x01B0, 0x01B0, 0x01B4, 0x01B4, + 0x01B6, 0x01B6, 0x01B9, 0x01BA, 0x01BD, 0x01BF, 0x01C6, 0x01C6, + 0x01C9, 0x01C9, 0x01CC, 0x01CC, 0x01CE, 0x01CE, 0x01D0, 0x01D0, + 0x01D2, 0x01D2, 0x01D4, 0x01D4, 0x01D6, 0x01D6, 0x01D8, 0x01D8, + 0x01DA, 0x01DA, 0x01DC, 0x01DD, 0x01DF, 0x01DF, 0x01E1, 0x01E1, + 0x01E3, 0x01E3, 0x01E5, 0x01E5, 0x01E7, 0x01E7, 0x01E9, 0x01E9, + 0x01EB, 0x01EB, 0x01ED, 0x01ED, 0x01EF, 0x01F0, 0x01F3, 0x01F3, + 0x01F5, 0x01F5, 0x01F9, 0x01F9, 0x01FB, 0x01FB, 0x01FD, 0x01FD, + 0x01FF, 0x01FF, 0x0201, 0x0201, 0x0203, 0x0203, 0x0205, 0x0205, + 0x0207, 0x0207, 0x0209, 0x0209, 0x020B, 0x020B, 0x020D, 0x020D, + 0x020F, 0x020F, 0x0211, 0x0211, 0x0213, 0x0213, 0x0215, 0x0215, + 0x0217, 0x0217, 0x0219, 0x0219, 0x021B, 0x021B, 0x021D, 0x021D, + 0x021F, 0x021F, 0x0221, 0x0221, 0x0223, 0x0223, 0x0225, 0x0225, + 0x0227, 0x0227, 0x0229, 0x0229, 0x022B, 0x022B, 0x022D, 0x022D, + 0x022F, 0x022F, 0x0231, 0x0231, 0x0233, 0x0239, 0x023C, 0x023C, + 0x023F, 0x0240, 0x0242, 0x0242, 0x0247, 0x0247, 0x0249, 0x0249, + 0x024B, 0x024B, 0x024D, 0x024D, 0x024F, 0x0293, 0x0295, 0x02B8, + 0x02C0, 0x02C1, 0x02E0, 0x02E4, 0x0345, 0x0345, 0x0371, 0x0371, + 0x0373, 0x0373, 0x0377, 0x0377, 0x037A, 0x037D, 0x0390, 0x0390, + 0x03AC, 0x03CE, 0x03D0, 0x03D1, 0x03D5, 0x03D7, 0x03D9, 0x03D9, + 0x03DB, 0x03DB, 0x03DD, 0x03DD, 0x03DF, 0x03DF, 0x03E1, 0x03E1, + 0x03E3, 0x03E3, 0x03E5, 0x03E5, 0x03E7, 0x03E7, 0x03E9, 0x03E9, + 0x03EB, 0x03EB, 0x03ED, 0x03ED, 0x03EF, 0x03F3, 0x03F5, 0x03F5, + 0x03F8, 0x03F8, 0x03FB, 0x03FC, 0x0430, 0x045F, 0x0461, 0x0461, + 0x0463, 0x0463, 0x0465, 0x0465, 0x0467, 0x0467, 0x0469, 0x0469, + 0x046B, 0x046B, 0x046D, 0x046D, 0x046F, 0x046F, 0x0471, 0x0471, + 0x0473, 0x0473, 0x0475, 0x0475, 0x0477, 0x0477, 0x0479, 0x0479, + 0x047B, 0x047B, 0x047D, 0x047D, 0x047F, 0x047F, 0x0481, 0x0481, + 0x048B, 0x048B, 0x048D, 0x048D, 0x048F, 0x048F, 0x0491, 0x0491, + 0x0493, 0x0493, 0x0495, 0x0495, 0x0497, 0x0497, 0x0499, 0x0499, + 0x049B, 0x049B, 0x049D, 0x049D, 0x049F, 0x049F, 0x04A1, 0x04A1, + 0x04A3, 0x04A3, 0x04A5, 0x04A5, 0x04A7, 0x04A7, 0x04A9, 0x04A9, + 0x04AB, 0x04AB, 0x04AD, 0x04AD, 0x04AF, 0x04AF, 0x04B1, 0x04B1, + 0x04B3, 0x04B3, 0x04B5, 0x04B5, 0x04B7, 0x04B7, 0x04B9, 0x04B9, + 0x04BB, 0x04BB, 0x04BD, 0x04BD, 0x04BF, 0x04BF, 0x04C2, 0x04C2, + 0x04C4, 0x04C4, 0x04C6, 0x04C6, 0x04C8, 0x04C8, 0x04CA, 0x04CA, + 0x04CC, 0x04CC, 0x04CE, 0x04CF, 0x04D1, 0x04D1, 0x04D3, 0x04D3, + 0x04D5, 0x04D5, 0x04D7, 0x04D7, 0x04D9, 0x04D9, 0x04DB, 0x04DB, + 0x04DD, 0x04DD, 0x04DF, 0x04DF, 0x04E1, 0x04E1, 0x04E3, 0x04E3, + 0x04E5, 0x04E5, 0x04E7, 0x04E7, 0x04E9, 0x04E9, 0x04EB, 0x04EB, + 0x04ED, 0x04ED, 0x04EF, 0x04EF, 0x04F1, 0x04F1, 0x04F3, 0x04F3, + 0x04F5, 0x04F5, 0x04F7, 0x04F7, 0x04F9, 0x04F9, 0x04FB, 0x04FB, + 0x04FD, 0x04FD, 0x04FF, 0x04FF, 0x0501, 0x0501, 0x0503, 0x0503, + 0x0505, 0x0505, 0x0507, 0x0507, 0x0509, 0x0509, 0x050B, 0x050B, + 0x050D, 0x050D, 0x050F, 0x050F, 0x0511, 0x0511, 0x0513, 0x0513, + 0x0515, 0x0515, 0x0517, 0x0517, 0x0519, 0x0519, 0x051B, 0x051B, + 0x051D, 0x051D, 0x051F, 0x051F, 0x0521, 0x0521, 0x0523, 0x0523, + 0x0525, 0x0525, 0x0527, 0x0527, 0x0529, 0x0529, 0x052B, 0x052B, + 0x052D, 0x052D, 0x052F, 0x052F, 0x0560, 0x0588, 0x10D0, 0x10FA, + 0x10FD, 0x10FF, 0x13F8, 0x13FD, 0x1C80, 0x1C88, 0x1D00, 0x1DBF, + 0x1E01, 0x1E01, 0x1E03, 0x1E03, 0x1E05, 0x1E05, 0x1E07, 0x1E07, + 0x1E09, 0x1E09, 0x1E0B, 0x1E0B, 0x1E0D, 0x1E0D, 0x1E0F, 0x1E0F, + 0x1E11, 0x1E11, 0x1E13, 0x1E13, 0x1E15, 0x1E15, 0x1E17, 0x1E17, + 0x1E19, 0x1E19, 0x1E1B, 0x1E1B, 0x1E1D, 0x1E1D, 0x1E1F, 0x1E1F, + 0x1E21, 0x1E21, 0x1E23, 0x1E23, 0x1E25, 0x1E25, 0x1E27, 0x1E27, + 0x1E29, 0x1E29, 0x1E2B, 0x1E2B, 0x1E2D, 0x1E2D, 0x1E2F, 0x1E2F, + 0x1E31, 0x1E31, 0x1E33, 0x1E33, 0x1E35, 0x1E35, 0x1E37, 0x1E37, + 0x1E39, 0x1E39, 0x1E3B, 0x1E3B, 0x1E3D, 0x1E3D, 0x1E3F, 0x1E3F, + 0x1E41, 0x1E41, 0x1E43, 0x1E43, 0x1E45, 0x1E45, 0x1E47, 0x1E47, + 0x1E49, 0x1E49, 0x1E4B, 0x1E4B, 0x1E4D, 0x1E4D, 0x1E4F, 0x1E4F, + 0x1E51, 0x1E51, 0x1E53, 0x1E53, 0x1E55, 0x1E55, 0x1E57, 0x1E57, + 0x1E59, 0x1E59, 0x1E5B, 0x1E5B, 0x1E5D, 0x1E5D, 0x1E5F, 0x1E5F, + 0x1E61, 0x1E61, 0x1E63, 0x1E63, 0x1E65, 0x1E65, 0x1E67, 0x1E67, + 0x1E69, 0x1E69, 0x1E6B, 0x1E6B, 0x1E6D, 0x1E6D, 0x1E6F, 0x1E6F, + 0x1E71, 0x1E71, 0x1E73, 0x1E73, 0x1E75, 0x1E75, 0x1E77, 0x1E77, + 0x1E79, 0x1E79, 0x1E7B, 0x1E7B, 0x1E7D, 0x1E7D, 0x1E7F, 0x1E7F, + 0x1E81, 0x1E81, 0x1E83, 0x1E83, 0x1E85, 0x1E85, 0x1E87, 0x1E87, + 0x1E89, 0x1E89, 0x1E8B, 0x1E8B, 0x1E8D, 0x1E8D, 0x1E8F, 0x1E8F, + 0x1E91, 0x1E91, 0x1E93, 0x1E93, 0x1E95, 0x1E9D, 0x1E9F, 0x1E9F, + 0x1EA1, 0x1EA1, 0x1EA3, 0x1EA3, 0x1EA5, 0x1EA5, 0x1EA7, 0x1EA7, + 0x1EA9, 0x1EA9, 0x1EAB, 0x1EAB, 0x1EAD, 0x1EAD, 0x1EAF, 0x1EAF, + 0x1EB1, 0x1EB1, 0x1EB3, 0x1EB3, 0x1EB5, 0x1EB5, 0x1EB7, 0x1EB7, + 0x1EB9, 0x1EB9, 0x1EBB, 0x1EBB, 0x1EBD, 0x1EBD, 0x1EBF, 0x1EBF, + 0x1EC1, 0x1EC1, 0x1EC3, 0x1EC3, 0x1EC5, 0x1EC5, 0x1EC7, 0x1EC7, + 0x1EC9, 0x1EC9, 0x1ECB, 0x1ECB, 0x1ECD, 0x1ECD, 0x1ECF, 0x1ECF, + 0x1ED1, 0x1ED1, 0x1ED3, 0x1ED3, 0x1ED5, 0x1ED5, 0x1ED7, 0x1ED7, + 0x1ED9, 0x1ED9, 0x1EDB, 0x1EDB, 0x1EDD, 0x1EDD, 0x1EDF, 0x1EDF, + 0x1EE1, 0x1EE1, 0x1EE3, 0x1EE3, 0x1EE5, 0x1EE5, 0x1EE7, 0x1EE7, + 0x1EE9, 0x1EE9, 0x1EEB, 0x1EEB, 0x1EED, 0x1EED, 0x1EEF, 0x1EEF, + 0x1EF1, 0x1EF1, 0x1EF3, 0x1EF3, 0x1EF5, 0x1EF5, 0x1EF7, 0x1EF7, + 0x1EF9, 0x1EF9, 0x1EFB, 0x1EFB, 0x1EFD, 0x1EFD, 0x1EFF, 0x1F07, + 0x1F10, 0x1F15, 0x1F20, 0x1F27, 0x1F30, 0x1F37, 0x1F40, 0x1F45, + 0x1F50, 0x1F57, 0x1F60, 0x1F67, 0x1F70, 0x1F7D, 0x1F80, 0x1F87, + 0x1F90, 0x1F97, 0x1FA0, 0x1FA7, 0x1FB0, 0x1FB4, 0x1FB6, 0x1FB7, + 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FC7, 0x1FD0, 0x1FD3, + 0x1FD6, 0x1FD7, 0x1FE0, 0x1FE7, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FF7, + 0x2071, 0x2071, 0x207F, 0x207F, 0x2090, 0x209C, 0x210A, 0x210A, + 0x210E, 0x210F, 0x2113, 0x2113, 0x212F, 0x212F, 0x2134, 0x2134, + 0x2139, 0x2139, 0x213C, 0x213D, 0x2146, 0x2149, 0x214E, 0x214E, + 0x2170, 0x217F, 0x2184, 0x2184, 0x24D0, 0x24E9, 0x2C30, 0x2C5F, + 0x2C61, 0x2C61, 0x2C65, 0x2C66, 0x2C68, 0x2C68, 0x2C6A, 0x2C6A, + 0x2C6C, 0x2C6C, 0x2C71, 0x2C71, 0x2C73, 0x2C74, 0x2C76, 0x2C7D, + 0x2C81, 0x2C81, 0x2C83, 0x2C83, 0x2C85, 0x2C85, 0x2C87, 0x2C87, + 0x2C89, 0x2C89, 0x2C8B, 0x2C8B, 0x2C8D, 0x2C8D, 0x2C8F, 0x2C8F, + 0x2C91, 0x2C91, 0x2C93, 0x2C93, 0x2C95, 0x2C95, 0x2C97, 0x2C97, + 0x2C99, 0x2C99, 0x2C9B, 0x2C9B, 0x2C9D, 0x2C9D, 0x2C9F, 0x2C9F, + 0x2CA1, 0x2CA1, 0x2CA3, 0x2CA3, 0x2CA5, 0x2CA5, 0x2CA7, 0x2CA7, + 0x2CA9, 0x2CA9, 0x2CAB, 0x2CAB, 0x2CAD, 0x2CAD, 0x2CAF, 0x2CAF, + 0x2CB1, 0x2CB1, 0x2CB3, 0x2CB3, 0x2CB5, 0x2CB5, 0x2CB7, 0x2CB7, + 0x2CB9, 0x2CB9, 0x2CBB, 0x2CBB, 0x2CBD, 0x2CBD, 0x2CBF, 0x2CBF, + 0x2CC1, 0x2CC1, 0x2CC3, 0x2CC3, 0x2CC5, 0x2CC5, 0x2CC7, 0x2CC7, + 0x2CC9, 0x2CC9, 0x2CCB, 0x2CCB, 0x2CCD, 0x2CCD, 0x2CCF, 0x2CCF, + 0x2CD1, 0x2CD1, 0x2CD3, 0x2CD3, 0x2CD5, 0x2CD5, 0x2CD7, 0x2CD7, + 0x2CD9, 0x2CD9, 0x2CDB, 0x2CDB, 0x2CDD, 0x2CDD, 0x2CDF, 0x2CDF, + 0x2CE1, 0x2CE1, 0x2CE3, 0x2CE4, 0x2CEC, 0x2CEC, 0x2CEE, 0x2CEE, + 0x2CF3, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, + 0xA641, 0xA641, 0xA643, 0xA643, 0xA645, 0xA645, 0xA647, 0xA647, + 0xA649, 0xA649, 0xA64B, 0xA64B, 0xA64D, 0xA64D, 0xA64F, 0xA64F, + 0xA651, 0xA651, 0xA653, 0xA653, 0xA655, 0xA655, 0xA657, 0xA657, + 0xA659, 0xA659, 0xA65B, 0xA65B, 0xA65D, 0xA65D, 0xA65F, 0xA65F, + 0xA661, 0xA661, 0xA663, 0xA663, 0xA665, 0xA665, 0xA667, 0xA667, + 0xA669, 0xA669, 0xA66B, 0xA66B, 0xA66D, 0xA66D, 0xA681, 0xA681, + 0xA683, 0xA683, 0xA685, 0xA685, 0xA687, 0xA687, 0xA689, 0xA689, + 0xA68B, 0xA68B, 0xA68D, 0xA68D, 0xA68F, 0xA68F, 0xA691, 0xA691, + 0xA693, 0xA693, 0xA695, 0xA695, 0xA697, 0xA697, 0xA699, 0xA699, + 0xA69B, 0xA69D, 0xA723, 0xA723, 0xA725, 0xA725, 0xA727, 0xA727, + 0xA729, 0xA729, 0xA72B, 0xA72B, 0xA72D, 0xA72D, 0xA72F, 0xA731, + 0xA733, 0xA733, 0xA735, 0xA735, 0xA737, 0xA737, 0xA739, 0xA739, + 0xA73B, 0xA73B, 0xA73D, 0xA73D, 0xA73F, 0xA73F, 0xA741, 0xA741, + 0xA743, 0xA743, 0xA745, 0xA745, 0xA747, 0xA747, 0xA749, 0xA749, + 0xA74B, 0xA74B, 0xA74D, 0xA74D, 0xA74F, 0xA74F, 0xA751, 0xA751, + 0xA753, 0xA753, 0xA755, 0xA755, 0xA757, 0xA757, 0xA759, 0xA759, + 0xA75B, 0xA75B, 0xA75D, 0xA75D, 0xA75F, 0xA75F, 0xA761, 0xA761, + 0xA763, 0xA763, 0xA765, 0xA765, 0xA767, 0xA767, 0xA769, 0xA769, + 0xA76B, 0xA76B, 0xA76D, 0xA76D, 0xA76F, 0xA778, 0xA77A, 0xA77A, + 0xA77C, 0xA77C, 0xA77F, 0xA77F, 0xA781, 0xA781, 0xA783, 0xA783, + 0xA785, 0xA785, 0xA787, 0xA787, 0xA78C, 0xA78C, 0xA78E, 0xA78E, + 0xA791, 0xA791, 0xA793, 0xA795, 0xA797, 0xA797, 0xA799, 0xA799, + 0xA79B, 0xA79B, 0xA79D, 0xA79D, 0xA79F, 0xA79F, 0xA7A1, 0xA7A1, + 0xA7A3, 0xA7A3, 0xA7A5, 0xA7A5, 0xA7A7, 0xA7A7, 0xA7A9, 0xA7A9, + 0xA7AF, 0xA7AF, 0xA7B5, 0xA7B5, 0xA7B7, 0xA7B7, 0xA7B9, 0xA7B9, + 0xA7BB, 0xA7BB, 0xA7BD, 0xA7BD, 0xA7BF, 0xA7BF, 0xA7C1, 0xA7C1, + 0xA7C3, 0xA7C3, 0xA7C8, 0xA7C8, 0xA7CA, 0xA7CA, 0xA7D1, 0xA7D1, + 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D5, 0xA7D7, 0xA7D7, 0xA7D9, 0xA7D9, + 0xA7F6, 0xA7F6, 0xA7F8, 0xA7FA, 0xAB30, 0xAB5A, 0xAB5C, 0xAB68, + 0xAB70, 0xABBF, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFF41, 0xFF5A, + 0x10428, 0x1044F, 0x104D8, 0x104FB, 0x10597, 0x105A1, 0x105A3, 0x105B1, + 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10780, 0x10780, 0x10783, 0x10785, + 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10CC0, 0x10CF2, 0x118C0, 0x118DF, + 0x16E60, 0x16E7F, 0x1D41A, 0x1D433, 0x1D44E, 0x1D454, 0x1D456, 0x1D467, + 0x1D482, 0x1D49B, 0x1D4B6, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, + 0x1D4C5, 0x1D4CF, 0x1D4EA, 0x1D503, 0x1D51E, 0x1D537, 0x1D552, 0x1D56B, + 0x1D586, 0x1D59F, 0x1D5BA, 0x1D5D3, 0x1D5EE, 0x1D607, 0x1D622, 0x1D63B, + 0x1D656, 0x1D66F, 0x1D68A, 0x1D6A5, 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6E1, + 0x1D6FC, 0x1D714, 0x1D716, 0x1D71B, 0x1D736, 0x1D74E, 0x1D750, 0x1D755, + 0x1D770, 0x1D788, 0x1D78A, 0x1D78F, 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7C9, + 0x1D7CB, 0x1D7CB, 0x1DF00, 0x1DF09, 0x1DF0B, 0x1DF1E, 0x1E922, 0x1E943, + // #76 (12808+138): bp=Math + 0x002B, 0x002B, 0x003C, 0x003E, 0x005E, 0x005E, 0x007C, 0x007C, + 0x007E, 0x007E, 0x00AC, 0x00AC, 0x00B1, 0x00B1, 0x00D7, 0x00D7, + 0x00F7, 0x00F7, 0x03D0, 0x03D2, 0x03D5, 0x03D5, 0x03F0, 0x03F1, + 0x03F4, 0x03F6, 0x0606, 0x0608, 0x2016, 0x2016, 0x2032, 0x2034, + 0x2040, 0x2040, 0x2044, 0x2044, 0x2052, 0x2052, 0x2061, 0x2064, + 0x207A, 0x207E, 0x208A, 0x208E, 0x20D0, 0x20DC, 0x20E1, 0x20E1, + 0x20E5, 0x20E6, 0x20EB, 0x20EF, 0x2102, 0x2102, 0x2107, 0x2107, + 0x210A, 0x2113, 0x2115, 0x2115, 0x2118, 0x211D, 0x2124, 0x2124, + 0x2128, 0x2129, 0x212C, 0x212D, 0x212F, 0x2131, 0x2133, 0x2138, + 0x213C, 0x2149, 0x214B, 0x214B, 0x2190, 0x21A7, 0x21A9, 0x21AE, + 0x21B0, 0x21B1, 0x21B6, 0x21B7, 0x21BC, 0x21DB, 0x21DD, 0x21DD, + 0x21E4, 0x21E5, 0x21F4, 0x22FF, 0x2308, 0x230B, 0x2320, 0x2321, + 0x237C, 0x237C, 0x239B, 0x23B5, 0x23B7, 0x23B7, 0x23D0, 0x23D0, + 0x23DC, 0x23E2, 0x25A0, 0x25A1, 0x25AE, 0x25B7, 0x25BC, 0x25C1, + 0x25C6, 0x25C7, 0x25CA, 0x25CB, 0x25CF, 0x25D3, 0x25E2, 0x25E2, + 0x25E4, 0x25E4, 0x25E7, 0x25EC, 0x25F8, 0x25FF, 0x2605, 0x2606, + 0x2640, 0x2640, 0x2642, 0x2642, 0x2660, 0x2663, 0x266D, 0x266F, + 0x27C0, 0x27FF, 0x2900, 0x2AFF, 0x2B30, 0x2B44, 0x2B47, 0x2B4C, + 0xFB29, 0xFB29, 0xFE61, 0xFE66, 0xFE68, 0xFE68, 0xFF0B, 0xFF0B, + 0xFF1C, 0xFF1E, 0xFF3C, 0xFF3C, 0xFF3E, 0xFF3E, 0xFF5C, 0xFF5C, + 0xFF5E, 0xFF5E, 0xFFE2, 0xFFE2, 0xFFE9, 0xFFEC, 0x1D400, 0x1D454, + 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, + 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, + 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, + 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, + 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D7CB, 0x1D7CE, 0x1D7FF, + 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, + 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, + 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, + 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, + 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, + 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, + 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, + 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, + 0x1EEAB, 0x1EEBB, 0x1EEF0, 0x1EEF1, + // #77 (12946+18): bp=Noncharacter_Code_Point:NChar + 0xFDD0, 0xFDEF, 0xFFFE, 0xFFFF, 0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, + 0x3FFFE, 0x3FFFF, 0x4FFFE, 0x4FFFF, 0x5FFFE, 0x5FFFF, 0x6FFFE, 0x6FFFF, + 0x7FFFE, 0x7FFFF, 0x8FFFE, 0x8FFFF, 0x9FFFE, 0x9FFFF, 0xAFFFE, 0xAFFFF, + 0xBFFFE, 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE, 0xDFFFF, 0xEFFFE, 0xEFFFF, + 0xFFFFE, 0xFFFFF, 0x10FFFE, 0x10FFFF, + // #78 (12964+28): bp=Pattern_Syntax:Pat_Syn + 0x0021, 0x002F, 0x003A, 0x0040, 0x005B, 0x005E, 0x0060, 0x0060, + 0x007B, 0x007E, 0x00A1, 0x00A7, 0x00A9, 0x00A9, 0x00AB, 0x00AC, + 0x00AE, 0x00AE, 0x00B0, 0x00B1, 0x00B6, 0x00B6, 0x00BB, 0x00BB, + 0x00BF, 0x00BF, 0x00D7, 0x00D7, 0x00F7, 0x00F7, 0x2010, 0x2027, + 0x2030, 0x203E, 0x2041, 0x2053, 0x2055, 0x205E, 0x2190, 0x245F, + 0x2500, 0x2775, 0x2794, 0x2BFF, 0x2E00, 0x2E7F, 0x3001, 0x3003, + 0x3008, 0x3020, 0x3030, 0x3030, 0xFD3E, 0xFD3F, 0xFE45, 0xFE46, + // #79 (12992+5): bp=Pattern_White_Space:Pat_WS + 0x0009, 0x000D, 0x0020, 0x0020, 0x0085, 0x0085, 0x200E, 0x200F, + 0x2028, 0x2029, + // #80 (12997+13): bp=Quotation_Mark:QMark + 0x0022, 0x0022, 0x0027, 0x0027, 0x00AB, 0x00AB, 0x00BB, 0x00BB, + 0x2018, 0x201F, 0x2039, 0x203A, 0x2E42, 0x2E42, 0x300C, 0x300F, + 0x301D, 0x301F, 0xFE41, 0xFE44, 0xFF02, 0xFF02, 0xFF07, 0xFF07, + 0xFF62, 0xFF63, + // #81 (13010+3): bp=Radical + 0x2E80, 0x2E99, 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, + // #82 (13013+1): bp=Regional_Indicator:RI + 0x1F1E6, 0x1F1FF, + // #83 (13014+79): bp=Sentence_Terminal:STerm + 0x0021, 0x0021, 0x002E, 0x002E, 0x003F, 0x003F, 0x0589, 0x0589, + 0x061D, 0x061F, 0x06D4, 0x06D4, 0x0700, 0x0702, 0x07F9, 0x07F9, + 0x0837, 0x0837, 0x0839, 0x0839, 0x083D, 0x083E, 0x0964, 0x0965, + 0x104A, 0x104B, 0x1362, 0x1362, 0x1367, 0x1368, 0x166E, 0x166E, + 0x1735, 0x1736, 0x1803, 0x1803, 0x1809, 0x1809, 0x1944, 0x1945, + 0x1AA8, 0x1AAB, 0x1B5A, 0x1B5B, 0x1B5E, 0x1B5F, 0x1B7D, 0x1B7E, + 0x1C3B, 0x1C3C, 0x1C7E, 0x1C7F, 0x203C, 0x203D, 0x2047, 0x2049, + 0x2E2E, 0x2E2E, 0x2E3C, 0x2E3C, 0x2E53, 0x2E54, 0x3002, 0x3002, + 0xA4FF, 0xA4FF, 0xA60E, 0xA60F, 0xA6F3, 0xA6F3, 0xA6F7, 0xA6F7, + 0xA876, 0xA877, 0xA8CE, 0xA8CF, 0xA92F, 0xA92F, 0xA9C8, 0xA9C9, + 0xAA5D, 0xAA5F, 0xAAF0, 0xAAF1, 0xABEB, 0xABEB, 0xFE52, 0xFE52, + 0xFE56, 0xFE57, 0xFF01, 0xFF01, 0xFF0E, 0xFF0E, 0xFF1F, 0xFF1F, + 0xFF61, 0xFF61, 0x10A56, 0x10A57, 0x10F55, 0x10F59, 0x10F86, 0x10F89, + 0x11047, 0x11048, 0x110BE, 0x110C1, 0x11141, 0x11143, 0x111C5, 0x111C6, + 0x111CD, 0x111CD, 0x111DE, 0x111DF, 0x11238, 0x11239, 0x1123B, 0x1123C, + 0x112A9, 0x112A9, 0x1144B, 0x1144C, 0x115C2, 0x115C3, 0x115C9, 0x115D7, + 0x11641, 0x11642, 0x1173C, 0x1173E, 0x11944, 0x11944, 0x11946, 0x11946, + 0x11A42, 0x11A43, 0x11A9B, 0x11A9C, 0x11C41, 0x11C42, 0x11EF7, 0x11EF8, + 0x16A6E, 0x16A6F, 0x16AF5, 0x16AF5, 0x16B37, 0x16B38, 0x16B44, 0x16B44, + 0x16E98, 0x16E98, 0x1BC9F, 0x1BC9F, 0x1DA88, 0x1DA88, + // #84 (13093+32): bp=Soft_Dotted:SD + 0x0069, 0x006A, 0x012F, 0x012F, 0x0249, 0x0249, 0x0268, 0x0268, + 0x029D, 0x029D, 0x02B2, 0x02B2, 0x03F3, 0x03F3, 0x0456, 0x0456, + 0x0458, 0x0458, 0x1D62, 0x1D62, 0x1D96, 0x1D96, 0x1DA4, 0x1DA4, + 0x1DA8, 0x1DA8, 0x1E2D, 0x1E2D, 0x1ECB, 0x1ECB, 0x2071, 0x2071, + 0x2148, 0x2149, 0x2C7C, 0x2C7C, 0x1D422, 0x1D423, 0x1D456, 0x1D457, + 0x1D48A, 0x1D48B, 0x1D4BE, 0x1D4BF, 0x1D4F2, 0x1D4F3, 0x1D526, 0x1D527, + 0x1D55A, 0x1D55B, 0x1D58E, 0x1D58F, 0x1D5C2, 0x1D5C3, 0x1D5F6, 0x1D5F7, + 0x1D62A, 0x1D62B, 0x1D65E, 0x1D65F, 0x1D692, 0x1D693, 0x1DF1A, 0x1DF1A, + // #85 (13125+107): bp=Terminal_Punctuation:Term + 0x0021, 0x0021, 0x002C, 0x002C, 0x002E, 0x002E, 0x003A, 0x003B, + 0x003F, 0x003F, 0x037E, 0x037E, 0x0387, 0x0387, 0x0589, 0x0589, + 0x05C3, 0x05C3, 0x060C, 0x060C, 0x061B, 0x061B, 0x061D, 0x061F, + 0x06D4, 0x06D4, 0x0700, 0x070A, 0x070C, 0x070C, 0x07F8, 0x07F9, + 0x0830, 0x083E, 0x085E, 0x085E, 0x0964, 0x0965, 0x0E5A, 0x0E5B, + 0x0F08, 0x0F08, 0x0F0D, 0x0F12, 0x104A, 0x104B, 0x1361, 0x1368, + 0x166E, 0x166E, 0x16EB, 0x16ED, 0x1735, 0x1736, 0x17D4, 0x17D6, + 0x17DA, 0x17DA, 0x1802, 0x1805, 0x1808, 0x1809, 0x1944, 0x1945, + 0x1AA8, 0x1AAB, 0x1B5A, 0x1B5B, 0x1B5D, 0x1B5F, 0x1B7D, 0x1B7E, + 0x1C3B, 0x1C3F, 0x1C7E, 0x1C7F, 0x203C, 0x203D, 0x2047, 0x2049, + 0x2E2E, 0x2E2E, 0x2E3C, 0x2E3C, 0x2E41, 0x2E41, 0x2E4C, 0x2E4C, + 0x2E4E, 0x2E4F, 0x2E53, 0x2E54, 0x3001, 0x3002, 0xA4FE, 0xA4FF, + 0xA60D, 0xA60F, 0xA6F3, 0xA6F7, 0xA876, 0xA877, 0xA8CE, 0xA8CF, + 0xA92F, 0xA92F, 0xA9C7, 0xA9C9, 0xAA5D, 0xAA5F, 0xAADF, 0xAADF, + 0xAAF0, 0xAAF1, 0xABEB, 0xABEB, 0xFE50, 0xFE52, 0xFE54, 0xFE57, + 0xFF01, 0xFF01, 0xFF0C, 0xFF0C, 0xFF0E, 0xFF0E, 0xFF1A, 0xFF1B, + 0xFF1F, 0xFF1F, 0xFF61, 0xFF61, 0xFF64, 0xFF64, 0x1039F, 0x1039F, + 0x103D0, 0x103D0, 0x10857, 0x10857, 0x1091F, 0x1091F, 0x10A56, 0x10A57, + 0x10AF0, 0x10AF5, 0x10B3A, 0x10B3F, 0x10B99, 0x10B9C, 0x10F55, 0x10F59, + 0x10F86, 0x10F89, 0x11047, 0x1104D, 0x110BE, 0x110C1, 0x11141, 0x11143, + 0x111C5, 0x111C6, 0x111CD, 0x111CD, 0x111DE, 0x111DF, 0x11238, 0x1123C, + 0x112A9, 0x112A9, 0x1144B, 0x1144D, 0x1145A, 0x1145B, 0x115C2, 0x115C5, + 0x115C9, 0x115D7, 0x11641, 0x11642, 0x1173C, 0x1173E, 0x11944, 0x11944, + 0x11946, 0x11946, 0x11A42, 0x11A43, 0x11A9B, 0x11A9C, 0x11AA1, 0x11AA2, + 0x11C41, 0x11C43, 0x11C71, 0x11C71, 0x11EF7, 0x11EF8, 0x12470, 0x12474, + 0x16A6E, 0x16A6F, 0x16AF5, 0x16AF5, 0x16B37, 0x16B39, 0x16B44, 0x16B44, + 0x16E97, 0x16E98, 0x1BC9F, 0x1BC9F, 0x1DA87, 0x1DA8A, + // #86 (13232+15): bp=Unified_Ideograph:UIdeo + 0x3400, 0x4DBF, 0x4E00, 0x9FFF, 0xFA0E, 0xFA0F, 0xFA11, 0xFA11, + 0xFA13, 0xFA14, 0xFA1F, 0xFA1F, 0xFA21, 0xFA21, 0xFA23, 0xFA24, + 0xFA27, 0xFA29, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, + 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x30000, 0x3134A, + // #87 (13247+651): bp=Uppercase:Upper + 0x0041, 0x005A, 0x00C0, 0x00D6, 0x00D8, 0x00DE, 0x0100, 0x0100, + 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106, 0x0108, 0x0108, + 0x010A, 0x010A, 0x010C, 0x010C, 0x010E, 0x010E, 0x0110, 0x0110, + 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116, 0x0118, 0x0118, + 0x011A, 0x011A, 0x011C, 0x011C, 0x011E, 0x011E, 0x0120, 0x0120, + 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126, 0x0128, 0x0128, + 0x012A, 0x012A, 0x012C, 0x012C, 0x012E, 0x012E, 0x0130, 0x0130, + 0x0132, 0x0132, 0x0134, 0x0134, 0x0136, 0x0136, 0x0139, 0x0139, + 0x013B, 0x013B, 0x013D, 0x013D, 0x013F, 0x013F, 0x0141, 0x0141, + 0x0143, 0x0143, 0x0145, 0x0145, 0x0147, 0x0147, 0x014A, 0x014A, + 0x014C, 0x014C, 0x014E, 0x014E, 0x0150, 0x0150, 0x0152, 0x0152, + 0x0154, 0x0154, 0x0156, 0x0156, 0x0158, 0x0158, 0x015A, 0x015A, + 0x015C, 0x015C, 0x015E, 0x015E, 0x0160, 0x0160, 0x0162, 0x0162, + 0x0164, 0x0164, 0x0166, 0x0166, 0x0168, 0x0168, 0x016A, 0x016A, + 0x016C, 0x016C, 0x016E, 0x016E, 0x0170, 0x0170, 0x0172, 0x0172, + 0x0174, 0x0174, 0x0176, 0x0176, 0x0178, 0x0179, 0x017B, 0x017B, + 0x017D, 0x017D, 0x0181, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187, + 0x0189, 0x018B, 0x018E, 0x0191, 0x0193, 0x0194, 0x0196, 0x0198, + 0x019C, 0x019D, 0x019F, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, + 0x01A6, 0x01A7, 0x01A9, 0x01A9, 0x01AC, 0x01AC, 0x01AE, 0x01AF, + 0x01B1, 0x01B3, 0x01B5, 0x01B5, 0x01B7, 0x01B8, 0x01BC, 0x01BC, + 0x01C4, 0x01C4, 0x01C7, 0x01C7, 0x01CA, 0x01CA, 0x01CD, 0x01CD, + 0x01CF, 0x01CF, 0x01D1, 0x01D1, 0x01D3, 0x01D3, 0x01D5, 0x01D5, + 0x01D7, 0x01D7, 0x01D9, 0x01D9, 0x01DB, 0x01DB, 0x01DE, 0x01DE, + 0x01E0, 0x01E0, 0x01E2, 0x01E2, 0x01E4, 0x01E4, 0x01E6, 0x01E6, + 0x01E8, 0x01E8, 0x01EA, 0x01EA, 0x01EC, 0x01EC, 0x01EE, 0x01EE, + 0x01F1, 0x01F1, 0x01F4, 0x01F4, 0x01F6, 0x01F8, 0x01FA, 0x01FA, + 0x01FC, 0x01FC, 0x01FE, 0x01FE, 0x0200, 0x0200, 0x0202, 0x0202, + 0x0204, 0x0204, 0x0206, 0x0206, 0x0208, 0x0208, 0x020A, 0x020A, + 0x020C, 0x020C, 0x020E, 0x020E, 0x0210, 0x0210, 0x0212, 0x0212, + 0x0214, 0x0214, 0x0216, 0x0216, 0x0218, 0x0218, 0x021A, 0x021A, + 0x021C, 0x021C, 0x021E, 0x021E, 0x0220, 0x0220, 0x0222, 0x0222, + 0x0224, 0x0224, 0x0226, 0x0226, 0x0228, 0x0228, 0x022A, 0x022A, + 0x022C, 0x022C, 0x022E, 0x022E, 0x0230, 0x0230, 0x0232, 0x0232, + 0x023A, 0x023B, 0x023D, 0x023E, 0x0241, 0x0241, 0x0243, 0x0246, + 0x0248, 0x0248, 0x024A, 0x024A, 0x024C, 0x024C, 0x024E, 0x024E, + 0x0370, 0x0370, 0x0372, 0x0372, 0x0376, 0x0376, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x038F, + 0x0391, 0x03A1, 0x03A3, 0x03AB, 0x03CF, 0x03CF, 0x03D2, 0x03D4, + 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, + 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, + 0x03E8, 0x03E8, 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, + 0x03F4, 0x03F4, 0x03F7, 0x03F7, 0x03F9, 0x03FA, 0x03FD, 0x042F, + 0x0460, 0x0460, 0x0462, 0x0462, 0x0464, 0x0464, 0x0466, 0x0466, + 0x0468, 0x0468, 0x046A, 0x046A, 0x046C, 0x046C, 0x046E, 0x046E, + 0x0470, 0x0470, 0x0472, 0x0472, 0x0474, 0x0474, 0x0476, 0x0476, + 0x0478, 0x0478, 0x047A, 0x047A, 0x047C, 0x047C, 0x047E, 0x047E, + 0x0480, 0x0480, 0x048A, 0x048A, 0x048C, 0x048C, 0x048E, 0x048E, + 0x0490, 0x0490, 0x0492, 0x0492, 0x0494, 0x0494, 0x0496, 0x0496, + 0x0498, 0x0498, 0x049A, 0x049A, 0x049C, 0x049C, 0x049E, 0x049E, + 0x04A0, 0x04A0, 0x04A2, 0x04A2, 0x04A4, 0x04A4, 0x04A6, 0x04A6, + 0x04A8, 0x04A8, 0x04AA, 0x04AA, 0x04AC, 0x04AC, 0x04AE, 0x04AE, + 0x04B0, 0x04B0, 0x04B2, 0x04B2, 0x04B4, 0x04B4, 0x04B6, 0x04B6, + 0x04B8, 0x04B8, 0x04BA, 0x04BA, 0x04BC, 0x04BC, 0x04BE, 0x04BE, + 0x04C0, 0x04C1, 0x04C3, 0x04C3, 0x04C5, 0x04C5, 0x04C7, 0x04C7, + 0x04C9, 0x04C9, 0x04CB, 0x04CB, 0x04CD, 0x04CD, 0x04D0, 0x04D0, + 0x04D2, 0x04D2, 0x04D4, 0x04D4, 0x04D6, 0x04D6, 0x04D8, 0x04D8, + 0x04DA, 0x04DA, 0x04DC, 0x04DC, 0x04DE, 0x04DE, 0x04E0, 0x04E0, + 0x04E2, 0x04E2, 0x04E4, 0x04E4, 0x04E6, 0x04E6, 0x04E8, 0x04E8, + 0x04EA, 0x04EA, 0x04EC, 0x04EC, 0x04EE, 0x04EE, 0x04F0, 0x04F0, + 0x04F2, 0x04F2, 0x04F4, 0x04F4, 0x04F6, 0x04F6, 0x04F8, 0x04F8, + 0x04FA, 0x04FA, 0x04FC, 0x04FC, 0x04FE, 0x04FE, 0x0500, 0x0500, + 0x0502, 0x0502, 0x0504, 0x0504, 0x0506, 0x0506, 0x0508, 0x0508, + 0x050A, 0x050A, 0x050C, 0x050C, 0x050E, 0x050E, 0x0510, 0x0510, + 0x0512, 0x0512, 0x0514, 0x0514, 0x0516, 0x0516, 0x0518, 0x0518, + 0x051A, 0x051A, 0x051C, 0x051C, 0x051E, 0x051E, 0x0520, 0x0520, + 0x0522, 0x0522, 0x0524, 0x0524, 0x0526, 0x0526, 0x0528, 0x0528, + 0x052A, 0x052A, 0x052C, 0x052C, 0x052E, 0x052E, 0x0531, 0x0556, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x13A0, 0x13F5, + 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1E00, 0x1E00, 0x1E02, 0x1E02, + 0x1E04, 0x1E04, 0x1E06, 0x1E06, 0x1E08, 0x1E08, 0x1E0A, 0x1E0A, + 0x1E0C, 0x1E0C, 0x1E0E, 0x1E0E, 0x1E10, 0x1E10, 0x1E12, 0x1E12, + 0x1E14, 0x1E14, 0x1E16, 0x1E16, 0x1E18, 0x1E18, 0x1E1A, 0x1E1A, + 0x1E1C, 0x1E1C, 0x1E1E, 0x1E1E, 0x1E20, 0x1E20, 0x1E22, 0x1E22, + 0x1E24, 0x1E24, 0x1E26, 0x1E26, 0x1E28, 0x1E28, 0x1E2A, 0x1E2A, + 0x1E2C, 0x1E2C, 0x1E2E, 0x1E2E, 0x1E30, 0x1E30, 0x1E32, 0x1E32, + 0x1E34, 0x1E34, 0x1E36, 0x1E36, 0x1E38, 0x1E38, 0x1E3A, 0x1E3A, + 0x1E3C, 0x1E3C, 0x1E3E, 0x1E3E, 0x1E40, 0x1E40, 0x1E42, 0x1E42, + 0x1E44, 0x1E44, 0x1E46, 0x1E46, 0x1E48, 0x1E48, 0x1E4A, 0x1E4A, + 0x1E4C, 0x1E4C, 0x1E4E, 0x1E4E, 0x1E50, 0x1E50, 0x1E52, 0x1E52, + 0x1E54, 0x1E54, 0x1E56, 0x1E56, 0x1E58, 0x1E58, 0x1E5A, 0x1E5A, + 0x1E5C, 0x1E5C, 0x1E5E, 0x1E5E, 0x1E60, 0x1E60, 0x1E62, 0x1E62, + 0x1E64, 0x1E64, 0x1E66, 0x1E66, 0x1E68, 0x1E68, 0x1E6A, 0x1E6A, + 0x1E6C, 0x1E6C, 0x1E6E, 0x1E6E, 0x1E70, 0x1E70, 0x1E72, 0x1E72, + 0x1E74, 0x1E74, 0x1E76, 0x1E76, 0x1E78, 0x1E78, 0x1E7A, 0x1E7A, + 0x1E7C, 0x1E7C, 0x1E7E, 0x1E7E, 0x1E80, 0x1E80, 0x1E82, 0x1E82, + 0x1E84, 0x1E84, 0x1E86, 0x1E86, 0x1E88, 0x1E88, 0x1E8A, 0x1E8A, + 0x1E8C, 0x1E8C, 0x1E8E, 0x1E8E, 0x1E90, 0x1E90, 0x1E92, 0x1E92, + 0x1E94, 0x1E94, 0x1E9E, 0x1E9E, 0x1EA0, 0x1EA0, 0x1EA2, 0x1EA2, + 0x1EA4, 0x1EA4, 0x1EA6, 0x1EA6, 0x1EA8, 0x1EA8, 0x1EAA, 0x1EAA, + 0x1EAC, 0x1EAC, 0x1EAE, 0x1EAE, 0x1EB0, 0x1EB0, 0x1EB2, 0x1EB2, + 0x1EB4, 0x1EB4, 0x1EB6, 0x1EB6, 0x1EB8, 0x1EB8, 0x1EBA, 0x1EBA, + 0x1EBC, 0x1EBC, 0x1EBE, 0x1EBE, 0x1EC0, 0x1EC0, 0x1EC2, 0x1EC2, + 0x1EC4, 0x1EC4, 0x1EC6, 0x1EC6, 0x1EC8, 0x1EC8, 0x1ECA, 0x1ECA, + 0x1ECC, 0x1ECC, 0x1ECE, 0x1ECE, 0x1ED0, 0x1ED0, 0x1ED2, 0x1ED2, + 0x1ED4, 0x1ED4, 0x1ED6, 0x1ED6, 0x1ED8, 0x1ED8, 0x1EDA, 0x1EDA, + 0x1EDC, 0x1EDC, 0x1EDE, 0x1EDE, 0x1EE0, 0x1EE0, 0x1EE2, 0x1EE2, + 0x1EE4, 0x1EE4, 0x1EE6, 0x1EE6, 0x1EE8, 0x1EE8, 0x1EEA, 0x1EEA, + 0x1EEC, 0x1EEC, 0x1EEE, 0x1EEE, 0x1EF0, 0x1EF0, 0x1EF2, 0x1EF2, + 0x1EF4, 0x1EF4, 0x1EF6, 0x1EF6, 0x1EF8, 0x1EF8, 0x1EFA, 0x1EFA, + 0x1EFC, 0x1EFC, 0x1EFE, 0x1EFE, 0x1F08, 0x1F0F, 0x1F18, 0x1F1D, + 0x1F28, 0x1F2F, 0x1F38, 0x1F3F, 0x1F48, 0x1F4D, 0x1F59, 0x1F59, + 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F5F, 0x1F68, 0x1F6F, + 0x1FB8, 0x1FBB, 0x1FC8, 0x1FCB, 0x1FD8, 0x1FDB, 0x1FE8, 0x1FEC, + 0x1FF8, 0x1FFB, 0x2102, 0x2102, 0x2107, 0x2107, 0x210B, 0x210D, + 0x2110, 0x2112, 0x2115, 0x2115, 0x2119, 0x211D, 0x2124, 0x2124, + 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x212D, 0x2130, 0x2133, + 0x213E, 0x213F, 0x2145, 0x2145, 0x2160, 0x216F, 0x2183, 0x2183, + 0x24B6, 0x24CF, 0x2C00, 0x2C2F, 0x2C60, 0x2C60, 0x2C62, 0x2C64, + 0x2C67, 0x2C67, 0x2C69, 0x2C69, 0x2C6B, 0x2C6B, 0x2C6D, 0x2C70, + 0x2C72, 0x2C72, 0x2C75, 0x2C75, 0x2C7E, 0x2C80, 0x2C82, 0x2C82, + 0x2C84, 0x2C84, 0x2C86, 0x2C86, 0x2C88, 0x2C88, 0x2C8A, 0x2C8A, + 0x2C8C, 0x2C8C, 0x2C8E, 0x2C8E, 0x2C90, 0x2C90, 0x2C92, 0x2C92, + 0x2C94, 0x2C94, 0x2C96, 0x2C96, 0x2C98, 0x2C98, 0x2C9A, 0x2C9A, + 0x2C9C, 0x2C9C, 0x2C9E, 0x2C9E, 0x2CA0, 0x2CA0, 0x2CA2, 0x2CA2, + 0x2CA4, 0x2CA4, 0x2CA6, 0x2CA6, 0x2CA8, 0x2CA8, 0x2CAA, 0x2CAA, + 0x2CAC, 0x2CAC, 0x2CAE, 0x2CAE, 0x2CB0, 0x2CB0, 0x2CB2, 0x2CB2, + 0x2CB4, 0x2CB4, 0x2CB6, 0x2CB6, 0x2CB8, 0x2CB8, 0x2CBA, 0x2CBA, + 0x2CBC, 0x2CBC, 0x2CBE, 0x2CBE, 0x2CC0, 0x2CC0, 0x2CC2, 0x2CC2, + 0x2CC4, 0x2CC4, 0x2CC6, 0x2CC6, 0x2CC8, 0x2CC8, 0x2CCA, 0x2CCA, + 0x2CCC, 0x2CCC, 0x2CCE, 0x2CCE, 0x2CD0, 0x2CD0, 0x2CD2, 0x2CD2, + 0x2CD4, 0x2CD4, 0x2CD6, 0x2CD6, 0x2CD8, 0x2CD8, 0x2CDA, 0x2CDA, + 0x2CDC, 0x2CDC, 0x2CDE, 0x2CDE, 0x2CE0, 0x2CE0, 0x2CE2, 0x2CE2, + 0x2CEB, 0x2CEB, 0x2CED, 0x2CED, 0x2CF2, 0x2CF2, 0xA640, 0xA640, + 0xA642, 0xA642, 0xA644, 0xA644, 0xA646, 0xA646, 0xA648, 0xA648, + 0xA64A, 0xA64A, 0xA64C, 0xA64C, 0xA64E, 0xA64E, 0xA650, 0xA650, + 0xA652, 0xA652, 0xA654, 0xA654, 0xA656, 0xA656, 0xA658, 0xA658, + 0xA65A, 0xA65A, 0xA65C, 0xA65C, 0xA65E, 0xA65E, 0xA660, 0xA660, + 0xA662, 0xA662, 0xA664, 0xA664, 0xA666, 0xA666, 0xA668, 0xA668, + 0xA66A, 0xA66A, 0xA66C, 0xA66C, 0xA680, 0xA680, 0xA682, 0xA682, + 0xA684, 0xA684, 0xA686, 0xA686, 0xA688, 0xA688, 0xA68A, 0xA68A, + 0xA68C, 0xA68C, 0xA68E, 0xA68E, 0xA690, 0xA690, 0xA692, 0xA692, + 0xA694, 0xA694, 0xA696, 0xA696, 0xA698, 0xA698, 0xA69A, 0xA69A, + 0xA722, 0xA722, 0xA724, 0xA724, 0xA726, 0xA726, 0xA728, 0xA728, + 0xA72A, 0xA72A, 0xA72C, 0xA72C, 0xA72E, 0xA72E, 0xA732, 0xA732, + 0xA734, 0xA734, 0xA736, 0xA736, 0xA738, 0xA738, 0xA73A, 0xA73A, + 0xA73C, 0xA73C, 0xA73E, 0xA73E, 0xA740, 0xA740, 0xA742, 0xA742, + 0xA744, 0xA744, 0xA746, 0xA746, 0xA748, 0xA748, 0xA74A, 0xA74A, + 0xA74C, 0xA74C, 0xA74E, 0xA74E, 0xA750, 0xA750, 0xA752, 0xA752, + 0xA754, 0xA754, 0xA756, 0xA756, 0xA758, 0xA758, 0xA75A, 0xA75A, + 0xA75C, 0xA75C, 0xA75E, 0xA75E, 0xA760, 0xA760, 0xA762, 0xA762, + 0xA764, 0xA764, 0xA766, 0xA766, 0xA768, 0xA768, 0xA76A, 0xA76A, + 0xA76C, 0xA76C, 0xA76E, 0xA76E, 0xA779, 0xA779, 0xA77B, 0xA77B, + 0xA77D, 0xA77E, 0xA780, 0xA780, 0xA782, 0xA782, 0xA784, 0xA784, + 0xA786, 0xA786, 0xA78B, 0xA78B, 0xA78D, 0xA78D, 0xA790, 0xA790, + 0xA792, 0xA792, 0xA796, 0xA796, 0xA798, 0xA798, 0xA79A, 0xA79A, + 0xA79C, 0xA79C, 0xA79E, 0xA79E, 0xA7A0, 0xA7A0, 0xA7A2, 0xA7A2, + 0xA7A4, 0xA7A4, 0xA7A6, 0xA7A6, 0xA7A8, 0xA7A8, 0xA7AA, 0xA7AE, + 0xA7B0, 0xA7B4, 0xA7B6, 0xA7B6, 0xA7B8, 0xA7B8, 0xA7BA, 0xA7BA, + 0xA7BC, 0xA7BC, 0xA7BE, 0xA7BE, 0xA7C0, 0xA7C0, 0xA7C2, 0xA7C2, + 0xA7C4, 0xA7C7, 0xA7C9, 0xA7C9, 0xA7D0, 0xA7D0, 0xA7D6, 0xA7D6, + 0xA7D8, 0xA7D8, 0xA7F5, 0xA7F5, 0xFF21, 0xFF3A, 0x10400, 0x10427, + 0x104B0, 0x104D3, 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, + 0x10594, 0x10595, 0x10C80, 0x10CB2, 0x118A0, 0x118BF, 0x16E40, 0x16E5F, + 0x1D400, 0x1D419, 0x1D434, 0x1D44D, 0x1D468, 0x1D481, 0x1D49C, 0x1D49C, + 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, + 0x1D4AE, 0x1D4B5, 0x1D4D0, 0x1D4E9, 0x1D504, 0x1D505, 0x1D507, 0x1D50A, + 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D538, 0x1D539, 0x1D53B, 0x1D53E, + 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D56C, 0x1D585, + 0x1D5A0, 0x1D5B9, 0x1D5D4, 0x1D5ED, 0x1D608, 0x1D621, 0x1D63C, 0x1D655, + 0x1D670, 0x1D689, 0x1D6A8, 0x1D6C0, 0x1D6E2, 0x1D6FA, 0x1D71C, 0x1D734, + 0x1D756, 0x1D76E, 0x1D790, 0x1D7A8, 0x1D7CA, 0x1D7CA, 0x1E900, 0x1E921, + 0x1F130, 0x1F149, 0x1F150, 0x1F169, 0x1F170, 0x1F189, + // #88 (13898+4): bp=Variation_Selector:VS + 0x180B, 0x180D, 0x180F, 0x180F, 0xFE00, 0xFE0F, 0xE0100, 0xE01EF, + // #89 (13902+10): bp=White_Space:space + 0x0009, 0x000D, 0x0020, 0x0020, 0x0085, 0x0085, 0x00A0, 0x00A0, + 0x1680, 0x1680, 0x2000, 0x200A, 0x2028, 0x2029, 0x202F, 0x202F, + 0x205F, 0x205F, 0x3000, 0x3000, + // #90 (13912+763): bp=XID_Continue:XIDC + 0x0030, 0x0039, 0x0041, 0x005A, 0x005F, 0x005F, 0x0061, 0x007A, + 0x00AA, 0x00AA, 0x00B5, 0x00B5, 0x00B7, 0x00B7, 0x00BA, 0x00BA, + 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02C1, 0x02C6, 0x02D1, + 0x02E0, 0x02E4, 0x02EC, 0x02EC, 0x02EE, 0x02EE, 0x0300, 0x0374, + 0x0376, 0x0377, 0x037B, 0x037D, 0x037F, 0x037F, 0x0386, 0x038A, + 0x038C, 0x038C, 0x038E, 0x03A1, 0x03A3, 0x03F5, 0x03F7, 0x0481, + 0x0483, 0x0487, 0x048A, 0x052F, 0x0531, 0x0556, 0x0559, 0x0559, + 0x0560, 0x0588, 0x0591, 0x05BD, 0x05BF, 0x05BF, 0x05C1, 0x05C2, + 0x05C4, 0x05C5, 0x05C7, 0x05C7, 0x05D0, 0x05EA, 0x05EF, 0x05F2, + 0x0610, 0x061A, 0x0620, 0x0669, 0x066E, 0x06D3, 0x06D5, 0x06DC, + 0x06DF, 0x06E8, 0x06EA, 0x06FC, 0x06FF, 0x06FF, 0x0710, 0x074A, + 0x074D, 0x07B1, 0x07C0, 0x07F5, 0x07FA, 0x07FA, 0x07FD, 0x07FD, + 0x0800, 0x082D, 0x0840, 0x085B, 0x0860, 0x086A, 0x0870, 0x0887, + 0x0889, 0x088E, 0x0898, 0x08E1, 0x08E3, 0x0963, 0x0966, 0x096F, + 0x0971, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, + 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BC, 0x09C4, + 0x09C7, 0x09C8, 0x09CB, 0x09CE, 0x09D7, 0x09D7, 0x09DC, 0x09DD, + 0x09DF, 0x09E3, 0x09E6, 0x09F1, 0x09FC, 0x09FC, 0x09FE, 0x09FE, + 0x0A01, 0x0A03, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, + 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, + 0x0A3C, 0x0A3C, 0x0A3E, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, + 0x0A51, 0x0A51, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A66, 0x0A75, + 0x0A81, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABC, 0x0AC5, + 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, + 0x0AE6, 0x0AEF, 0x0AF9, 0x0AFF, 0x0B01, 0x0B03, 0x0B05, 0x0B0C, + 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, + 0x0B35, 0x0B39, 0x0B3C, 0x0B44, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, + 0x0B55, 0x0B57, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B63, 0x0B66, 0x0B6F, + 0x0B71, 0x0B71, 0x0B82, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, + 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, + 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BBE, 0x0BC2, + 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0BD0, 0x0BD0, 0x0BD7, 0x0BD7, + 0x0BE6, 0x0BEF, 0x0C00, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, + 0x0C2A, 0x0C39, 0x0C3C, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, + 0x0C55, 0x0C56, 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, 0x0C60, 0x0C63, + 0x0C66, 0x0C6F, 0x0C80, 0x0C83, 0x0C85, 0x0C8C, 0x0C8E, 0x0C90, + 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBC, 0x0CC4, + 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0CDD, 0x0CDE, + 0x0CE0, 0x0CE3, 0x0CE6, 0x0CEF, 0x0CF1, 0x0CF2, 0x0D00, 0x0D0C, + 0x0D0E, 0x0D10, 0x0D12, 0x0D44, 0x0D46, 0x0D48, 0x0D4A, 0x0D4E, + 0x0D54, 0x0D57, 0x0D5F, 0x0D63, 0x0D66, 0x0D6F, 0x0D7A, 0x0D7F, + 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, + 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCA, 0x0DCA, 0x0DCF, 0x0DD4, + 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DE6, 0x0DEF, 0x0DF2, 0x0DF3, + 0x0E01, 0x0E3A, 0x0E40, 0x0E4E, 0x0E50, 0x0E59, 0x0E81, 0x0E82, + 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, + 0x0EA7, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0EC8, 0x0ECD, + 0x0ED0, 0x0ED9, 0x0EDC, 0x0EDF, 0x0F00, 0x0F00, 0x0F18, 0x0F19, + 0x0F20, 0x0F29, 0x0F35, 0x0F35, 0x0F37, 0x0F37, 0x0F39, 0x0F39, + 0x0F3E, 0x0F47, 0x0F49, 0x0F6C, 0x0F71, 0x0F84, 0x0F86, 0x0F97, + 0x0F99, 0x0FBC, 0x0FC6, 0x0FC6, 0x1000, 0x1049, 0x1050, 0x109D, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x135D, 0x135F, 0x1369, 0x1371, 0x1380, 0x138F, 0x13A0, 0x13F5, + 0x13F8, 0x13FD, 0x1401, 0x166C, 0x166F, 0x167F, 0x1681, 0x169A, + 0x16A0, 0x16EA, 0x16EE, 0x16F8, 0x1700, 0x1715, 0x171F, 0x1734, + 0x1740, 0x1753, 0x1760, 0x176C, 0x176E, 0x1770, 0x1772, 0x1773, + 0x1780, 0x17D3, 0x17D7, 0x17D7, 0x17DC, 0x17DD, 0x17E0, 0x17E9, + 0x180B, 0x180D, 0x180F, 0x1819, 0x1820, 0x1878, 0x1880, 0x18AA, + 0x18B0, 0x18F5, 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x193B, + 0x1946, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, 0x19B0, 0x19C9, + 0x19D0, 0x19DA, 0x1A00, 0x1A1B, 0x1A20, 0x1A5E, 0x1A60, 0x1A7C, + 0x1A7F, 0x1A89, 0x1A90, 0x1A99, 0x1AA7, 0x1AA7, 0x1AB0, 0x1ABD, + 0x1ABF, 0x1ACE, 0x1B00, 0x1B4C, 0x1B50, 0x1B59, 0x1B6B, 0x1B73, + 0x1B80, 0x1BF3, 0x1C00, 0x1C37, 0x1C40, 0x1C49, 0x1C4D, 0x1C7D, + 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1CD0, 0x1CD2, + 0x1CD4, 0x1CFA, 0x1D00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, + 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, + 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, + 0x1FBE, 0x1FBE, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, + 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, + 0x203F, 0x2040, 0x2054, 0x2054, 0x2071, 0x2071, 0x207F, 0x207F, + 0x2090, 0x209C, 0x20D0, 0x20DC, 0x20E1, 0x20E1, 0x20E5, 0x20F0, + 0x2102, 0x2102, 0x2107, 0x2107, 0x210A, 0x2113, 0x2115, 0x2115, + 0x2118, 0x211D, 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, + 0x212A, 0x2139, 0x213C, 0x213F, 0x2145, 0x2149, 0x214E, 0x214E, + 0x2160, 0x2188, 0x2C00, 0x2CE4, 0x2CEB, 0x2CF3, 0x2D00, 0x2D25, + 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, 0x2D30, 0x2D67, 0x2D6F, 0x2D6F, + 0x2D7F, 0x2D96, 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, + 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, + 0x2DD8, 0x2DDE, 0x2DE0, 0x2DFF, 0x3005, 0x3007, 0x3021, 0x302F, + 0x3031, 0x3035, 0x3038, 0x303C, 0x3041, 0x3096, 0x3099, 0x309A, + 0x309D, 0x309F, 0x30A1, 0x30FA, 0x30FC, 0x30FF, 0x3105, 0x312F, + 0x3131, 0x318E, 0x31A0, 0x31BF, 0x31F0, 0x31FF, 0x3400, 0x4DBF, + 0x4E00, 0xA48C, 0xA4D0, 0xA4FD, 0xA500, 0xA60C, 0xA610, 0xA62B, + 0xA640, 0xA66F, 0xA674, 0xA67D, 0xA67F, 0xA6F1, 0xA717, 0xA71F, + 0xA722, 0xA788, 0xA78B, 0xA7CA, 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, + 0xA7D5, 0xA7D9, 0xA7F2, 0xA827, 0xA82C, 0xA82C, 0xA840, 0xA873, + 0xA880, 0xA8C5, 0xA8D0, 0xA8D9, 0xA8E0, 0xA8F7, 0xA8FB, 0xA8FB, + 0xA8FD, 0xA92D, 0xA930, 0xA953, 0xA960, 0xA97C, 0xA980, 0xA9C0, + 0xA9CF, 0xA9D9, 0xA9E0, 0xA9FE, 0xAA00, 0xAA36, 0xAA40, 0xAA4D, + 0xAA50, 0xAA59, 0xAA60, 0xAA76, 0xAA7A, 0xAAC2, 0xAADB, 0xAADD, + 0xAAE0, 0xAAEF, 0xAAF2, 0xAAF6, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, + 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB5A, + 0xAB5C, 0xAB69, 0xAB70, 0xABEA, 0xABEC, 0xABED, 0xABF0, 0xABF9, + 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, + 0xFA70, 0xFAD9, 0xFB00, 0xFB06, 0xFB13, 0xFB17, 0xFB1D, 0xFB28, + 0xFB2A, 0xFB36, 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, + 0xFB43, 0xFB44, 0xFB46, 0xFBB1, 0xFBD3, 0xFC5D, 0xFC64, 0xFD3D, + 0xFD50, 0xFD8F, 0xFD92, 0xFDC7, 0xFDF0, 0xFDF9, 0xFE00, 0xFE0F, + 0xFE20, 0xFE2F, 0xFE33, 0xFE34, 0xFE4D, 0xFE4F, 0xFE71, 0xFE71, + 0xFE73, 0xFE73, 0xFE77, 0xFE77, 0xFE79, 0xFE79, 0xFE7B, 0xFE7B, + 0xFE7D, 0xFE7D, 0xFE7F, 0xFEFC, 0xFF10, 0xFF19, 0xFF21, 0xFF3A, + 0xFF3F, 0xFF3F, 0xFF41, 0xFF5A, 0xFF66, 0xFFBE, 0xFFC2, 0xFFC7, + 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, 0x10000, 0x1000B, + 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, 0x1003F, 0x1004D, + 0x10050, 0x1005D, 0x10080, 0x100FA, 0x10140, 0x10174, 0x101FD, 0x101FD, + 0x10280, 0x1029C, 0x102A0, 0x102D0, 0x102E0, 0x102E0, 0x10300, 0x1031F, + 0x1032D, 0x1034A, 0x10350, 0x1037A, 0x10380, 0x1039D, 0x103A0, 0x103C3, + 0x103C8, 0x103CF, 0x103D1, 0x103D5, 0x10400, 0x1049D, 0x104A0, 0x104A9, + 0x104B0, 0x104D3, 0x104D8, 0x104FB, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, + 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, + 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, 0x10780, 0x10785, + 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x10800, 0x10805, 0x10808, 0x10808, + 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, 0x1083F, 0x10855, + 0x10860, 0x10876, 0x10880, 0x1089E, 0x108E0, 0x108F2, 0x108F4, 0x108F5, + 0x10900, 0x10915, 0x10920, 0x10939, 0x10980, 0x109B7, 0x109BE, 0x109BF, + 0x10A00, 0x10A03, 0x10A05, 0x10A06, 0x10A0C, 0x10A13, 0x10A15, 0x10A17, + 0x10A19, 0x10A35, 0x10A38, 0x10A3A, 0x10A3F, 0x10A3F, 0x10A60, 0x10A7C, + 0x10A80, 0x10A9C, 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE6, 0x10B00, 0x10B35, + 0x10B40, 0x10B55, 0x10B60, 0x10B72, 0x10B80, 0x10B91, 0x10C00, 0x10C48, + 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10D00, 0x10D27, 0x10D30, 0x10D39, + 0x10E80, 0x10EA9, 0x10EAB, 0x10EAC, 0x10EB0, 0x10EB1, 0x10F00, 0x10F1C, + 0x10F27, 0x10F27, 0x10F30, 0x10F50, 0x10F70, 0x10F85, 0x10FB0, 0x10FC4, + 0x10FE0, 0x10FF6, 0x11000, 0x11046, 0x11066, 0x11075, 0x1107F, 0x110BA, + 0x110C2, 0x110C2, 0x110D0, 0x110E8, 0x110F0, 0x110F9, 0x11100, 0x11134, + 0x11136, 0x1113F, 0x11144, 0x11147, 0x11150, 0x11173, 0x11176, 0x11176, + 0x11180, 0x111C4, 0x111C9, 0x111CC, 0x111CE, 0x111DA, 0x111DC, 0x111DC, + 0x11200, 0x11211, 0x11213, 0x11237, 0x1123E, 0x1123E, 0x11280, 0x11286, + 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, 0x1129F, 0x112A8, + 0x112B0, 0x112EA, 0x112F0, 0x112F9, 0x11300, 0x11303, 0x11305, 0x1130C, + 0x1130F, 0x11310, 0x11313, 0x11328, 0x1132A, 0x11330, 0x11332, 0x11333, + 0x11335, 0x11339, 0x1133B, 0x11344, 0x11347, 0x11348, 0x1134B, 0x1134D, + 0x11350, 0x11350, 0x11357, 0x11357, 0x1135D, 0x11363, 0x11366, 0x1136C, + 0x11370, 0x11374, 0x11400, 0x1144A, 0x11450, 0x11459, 0x1145E, 0x11461, + 0x11480, 0x114C5, 0x114C7, 0x114C7, 0x114D0, 0x114D9, 0x11580, 0x115B5, + 0x115B8, 0x115C0, 0x115D8, 0x115DD, 0x11600, 0x11640, 0x11644, 0x11644, + 0x11650, 0x11659, 0x11680, 0x116B8, 0x116C0, 0x116C9, 0x11700, 0x1171A, + 0x1171D, 0x1172B, 0x11730, 0x11739, 0x11740, 0x11746, 0x11800, 0x1183A, + 0x118A0, 0x118E9, 0x118FF, 0x11906, 0x11909, 0x11909, 0x1190C, 0x11913, + 0x11915, 0x11916, 0x11918, 0x11935, 0x11937, 0x11938, 0x1193B, 0x11943, + 0x11950, 0x11959, 0x119A0, 0x119A7, 0x119AA, 0x119D7, 0x119DA, 0x119E1, + 0x119E3, 0x119E4, 0x11A00, 0x11A3E, 0x11A47, 0x11A47, 0x11A50, 0x11A99, + 0x11A9D, 0x11A9D, 0x11AB0, 0x11AF8, 0x11C00, 0x11C08, 0x11C0A, 0x11C36, + 0x11C38, 0x11C40, 0x11C50, 0x11C59, 0x11C72, 0x11C8F, 0x11C92, 0x11CA7, + 0x11CA9, 0x11CB6, 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D36, + 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D47, 0x11D50, 0x11D59, + 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, 0x11D90, 0x11D91, + 0x11D93, 0x11D98, 0x11DA0, 0x11DA9, 0x11EE0, 0x11EF6, 0x11FB0, 0x11FB0, + 0x12000, 0x12399, 0x12400, 0x1246E, 0x12480, 0x12543, 0x12F90, 0x12FF0, + 0x13000, 0x1342E, 0x14400, 0x14646, 0x16800, 0x16A38, 0x16A40, 0x16A5E, + 0x16A60, 0x16A69, 0x16A70, 0x16ABE, 0x16AC0, 0x16AC9, 0x16AD0, 0x16AED, + 0x16AF0, 0x16AF4, 0x16B00, 0x16B36, 0x16B40, 0x16B43, 0x16B50, 0x16B59, + 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, 0x16E40, 0x16E7F, 0x16F00, 0x16F4A, + 0x16F4F, 0x16F87, 0x16F8F, 0x16F9F, 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE4, + 0x16FF0, 0x16FF1, 0x17000, 0x187F7, 0x18800, 0x18CD5, 0x18D00, 0x18D08, + 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B122, + 0x1B150, 0x1B152, 0x1B164, 0x1B167, 0x1B170, 0x1B2FB, 0x1BC00, 0x1BC6A, + 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, 0x1BC9D, 0x1BC9E, + 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1D165, 0x1D169, 0x1D16D, 0x1D172, + 0x1D17B, 0x1D182, 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0x1D242, 0x1D244, + 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, + 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, + 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, + 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, + 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D6C0, + 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6FA, 0x1D6FC, 0x1D714, 0x1D716, 0x1D734, + 0x1D736, 0x1D74E, 0x1D750, 0x1D76E, 0x1D770, 0x1D788, 0x1D78A, 0x1D7A8, + 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7CB, 0x1D7CE, 0x1D7FF, 0x1DA00, 0x1DA36, + 0x1DA3B, 0x1DA6C, 0x1DA75, 0x1DA75, 0x1DA84, 0x1DA84, 0x1DA9B, 0x1DA9F, + 0x1DAA1, 0x1DAAF, 0x1DF00, 0x1DF1E, 0x1E000, 0x1E006, 0x1E008, 0x1E018, + 0x1E01B, 0x1E021, 0x1E023, 0x1E024, 0x1E026, 0x1E02A, 0x1E100, 0x1E12C, + 0x1E130, 0x1E13D, 0x1E140, 0x1E149, 0x1E14E, 0x1E14E, 0x1E290, 0x1E2AE, + 0x1E2C0, 0x1E2F9, 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, + 0x1E7F0, 0x1E7FE, 0x1E800, 0x1E8C4, 0x1E8D0, 0x1E8D6, 0x1E900, 0x1E94B, + 0x1E950, 0x1E959, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, + 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, + 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, + 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, + 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, + 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, + 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, + 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1FBF0, 0x1FBF9, 0x20000, 0x2A6DF, + 0x2A700, 0x2B738, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, + 0x2F800, 0x2FA1D, 0x30000, 0x3134A, 0xE0100, 0xE01EF, + // #91 (14675+655): bp=XID_Start:XIDS + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00B5, 0x00B5, + 0x00BA, 0x00BA, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02C1, + 0x02C6, 0x02D1, 0x02E0, 0x02E4, 0x02EC, 0x02EC, 0x02EE, 0x02EE, + 0x0370, 0x0374, 0x0376, 0x0377, 0x037B, 0x037D, 0x037F, 0x037F, + 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, + 0x03A3, 0x03F5, 0x03F7, 0x0481, 0x048A, 0x052F, 0x0531, 0x0556, + 0x0559, 0x0559, 0x0560, 0x0588, 0x05D0, 0x05EA, 0x05EF, 0x05F2, + 0x0620, 0x064A, 0x066E, 0x066F, 0x0671, 0x06D3, 0x06D5, 0x06D5, + 0x06E5, 0x06E6, 0x06EE, 0x06EF, 0x06FA, 0x06FC, 0x06FF, 0x06FF, + 0x0710, 0x0710, 0x0712, 0x072F, 0x074D, 0x07A5, 0x07B1, 0x07B1, + 0x07CA, 0x07EA, 0x07F4, 0x07F5, 0x07FA, 0x07FA, 0x0800, 0x0815, + 0x081A, 0x081A, 0x0824, 0x0824, 0x0828, 0x0828, 0x0840, 0x0858, + 0x0860, 0x086A, 0x0870, 0x0887, 0x0889, 0x088E, 0x08A0, 0x08C9, + 0x0904, 0x0939, 0x093D, 0x093D, 0x0950, 0x0950, 0x0958, 0x0961, + 0x0971, 0x0980, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, + 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BD, 0x09BD, + 0x09CE, 0x09CE, 0x09DC, 0x09DD, 0x09DF, 0x09E1, 0x09F0, 0x09F1, + 0x09FC, 0x09FC, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, + 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, + 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A72, 0x0A74, 0x0A85, 0x0A8D, + 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, + 0x0AB5, 0x0AB9, 0x0ABD, 0x0ABD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE1, + 0x0AF9, 0x0AF9, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, + 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B35, 0x0B39, 0x0B3D, 0x0B3D, + 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, 0x0B71, 0x0B71, 0x0B83, 0x0B83, + 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, + 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, + 0x0BAE, 0x0BB9, 0x0BD0, 0x0BD0, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, + 0x0C12, 0x0C28, 0x0C2A, 0x0C39, 0x0C3D, 0x0C3D, 0x0C58, 0x0C5A, + 0x0C5D, 0x0C5D, 0x0C60, 0x0C61, 0x0C80, 0x0C80, 0x0C85, 0x0C8C, + 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, + 0x0CBD, 0x0CBD, 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE1, 0x0CF1, 0x0CF2, + 0x0D04, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D3A, 0x0D3D, 0x0D3D, + 0x0D4E, 0x0D4E, 0x0D54, 0x0D56, 0x0D5F, 0x0D61, 0x0D7A, 0x0D7F, + 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, + 0x0DC0, 0x0DC6, 0x0E01, 0x0E30, 0x0E32, 0x0E32, 0x0E40, 0x0E46, + 0x0E81, 0x0E82, 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, + 0x0EA5, 0x0EA5, 0x0EA7, 0x0EB0, 0x0EB2, 0x0EB2, 0x0EBD, 0x0EBD, + 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0EDC, 0x0EDF, 0x0F00, 0x0F00, + 0x0F40, 0x0F47, 0x0F49, 0x0F6C, 0x0F88, 0x0F8C, 0x1000, 0x102A, + 0x103F, 0x103F, 0x1050, 0x1055, 0x105A, 0x105D, 0x1061, 0x1061, + 0x1065, 0x1066, 0x106E, 0x1070, 0x1075, 0x1081, 0x108E, 0x108E, + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x1380, 0x138F, 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0x1401, 0x166C, + 0x166F, 0x167F, 0x1681, 0x169A, 0x16A0, 0x16EA, 0x16EE, 0x16F8, + 0x1700, 0x1711, 0x171F, 0x1731, 0x1740, 0x1751, 0x1760, 0x176C, + 0x176E, 0x1770, 0x1780, 0x17B3, 0x17D7, 0x17D7, 0x17DC, 0x17DC, + 0x1820, 0x1878, 0x1880, 0x18A8, 0x18AA, 0x18AA, 0x18B0, 0x18F5, + 0x1900, 0x191E, 0x1950, 0x196D, 0x1970, 0x1974, 0x1980, 0x19AB, + 0x19B0, 0x19C9, 0x1A00, 0x1A16, 0x1A20, 0x1A54, 0x1AA7, 0x1AA7, + 0x1B05, 0x1B33, 0x1B45, 0x1B4C, 0x1B83, 0x1BA0, 0x1BAE, 0x1BAF, + 0x1BBA, 0x1BE5, 0x1C00, 0x1C23, 0x1C4D, 0x1C4F, 0x1C5A, 0x1C7D, + 0x1C80, 0x1C88, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF6, 0x1CFA, 0x1CFA, 0x1D00, 0x1DBF, + 0x1E00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, + 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, + 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, 0x1FBE, 0x1FBE, + 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, + 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, 0x2071, 0x2071, + 0x207F, 0x207F, 0x2090, 0x209C, 0x2102, 0x2102, 0x2107, 0x2107, + 0x210A, 0x2113, 0x2115, 0x2115, 0x2118, 0x211D, 0x2124, 0x2124, + 0x2126, 0x2126, 0x2128, 0x2128, 0x212A, 0x2139, 0x213C, 0x213F, + 0x2145, 0x2149, 0x214E, 0x214E, 0x2160, 0x2188, 0x2C00, 0x2CE4, + 0x2CEB, 0x2CEE, 0x2CF2, 0x2CF3, 0x2D00, 0x2D25, 0x2D27, 0x2D27, + 0x2D2D, 0x2D2D, 0x2D30, 0x2D67, 0x2D6F, 0x2D6F, 0x2D80, 0x2D96, + 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, + 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, + 0x3005, 0x3007, 0x3021, 0x3029, 0x3031, 0x3035, 0x3038, 0x303C, + 0x3041, 0x3096, 0x309D, 0x309F, 0x30A1, 0x30FA, 0x30FC, 0x30FF, + 0x3105, 0x312F, 0x3131, 0x318E, 0x31A0, 0x31BF, 0x31F0, 0x31FF, + 0x3400, 0x4DBF, 0x4E00, 0xA48C, 0xA4D0, 0xA4FD, 0xA500, 0xA60C, + 0xA610, 0xA61F, 0xA62A, 0xA62B, 0xA640, 0xA66E, 0xA67F, 0xA69D, + 0xA6A0, 0xA6EF, 0xA717, 0xA71F, 0xA722, 0xA788, 0xA78B, 0xA7CA, + 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, 0xA7F2, 0xA801, + 0xA803, 0xA805, 0xA807, 0xA80A, 0xA80C, 0xA822, 0xA840, 0xA873, + 0xA882, 0xA8B3, 0xA8F2, 0xA8F7, 0xA8FB, 0xA8FB, 0xA8FD, 0xA8FE, + 0xA90A, 0xA925, 0xA930, 0xA946, 0xA960, 0xA97C, 0xA984, 0xA9B2, + 0xA9CF, 0xA9CF, 0xA9E0, 0xA9E4, 0xA9E6, 0xA9EF, 0xA9FA, 0xA9FE, + 0xAA00, 0xAA28, 0xAA40, 0xAA42, 0xAA44, 0xAA4B, 0xAA60, 0xAA76, + 0xAA7A, 0xAA7A, 0xAA7E, 0xAAAF, 0xAAB1, 0xAAB1, 0xAAB5, 0xAAB6, + 0xAAB9, 0xAABD, 0xAAC0, 0xAAC0, 0xAAC2, 0xAAC2, 0xAADB, 0xAADD, + 0xAAE0, 0xAAEA, 0xAAF2, 0xAAF4, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, + 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0xAB30, 0xAB5A, + 0xAB5C, 0xAB69, 0xAB70, 0xABE2, 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, + 0xD7CB, 0xD7FB, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0xFB00, 0xFB06, + 0xFB13, 0xFB17, 0xFB1D, 0xFB1D, 0xFB1F, 0xFB28, 0xFB2A, 0xFB36, + 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, + 0xFB46, 0xFBB1, 0xFBD3, 0xFC5D, 0xFC64, 0xFD3D, 0xFD50, 0xFD8F, + 0xFD92, 0xFDC7, 0xFDF0, 0xFDF9, 0xFE71, 0xFE71, 0xFE73, 0xFE73, + 0xFE77, 0xFE77, 0xFE79, 0xFE79, 0xFE7B, 0xFE7B, 0xFE7D, 0xFE7D, + 0xFE7F, 0xFEFC, 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0xFF66, 0xFF9D, + 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, + 0xFFDA, 0xFFDC, 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, + 0x1003C, 0x1003D, 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, + 0x10140, 0x10174, 0x10280, 0x1029C, 0x102A0, 0x102D0, 0x10300, 0x1031F, + 0x1032D, 0x1034A, 0x10350, 0x10375, 0x10380, 0x1039D, 0x103A0, 0x103C3, + 0x103C8, 0x103CF, 0x103D1, 0x103D5, 0x10400, 0x1049D, 0x104B0, 0x104D3, + 0x104D8, 0x104FB, 0x10500, 0x10527, 0x10530, 0x10563, 0x10570, 0x1057A, + 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, 0x10597, 0x105A1, + 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, 0x10600, 0x10736, + 0x10740, 0x10755, 0x10760, 0x10767, 0x10780, 0x10785, 0x10787, 0x107B0, + 0x107B2, 0x107BA, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080A, 0x10835, + 0x10837, 0x10838, 0x1083C, 0x1083C, 0x1083F, 0x10855, 0x10860, 0x10876, + 0x10880, 0x1089E, 0x108E0, 0x108F2, 0x108F4, 0x108F5, 0x10900, 0x10915, + 0x10920, 0x10939, 0x10980, 0x109B7, 0x109BE, 0x109BF, 0x10A00, 0x10A00, + 0x10A10, 0x10A13, 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A60, 0x10A7C, + 0x10A80, 0x10A9C, 0x10AC0, 0x10AC7, 0x10AC9, 0x10AE4, 0x10B00, 0x10B35, + 0x10B40, 0x10B55, 0x10B60, 0x10B72, 0x10B80, 0x10B91, 0x10C00, 0x10C48, + 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10D00, 0x10D23, 0x10E80, 0x10EA9, + 0x10EB0, 0x10EB1, 0x10F00, 0x10F1C, 0x10F27, 0x10F27, 0x10F30, 0x10F45, + 0x10F70, 0x10F81, 0x10FB0, 0x10FC4, 0x10FE0, 0x10FF6, 0x11003, 0x11037, + 0x11071, 0x11072, 0x11075, 0x11075, 0x11083, 0x110AF, 0x110D0, 0x110E8, + 0x11103, 0x11126, 0x11144, 0x11144, 0x11147, 0x11147, 0x11150, 0x11172, + 0x11176, 0x11176, 0x11183, 0x111B2, 0x111C1, 0x111C4, 0x111DA, 0x111DA, + 0x111DC, 0x111DC, 0x11200, 0x11211, 0x11213, 0x1122B, 0x11280, 0x11286, + 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, 0x1129F, 0x112A8, + 0x112B0, 0x112DE, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, + 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133D, 0x1133D, + 0x11350, 0x11350, 0x1135D, 0x11361, 0x11400, 0x11434, 0x11447, 0x1144A, + 0x1145F, 0x11461, 0x11480, 0x114AF, 0x114C4, 0x114C5, 0x114C7, 0x114C7, + 0x11580, 0x115AE, 0x115D8, 0x115DB, 0x11600, 0x1162F, 0x11644, 0x11644, + 0x11680, 0x116AA, 0x116B8, 0x116B8, 0x11700, 0x1171A, 0x11740, 0x11746, + 0x11800, 0x1182B, 0x118A0, 0x118DF, 0x118FF, 0x11906, 0x11909, 0x11909, + 0x1190C, 0x11913, 0x11915, 0x11916, 0x11918, 0x1192F, 0x1193F, 0x1193F, + 0x11941, 0x11941, 0x119A0, 0x119A7, 0x119AA, 0x119D0, 0x119E1, 0x119E1, + 0x119E3, 0x119E3, 0x11A00, 0x11A00, 0x11A0B, 0x11A32, 0x11A3A, 0x11A3A, + 0x11A50, 0x11A50, 0x11A5C, 0x11A89, 0x11A9D, 0x11A9D, 0x11AB0, 0x11AF8, + 0x11C00, 0x11C08, 0x11C0A, 0x11C2E, 0x11C40, 0x11C40, 0x11C72, 0x11C8F, + 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D30, 0x11D46, 0x11D46, + 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D89, 0x11D98, 0x11D98, + 0x11EE0, 0x11EF2, 0x11FB0, 0x11FB0, 0x12000, 0x12399, 0x12400, 0x1246E, + 0x12480, 0x12543, 0x12F90, 0x12FF0, 0x13000, 0x1342E, 0x14400, 0x14646, + 0x16800, 0x16A38, 0x16A40, 0x16A5E, 0x16A70, 0x16ABE, 0x16AD0, 0x16AED, + 0x16B00, 0x16B2F, 0x16B40, 0x16B43, 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, + 0x16E40, 0x16E7F, 0x16F00, 0x16F4A, 0x16F50, 0x16F50, 0x16F93, 0x16F9F, + 0x16FE0, 0x16FE1, 0x16FE3, 0x16FE3, 0x17000, 0x187F7, 0x18800, 0x18CD5, + 0x18D00, 0x18D08, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, + 0x1B000, 0x1B122, 0x1B150, 0x1B152, 0x1B164, 0x1B167, 0x1B170, 0x1B2FB, + 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, + 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, + 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, + 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, + 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, + 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D6C0, + 0x1D6C2, 0x1D6DA, 0x1D6DC, 0x1D6FA, 0x1D6FC, 0x1D714, 0x1D716, 0x1D734, + 0x1D736, 0x1D74E, 0x1D750, 0x1D76E, 0x1D770, 0x1D788, 0x1D78A, 0x1D7A8, + 0x1D7AA, 0x1D7C2, 0x1D7C4, 0x1D7CB, 0x1DF00, 0x1DF1E, 0x1E100, 0x1E12C, + 0x1E137, 0x1E13D, 0x1E14E, 0x1E14E, 0x1E290, 0x1E2AD, 0x1E2C0, 0x1E2EB, + 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, + 0x1E800, 0x1E8C4, 0x1E900, 0x1E943, 0x1E94B, 0x1E94B, 0x1EE00, 0x1EE03, + 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, + 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, + 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, + 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, + 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, + 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, + 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, + 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, + 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, + 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, + // #92 (15330+3): sc=Adlam:Adlm + 0x1E900, 0x1E94B, 0x1E950, 0x1E959, 0x1E95E, 0x1E95F, + // #93 (15333+3): sc=Ahom:Ahom scx=Ahom:Ahom + 0x11700, 0x1171A, 0x1171D, 0x1172B, 0x11730, 0x11746, + // #94 (15336+1): sc=Anatolian_Hieroglyphs:Hluw scx=Anatolian_Hieroglyphs:Hluw + 0x14400, 0x14646, + // #95 (15337+57): sc=Arabic:Arab + 0x0600, 0x0604, 0x0606, 0x060B, 0x060D, 0x061A, 0x061C, 0x061E, + 0x0620, 0x063F, 0x0641, 0x064A, 0x0656, 0x066F, 0x0671, 0x06DC, + 0x06DE, 0x06FF, 0x0750, 0x077F, 0x0870, 0x088E, 0x0890, 0x0891, + 0x0898, 0x08E1, 0x08E3, 0x08FF, 0xFB50, 0xFBC2, 0xFBD3, 0xFD3D, + 0xFD40, 0xFD8F, 0xFD92, 0xFDC7, 0xFDCF, 0xFDCF, 0xFDF0, 0xFDFF, + 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0x10E60, 0x10E7E, 0x1EE00, 0x1EE03, + 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, + 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, + 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, + 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, + 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, + 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, + 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, + 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, + 0x1EEF0, 0x1EEF1, + // #96 (15394+4): sc=Armenian:Armn scx=Armenian:Armn + 0x0531, 0x0556, 0x0559, 0x058A, 0x058D, 0x058F, 0xFB13, 0xFB17, + // #97 (15398+2): sc=Avestan:Avst scx=Avestan:Avst + 0x10B00, 0x10B35, 0x10B39, 0x10B3F, + // #98 (15400+2): sc=Balinese:Bali scx=Balinese:Bali + 0x1B00, 0x1B4C, 0x1B50, 0x1B7E, + // #99 (15402+2): sc=Bamum:Bamu scx=Bamum:Bamu + 0xA6A0, 0xA6F7, 0x16800, 0x16A38, + // #100 (15404+2): sc=Bassa_Vah:Bass scx=Bassa_Vah:Bass + 0x16AD0, 0x16AED, 0x16AF0, 0x16AF5, + // #101 (15406+2): sc=Batak:Batk scx=Batak:Batk + 0x1BC0, 0x1BF3, 0x1BFC, 0x1BFF, + // #102 (15408+14): sc=Bengali:Beng + 0x0980, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, + 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BC, 0x09C4, + 0x09C7, 0x09C8, 0x09CB, 0x09CE, 0x09D7, 0x09D7, 0x09DC, 0x09DD, + 0x09DF, 0x09E3, 0x09E6, 0x09FE, + // #103 (15422+4): sc=Bhaiksuki:Bhks scx=Bhaiksuki:Bhks + 0x11C00, 0x11C08, 0x11C0A, 0x11C36, 0x11C38, 0x11C45, 0x11C50, 0x11C6C, + // #104 (15426+3): sc=Bopomofo:Bopo + 0x02EA, 0x02EB, 0x3105, 0x312F, 0x31A0, 0x31BF, + // #105 (15429+3): sc=Brahmi:Brah scx=Brahmi:Brah + 0x11000, 0x1104D, 0x11052, 0x11075, 0x1107F, 0x1107F, + // #106 (15432+1): sc=Braille:Brai scx=Braille:Brai + 0x2800, 0x28FF, + // #107 (15433+2): sc=Buginese:Bugi + 0x1A00, 0x1A1B, 0x1A1E, 0x1A1F, + // #108 (15435+1): sc=Buhid:Buhd + 0x1740, 0x1753, + // #109 (15436+3): sc=Canadian_Aboriginal:Cans scx=Canadian_Aboriginal:Cans + 0x1400, 0x167F, 0x18B0, 0x18F5, 0x11AB0, 0x11ABF, + // #110 (15439+1): sc=Carian:Cari scx=Carian:Cari + 0x102A0, 0x102D0, + // #111 (15440+2): sc=Caucasian_Albanian:Aghb scx=Caucasian_Albanian:Aghb + 0x10530, 0x10563, 0x1056F, 0x1056F, + // #112 (15442+2): sc=Chakma:Cakm + 0x11100, 0x11134, 0x11136, 0x11147, + // #113 (15444+4): sc=Cham:Cham scx=Cham:Cham + 0xAA00, 0xAA36, 0xAA40, 0xAA4D, 0xAA50, 0xAA59, 0xAA5C, 0xAA5F, + // #114 (15448+3): sc=Cherokee:Cher scx=Cherokee:Cher + 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0xAB70, 0xABBF, + // #115 (15451+1): sc=Chorasmian:Chrs scx=Chorasmian:Chrs + 0x10FB0, 0x10FCB, + // #116 (15452+174): sc=Common:Zyyy + 0x0000, 0x0040, 0x005B, 0x0060, 0x007B, 0x00A9, 0x00AB, 0x00B9, + 0x00BB, 0x00BF, 0x00D7, 0x00D7, 0x00F7, 0x00F7, 0x02B9, 0x02DF, + 0x02E5, 0x02E9, 0x02EC, 0x02FF, 0x0374, 0x0374, 0x037E, 0x037E, + 0x0385, 0x0385, 0x0387, 0x0387, 0x0605, 0x0605, 0x060C, 0x060C, + 0x061B, 0x061B, 0x061F, 0x061F, 0x0640, 0x0640, 0x06DD, 0x06DD, + 0x08E2, 0x08E2, 0x0964, 0x0965, 0x0E3F, 0x0E3F, 0x0FD5, 0x0FD8, + 0x10FB, 0x10FB, 0x16EB, 0x16ED, 0x1735, 0x1736, 0x1802, 0x1803, + 0x1805, 0x1805, 0x1CD3, 0x1CD3, 0x1CE1, 0x1CE1, 0x1CE9, 0x1CEC, + 0x1CEE, 0x1CF3, 0x1CF5, 0x1CF7, 0x1CFA, 0x1CFA, 0x2000, 0x200B, + 0x200E, 0x2064, 0x2066, 0x2070, 0x2074, 0x207E, 0x2080, 0x208E, + 0x20A0, 0x20C0, 0x2100, 0x2125, 0x2127, 0x2129, 0x212C, 0x2131, + 0x2133, 0x214D, 0x214F, 0x215F, 0x2189, 0x218B, 0x2190, 0x2426, + 0x2440, 0x244A, 0x2460, 0x27FF, 0x2900, 0x2B73, 0x2B76, 0x2B95, + 0x2B97, 0x2BFF, 0x2E00, 0x2E5D, 0x2FF0, 0x2FFB, 0x3000, 0x3004, + 0x3006, 0x3006, 0x3008, 0x3020, 0x3030, 0x3037, 0x303C, 0x303F, + 0x309B, 0x309C, 0x30A0, 0x30A0, 0x30FB, 0x30FC, 0x3190, 0x319F, + 0x31C0, 0x31E3, 0x3220, 0x325F, 0x327F, 0x32CF, 0x32FF, 0x32FF, + 0x3358, 0x33FF, 0x4DC0, 0x4DFF, 0xA700, 0xA721, 0xA788, 0xA78A, + 0xA830, 0xA839, 0xA92E, 0xA92E, 0xA9CF, 0xA9CF, 0xAB5B, 0xAB5B, + 0xAB6A, 0xAB6B, 0xFD3E, 0xFD3F, 0xFE10, 0xFE19, 0xFE30, 0xFE52, + 0xFE54, 0xFE66, 0xFE68, 0xFE6B, 0xFEFF, 0xFEFF, 0xFF01, 0xFF20, + 0xFF3B, 0xFF40, 0xFF5B, 0xFF65, 0xFF70, 0xFF70, 0xFF9E, 0xFF9F, + 0xFFE0, 0xFFE6, 0xFFE8, 0xFFEE, 0xFFF9, 0xFFFD, 0x10100, 0x10102, + 0x10107, 0x10133, 0x10137, 0x1013F, 0x10190, 0x1019C, 0x101D0, 0x101FC, + 0x102E1, 0x102FB, 0x1BCA0, 0x1BCA3, 0x1CF50, 0x1CFC3, 0x1D000, 0x1D0F5, + 0x1D100, 0x1D126, 0x1D129, 0x1D166, 0x1D16A, 0x1D17A, 0x1D183, 0x1D184, + 0x1D18C, 0x1D1A9, 0x1D1AE, 0x1D1EA, 0x1D2E0, 0x1D2F3, 0x1D300, 0x1D356, + 0x1D360, 0x1D378, 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, + 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, + 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, + 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, + 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, + 0x1D6A8, 0x1D7CB, 0x1D7CE, 0x1D7FF, 0x1EC71, 0x1ECB4, 0x1ED01, 0x1ED3D, + 0x1F000, 0x1F02B, 0x1F030, 0x1F093, 0x1F0A0, 0x1F0AE, 0x1F0B1, 0x1F0BF, + 0x1F0C1, 0x1F0CF, 0x1F0D1, 0x1F0F5, 0x1F100, 0x1F1AD, 0x1F1E6, 0x1F1FF, + 0x1F201, 0x1F202, 0x1F210, 0x1F23B, 0x1F240, 0x1F248, 0x1F250, 0x1F251, + 0x1F260, 0x1F265, 0x1F300, 0x1F6D7, 0x1F6DD, 0x1F6EC, 0x1F6F0, 0x1F6FC, + 0x1F700, 0x1F773, 0x1F780, 0x1F7D8, 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, + 0x1F800, 0x1F80B, 0x1F810, 0x1F847, 0x1F850, 0x1F859, 0x1F860, 0x1F887, + 0x1F890, 0x1F8AD, 0x1F8B0, 0x1F8B1, 0x1F900, 0x1FA53, 0x1FA60, 0x1FA6D, + 0x1FA70, 0x1FA74, 0x1FA78, 0x1FA7C, 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, + 0x1FAB0, 0x1FABA, 0x1FAC0, 0x1FAC5, 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, + 0x1FAF0, 0x1FAF6, 0x1FB00, 0x1FB92, 0x1FB94, 0x1FBCA, 0x1FBF0, 0x1FBF9, + 0xE0001, 0xE0001, 0xE0020, 0xE007F, + // #117 (15626+3): sc=Coptic:Copt:Qaac + 0x03E2, 0x03EF, 0x2C80, 0x2CF3, 0x2CF9, 0x2CFF, + // #118 (15629+1): sc=Cypro_Minoan:Cpmn + 0x12F90, 0x12FF2, + // #119 (15630+4): sc=Cuneiform:Xsux scx=Cuneiform:Xsux + 0x12000, 0x12399, 0x12400, 0x1246E, 0x12470, 0x12474, 0x12480, 0x12543, + // #120 (15634+6): sc=Cypriot:Cprt + 0x10800, 0x10805, 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, + 0x1083C, 0x1083C, 0x1083F, 0x1083F, + // #121 (15640+8): sc=Cyrillic:Cyrl + 0x0400, 0x0484, 0x0487, 0x052F, 0x1C80, 0x1C88, 0x1D2B, 0x1D2B, + 0x1D78, 0x1D78, 0x2DE0, 0x2DFF, 0xA640, 0xA69F, 0xFE2E, 0xFE2F, + // #122 (15648+1): sc=Deseret:Dsrt scx=Deseret:Dsrt + 0x10400, 0x1044F, + // #123 (15649+4): sc=Devanagari:Deva + 0x0900, 0x0950, 0x0955, 0x0963, 0x0966, 0x097F, 0xA8E0, 0xA8FF, + // #124 (15653+8): sc=Dives_Akuru:Diak scx=Dives_Akuru:Diak + 0x11900, 0x11906, 0x11909, 0x11909, 0x1190C, 0x11913, 0x11915, 0x11916, + 0x11918, 0x11935, 0x11937, 0x11938, 0x1193B, 0x11946, 0x11950, 0x11959, + // #125 (15661+1): sc=Dogra:Dogr + 0x11800, 0x1183B, + // #126 (15662+5): sc=Duployan:Dupl + 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, + 0x1BC9C, 0x1BC9F, + // #127 (15667+2): sc=Egyptian_Hieroglyphs:Egyp scx=Egyptian_Hieroglyphs:Egyp + 0x13000, 0x1342E, 0x13430, 0x13438, + // #128 (15669+1): sc=Elbasan:Elba scx=Elbasan:Elba + 0x10500, 0x10527, + // #129 (15670+1): sc=Elymaic:Elym scx=Elymaic:Elym + 0x10FE0, 0x10FF6, + // #130 (15671+36): sc=Ethiopic:Ethi scx=Ethiopic:Ethi + 0x1200, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, + 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, + 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, + 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, + 0x135D, 0x137C, 0x1380, 0x1399, 0x2D80, 0x2D96, 0x2DA0, 0x2DA6, + 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, + 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, 0xAB01, 0xAB06, + 0xAB09, 0xAB0E, 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, + 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, + // #131 (15707+10): sc=Georgian:Geor + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FA, + 0x10FC, 0x10FF, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x2D00, 0x2D25, + 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, + // #132 (15717+6): sc=Glagolitic:Glag + 0x2C00, 0x2C5F, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, + // #133 (15723+1): sc=Gothic:Goth scx=Gothic:Goth + 0x10330, 0x1034A, + // #134 (15724+15): sc=Grantha:Gran + 0x11300, 0x11303, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, + 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133C, 0x11344, + 0x11347, 0x11348, 0x1134B, 0x1134D, 0x11350, 0x11350, 0x11357, 0x11357, + 0x1135D, 0x11363, 0x11366, 0x1136C, 0x11370, 0x11374, + // #135 (15739+36): sc=Greek:Grek + 0x0370, 0x0373, 0x0375, 0x0377, 0x037A, 0x037D, 0x037F, 0x037F, + 0x0384, 0x0384, 0x0386, 0x0386, 0x0388, 0x038A, 0x038C, 0x038C, + 0x038E, 0x03A1, 0x03A3, 0x03E1, 0x03F0, 0x03FF, 0x1D26, 0x1D2A, + 0x1D5D, 0x1D61, 0x1D66, 0x1D6A, 0x1DBF, 0x1DBF, 0x1F00, 0x1F15, + 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, + 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, + 0x1F80, 0x1FB4, 0x1FB6, 0x1FC4, 0x1FC6, 0x1FD3, 0x1FD6, 0x1FDB, + 0x1FDD, 0x1FEF, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFE, 0x2126, 0x2126, + 0xAB65, 0xAB65, 0x10140, 0x1018E, 0x101A0, 0x101A0, 0x1D200, 0x1D245, + // #136 (15775+14): sc=Gujarati:Gujr + 0x0A81, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, + 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABC, 0x0AC5, + 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, + 0x0AE6, 0x0AF1, 0x0AF9, 0x0AFF, + // #137 (15789+6): sc=Gunjala_Gondi:Gong + 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, 0x11D90, 0x11D91, + 0x11D93, 0x11D98, 0x11DA0, 0x11DA9, + // #138 (15795+16): sc=Gurmukhi:Guru + 0x0A01, 0x0A03, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, + 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, + 0x0A3C, 0x0A3C, 0x0A3E, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, + 0x0A51, 0x0A51, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A66, 0x0A76, + // #139 (15811+20): sc=Han:Hani + 0x2E80, 0x2E99, 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, 0x3005, 0x3005, + 0x3007, 0x3007, 0x3021, 0x3029, 0x3038, 0x303B, 0x3400, 0x4DBF, + 0x4E00, 0x9FFF, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0x16FE2, 0x16FE3, + 0x16FF0, 0x16FF1, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, 0x2B740, 0x2B81D, + 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, + // #140 (15831+14): sc=Hangul:Hang + 0x1100, 0x11FF, 0x302E, 0x302F, 0x3131, 0x318E, 0x3200, 0x321E, + 0x3260, 0x327E, 0xA960, 0xA97C, 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, + 0xD7CB, 0xD7FB, 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, + 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, + // #141 (15845+2): sc=Hanifi_Rohingya:Rohg + 0x10D00, 0x10D27, 0x10D30, 0x10D39, + // #142 (15847+1): sc=Hanunoo:Hano + 0x1720, 0x1734, + // #143 (15848+3): sc=Hatran:Hatr scx=Hatran:Hatr + 0x108E0, 0x108F2, 0x108F4, 0x108F5, 0x108FB, 0x108FF, + // #144 (15851+9): sc=Hebrew:Hebr scx=Hebrew:Hebr + 0x0591, 0x05C7, 0x05D0, 0x05EA, 0x05EF, 0x05F4, 0xFB1D, 0xFB36, + 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, + 0xFB46, 0xFB4F, + // #145 (15860+5): sc=Hiragana:Hira + 0x3041, 0x3096, 0x309D, 0x309F, 0x1B001, 0x1B11F, 0x1B150, 0x1B152, + 0x1F200, 0x1F200, + // #146 (15865+2): sc=Imperial_Aramaic:Armi scx=Imperial_Aramaic:Armi + 0x10840, 0x10855, 0x10857, 0x1085F, + // #147 (15867+29): sc=Inherited:Zinh:Qaai + 0x0300, 0x036F, 0x0485, 0x0486, 0x064B, 0x0655, 0x0670, 0x0670, + 0x0951, 0x0954, 0x1AB0, 0x1ACE, 0x1CD0, 0x1CD2, 0x1CD4, 0x1CE0, + 0x1CE2, 0x1CE8, 0x1CED, 0x1CED, 0x1CF4, 0x1CF4, 0x1CF8, 0x1CF9, + 0x1DC0, 0x1DFF, 0x200C, 0x200D, 0x20D0, 0x20F0, 0x302A, 0x302D, + 0x3099, 0x309A, 0xFE00, 0xFE0F, 0xFE20, 0xFE2D, 0x101FD, 0x101FD, + 0x102E0, 0x102E0, 0x1133B, 0x1133B, 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, + 0x1D167, 0x1D169, 0x1D17B, 0x1D182, 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, + 0xE0100, 0xE01EF, + // #148 (15896+2): sc=Inscriptional_Pahlavi:Phli scx=Inscriptional_Pahlavi:Phli + 0x10B60, 0x10B72, 0x10B78, 0x10B7F, + // #149 (15898+2): sc=Inscriptional_Parthian:Prti scx=Inscriptional_Parthian:Prti + 0x10B40, 0x10B55, 0x10B58, 0x10B5F, + // #150 (15900+3): sc=Javanese:Java + 0xA980, 0xA9CD, 0xA9D0, 0xA9D9, 0xA9DE, 0xA9DF, + // #151 (15903+2): sc=Kaithi:Kthi + 0x11080, 0x110C2, 0x110CD, 0x110CD, + // #152 (15905+13): sc=Kannada:Knda + 0x0C80, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, + 0x0CB5, 0x0CB9, 0x0CBC, 0x0CC4, 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, + 0x0CD5, 0x0CD6, 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE3, 0x0CE6, 0x0CEF, + 0x0CF1, 0x0CF2, + // #153 (15918+13): sc=Katakana:Kana + 0x30A1, 0x30FA, 0x30FD, 0x30FF, 0x31F0, 0x31FF, 0x32D0, 0x32FE, + 0x3300, 0x3357, 0xFF66, 0xFF6F, 0xFF71, 0xFF9D, 0x1AFF0, 0x1AFF3, + 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B000, 0x1B120, 0x1B122, + 0x1B164, 0x1B167, + // #154 (15931+2): sc=Kayah_Li:Kali + 0xA900, 0xA92D, 0xA92F, 0xA92F, + // #155 (15933+8): sc=Kharoshthi:Khar scx=Kharoshthi:Khar + 0x10A00, 0x10A03, 0x10A05, 0x10A06, 0x10A0C, 0x10A13, 0x10A15, 0x10A17, + 0x10A19, 0x10A35, 0x10A38, 0x10A3A, 0x10A3F, 0x10A48, 0x10A50, 0x10A58, + // #156 (15941+2): sc=Khitan_Small_Script:Kits scx=Khitan_Small_Script:Kits + 0x16FE4, 0x16FE4, 0x18B00, 0x18CD5, + // #157 (15943+4): sc=Khmer:Khmr scx=Khmer:Khmr + 0x1780, 0x17DD, 0x17E0, 0x17E9, 0x17F0, 0x17F9, 0x19E0, 0x19FF, + // #158 (15947+2): sc=Khojki:Khoj + 0x11200, 0x11211, 0x11213, 0x1123E, + // #159 (15949+2): sc=Khudawadi:Sind + 0x112B0, 0x112EA, 0x112F0, 0x112F9, + // #160 (15951+11): sc=Lao:Laoo scx=Lao:Laoo + 0x0E81, 0x0E82, 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, + 0x0EA5, 0x0EA5, 0x0EA7, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, + 0x0EC8, 0x0ECD, 0x0ED0, 0x0ED9, 0x0EDC, 0x0EDF, + // #161 (15962+38): sc=Latin:Latn + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00BA, 0x00BA, + 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02B8, 0x02E0, 0x02E4, + 0x1D00, 0x1D25, 0x1D2C, 0x1D5C, 0x1D62, 0x1D65, 0x1D6B, 0x1D77, + 0x1D79, 0x1DBE, 0x1E00, 0x1EFF, 0x2071, 0x2071, 0x207F, 0x207F, + 0x2090, 0x209C, 0x212A, 0x212B, 0x2132, 0x2132, 0x214E, 0x214E, + 0x2160, 0x2188, 0x2C60, 0x2C7F, 0xA722, 0xA787, 0xA78B, 0xA7CA, + 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, 0xA7F2, 0xA7FF, + 0xAB30, 0xAB5A, 0xAB5C, 0xAB64, 0xAB66, 0xAB69, 0xFB00, 0xFB06, + 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0x10780, 0x10785, 0x10787, 0x107B0, + 0x107B2, 0x107BA, 0x1DF00, 0x1DF1E, + // #162 (16000+3): sc=Lepcha:Lepc scx=Lepcha:Lepc + 0x1C00, 0x1C37, 0x1C3B, 0x1C49, 0x1C4D, 0x1C4F, + // #163 (16003+5): sc=Limbu:Limb + 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x193B, 0x1940, 0x1940, + 0x1944, 0x194F, + // #164 (16008+3): sc=Linear_A:Lina + 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + // #165 (16011+7): sc=Linear_B:Linb + 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, + 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, + // #166 (16018+2): sc=Lisu:Lisu scx=Lisu:Lisu + 0xA4D0, 0xA4FF, 0x11FB0, 0x11FB0, + // #167 (16020+1): sc=Lycian:Lyci scx=Lycian:Lyci + 0x10280, 0x1029C, + // #168 (16021+2): sc=Lydian:Lydi scx=Lydian:Lydi + 0x10920, 0x10939, 0x1093F, 0x1093F, + // #169 (16023+1): sc=Mahajani:Mahj + 0x11150, 0x11176, + // #170 (16024+1): sc=Makasar:Maka scx=Makasar:Maka + 0x11EE0, 0x11EF8, + // #171 (16025+7): sc=Malayalam:Mlym + 0x0D00, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D44, 0x0D46, 0x0D48, + 0x0D4A, 0x0D4F, 0x0D54, 0x0D63, 0x0D66, 0x0D7F, + // #172 (16032+2): sc=Mandaic:Mand + 0x0840, 0x085B, 0x085E, 0x085E, + // #173 (16034+2): sc=Manichaean:Mani + 0x10AC0, 0x10AE6, 0x10AEB, 0x10AF6, + // #174 (16036+3): sc=Marchen:Marc scx=Marchen:Marc + 0x11C70, 0x11C8F, 0x11C92, 0x11CA7, 0x11CA9, 0x11CB6, + // #175 (16039+7): sc=Masaram_Gondi:Gonm + 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D36, 0x11D3A, 0x11D3A, + 0x11D3C, 0x11D3D, 0x11D3F, 0x11D47, 0x11D50, 0x11D59, + // #176 (16046+1): sc=Medefaidrin:Medf scx=Medefaidrin:Medf + 0x16E40, 0x16E9A, + // #177 (16047+3): sc=Meetei_Mayek:Mtei scx=Meetei_Mayek:Mtei + 0xAAE0, 0xAAF6, 0xABC0, 0xABED, 0xABF0, 0xABF9, + // #178 (16050+2): sc=Mende_Kikakui:Mend scx=Mende_Kikakui:Mend + 0x1E800, 0x1E8C4, 0x1E8C7, 0x1E8D6, + // #179 (16052+3): sc=Meroitic_Cursive:Merc scx=Meroitic_Cursive:Merc + 0x109A0, 0x109B7, 0x109BC, 0x109CF, 0x109D2, 0x109FF, + // #180 (16055+1): sc=Meroitic_Hieroglyphs:Mero scx=Meroitic_Hieroglyphs:Mero + 0x10980, 0x1099F, + // #181 (16056+3): sc=Miao:Plrd scx=Miao:Plrd + 0x16F00, 0x16F4A, 0x16F4F, 0x16F87, 0x16F8F, 0x16F9F, + // #182 (16059+2): sc=Modi:Modi + 0x11600, 0x11644, 0x11650, 0x11659, + // #183 (16061+6): sc=Mongolian:Mong + 0x1800, 0x1801, 0x1804, 0x1804, 0x1806, 0x1819, 0x1820, 0x1878, + 0x1880, 0x18AA, 0x11660, 0x1166C, + // #184 (16067+3): sc=Mro:Mroo scx=Mro:Mroo + 0x16A40, 0x16A5E, 0x16A60, 0x16A69, 0x16A6E, 0x16A6F, + // #185 (16070+5): sc=Multani:Mult + 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, + 0x1129F, 0x112A9, + // #186 (16075+3): sc=Myanmar:Mymr + 0x1000, 0x109F, 0xA9E0, 0xA9FE, 0xAA60, 0xAA7F, + // #187 (16078+2): sc=Nabataean:Nbat scx=Nabataean:Nbat + 0x10880, 0x1089E, 0x108A7, 0x108AF, + // #188 (16080+3): sc=Nandinagari:Nand + 0x119A0, 0x119A7, 0x119AA, 0x119D7, 0x119DA, 0x119E4, + // #189 (16083+4): sc=New_Tai_Lue:Talu scx=New_Tai_Lue:Talu + 0x1980, 0x19AB, 0x19B0, 0x19C9, 0x19D0, 0x19DA, 0x19DE, 0x19DF, + // #190 (16087+2): sc=Newa:Newa scx=Newa:Newa + 0x11400, 0x1145B, 0x1145D, 0x11461, + // #191 (16089+2): sc=Nko:Nkoo + 0x07C0, 0x07FA, 0x07FD, 0x07FF, + // #192 (16091+2): sc=Nushu:Nshu scx=Nushu:Nshu + 0x16FE1, 0x16FE1, 0x1B170, 0x1B2FB, + // #193 (16093+4): sc=Nyiakeng_Puachue_Hmong:Hmnp scx=Nyiakeng_Puachue_Hmong:Hmnp + 0x1E100, 0x1E12C, 0x1E130, 0x1E13D, 0x1E140, 0x1E149, 0x1E14E, 0x1E14F, + // #194 (16097+1): sc=Ogham:Ogam scx=Ogham:Ogam + 0x1680, 0x169C, + // #195 (16098+1): sc=Ol_Chiki:Olck scx=Ol_Chiki:Olck + 0x1C50, 0x1C7F, + // #196 (16099+3): sc=Old_Hungarian:Hung scx=Old_Hungarian:Hung + 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10CFA, 0x10CFF, + // #197 (16102+2): sc=Old_Italic:Ital scx=Old_Italic:Ital + 0x10300, 0x10323, 0x1032D, 0x1032F, + // #198 (16104+1): sc=Old_North_Arabian:Narb scx=Old_North_Arabian:Narb + 0x10A80, 0x10A9F, + // #199 (16105+1): sc=Old_Permic:Perm + 0x10350, 0x1037A, + // #200 (16106+2): sc=Old_Persian:Xpeo scx=Old_Persian:Xpeo + 0x103A0, 0x103C3, 0x103C8, 0x103D5, + // #201 (16108+1): sc=Old_Sogdian:Sogo scx=Old_Sogdian:Sogo + 0x10F00, 0x10F27, + // #202 (16109+1): sc=Old_South_Arabian:Sarb scx=Old_South_Arabian:Sarb + 0x10A60, 0x10A7F, + // #203 (16110+1): sc=Old_Turkic:Orkh scx=Old_Turkic:Orkh + 0x10C00, 0x10C48, + // #204 (16111+1): sc=Old_Uyghur:Ougr + 0x10F70, 0x10F89, + // #205 (16112+14): sc=Oriya:Orya + 0x0B01, 0x0B03, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, + 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B35, 0x0B39, 0x0B3C, 0x0B44, + 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, 0x0B55, 0x0B57, 0x0B5C, 0x0B5D, + 0x0B5F, 0x0B63, 0x0B66, 0x0B77, + // #206 (16126+2): sc=Osage:Osge scx=Osage:Osge + 0x104B0, 0x104D3, 0x104D8, 0x104FB, + // #207 (16128+2): sc=Osmanya:Osma scx=Osmanya:Osma + 0x10480, 0x1049D, 0x104A0, 0x104A9, + // #208 (16130+5): sc=Pahawh_Hmong:Hmng scx=Pahawh_Hmong:Hmng + 0x16B00, 0x16B45, 0x16B50, 0x16B59, 0x16B5B, 0x16B61, 0x16B63, 0x16B77, + 0x16B7D, 0x16B8F, + // #209 (16135+1): sc=Palmyrene:Palm scx=Palmyrene:Palm + 0x10860, 0x1087F, + // #210 (16136+1): sc=Pau_Cin_Hau:Pauc scx=Pau_Cin_Hau:Pauc + 0x11AC0, 0x11AF8, + // #211 (16137+1): sc=Phags_Pa:Phag + 0xA840, 0xA877, + // #212 (16138+2): sc=Phoenician:Phnx scx=Phoenician:Phnx + 0x10900, 0x1091B, 0x1091F, 0x1091F, + // #213 (16140+3): sc=Psalter_Pahlavi:Phlp + 0x10B80, 0x10B91, 0x10B99, 0x10B9C, 0x10BA9, 0x10BAF, + // #214 (16143+2): sc=Rejang:Rjng scx=Rejang:Rjng + 0xA930, 0xA953, 0xA95F, 0xA95F, + // #215 (16145+2): sc=Runic:Runr scx=Runic:Runr + 0x16A0, 0x16EA, 0x16EE, 0x16F8, + // #216 (16147+2): sc=Samaritan:Samr scx=Samaritan:Samr + 0x0800, 0x082D, 0x0830, 0x083E, + // #217 (16149+2): sc=Saurashtra:Saur scx=Saurashtra:Saur + 0xA880, 0xA8C5, 0xA8CE, 0xA8D9, + // #218 (16151+1): sc=Sharada:Shrd + 0x11180, 0x111DF, + // #219 (16152+1): sc=Shavian:Shaw scx=Shavian:Shaw + 0x10450, 0x1047F, + // #220 (16153+2): sc=Siddham:Sidd scx=Siddham:Sidd + 0x11580, 0x115B5, 0x115B8, 0x115DD, + // #221 (16155+3): sc=SignWriting:Sgnw scx=SignWriting:Sgnw + 0x1D800, 0x1DA8B, 0x1DA9B, 0x1DA9F, 0x1DAA1, 0x1DAAF, + // #222 (16158+13): sc=Sinhala:Sinh + 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, + 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCA, 0x0DCA, 0x0DCF, 0x0DD4, + 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DE6, 0x0DEF, 0x0DF2, 0x0DF4, + 0x111E1, 0x111F4, + // #223 (16171+1): sc=Sogdian:Sogd + 0x10F30, 0x10F59, + // #224 (16172+2): sc=Sora_Sompeng:Sora scx=Sora_Sompeng:Sora + 0x110D0, 0x110E8, 0x110F0, 0x110F9, + // #225 (16174+1): sc=Soyombo:Soyo scx=Soyombo:Soyo + 0x11A50, 0x11AA2, + // #226 (16175+2): sc=Sundanese:Sund scx=Sundanese:Sund + 0x1B80, 0x1BBF, 0x1CC0, 0x1CC7, + // #227 (16177+1): sc=Syloti_Nagri:Sylo + 0xA800, 0xA82C, + // #228 (16178+4): sc=Syriac:Syrc + 0x0700, 0x070D, 0x070F, 0x074A, 0x074D, 0x074F, 0x0860, 0x086A, + // #229 (16182+2): sc=Tagalog:Tglg + 0x1700, 0x1715, 0x171F, 0x171F, + // #230 (16184+3): sc=Tagbanwa:Tagb + 0x1760, 0x176C, 0x176E, 0x1770, 0x1772, 0x1773, + // #231 (16187+2): sc=Tai_Le:Tale + 0x1950, 0x196D, 0x1970, 0x1974, + // #232 (16189+5): sc=Tai_Tham:Lana scx=Tai_Tham:Lana + 0x1A20, 0x1A5E, 0x1A60, 0x1A7C, 0x1A7F, 0x1A89, 0x1A90, 0x1A99, + 0x1AA0, 0x1AAD, + // #233 (16194+2): sc=Tai_Viet:Tavt scx=Tai_Viet:Tavt + 0xAA80, 0xAAC2, 0xAADB, 0xAADF, + // #234 (16196+2): sc=Takri:Takr + 0x11680, 0x116B9, 0x116C0, 0x116C9, + // #235 (16198+18): sc=Tamil:Taml + 0x0B82, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, + 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, + 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, + 0x0BCA, 0x0BCD, 0x0BD0, 0x0BD0, 0x0BD7, 0x0BD7, 0x0BE6, 0x0BFA, + 0x11FC0, 0x11FF1, 0x11FFF, 0x11FFF, + // #236 (16216+2): sc=Tangsa:Tnsa scx=Tangsa:Tnsa + 0x16A70, 0x16ABE, 0x16AC0, 0x16AC9, + // #237 (16218+4): sc=Tangut:Tang scx=Tangut:Tang + 0x16FE0, 0x16FE0, 0x17000, 0x187F7, 0x18800, 0x18AFF, 0x18D00, 0x18D08, + // #238 (16222+13): sc=Telugu:Telu + 0x0C00, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C39, + 0x0C3C, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, + 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, 0x0C60, 0x0C63, 0x0C66, 0x0C6F, + 0x0C77, 0x0C7F, + // #239 (16235+1): sc=Thaana:Thaa + 0x0780, 0x07B1, + // #240 (16236+2): sc=Thai:Thai scx=Thai:Thai + 0x0E01, 0x0E3A, 0x0E40, 0x0E5B, + // #241 (16238+7): sc=Tibetan:Tibt scx=Tibetan:Tibt + 0x0F00, 0x0F47, 0x0F49, 0x0F6C, 0x0F71, 0x0F97, 0x0F99, 0x0FBC, + 0x0FBE, 0x0FCC, 0x0FCE, 0x0FD4, 0x0FD9, 0x0FDA, + // #242 (16245+3): sc=Tifinagh:Tfng scx=Tifinagh:Tfng + 0x2D30, 0x2D67, 0x2D6F, 0x2D70, 0x2D7F, 0x2D7F, + // #243 (16248+2): sc=Tirhuta:Tirh + 0x11480, 0x114C7, 0x114D0, 0x114D9, + // #244 (16250+1): sc=Toto scx=Toto + 0x1E290, 0x1E2AE, + // #245 (16251+2): sc=Ugaritic:Ugar scx=Ugaritic:Ugar + 0x10380, 0x1039D, 0x1039F, 0x1039F, + // #246 (16253+1): sc=Vai:Vaii scx=Vai:Vaii + 0xA500, 0xA62B, + // #247 (16254+8): sc=Vithkuqi:Vith scx=Vithkuqi:Vith + 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, + 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, + // #248 (16262+2): sc=Wancho:Wcho scx=Wancho:Wcho + 0x1E2C0, 0x1E2F9, 0x1E2FF, 0x1E2FF, + // #249 (16264+2): sc=Warang_Citi:Wara scx=Warang_Citi:Wara + 0x118A0, 0x118F2, 0x118FF, 0x118FF, + // #250 (16266+3): sc=Yezidi:Yezi + 0x10E80, 0x10EA9, 0x10EAB, 0x10EAD, 0x10EB0, 0x10EB1, + // #251 (16269+2): sc=Yi:Yiii + 0xA000, 0xA48C, 0xA490, 0xA4C6, + // #252 (16271+1): sc=Zanabazar_Square:Zanb scx=Zanabazar_Square:Zanb + 0x11A00, 0x11A47, + // #253 (16272+5): scx=Adlam:Adlm + 0x061F, 0x061F, 0x0640, 0x0640, 0x1E900, 0x1E94B, 0x1E950, 0x1E959, + 0x1E95E, 0x1E95F, + // #254 (16277+51): scx=Arabic:Arab + 0x0600, 0x0604, 0x0606, 0x06DC, 0x06DE, 0x06FF, 0x0750, 0x077F, + 0x0870, 0x088E, 0x0890, 0x0891, 0x0898, 0x08E1, 0x08E3, 0x08FF, + 0xFB50, 0xFBC2, 0xFBD3, 0xFD8F, 0xFD92, 0xFDC7, 0xFDCF, 0xFDCF, + 0xFDF0, 0xFDFF, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0x102E0, 0x102FB, + 0x10E60, 0x10E7E, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, + 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, + 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, + 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, + 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, + 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, + 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, + 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1EEF0, 0x1EEF1, + // #255 (16328+26): scx=Bengali:Beng + 0x0951, 0x0952, 0x0964, 0x0965, 0x0980, 0x0983, 0x0985, 0x098C, + 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B2, 0x09B2, + 0x09B6, 0x09B9, 0x09BC, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CE, + 0x09D7, 0x09D7, 0x09DC, 0x09DD, 0x09DF, 0x09E3, 0x09E6, 0x09FE, + 0x1CD0, 0x1CD0, 0x1CD2, 0x1CD2, 0x1CD5, 0x1CD6, 0x1CD8, 0x1CD8, + 0x1CE1, 0x1CE1, 0x1CEA, 0x1CEA, 0x1CED, 0x1CED, 0x1CF2, 0x1CF2, + 0x1CF5, 0x1CF7, 0xA8F1, 0xA8F1, + // #256 (16354+12): scx=Bopomofo:Bopo + 0x02EA, 0x02EB, 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, + 0x302A, 0x302D, 0x3030, 0x3030, 0x3037, 0x3037, 0x30FB, 0x30FB, + 0x3105, 0x312F, 0x31A0, 0x31BF, 0xFE45, 0xFE46, 0xFF61, 0xFF65, + // #257 (16366+3): scx=Buginese:Bugi + 0x1A00, 0x1A1B, 0x1A1E, 0x1A1F, 0xA9CF, 0xA9CF, + // #258 (16369+2): scx=Buhid:Buhd + 0x1735, 0x1736, 0x1740, 0x1753, + // #259 (16371+4): scx=Chakma:Cakm + 0x09E6, 0x09EF, 0x1040, 0x1049, 0x11100, 0x11134, 0x11136, 0x11147, + // #260 (16375+148): scx=Common:Zyyy + 0x0000, 0x0040, 0x005B, 0x0060, 0x007B, 0x00A9, 0x00AB, 0x00B9, + 0x00BB, 0x00BF, 0x00D7, 0x00D7, 0x00F7, 0x00F7, 0x02B9, 0x02DF, + 0x02E5, 0x02E9, 0x02EC, 0x02FF, 0x0374, 0x0374, 0x037E, 0x037E, + 0x0385, 0x0385, 0x0387, 0x0387, 0x0605, 0x0605, 0x06DD, 0x06DD, + 0x08E2, 0x08E2, 0x0E3F, 0x0E3F, 0x0FD5, 0x0FD8, 0x16EB, 0x16ED, + 0x2000, 0x200B, 0x200E, 0x202E, 0x2030, 0x2064, 0x2066, 0x2070, + 0x2074, 0x207E, 0x2080, 0x208E, 0x20A0, 0x20C0, 0x2100, 0x2125, + 0x2127, 0x2129, 0x212C, 0x2131, 0x2133, 0x214D, 0x214F, 0x215F, + 0x2189, 0x218B, 0x2190, 0x2426, 0x2440, 0x244A, 0x2460, 0x27FF, + 0x2900, 0x2B73, 0x2B76, 0x2B95, 0x2B97, 0x2BFF, 0x2E00, 0x2E42, + 0x2E44, 0x2E5D, 0x2FF0, 0x2FFB, 0x3000, 0x3000, 0x3004, 0x3004, + 0x3012, 0x3012, 0x3020, 0x3020, 0x3036, 0x3036, 0x3248, 0x325F, + 0x327F, 0x327F, 0x32B1, 0x32BF, 0x32CC, 0x32CF, 0x3371, 0x337A, + 0x3380, 0x33DF, 0x33FF, 0x33FF, 0x4DC0, 0x4DFF, 0xA708, 0xA721, + 0xA788, 0xA78A, 0xAB5B, 0xAB5B, 0xAB6A, 0xAB6B, 0xFE10, 0xFE19, + 0xFE30, 0xFE44, 0xFE47, 0xFE52, 0xFE54, 0xFE66, 0xFE68, 0xFE6B, + 0xFEFF, 0xFEFF, 0xFF01, 0xFF20, 0xFF3B, 0xFF40, 0xFF5B, 0xFF60, + 0xFFE0, 0xFFE6, 0xFFE8, 0xFFEE, 0xFFF9, 0xFFFD, 0x10190, 0x1019C, + 0x101D0, 0x101FC, 0x1CF50, 0x1CFC3, 0x1D000, 0x1D0F5, 0x1D100, 0x1D126, + 0x1D129, 0x1D166, 0x1D16A, 0x1D17A, 0x1D183, 0x1D184, 0x1D18C, 0x1D1A9, + 0x1D1AE, 0x1D1EA, 0x1D2E0, 0x1D2F3, 0x1D300, 0x1D356, 0x1D372, 0x1D378, + 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, + 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, + 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, + 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, + 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D7CB, + 0x1D7CE, 0x1D7FF, 0x1EC71, 0x1ECB4, 0x1ED01, 0x1ED3D, 0x1F000, 0x1F02B, + 0x1F030, 0x1F093, 0x1F0A0, 0x1F0AE, 0x1F0B1, 0x1F0BF, 0x1F0C1, 0x1F0CF, + 0x1F0D1, 0x1F0F5, 0x1F100, 0x1F1AD, 0x1F1E6, 0x1F1FF, 0x1F201, 0x1F202, + 0x1F210, 0x1F23B, 0x1F240, 0x1F248, 0x1F260, 0x1F265, 0x1F300, 0x1F6D7, + 0x1F6DD, 0x1F6EC, 0x1F6F0, 0x1F6FC, 0x1F700, 0x1F773, 0x1F780, 0x1F7D8, + 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, 0x1F800, 0x1F80B, 0x1F810, 0x1F847, + 0x1F850, 0x1F859, 0x1F860, 0x1F887, 0x1F890, 0x1F8AD, 0x1F8B0, 0x1F8B1, + 0x1F900, 0x1FA53, 0x1FA60, 0x1FA6D, 0x1FA70, 0x1FA74, 0x1FA78, 0x1FA7C, + 0x1FA80, 0x1FA86, 0x1FA90, 0x1FAAC, 0x1FAB0, 0x1FABA, 0x1FAC0, 0x1FAC5, + 0x1FAD0, 0x1FAD9, 0x1FAE0, 0x1FAE7, 0x1FAF0, 0x1FAF6, 0x1FB00, 0x1FB92, + 0x1FB94, 0x1FBCA, 0x1FBF0, 0x1FBF9, 0xE0001, 0xE0001, 0xE0020, 0xE007F, + // #261 (16523+4): scx=Coptic:Copt:Qaac + 0x03E2, 0x03EF, 0x2C80, 0x2CF3, 0x2CF9, 0x2CFF, 0x102E0, 0x102FB, + // #262 (16527+2): scx=Cypro_Minoan:Cpmn + 0x10100, 0x10101, 0x12F90, 0x12FF2, + // #263 (16529+9): scx=Cypriot:Cprt + 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1013F, 0x10800, 0x10805, + 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, + 0x1083F, 0x1083F, + // #264 (16538+9): scx=Cyrillic:Cyrl + 0x0400, 0x052F, 0x1C80, 0x1C88, 0x1D2B, 0x1D2B, 0x1D78, 0x1D78, + 0x1DF8, 0x1DF8, 0x2DE0, 0x2DFF, 0x2E43, 0x2E43, 0xA640, 0xA69F, + 0xFE2E, 0xFE2F, + // #265 (16547+7): scx=Devanagari:Deva + 0x0900, 0x0952, 0x0955, 0x097F, 0x1CD0, 0x1CF6, 0x1CF8, 0x1CF9, + 0x20F0, 0x20F0, 0xA830, 0xA839, 0xA8E0, 0xA8FF, + // #266 (16554+3): scx=Dogra:Dogr + 0x0964, 0x096F, 0xA830, 0xA839, 0x11800, 0x1183B, + // #267 (16557+5): scx=Duployan:Dupl + 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, + 0x1BC9C, 0x1BCA3, + // #268 (16562+9): scx=Georgian:Geor + 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10D0, 0x10FF, + 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, 0x2D00, 0x2D25, 0x2D27, 0x2D27, + 0x2D2D, 0x2D2D, + // #269 (16571+10): scx=Glagolitic:Glag + 0x0484, 0x0484, 0x0487, 0x0487, 0x2C00, 0x2C5F, 0x2E43, 0x2E43, + 0xA66F, 0xA66F, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, + 0x1E023, 0x1E024, 0x1E026, 0x1E02A, + // #270 (16581+25): scx=Grantha:Gran + 0x0951, 0x0952, 0x0964, 0x0965, 0x0BE6, 0x0BF3, 0x1CD0, 0x1CD0, + 0x1CD2, 0x1CD3, 0x1CF2, 0x1CF4, 0x1CF8, 0x1CF9, 0x20F0, 0x20F0, + 0x11300, 0x11303, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, + 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133B, 0x11344, + 0x11347, 0x11348, 0x1134B, 0x1134D, 0x11350, 0x11350, 0x11357, 0x11357, + 0x1135D, 0x11363, 0x11366, 0x1136C, 0x11370, 0x11374, 0x11FD0, 0x11FD1, + 0x11FD3, 0x11FD3, + // #271 (16606+38): scx=Greek:Grek + 0x0342, 0x0342, 0x0345, 0x0345, 0x0370, 0x0373, 0x0375, 0x0377, + 0x037A, 0x037D, 0x037F, 0x037F, 0x0384, 0x0384, 0x0386, 0x0386, + 0x0388, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, 0x03A3, 0x03E1, + 0x03F0, 0x03FF, 0x1D26, 0x1D2A, 0x1D5D, 0x1D61, 0x1D66, 0x1D6A, + 0x1DBF, 0x1DC1, 0x1F00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, + 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, + 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FC4, + 0x1FC6, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FDD, 0x1FEF, 0x1FF2, 0x1FF4, + 0x1FF6, 0x1FFE, 0x2126, 0x2126, 0xAB65, 0xAB65, 0x10140, 0x1018E, + 0x101A0, 0x101A0, 0x1D200, 0x1D245, + // #272 (16644+17): scx=Gujarati:Gujr + 0x0951, 0x0952, 0x0964, 0x0965, 0x0A81, 0x0A83, 0x0A85, 0x0A8D, + 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, + 0x0AB5, 0x0AB9, 0x0ABC, 0x0AC5, 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, + 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, 0x0AE6, 0x0AF1, 0x0AF9, 0x0AFF, + 0xA830, 0xA839, + // #273 (16661+7): scx=Gunjala_Gondi:Gong + 0x0964, 0x0965, 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, + 0x11D90, 0x11D91, 0x11D93, 0x11D98, 0x11DA0, 0x11DA9, + // #274 (16668+19): scx=Gurmukhi:Guru + 0x0951, 0x0952, 0x0964, 0x0965, 0x0A01, 0x0A03, 0x0A05, 0x0A0A, + 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, + 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A3C, 0x0A3C, 0x0A3E, 0x0A42, + 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A51, 0x0A51, 0x0A59, 0x0A5C, + 0x0A5E, 0x0A5E, 0x0A66, 0x0A76, 0xA830, 0xA839, + // #275 (16687+37): scx=Han:Hani + 0x2E80, 0x2E99, 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, 0x3001, 0x3003, + 0x3005, 0x3011, 0x3013, 0x301F, 0x3021, 0x302D, 0x3030, 0x3030, + 0x3037, 0x303F, 0x30FB, 0x30FB, 0x3190, 0x319F, 0x31C0, 0x31E3, + 0x3220, 0x3247, 0x3280, 0x32B0, 0x32C0, 0x32CB, 0x32FF, 0x32FF, + 0x3358, 0x3370, 0x337B, 0x337F, 0x33E0, 0x33FE, 0x3400, 0x4DBF, + 0x4E00, 0x9FFF, 0xA700, 0xA707, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, + 0xFE45, 0xFE46, 0xFF61, 0xFF65, 0x16FE2, 0x16FE3, 0x16FF0, 0x16FF1, + 0x1D360, 0x1D371, 0x1F250, 0x1F251, 0x20000, 0x2A6DF, 0x2A700, 0x2B738, + 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2F800, 0x2FA1D, + 0x30000, 0x3134A, + // #276 (16724+21): scx=Hangul:Hang + 0x1100, 0x11FF, 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, + 0x302E, 0x3030, 0x3037, 0x3037, 0x30FB, 0x30FB, 0x3131, 0x318E, + 0x3200, 0x321E, 0x3260, 0x327E, 0xA960, 0xA97C, 0xAC00, 0xD7A3, + 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xFE45, 0xFE46, 0xFF61, 0xFF65, + 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, + 0xFFDA, 0xFFDC, + // #277 (16745+7): scx=Hanifi_Rohingya:Rohg + 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x0640, 0x0640, + 0x06D4, 0x06D4, 0x10D00, 0x10D27, 0x10D30, 0x10D39, + // #278 (16752+1): scx=Hanunoo:Hano + 0x1720, 0x1736, + // #279 (16753+16): scx=Hiragana:Hira + 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x3030, 0x3035, + 0x3037, 0x3037, 0x303C, 0x303D, 0x3041, 0x3096, 0x3099, 0x30A0, + 0x30FB, 0x30FC, 0xFE45, 0xFE46, 0xFF61, 0xFF65, 0xFF70, 0xFF70, + 0xFF9E, 0xFF9F, 0x1B001, 0x1B11F, 0x1B150, 0x1B152, 0x1F200, 0x1F200, + // #280 (16769+20): scx=Inherited:Zinh:Qaai + 0x0300, 0x0341, 0x0343, 0x0344, 0x0346, 0x0362, 0x0953, 0x0954, + 0x1AB0, 0x1ACE, 0x1DC2, 0x1DF7, 0x1DF9, 0x1DF9, 0x1DFB, 0x1DFF, + 0x200C, 0x200D, 0x20D0, 0x20EF, 0xFE00, 0xFE0F, 0xFE20, 0xFE2D, + 0x101FD, 0x101FD, 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1D167, 0x1D169, + 0x1D17B, 0x1D182, 0x1D185, 0x1D18B, 0x1D1AA, 0x1D1AD, 0xE0100, 0xE01EF, + // #281 (16789+3): scx=Javanese:Java + 0xA980, 0xA9CD, 0xA9CF, 0xA9D9, 0xA9DE, 0xA9DF, + // #282 (16792+4): scx=Kaithi:Kthi + 0x0966, 0x096F, 0xA830, 0xA839, 0x11080, 0x110C2, 0x110CD, 0x110CD, + // #283 (16796+21): scx=Kannada:Knda + 0x0951, 0x0952, 0x0964, 0x0965, 0x0C80, 0x0C8C, 0x0C8E, 0x0C90, + 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBC, 0x0CC4, + 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0CDD, 0x0CDE, + 0x0CE0, 0x0CE3, 0x0CE6, 0x0CEF, 0x0CF1, 0x0CF2, 0x1CD0, 0x1CD0, + 0x1CD2, 0x1CD2, 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, 0x1CF4, 0x1CF4, + 0xA830, 0xA835, + // #284 (16817+19): scx=Katakana:Kana + 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x3030, 0x3035, + 0x3037, 0x3037, 0x303C, 0x303D, 0x3099, 0x309C, 0x30A0, 0x30FF, + 0x31F0, 0x31FF, 0x32D0, 0x32FE, 0x3300, 0x3357, 0xFE45, 0xFE46, + 0xFF61, 0xFF9F, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, + 0x1B000, 0x1B000, 0x1B120, 0x1B122, 0x1B164, 0x1B167, + // #285 (16836+1): scx=Kayah_Li:Kali + 0xA900, 0xA92F, + // #286 (16837+4): scx=Khojki:Khoj + 0x0AE6, 0x0AEF, 0xA830, 0xA839, 0x11200, 0x11211, 0x11213, 0x1123E, + // #287 (16841+4): scx=Khudawadi:Sind + 0x0964, 0x0965, 0xA830, 0xA839, 0x112B0, 0x112EA, 0x112F0, 0x112F9, + // #288 (16845+46): scx=Latin:Latn + 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00BA, 0x00BA, + 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02B8, 0x02E0, 0x02E4, + 0x0363, 0x036F, 0x0485, 0x0486, 0x0951, 0x0952, 0x10FB, 0x10FB, + 0x1D00, 0x1D25, 0x1D2C, 0x1D5C, 0x1D62, 0x1D65, 0x1D6B, 0x1D77, + 0x1D79, 0x1DBE, 0x1E00, 0x1EFF, 0x202F, 0x202F, 0x2071, 0x2071, + 0x207F, 0x207F, 0x2090, 0x209C, 0x20F0, 0x20F0, 0x212A, 0x212B, + 0x2132, 0x2132, 0x214E, 0x214E, 0x2160, 0x2188, 0x2C60, 0x2C7F, + 0xA700, 0xA707, 0xA722, 0xA787, 0xA78B, 0xA7CA, 0xA7D0, 0xA7D1, + 0xA7D3, 0xA7D3, 0xA7D5, 0xA7D9, 0xA7F2, 0xA7FF, 0xA92E, 0xA92E, + 0xAB30, 0xAB5A, 0xAB5C, 0xAB64, 0xAB66, 0xAB69, 0xFB00, 0xFB06, + 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0x10780, 0x10785, 0x10787, 0x107B0, + 0x107B2, 0x107BA, 0x1DF00, 0x1DF1E, + // #289 (16891+6): scx=Limbu:Limb + 0x0965, 0x0965, 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x193B, + 0x1940, 0x1940, 0x1944, 0x194F, + // #290 (16897+4): scx=Linear_A:Lina + 0x10107, 0x10133, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + // #291 (16901+10): scx=Linear_B:Linb + 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, + 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, 0x10100, 0x10102, + 0x10107, 0x10133, 0x10137, 0x1013F, + // #292 (16911+3): scx=Mahajani:Mahj + 0x0964, 0x096F, 0xA830, 0xA839, 0x11150, 0x11176, + // #293 (16914+11): scx=Malayalam:Mlym + 0x0951, 0x0952, 0x0964, 0x0965, 0x0D00, 0x0D0C, 0x0D0E, 0x0D10, + 0x0D12, 0x0D44, 0x0D46, 0x0D48, 0x0D4A, 0x0D4F, 0x0D54, 0x0D63, + 0x0D66, 0x0D7F, 0x1CDA, 0x1CDA, 0xA830, 0xA832, + // #294 (16925+3): scx=Mandaic:Mand + 0x0640, 0x0640, 0x0840, 0x085B, 0x085E, 0x085E, + // #295 (16928+3): scx=Manichaean:Mani + 0x0640, 0x0640, 0x10AC0, 0x10AE6, 0x10AEB, 0x10AF6, + // #296 (16931+8): scx=Masaram_Gondi:Gonm + 0x0964, 0x0965, 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D36, + 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D47, 0x11D50, 0x11D59, + // #297 (16939+3): scx=Modi:Modi + 0xA830, 0xA839, 0x11600, 0x11644, 0x11650, 0x11659, + // #298 (16942+5): scx=Mongolian:Mong + 0x1800, 0x1819, 0x1820, 0x1878, 0x1880, 0x18AA, 0x202F, 0x202F, + 0x11660, 0x1166C, + // #299 (16947+6): scx=Multani:Mult + 0x0A66, 0x0A6F, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, + 0x1128F, 0x1129D, 0x1129F, 0x112A9, + // #300 (16953+4): scx=Myanmar:Mymr + 0x1000, 0x109F, 0xA92E, 0xA92E, 0xA9E0, 0xA9FE, 0xAA60, 0xAA7F, + // #301 (16957+9): scx=Nandinagari:Nand + 0x0964, 0x0965, 0x0CE6, 0x0CEF, 0x1CE9, 0x1CE9, 0x1CF2, 0x1CF2, + 0x1CFA, 0x1CFA, 0xA830, 0xA835, 0x119A0, 0x119A7, 0x119AA, 0x119D7, + 0x119DA, 0x119E4, + // #302 (16966+6): scx=Nko:Nkoo + 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x07C0, 0x07FA, + 0x07FD, 0x07FF, 0xFD3E, 0xFD3F, + // #303 (16972+2): scx=Old_Permic:Perm + 0x0483, 0x0483, 0x10350, 0x1037A, + // #304 (16974+3): scx=Old_Uyghur:Ougr + 0x0640, 0x0640, 0x10AF2, 0x10AF2, 0x10F70, 0x10F89, + // #305 (16977+18): scx=Oriya:Orya + 0x0951, 0x0952, 0x0964, 0x0965, 0x0B01, 0x0B03, 0x0B05, 0x0B0C, + 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, + 0x0B35, 0x0B39, 0x0B3C, 0x0B44, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, + 0x0B55, 0x0B57, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B63, 0x0B66, 0x0B77, + 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, + // #306 (16995+3): scx=Phags_Pa:Phag + 0x1802, 0x1803, 0x1805, 0x1805, 0xA840, 0xA877, + // #307 (16998+4): scx=Psalter_Pahlavi:Phlp + 0x0640, 0x0640, 0x10B80, 0x10B91, 0x10B99, 0x10B9C, 0x10BA9, 0x10BAF, + // #308 (17002+6): scx=Sharada:Shrd + 0x0951, 0x0951, 0x1CD7, 0x1CD7, 0x1CD9, 0x1CD9, 0x1CDC, 0x1CDD, + 0x1CE0, 0x1CE0, 0x11180, 0x111DF, + // #309 (17008+14): scx=Sinhala:Sinh + 0x0964, 0x0965, 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, + 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCA, 0x0DCA, + 0x0DCF, 0x0DD4, 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DE6, 0x0DEF, + 0x0DF2, 0x0DF4, 0x111E1, 0x111F4, + // #310 (17022+2): scx=Sogdian:Sogd + 0x0640, 0x0640, 0x10F30, 0x10F59, + // #311 (17024+3): scx=Syloti_Nagri:Sylo + 0x0964, 0x0965, 0x09E6, 0x09EF, 0xA800, 0xA82C, + // #312 (17027+12): scx=Syriac:Syrc + 0x060C, 0x060C, 0x061B, 0x061C, 0x061F, 0x061F, 0x0640, 0x0640, + 0x064B, 0x0655, 0x0670, 0x0670, 0x0700, 0x070D, 0x070F, 0x074A, + 0x074D, 0x074F, 0x0860, 0x086A, 0x1DF8, 0x1DF8, 0x1DFA, 0x1DFA, + // #313 (17039+3): scx=Tagalog:Tglg + 0x1700, 0x1715, 0x171F, 0x171F, 0x1735, 0x1736, + // #314 (17042+4): scx=Tagbanwa:Tagb + 0x1735, 0x1736, 0x1760, 0x176C, 0x176E, 0x1770, 0x1772, 0x1773, + // #315 (17046+3): scx=Tai_Le:Tale + 0x1040, 0x1049, 0x1950, 0x196D, 0x1970, 0x1974, + // #316 (17049+4): scx=Takri:Takr + 0x0964, 0x0965, 0xA830, 0xA839, 0x11680, 0x116B9, 0x116C0, 0x116C9, + // #317 (17053+25): scx=Tamil:Taml + 0x0951, 0x0952, 0x0964, 0x0965, 0x0B82, 0x0B83, 0x0B85, 0x0B8A, + 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, + 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, + 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0BD0, 0x0BD0, + 0x0BD7, 0x0BD7, 0x0BE6, 0x0BFA, 0x1CDA, 0x1CDA, 0xA8F3, 0xA8F3, + 0x11301, 0x11301, 0x11303, 0x11303, 0x1133B, 0x1133C, 0x11FC0, 0x11FF1, + 0x11FFF, 0x11FFF, + // #318 (17078+17): scx=Telugu:Telu + 0x0951, 0x0952, 0x0964, 0x0965, 0x0C00, 0x0C0C, 0x0C0E, 0x0C10, + 0x0C12, 0x0C28, 0x0C2A, 0x0C39, 0x0C3C, 0x0C44, 0x0C46, 0x0C48, + 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, + 0x0C60, 0x0C63, 0x0C66, 0x0C6F, 0x0C77, 0x0C7F, 0x1CDA, 0x1CDA, + 0x1CF2, 0x1CF2, + // #319 (17095+7): scx=Thaana:Thaa + 0x060C, 0x060C, 0x061B, 0x061C, 0x061F, 0x061F, 0x0660, 0x0669, + 0x0780, 0x07B1, 0xFDF2, 0xFDF2, 0xFDFD, 0xFDFD, + // #320 (17102+6): scx=Tirhuta:Tirh + 0x0951, 0x0952, 0x0964, 0x0965, 0x1CF2, 0x1CF2, 0xA830, 0xA839, + 0x11480, 0x114C7, 0x114D0, 0x114D9, + // #321 (17108+7): scx=Yezidi:Yezi + 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x0660, 0x0669, + 0x10E80, 0x10EA9, 0x10EAB, 0x10EAD, 0x10EB0, 0x10EB1, + // #322 (17115+7): scx=Yi:Yiii + 0x3001, 0x3002, 0x3008, 0x3011, 0x3014, 0x301B, 0x30FB, 0x30FB, + 0xA000, 0xA48C, 0xA490, 0xA4C6, 0xFF61, 0xFF65 +}; + +template +const T5 unicode_property_data::rangenumbertable[] = +{ + { ptype::unknown, "*", 0 }, // #0 + { ptype::general_category, "Other:C", 1 }, // #1 + { ptype::general_category, "Control:Cc:cntrl", 2 }, // #2 + { ptype::general_category, "Format:Cf", 3 }, // #3 + { ptype::general_category, "Unassigned:Cn", 4 }, // #4 + { ptype::general_category, "Private_Use:Co", 5 }, // #5 + { ptype::general_category, "Surrogate:Cs", 6 }, // #6 + { ptype::general_category, "Letter:L", 7 }, // #7 + { ptype::general_category, "Cased_Letter:LC", 8 }, // #8 + { ptype::general_category, "Lowercase_Letter:Ll", 9 }, // #9 + { ptype::general_category, "Titlecase_Letter:Lt", 10 }, // #10 + { ptype::general_category, "Uppercase_Letter:Lu", 11 }, // #11 + { ptype::general_category, "Modifier_Letter:Lm", 12 }, // #12 + { ptype::general_category, "Other_Letter:Lo", 13 }, // #13 + { ptype::general_category, "Mark:M:Combining_Mark", 14 }, // #14 + { ptype::general_category, "Spacing_Mark:Mc", 15 }, // #15 + { ptype::general_category, "Enclosing_Mark:Me", 16 }, // #16 + { ptype::general_category, "Nonspacing_Mark:Mn", 17 }, // #17 + { ptype::general_category, "Number:N", 18 }, // #18 + { ptype::general_category, "Decimal_Number:Nd:digit", 19 }, // #19 + { ptype::general_category, "Letter_Number:Nl", 20 }, // #20 + { ptype::general_category, "Other_Number:No", 21 }, // #21 + { ptype::general_category, "Punctuation:P:punct", 22 }, // #22 + { ptype::general_category, "Connector_Punctuation:Pc", 23 }, // #23 + { ptype::general_category, "Dash_Punctuation:Pd", 24 }, // #24 + { ptype::general_category, "Close_Punctuation:Pe", 25 }, // #25 + { ptype::general_category, "Final_Punctuation:Pf", 26 }, // #26 + { ptype::general_category, "Initial_Punctuation:Pi", 27 }, // #27 + { ptype::general_category, "Other_Punctuation:Po", 28 }, // #28 + { ptype::general_category, "Open_Punctuation:Ps", 29 }, // #29 + { ptype::general_category, "Symbol:S", 30 }, // #30 + { ptype::general_category, "Currency_Symbol:Sc", 31 }, // #31 + { ptype::general_category, "Modifier_Symbol:Sk", 32 }, // #32 + { ptype::general_category, "Math_Symbol:Sm", 33 }, // #33 + { ptype::general_category, "Other_Symbol:So", 34 }, // #34 + { ptype::general_category, "Separator:Z", 35 }, // #35 + { ptype::general_category, "Line_Separator:Zl", 36 }, // #36 + { ptype::general_category, "Paragraph_Separator:Zp", 37 }, // #37 + { ptype::general_category, "Space_Separator:Zs", 38 }, // #38 + { ptype::binary, "ASCII", 39 }, // #39 + { ptype::binary, "ASCII_Hex_Digit:AHex", 40 }, // #40 + { ptype::binary, "Alphabetic:Alpha", 41 }, // #41 + { ptype::binary, "Any", 42 }, // #42 + { ptype::binary, "Assigned", 43 }, // #43 + { ptype::binary, "Bidi_Control:Bidi_C", 44 }, // #44 + { ptype::binary, "Bidi_Mirrored:Bidi_M", 45 }, // #45 + { ptype::binary, "Case_Ignorable:CI", 46 }, // #46 + { ptype::binary, "Cased", 47 }, // #47 + { ptype::binary, "Changes_When_Casefolded:CWCF", 48 }, // #48 + { ptype::binary, "Changes_When_Casemapped:CWCM", 49 }, // #49 + { ptype::binary, "Changes_When_Lowercased:CWL", 50 }, // #50 + { ptype::binary, "Changes_When_NFKC_Casefolded:CWKCF", 51 }, // #51 + { ptype::binary, "Changes_When_Titlecased:CWT", 52 }, // #52 + { ptype::binary, "Changes_When_Uppercased:CWU", 53 }, // #53 + { ptype::binary, "Dash", 54 }, // #54 + { ptype::binary, "Default_Ignorable_Code_Point:DI", 55 }, // #55 + { ptype::binary, "Deprecated:Dep", 56 }, // #56 + { ptype::binary, "Diacritic:Dia", 57 }, // #57 + { ptype::binary, "Emoji", 58 }, // #58 + { ptype::binary, "Emoji_Component:EComp", 59 }, // #59 + { ptype::binary, "Emoji_Modifier:EMod", 60 }, // #60 + { ptype::binary, "Emoji_Modifier_Base:EBase", 61 }, // #61 + { ptype::binary, "Emoji_Presentation:EPres", 62 }, // #62 + { ptype::binary, "Extended_Pictographic:ExtPict", 63 }, // #63 + { ptype::binary, "Extender:Ext", 64 }, // #64 + { ptype::binary, "Grapheme_Base:Gr_Base", 65 }, // #65 + { ptype::binary, "Grapheme_Extend:Gr_Ext", 66 }, // #66 + { ptype::binary, "Hex_Digit:Hex", 67 }, // #67 + { ptype::binary, "IDS_Binary_Operator:IDSB", 68 }, // #68 + { ptype::binary, "IDS_Trinary_Operator:IDST", 69 }, // #69 + { ptype::binary, "ID_Continue:IDC", 70 }, // #70 + { ptype::binary, "ID_Start:IDS", 71 }, // #71 + { ptype::binary, "Ideographic:Ideo", 72 }, // #72 + { ptype::binary, "Join_Control:Join_C", 73 }, // #73 + { ptype::binary, "Logical_Order_Exception:LOE", 74 }, // #74 + { ptype::binary, "Lowercase:Lower", 75 }, // #75 + { ptype::binary, "Math", 76 }, // #76 + { ptype::binary, "Noncharacter_Code_Point:NChar", 77 }, // #77 + { ptype::binary, "Pattern_Syntax:Pat_Syn", 78 }, // #78 + { ptype::binary, "Pattern_White_Space:Pat_WS", 79 }, // #79 + { ptype::binary, "Quotation_Mark:QMark", 80 }, // #80 + { ptype::binary, "Radical", 81 }, // #81 + { ptype::binary, "Regional_Indicator:RI", 82 }, // #82 + { ptype::binary, "Sentence_Terminal:STerm", 83 }, // #83 + { ptype::binary, "Soft_Dotted:SD", 84 }, // #84 + { ptype::binary, "Terminal_Punctuation:Term", 85 }, // #85 + { ptype::binary, "Unified_Ideograph:UIdeo", 86 }, // #86 + { ptype::binary, "Uppercase:Upper", 87 }, // #87 + { ptype::binary, "Variation_Selector:VS", 88 }, // #88 + { ptype::binary, "White_Space:space", 89 }, // #89 + { ptype::binary, "XID_Continue:XIDC", 90 }, // #90 + { ptype::binary, "XID_Start:XIDS", 91 }, // #91 + { ptype::script, "Adlam:Adlm", 92 }, // #92 + { ptype::script, "Ahom:Ahom", 93 }, // #93 + { ptype::script, "Anatolian_Hieroglyphs:Hluw", 94 }, // #94 + { ptype::script, "Arabic:Arab", 95 }, // #95 + { ptype::script, "Armenian:Armn", 96 }, // #96 + { ptype::script, "Avestan:Avst", 97 }, // #97 + { ptype::script, "Balinese:Bali", 98 }, // #98 + { ptype::script, "Bamum:Bamu", 99 }, // #99 + { ptype::script, "Bassa_Vah:Bass", 100 }, // #100 + { ptype::script, "Batak:Batk", 101 }, // #101 + { ptype::script, "Bengali:Beng", 102 }, // #102 + { ptype::script, "Bhaiksuki:Bhks", 103 }, // #103 + { ptype::script, "Bopomofo:Bopo", 104 }, // #104 + { ptype::script, "Brahmi:Brah", 105 }, // #105 + { ptype::script, "Braille:Brai", 106 }, // #106 + { ptype::script, "Buginese:Bugi", 107 }, // #107 + { ptype::script, "Buhid:Buhd", 108 }, // #108 + { ptype::script, "Canadian_Aboriginal:Cans", 109 }, // #109 + { ptype::script, "Carian:Cari", 110 }, // #110 + { ptype::script, "Caucasian_Albanian:Aghb", 111 }, // #111 + { ptype::script, "Chakma:Cakm", 112 }, // #112 + { ptype::script, "Cham:Cham", 113 }, // #113 + { ptype::script, "Cherokee:Cher", 114 }, // #114 + { ptype::script, "Chorasmian:Chrs", 115 }, // #115 + { ptype::script, "Common:Zyyy", 116 }, // #116 + { ptype::script, "Coptic:Copt:Qaac", 117 }, // #117 + { ptype::script, "Cypro_Minoan:Cpmn", 118 }, // #118 + { ptype::script, "Cuneiform:Xsux", 119 }, // #119 + { ptype::script, "Cypriot:Cprt", 120 }, // #120 + { ptype::script, "Cyrillic:Cyrl", 121 }, // #121 + { ptype::script, "Deseret:Dsrt", 122 }, // #122 + { ptype::script, "Devanagari:Deva", 123 }, // #123 + { ptype::script, "Dives_Akuru:Diak", 124 }, // #124 + { ptype::script, "Dogra:Dogr", 125 }, // #125 + { ptype::script, "Duployan:Dupl", 126 }, // #126 + { ptype::script, "Egyptian_Hieroglyphs:Egyp", 127 }, // #127 + { ptype::script, "Elbasan:Elba", 128 }, // #128 + { ptype::script, "Elymaic:Elym", 129 }, // #129 + { ptype::script, "Ethiopic:Ethi", 130 }, // #130 + { ptype::script, "Georgian:Geor", 131 }, // #131 + { ptype::script, "Glagolitic:Glag", 132 }, // #132 + { ptype::script, "Gothic:Goth", 133 }, // #133 + { ptype::script, "Grantha:Gran", 134 }, // #134 + { ptype::script, "Greek:Grek", 135 }, // #135 + { ptype::script, "Gujarati:Gujr", 136 }, // #136 + { ptype::script, "Gunjala_Gondi:Gong", 137 }, // #137 + { ptype::script, "Gurmukhi:Guru", 138 }, // #138 + { ptype::script, "Han:Hani", 139 }, // #139 + { ptype::script, "Hangul:Hang", 140 }, // #140 + { ptype::script, "Hanifi_Rohingya:Rohg", 141 }, // #141 + { ptype::script, "Hanunoo:Hano", 142 }, // #142 + { ptype::script, "Hatran:Hatr", 143 }, // #143 + { ptype::script, "Hebrew:Hebr", 144 }, // #144 + { ptype::script, "Hiragana:Hira", 145 }, // #145 + { ptype::script, "Imperial_Aramaic:Armi", 146 }, // #146 + { ptype::script, "Inherited:Zinh:Qaai", 147 }, // #147 + { ptype::script, "Inscriptional_Pahlavi:Phli", 148 }, // #148 + { ptype::script, "Inscriptional_Parthian:Prti", 149 }, // #149 + { ptype::script, "Javanese:Java", 150 }, // #150 + { ptype::script, "Kaithi:Kthi", 151 }, // #151 + { ptype::script, "Kannada:Knda", 152 }, // #152 + { ptype::script, "Katakana:Kana", 153 }, // #153 + { ptype::script, "Kayah_Li:Kali", 154 }, // #154 + { ptype::script, "Kharoshthi:Khar", 155 }, // #155 + { ptype::script, "Khitan_Small_Script:Kits", 156 }, // #156 + { ptype::script, "Khmer:Khmr", 157 }, // #157 + { ptype::script, "Khojki:Khoj", 158 }, // #158 + { ptype::script, "Khudawadi:Sind", 159 }, // #159 + { ptype::script, "Lao:Laoo", 160 }, // #160 + { ptype::script, "Latin:Latn", 161 }, // #161 + { ptype::script, "Lepcha:Lepc", 162 }, // #162 + { ptype::script, "Limbu:Limb", 163 }, // #163 + { ptype::script, "Linear_A:Lina", 164 }, // #164 + { ptype::script, "Linear_B:Linb", 165 }, // #165 + { ptype::script, "Lisu:Lisu", 166 }, // #166 + { ptype::script, "Lycian:Lyci", 167 }, // #167 + { ptype::script, "Lydian:Lydi", 168 }, // #168 + { ptype::script, "Mahajani:Mahj", 169 }, // #169 + { ptype::script, "Makasar:Maka", 170 }, // #170 + { ptype::script, "Malayalam:Mlym", 171 }, // #171 + { ptype::script, "Mandaic:Mand", 172 }, // #172 + { ptype::script, "Manichaean:Mani", 173 }, // #173 + { ptype::script, "Marchen:Marc", 174 }, // #174 + { ptype::script, "Masaram_Gondi:Gonm", 175 }, // #175 + { ptype::script, "Medefaidrin:Medf", 176 }, // #176 + { ptype::script, "Meetei_Mayek:Mtei", 177 }, // #177 + { ptype::script, "Mende_Kikakui:Mend", 178 }, // #178 + { ptype::script, "Meroitic_Cursive:Merc", 179 }, // #179 + { ptype::script, "Meroitic_Hieroglyphs:Mero", 180 }, // #180 + { ptype::script, "Miao:Plrd", 181 }, // #181 + { ptype::script, "Modi:Modi", 182 }, // #182 + { ptype::script, "Mongolian:Mong", 183 }, // #183 + { ptype::script, "Mro:Mroo", 184 }, // #184 + { ptype::script, "Multani:Mult", 185 }, // #185 + { ptype::script, "Myanmar:Mymr", 186 }, // #186 + { ptype::script, "Nabataean:Nbat", 187 }, // #187 + { ptype::script, "Nandinagari:Nand", 188 }, // #188 + { ptype::script, "New_Tai_Lue:Talu", 189 }, // #189 + { ptype::script, "Newa:Newa", 190 }, // #190 + { ptype::script, "Nko:Nkoo", 191 }, // #191 + { ptype::script, "Nushu:Nshu", 192 }, // #192 + { ptype::script, "Nyiakeng_Puachue_Hmong:Hmnp", 193 }, // #193 + { ptype::script, "Ogham:Ogam", 194 }, // #194 + { ptype::script, "Ol_Chiki:Olck", 195 }, // #195 + { ptype::script, "Old_Hungarian:Hung", 196 }, // #196 + { ptype::script, "Old_Italic:Ital", 197 }, // #197 + { ptype::script, "Old_North_Arabian:Narb", 198 }, // #198 + { ptype::script, "Old_Permic:Perm", 199 }, // #199 + { ptype::script, "Old_Persian:Xpeo", 200 }, // #200 + { ptype::script, "Old_Sogdian:Sogo", 201 }, // #201 + { ptype::script, "Old_South_Arabian:Sarb", 202 }, // #202 + { ptype::script, "Old_Turkic:Orkh", 203 }, // #203 + { ptype::script, "Old_Uyghur:Ougr", 204 }, // #204 + { ptype::script, "Oriya:Orya", 205 }, // #205 + { ptype::script, "Osage:Osge", 206 }, // #206 + { ptype::script, "Osmanya:Osma", 207 }, // #207 + { ptype::script, "Pahawh_Hmong:Hmng", 208 }, // #208 + { ptype::script, "Palmyrene:Palm", 209 }, // #209 + { ptype::script, "Pau_Cin_Hau:Pauc", 210 }, // #210 + { ptype::script, "Phags_Pa:Phag", 211 }, // #211 + { ptype::script, "Phoenician:Phnx", 212 }, // #212 + { ptype::script, "Psalter_Pahlavi:Phlp", 213 }, // #213 + { ptype::script, "Rejang:Rjng", 214 }, // #214 + { ptype::script, "Runic:Runr", 215 }, // #215 + { ptype::script, "Samaritan:Samr", 216 }, // #216 + { ptype::script, "Saurashtra:Saur", 217 }, // #217 + { ptype::script, "Sharada:Shrd", 218 }, // #218 + { ptype::script, "Shavian:Shaw", 219 }, // #219 + { ptype::script, "Siddham:Sidd", 220 }, // #220 + { ptype::script, "SignWriting:Sgnw", 221 }, // #221 + { ptype::script, "Sinhala:Sinh", 222 }, // #222 + { ptype::script, "Sogdian:Sogd", 223 }, // #223 + { ptype::script, "Sora_Sompeng:Sora", 224 }, // #224 + { ptype::script, "Soyombo:Soyo", 225 }, // #225 + { ptype::script, "Sundanese:Sund", 226 }, // #226 + { ptype::script, "Syloti_Nagri:Sylo", 227 }, // #227 + { ptype::script, "Syriac:Syrc", 228 }, // #228 + { ptype::script, "Tagalog:Tglg", 229 }, // #229 + { ptype::script, "Tagbanwa:Tagb", 230 }, // #230 + { ptype::script, "Tai_Le:Tale", 231 }, // #231 + { ptype::script, "Tai_Tham:Lana", 232 }, // #232 + { ptype::script, "Tai_Viet:Tavt", 233 }, // #233 + { ptype::script, "Takri:Takr", 234 }, // #234 + { ptype::script, "Tamil:Taml", 235 }, // #235 + { ptype::script, "Tangsa:Tnsa", 236 }, // #236 + { ptype::script, "Tangut:Tang", 237 }, // #237 + { ptype::script, "Telugu:Telu", 238 }, // #238 + { ptype::script, "Thaana:Thaa", 239 }, // #239 + { ptype::script, "Thai:Thai", 240 }, // #240 + { ptype::script, "Tibetan:Tibt", 241 }, // #241 + { ptype::script, "Tifinagh:Tfng", 242 }, // #242 + { ptype::script, "Tirhuta:Tirh", 243 }, // #243 + { ptype::script, "Toto", 244 }, // #244 + { ptype::script, "Ugaritic:Ugar", 245 }, // #245 + { ptype::script, "Vai:Vaii", 246 }, // #246 + { ptype::script, "Vithkuqi:Vith", 247 }, // #247 + { ptype::script, "Wancho:Wcho", 248 }, // #248 + { ptype::script, "Warang_Citi:Wara", 249 }, // #249 + { ptype::script, "Yezidi:Yezi", 250 }, // #250 + { ptype::script, "Yi:Yiii", 251 }, // #251 + { ptype::script, "Zanabazar_Square:Zanb", 252 }, // #252 + { ptype::script_extensions, "Adlam:Adlm", 253 }, // #253 + { ptype::script_extensions, "Ahom:Ahom", 93 }, // #254 + { ptype::script_extensions, "Anatolian_Hieroglyphs:Hluw", 94 }, // #255 + { ptype::script_extensions, "Arabic:Arab", 254 }, // #256 + { ptype::script_extensions, "Armenian:Armn", 96 }, // #257 + { ptype::script_extensions, "Avestan:Avst", 97 }, // #258 + { ptype::script_extensions, "Balinese:Bali", 98 }, // #259 + { ptype::script_extensions, "Bamum:Bamu", 99 }, // #260 + { ptype::script_extensions, "Bassa_Vah:Bass", 100 }, // #261 + { ptype::script_extensions, "Batak:Batk", 101 }, // #262 + { ptype::script_extensions, "Bengali:Beng", 255 }, // #263 + { ptype::script_extensions, "Bhaiksuki:Bhks", 103 }, // #264 + { ptype::script_extensions, "Bopomofo:Bopo", 256 }, // #265 + { ptype::script_extensions, "Brahmi:Brah", 105 }, // #266 + { ptype::script_extensions, "Braille:Brai", 106 }, // #267 + { ptype::script_extensions, "Buginese:Bugi", 257 }, // #268 + { ptype::script_extensions, "Buhid:Buhd", 258 }, // #269 + { ptype::script_extensions, "Canadian_Aboriginal:Cans", 109 }, // #270 + { ptype::script_extensions, "Carian:Cari", 110 }, // #271 + { ptype::script_extensions, "Caucasian_Albanian:Aghb", 111 }, // #272 + { ptype::script_extensions, "Chakma:Cakm", 259 }, // #273 + { ptype::script_extensions, "Cham:Cham", 113 }, // #274 + { ptype::script_extensions, "Cherokee:Cher", 114 }, // #275 + { ptype::script_extensions, "Chorasmian:Chrs", 115 }, // #276 + { ptype::script_extensions, "Common:Zyyy", 260 }, // #277 + { ptype::script_extensions, "Coptic:Copt:Qaac", 261 }, // #278 + { ptype::script_extensions, "Cypro_Minoan:Cpmn", 262 }, // #279 + { ptype::script_extensions, "Cuneiform:Xsux", 119 }, // #280 + { ptype::script_extensions, "Cypriot:Cprt", 263 }, // #281 + { ptype::script_extensions, "Cyrillic:Cyrl", 264 }, // #282 + { ptype::script_extensions, "Deseret:Dsrt", 122 }, // #283 + { ptype::script_extensions, "Devanagari:Deva", 265 }, // #284 + { ptype::script_extensions, "Dives_Akuru:Diak", 124 }, // #285 + { ptype::script_extensions, "Dogra:Dogr", 266 }, // #286 + { ptype::script_extensions, "Duployan:Dupl", 267 }, // #287 + { ptype::script_extensions, "Egyptian_Hieroglyphs:Egyp", 127 }, // #288 + { ptype::script_extensions, "Elbasan:Elba", 128 }, // #289 + { ptype::script_extensions, "Elymaic:Elym", 129 }, // #290 + { ptype::script_extensions, "Ethiopic:Ethi", 130 }, // #291 + { ptype::script_extensions, "Georgian:Geor", 268 }, // #292 + { ptype::script_extensions, "Glagolitic:Glag", 269 }, // #293 + { ptype::script_extensions, "Gothic:Goth", 133 }, // #294 + { ptype::script_extensions, "Grantha:Gran", 270 }, // #295 + { ptype::script_extensions, "Greek:Grek", 271 }, // #296 + { ptype::script_extensions, "Gujarati:Gujr", 272 }, // #297 + { ptype::script_extensions, "Gunjala_Gondi:Gong", 273 }, // #298 + { ptype::script_extensions, "Gurmukhi:Guru", 274 }, // #299 + { ptype::script_extensions, "Han:Hani", 275 }, // #300 + { ptype::script_extensions, "Hangul:Hang", 276 }, // #301 + { ptype::script_extensions, "Hanifi_Rohingya:Rohg", 277 }, // #302 + { ptype::script_extensions, "Hanunoo:Hano", 278 }, // #303 + { ptype::script_extensions, "Hatran:Hatr", 143 }, // #304 + { ptype::script_extensions, "Hebrew:Hebr", 144 }, // #305 + { ptype::script_extensions, "Hiragana:Hira", 279 }, // #306 + { ptype::script_extensions, "Imperial_Aramaic:Armi", 146 }, // #307 + { ptype::script_extensions, "Inherited:Zinh:Qaai", 280 }, // #308 + { ptype::script_extensions, "Inscriptional_Pahlavi:Phli", 148 }, // #309 + { ptype::script_extensions, "Inscriptional_Parthian:Prti", 149 }, // #310 + { ptype::script_extensions, "Javanese:Java", 281 }, // #311 + { ptype::script_extensions, "Kaithi:Kthi", 282 }, // #312 + { ptype::script_extensions, "Kannada:Knda", 283 }, // #313 + { ptype::script_extensions, "Katakana:Kana", 284 }, // #314 + { ptype::script_extensions, "Kayah_Li:Kali", 285 }, // #315 + { ptype::script_extensions, "Kharoshthi:Khar", 155 }, // #316 + { ptype::script_extensions, "Khitan_Small_Script:Kits", 156 }, // #317 + { ptype::script_extensions, "Khmer:Khmr", 157 }, // #318 + { ptype::script_extensions, "Khojki:Khoj", 286 }, // #319 + { ptype::script_extensions, "Khudawadi:Sind", 287 }, // #320 + { ptype::script_extensions, "Lao:Laoo", 160 }, // #321 + { ptype::script_extensions, "Latin:Latn", 288 }, // #322 + { ptype::script_extensions, "Lepcha:Lepc", 162 }, // #323 + { ptype::script_extensions, "Limbu:Limb", 289 }, // #324 + { ptype::script_extensions, "Linear_A:Lina", 290 }, // #325 + { ptype::script_extensions, "Linear_B:Linb", 291 }, // #326 + { ptype::script_extensions, "Lisu:Lisu", 166 }, // #327 + { ptype::script_extensions, "Lycian:Lyci", 167 }, // #328 + { ptype::script_extensions, "Lydian:Lydi", 168 }, // #329 + { ptype::script_extensions, "Mahajani:Mahj", 292 }, // #330 + { ptype::script_extensions, "Makasar:Maka", 170 }, // #331 + { ptype::script_extensions, "Malayalam:Mlym", 293 }, // #332 + { ptype::script_extensions, "Mandaic:Mand", 294 }, // #333 + { ptype::script_extensions, "Manichaean:Mani", 295 }, // #334 + { ptype::script_extensions, "Marchen:Marc", 174 }, // #335 + { ptype::script_extensions, "Masaram_Gondi:Gonm", 296 }, // #336 + { ptype::script_extensions, "Medefaidrin:Medf", 176 }, // #337 + { ptype::script_extensions, "Meetei_Mayek:Mtei", 177 }, // #338 + { ptype::script_extensions, "Mende_Kikakui:Mend", 178 }, // #339 + { ptype::script_extensions, "Meroitic_Cursive:Merc", 179 }, // #340 + { ptype::script_extensions, "Meroitic_Hieroglyphs:Mero", 180 }, // #341 + { ptype::script_extensions, "Miao:Plrd", 181 }, // #342 + { ptype::script_extensions, "Modi:Modi", 297 }, // #343 + { ptype::script_extensions, "Mongolian:Mong", 298 }, // #344 + { ptype::script_extensions, "Mro:Mroo", 184 }, // #345 + { ptype::script_extensions, "Multani:Mult", 299 }, // #346 + { ptype::script_extensions, "Myanmar:Mymr", 300 }, // #347 + { ptype::script_extensions, "Nabataean:Nbat", 187 }, // #348 + { ptype::script_extensions, "Nandinagari:Nand", 301 }, // #349 + { ptype::script_extensions, "New_Tai_Lue:Talu", 189 }, // #350 + { ptype::script_extensions, "Newa:Newa", 190 }, // #351 + { ptype::script_extensions, "Nko:Nkoo", 302 }, // #352 + { ptype::script_extensions, "Nushu:Nshu", 192 }, // #353 + { ptype::script_extensions, "Nyiakeng_Puachue_Hmong:Hmnp", 193 }, // #354 + { ptype::script_extensions, "Ogham:Ogam", 194 }, // #355 + { ptype::script_extensions, "Ol_Chiki:Olck", 195 }, // #356 + { ptype::script_extensions, "Old_Hungarian:Hung", 196 }, // #357 + { ptype::script_extensions, "Old_Italic:Ital", 197 }, // #358 + { ptype::script_extensions, "Old_North_Arabian:Narb", 198 }, // #359 + { ptype::script_extensions, "Old_Permic:Perm", 303 }, // #360 + { ptype::script_extensions, "Old_Persian:Xpeo", 200 }, // #361 + { ptype::script_extensions, "Old_Sogdian:Sogo", 201 }, // #362 + { ptype::script_extensions, "Old_South_Arabian:Sarb", 202 }, // #363 + { ptype::script_extensions, "Old_Turkic:Orkh", 203 }, // #364 + { ptype::script_extensions, "Old_Uyghur:Ougr", 304 }, // #365 + { ptype::script_extensions, "Oriya:Orya", 305 }, // #366 + { ptype::script_extensions, "Osage:Osge", 206 }, // #367 + { ptype::script_extensions, "Osmanya:Osma", 207 }, // #368 + { ptype::script_extensions, "Pahawh_Hmong:Hmng", 208 }, // #369 + { ptype::script_extensions, "Palmyrene:Palm", 209 }, // #370 + { ptype::script_extensions, "Pau_Cin_Hau:Pauc", 210 }, // #371 + { ptype::script_extensions, "Phags_Pa:Phag", 306 }, // #372 + { ptype::script_extensions, "Phoenician:Phnx", 212 }, // #373 + { ptype::script_extensions, "Psalter_Pahlavi:Phlp", 307 }, // #374 + { ptype::script_extensions, "Rejang:Rjng", 214 }, // #375 + { ptype::script_extensions, "Runic:Runr", 215 }, // #376 + { ptype::script_extensions, "Samaritan:Samr", 216 }, // #377 + { ptype::script_extensions, "Saurashtra:Saur", 217 }, // #378 + { ptype::script_extensions, "Sharada:Shrd", 308 }, // #379 + { ptype::script_extensions, "Shavian:Shaw", 219 }, // #380 + { ptype::script_extensions, "Siddham:Sidd", 220 }, // #381 + { ptype::script_extensions, "SignWriting:Sgnw", 221 }, // #382 + { ptype::script_extensions, "Sinhala:Sinh", 309 }, // #383 + { ptype::script_extensions, "Sogdian:Sogd", 310 }, // #384 + { ptype::script_extensions, "Sora_Sompeng:Sora", 224 }, // #385 + { ptype::script_extensions, "Soyombo:Soyo", 225 }, // #386 + { ptype::script_extensions, "Sundanese:Sund", 226 }, // #387 + { ptype::script_extensions, "Syloti_Nagri:Sylo", 311 }, // #388 + { ptype::script_extensions, "Syriac:Syrc", 312 }, // #389 + { ptype::script_extensions, "Tagalog:Tglg", 313 }, // #390 + { ptype::script_extensions, "Tagbanwa:Tagb", 314 }, // #391 + { ptype::script_extensions, "Tai_Le:Tale", 315 }, // #392 + { ptype::script_extensions, "Tai_Tham:Lana", 232 }, // #393 + { ptype::script_extensions, "Tai_Viet:Tavt", 233 }, // #394 + { ptype::script_extensions, "Takri:Takr", 316 }, // #395 + { ptype::script_extensions, "Tamil:Taml", 317 }, // #396 + { ptype::script_extensions, "Tangsa:Tnsa", 236 }, // #397 + { ptype::script_extensions, "Tangut:Tang", 237 }, // #398 + { ptype::script_extensions, "Telugu:Telu", 318 }, // #399 + { ptype::script_extensions, "Thaana:Thaa", 319 }, // #400 + { ptype::script_extensions, "Thai:Thai", 240 }, // #401 + { ptype::script_extensions, "Tibetan:Tibt", 241 }, // #402 + { ptype::script_extensions, "Tifinagh:Tfng", 242 }, // #403 + { ptype::script_extensions, "Tirhuta:Tirh", 320 }, // #404 + { ptype::script_extensions, "Toto", 244 }, // #405 + { ptype::script_extensions, "Ugaritic:Ugar", 245 }, // #406 + { ptype::script_extensions, "Vai:Vaii", 246 }, // #407 + { ptype::script_extensions, "Vithkuqi:Vith", 247 }, // #408 + { ptype::script_extensions, "Wancho:Wcho", 248 }, // #409 + { ptype::script_extensions, "Warang_Citi:Wara", 249 }, // #410 + { ptype::script_extensions, "Yezidi:Yezi", 321 }, // #411 + { ptype::script_extensions, "Yi:Yiii", 322 }, // #412 + { ptype::script_extensions, "Zanabazar_Square:Zanb", 252 }, // #413 + { ptype::unknown, "", 0 } +}; + +template +const T6 unicode_property_data::positiontable[] = +{ + { 0, 0 }, // #0 unknown + { 0, 725 }, // #1 gc=Other:C + { 0, 2 }, // #2 gc=Control:Cc:cntrl + { 2, 21 }, // #3 gc=Format:Cf + { 23, 698 }, // #4 gc=Unassigned:Cn + { 721, 3 }, // #5 gc=Private_Use:Co + { 724, 1 }, // #6 gc=Surrogate:Cs + { 725, 1883 }, // #7 gc=Letter:L + { 725, 1313 }, // #8 gc=Cased_Letter:LC + { 725, 657 }, // #9 gc=Lowercase_Letter:Ll + { 1382, 10 }, // #10 gc=Titlecase_Letter:Lt + { 1392, 646 }, // #11 gc=Uppercase_Letter:Lu + { 2038, 69 }, // #12 gc=Modifier_Letter:Lm + { 2107, 501 }, // #13 gc=Other_Letter:Lo + { 2608, 518 }, // #14 gc=Mark:M:Combining_Mark + { 2608, 177 }, // #15 gc=Spacing_Mark:Mc + { 2785, 5 }, // #16 gc=Enclosing_Mark:Me + { 2790, 336 }, // #17 gc=Nonspacing_Mark:Mn + { 3126, 145 }, // #18 gc=Number:N + { 3126, 62 }, // #19 gc=Decimal_Number:Nd:digit + { 3188, 12 }, // #20 gc=Letter_Number:Nl + { 3200, 71 }, // #21 gc=Other_Number:No + { 3271, 386 }, // #22 gc=Punctuation:P:punct + { 3271, 6 }, // #23 gc=Connector_Punctuation:Pc + { 3277, 19 }, // #24 gc=Dash_Punctuation:Pd + { 3296, 76 }, // #25 gc=Close_Punctuation:Pe + { 3372, 10 }, // #26 gc=Final_Punctuation:Pf + { 3382, 11 }, // #27 gc=Initial_Punctuation:Pi + { 3393, 185 }, // #28 gc=Other_Punctuation:Po + { 3578, 79 }, // #29 gc=Open_Punctuation:Ps + { 3657, 302 }, // #30 gc=Symbol:S + { 3657, 21 }, // #31 gc=Currency_Symbol:Sc + { 3678, 31 }, // #32 gc=Modifier_Symbol:Sk + { 3709, 64 }, // #33 gc=Math_Symbol:Sm + { 3773, 186 }, // #34 gc=Other_Symbol:So + { 3959, 9 }, // #35 gc=Separator:Z + { 3959, 1 }, // #36 gc=Line_Separator:Zl + { 3960, 1 }, // #37 gc=Paragraph_Separator:Zp + { 3961, 7 }, // #38 gc=Space_Separator:Zs + { 3968, 1 }, // #39 bp=ASCII + { 3969, 3 }, // #40 bp=ASCII_Hex_Digit:AHex + { 3972, 722 }, // #41 bp=Alphabetic:Alpha + { 4694, 1 }, // #42 bp=Any + { 4695, 0 }, // #43 bp=Assigned + { 4695, 4 }, // #44 bp=Bidi_Control:Bidi_C + { 4699, 114 }, // #45 bp=Bidi_Mirrored:Bidi_M + { 4813, 427 }, // #46 bp=Case_Ignorable:CI + { 5240, 155 }, // #47 bp=Cased + { 5395, 622 }, // #48 bp=Changes_When_Casefolded:CWCF + { 6017, 131 }, // #49 bp=Changes_When_Casemapped:CWCM + { 6148, 609 }, // #50 bp=Changes_When_Lowercased:CWL + { 6757, 838 }, // #51 bp=Changes_When_NFKC_Casefolded:CWKCF + { 7595, 626 }, // #52 bp=Changes_When_Titlecased:CWT + { 8221, 627 }, // #53 bp=Changes_When_Uppercased:CWU + { 8848, 23 }, // #54 bp=Dash + { 8871, 17 }, // #55 bp=Default_Ignorable_Code_Point:DI + { 8888, 8 }, // #56 bp=Deprecated:Dep + { 8896, 192 }, // #57 bp=Diacritic:Dia + { 9088, 153 }, // #58 bp=Emoji + { 9241, 10 }, // #59 bp=Emoji_Component:EComp + { 9251, 1 }, // #60 bp=Emoji_Modifier:EMod + { 9252, 40 }, // #61 bp=Emoji_Modifier_Base:EBase + { 9292, 83 }, // #62 bp=Emoji_Presentation:EPres + { 9375, 78 }, // #63 bp=Extended_Pictographic:ExtPict + { 9453, 33 }, // #64 bp=Extender:Ext + { 9486, 861 }, // #65 bp=Grapheme_Base:Gr_Base + { 10347, 353 }, // #66 bp=Grapheme_Extend:Gr_Ext + { 10700, 6 }, // #67 bp=Hex_Digit:Hex + { 10706, 2 }, // #68 bp=IDS_Binary_Operator:IDSB + { 10708, 1 }, // #69 bp=IDS_Trinary_Operator:IDST + { 10709, 756 }, // #70 bp=ID_Continue:IDC + { 11465, 648 }, // #71 bp=ID_Start:IDS + { 12113, 19 }, // #72 bp=Ideographic:Ideo + { 12132, 1 }, // #73 bp=Join_Control:Join_C + { 12133, 7 }, // #74 bp=Logical_Order_Exception:LOE + { 12140, 668 }, // #75 bp=Lowercase:Lower + { 12808, 138 }, // #76 bp=Math + { 12946, 18 }, // #77 bp=Noncharacter_Code_Point:NChar + { 12964, 28 }, // #78 bp=Pattern_Syntax:Pat_Syn + { 12992, 5 }, // #79 bp=Pattern_White_Space:Pat_WS + { 12997, 13 }, // #80 bp=Quotation_Mark:QMark + { 13010, 3 }, // #81 bp=Radical + { 13013, 1 }, // #82 bp=Regional_Indicator:RI + { 13014, 79 }, // #83 bp=Sentence_Terminal:STerm + { 13093, 32 }, // #84 bp=Soft_Dotted:SD + { 13125, 107 }, // #85 bp=Terminal_Punctuation:Term + { 13232, 15 }, // #86 bp=Unified_Ideograph:UIdeo + { 13247, 651 }, // #87 bp=Uppercase:Upper + { 13898, 4 }, // #88 bp=Variation_Selector:VS + { 13902, 10 }, // #89 bp=White_Space:space + { 13912, 763 }, // #90 bp=XID_Continue:XIDC + { 14675, 655 }, // #91 bp=XID_Start:XIDS + { 15330, 3 }, // #92 sc=Adlam:Adlm + { 15333, 3 }, // #93 sc=Ahom:Ahom scx=Ahom:Ahom + { 15336, 1 }, // #94 sc=Anatolian_Hieroglyphs:Hluw scx=Anatolian_Hieroglyphs:Hluw + { 15337, 57 }, // #95 sc=Arabic:Arab + { 15394, 4 }, // #96 sc=Armenian:Armn scx=Armenian:Armn + { 15398, 2 }, // #97 sc=Avestan:Avst scx=Avestan:Avst + { 15400, 2 }, // #98 sc=Balinese:Bali scx=Balinese:Bali + { 15402, 2 }, // #99 sc=Bamum:Bamu scx=Bamum:Bamu + { 15404, 2 }, // #100 sc=Bassa_Vah:Bass scx=Bassa_Vah:Bass + { 15406, 2 }, // #101 sc=Batak:Batk scx=Batak:Batk + { 15408, 14 }, // #102 sc=Bengali:Beng + { 15422, 4 }, // #103 sc=Bhaiksuki:Bhks scx=Bhaiksuki:Bhks + { 15426, 3 }, // #104 sc=Bopomofo:Bopo + { 15429, 3 }, // #105 sc=Brahmi:Brah scx=Brahmi:Brah + { 15432, 1 }, // #106 sc=Braille:Brai scx=Braille:Brai + { 15433, 2 }, // #107 sc=Buginese:Bugi + { 15435, 1 }, // #108 sc=Buhid:Buhd + { 15436, 3 }, // #109 sc=Canadian_Aboriginal:Cans scx=Canadian_Aboriginal:Cans + { 15439, 1 }, // #110 sc=Carian:Cari scx=Carian:Cari + { 15440, 2 }, // #111 sc=Caucasian_Albanian:Aghb scx=Caucasian_Albanian:Aghb + { 15442, 2 }, // #112 sc=Chakma:Cakm + { 15444, 4 }, // #113 sc=Cham:Cham scx=Cham:Cham + { 15448, 3 }, // #114 sc=Cherokee:Cher scx=Cherokee:Cher + { 15451, 1 }, // #115 sc=Chorasmian:Chrs scx=Chorasmian:Chrs + { 15452, 174 }, // #116 sc=Common:Zyyy + { 15626, 3 }, // #117 sc=Coptic:Copt:Qaac + { 15629, 1 }, // #118 sc=Cypro_Minoan:Cpmn + { 15630, 4 }, // #119 sc=Cuneiform:Xsux scx=Cuneiform:Xsux + { 15634, 6 }, // #120 sc=Cypriot:Cprt + { 15640, 8 }, // #121 sc=Cyrillic:Cyrl + { 15648, 1 }, // #122 sc=Deseret:Dsrt scx=Deseret:Dsrt + { 15649, 4 }, // #123 sc=Devanagari:Deva + { 15653, 8 }, // #124 sc=Dives_Akuru:Diak scx=Dives_Akuru:Diak + { 15661, 1 }, // #125 sc=Dogra:Dogr + { 15662, 5 }, // #126 sc=Duployan:Dupl + { 15667, 2 }, // #127 sc=Egyptian_Hieroglyphs:Egyp scx=Egyptian_Hieroglyphs:Egyp + { 15669, 1 }, // #128 sc=Elbasan:Elba scx=Elbasan:Elba + { 15670, 1 }, // #129 sc=Elymaic:Elym scx=Elymaic:Elym + { 15671, 36 }, // #130 sc=Ethiopic:Ethi scx=Ethiopic:Ethi + { 15707, 10 }, // #131 sc=Georgian:Geor + { 15717, 6 }, // #132 sc=Glagolitic:Glag + { 15723, 1 }, // #133 sc=Gothic:Goth scx=Gothic:Goth + { 15724, 15 }, // #134 sc=Grantha:Gran + { 15739, 36 }, // #135 sc=Greek:Grek + { 15775, 14 }, // #136 sc=Gujarati:Gujr + { 15789, 6 }, // #137 sc=Gunjala_Gondi:Gong + { 15795, 16 }, // #138 sc=Gurmukhi:Guru + { 15811, 20 }, // #139 sc=Han:Hani + { 15831, 14 }, // #140 sc=Hangul:Hang + { 15845, 2 }, // #141 sc=Hanifi_Rohingya:Rohg + { 15847, 1 }, // #142 sc=Hanunoo:Hano + { 15848, 3 }, // #143 sc=Hatran:Hatr scx=Hatran:Hatr + { 15851, 9 }, // #144 sc=Hebrew:Hebr scx=Hebrew:Hebr + { 15860, 5 }, // #145 sc=Hiragana:Hira + { 15865, 2 }, // #146 sc=Imperial_Aramaic:Armi scx=Imperial_Aramaic:Armi + { 15867, 29 }, // #147 sc=Inherited:Zinh:Qaai + { 15896, 2 }, // #148 sc=Inscriptional_Pahlavi:Phli scx=Inscriptional_Pahlavi:Phli + { 15898, 2 }, // #149 sc=Inscriptional_Parthian:Prti scx=Inscriptional_Parthian:Prti + { 15900, 3 }, // #150 sc=Javanese:Java + { 15903, 2 }, // #151 sc=Kaithi:Kthi + { 15905, 13 }, // #152 sc=Kannada:Knda + { 15918, 13 }, // #153 sc=Katakana:Kana + { 15931, 2 }, // #154 sc=Kayah_Li:Kali + { 15933, 8 }, // #155 sc=Kharoshthi:Khar scx=Kharoshthi:Khar + { 15941, 2 }, // #156 sc=Khitan_Small_Script:Kits scx=Khitan_Small_Script:Kits + { 15943, 4 }, // #157 sc=Khmer:Khmr scx=Khmer:Khmr + { 15947, 2 }, // #158 sc=Khojki:Khoj + { 15949, 2 }, // #159 sc=Khudawadi:Sind + { 15951, 11 }, // #160 sc=Lao:Laoo scx=Lao:Laoo + { 15962, 38 }, // #161 sc=Latin:Latn + { 16000, 3 }, // #162 sc=Lepcha:Lepc scx=Lepcha:Lepc + { 16003, 5 }, // #163 sc=Limbu:Limb + { 16008, 3 }, // #164 sc=Linear_A:Lina + { 16011, 7 }, // #165 sc=Linear_B:Linb + { 16018, 2 }, // #166 sc=Lisu:Lisu scx=Lisu:Lisu + { 16020, 1 }, // #167 sc=Lycian:Lyci scx=Lycian:Lyci + { 16021, 2 }, // #168 sc=Lydian:Lydi scx=Lydian:Lydi + { 16023, 1 }, // #169 sc=Mahajani:Mahj + { 16024, 1 }, // #170 sc=Makasar:Maka scx=Makasar:Maka + { 16025, 7 }, // #171 sc=Malayalam:Mlym + { 16032, 2 }, // #172 sc=Mandaic:Mand + { 16034, 2 }, // #173 sc=Manichaean:Mani + { 16036, 3 }, // #174 sc=Marchen:Marc scx=Marchen:Marc + { 16039, 7 }, // #175 sc=Masaram_Gondi:Gonm + { 16046, 1 }, // #176 sc=Medefaidrin:Medf scx=Medefaidrin:Medf + { 16047, 3 }, // #177 sc=Meetei_Mayek:Mtei scx=Meetei_Mayek:Mtei + { 16050, 2 }, // #178 sc=Mende_Kikakui:Mend scx=Mende_Kikakui:Mend + { 16052, 3 }, // #179 sc=Meroitic_Cursive:Merc scx=Meroitic_Cursive:Merc + { 16055, 1 }, // #180 sc=Meroitic_Hieroglyphs:Mero scx=Meroitic_Hieroglyphs:Mero + { 16056, 3 }, // #181 sc=Miao:Plrd scx=Miao:Plrd + { 16059, 2 }, // #182 sc=Modi:Modi + { 16061, 6 }, // #183 sc=Mongolian:Mong + { 16067, 3 }, // #184 sc=Mro:Mroo scx=Mro:Mroo + { 16070, 5 }, // #185 sc=Multani:Mult + { 16075, 3 }, // #186 sc=Myanmar:Mymr + { 16078, 2 }, // #187 sc=Nabataean:Nbat scx=Nabataean:Nbat + { 16080, 3 }, // #188 sc=Nandinagari:Nand + { 16083, 4 }, // #189 sc=New_Tai_Lue:Talu scx=New_Tai_Lue:Talu + { 16087, 2 }, // #190 sc=Newa:Newa scx=Newa:Newa + { 16089, 2 }, // #191 sc=Nko:Nkoo + { 16091, 2 }, // #192 sc=Nushu:Nshu scx=Nushu:Nshu + { 16093, 4 }, // #193 sc=Nyiakeng_Puachue_Hmong:Hmnp scx=Nyiakeng_Puachue_Hmong:Hmnp + { 16097, 1 }, // #194 sc=Ogham:Ogam scx=Ogham:Ogam + { 16098, 1 }, // #195 sc=Ol_Chiki:Olck scx=Ol_Chiki:Olck + { 16099, 3 }, // #196 sc=Old_Hungarian:Hung scx=Old_Hungarian:Hung + { 16102, 2 }, // #197 sc=Old_Italic:Ital scx=Old_Italic:Ital + { 16104, 1 }, // #198 sc=Old_North_Arabian:Narb scx=Old_North_Arabian:Narb + { 16105, 1 }, // #199 sc=Old_Permic:Perm + { 16106, 2 }, // #200 sc=Old_Persian:Xpeo scx=Old_Persian:Xpeo + { 16108, 1 }, // #201 sc=Old_Sogdian:Sogo scx=Old_Sogdian:Sogo + { 16109, 1 }, // #202 sc=Old_South_Arabian:Sarb scx=Old_South_Arabian:Sarb + { 16110, 1 }, // #203 sc=Old_Turkic:Orkh scx=Old_Turkic:Orkh + { 16111, 1 }, // #204 sc=Old_Uyghur:Ougr + { 16112, 14 }, // #205 sc=Oriya:Orya + { 16126, 2 }, // #206 sc=Osage:Osge scx=Osage:Osge + { 16128, 2 }, // #207 sc=Osmanya:Osma scx=Osmanya:Osma + { 16130, 5 }, // #208 sc=Pahawh_Hmong:Hmng scx=Pahawh_Hmong:Hmng + { 16135, 1 }, // #209 sc=Palmyrene:Palm scx=Palmyrene:Palm + { 16136, 1 }, // #210 sc=Pau_Cin_Hau:Pauc scx=Pau_Cin_Hau:Pauc + { 16137, 1 }, // #211 sc=Phags_Pa:Phag + { 16138, 2 }, // #212 sc=Phoenician:Phnx scx=Phoenician:Phnx + { 16140, 3 }, // #213 sc=Psalter_Pahlavi:Phlp + { 16143, 2 }, // #214 sc=Rejang:Rjng scx=Rejang:Rjng + { 16145, 2 }, // #215 sc=Runic:Runr scx=Runic:Runr + { 16147, 2 }, // #216 sc=Samaritan:Samr scx=Samaritan:Samr + { 16149, 2 }, // #217 sc=Saurashtra:Saur scx=Saurashtra:Saur + { 16151, 1 }, // #218 sc=Sharada:Shrd + { 16152, 1 }, // #219 sc=Shavian:Shaw scx=Shavian:Shaw + { 16153, 2 }, // #220 sc=Siddham:Sidd scx=Siddham:Sidd + { 16155, 3 }, // #221 sc=SignWriting:Sgnw scx=SignWriting:Sgnw + { 16158, 13 }, // #222 sc=Sinhala:Sinh + { 16171, 1 }, // #223 sc=Sogdian:Sogd + { 16172, 2 }, // #224 sc=Sora_Sompeng:Sora scx=Sora_Sompeng:Sora + { 16174, 1 }, // #225 sc=Soyombo:Soyo scx=Soyombo:Soyo + { 16175, 2 }, // #226 sc=Sundanese:Sund scx=Sundanese:Sund + { 16177, 1 }, // #227 sc=Syloti_Nagri:Sylo + { 16178, 4 }, // #228 sc=Syriac:Syrc + { 16182, 2 }, // #229 sc=Tagalog:Tglg + { 16184, 3 }, // #230 sc=Tagbanwa:Tagb + { 16187, 2 }, // #231 sc=Tai_Le:Tale + { 16189, 5 }, // #232 sc=Tai_Tham:Lana scx=Tai_Tham:Lana + { 16194, 2 }, // #233 sc=Tai_Viet:Tavt scx=Tai_Viet:Tavt + { 16196, 2 }, // #234 sc=Takri:Takr + { 16198, 18 }, // #235 sc=Tamil:Taml + { 16216, 2 }, // #236 sc=Tangsa:Tnsa scx=Tangsa:Tnsa + { 16218, 4 }, // #237 sc=Tangut:Tang scx=Tangut:Tang + { 16222, 13 }, // #238 sc=Telugu:Telu + { 16235, 1 }, // #239 sc=Thaana:Thaa + { 16236, 2 }, // #240 sc=Thai:Thai scx=Thai:Thai + { 16238, 7 }, // #241 sc=Tibetan:Tibt scx=Tibetan:Tibt + { 16245, 3 }, // #242 sc=Tifinagh:Tfng scx=Tifinagh:Tfng + { 16248, 2 }, // #243 sc=Tirhuta:Tirh + { 16250, 1 }, // #244 sc=Toto scx=Toto + { 16251, 2 }, // #245 sc=Ugaritic:Ugar scx=Ugaritic:Ugar + { 16253, 1 }, // #246 sc=Vai:Vaii scx=Vai:Vaii + { 16254, 8 }, // #247 sc=Vithkuqi:Vith scx=Vithkuqi:Vith + { 16262, 2 }, // #248 sc=Wancho:Wcho scx=Wancho:Wcho + { 16264, 2 }, // #249 sc=Warang_Citi:Wara scx=Warang_Citi:Wara + { 16266, 3 }, // #250 sc=Yezidi:Yezi + { 16269, 2 }, // #251 sc=Yi:Yiii + { 16271, 1 }, // #252 sc=Zanabazar_Square:Zanb scx=Zanabazar_Square:Zanb + { 16272, 5 }, // #253 scx=Adlam:Adlm + { 16277, 51 }, // #254 scx=Arabic:Arab + { 16328, 26 }, // #255 scx=Bengali:Beng + { 16354, 12 }, // #256 scx=Bopomofo:Bopo + { 16366, 3 }, // #257 scx=Buginese:Bugi + { 16369, 2 }, // #258 scx=Buhid:Buhd + { 16371, 4 }, // #259 scx=Chakma:Cakm + { 16375, 148 }, // #260 scx=Common:Zyyy + { 16523, 4 }, // #261 scx=Coptic:Copt:Qaac + { 16527, 2 }, // #262 scx=Cypro_Minoan:Cpmn + { 16529, 9 }, // #263 scx=Cypriot:Cprt + { 16538, 9 }, // #264 scx=Cyrillic:Cyrl + { 16547, 7 }, // #265 scx=Devanagari:Deva + { 16554, 3 }, // #266 scx=Dogra:Dogr + { 16557, 5 }, // #267 scx=Duployan:Dupl + { 16562, 9 }, // #268 scx=Georgian:Geor + { 16571, 10 }, // #269 scx=Glagolitic:Glag + { 16581, 25 }, // #270 scx=Grantha:Gran + { 16606, 38 }, // #271 scx=Greek:Grek + { 16644, 17 }, // #272 scx=Gujarati:Gujr + { 16661, 7 }, // #273 scx=Gunjala_Gondi:Gong + { 16668, 19 }, // #274 scx=Gurmukhi:Guru + { 16687, 37 }, // #275 scx=Han:Hani + { 16724, 21 }, // #276 scx=Hangul:Hang + { 16745, 7 }, // #277 scx=Hanifi_Rohingya:Rohg + { 16752, 1 }, // #278 scx=Hanunoo:Hano + { 16753, 16 }, // #279 scx=Hiragana:Hira + { 16769, 20 }, // #280 scx=Inherited:Zinh:Qaai + { 16789, 3 }, // #281 scx=Javanese:Java + { 16792, 4 }, // #282 scx=Kaithi:Kthi + { 16796, 21 }, // #283 scx=Kannada:Knda + { 16817, 19 }, // #284 scx=Katakana:Kana + { 16836, 1 }, // #285 scx=Kayah_Li:Kali + { 16837, 4 }, // #286 scx=Khojki:Khoj + { 16841, 4 }, // #287 scx=Khudawadi:Sind + { 16845, 46 }, // #288 scx=Latin:Latn + { 16891, 6 }, // #289 scx=Limbu:Limb + { 16897, 4 }, // #290 scx=Linear_A:Lina + { 16901, 10 }, // #291 scx=Linear_B:Linb + { 16911, 3 }, // #292 scx=Mahajani:Mahj + { 16914, 11 }, // #293 scx=Malayalam:Mlym + { 16925, 3 }, // #294 scx=Mandaic:Mand + { 16928, 3 }, // #295 scx=Manichaean:Mani + { 16931, 8 }, // #296 scx=Masaram_Gondi:Gonm + { 16939, 3 }, // #297 scx=Modi:Modi + { 16942, 5 }, // #298 scx=Mongolian:Mong + { 16947, 6 }, // #299 scx=Multani:Mult + { 16953, 4 }, // #300 scx=Myanmar:Mymr + { 16957, 9 }, // #301 scx=Nandinagari:Nand + { 16966, 6 }, // #302 scx=Nko:Nkoo + { 16972, 2 }, // #303 scx=Old_Permic:Perm + { 16974, 3 }, // #304 scx=Old_Uyghur:Ougr + { 16977, 18 }, // #305 scx=Oriya:Orya + { 16995, 3 }, // #306 scx=Phags_Pa:Phag + { 16998, 4 }, // #307 scx=Psalter_Pahlavi:Phlp + { 17002, 6 }, // #308 scx=Sharada:Shrd + { 17008, 14 }, // #309 scx=Sinhala:Sinh + { 17022, 2 }, // #310 scx=Sogdian:Sogd + { 17024, 3 }, // #311 scx=Syloti_Nagri:Sylo + { 17027, 12 }, // #312 scx=Syriac:Syrc + { 17039, 3 }, // #313 scx=Tagalog:Tglg + { 17042, 4 }, // #314 scx=Tagbanwa:Tagb + { 17046, 3 }, // #315 scx=Tai_Le:Tale + { 17049, 4 }, // #316 scx=Takri:Takr + { 17053, 25 }, // #317 scx=Tamil:Taml + { 17078, 17 }, // #318 scx=Telugu:Telu + { 17095, 7 }, // #319 scx=Thaana:Thaa + { 17102, 6 }, // #320 scx=Tirhuta:Tirh + { 17108, 7 }, // #321 scx=Yezidi:Yezi + { 17115, 7 } // #322 scx=Yi:Yiii +}; +#define SRELL_UPDATA_VERSION 110 diff --git a/lib/srell3_009/unicode/readme_en.txt b/lib/srell3_009/unicode/readme_en.txt new file mode 100644 index 000000000..0901777de --- /dev/null +++ b/lib/srell3_009/unicode/readme_en.txt @@ -0,0 +1,76 @@ +Contents of this directory: + + 1. ucfdataout2.cpp + 2. updataout.cpp + +---- +1. ucfdataout2.cpp + + This is a C++ source file for a program that generates a newer version +of srell_ucfdata2.hpp, which is a C++ source file that SRELL 2.500- includes +for case-folding. It is generated by ucfdataout with CaseFolding.txt provided +by the Unicode Consortium. + + +--------------------------------------------------------------------------- + | What is CaseFolding.txt? + | + | It is a data file needed for case-insensitive matching based on the + | Unicode Standard. Whenever a new version of the Unicode Standard is + | released, CaseFolding.txt may also be updated accordingly. + | + +--------------------------------------------------------------------------- + + 1-1. Usage + + 1) compile ucfdataout2.cpp, + 2) get the latest version of CaseFolding.txt, which is available at + http://www.unicode.org/Public/UNIDATA/CaseFolding.txt , + 3) put CaseFolding.txt and a binary file generated at 1) in the same + directory and run the binary file, + 4) move the newly generated "srell_ucfdata2.hpp" to the directory in where + SRELL is put. + + 1-2. Compatibility + + srell_ucfdata2.hpp is not compatible with srell_ucfdata.hpp that SRELL up + to 2.401 was using. + +---- +2. updataout.cpp + + This is a C++ source file for a program that generates a newer version +of srell_updata.hpp, which is a C++ source file that SRELL includes for +the Unicode property escapes (\p{...} and \P{...}). It is generated by +updataout with the following text files provided by the Unicode Consortium: + + * DerivedCoreProperties.txt + * DerivedNormalizationProps.txt + * emoji-data.txt + * PropList.txt + * ScriptExtensions.txt + * Scripts.txt + * UnicodeData.txt + + As well as CaseFolding.txt mentioned above, these files may be updated +accordingly whenever a new version of the Unicode Standard is released. + + 2-1. Usage + + 1) compile updataout.cpp, + 2) get the latest versions of the text files mentioned above, which are + available at: + a. emoji-data.txt: http://www.unicode.org/Public/UNIDATA/emoji/ + b. others: http://www.unicode.org/Public/UNIDATA/ , + 3) put the text files and a binary file generated at 1) in the same + directory and run the binary file, + 4) move the newly generated "srell_updata.hpp" to the directory in where + SRELL is put. + + Note: emoji-data.txt has been moved from /Public/UNIDATA/ to + /Public/emoji/(version number)/ since Unicode 11.0.0. + Since Unicode 13.0.0, moved to /Public/UNIDATA/emoji/ . + + 2-2. Compatibility + + srell_updata.hpp does not have compatibility issues as of this release. + diff --git a/lib/srell3_009/unicode/readme_ja.txt b/lib/srell3_009/unicode/readme_ja.txt new file mode 100644 index 000000000..8ece4001b --- /dev/null +++ b/lib/srell3_009/unicode/readme_ja.txt @@ -0,0 +1,84 @@ +■同梱物について + + 1. ucfdataout2.cpp + 2. updataout.cpp + +---- +1. ucfdataout2.cpp + + srell_ucfdata2.hppの最新版を作成するプログラムのソースファイルです。SRELLの +2.5以降はcase-insensitiveな(大文字小文字の違いを無視した)照合を行うために、 +このsrell_ucfdata2.hppを必要とします。 + + ucfdataout2は、Unicode Consortiumより提供されているCaseFolding.txtというテキ +ストデータからsrell_ucfdata2.hppを自動生成します。 + + +--------------------------------------------------------------------------- + | CaseFolding.txtとは + | + | Case-insensitiveな照合を行う際には、大文字小文字の違いを吸収するために + | "case-folding" と呼ばれる処理が行われます。Unicode規格に基づいた + | case-foldingを行うために、Unicode Consortiumから提供されているのが + | CaseFolding.txtです。 + | + | このデータファイルはUnicode規格がアップデートされるとそれに合わせて + | アップデートされる可能性があります。 + | + +--------------------------------------------------------------------------- + + 1-1. 使用方法 + + 1) ucfdataout2.cppをコンパイルします。 + 2) 最新版のCaseFolding.txtを次のURLより取得します。 + http://www.unicode.org/Public/UNIDATA/CaseFolding.txt , + 3) CaseFolding.txtと、1)で作成したバイナリとを同じフォルダに置いて + バイナリを実行します。 + 4) srell_ucfdata2.hppが生成されますので、それをSRELLの置かれているディレク + トリへと移動させます。 + + 1-2. 互換性 + + srell_ucfdata2.hppは、SRELL 2.401までが利用していたsrell_updata.hppと互換 + 性がありません。 + +---- +2. updataout.cpp + + srell_updata.hppの最新版を作成するプログラムのソースファイルです。SRELLは +Unicode property escapes(\p{...} と \P{...})を含む正規表現と文字列との照合 +を行うために、このsrell_updata.hppを必要とします。 + + updataoutは、Unicode Consortiumより提供されている次のテキストデータから +srell_updata.hppを自動生成します。 + + ・DerivedCoreProperties.txt + ・DerivedNormalizationProps.txt + ・emoji-data.txt + ・PropList.txt + ・ScriptExtensions.txt + ・Scripts.txt + ・UnicodeData.txt + + 先述のCaseFolding.txt同様、これらのテキストデータファイルもUnicode規格が +アップデートされるとそれに合わせてアップデートされる可能性があります。 + + 2-1. 使用方法 + + 1) updataout.cppをコンパイルします。 + 2) 前記テキストファイルの最新版を次のURLより取得します。 + a. emoji-data.txt: http://www.unicode.org/Public/UNIDATA/emoji/ + b. それ以外: http://www.unicode.org/Public/UNIDATA/ + 3) これらのテキストファイルと、1)で作成したバイナリとを同じフォルダに + 置いてバイナリを実行します。 + 4) srell_updata.hppが生成されますので、それをSRELLの置かれているディレク + トリへと移動させます。 + + 補註: Unicode 11.0.0以降、emoji-data.txt は /Public/UNIDATA/ から + /Public/emoji/(ヴァージョン番号)/ へ移されました。 + さらに Unicode 13.0.0以降、/Public/UNIDATA/emoji/ へ移されました。 + + 2-2. 互換性 + + srell_updata.hpp には非互換となるような変更はこれまでのところ加えられてい + ません。 + diff --git a/lib/srell3_009/unicode/ucfdataout2.cpp b/lib/srell3_009/unicode/ucfdataout2.cpp new file mode 100644 index 000000000..1575a301d --- /dev/null +++ b/lib/srell3_009/unicode/ucfdataout2.cpp @@ -0,0 +1,590 @@ +// +// ucfdataout.cpp: version 2.100 (2020/05/13). +// +// This is a program that generates srell_ucfdata.hpp from CaseFolding.txt +// provided by the Unicode Consortium. The latese version is available at: +// http://www.unicode.org/Public/UNIDATA/CaseFolding.txt +// + +#include +#include +#include +#include +#include "../srell.hpp" + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(disable:4996) +#endif + +namespace unishared +{ +template +std::string stringify(const Type value, const char *const fmt) +{ + char buffer[BufSize]; + std::sprintf(buffer, fmt, value); + return std::string(buffer); +} + +bool read_file(std::string &str, const char *const filename, const char *const dir) +{ + const std::string path(std::string(dir ? dir : "") + filename); + FILE *const fp = std::fopen(path.c_str(), "r"); + + std::fprintf(stdout, "Reading '%s'... ", path.c_str()); + + if (fp) + { + static const std::size_t bufsize = 4096; + char *const buffer = static_cast(std::malloc(bufsize)); + + if (buffer) + { + for (;;) + { + const std::size_t size = std::fread(buffer, 1, bufsize, fp); + + if (!size) + break; + + str.append(buffer, size); + } + std::fclose(fp); + std::fputs("done.\n", stdout); + std::free(buffer); + return true; + } + } + std::fputs("failed...\n", stdout); + return false; +} + +bool write_file(const char *const filename, const std::string &str) +{ + FILE *const fp = std::fopen(filename, "wb"); + + std::fprintf(stdout, "Writing '%s'... ", filename); + + if (fp) + { + const bool success = std::fwrite(str.c_str(), 1, str.size(), fp) == str.size(); + std::fclose(fp); + if (success) + { + std::fputs("done.\n", stdout); + return true; + } + } + std::fputs("failed...\n", stdout); + return false; +} +} +// namespace unishared + +struct ucf_options +{ + const char *infilename; + const char *outfilename; + const char *indir; + int version; + int errorno; + + ucf_options(const int argc, const char *const *const argv) + : infilename("CaseFolding.txt") + , outfilename("srell_ucfdata2.hpp") + , indir("") + , version(2) + , errorno(0) + { + bool outfile_specified = false; + + for (int index = 1; index < argc; ++index) + { + const char firstchar = argv[index][0]; + + if (firstchar == '-' || firstchar == '/') + { + const char *const option = argv[index] + 1; + + ++index; + if (std::strcmp(option, "i") == 0) + { + if (index >= argc) + goto NO_ARGUMENT; + infilename = argv[index]; + } + else if (std::strcmp(option, "o") == 0) + { + if (index >= argc) + goto NO_ARGUMENT; + outfilename = argv[index]; + outfile_specified = true; + } + else if (std::strcmp(option, "v") == 0) + { + if (index >= argc) + goto NO_ARGUMENT; + version = static_cast(std::strtol(argv[index], NULL, 10)); + if (!outfile_specified && version < 2) + { + static const char *const v1name = "srell_ucfdata.hpp"; + outfilename = v1name; + } + } + else if (std::strcmp(option, "id") == 0) + { + if (index >= argc) + goto NO_ARGUMENT; + indir = argv[index]; + } + else + { + --index; + goto UNKNOWN_OPTION; + } + + continue; + + NO_ARGUMENT: + std::fprintf(stdout, "[Error] no argument for \"%s\" specified.\n", argv[--index]); + errorno = -2; + } + else + { + UNKNOWN_OPTION: + std::fprintf(stdout, "[Error] unknown option \"%s\" found.\n", argv[index]); + errorno = -1; + } + } + } +}; +// struct ucf_options + +class unicode_casefolding +{ +public: + + unicode_casefolding() + : maxdelta_(0L), maxdelta_cp_(0L), ucf_maxcodepoint_(0L), rev_maxcodepoint_(0L) + , ucf_numofsegs_(1U), rev_numofsegs_(1U), numofcps_from_(0U), numofcps_to_(0U) + , max_appearance_(0U), nextoffset_(0x100L), rev_charsets_(1, -1L) + { + } + + int create_ucfdata(std::string &outdata, const ucf_options &opts) + { + const std::string indent("\t\t\t"); + int errorno = opts.errorno; + std::string buf; + + if (errorno) + return errorno; + + if (unishared::read_file(buf, opts.infilename, opts.indir)) + { + static const srell::regex re_line("^.*$", srell::regex::multiline); + const srell::cregex_iterator eos; + srell::cregex_iterator iter(buf.c_str(), buf.c_str() + buf.size(), re_line); + srell::cmatch match; + int colcount = 0; + + for (; iter != eos; ++iter) + { + if (iter->length(0)) + { + static const srell::regex re_datainfo("^# (.*)$"); + + if (!srell::regex_match((*iter)[0].first, (*iter)[0].second, match, re_datainfo)) + { + outdata.append(1, '\n'); + break; + } + outdata += "// " + match.str(1) + "\n"; + } + } + + if (opts.version <= 1) + outdata += "template \nstruct unicode_casefolding\n{\n\tstatic const T1 *table()\n\t{\n\t\tstatic const T1 ucftable[] =\n\t\t{\n"; + else + outdata += "template \nstruct unicode_casefolding\n{\n"; + + for (; iter != eos; ++iter) + { + static const srell::regex re_cfdata("^\\s*([0-9A-Fa-f]+); ([CS]); ([0-9A-Fa-f]+);\\s*#\\s*(.*)$"); + const srell::cmatch &line = *iter; + + if (srell::regex_match(line[0].first, line[0].second, match, re_cfdata)) + { + const std::string from(match[1]); + const std::string to(match[3]); + const std::string type(match[2]); + const std::string name(match[4]); + + update(from, to); + + if (opts.version == 1) + outdata += indent + "{ 0x" + from + ", 0x" + to + " },\t// " + type + "; " + name + "\n"; + else if (opts.version <= 0) + { + if (colcount == 0) + outdata += indent; + outdata += "{ 0x" + from + ", 0x" + to + " },"; + if (++colcount == 4) + { + outdata.append(1, '\n'); + colcount = 0; + } + } + } + else if (opts.version == 1) + { + static const srell::regex re_comment_or_emptyline("^#.*|^$"); + + if (!srell::regex_match(line[0].first, line[0].second, re_comment_or_emptyline)) + outdata += indent + "// " + line.str(0) + "\n"; + } + } + if (colcount > 0) + outdata.append(1, '\n'); + if (opts.version <= 1) + outdata += indent + "{ 0, 0 }\n\t\t};\n\t\treturn ucftable;\n\t}\n"; + + outdata += "\tstatic const T2 ucf_maxcodepoint = 0x" + unishared::stringify<16>(ucf_maxcodepoint_, "%.4lX") + ";\n"; + outdata += "\tstatic const T3 ucf_deltatablesize = 0x" + unishared::stringify<16>(ucf_numofsegs_ << 8, "%X") + ";\n"; + + outdata += "\tstatic const T2 rev_maxcodepoint = 0x" + unishared::stringify<16>(rev_maxcodepoint_, "%.4lX") + ";\n"; + outdata += "\tstatic const T3 rev_indextablesize = 0x" + unishared::stringify<16>(rev_numofsegs_ << 8, "%X") + ";\n"; + outdata += "\tstatic const T3 rev_charsettablesize = " + unishared::stringify<16>(numofcps_to_ * 2 + numofcps_from_ + 1, "%u") + ";\t// 1 + " + unishared::stringify<16>(numofcps_to_, "%u") + " * 2 + " + unishared::stringify<16>(numofcps_from_, "%u") + "\n"; + outdata += "\tstatic const T3 rev_maxset = " + unishared::stringify<16>(maxset(), "%u") + ";\n"; + outdata += "\tstatic const T2 eos = 0;\n"; + + if (opts.version >= 2) + { + outdata += "\n\tstatic const T2 ucf_deltatable[];\n\tstatic const T3 ucf_segmenttable[];\n\tstatic const T3 rev_indextable[];\n\tstatic const T3 rev_segmenttable[];\n\tstatic const T2 rev_charsettable[];\n\n\tstatic const T2 *ucf_deltatable_ptr()\n\t{\n\t\treturn ucf_deltatable;\n\t}\n\tstatic const T3 *ucf_segmenttable_ptr()\n\t{\n\t\treturn ucf_segmenttable;\n\t}\n\tstatic const T3 *rev_indextable_ptr()\n\t{\n\t\treturn rev_indextable;\n\t}\n\tstatic const T3 *rev_segmenttable_ptr()\n\t{\n\t\treturn rev_segmenttable;\n\t}\n\tstatic const T2 *rev_charsettable_ptr()\n\t{\n\t\treturn rev_charsettable;\n\t}\n};\n\n"; + out_v2tables(outdata); + outdata += "#define SRELL_UCFDATA_VERSION 200\n"; + } + else + outdata += "};\n#define SRELL_UCFDATA_VER 201909L\n"; + + std::fprintf(stdout, "MaxDelta: %+ld (U+%.4lX->U+%.4lX)\n", maxdelta_, maxdelta_cp_, maxdelta_cp_ + maxdelta_); + } + else + errorno = 1; + + return errorno; + } + +private: + + void update(const std::string &from, const std::string &to) + { + const long cp_from = std::strtol(from.c_str(), NULL, 16); + const long cp_to = std::strtol(to.c_str(), NULL, 16); + const long delta = cp_to - cp_from; + const long segno_from = cp_from >> 8; + const long segno_to = cp_to >> 8; + + update_tables(cp_from, cp_to, segno_from); + + ++numofcps_from_; + if (std::abs(maxdelta_) < std::abs(delta)) + { + maxdelta_cp_ = cp_from; + maxdelta_ = delta; + } + + if (ucf_maxcodepoint_ < cp_from) + ucf_maxcodepoint_ = cp_from; + + if (rev_maxcodepoint_ < cp_to) + rev_maxcodepoint_ = cp_to; + + if (rev_maxcodepoint_ < cp_from) + rev_maxcodepoint_ = cp_from; + + if (!ucf_countedsegnos.count(segno_from)) + { + ucf_countedsegnos[segno_from] = 1; + ++ucf_numofsegs_; + } + + if (!rev_countedsegnos.count(segno_to)) + { + rev_countedsegnos[segno_to] = 1; + ++rev_numofsegs_; + } + if (!rev_countedsegnos.count(segno_from)) + { + rev_countedsegnos[segno_from] = 1; + ++rev_numofsegs_; + } + + if (!cps_counted_as_foldedto.count(cp_to)) + { + cps_counted_as_foldedto[cp_to] = 1; + ++numofcps_to_; + } + + if (appearance_counts_.count(to)) + ++appearance_counts_[to]; + else + appearance_counts_[to] = 1; + + if (max_appearance_ < appearance_counts_[to]) + max_appearance_ = appearance_counts_[to]; + } + + unsigned int maxset() const + { + return max_appearance_ + 1; + } + + void out_v2tables(std::string &outdata) + { + const char *const headers[] = { + "template \nconst ", + " unicode_casefolding::", + "[] =\n{\n" + }; + + create_revtables(); + out_lowertable(outdata, headers, "T2", "ucf_deltatable", ucf_deltas_, ucf_segments_); + outdata.append(1, '\n'); + out_uppertable(outdata, headers, "T3", "ucf_segmenttable", ucf_segments_); + outdata.append(1, '\n'); + out_lowertable(outdata, headers, "T3", "rev_indextable", rev_indices_, rev_segments_); + outdata.append(1, '\n'); + out_uppertable(outdata, headers, "T3", "rev_segmenttable", rev_segments_); + outdata.append(1, '\n'); + out_cstable(outdata, headers, "T2", "rev_charsettable", rev_charsets_); + } + + // Updates ucf_segments_, ucf_deltas_, and rev_charsets_. + void update_tables(const long cp_from, const long cp_to, const long segno_from) + { + if (segno_from >= static_cast(ucf_segments_.size())) + ucf_segments_.resize(segno_from + 1, 0L); + + long &offset_of_segment = ucf_segments_[segno_from]; + + if (offset_of_segment == 0L) + { + offset_of_segment = nextoffset_; + nextoffset_ += 0x100L; + ucf_deltas_.resize(nextoffset_, 0L); + } + + ucf_deltas_[offset_of_segment + (cp_from & 0xffL)] = cp_to - cp_from; + + for (long index = 0L;; ++index) + { + if (index == static_cast(rev_charsets_.size())) + { + rev_charsets_.push_back(cp_to); + rev_charsets_.push_back(cp_from); + rev_charsets_.push_back(-1L); + break; + } + if (rev_charsets_[index] == cp_to) + { + for (++index; rev_charsets_[index] != -1L; ++index); + + rev_charsets_.insert(index, 1, cp_from); + break; + } + } + } + + // Creates rev_segments_ and rev_indices_ from rev_charsets_. + void create_revtables() + { + long nextoffset = 0x100L; + for (long index = 0L; index < static_cast(rev_charsets_.size()); ++index) + { + const long bocs = index; // Beginning of charset. + + for (; rev_charsets_[index] != -1L; ++index) + { + const long &u21ch = rev_charsets_[index]; + const long segno = u21ch >> 8L; + + if (segno >= static_cast(rev_segments_.size())) + rev_segments_.resize(segno + 1, 0L); + + long &offset_of_segment = rev_segments_[segno]; + + if (offset_of_segment == 0L) + { + offset_of_segment = nextoffset; + nextoffset += 0x100L; + rev_indices_.resize(nextoffset, 0L); + } + rev_indices_[offset_of_segment + (u21ch & 0xffL)] = bocs; + } + } + } + + void out_lowertable(std::string &outdata, const char *const headers[], const char *const type, const char *const funcname, const std::basic_string &table, const std::basic_string &segtable) const + { + int end = static_cast(table.size()); + + outdata += headers[0]; + outdata += type; + outdata += headers[1]; + outdata += funcname; + outdata += headers[2]; + + for (int i = 0; i < end;) + { + const int col = i & 15; + + if ((i & 255) == 0) + { + if (i) + { + for (int j = 0; j < static_cast(segtable.size()); ++j) + { + if (segtable[j] == i) + { + outdata += "\n\t// For u+" + unishared::stringify<16>(j, "%.2X") + "xx (" + unishared::stringify<16>(i, "%d") + ")\n"; + break; + } + } + } + else + outdata += "\t// For common (0)\n"; + } + + outdata += col == 0 ? "\t" : (col & 3) == 0 ? " " : " "; + if (table[i] >= 0L) + outdata += unishared::stringify<16>(table[i], "%ld"); + else + outdata += "static_cast<", outdata += type, outdata += ">(", outdata += unishared::stringify<16>(table[i], "%ld") + ")"; + + if (++i == end) + outdata.append(1, '\n'); + else if (col == 15) + outdata += ",\n"; + else + outdata.append(1, ','); + } + outdata += "};\n"; + } + + void out_uppertable(std::string &outdata, const char *const headers[], const char *const type, const char *const funcname, const std::basic_string &table) const + { + int end = static_cast(table.size()); + + outdata += headers[0]; + outdata += type; + outdata += headers[1]; + outdata += funcname; + outdata += headers[2]; + + for (int i = 0; i < end;) + { + const int col = i & 15; + + outdata += col == 0 ? "\t" : (col & 3) == 0 ? " " : " "; + if (table[i] >= 0) + outdata += unishared::stringify<16>(table[i], "%ld"); + else + outdata += "static_cast<", outdata += type, outdata += ">(", outdata += unishared::stringify<16>(table[i], "%ld") + ")"; + + if (++i == end) + outdata.append(1, '\n'); + else if (col == 15) + outdata += ",\n"; + else + outdata.append(1, ','); + } + outdata += "};\n"; + } + + void out_cstable(std::string &outdata, const char *const headers[], const char *const type, const char *const funcname, const std::basic_string &table) const + { + int end = static_cast(table.size()); + bool newline = true; + int bos = 0; + int prevprintedbos = -1; + + outdata += headers[0]; + outdata += type; + outdata += headers[1]; + outdata += funcname; + outdata += headers[2]; + + for (int i = 0; i < end;) + { + const long val = table[i]; + + outdata += newline ? "\t" : " "; + newline = false; + + if (val == -1L) + outdata += "eos"; + else + outdata += "0x", outdata += unishared::stringify<16>(val, "%.4lX"); + + if (++i != end) + outdata.append(1, ','); + + if (val == -1L) + { + if (prevprintedbos != bos / 10 || i == end) + { + outdata += "\t// "; + outdata += unishared::stringify<16>(bos, "%d"); + prevprintedbos = bos / 10; + } + outdata.append(1, '\n'); + newline = true; + bos = i; + } + } + outdata += "};\n"; + } + + typedef std::map flagset_type; + + long maxdelta_; // = 0L; + long maxdelta_cp_; // = 0L; + long ucf_maxcodepoint_; // = 0L; // The max code point for case-folding. + long rev_maxcodepoint_; // = 0L; // The max code point for reverse lookup. + unsigned int ucf_numofsegs_; // = 1U; // The number of segments in the delta table. + unsigned int rev_numofsegs_; // = 1U; // The number of segments in the table for reverse lookup. + unsigned int numofcps_from_; // = 0U; // The number of code points in "folded from"s. + unsigned int numofcps_to_; // = 0U; // The number of code points in "folded to"s. + + flagset_type ucf_countedsegnos; // The set of segment nos marked as "counted" for case-folding. + flagset_type rev_countedsegnos; // The set of segment nos marked as "counted" for reverse lookup. + flagset_type cps_counted_as_foldedto; // The set of code points marked as "folded to". + + unsigned int max_appearance_; + std::map appearance_counts_; + + long nextoffset_; + std::basic_string ucf_deltas_; + std::basic_string ucf_segments_; + std::basic_string rev_indices_; + std::basic_string rev_segments_; + std::basic_string rev_deltas_; + std::basic_string rev_charsets_; +}; +// class unicode_casefolding + +int main(const int argc, const char *const *const argv) +{ + ucf_options ucfopts(argc, argv); + std::string outdata; + unicode_casefolding ucf; + int errorno = ucf.create_ucfdata(outdata, ucfopts); + + if (errorno == 0) + { + if (!unishared::write_file(ucfopts.outfilename, outdata)) + errorno = 2; + } + return errorno; +} diff --git a/lib/srell3_009/unicode/updataout.cpp b/lib/srell3_009/unicode/updataout.cpp new file mode 100644 index 000000000..1501572c7 --- /dev/null +++ b/lib/srell3_009/unicode/updataout.cpp @@ -0,0 +1,1066 @@ +// +// updataout.cpp: version 1.400 (2021/10/10). +// +// This is a program that generates srell_updata.hpp from: +// DerivedCoreProperties.txt +// DerivedNormalizationProps.txt +// emoji-data.txt +// PropList.txt +// ScriptExtensions.txt +// Scripts.txt +// UnicodeData.txt +// provided by the Unicode Consortium. The latese versions of them +// except emoji-data.txt are available at: http://www.unicode.org/Public/UNIDATA/ +// emoji-data.txt is available at: http://www.unicode.org/Public/UNIDATA/emoji/ +// + +#include +#include +#include +#include +#include +#include +#include +#include "../srell.hpp" + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#pragma warning(disable:4996) +#endif + +namespace updata +{ +static const char *const property_names[] = { // 3 + "General_Category:gc", "Script:sc", "Script_Extensions:scx", "" +}; +static const char *const binary_property_names[] = { // 53 (52+1) + // *1: http://unicode.org/reports/tr18/#General_Category_Property + // *2: 9th field in UnicodeData.txt + "ASCII", // *1 + "ASCII_Hex_Digit:AHex", // PropList.txt + "Alphabetic:Alpha", // DerivedCoreProperties.txt + "Any", // *1 + "Assigned", // *1 + "Bidi_Control:Bidi_C", // PropList.txt + "Bidi_Mirrored:Bidi_M", // *2 + "Case_Ignorable:CI", // DerivedCoreProperties.txt + "Cased", // DerivedCoreProperties.txt + "Changes_When_Casefolded:CWCF", // DerivedCoreProperties.txt + "Changes_When_Casemapped:CWCM", // DerivedCoreProperties.txt + "Changes_When_Lowercased:CWL", // DerivedCoreProperties.txt + "Changes_When_NFKC_Casefolded:CWKCF", // DerivedNormalizationProps.txt + "Changes_When_Titlecased:CWT", // DerivedCoreProperties.txt + "Changes_When_Uppercased:CWU", // DerivedCoreProperties.txt + "Dash", // PropList.txt + "Default_Ignorable_Code_Point:DI", // DerivedCoreProperties.txt + "Deprecated:Dep", // PropList.txt + "Diacritic:Dia", // PropList.txt + "Emoji", // emoji-data.txt + "Emoji_Component:EComp", // emoji-data.txt + "Emoji_Modifier:EMod", // emoji-data.txt + "Emoji_Modifier_Base:EBase", // emoji-data.txt + "Emoji_Presentation:EPres", // emoji-data.txt + "Extended_Pictographic:ExtPict", // emoji-data.txt + "Extender:Ext", // PropList.txt + "Grapheme_Base:Gr_Base", // DerivedCoreProperties.txt + "Grapheme_Extend:Gr_Ext", // DerivedCoreProperties.txt + "Hex_Digit:Hex", // PropList.txt + "IDS_Binary_Operator:IDSB", // PropList.txt + "IDS_Trinary_Operator:IDST", // PropList.txt + "ID_Continue:IDC", // DerivedCoreProperties.txt + "ID_Start:IDS", // DerivedCoreProperties.txt + "Ideographic:Ideo", // PropList.txt + "Join_Control:Join_C", // PropList.txt + "Logical_Order_Exception:LOE", // PropList.txt + "Lowercase:Lower", // DerivedCoreProperties.txt + "Math", // DerivedCoreProperties.txt + "Noncharacter_Code_Point:NChar", // PropList.txt + "Pattern_Syntax:Pat_Syn", // PropList.txt + "Pattern_White_Space:Pat_WS", // PropList.txt + "Quotation_Mark:QMark", // PropList.txt + "Radical", // PropList.txt + "Regional_Indicator:RI", // PropList.txt + "Sentence_Terminal:STerm", // PropList.txt + "Soft_Dotted:SD", // PropList.txt + "Terminal_Punctuation:Term", // PropList.txt + "Unified_Ideograph:UIdeo", // PropList.txt + "Uppercase:Upper", // DerivedCoreProperties.txt + "Variation_Selector:VS", // PropList.txt + "White_Space:space", // PropList.txt + "XID_Continue:XIDC", // DerivedCoreProperties.txt + "XID_Start:XIDS", // DerivedCoreProperties.txt + // ECMAScript 2019/Unicode 11: + // "Extended_Pictographic:ExtPict", + // ECMAScript 2021/Unicode 13: + // Aliases: EComp, EMod, EBase, EPres, and ExtPict + "" +}; +static const char *const gc_values[] = { // 38 + "Other:C", "Control:Cc:cntrl", "Format:Cf", "Unassigned:Cn", + "Private_Use:Co", "Surrogate:Cs", "Letter:L", "Cased_Letter:LC", + "Lowercase_Letter:Ll", "Titlecase_Letter:Lt", "Uppercase_Letter:Lu", "Modifier_Letter:Lm", + "Other_Letter:Lo", "Mark:M:Combining_Mark", "Spacing_Mark:Mc", "Enclosing_Mark:Me", + "Nonspacing_Mark:Mn", "Number:N", "Decimal_Number:Nd:digit", "Letter_Number:Nl", + "Other_Number:No", "Punctuation:P:punct", "Connector_Punctuation:Pc", "Dash_Punctuation:Pd", + "Close_Punctuation:Pe", "Final_Punctuation:Pf", "Initial_Punctuation:Pi", "Other_Punctuation:Po", + "Open_Punctuation:Ps", "Symbol:S", "Currency_Symbol:Sc", "Modifier_Symbol:Sk", + "Math_Symbol:Sm", "Other_Symbol:So", "Separator:Z", "Line_Separator:Zl", + "Paragraph_Separator:Zp", "Space_Separator:Zs", "" +}; +static const char *const script_names[] = { // 161 (141+7+4+4+5) + "Adlam:Adlm", "Ahom:Ahom", "Anatolian_Hieroglyphs:Hluw", "Arabic:Arab", + "Armenian:Armn", "Avestan:Avst", "Balinese:Bali", "Bamum:Bamu", + "Bassa_Vah:Bass", "Batak:Batk", "Bengali:Beng", "Bhaiksuki:Bhks", + "Bopomofo:Bopo", "Brahmi:Brah", "Braille:Brai", "Buginese:Bugi", + "Buhid:Buhd", "Canadian_Aboriginal:Cans", "Carian:Cari", "Caucasian_Albanian:Aghb", + "Chakma:Cakm", "Cham:Cham", "Cherokee:Cher", "Chorasmian:Chrs", + "Common:Zyyy", "Coptic:Copt:Qaac", "Cypro_Minoan:Cpmn", "Cuneiform:Xsux", + "Cypriot:Cprt", "Cyrillic:Cyrl", "Deseret:Dsrt", "Devanagari:Deva", + "Dives_Akuru:Diak", "Dogra:Dogr", "Duployan:Dupl", "Egyptian_Hieroglyphs:Egyp", + "Elbasan:Elba", "Elymaic:Elym", "Ethiopic:Ethi", "Georgian:Geor", + "Glagolitic:Glag", "Gothic:Goth", "Grantha:Gran", "Greek:Grek", + "Gujarati:Gujr", "Gunjala_Gondi:Gong", "Gurmukhi:Guru", "Han:Hani", + "Hangul:Hang", "Hanifi_Rohingya:Rohg", "Hanunoo:Hano", "Hatran:Hatr", + "Hebrew:Hebr", "Hiragana:Hira", "Imperial_Aramaic:Armi", "Inherited:Zinh:Qaai", + "Inscriptional_Pahlavi:Phli", "Inscriptional_Parthian:Prti", "Javanese:Java", "Kaithi:Kthi", + "Kannada:Knda", "Katakana:Kana", "Kayah_Li:Kali", "Kharoshthi:Khar", + "Khitan_Small_Script:Kits", "Khmer:Khmr", "Khojki:Khoj", "Khudawadi:Sind", + "Lao:Laoo", "Latin:Latn", "Lepcha:Lepc", "Limbu:Limb", + "Linear_A:Lina", "Linear_B:Linb", "Lisu:Lisu", "Lycian:Lyci", + "Lydian:Lydi", "Mahajani:Mahj", "Makasar:Maka", "Malayalam:Mlym", + "Mandaic:Mand", "Manichaean:Mani", "Marchen:Marc", "Masaram_Gondi:Gonm", + "Medefaidrin:Medf", "Meetei_Mayek:Mtei", "Mende_Kikakui:Mend", "Meroitic_Cursive:Merc", + "Meroitic_Hieroglyphs:Mero", "Miao:Plrd", "Modi:Modi", "Mongolian:Mong", + "Mro:Mroo", "Multani:Mult", "Myanmar:Mymr", "Nabataean:Nbat", + "Nandinagari:Nand", "New_Tai_Lue:Talu", "Newa:Newa", "Nko:Nkoo", + "Nushu:Nshu", "Nyiakeng_Puachue_Hmong:Hmnp", "Ogham:Ogam", "Ol_Chiki:Olck", + "Old_Hungarian:Hung", "Old_Italic:Ital", "Old_North_Arabian:Narb", "Old_Permic:Perm", + "Old_Persian:Xpeo", "Old_Sogdian:Sogo", "Old_South_Arabian:Sarb", "Old_Turkic:Orkh", + "Old_Uyghur:Ougr", "Oriya:Orya", "Osage:Osge", "Osmanya:Osma", + "Pahawh_Hmong:Hmng", "Palmyrene:Palm", "Pau_Cin_Hau:Pauc", "Phags_Pa:Phag", + "Phoenician:Phnx", "Psalter_Pahlavi:Phlp", "Rejang:Rjng", "Runic:Runr", + "Samaritan:Samr", "Saurashtra:Saur", "Sharada:Shrd", "Shavian:Shaw", + "Siddham:Sidd", "SignWriting:Sgnw", "Sinhala:Sinh", "Sogdian:Sogd", + "Sora_Sompeng:Sora", "Soyombo:Soyo", "Sundanese:Sund", "Syloti_Nagri:Sylo", + "Syriac:Syrc", "Tagalog:Tglg", "Tagbanwa:Tagb", "Tai_Le:Tale", + "Tai_Tham:Lana", "Tai_Viet:Tavt", "Takri:Takr", "Tamil:Taml", + "Tangsa:Tnsa", "Tangut:Tang", "Telugu:Telu", "Thaana:Thaa", + "Thai:Thai", "Tibetan:Tibt", "Tifinagh:Tfng", "Tirhuta:Tirh", + "Toto", "Ugaritic:Ugar", "Vai:Vaii", "Vithkuqi:Vith", + "Wancho:Wcho", "Warang_Citi:Wara", "Yezidi:Yezi", "Yi:Yiii", + "Zanabazar_Square:Zanb", + // ECMAScript 2019/Unicode 11: + // "Dogra:Dogr", "Gunjala_Gondi:Gong", "Hanifi_Rohingya:Rohg", + // "Makasar:Maka", "Medefaidrin:Medf", "Old_Sogdian:Sogo", "Sogdian:Sogd", + // ECMAScript 2020/Unicode 12 + // "Elymaic:Elym", "Nandinagari:Nand", "Nyiakeng_Puachue_Hmong:Hmnp", "Wancho:Wcho", + // ECMAScript 2021/Unicode 13 + // "Chorasmian:Chrs", "Dives_Akuru:Diak", "Khitan_Small_Script:Kits", "Yezidi:Yezi", + // ECMAScript 2022/Unicode 14: + // "Cypro_Minoan:Cpmn", "Old_Uyghur:Ougr", "Tangsa:Tnsa", "Toto", + // "Vithkuqi:Vith" + "" +}; +} // namespace updata + +namespace unishared +{ +template +std::string stringify(const Type value, const char *const fmt) +{ + char buffer[BufSize]; + std::sprintf(buffer, fmt, value); + return std::string(buffer); +} + +void throw_error(const char *const s, ...) +{ + char buffer[256]; + + va_list va; + va_start(va, s); + std::vsprintf(buffer, s, va); + va_end(va); + throw std::runtime_error(buffer); +} + +void read_file(std::string &str, const char *const filename, const char *const dir) +{ + const std::string path(std::string(dir ? dir : "") + filename); + FILE *const fp = std::fopen(path.c_str(), "r"); + + std::fprintf(stdout, "Reading '%s'... ", path.c_str()); + + if (fp) + { + static const std::size_t bufsize = 4096; + char *const buffer = static_cast(std::malloc(bufsize)); + + if (buffer) + { + for (;;) + { + const std::size_t size = std::fread(buffer, 1, bufsize, fp); + + if (!size) + break; + + str.append(buffer, size); + } + std::fclose(fp); + std::fputs("done.\n", stdout); + std::free(buffer); + return; + } + } + std::fputs("failed...", stdout); + throw_error("could not open!"); +} + +bool write_file(const char *const filename, const std::string &str) +{ + FILE *const fp = std::fopen(filename, "wb"); + + std::fprintf(stdout, "Writing '%s'... ", filename); + + if (fp) + { + const bool success = std::fwrite(str.c_str(), 1, str.size(), fp) == str.size(); + std::fclose(fp); + if (success) + { + std::fputs("done.\n", stdout); + return true; + } + } + std::fputs("failed...\n", stdout); + return false; +} +} // namespace unishared + +struct up_options +{ + const char *outfilename; + const char *indir; + int version; + int errorno; + + up_options(const int argc, const char *const *const argv) + : outfilename("srell_updata.hpp") + , indir("") + , version(110) + , errorno(0) + { + for (int index = 1; index < argc; ++index) + { + const char firstchar = argv[index][0]; + + if (firstchar == '-' || firstchar == '/') + { + const char *const option = argv[index] + 1; + + if (std::strcmp(option, "o") == 0) + { + if (index + 1 >= argc) + goto NO_ARGUMENT; + outfilename = argv[++index]; + } + else if (std::strcmp(option, "v") == 0) + { + if (index + 1 >= argc) + goto NO_ARGUMENT; + version = static_cast(std::strtod(argv[++index], NULL) * 100.0); + } + else if (std::strcmp(option, "id") == 0) + { + if (index + 1 >= argc) + goto NO_ARGUMENT; + indir = argv[++index]; + } + else + goto UNKNOWN_OPTION; + + continue; + + NO_ARGUMENT: + std::fprintf(stdout, "[Error] no argument for \"%s\" specified.\n", argv[index]); + errorno = -2; + } + else + { + UNKNOWN_OPTION: + std::fprintf(stdout, "[Error] unknown option \"%s\" found.\n", argv[index]); + errorno = -1; + } + } + } +}; +// struct up_options + +class unicode_property +{ +public: + + unicode_property() + : re_licenseline_("^#\\s*(.*)$") + , re_licenseend_("^#\\s*$") + { + } + + int create_updata(std::string &outdata, const up_options &opts) + { + int errorno = opts.errorno; + const char *const unidatafilename = "UnicodeData.txt"; + const char *const propdatafiles[] = { "PropList.txt", "DerivedCoreProperties.txt", "emoji-data.txt", "DerivedNormalizationProps.txt", "" }; + const char *const scfilename = "Scripts.txt"; + const char *const scxfilename = "ScriptExtensions.txt"; + std::string licensetext; + rangeholder general_category_values; + rangeholder binary_properties; + rangeholder scripts; + rangeholder scriptextensions; + sortedrangeholder combined_properties; +// scriptnameholder ucs_to_scriptname; // codepoint->scriptname. + + if (errorno) + return errorno; + + try + { + licensetext = "// "; + licensetext += unidatafilename; + licensetext += "\n//\n"; + + read_unidata(general_category_values, binary_properties, unidatafilename, opts.indir); + set_additionalbinprops(binary_properties, general_category_values); // for ASCII, Any, Cn. + create_compositecategories(general_category_values); // This needs "Cn". + + read_binprops(binary_properties, licensetext, propdatafiles, opts.indir); + + read_scripts(scripts, /* ucs_to_scriptname, */ licensetext, scfilename, opts.indir); + + scriptextensions = scripts; + modify_for_scx(scriptextensions, /* ucs_to_scriptname, */ licensetext, scxfilename, opts.indir); + + combine_properties(combined_properties, general_category_values, "gc", updata::gc_values); + combine_properties(combined_properties, binary_properties, "bp", updata::binary_property_names); + combine_properties(combined_properties, scripts, "sc", updata::script_names); + combine_properties(combined_properties, scriptextensions, "scx", updata::script_names); + do_formatting(outdata, combined_properties, opts.version); + + licensetext.append(1, '\n'); + outdata.insert(0, licensetext); + } + catch (std::runtime_error &e) + { + std::printf("\nError: %s\n", e.what()); + errorno = 1; + } + return errorno; + } + +private: + + typedef srell::regex_internal::uchar32 uchar32; + typedef srell::regex_internal::range_pairs ucprange_array; + typedef srell::regex_internal::range_pair ucprange; + typedef srell::regex_internal::range_pair_helper ucprange_helper; + typedef std::map rangeholder; +// typedef srell::regex_internal::bitset<0x110000> ucsset; + typedef std::vector strings_type; + typedef std::map scriptnameholder; + typedef std::map name_mapper; + typedef name_mapper canonicalname_mapper; + static const uchar32 invalid_u32value = srell::regex_internal::constants::invalid_u32value; + static const uchar32 compositeclass = invalid_u32value; + + struct sorted_name_and_ranges + { + std::string ptype; + std::string canonicalname; + std::string namealiases; + ucprange_array ucpranges; + }; + typedef std::vector sortedrangeholder; + + void split(strings_type &parts, const std::string &data, const char splitter) + { + std::string::size_type readpos = 0; + + for (;;) + { + std::string::size_type lineend = data.find(splitter, readpos); + + if (lineend == std::string::npos) + { +// if (readpos == data.size()) +// break; + + parts.push_back(data.substr(readpos, data.size() - readpos)); + break; + } + + parts.push_back(data.substr(readpos, lineend - readpos)); + ++lineend; + readpos = lineend; + } + } + + std::string join(const char c, const strings_type &parts, const bool add_final_also = false) + { + std::string out; + + for (strings_type::size_type i = 0; i < parts.size(); ++i) + out.append(parts[i] + c); + + if (!add_final_also && out.size()) + out.resize(out.size() - 1); + + return out; + } + + void read_unidata(rangeholder &gc, rangeholder &bp, const char *const unidatafilename, const char *const indir) + { + const srell::regex re_dataline("^([0-9A-F]+);([^;]*);(([^;]*);(?:[^;]*;){6}([^;]*)(?:;[^;]*){5})$"); + const srell::regex re_rangefirst("^<(.*), First>$"); + + const std::string stringY("Y"); + const std::string stringN("N"); + uchar32 prevucp = invalid_u32value; + std::string data; + strings_type lines; + srell::cmatch cmatch; +// strings_type parts; + std::string rangename; + std::string rangefirstproperty; + uchar32 rangefirstcp = 0; + ucprange range; + ucprange_array bidi_mirrored_ranges; + + unishared::read_file(data, unidatafilename, indir); + split(lines, data, '\n'); + + for (strings_type::size_type i = 0; i < lines.size(); ++i) + { + const std::string &line = lines[i]; + const char *const lineend = line.c_str() + line.size(); + + if (srell::regex_match(line.c_str(), lineend, cmatch, re_dataline)) + { + const srell::cmatch::value_type &codepoint = cmatch[1]; + const srell::cmatch::value_type &name = cmatch[2]; + const std::string name_string(name.str()); + const std::string property(cmatch[3].str()); + + range.first = range.second = static_cast(std::strtol(codepoint.first, NULL, 16)); + + if (prevucp >= range.first && prevucp != invalid_u32value) + unishared::throw_error("out of order: %.4lX >= %.4lX", prevucp, range.first); + +// parts.clear(); +// split(parts, property, ';'); +// if (parts.size() != 13) +// unishared::throw_error("number of fields is not 13, but %u\n\t[%s]", parts.size(), line.c_str()); + +// const std::string &general_category = parts[0]; +// const std::string &bidi_mirrored = parts[7]; + const std::string general_category(cmatch[4].str()); + const std::string bidi_mirrored(cmatch[5].str()); + + prevucp = range.first; + + if (rangename.size()) + { + if (name_string.compare("<" + rangename + ", Last>") != 0) + unishared::throw_error("<%s, Last> does not follow its First line.\n\t%s follows insteadly.", rangename.c_str(), name_string.c_str()); + + if (property != rangefirstproperty) + { + unishared::throw_error("\"%s\": properties of First and Last are different.\n\tFirst: %s\n\tLast: %s", rangename.c_str(), rangefirstproperty.c_str(), property.c_str()); + } + + range.first = rangefirstcp; + rangename.clear(); + } + else if (srell::regex_match(name.first, name.second, cmatch, re_rangefirst)) + { + rangename = cmatch[1]; + rangefirstproperty = property; + rangefirstcp = range.first; + continue; + } + + // register "general_category" value. + gc[general_category].join(range); + + // register "bidi_mirrored" value. + if (bidi_mirrored == stringY) + { + bidi_mirrored_ranges.join(range); + } + else if (bidi_mirrored != stringN) + unishared::throw_error("unknown Bidi_Mirrored value [%s] in %s.", bidi_mirrored.c_str(), line.c_str()); + } + else if (line.size()) + unishared::throw_error("unknown format [%s]", line.c_str()); + } + bp["Bidi_Mirrored"] = bidi_mirrored_ranges; + } + + // binary properties created from UnicodeData.txt. + void set_additionalbinprops(rangeholder &bp, rangeholder &gc) + { + ucprange_array assigned_ranges; + + for (rangeholder::iterator it = gc.begin(); it != gc.end(); ++it) + assigned_ranges.merge(it->second); + + bp["Any"].join(ucprange_helper(0x0000, 0x10ffff)); + bp["ASCII"].join(ucprange_helper(0x0000, 0x007f)); + bp["Assigned"]; // Only creates. No data. + +// bp["Assigned"] = assigned_ranges; + assigned_ranges.negation(); + gc["Cn"] = assigned_ranges; + } + + void create_compositecategory(rangeholder &gc, const char *const newname, const char *const *categories) + { + ucprange_array array; + uchar32 total = 0; + + array.append_newpair(ucprange_helper(compositeclass, 0)); + + for (; **categories; ++categories) + { + const char *const c = *categories; + const uchar32 count = static_cast(gc[*categories].size()); + + array.append_newpair(ucprange_helper(c[0], c[1])); + array.append_newpair(ucprange_helper(count, 0)); + total += count; + } + array[0].second = total; + gc[newname] = array; + } + + void create_compositecategories(rangeholder &gc) + { + const char *const categoryLC[] = { "Ll", "Lt", "Lu", "" }; + const char *const categoryL[] = { "Ll", "Lt", "Lu", "Lm", "Lo", "" }; + const char *const categoryM[] = { "Mc", "Me", "Mn", "" }; + const char *const categoryN[] = { "Nd", "Nl", "No", "" }; + const char *const categoryC[] = { "Cc", "Cf", "Cn", "Co", "Cs", "" }; + const char *const categoryP[] = { "Pc", "Pd", "Pe", "Pf", "Pi", "Po", "Ps", "" }; + const char *const categoryZ[] = { "Zl", "Zp", "Zs", "" }; + const char *const categoryS[] = { "Sc", "Sk", "Sm", "So", "" }; + + create_compositecategory(gc, "LC", categoryLC); + create_compositecategory(gc, "L", categoryL); + create_compositecategory(gc, "M", categoryM); + create_compositecategory(gc, "N", categoryN); + create_compositecategory(gc, "C", categoryC); + create_compositecategory(gc, "P", categoryP); + create_compositecategory(gc, "Z", categoryZ); + create_compositecategory(gc, "S", categoryS); + } + + void read_files(std::string &out, const char *const *propdatafiles, const char separator, const char *const indir) + { + for (; **propdatafiles; ++propdatafiles) + { + std::string data; + unishared::read_file(data, *propdatafiles, indir); + out.append(data); + out.append(1, separator); + out.append(1, '\n'); + } + } + + void read_binprops(rangeholder &bp, std::string &licensetext, const char *const *propdatafiles, const char *const indir) + { + const srell::regex re_propfmt("^\\s*([0-9A-Fa-f]{4,})(?:\\.\\.([0-9A-Fa-f]{4,}))?\\s*;\\s*(\\S+)\\s*(#.*)?$"); + const char separator = '\0'; + bool licenseend_found = false; + ucprange range; + strings_type lines; + srell::cmatch cmatch; + + { + std::string alldata; + read_files(alldata, propdatafiles, separator, indir); + split(lines, alldata, '\n'); + } + + for (std::string::size_type i = 0; i < lines.size(); ++i) + { + const std::string &line = lines[i]; + const char *const lineend = line.c_str() + line.size(); + + if (!licenseend_found) + { + if (srell::regex_match(line.c_str(), lineend, cmatch, re_licenseend_)) + { + licensetext += "//\n"; + licenseend_found = true; + } + else if (srell::regex_match(line.c_str(), lineend, cmatch, re_licenseline_)) + { + licensetext += "// " + cmatch[1].str() + '\n'; + } + } + else if (line.size() == 1 && line[0] == separator) + { + licenseend_found = false; + } + else if (srell::regex_match(line.c_str(), lineend, cmatch, re_propfmt)) + { + const srell::cmatch::value_type &begin = cmatch[1]; + const srell::cmatch::value_type &end = cmatch[2]; + const srell::cmatch::value_type &property = cmatch[3]; +// const srell::cmatch::value_type &comment = cmatch[4]; + + range.first = static_cast(std::strtol(begin.first, NULL, 16)); + if (end.matched) + range.second = static_cast(std::strtol(end.first, NULL, 16)); + else + range.second = range.first; + + bp[property].join(range); + } + } + } + + void read_scripts(rangeholder &sc, /* scriptnameholder &ucs_to_scriptname, */ std::string &licensetext, const char *const filename, const char *const indir) + { + const srell::regex re_scriptdata("^\\s*([0-9A-Fa-f]{4,})(?:\\.\\.([0-9A-Fa-f]{4,}))?\\s*;\\s*(\\S+)\\s*(#.*)?$"); + bool licenseend_found = false; + ucprange range; + strings_type lines; + srell::cmatch cmatch; + + { + std::string data; + + unishared::read_file(data, filename, indir); + split(lines, data, '\n'); + } + + for (std::string::size_type i = 0; i < lines.size(); ++i) + { + const std::string &line = lines[i]; + const char *const lineend = line.c_str() + line.size(); + + if (!licenseend_found) + { + if (srell::regex_match(line.c_str(), lineend, cmatch, re_licenseend_)) + { + licensetext += "//\n"; + licenseend_found = true; + } + else if (srell::regex_match(line.c_str(), lineend, cmatch, re_licenseline_)) + { + licensetext += "// " + cmatch[1].str() + '\n'; + } + } + else if (srell::regex_match(line.c_str(), lineend, cmatch, re_scriptdata)) + { + const srell::cmatch::value_type &begin = cmatch[1]; + const srell::cmatch::value_type &end = cmatch[2]; + const srell::cmatch::value_type &scriptname = cmatch[3]; +// const srell::cmatch::value_type &comment = cmatch[4]; + + range.first = static_cast(std::strtol(begin.first, NULL, 16)); + if (end.matched) + range.second = static_cast(std::strtol(end.first, NULL, 16)); + else + range.second = range.first; + + sc[scriptname].join(range); + } + } + } + + canonicalname_mapper load_canonicalnames(const char *const *names) + { + canonicalname_mapper canonicalnames; + strings_type parts; + + for (; **names; ++names) + { + parts.clear(); + split(parts, *names, ':'); + const std::string canonicalname(parts[0]); + for (strings_type::size_type i = 0; i < parts.size(); ++i) + { + canonicalnames[parts[i]] = canonicalname; + } + } + return canonicalnames; + } + + void modify_for_scx(rangeholder &scx, /* scriptnameholder &ucs_to_scriptname, */ std::string &licensetext, const char *const filename, const char *const indir) + { + const srell::regex re_scxdata("^\\s*([0-9A-Fa-f]{4,})(?:\\.\\.([0-9A-Fa-f]{4,}))?\\s*;\\s*(\\S.*?\\S)\\s*(#.*)?$"); + const canonicalname_mapper canonicalnames(load_canonicalnames(updata::script_names)); + const std::string name_common("Common"); + const std::string name_inherited("Inherited"); + bool licenseend_found = false; + ucprange_array common = scx[name_common]; + ucprange_array inherited = scx[name_inherited]; + ucprange range; + strings_type lines; + srell::cmatch cmatch; + strings_type scxparts; + std::map warning_out; + + { + std::string data; + + unishared::read_file(data, filename, indir); + split(lines, data, '\n'); + } + + for (std::string::size_type i = 0; i < lines.size(); ++i) + { + const std::string &line = lines[i]; + const char *const lineend = line.c_str() + line.size(); + + if (!licenseend_found) + { + if (srell::regex_match(line.c_str(), lineend, cmatch, re_licenseend_)) + { + licensetext += "//\n"; + licenseend_found = true; + } + else if (srell::regex_match(line.c_str(), lineend, cmatch, re_licenseline_)) + { + licensetext += "// " + cmatch[1].str() + '\n'; + } + } + else if (srell::regex_match(line.c_str(), lineend, cmatch, re_scxdata)) + { + const srell::cmatch::value_type &begin = cmatch[1]; + const srell::cmatch::value_type &end = cmatch[2]; + const srell::cmatch::value_type &scxnames = cmatch[3]; +// const srell::cmatch::value_type &comment = cmatch[4]; + + range.first = static_cast(std::strtol(begin.first, NULL, 16)); + if (end.matched) + range.second = static_cast(std::strtol(end.first, NULL, 16)); + else + range.second = range.first; + + common.remove_range(range); + inherited.remove_range(range); + + { + scxparts.clear(); + split(scxparts, scxnames, ' '); + for (strings_type::size_type i = 0; i < scxparts.size(); ++i) + { + const std::string &scriptname = scxparts[i]; + + if (scriptname.size()) + { + const canonicalname_mapper::const_iterator it = canonicalnames.find(scriptname); + + if (it != canonicalnames.end()) + scx[it->second].join(range); + else + { +// unishared::throw_error("canonical name for \"%s\" is not found.", scriptname.c_str()); + if (!warning_out.count(scriptname)) + { + std::printf("[Info] canonical name for \"%s\" is not found. New script?\n", scriptname.c_str()); + warning_out[scriptname] = true; + } + } + } + } + } + } + } + scx[name_common] = common; + scx[name_inherited] = inherited; + } + + void combine_properties(sortedrangeholder &base, const rangeholder &addition, const char *const ptype, const char *const *aliasnames) + { + const canonicalname_mapper canonicalnames(load_canonicalnames(aliasnames)); + sorted_name_and_ranges elem; + strings_type names; + + for (; **aliasnames; ++aliasnames) + { + const std::string aliases(*aliasnames); + bool pdata_found = false; + + names.clear(); + split(names, aliases, ':'); + + const std::string canonicalname(names[0]); + + for (strings_type::size_type i = 0; i < names.size(); ++i) + { + const rangeholder::const_iterator it = addition.find(names[i]); + + if (it != addition.end()) + { + elem.ucpranges = it->second; + pdata_found = true; + break; + } + } + + if (!pdata_found) + unishared::throw_error("no property value for \"%s\" found.", aliases.c_str()); + + elem.ptype = ptype; + elem.canonicalname = canonicalname; + elem.namealiases = aliases; + base.push_back(elem); + } + } + + name_mapper create_ptype_mappings() + { + name_mapper categories; + + categories["gc"] = "general_category"; + categories["bp"] = "binary"; + categories["sc"] = "script"; + categories["scx"] = "script_extensions"; + return categories; + } + + std::string create_ptypes(const name_mapper &ptypes) + { + std::string ptypedef("\tstruct ptype\n\t{\n\t\tstatic const T2 unknown = 0;\n"); + const char *names[] = { "bp", "gc", "sc", "scx", "" }; + + for (unsigned int i = 0; *names[i];) + { + const name_mapper::const_iterator it = ptypes.find(names[i]); + + if (it == ptypes.end()) + unishared::throw_error("name for ptype \"%s\" is not found.", names[i]); + + ptypedef += "\t\tstatic const T2 " + it->second + " = " + unishared::stringify<16>(++i, "%u") + ";\n"; + } + + ptypedef += "\t};\n"; + return ptypedef; + } + + std::string ranges_to_string(const ucprange_array &array, const std::string &indent) + { + std::string rangestring(indent); + unsigned count = 0; + + for (ucprange_array::size_type i = 0; i < array.size(); ++i) + { + const ucprange &range = array[i]; + if (count == 4) + { + count = 0; + rangestring += '\n' + indent; + } + else if (count) + { + rangestring += ' '; + } + rangestring += "0x" + unishared::stringify<16>(range.first, "%.4lX") + ", 0x" + unishared::stringify<16>(range.second, "%.4lX") + ','; + ++count; + } + return rangestring; + } + + void drop_finalcomma(std::string &data) + { + std::string::size_type commapos = data.rfind(','); + if (commapos != std::string::npos) + data.erase(commapos, 1); + } + + std::string create_pnametable(const std::string &return_table, const int version, const std::string &template1, const std::string &template2, const std::string &indent) + { + std::string out(version == 100 ? "\tstatic const T3 *propertyname_table()\n\t{\n\t\tstatic const T3 table[] =\n\t\t{\n" : template1 + "const T3 " + template2 + "propertynametable[] =\n{\n"); + const char *const *pnames = updata::property_names; + + out.append(indent + "\"*\",\t// #0:unknown\n"); + out.append(indent + "\"*\",\t// #1:binary\n"); + + for (unsigned int i = 2; **pnames; ++pnames, ++i) + { + out.append(indent); + out.append(1, '"'); + out.append(*pnames); + out.append("\",\t// #" + unishared::stringify<16>(i, "%u") + '\n'); + } + out.append(indent + "\"\"\n"); + out.append(return_table); + + return out; + } + + std::string join_dropcomma_append(const strings_type &s, const std::string &return_table) + { + std::string tmp(join('\n', s, true)); + + drop_finalcomma(tmp); + tmp.append(return_table); + return tmp; + } + + void do_formatting(std::string &out, const sortedrangeholder &alldata, const int version) + { + typedef std::map registered_sequence; + const std::string template1("template \n"); + const std::string template2("unicode_property_data::"); + const std::string return_table(version == 100 ? "\t\t};\n\t\treturn table;\n\t}\n" : "};\n"); + const std::string indent(version == 100 ? "\t\t\t" : "\t"); + name_mapper ptype_mappings(create_ptype_mappings()); + const std::string ptypes(create_ptypes(ptype_mappings)); + const std::string pnames(create_pnametable(return_table, version, template1, template2, indent)); + std::string pnumbers("\tstatic const T1 unknown = 0;\n"); // property numbers. + strings_type rangetable; + strings_type lookup_ranges; + unsigned int property_id_number = 1; + unsigned int property_number = 1; + registered_sequence registered; + std::string lookup_numbers; + unsigned int offset = 0; + + out.append(template1 + "struct unicode_property_data\n{\n"); + if (version == 100) + { + rangetable.push_back(std::string("\tstatic const T4 *ranges()\n\t{\n\t\tstatic const T4 table[] =\n\t\t{")); + lookup_ranges.push_back(std::string("\tstatic const T6 *position_table()\n\t{\n\t\tstatic const T6 table[] =\n\t\t{\n\t\t\t{ 0, 0 },\t// #0 unknown")); + } + else + { + rangetable.push_back(template1 + "const T4 " + template2 + "rangetable[] =\n{"); + lookup_ranges.push_back(template1 + "const T6 " + template2 + "positiontable[] =\n{\n\t{ 0, 0 },\t// #0 unknown"); + } + + for (sortedrangeholder::size_type i = 0; i < alldata.size(); ++i) + { + const sorted_name_and_ranges &elem = alldata[i]; + const std::string ptype = elem.ptype; + const std::string name = elem.canonicalname; + const std::string aliases = elem.namealiases; + const ucprange_array &array = elem.ucpranges; + const std::string pnumber_keyname(ptype + '_' + name); + const std::string position_comment(' ' + ptype + '=' + aliases); + std::string rangestring(ranges_to_string(array, indent)); + unsigned int numofranges = static_cast(array.size()); + unsigned int pno = property_number; + const registered_sequence::const_iterator rit = registered.find(rangestring); + + if (rit != registered.end()) + { + pno = rit->second; + lookup_ranges[pno] += position_comment; + rangetable[pno * 2 - 1] += position_comment; + lookup_numbers.append(indent + "{ ptype::" + ptype_mappings[ptype] + ", \"" + aliases + "\", " + unishared::stringify<16>(pno, "%u") + " },\t// #" + unishared::stringify<16>(property_id_number, "%u") + "\n"); + } + else + { + // ucpranges of "Assigned" is empty. + const bool compositeclass_found = array.size() && array[0].first == compositeclass; + + if (compositeclass_found) + { + std::printf("[Info] composite property \"%s\" found.\n", aliases.c_str()); + numofranges = array[0].second; + rangestring = indent + "// "; + + for (ucprange_array::size_type i = 1; i < array.size(); ++i) + { + const ucprange &range = array[i]; + + if (i > 1) + rangestring += " + "; + rangestring += static_cast(range.first); + rangestring += static_cast(range.second); + rangestring += ':' + unishared::stringify<16>(array[++i].first, "%u"); + } + } + else + { + registered[rangestring] = property_number; + } + + lookup_numbers.append(indent + "{ ptype::" + ptype_mappings[ptype] + ", \"" + aliases + "\", " + unishared::stringify<16>(property_number, "%u") + " },\t// #" + unishared::stringify<16>(property_id_number, "%u") + "\n"); + lookup_ranges.push_back(indent + "{ " + unishared::stringify<16>(offset, "%u") + ", " + unishared::stringify<16>(numofranges, "%u") + " },\t// #" + unishared::stringify<16>(pno, "%u") + position_comment); + rangetable.push_back(indent + "// #" + unishared::stringify<16>(pno, "%u") + " (" + unishared::stringify<16>(offset, "%u") + '+' + unishared::stringify<16>(numofranges, "%u") + "):" + position_comment); + rangetable.push_back(rangestring); + + if (!compositeclass_found) + offset += numofranges; + + ++property_number; + } + pnumbers.append("\tstatic const T1 " + pnumber_keyname + " = " + unishared::stringify<16>(property_id_number, "%u") + ";\t// #" + unishared::stringify<16>(pno, "%u") + '\n'); + ++property_id_number; + } + + pnumbers.append("\tstatic const T1 last_property_number = " + unishared::stringify<16>(--property_number, "%u") + ";\n"); + + lookup_numbers.append(indent + "{ ptype::unknown, \"\", 0 }\n"); + lookup_numbers.append(return_table); + lookup_numbers.insert(0, version == 100 ? "\tstatic const T5 *rangenumber_table()\n\t{\n\t\tstatic const T5 table[] =\n\t\t{\n\t\t\t{ ptype::unknown, \"*\", 0 },\t// #0\n" : template1 + "const T5 " + template2 + "rangenumbertable[] =\n{\n\t{ ptype::unknown, \"*\", 0 },\t// #0\n"); + + out.append(pnumbers); + out.append(ptypes); + if (version == 100) + { + out.append(pnames); + out.append(join_dropcomma_append(rangetable, return_table)); + out.append(lookup_numbers); + out.append(join_dropcomma_append(lookup_ranges, return_table)); + out.append("};\n"); + } + else + { + out.append("\tstatic const T3 propertynametable[];\n"); + out.append("\tstatic const T4 rangetable[];\n"); + out.append("\tstatic const T5 rangenumbertable[];\n"); + out.append("\tstatic const T6 positiontable[];\n\n"); + + out.append("\tstatic const T3 *propertyname_table()\n\t{\n\t\treturn propertynametable;\n\t}\n"); + out.append("\tstatic const T4 *ranges()\n\t{\n\t\treturn rangetable;\n\t}\n"); + out.append("\tstatic const T5 *rangenumber_table()\n\t{\n\t\treturn rangenumbertable;\n\t}\n"); + out.append("\tstatic const T6 *position_table()\n\t{\n\t\treturn positiontable;\n\t}\n"); + out.append("};\n\n"); + out.append(pnames); + out.append("\n"); + out.append(join_dropcomma_append(rangetable, return_table)); + out.append("\n"); + out.append(lookup_numbers); + out.append("\n"); + out.append(join_dropcomma_append(lookup_ranges, return_table)); + } + if (version > 100) + out.append("#define SRELL_UPDATA_VERSION 110\n"); + } + + srell::regex re_licenseline_; + srell::regex re_licenseend_; +}; +// class unicode_property + +int main(const int argc, const char *const *const argv) +{ + up_options upopts(argc, argv); + std::string outdata; + unicode_property up; + int errorno = up.create_updata(outdata, upopts); + + if (errorno == 0) + { + if (!unishared::write_file(upopts.outfilename, outdata)) + errorno = 2; + } + return errorno; +}