source: icGREP/icgrep-devel/icgrep/UCD/PropertyAliases.h @ 4538

Last change on this file since 4538 was 4388, checked in by cameron, 5 years ago

Add derived core properties such as math, alpha; refine the property resolver

File size: 10.5 KB
Line 
1#ifndef PROPERTYALIASES_H
2#define PROPERTYALIASES_H
3/*
4 *  Copyright (c) 2015 International Characters, Inc.
5 *  This software is licensed to the public under the Open Software License 3.0.
6 *  icgrep is a trademark of International Characters, Inc.
7 *
8 *  This file is generated by UCD_properties.py - manual edits may be lost.
9 */
10
11#include <string>
12#include <vector>
13#include <unordered_map>
14
15namespace UCD {
16  enum property_t {
17cjkAccountingNumeric, cjkOtherNumeric, cjkPrimaryNumeric, nv, cf,
18    cjkCompatibilityVariant, dm, FC_NFKC, lc, NFKC_CF, scf, slc, stc, suc,
19    tc, uc, bmg, bpb, cjkIICore, cjkIRG_GSource, cjkIRG_HSource,
20    cjkIRG_JSource, cjkIRG_KPSource, cjkIRG_KSource, cjkIRG_MSource,
21    cjkIRG_TSource, cjkIRG_USource, cjkIRG_VSource, cjkRSUnicode, isc, JSN,
22    na, na1, Name_Alias, scx, age, blk, sc, bc, bpt, ccc, dt, ea, gc, GCB,
23    hst, InMC, InSC, jg, jt, lb, NFC_QC, NFD_QC, NFKC_QC, NFKD_QC, nt, SB,
24    WB, AHex, Alpha, Bidi_C, Bidi_M, Cased, CE, CI, Comp_Ex, CWCF, CWCM,
25    CWKCF, CWL, CWT, CWU, Dash, Dep, DI, Dia, Ext, Gr_Base, Gr_Ext, Gr_Link,
26    Hex, Hyphen, IDC, Ideo, IDS, IDSB, IDST, Join_C, LOE, Lower, Math,
27    NChar, OAlpha, ODI, OGr_Ext, OIDC, OIDS, OLower, OMath, OUpper, Pat_Syn,
28    Pat_WS, QMark, Radical, SD, STerm, Term, UIdeo, Upper, VS, WSpace, XIDC,
29    XIDS, XO_NFC, XO_NFD, XO_NFKC, XO_NFKD
30  };
31  const std::vector<std::string> property_enum_name = {
32"cjkAccountingNumeric", "cjkOtherNumeric", "cjkPrimaryNumeric", "nv",
33    "cf", "cjkCompatibilityVariant", "dm", "FC_NFKC", "lc", "NFKC_CF",
34    "scf", "slc", "stc", "suc", "tc", "uc", "bmg", "bpb", "cjkIICore",
35    "cjkIRG_GSource", "cjkIRG_HSource", "cjkIRG_JSource", "cjkIRG_KPSource",
36    "cjkIRG_KSource", "cjkIRG_MSource", "cjkIRG_TSource", "cjkIRG_USource",
37    "cjkIRG_VSource", "cjkRSUnicode", "isc", "JSN", "na", "na1",
38    "Name_Alias", "scx", "age", "blk", "sc", "bc", "bpt", "ccc", "dt", "ea",
39    "gc", "GCB", "hst", "InMC", "InSC", "jg", "jt", "lb", "NFC_QC",
40    "NFD_QC", "NFKC_QC", "NFKD_QC", "nt", "SB", "WB", "AHex", "Alpha",
41    "Bidi_C", "Bidi_M", "Cased", "CE", "CI", "Comp_Ex", "CWCF", "CWCM",
42    "CWKCF", "CWL", "CWT", "CWU", "Dash", "Dep", "DI", "Dia", "Ext",
43    "Gr_Base", "Gr_Ext", "Gr_Link", "Hex", "Hyphen", "IDC", "Ideo", "IDS",
44    "IDSB", "IDST", "Join_C", "LOE", "Lower", "Math", "NChar", "OAlpha",
45    "ODI", "OGr_Ext", "OIDC", "OIDS", "OLower", "OMath", "OUpper",
46    "Pat_Syn", "Pat_WS", "QMark", "Radical", "SD", "STerm", "Term", "UIdeo",
47    "Upper", "VS", "WSpace", "XIDC", "XIDS", "XO_NFC", "XO_NFD", "XO_NFKC",
48    "XO_NFKD"
49  };
50  const std::vector<std::string> property_full_name = {
51"kAccountingNumeric", "kOtherNumeric", "kPrimaryNumeric",
52    "Numeric_Value", "Case_Folding", "kCompatibilityVariant",
53    "Decomposition_Mapping", "FC_NFKC_Closure", "Lowercase_Mapping",
54    "NFKC_Casefold", "Simple_Case_Folding", "Simple_Lowercase_Mapping",
55    "Simple_Titlecase_Mapping", "Simple_Uppercase_Mapping",
56    "Titlecase_Mapping", "Uppercase_Mapping", "Bidi_Mirroring_Glyph",
57    "Bidi_Paired_Bracket", "kIICore", "kIRG_GSource", "kIRG_HSource",
58    "kIRG_JSource", "kIRG_KPSource", "kIRG_KSource", "kIRG_MSource",
59    "kIRG_TSource", "kIRG_USource", "kIRG_VSource", "kRSUnicode",
60    "ISO_Comment", "Jamo_Short_Name", "Name", "Unicode_1_Name",
61    "Name_Alias", "Script_Extensions", "Age", "Block", "Script",
62    "Bidi_Class", "Bidi_Paired_Bracket_Type", "Canonical_Combining_Class",
63    "Decomposition_Type", "East_Asian_Width", "General_Category",
64    "Grapheme_Cluster_Break", "Hangul_Syllable_Type",
65    "Indic_Matra_Category", "Indic_Syllabic_Category", "Joining_Group",
66    "Joining_Type", "Line_Break", "NFC_Quick_Check", "NFD_Quick_Check",
67    "NFKC_Quick_Check", "NFKD_Quick_Check", "Numeric_Type",
68    "Sentence_Break", "Word_Break", "ASCII_Hex_Digit", "Alphabetic",
69    "Bidi_Control", "Bidi_Mirrored", "Cased", "Composition_Exclusion",
70    "Case_Ignorable", "Full_Composition_Exclusion",
71    "Changes_When_Casefolded", "Changes_When_Casemapped",
72    "Changes_When_NFKC_Casefolded", "Changes_When_Lowercased",
73    "Changes_When_Titlecased", "Changes_When_Uppercased", "Dash",
74    "Deprecated", "Default_Ignorable_Code_Point", "Diacritic", "Extender",
75    "Grapheme_Base", "Grapheme_Extend", "Grapheme_Link", "Hex_Digit",
76    "Hyphen", "ID_Continue", "Ideographic", "ID_Start",
77    "IDS_Binary_Operator", "IDS_Trinary_Operator", "Join_Control",
78    "Logical_Order_Exception", "Lowercase", "Math",
79    "Noncharacter_Code_Point", "Other_Alphabetic",
80    "Other_Default_Ignorable_Code_Point", "Other_Grapheme_Extend",
81    "Other_ID_Continue", "Other_ID_Start", "Other_Lowercase", "Other_Math",
82    "Other_Uppercase", "Pattern_Syntax", "Pattern_White_Space",
83    "Quotation_Mark", "Radical", "Soft_Dotted", "STerm",
84    "Terminal_Punctuation", "Unified_Ideograph", "Uppercase",
85    "Variation_Selector", "White_Space", "XID_Continue", "XID_Start",
86    "Expands_On_NFC", "Expands_On_NFD", "Expands_On_NFKC",
87    "Expands_On_NFKD"
88  };
89  const std::unordered_map<std::string, property_t> alias_map = {
90{"age", age}, {"ahex", AHex}, {"alpha", Alpha}, {"alphabetic", Alpha},
91    {"asciihexdigit", AHex}, {"bc", bc}, {"bidic", Bidi_C},
92    {"bidiclass", bc}, {"bidicontrol", Bidi_C}, {"bidim", Bidi_M},
93    {"bidimirrored", Bidi_M}, {"bidimirroringglyph", bmg},
94    {"bidipairedbracket", bpb}, {"bidipairedbrackettype", bpt},
95    {"blk", blk}, {"block", blk}, {"bmg", bmg}, {"bpb", bpb}, {"bpt", bpt},
96    {"canonicalcombiningclass", ccc}, {"cased", Cased}, {"casefolding", cf},
97    {"caseignorable", CI}, {"ccc", ccc}, {"ce", CE}, {"cf", cf},
98    {"changeswhencasefolded", CWCF}, {"changeswhencasemapped", CWCM},
99    {"changeswhenlowercased", CWL}, {"changeswhennfkccasefolded", CWKCF},
100    {"changeswhentitlecased", CWT}, {"changeswhenuppercased", CWU},
101    {"ci", CI}, {"cjkaccountingnumeric", cjkAccountingNumeric},
102    {"cjkcompatibilityvariant", cjkCompatibilityVariant},
103    {"cjkiicore", cjkIICore}, {"cjkirggsource", cjkIRG_GSource},
104    {"cjkirghsource", cjkIRG_HSource}, {"cjkirgjsource", cjkIRG_JSource},
105    {"cjkirgkpsource", cjkIRG_KPSource}, {"cjkirgksource", cjkIRG_KSource},
106    {"cjkirgmsource", cjkIRG_MSource}, {"cjkirgtsource", cjkIRG_TSource},
107    {"cjkirgusource", cjkIRG_USource}, {"cjkirgvsource", cjkIRG_VSource},
108    {"cjkothernumeric", cjkOtherNumeric},
109    {"cjkprimarynumeric", cjkPrimaryNumeric},
110    {"cjkrsunicode", cjkRSUnicode}, {"compex", Comp_Ex},
111    {"compositionexclusion", CE}, {"cwcf", CWCF}, {"cwcm", CWCM},
112    {"cwkcf", CWKCF}, {"cwl", CWL}, {"cwt", CWT}, {"cwu", CWU},
113    {"dash", Dash}, {"decompositionmapping", dm}, {"decompositiontype", dt},
114    {"defaultignorablecodepoint", DI}, {"dep", Dep}, {"deprecated", Dep},
115    {"di", DI}, {"dia", Dia}, {"diacritic", Dia}, {"dm", dm}, {"dt", dt},
116    {"ea", ea}, {"eastasianwidth", ea}, {"expandsonnfc", XO_NFC},
117    {"expandsonnfd", XO_NFD}, {"expandsonnfkc", XO_NFKC},
118    {"expandsonnfkd", XO_NFKD}, {"ext", Ext}, {"extender", Ext},
119    {"fcnfkc", FC_NFKC}, {"fcnfkcclosure", FC_NFKC},
120    {"fullcompositionexclusion", Comp_Ex}, {"gc", gc}, {"gcb", GCB},
121    {"generalcategory", gc}, {"graphemebase", Gr_Base},
122    {"graphemeclusterbreak", GCB}, {"graphemeextend", Gr_Ext},
123    {"graphemelink", Gr_Link}, {"grbase", Gr_Base}, {"grext", Gr_Ext},
124    {"grlink", Gr_Link}, {"hangulsyllabletype", hst}, {"hex", Hex},
125    {"hexdigit", Hex}, {"hst", hst}, {"hyphen", Hyphen}, {"idc", IDC},
126    {"idcontinue", IDC}, {"ideo", Ideo}, {"ideographic", Ideo},
127    {"ids", IDS}, {"idsb", IDSB}, {"idsbinaryoperator", IDSB},
128    {"idst", IDST}, {"idstart", IDS}, {"idstrinaryoperator", IDST},
129    {"indicmatracategory", InMC}, {"indicsyllabiccategory", InSC},
130    {"inmc", InMC}, {"insc", InSC}, {"isc", isc}, {"isocomment", isc},
131    {"jamoshortname", JSN}, {"jg", jg}, {"joinc", Join_C},
132    {"joincontrol", Join_C}, {"joininggroup", jg}, {"joiningtype", jt},
133    {"jsn", JSN}, {"jt", jt}, {"kaccountingnumeric", cjkAccountingNumeric},
134    {"kcompatibilityvariant", cjkCompatibilityVariant},
135    {"kiicore", cjkIICore}, {"kirggsource", cjkIRG_GSource},
136    {"kirghsource", cjkIRG_HSource}, {"kirgjsource", cjkIRG_JSource},
137    {"kirgkpsource", cjkIRG_KPSource}, {"kirgksource", cjkIRG_KSource},
138    {"kirgmsource", cjkIRG_MSource}, {"kirgtsource", cjkIRG_TSource},
139    {"kirgusource", cjkIRG_USource}, {"kirgvsource", cjkIRG_VSource},
140    {"kothernumeric", cjkOtherNumeric},
141    {"kprimarynumeric", cjkPrimaryNumeric}, {"krsunicode", cjkRSUnicode},
142    {"lb", lb}, {"lc", lc}, {"linebreak", lb}, {"loe", LOE},
143    {"logicalorderexception", LOE}, {"lower", Lower}, {"lowercase", Lower},
144    {"lowercasemapping", lc}, {"math", Math}, {"na", na}, {"na1", na1},
145    {"name", na}, {"namealias", Name_Alias}, {"nchar", NChar},
146    {"nfcqc", NFC_QC}, {"nfcquickcheck", NFC_QC}, {"nfdqc", NFD_QC},
147    {"nfdquickcheck", NFD_QC}, {"nfkccasefold", NFKC_CF},
148    {"nfkccf", NFKC_CF}, {"nfkcqc", NFKC_QC}, {"nfkcquickcheck", NFKC_QC},
149    {"nfkdqc", NFKD_QC}, {"nfkdquickcheck", NFKD_QC},
150    {"noncharactercodepoint", NChar}, {"nt", nt}, {"numerictype", nt},
151    {"numericvalue", nv}, {"nv", nv}, {"oalpha", OAlpha}, {"odi", ODI},
152    {"ogrext", OGr_Ext}, {"oidc", OIDC}, {"oids", OIDS}, {"olower", OLower},
153    {"omath", OMath}, {"otheralphabetic", OAlpha},
154    {"otherdefaultignorablecodepoint", ODI},
155    {"othergraphemeextend", OGr_Ext}, {"otheridcontinue", OIDC},
156    {"otheridstart", OIDS}, {"otherlowercase", OLower},
157    {"othermath", OMath}, {"otheruppercase", OUpper}, {"oupper", OUpper},
158    {"patsyn", Pat_Syn}, {"patternsyntax", Pat_Syn},
159    {"patternwhitespace", Pat_WS}, {"patws", Pat_WS}, {"qmark", QMark},
160    {"quotationmark", QMark}, {"radical", Radical}, {"sb", SB}, {"sc", sc},
161    {"scf", scf}, {"script", sc}, {"scriptextensions", scx}, {"scx", scx},
162    {"sd", SD}, {"sentencebreak", SB}, {"sfc", scf},
163    {"simplecasefolding", scf}, {"simplelowercasemapping", slc},
164    {"simpletitlecasemapping", stc}, {"simpleuppercasemapping", suc},
165    {"slc", slc}, {"softdotted", SD}, {"space", WSpace}, {"stc", stc},
166    {"sterm", STerm}, {"suc", suc}, {"tc", tc}, {"term", Term},
167    {"terminalpunctuation", Term}, {"titlecasemapping", tc}, {"uc", uc},
168    {"uideo", UIdeo}, {"unicode1name", na1},
169    {"unicoderadicalstroke", cjkRSUnicode}, {"unifiedideograph", UIdeo},
170    {"upper", Upper}, {"uppercase", Upper}, {"uppercasemapping", uc},
171    {"urs", cjkRSUnicode}, {"variationselector", VS}, {"vs", VS},
172    {"wb", WB}, {"whitespace", WSpace}, {"wordbreak", WB},
173    {"wspace", WSpace}, {"xidc", XIDC}, {"xidcontinue", XIDC},
174    {"xids", XIDS}, {"xidstart", XIDS}, {"xonfc", XO_NFC},
175    {"xonfd", XO_NFD}, {"xonfkc", XO_NFKC}, {"xonfkd", XO_NFKD}
176  };
177}
178
179#endif
Note: See TracBrowser for help on using the repository browser.