oxedyne/fe2o3/fe2o3_text/src/unicode/tables/prop.rs
22.9 KiB, 2 runs
created by r1870400018:13918, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | // GENERATED FILE. DO NOT EDIT. |
| 2 | // |
| 3 | // The Unicode character property enums. |
| 4 | // |
| 5 | // Generated by fe2o3_text/src/bin/gen_unicode.rs from the Unicode Character Database, |
| 6 | // version 17.0.0, at https://www.unicode.org/Public/17.0.0/. |
| 7 | // Run `cargo run -p oxedyne_fe2o3_text --bin gen_unicode` to rebuild. |
| 8 | |
| 9 | |
| 10 | use crate::unicode::lookup::Partitioned; |
| 11 | |
| 12 | /// The Line_Break property of UAX #14, as the UCD gives it, before any tailoring. |
| 13 | #[repr(u8)] |
| 14 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
| 15 | pub enum LineBreakClass { |
| 16 | /// Unknown, treated as AL. |
| 17 | XX, |
| 18 | /// Ambiguous, treated as AL by default. |
| 19 | AI, |
| 20 | /// Aksara. |
| 21 | AK, |
| 22 | /// Alphabetic. |
| 23 | AL, |
| 24 | /// Aksara pre-base. |
| 25 | AP, |
| 26 | /// Aksara start. |
| 27 | AS, |
| 28 | /// Break opportunity before and after. |
| 29 | B2, |
| 30 | /// Break after. |
| 31 | BA, |
| 32 | /// Break before. |
| 33 | BB, |
| 34 | /// Mandatory break. |
| 35 | BK, |
| 36 | /// Contingent break opportunity. |
| 37 | CB, |
| 38 | /// Conditional Japanese starter, treated as NS by default. |
| 39 | CJ, |
| 40 | /// Close punctuation. |
| 41 | CL, |
| 42 | /// Combining mark. |
| 43 | CM, |
| 44 | /// Close parenthesis. |
| 45 | CP, |
| 46 | /// Carriage return. |
| 47 | CR, |
| 48 | /// Emoji base. |
| 49 | EB, |
| 50 | /// Emoji modifier. |
| 51 | EM, |
| 52 | /// Exclamation or interrogation. |
| 53 | EX, |
| 54 | /// Non-breaking glue. |
| 55 | GL, |
| 56 | /// Hangul LV syllable. |
| 57 | H2, |
| 58 | /// Hangul LVT syllable. |
| 59 | H3, |
| 60 | /// Unambiguous hyphen. |
| 61 | HH, |
| 62 | /// Hebrew letter. |
| 63 | HL, |
| 64 | /// Hyphen. |
| 65 | HY, |
| 66 | /// Ideographic. |
| 67 | ID, |
| 68 | /// Inseparable. |
| 69 | IN, |
| 70 | /// Infix numeric separator. |
| 71 | IS, |
| 72 | /// Hangul leading jamo. |
| 73 | JL, |
| 74 | /// Hangul trailing jamo. |
| 75 | JT, |
| 76 | /// Hangul vowel jamo. |
| 77 | JV, |
| 78 | /// Line feed. |
| 79 | LF, |
| 80 | /// Next line. |
| 81 | NL, |
| 82 | /// Nonstarter. |
| 83 | NS, |
| 84 | /// Numeric. |
| 85 | NU, |
| 86 | /// Open punctuation. |
| 87 | OP, |
| 88 | /// Postfix numeric. |
| 89 | PO, |
| 90 | /// Prefix numeric. |
| 91 | PR, |
| 92 | /// Quotation. |
| 93 | QU, |
| 94 | /// Regional indicator. |
| 95 | RI, |
| 96 | /// Complex context, South East Asian. |
| 97 | SA, |
| 98 | /// Surrogate, treated as AL. |
| 99 | SG, |
| 100 | /// Space. |
| 101 | SP, |
| 102 | /// Symbols allowing break after. |
| 103 | SY, |
| 104 | /// Virama final. |
| 105 | VF, |
| 106 | /// Virama. |
| 107 | VI, |
| 108 | /// Word joiner. |
| 109 | WJ, |
| 110 | /// Zero width space. |
| 111 | ZW, |
| 112 | /// Zero width joiner. |
| 113 | ZWJ, |
| 114 | } |
| 115 | |
| 116 | impl Partitioned for LineBreakClass { |
| 117 | |
| 118 | const DEFAULT: Self = Self::XX; |
| 119 | |
| 120 | fn table() -> (&'static [u32], &'static [Self]) { |
| 121 | (&super::lb::LB_STARTS, &super::lb::LB_VALS) |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | /// The Grapheme_Cluster_Break property of UAX #29. |
| 126 | #[repr(u8)] |
| 127 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
| 128 | pub enum GraphemeClass { |
| 129 | /// Any character not in another class. |
| 130 | Other, |
| 131 | /// Carriage return. |
| 132 | CR, |
| 133 | /// Line feed. |
| 134 | LF, |
| 135 | /// A control, format or line separator character. |
| 136 | Control, |
| 137 | /// A character that extends the preceding one. |
| 138 | Extend, |
| 139 | /// Zero width joiner. |
| 140 | ZWJ, |
| 141 | /// One half of a flag sequence. The UCD name is `Regional_Indicator`. |
| 142 | RegionalIndicator, |
| 143 | /// A character that prefixes the following one. |
| 144 | Prepend, |
| 145 | /// A spacing combining mark. |
| 146 | SpacingMark, |
| 147 | /// Hangul leading jamo. |
| 148 | L, |
| 149 | /// Hangul vowel jamo. |
| 150 | V, |
| 151 | /// Hangul trailing jamo. |
| 152 | T, |
| 153 | /// Hangul LV syllable. |
| 154 | LV, |
| 155 | /// Hangul LVT syllable. |
| 156 | LVT, |
| 157 | } |
| 158 | |
| 159 | impl Partitioned for GraphemeClass { |
| 160 | |
| 161 | const DEFAULT: Self = Self::Other; |
| 162 | |
| 163 | fn table() -> (&'static [u32], &'static [Self]) { |
| 164 | (&super::seg::GCB_STARTS, &super::seg::GCB_VALS) |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | /// The Word_Break property of UAX #29. |
| 169 | #[repr(u8)] |
| 170 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
| 171 | pub enum WordClass { |
| 172 | /// Any character not in another class. |
| 173 | Other, |
| 174 | /// Carriage return. |
| 175 | CR, |
| 176 | /// Line feed. |
| 177 | LF, |
| 178 | /// A newline character other than CR or LF. |
| 179 | Newline, |
| 180 | /// A character that extends the preceding one. |
| 181 | Extend, |
| 182 | /// A format character. |
| 183 | Format, |
| 184 | /// A katakana character. |
| 185 | Katakana, |
| 186 | /// A letter that takes part in words. |
| 187 | ALetter, |
| 188 | /// A character found inside a word, such as a colon. |
| 189 | MidLetter, |
| 190 | /// A character found inside a number, such as a comma. |
| 191 | MidNum, |
| 192 | /// A character found inside either a word or a number. |
| 193 | MidNumLet, |
| 194 | /// A decimal digit. |
| 195 | Numeric, |
| 196 | /// A character that joins words and numbers, such as an underscore. |
| 197 | ExtendNumLet, |
| 198 | /// One half of a flag sequence. The UCD name is `Regional_Indicator`. |
| 199 | RegionalIndicator, |
| 200 | /// A Hebrew letter. The UCD name is `Hebrew_Letter`. |
| 201 | HebrewLetter, |
| 202 | /// A double quotation mark. The UCD name is `Double_Quote`. |
| 203 | DoubleQuote, |
| 204 | /// A single quotation mark. The UCD name is `Single_Quote`. |
| 205 | SingleQuote, |
| 206 | /// Zero width joiner. |
| 207 | ZWJ, |
| 208 | /// A space that separates words. |
| 209 | WSegSpace, |
| 210 | } |
| 211 | |
| 212 | impl Partitioned for WordClass { |
| 213 | |
| 214 | const DEFAULT: Self = Self::Other; |
| 215 | |
| 216 | fn table() -> (&'static [u32], &'static [Self]) { |
| 217 | (&super::seg::WB_STARTS, &super::seg::WB_VALS) |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | /// The Bidi_Class property of UAX #9. |
| 222 | #[repr(u8)] |
| 223 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
| 224 | pub enum BidiClass { |
| 225 | /// Strong left to right. The UCD name is `Left_To_Right`. |
| 226 | L, |
| 227 | /// Strong right to left. The UCD name is `Right_To_Left`. |
| 228 | R, |
| 229 | /// Strong right to left Arabic. The UCD name is `Arabic_Letter`. |
| 230 | AL, |
| 231 | /// European number. The UCD name is `European_Number`. |
| 232 | EN, |
| 233 | /// European number separator. The UCD name is `European_Separator`. |
| 234 | ES, |
| 235 | /// European number terminator. The UCD name is `European_Terminator`. |
| 236 | ET, |
| 237 | /// Arabic number. The UCD name is `Arabic_Number`. |
| 238 | AN, |
| 239 | /// Common number separator. The UCD name is `Common_Separator`. |
| 240 | CS, |
| 241 | /// Nonspacing mark. The UCD name is `Nonspacing_Mark`. |
| 242 | NSM, |
| 243 | /// Boundary neutral. The UCD name is `Boundary_Neutral`. |
| 244 | BN, |
| 245 | /// Paragraph separator. The UCD name is `Paragraph_Separator`. |
| 246 | B, |
| 247 | /// Segment separator. The UCD name is `Segment_Separator`. |
| 248 | S, |
| 249 | /// Whitespace. The UCD name is `White_Space`. |
| 250 | WS, |
| 251 | /// Other neutral. The UCD name is `Other_Neutral`. |
| 252 | ON, |
| 253 | /// Left to right embedding. The UCD name is `Left_To_Right_Embedding`. |
| 254 | LRE, |
| 255 | /// Left to right override. The UCD name is `Left_To_Right_Override`. |
| 256 | LRO, |
| 257 | /// Right to left embedding. The UCD name is `Right_To_Left_Embedding`. |
| 258 | RLE, |
| 259 | /// Right to left override. The UCD name is `Right_To_Left_Override`. |
| 260 | RLO, |
| 261 | /// Pop directional format. The UCD name is `Pop_Directional_Format`. |
| 262 | PDF, |
| 263 | /// Left to right isolate. The UCD name is `Left_To_Right_Isolate`. |
| 264 | LRI, |
| 265 | /// Right to left isolate. The UCD name is `Right_To_Left_Isolate`. |
| 266 | RLI, |
| 267 | /// First strong isolate. The UCD name is `First_Strong_Isolate`. |
| 268 | FSI, |
| 269 | /// Pop directional isolate. The UCD name is `Pop_Directional_Isolate`. |
| 270 | PDI, |
| 271 | } |
| 272 | |
| 273 | impl Partitioned for BidiClass { |
| 274 | |
| 275 | const DEFAULT: Self = Self::L; |
| 276 | |
| 277 | fn table() -> (&'static [u32], &'static [Self]) { |
| 278 | (&super::bidi::BIDI_STARTS, &super::bidi::BIDI_VALS) |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | /// The Indic_Conjunct_Break property of UAX #44, which grapheme rule GB9c consults. |
| 283 | #[repr(u8)] |
| 284 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
| 285 | pub enum ConjunctBreak { |
| 286 | /// Not part of a conjunct. |
| 287 | None, |
| 288 | /// A consonant that can begin or end a conjunct. |
| 289 | Consonant, |
| 290 | /// A mark that does not interrupt a conjunct. |
| 291 | Extend, |
| 292 | /// A virama that joins two consonants. |
| 293 | Linker, |
| 294 | } |
| 295 | |
| 296 | /// The Bidi_Paired_Bracket_Type property of UAX #9. |
| 297 | #[repr(u8)] |
| 298 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
| 299 | pub enum BracketKind { |
| 300 | /// Not a paired bracket. |
| 301 | None, |
| 302 | /// An opening bracket. |
| 303 | Open, |
| 304 | /// A closing bracket. |
| 305 | Close, |
| 306 | } |
| 307 | |
| 308 | /// The General_Category property of UAX #44, by its two letter abbreviation. |
| 309 | #[repr(u8)] |
| 310 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
| 311 | pub enum GeneralCategory { |
| 312 | Lu, |
| 313 | Ll, |
| 314 | Lt, |
| 315 | Lm, |
| 316 | Lo, |
| 317 | Mn, |
| 318 | Mc, |
| 319 | Me, |
| 320 | Nd, |
| 321 | Nl, |
| 322 | No, |
| 323 | Pc, |
| 324 | Pd, |
| 325 | Ps, |
| 326 | Pe, |
| 327 | Pi, |
| 328 | Pf, |
| 329 | Po, |
| 330 | Sm, |
| 331 | Sc, |
| 332 | Sk, |
| 333 | So, |
| 334 | Zs, |
| 335 | Zl, |
| 336 | Zp, |
| 337 | Cc, |
| 338 | Cf, |
| 339 | Cs, |
| 340 | Co, |
| 341 | Cn, |
| 342 | } |
| 343 | |
| 344 | impl Partitioned for GeneralCategory { |
| 345 | |
| 346 | const DEFAULT: Self = Self::Cn; |
| 347 | |
| 348 | fn table() -> (&'static [u32], &'static [Self]) { |
| 349 | (&super::cat::GC_STARTS, &super::cat::GC_VALS) |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | impl GeneralCategory { |
| 354 | |
| 355 | /// The long UCD name, `Uppercase_Letter` for `Lu`. |
| 356 | pub fn name(self) -> &'static str { |
| 357 | match self { |
| 358 | Self::Lu => "Uppercase_Letter", |
| 359 | Self::Ll => "Lowercase_Letter", |
| 360 | Self::Lt => "Titlecase_Letter", |
| 361 | Self::Lm => "Modifier_Letter", |
| 362 | Self::Lo => "Other_Letter", |
| 363 | Self::Mn => "Nonspacing_Mark", |
| 364 | Self::Mc => "Spacing_Mark", |
| 365 | Self::Me => "Enclosing_Mark", |
| 366 | Self::Nd => "Decimal_Number", |
| 367 | Self::Nl => "Letter_Number", |
| 368 | Self::No => "Other_Number", |
| 369 | Self::Pc => "Connector_Punctuation", |
| 370 | Self::Pd => "Dash_Punctuation", |
| 371 | Self::Ps => "Open_Punctuation", |
| 372 | Self::Pe => "Close_Punctuation", |
| 373 | Self::Pi => "Initial_Punctuation", |
| 374 | Self::Pf => "Final_Punctuation", |
| 375 | Self::Po => "Other_Punctuation", |
| 376 | Self::Sm => "Math_Symbol", |
| 377 | Self::Sc => "Currency_Symbol", |
| 378 | Self::Sk => "Modifier_Symbol", |
| 379 | Self::So => "Other_Symbol", |
| 380 | Self::Zs => "Space_Separator", |
| 381 | Self::Zl => "Line_Separator", |
| 382 | Self::Zp => "Paragraph_Separator", |
| 383 | Self::Cc => "Control", |
| 384 | Self::Cf => "Format", |
| 385 | Self::Cs => "Surrogate", |
| 386 | Self::Co => "Private_Use", |
| 387 | Self::Cn => "Unassigned", |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | /// The two letter abbreviation. |
| 392 | pub fn abbr(self) -> &'static str { |
| 393 | match self { |
| 394 | Self::Lu => "Lu", |
| 395 | Self::Ll => "Ll", |
| 396 | Self::Lt => "Lt", |
| 397 | Self::Lm => "Lm", |
| 398 | Self::Lo => "Lo", |
| 399 | Self::Mn => "Mn", |
| 400 | Self::Mc => "Mc", |
| 401 | Self::Me => "Me", |
| 402 | Self::Nd => "Nd", |
| 403 | Self::Nl => "Nl", |
| 404 | Self::No => "No", |
| 405 | Self::Pc => "Pc", |
| 406 | Self::Pd => "Pd", |
| 407 | Self::Ps => "Ps", |
| 408 | Self::Pe => "Pe", |
| 409 | Self::Pi => "Pi", |
| 410 | Self::Pf => "Pf", |
| 411 | Self::Po => "Po", |
| 412 | Self::Sm => "Sm", |
| 413 | Self::Sc => "Sc", |
| 414 | Self::Sk => "Sk", |
| 415 | Self::So => "So", |
| 416 | Self::Zs => "Zs", |
| 417 | Self::Zl => "Zl", |
| 418 | Self::Zp => "Zp", |
| 419 | Self::Cc => "Cc", |
| 420 | Self::Cf => "Cf", |
| 421 | Self::Cs => "Cs", |
| 422 | Self::Co => "Co", |
| 423 | Self::Cn => "Cn", |
| 424 | } |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | /// The Script property of UAX #24. A character's Script_Extensions, the wider set of scripts it |
| 429 | /// is used with, are in `unicode::property`. |
| 430 | #[repr(u8)] |
| 431 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
| 432 | pub enum Script { |
| 433 | Adlam, |
| 434 | CaucasianAlbanian, |
| 435 | Ahom, |
| 436 | Arabic, |
| 437 | ImperialAramaic, |
| 438 | Armenian, |
| 439 | Avestan, |
| 440 | Balinese, |
| 441 | Bamum, |
| 442 | BassaVah, |
| 443 | Batak, |
| 444 | Bengali, |
| 445 | BeriaErfe, |
| 446 | Bhaiksuki, |
| 447 | Bopomofo, |
| 448 | Brahmi, |
| 449 | Braille, |
| 450 | Buginese, |
| 451 | Buhid, |
| 452 | Chakma, |
| 453 | CanadianAboriginal, |
| 454 | Carian, |
| 455 | Cham, |
| 456 | Cherokee, |
| 457 | Chorasmian, |
| 458 | Coptic, |
| 459 | CyproMinoan, |
| 460 | Cypriot, |
| 461 | Cyrillic, |
| 462 | Devanagari, |
| 463 | DivesAkuru, |
| 464 | Dogra, |
| 465 | Deseret, |
| 466 | Duployan, |
| 467 | EgyptianHieroglyphs, |
| 468 | Elbasan, |
| 469 | Elymaic, |
| 470 | Ethiopic, |
| 471 | Garay, |
| 472 | Georgian, |
| 473 | Glagolitic, |
| 474 | GunjalaGondi, |
| 475 | MasaramGondi, |
| 476 | Gothic, |
| 477 | Grantha, |
| 478 | Greek, |
| 479 | Gujarati, |
| 480 | GurungKhema, |
| 481 | Gurmukhi, |
| 482 | Hangul, |
| 483 | Han, |
| 484 | Hanunoo, |
| 485 | Hatran, |
| 486 | Hebrew, |
| 487 | Hiragana, |
| 488 | AnatolianHieroglyphs, |
| 489 | PahawhHmong, |
| 490 | NyiakengPuachueHmong, |
| 491 | KatakanaOrHiragana, |
| 492 | OldHungarian, |
| 493 | OldItalic, |
| 494 | Javanese, |
| 495 | KayahLi, |
| 496 | Katakana, |
| 497 | Kawi, |
| 498 | Kharoshthi, |
| 499 | Khmer, |
| 500 | Khojki, |
| 501 | KhitanSmallScript, |
| 502 | Kannada, |
| 503 | KiratRai, |
| 504 | Kaithi, |
| 505 | TaiTham, |
| 506 | Lao, |
| 507 | Latin, |
| 508 | Lepcha, |
| 509 | Limbu, |
| 510 | LinearA, |
| 511 | LinearB, |
| 512 | Lisu, |
| 513 | Lycian, |
| 514 | Lydian, |
| 515 | Mahajani, |
| 516 | Makasar, |
| 517 | Mandaic, |
| 518 | Manichaean, |
| 519 | Marchen, |
| 520 | Medefaidrin, |
| 521 | MendeKikakui, |
| 522 | MeroiticCursive, |
| 523 | MeroiticHieroglyphs, |
| 524 | Malayalam, |
| 525 | Modi, |
| 526 | Mongolian, |
| 527 | Mro, |
| 528 | MeeteiMayek, |
| 529 | Multani, |
| 530 | Myanmar, |
| 531 | NagMundari, |
| 532 | Nandinagari, |
| 533 | OldNorthArabian, |
| 534 | Nabataean, |
| 535 | Newa, |
| 536 | Nko, |
| 537 | Nushu, |
| 538 | Ogham, |
| 539 | OlChiki, |
| 540 | OlOnal, |
| 541 | OldTurkic, |
| 542 | Oriya, |
| 543 | Osage, |
| 544 | Osmanya, |
| 545 | OldUyghur, |
| 546 | Palmyrene, |
| 547 | PauCinHau, |
| 548 | OldPermic, |
| 549 | PhagsPa, |
| 550 | InscriptionalPahlavi, |
| 551 | PsalterPahlavi, |
| 552 | Phoenician, |
| 553 | Miao, |
| 554 | InscriptionalParthian, |
| 555 | Rejang, |
| 556 | HanifiRohingya, |
| 557 | Runic, |
| 558 | Samaritan, |
| 559 | OldSouthArabian, |
| 560 | Saurashtra, |
| 561 | SignWriting, |
| 562 | Shavian, |
| 563 | Sharada, |
| 564 | Siddham, |
| 565 | Sidetic, |
| 566 | Khudawadi, |
| 567 | Sinhala, |
| 568 | Sogdian, |
| 569 | OldSogdian, |
| 570 | SoraSompeng, |
| 571 | Soyombo, |
| 572 | Sundanese, |
| 573 | Sunuwar, |
| 574 | SylotiNagri, |
| 575 | Syriac, |
| 576 | Tagbanwa, |
| 577 | Takri, |
| 578 | TaiLe, |
| 579 | NewTaiLue, |
| 580 | Tamil, |
| 581 | Tangut, |
| 582 | TaiViet, |
| 583 | TaiYo, |
| 584 | Telugu, |
| 585 | Tifinagh, |
| 586 | Tagalog, |
| 587 | Thaana, |
| 588 | Thai, |
| 589 | Tibetan, |
| 590 | Tirhuta, |
| 591 | Tangsa, |
| 592 | Todhri, |
| 593 | TolongSiki, |
| 594 | Toto, |
| 595 | TuluTigalari, |
| 596 | Ugaritic, |
| 597 | Vai, |
| 598 | Vithkuqi, |
| 599 | WarangCiti, |
| 600 | Wancho, |
| 601 | OldPersian, |
| 602 | Cuneiform, |
| 603 | Yezidi, |
| 604 | Yi, |
| 605 | ZanabazarSquare, |
| 606 | Inherited, |
| 607 | Common, |
| 608 | Unknown, |
| 609 | } |
| 610 | |
| 611 | impl Partitioned for Script { |
| 612 | |
| 613 | const DEFAULT: Self = Self::Unknown; |
| 614 | |
| 615 | fn table() -> (&'static [u32], &'static [Self]) { |
| 616 | (&super::cat::SC_STARTS, &super::cat::SC_VALS) |
| 617 | } |
| 618 | } |
| 619 | |
| 620 | impl Script { |
| 621 | |
| 622 | /// The long UCD name, `Old_Italic` for instance. |
| 623 | pub fn name(self) -> &'static str { |
| 624 | match self { |
| 625 | Self::Adlam => "Adlam", |
| 626 | Self::CaucasianAlbanian => "Caucasian_Albanian", |
| 627 | Self::Ahom => "Ahom", |
| 628 | Self::Arabic => "Arabic", |
| 629 | Self::ImperialAramaic => "Imperial_Aramaic", |
| 630 | Self::Armenian => "Armenian", |
| 631 | Self::Avestan => "Avestan", |
| 632 | Self::Balinese => "Balinese", |
| 633 | Self::Bamum => "Bamum", |
| 634 | Self::BassaVah => "Bassa_Vah", |
| 635 | Self::Batak => "Batak", |
| 636 | Self::Bengali => "Bengali", |
| 637 | Self::BeriaErfe => "Beria_Erfe", |
| 638 | Self::Bhaiksuki => "Bhaiksuki", |
| 639 | Self::Bopomofo => "Bopomofo", |
| 640 | Self::Brahmi => "Brahmi", |
| 641 | Self::Braille => "Braille", |
| 642 | Self::Buginese => "Buginese", |
| 643 | Self::Buhid => "Buhid", |
| 644 | Self::Chakma => "Chakma", |
| 645 | Self::CanadianAboriginal => "Canadian_Aboriginal", |
| 646 | Self::Carian => "Carian", |
| 647 | Self::Cham => "Cham", |
| 648 | Self::Cherokee => "Cherokee", |
| 649 | Self::Chorasmian => "Chorasmian", |
| 650 | Self::Coptic => "Coptic", |
| 651 | Self::CyproMinoan => "Cypro_Minoan", |
| 652 | Self::Cypriot => "Cypriot", |
| 653 | Self::Cyrillic => "Cyrillic", |
| 654 | Self::Devanagari => "Devanagari", |
| 655 | Self::DivesAkuru => "Dives_Akuru", |
| 656 | Self::Dogra => "Dogra", |
| 657 | Self::Deseret => "Deseret", |
| 658 | Self::Duployan => "Duployan", |
| 659 | Self::EgyptianHieroglyphs => "Egyptian_Hieroglyphs", |
| 660 | Self::Elbasan => "Elbasan", |
| 661 | Self::Elymaic => "Elymaic", |
| 662 | Self::Ethiopic => "Ethiopic", |
| 663 | Self::Garay => "Garay", |
| 664 | Self::Georgian => "Georgian", |
| 665 | Self::Glagolitic => "Glagolitic", |
| 666 | Self::GunjalaGondi => "Gunjala_Gondi", |
| 667 | Self::MasaramGondi => "Masaram_Gondi", |
| 668 | Self::Gothic => "Gothic", |
| 669 | Self::Grantha => "Grantha", |
| 670 | Self::Greek => "Greek", |
| 671 | Self::Gujarati => "Gujarati", |
| 672 | Self::GurungKhema => "Gurung_Khema", |
| 673 | Self::Gurmukhi => "Gurmukhi", |
| 674 | Self::Hangul => "Hangul", |
| 675 | Self::Han => "Han", |
| 676 | Self::Hanunoo => "Hanunoo", |
| 677 | Self::Hatran => "Hatran", |
| 678 | Self::Hebrew => "Hebrew", |
| 679 | Self::Hiragana => "Hiragana", |
| 680 | Self::AnatolianHieroglyphs => "Anatolian_Hieroglyphs", |
| 681 | Self::PahawhHmong => "Pahawh_Hmong", |
| 682 | Self::NyiakengPuachueHmong => "Nyiakeng_Puachue_Hmong", |
| 683 | Self::KatakanaOrHiragana => "Katakana_Or_Hiragana", |
| 684 | Self::OldHungarian => "Old_Hungarian", |
| 685 | Self::OldItalic => "Old_Italic", |
| 686 | Self::Javanese => "Javanese", |
| 687 | Self::KayahLi => "Kayah_Li", |
| 688 | Self::Katakana => "Katakana", |
| 689 | Self::Kawi => "Kawi", |
| 690 | Self::Kharoshthi => "Kharoshthi", |
| 691 | Self::Khmer => "Khmer", |
| 692 | Self::Khojki => "Khojki", |
| 693 | Self::KhitanSmallScript => "Khitan_Small_Script", |
| 694 | Self::Kannada => "Kannada", |
| 695 | Self::KiratRai => "Kirat_Rai", |
| 696 | Self::Kaithi => "Kaithi", |
| 697 | Self::TaiTham => "Tai_Tham", |
| 698 | Self::Lao => "Lao", |
| 699 | Self::Latin => "Latin", |
| 700 | Self::Lepcha => "Lepcha", |
| 701 | Self::Limbu => "Limbu", |
| 702 | Self::LinearA => "Linear_A", |
| 703 | Self::LinearB => "Linear_B", |
| 704 | Self::Lisu => "Lisu", |
| 705 | Self::Lycian => "Lycian", |
| 706 | Self::Lydian => "Lydian", |
| 707 | Self::Mahajani => "Mahajani", |
| 708 | Self::Makasar => "Makasar", |
| 709 | Self::Mandaic => "Mandaic", |
| 710 | Self::Manichaean => "Manichaean", |
| 711 | Self::Marchen => "Marchen", |
| 712 | Self::Medefaidrin => "Medefaidrin", |
| 713 | Self::MendeKikakui => "Mende_Kikakui", |
| 714 | Self::MeroiticCursive => "Meroitic_Cursive", |
| 715 | Self::MeroiticHieroglyphs => "Meroitic_Hieroglyphs", |
| 716 | Self::Malayalam => "Malayalam", |
| 717 | Self::Modi => "Modi", |
| 718 | Self::Mongolian => "Mongolian", |
| 719 | Self::Mro => "Mro", |
| 720 | Self::MeeteiMayek => "Meetei_Mayek", |
| 721 | Self::Multani => "Multani", |
| 722 | Self::Myanmar => "Myanmar", |
| 723 | Self::NagMundari => "Nag_Mundari", |
| 724 | Self::Nandinagari => "Nandinagari", |
| 725 | Self::OldNorthArabian => "Old_North_Arabian", |
| 726 | Self::Nabataean => "Nabataean", |
| 727 | Self::Newa => "Newa", |
| 728 | Self::Nko => "Nko", |
| 729 | Self::Nushu => "Nushu", |
| 730 | Self::Ogham => "Ogham", |
| 731 | Self::OlChiki => "Ol_Chiki", |
| 732 | Self::OlOnal => "Ol_Onal", |
| 733 | Self::OldTurkic => "Old_Turkic", |
| 734 | Self::Oriya => "Oriya", |
| 735 | Self::Osage => "Osage", |
| 736 | Self::Osmanya => "Osmanya", |
| 737 | Self::OldUyghur => "Old_Uyghur", |
| 738 | Self::Palmyrene => "Palmyrene", |
| 739 | Self::PauCinHau => "Pau_Cin_Hau", |
| 740 | Self::OldPermic => "Old_Permic", |
| 741 | Self::PhagsPa => "Phags_Pa", |
| 742 | Self::InscriptionalPahlavi => "Inscriptional_Pahlavi", |
| 743 | Self::PsalterPahlavi => "Psalter_Pahlavi", |
| 744 | Self::Phoenician => "Phoenician", |
| 745 | Self::Miao => "Miao", |
| 746 | Self::InscriptionalParthian => "Inscriptional_Parthian", |
| 747 | Self::Rejang => "Rejang", |
| 748 | Self::HanifiRohingya => "Hanifi_Rohingya", |
| 749 | Self::Runic => "Runic", |
| 750 | Self::Samaritan => "Samaritan", |
| 751 | Self::OldSouthArabian => "Old_South_Arabian", |
| 752 | Self::Saurashtra => "Saurashtra", |
| 753 | Self::SignWriting => "SignWriting", |
| 754 | Self::Shavian => "Shavian", |
| 755 | Self::Sharada => "Sharada", |
| 756 | Self::Siddham => "Siddham", |
| 757 | Self::Sidetic => "Sidetic", |
| 758 | Self::Khudawadi => "Khudawadi", |
| 759 | Self::Sinhala => "Sinhala", |
| 760 | Self::Sogdian => "Sogdian", |
| 761 | Self::OldSogdian => "Old_Sogdian", |
| 762 | Self::SoraSompeng => "Sora_Sompeng", |
| 763 | Self::Soyombo => "Soyombo", |
| 764 | Self::Sundanese => "Sundanese", |
| 765 | Self::Sunuwar => "Sunuwar", |
| 766 | Self::SylotiNagri => "Syloti_Nagri", |
| 767 | Self::Syriac => "Syriac", |
| 768 | Self::Tagbanwa => "Tagbanwa", |
| 769 | Self::Takri => "Takri", |
| 770 | Self::TaiLe => "Tai_Le", |
| 771 | Self::NewTaiLue => "New_Tai_Lue", |
| 772 | Self::Tamil => "Tamil", |
| 773 | Self::Tangut => "Tangut", |
| 774 | Self::TaiViet => "Tai_Viet", |
| 775 | Self::TaiYo => "Tai_Yo", |
| 776 | Self::Telugu => "Telugu", |
| 777 | Self::Tifinagh => "Tifinagh", |
| 778 | Self::Tagalog => "Tagalog", |
| 779 | Self::Thaana => "Thaana", |
| 780 | Self::Thai => "Thai", |
| 781 | Self::Tibetan => "Tibetan", |
| 782 | Self::Tirhuta => "Tirhuta", |
| 783 | Self::Tangsa => "Tangsa", |
| 784 | Self::Todhri => "Todhri", |
| 785 | Self::TolongSiki => "Tolong_Siki", |
| 786 | Self::Toto => "Toto", |
| 787 | Self::TuluTigalari => "Tulu_Tigalari", |
| 788 | Self::Ugaritic => "Ugaritic", |
| 789 | Self::Vai => "Vai", |
| 790 | Self::Vithkuqi => "Vithkuqi", |
| 791 | Self::WarangCiti => "Warang_Citi", |
| 792 | Self::Wancho => "Wancho", |
| 793 | Self::OldPersian => "Old_Persian", |
| 794 | Self::Cuneiform => "Cuneiform", |
| 795 | Self::Yezidi => "Yezidi", |
| 796 | Self::Yi => "Yi", |
| 797 | Self::ZanabazarSquare => "Zanabazar_Square", |
| 798 | Self::Inherited => "Inherited", |
| 799 | Self::Common => "Common", |
| 800 | Self::Unknown => "Unknown", |
| 801 | } |
| 802 | } |
| 803 | |
| 804 | /// The four letter ISO 15924 code, `Ital` for Old_Italic. |
| 805 | pub fn code(self) -> &'static str { |
| 806 | match self { |
| 807 | Self::Adlam => "Adlm", |
| 808 | Self::CaucasianAlbanian => "Aghb", |
| 809 | Self::Ahom => "Ahom", |
| 810 | Self::Arabic => "Arab", |
| 811 | Self::ImperialAramaic => "Armi", |
| 812 | Self::Armenian => "Armn", |
| 813 | Self::Avestan => "Avst", |
| 814 | Self::Balinese => "Bali", |
| 815 | Self::Bamum => "Bamu", |
| 816 | Self::BassaVah => "Bass", |
| 817 | Self::Batak => "Batk", |
| 818 | Self::Bengali => "Beng", |
| 819 | Self::BeriaErfe => "Berf", |
| 820 | Self::Bhaiksuki => "Bhks", |
| 821 | Self::Bopomofo => "Bopo", |
| 822 | Self::Brahmi => "Brah", |
| 823 | Self::Braille => "Brai", |
| 824 | Self::Buginese => "Bugi", |
| 825 | Self::Buhid => "Buhd", |
| 826 | Self::Chakma => "Cakm", |
| 827 | Self::CanadianAboriginal => "Cans", |
| 828 | Self::Carian => "Cari", |
| 829 | Self::Cham => "Cham", |
| 830 | Self::Cherokee => "Cher", |
| 831 | Self::Chorasmian => "Chrs", |
| 832 | Self::Coptic => "Copt", |
| 833 | Self::CyproMinoan => "Cpmn", |
| 834 | Self::Cypriot => "Cprt", |
| 835 | Self::Cyrillic => "Cyrl", |
| 836 | Self::Devanagari => "Deva", |
| 837 | Self::DivesAkuru => "Diak", |
| 838 | Self::Dogra => "Dogr", |
| 839 | Self::Deseret => "Dsrt", |
| 840 | Self::Duployan => "Dupl", |
| 841 | Self::EgyptianHieroglyphs => "Egyp", |
| 842 | Self::Elbasan => "Elba", |
| 843 | Self::Elymaic => "Elym", |
| 844 | Self::Ethiopic => "Ethi", |
| 845 | Self::Garay => "Gara", |
| 846 | Self::Georgian => "Geor", |
| 847 | Self::Glagolitic => "Glag", |
| 848 | Self::GunjalaGondi => "Gong", |
| 849 | Self::MasaramGondi => "Gonm", |
| 850 | Self::Gothic => "Goth", |
| 851 | Self::Grantha => "Gran", |
| 852 | Self::Greek => "Grek", |
| 853 | Self::Gujarati => "Gujr", |
| 854 | Self::GurungKhema => "Gukh", |
| 855 | Self::Gurmukhi => "Guru", |
| 856 | Self::Hangul => "Hang", |
| 857 | Self::Han => "Hani", |
| 858 | Self::Hanunoo => "Hano", |
| 859 | Self::Hatran => "Hatr", |
| 860 | Self::Hebrew => "Hebr", |
| 861 | Self::Hiragana => "Hira", |
| 862 | Self::AnatolianHieroglyphs => "Hluw", |
| 863 | Self::PahawhHmong => "Hmng", |
| 864 | Self::NyiakengPuachueHmong => "Hmnp", |
| 865 | Self::KatakanaOrHiragana => "Hrkt", |
| 866 | Self::OldHungarian => "Hung", |
| 867 | Self::OldItalic => "Ital", |
| 868 | Self::Javanese => "Java", |
| 869 | Self::KayahLi => "Kali", |
| 870 | Self::Katakana => "Kana", |
| 871 | Self::Kawi => "Kawi", |
| 872 | Self::Kharoshthi => "Khar", |
| 873 | Self::Khmer => "Khmr", |
| 874 | Self::Khojki => "Khoj", |
| 875 | Self::KhitanSmallScript => "Kits", |
| 876 | Self::Kannada => "Knda", |
| 877 | Self::KiratRai => "Krai", |
| 878 | Self::Kaithi => "Kthi", |
| 879 | Self::TaiTham => "Lana", |
| 880 | Self::Lao => "Laoo", |
| 881 | Self::Latin => "Latn", |
| 882 | Self::Lepcha => "Lepc", |
| 883 | Self::Limbu => "Limb", |
| 884 | Self::LinearA => "Lina", |
| 885 | Self::LinearB => "Linb", |
| 886 | Self::Lisu => "Lisu", |
| 887 | Self::Lycian => "Lyci", |
| 888 | Self::Lydian => "Lydi", |
| 889 | Self::Mahajani => "Mahj", |
| 890 | Self::Makasar => "Maka", |
| 891 | Self::Mandaic => "Mand", |
| 892 | Self::Manichaean => "Mani", |
| 893 | Self::Marchen => "Marc", |
| 894 | Self::Medefaidrin => "Medf", |
| 895 | Self::MendeKikakui => "Mend", |
| 896 | Self::MeroiticCursive => "Merc", |
| 897 | Self::MeroiticHieroglyphs => "Mero", |
| 898 | Self::Malayalam => "Mlym", |
| 899 | Self::Modi => "Modi", |
| 900 | Self::Mongolian => "Mong", |
| 901 | Self::Mro => "Mroo", |
| 902 | Self::MeeteiMayek => "Mtei", |
| 903 | Self::Multani => "Mult", |
| 904 | Self::Myanmar => "Mymr", |
| 905 | Self::NagMundari => "Nagm", |
| 906 | Self::Nandinagari => "Nand", |
| 907 | Self::OldNorthArabian => "Narb", |
| 908 | Self::Nabataean => "Nbat", |
| 909 | Self::Newa => "Newa", |
| 910 | Self::Nko => "Nkoo", |
| 911 | Self::Nushu => "Nshu", |
| 912 | Self::Ogham => "Ogam", |
| 913 | Self::OlChiki => "Olck", |
| 914 | Self::OlOnal => "Onao", |
| 915 | Self::OldTurkic => "Orkh", |
| 916 | Self::Oriya => "Orya", |
| 917 | Self::Osage => "Osge", |
| 918 | Self::Osmanya => "Osma", |
| 919 | Self::OldUyghur => "Ougr", |
| 920 | Self::Palmyrene => "Palm", |
| 921 | Self::PauCinHau => "Pauc", |
| 922 | Self::OldPermic => "Perm", |
| 923 | Self::PhagsPa => "Phag", |
| 924 | Self::InscriptionalPahlavi => "Phli", |
| 925 | Self::PsalterPahlavi => "Phlp", |
| 926 | Self::Phoenician => "Phnx", |
| 927 | Self::Miao => "Plrd", |
| 928 | Self::InscriptionalParthian => "Prti", |
| 929 | Self::Rejang => "Rjng", |
| 930 | Self::HanifiRohingya => "Rohg", |
| 931 | Self::Runic => "Runr", |
| 932 | Self::Samaritan => "Samr", |
| 933 | Self::OldSouthArabian => "Sarb", |
| 934 | Self::Saurashtra => "Saur", |
| 935 | Self::SignWriting => "Sgnw", |
| 936 | Self::Shavian => "Shaw", |
| 937 | Self::Sharada => "Shrd", |
| 938 | Self::Siddham => "Sidd", |
| 939 | Self::Sidetic => "Sidt", |
| 940 | Self::Khudawadi => "Sind", |
| 941 | Self::Sinhala => "Sinh", |
| 942 | Self::Sogdian => "Sogd", |
| 943 | Self::OldSogdian => "Sogo", |
| 944 | Self::SoraSompeng => "Sora", |
| 945 | Self::Soyombo => "Soyo", |
| 946 | Self::Sundanese => "Sund", |
| 947 | Self::Sunuwar => "Sunu", |
| 948 | Self::SylotiNagri => "Sylo", |
| 949 | Self::Syriac => "Syrc", |
| 950 | Self::Tagbanwa => "Tagb", |
| 951 | Self::Takri => "Takr", |
| 952 | Self::TaiLe => "Tale", |
| 953 | Self::NewTaiLue => "Talu", |
| 954 | Self::Tamil => "Taml", |
| 955 | Self::Tangut => "Tang", |
| 956 | Self::TaiViet => "Tavt", |
| 957 | Self::TaiYo => "Tayo", |
| 958 | Self::Telugu => "Telu", |
| 959 | Self::Tifinagh => "Tfng", |
| 960 | Self::Tagalog => "Tglg", |
| 961 | Self::Thaana => "Thaa", |
| 962 | Self::Thai => "Thai", |
| 963 | Self::Tibetan => "Tibt", |
| 964 | Self::Tirhuta => "Tirh", |
| 965 | Self::Tangsa => "Tnsa", |
| 966 | Self::Todhri => "Todr", |
| 967 | Self::TolongSiki => "Tols", |
| 968 | Self::Toto => "Toto", |
| 969 | Self::TuluTigalari => "Tutg", |
| 970 | Self::Ugaritic => "Ugar", |
| 971 | Self::Vai => "Vaii", |
| 972 | Self::Vithkuqi => "Vith", |
| 973 | Self::WarangCiti => "Wara", |
| 974 | Self::Wancho => "Wcho", |
| 975 | Self::OldPersian => "Xpeo", |
| 976 | Self::Cuneiform => "Xsux", |
| 977 | Self::Yezidi => "Yezi", |
| 978 | Self::Yi => "Yiii", |
| 979 | Self::ZanabazarSquare => "Zanb", |
| 980 | Self::Inherited => "Zinh", |
| 981 | Self::Common => "Zyyy", |
| 982 | Self::Unknown => "Zzzz", |
| 983 | } |
| 984 | } |
| 985 | } |
| 986 | |
| 987 | /// The Sentence_Break property of UAX #29. |
| 988 | #[repr(u8)] |
| 989 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
| 990 | pub enum SentenceClass { |
| 991 | ATerm, |
| 992 | Close, |
| 993 | CR, |
| 994 | Extend, |
| 995 | Format, |
| 996 | OLetter, |
| 997 | LF, |
| 998 | Lower, |
| 999 | Numeric, |
| 1000 | SContinue, |
| 1001 | Sep, |
| 1002 | Sp, |
| 1003 | STerm, |
| 1004 | Upper, |
| 1005 | Other, |
| 1006 | } |
| 1007 | |
| 1008 | impl Partitioned for SentenceClass { |
| 1009 | |
| 1010 | const DEFAULT: Self = Self::Other; |
| 1011 | |
| 1012 | fn table() -> (&'static [u32], &'static [Self]) { |
| 1013 | (&super::cat::SB_STARTS, &super::cat::SB_VALS) |
| 1014 | } |
| 1015 | } |