|
1 | 1 | //! This file is generated by `./x run src/tools/unicode-table-generator`; do not edit manually! |
2 | 2 | // Alphabetic : 1723 bytes, 147369 codepoints in 759 ranges (U+0000AA - U+03347A) using skiplist |
3 | 3 | // Case_Ignorable : 1063 bytes, 2789 codepoints in 459 ranges (U+0000A8 - U+0E01F0) using skiplist |
4 | | -// Cased : 401 bytes, 4580 codepoints in 156 ranges (U+0000AA - U+01F18A) using skiplist |
5 | 4 | // Grapheme_Extend : 899 bytes, 2232 codepoints in 383 ranges (U+000300 - U+0E01F0) using skiplist |
6 | 5 | // Lowercase : 943 bytes, 2569 codepoints in 676 ranges (U+0000AA - U+01E944) using bitset |
| 6 | +// Lt : 33 bytes, 31 codepoints in 10 ranges (U+0001C5 - U+001FFD) using skiplist |
7 | 7 | // N : 463 bytes, 1914 codepoints in 145 ranges (U+0000B2 - U+01FBFA) using skiplist |
8 | 8 | // Uppercase : 799 bytes, 1980 codepoints in 659 ranges (U+0000C0 - U+01F18A) using bitset |
9 | 9 | // White_Space : 256 bytes, 19 codepoints in 8 ranges (U+000085 - U+003001) using cascading |
10 | 10 | // to_lower : 11708 bytes |
11 | 11 | // to_upper : 13656 bytes |
12 | | -// Total : 31911 bytes |
| 12 | +// Total : 31543 bytes |
13 | 13 |
|
14 | 14 | use super::rt::*; |
15 | 15 |
|
@@ -253,70 +253,6 @@ pub mod case_ignorable { |
253 | 253 | } |
254 | 254 | } |
255 | 255 |
|
256 | | -pub mod cased { |
257 | | - use super::ShortOffsetRunHeader; |
258 | | - |
259 | | - static SHORT_OFFSET_RUNS: [ShortOffsetRunHeader; 22] = [ |
260 | | - ShortOffsetRunHeader::new(0, 4256), |
261 | | - ShortOffsetRunHeader::new(51, 5024), |
262 | | - ShortOffsetRunHeader::new(61, 7296), |
263 | | - ShortOffsetRunHeader::new(65, 7958), |
264 | | - ShortOffsetRunHeader::new(74, 9398), |
265 | | - ShortOffsetRunHeader::new(149, 11264), |
266 | | - ShortOffsetRunHeader::new(151, 42560), |
267 | | - ShortOffsetRunHeader::new(163, 43824), |
268 | | - ShortOffsetRunHeader::new(177, 64256), |
269 | | - ShortOffsetRunHeader::new(183, 65313), |
270 | | - ShortOffsetRunHeader::new(187, 66560), |
271 | | - ShortOffsetRunHeader::new(191, 67456), |
272 | | - ShortOffsetRunHeader::new(213, 68736), |
273 | | - ShortOffsetRunHeader::new(221, 71840), |
274 | | - ShortOffsetRunHeader::new(229, 93760), |
275 | | - ShortOffsetRunHeader::new(231, 119808), |
276 | | - ShortOffsetRunHeader::new(237, 120486), |
277 | | - ShortOffsetRunHeader::new(274, 122624), |
278 | | - ShortOffsetRunHeader::new(297, 122928), |
279 | | - ShortOffsetRunHeader::new(303, 125184), |
280 | | - ShortOffsetRunHeader::new(305, 127280), |
281 | | - ShortOffsetRunHeader::new(307, 1241482), |
282 | | - ]; |
283 | | - static OFFSETS: [u8; 313] = [ |
284 | | - 170, 1, 10, 1, 4, 1, 5, 23, 1, 31, 1, 195, 1, 4, 4, 208, 2, 35, 7, 2, 30, 5, 96, 1, 42, 4, |
285 | | - 2, 2, 2, 4, 1, 1, 6, 1, 1, 3, 1, 1, 1, 20, 1, 83, 1, 139, 8, 166, 1, 38, 9, 41, 0, 38, 1, |
286 | | - 1, 5, 1, 2, 43, 1, 4, 0, 86, 2, 6, 0, 11, 5, 43, 2, 3, 64, 192, 64, 0, 2, 6, 2, 38, 2, 6, |
287 | | - 2, 8, 1, 1, 1, 1, 1, 1, 1, 31, 2, 53, 1, 7, 1, 1, 3, 3, 1, 7, 3, 4, 2, 6, 4, 13, 5, 3, 1, |
288 | | - 7, 116, 1, 13, 1, 16, 13, 101, 1, 4, 1, 2, 10, 1, 1, 3, 5, 6, 1, 1, 1, 1, 1, 1, 4, 1, 6, 4, |
289 | | - 1, 2, 4, 5, 5, 4, 1, 17, 32, 3, 2, 0, 52, 0, 229, 6, 4, 3, 2, 12, 38, 1, 1, 5, 1, 0, 46, |
290 | | - 18, 30, 132, 102, 3, 4, 1, 77, 20, 6, 1, 3, 0, 43, 1, 14, 6, 80, 0, 7, 12, 5, 0, 26, 6, 26, |
291 | | - 0, 80, 96, 36, 4, 36, 116, 11, 1, 15, 1, 7, 1, 2, 1, 11, 1, 15, 1, 7, 1, 2, 0, 1, 2, 3, 1, |
292 | | - 42, 1, 9, 0, 51, 13, 51, 93, 22, 10, 22, 0, 64, 0, 64, 32, 25, 2, 25, 0, 85, 1, 71, 1, 2, |
293 | | - 2, 1, 2, 2, 2, 4, 1, 12, 1, 1, 1, 7, 1, 65, 1, 4, 2, 8, 1, 7, 1, 28, 1, 4, 1, 5, 1, 1, 3, |
294 | | - 7, 1, 0, 2, 25, 1, 25, 1, 31, 1, 25, 1, 31, 1, 25, 1, 31, 1, 25, 1, 31, 1, 25, 1, 8, 0, 10, |
295 | | - 1, 20, 6, 6, 0, 62, 0, 68, 0, 26, 6, 26, 6, 26, 0, |
296 | | - ]; |
297 | | - |
298 | | - #[inline] |
299 | | - pub fn lookup(c: char) -> bool { |
300 | | - debug_assert!(!c.is_ascii()); |
301 | | - (c as u32) >= 0xaa && lookup_slow(c) |
302 | | - } |
303 | | - |
304 | | - #[inline(never)] |
305 | | - fn lookup_slow(c: char) -> bool { |
306 | | - const { |
307 | | - assert!(SHORT_OFFSET_RUNS.last().unwrap().0 > char::MAX as u32); |
308 | | - let mut i = 0; |
309 | | - while i < SHORT_OFFSET_RUNS.len() { |
310 | | - assert!(SHORT_OFFSET_RUNS[i].start_index() < OFFSETS.len()); |
311 | | - i += 1; |
312 | | - } |
313 | | - } |
314 | | - // SAFETY: We just ensured the last element of `SHORT_OFFSET_RUNS` is greater than `std::char::MAX` |
315 | | - // and the start indices of all elements in `SHORT_OFFSET_RUNS` are smaller than `OFFSETS.len()`. |
316 | | - unsafe { super::skip_search(c, &SHORT_OFFSET_RUNS, &OFFSETS) } |
317 | | - } |
318 | | -} |
319 | | - |
320 | 256 | pub mod grapheme_extend { |
321 | 257 | use super::ShortOffsetRunHeader; |
322 | 258 |
|
@@ -535,6 +471,38 @@ pub mod lowercase { |
535 | 471 | } |
536 | 472 | } |
537 | 473 |
|
| 474 | +pub mod lt { |
| 475 | + use super::ShortOffsetRunHeader; |
| 476 | + |
| 477 | + static SHORT_OFFSET_RUNS: [ShortOffsetRunHeader; 3] = [ |
| 478 | + ShortOffsetRunHeader::new(0, 453), |
| 479 | + ShortOffsetRunHeader::new(1, 8072), |
| 480 | + ShortOffsetRunHeader::new(9, 1122301), |
| 481 | + ]; |
| 482 | + static OFFSETS: [u8; 21] = [0, 1, 2, 1, 2, 1, 38, 1, 0, 8, 8, 8, 8, 8, 12, 1, 15, 1, 47, 1, 0]; |
| 483 | + |
| 484 | + #[inline] |
| 485 | + pub fn lookup(c: char) -> bool { |
| 486 | + debug_assert!(!c.is_ascii()); |
| 487 | + (c as u32) >= 0x1c5 && lookup_slow(c) |
| 488 | + } |
| 489 | + |
| 490 | + #[inline(never)] |
| 491 | + fn lookup_slow(c: char) -> bool { |
| 492 | + const { |
| 493 | + assert!(SHORT_OFFSET_RUNS.last().unwrap().0 > char::MAX as u32); |
| 494 | + let mut i = 0; |
| 495 | + while i < SHORT_OFFSET_RUNS.len() { |
| 496 | + assert!(SHORT_OFFSET_RUNS[i].start_index() < OFFSETS.len()); |
| 497 | + i += 1; |
| 498 | + } |
| 499 | + } |
| 500 | + // SAFETY: We just ensured the last element of `SHORT_OFFSET_RUNS` is greater than `std::char::MAX` |
| 501 | + // and the start indices of all elements in `SHORT_OFFSET_RUNS` are smaller than `OFFSETS.len()`. |
| 502 | + unsafe { super::skip_search(c, &SHORT_OFFSET_RUNS, &OFFSETS) } |
| 503 | + } |
| 504 | +} |
| 505 | + |
538 | 506 | pub mod n { |
539 | 507 | use super::ShortOffsetRunHeader; |
540 | 508 |
|
|
0 commit comments