From 1ac42f8c442a20e46a6255f6fe615e330c9d1ae1 Mon Sep 17 00:00:00 2001 From: Boshen Date: Fri, 8 Apr 2022 15:45:06 +0800 Subject: [PATCH] Update to Unicode 14.0.0 --- scripts/unicode.py | 1 - src/tables.rs | 144 ++++++++++++++++++++++++++++++--------------- 2 files changed, 98 insertions(+), 47 deletions(-) diff --git a/scripts/unicode.py b/scripts/unicode.py index b692deb..7968c91 100755 --- a/scripts/unicode.py +++ b/scripts/unicode.py @@ -135,7 +135,6 @@ def emit_bsearch_range_table(f): // the `Greater` case is tested for before the `Less` case. if lo > c { Greater } else if hi < c { Less } - else if hi < c { Less } else { Equal } }).is_ok() }\n diff --git a/src/tables.rs b/src/tables.rs index b7212a3..a4a072f 100644 --- a/src/tables.rs +++ b/src/tables.rs @@ -14,7 +14,7 @@ /// The version of [Unicode](http://www.unicode.org/) /// that this version of unicode-xid is based on. -pub const UNICODE_VERSION: (u64, u64, u64) = (13, 0, 0); +pub const UNICODE_VERSION: (u64, u64, u64) = (14, 0, 0); fn bsearch_range_table(c: char, r: &[(char, char)]) -> bool { use core::cmp::Ordering::{Equal, Greater, Less}; @@ -89,9 +89,9 @@ pub mod derived_property { ('\u{800}', '\u{82d}'), ('\u{840}', '\u{85b}'), ('\u{860}', '\u{86a}'), - ('\u{8a0}', '\u{8b4}'), - ('\u{8b6}', '\u{8c7}'), - ('\u{8d3}', '\u{8e1}'), + ('\u{870}', '\u{887}'), + ('\u{889}', '\u{88e}'), + ('\u{898}', '\u{8e1}'), ('\u{8e3}', '\u{963}'), ('\u{966}', '\u{96f}'), ('\u{971}', '\u{983}'), @@ -175,11 +175,12 @@ pub mod derived_property { ('\u{c0e}', '\u{c10}'), ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), - ('\u{c3d}', '\u{c44}'), + ('\u{c3c}', '\u{c44}'), ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4d}'), ('\u{c55}', '\u{c56}'), ('\u{c58}', '\u{c5a}'), + ('\u{c5d}', '\u{c5d}'), ('\u{c60}', '\u{c63}'), ('\u{c66}', '\u{c6f}'), ('\u{c80}', '\u{c83}'), @@ -192,7 +193,7 @@ pub mod derived_property { ('\u{cc6}', '\u{cc8}'), ('\u{cca}', '\u{ccd}'), ('\u{cd5}', '\u{cd6}'), - ('\u{cde}', '\u{cde}'), + ('\u{cdd}', '\u{cde}'), ('\u{ce0}', '\u{ce3}'), ('\u{ce6}', '\u{cef}'), ('\u{cf1}', '\u{cf2}'), @@ -275,9 +276,8 @@ pub mod derived_property { ('\u{1681}', '\u{169a}'), ('\u{16a0}', '\u{16ea}'), ('\u{16ee}', '\u{16f8}'), - ('\u{1700}', '\u{170c}'), - ('\u{170e}', '\u{1714}'), - ('\u{1720}', '\u{1734}'), + ('\u{1700}', '\u{1715}'), + ('\u{171f}', '\u{1734}'), ('\u{1740}', '\u{1753}'), ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'), @@ -287,7 +287,7 @@ pub mod derived_property { ('\u{17dc}', '\u{17dd}'), ('\u{17e0}', '\u{17e9}'), ('\u{180b}', '\u{180d}'), - ('\u{1810}', '\u{1819}'), + ('\u{180f}', '\u{1819}'), ('\u{1820}', '\u{1878}'), ('\u{1880}', '\u{18aa}'), ('\u{18b0}', '\u{18f5}'), @@ -306,8 +306,8 @@ pub mod derived_property { ('\u{1a90}', '\u{1a99}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1ab0}', '\u{1abd}'), - ('\u{1abf}', '\u{1ac0}'), - ('\u{1b00}', '\u{1b4b}'), + ('\u{1abf}', '\u{1ace}'), + ('\u{1b00}', '\u{1b4c}'), ('\u{1b50}', '\u{1b59}'), ('\u{1b6b}', '\u{1b73}'), ('\u{1b80}', '\u{1bf3}'), @@ -319,8 +319,7 @@ pub mod derived_property { ('\u{1cbd}', '\u{1cbf}'), ('\u{1cd0}', '\u{1cd2}'), ('\u{1cd4}', '\u{1cfa}'), - ('\u{1d00}', '\u{1df9}'), - ('\u{1dfb}', '\u{1f15}'), + ('\u{1d00}', '\u{1f15}'), ('\u{1f18}', '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'), ('\u{1f48}', '\u{1f4d}'), @@ -360,9 +359,7 @@ pub mod derived_property { ('\u{2145}', '\u{2149}'), ('\u{214e}', '\u{214e}'), ('\u{2160}', '\u{2188}'), - ('\u{2c00}', '\u{2c2e}'), - ('\u{2c30}', '\u{2c5e}'), - ('\u{2c60}', '\u{2ce4}'), + ('\u{2c00}', '\u{2ce4}'), ('\u{2ceb}', '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), @@ -393,8 +390,7 @@ pub mod derived_property { ('\u{31a0}', '\u{31bf}'), ('\u{31f0}', '\u{31ff}'), ('\u{3400}', '\u{4dbf}'), - ('\u{4e00}', '\u{9ffc}'), - ('\u{a000}', '\u{a48c}'), + ('\u{4e00}', '\u{a48c}'), ('\u{a4d0}', '\u{a4fd}'), ('\u{a500}', '\u{a60c}'), ('\u{a610}', '\u{a62b}'), @@ -403,9 +399,11 @@ pub mod derived_property { ('\u{a67f}', '\u{a6f1}'), ('\u{a717}', '\u{a71f}'), ('\u{a722}', '\u{a788}'), - ('\u{a78b}', '\u{a7bf}'), - ('\u{a7c2}', '\u{a7ca}'), - ('\u{a7f5}', '\u{a827}'), + ('\u{a78b}', '\u{a7ca}'), + ('\u{a7d0}', '\u{a7d1}'), + ('\u{a7d3}', '\u{a7d3}'), + ('\u{a7d5}', '\u{a7d9}'), + ('\u{a7f2}', '\u{a827}'), ('\u{a82c}', '\u{a82c}'), ('\u{a840}', '\u{a873}'), ('\u{a880}', '\u{a8c5}'), @@ -500,9 +498,20 @@ pub mod derived_property { ('\u{104d8}', '\u{104fb}'), ('\u{10500}', '\u{10527}'), ('\u{10530}', '\u{10563}'), + ('\u{10570}', '\u{1057a}'), + ('\u{1057c}', '\u{1058a}'), + ('\u{1058c}', '\u{10592}'), + ('\u{10594}', '\u{10595}'), + ('\u{10597}', '\u{105a1}'), + ('\u{105a3}', '\u{105b1}'), + ('\u{105b3}', '\u{105b9}'), + ('\u{105bb}', '\u{105bc}'), ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'), ('\u{10760}', '\u{10767}'), + ('\u{10780}', '\u{10785}'), + ('\u{10787}', '\u{107b0}'), + ('\u{107b2}', '\u{107ba}'), ('\u{10800}', '\u{10805}'), ('\u{10808}', '\u{10808}'), ('\u{1080a}', '\u{10835}'), @@ -543,11 +552,13 @@ pub mod derived_property { ('\u{10f00}', '\u{10f1c}'), ('\u{10f27}', '\u{10f27}'), ('\u{10f30}', '\u{10f50}'), + ('\u{10f70}', '\u{10f85}'), ('\u{10fb0}', '\u{10fc4}'), ('\u{10fe0}', '\u{10ff6}'), ('\u{11000}', '\u{11046}'), - ('\u{11066}', '\u{1106f}'), + ('\u{11066}', '\u{11075}'), ('\u{1107f}', '\u{110ba}'), + ('\u{110c2}', '\u{110c2}'), ('\u{110d0}', '\u{110e8}'), ('\u{110f0}', '\u{110f9}'), ('\u{11100}', '\u{11134}'), @@ -601,6 +612,7 @@ pub mod derived_property { ('\u{11700}', '\u{1171a}'), ('\u{1171d}', '\u{1172b}'), ('\u{11730}', '\u{11739}'), + ('\u{11740}', '\u{11746}'), ('\u{11800}', '\u{1183a}'), ('\u{118a0}', '\u{118e9}'), ('\u{118ff}', '\u{11906}'), @@ -619,7 +631,7 @@ pub mod derived_property { ('\u{11a47}', '\u{11a47}'), ('\u{11a50}', '\u{11a99}'), ('\u{11a9d}', '\u{11a9d}'), - ('\u{11ac0}', '\u{11af8}'), + ('\u{11ab0}', '\u{11af8}'), ('\u{11c00}', '\u{11c08}'), ('\u{11c0a}', '\u{11c36}'), ('\u{11c38}', '\u{11c40}'), @@ -645,11 +657,14 @@ pub mod derived_property { ('\u{12000}', '\u{12399}'), ('\u{12400}', '\u{1246e}'), ('\u{12480}', '\u{12543}'), + ('\u{12f90}', '\u{12ff0}'), ('\u{13000}', '\u{1342e}'), ('\u{14400}', '\u{14646}'), ('\u{16800}', '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), ('\u{16a60}', '\u{16a69}'), + ('\u{16a70}', '\u{16abe}'), + ('\u{16ac0}', '\u{16ac9}'), ('\u{16ad0}', '\u{16aed}'), ('\u{16af0}', '\u{16af4}'), ('\u{16b00}', '\u{16b36}'), @@ -667,7 +682,10 @@ pub mod derived_property { ('\u{17000}', '\u{187f7}'), ('\u{18800}', '\u{18cd5}'), ('\u{18d00}', '\u{18d08}'), - ('\u{1b000}', '\u{1b11e}'), + ('\u{1aff0}', '\u{1aff3}'), + ('\u{1aff5}', '\u{1affb}'), + ('\u{1affd}', '\u{1affe}'), + ('\u{1b000}', '\u{1b122}'), ('\u{1b150}', '\u{1b152}'), ('\u{1b164}', '\u{1b167}'), ('\u{1b170}', '\u{1b2fb}'), @@ -676,6 +694,8 @@ pub mod derived_property { ('\u{1bc80}', '\u{1bc88}'), ('\u{1bc90}', '\u{1bc99}'), ('\u{1bc9d}', '\u{1bc9e}'), + ('\u{1cf00}', '\u{1cf2d}'), + ('\u{1cf30}', '\u{1cf46}'), ('\u{1d165}', '\u{1d169}'), ('\u{1d16d}', '\u{1d172}'), ('\u{1d17b}', '\u{1d182}'), @@ -719,6 +739,7 @@ pub mod derived_property { ('\u{1da84}', '\u{1da84}'), ('\u{1da9b}', '\u{1da9f}'), ('\u{1daa1}', '\u{1daaf}'), + ('\u{1df00}', '\u{1df1e}'), ('\u{1e000}', '\u{1e006}'), ('\u{1e008}', '\u{1e018}'), ('\u{1e01b}', '\u{1e021}'), @@ -728,7 +749,12 @@ pub mod derived_property { ('\u{1e130}', '\u{1e13d}'), ('\u{1e140}', '\u{1e149}'), ('\u{1e14e}', '\u{1e14e}'), + ('\u{1e290}', '\u{1e2ae}'), ('\u{1e2c0}', '\u{1e2f9}'), + ('\u{1e7e0}', '\u{1e7e6}'), + ('\u{1e7e8}', '\u{1e7eb}'), + ('\u{1e7ed}', '\u{1e7ee}'), + ('\u{1e7f0}', '\u{1e7fe}'), ('\u{1e800}', '\u{1e8c4}'), ('\u{1e8d0}', '\u{1e8d6}'), ('\u{1e900}', '\u{1e94b}'), @@ -767,8 +793,8 @@ pub mod derived_property { ('\u{1eea5}', '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'), ('\u{1fbf0}', '\u{1fbf9}'), - ('\u{20000}', '\u{2a6dd}'), - ('\u{2a700}', '\u{2b734}'), + ('\u{20000}', '\u{2a6df}'), + ('\u{2a700}', '\u{2b738}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2b820}', '\u{2cea1}'), ('\u{2ceb0}', '\u{2ebe0}'), @@ -831,8 +857,9 @@ pub mod derived_property { ('\u{828}', '\u{828}'), ('\u{840}', '\u{858}'), ('\u{860}', '\u{86a}'), - ('\u{8a0}', '\u{8b4}'), - ('\u{8b6}', '\u{8c7}'), + ('\u{870}', '\u{887}'), + ('\u{889}', '\u{88e}'), + ('\u{8a0}', '\u{8c9}'), ('\u{904}', '\u{939}'), ('\u{93d}', '\u{93d}'), ('\u{950}', '\u{950}'), @@ -897,6 +924,7 @@ pub mod derived_property { ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c3d}'), ('\u{c58}', '\u{c5a}'), + ('\u{c5d}', '\u{c5d}'), ('\u{c60}', '\u{c61}'), ('\u{c80}', '\u{c80}'), ('\u{c85}', '\u{c8c}'), @@ -905,7 +933,7 @@ pub mod derived_property { ('\u{caa}', '\u{cb3}'), ('\u{cb5}', '\u{cb9}'), ('\u{cbd}', '\u{cbd}'), - ('\u{cde}', '\u{cde}'), + ('\u{cdd}', '\u{cde}'), ('\u{ce0}', '\u{ce1}'), ('\u{cf1}', '\u{cf2}'), ('\u{d04}', '\u{d0c}'), @@ -976,9 +1004,8 @@ pub mod derived_property { ('\u{1681}', '\u{169a}'), ('\u{16a0}', '\u{16ea}'), ('\u{16ee}', '\u{16f8}'), - ('\u{1700}', '\u{170c}'), - ('\u{170e}', '\u{1711}'), - ('\u{1720}', '\u{1731}'), + ('\u{1700}', '\u{1711}'), + ('\u{171f}', '\u{1731}'), ('\u{1740}', '\u{1751}'), ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'), @@ -998,7 +1025,7 @@ pub mod derived_property { ('\u{1a20}', '\u{1a54}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1b05}', '\u{1b33}'), - ('\u{1b45}', '\u{1b4b}'), + ('\u{1b45}', '\u{1b4c}'), ('\u{1b83}', '\u{1ba0}'), ('\u{1bae}', '\u{1baf}'), ('\u{1bba}', '\u{1be5}'), @@ -1048,9 +1075,7 @@ pub mod derived_property { ('\u{2145}', '\u{2149}'), ('\u{214e}', '\u{214e}'), ('\u{2160}', '\u{2188}'), - ('\u{2c00}', '\u{2c2e}'), - ('\u{2c30}', '\u{2c5e}'), - ('\u{2c60}', '\u{2ce4}'), + ('\u{2c00}', '\u{2ce4}'), ('\u{2ceb}', '\u{2cee}'), ('\u{2cf2}', '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'), @@ -1080,8 +1105,7 @@ pub mod derived_property { ('\u{31a0}', '\u{31bf}'), ('\u{31f0}', '\u{31ff}'), ('\u{3400}', '\u{4dbf}'), - ('\u{4e00}', '\u{9ffc}'), - ('\u{a000}', '\u{a48c}'), + ('\u{4e00}', '\u{a48c}'), ('\u{a4d0}', '\u{a4fd}'), ('\u{a500}', '\u{a60c}'), ('\u{a610}', '\u{a61f}'), @@ -1091,9 +1115,11 @@ pub mod derived_property { ('\u{a6a0}', '\u{a6ef}'), ('\u{a717}', '\u{a71f}'), ('\u{a722}', '\u{a788}'), - ('\u{a78b}', '\u{a7bf}'), - ('\u{a7c2}', '\u{a7ca}'), - ('\u{a7f5}', '\u{a801}'), + ('\u{a78b}', '\u{a7ca}'), + ('\u{a7d0}', '\u{a7d1}'), + ('\u{a7d3}', '\u{a7d3}'), + ('\u{a7d5}', '\u{a7d9}'), + ('\u{a7f2}', '\u{a801}'), ('\u{a803}', '\u{a805}'), ('\u{a807}', '\u{a80a}'), ('\u{a80c}', '\u{a822}'), @@ -1189,9 +1215,20 @@ pub mod derived_property { ('\u{104d8}', '\u{104fb}'), ('\u{10500}', '\u{10527}'), ('\u{10530}', '\u{10563}'), + ('\u{10570}', '\u{1057a}'), + ('\u{1057c}', '\u{1058a}'), + ('\u{1058c}', '\u{10592}'), + ('\u{10594}', '\u{10595}'), + ('\u{10597}', '\u{105a1}'), + ('\u{105a3}', '\u{105b1}'), + ('\u{105b3}', '\u{105b9}'), + ('\u{105bb}', '\u{105bc}'), ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'), ('\u{10760}', '\u{10767}'), + ('\u{10780}', '\u{10785}'), + ('\u{10787}', '\u{107b0}'), + ('\u{107b2}', '\u{107ba}'), ('\u{10800}', '\u{10805}'), ('\u{10808}', '\u{10808}'), ('\u{1080a}', '\u{10835}'), @@ -1227,9 +1264,12 @@ pub mod derived_property { ('\u{10f00}', '\u{10f1c}'), ('\u{10f27}', '\u{10f27}'), ('\u{10f30}', '\u{10f45}'), + ('\u{10f70}', '\u{10f81}'), ('\u{10fb0}', '\u{10fc4}'), ('\u{10fe0}', '\u{10ff6}'), ('\u{11003}', '\u{11037}'), + ('\u{11071}', '\u{11072}'), + ('\u{11075}', '\u{11075}'), ('\u{11083}', '\u{110af}'), ('\u{110d0}', '\u{110e8}'), ('\u{11103}', '\u{11126}'), @@ -1271,6 +1311,7 @@ pub mod derived_property { ('\u{11680}', '\u{116aa}'), ('\u{116b8}', '\u{116b8}'), ('\u{11700}', '\u{1171a}'), + ('\u{11740}', '\u{11746}'), ('\u{11800}', '\u{1182b}'), ('\u{118a0}', '\u{118df}'), ('\u{118ff}', '\u{11906}'), @@ -1290,7 +1331,7 @@ pub mod derived_property { ('\u{11a50}', '\u{11a50}'), ('\u{11a5c}', '\u{11a89}'), ('\u{11a9d}', '\u{11a9d}'), - ('\u{11ac0}', '\u{11af8}'), + ('\u{11ab0}', '\u{11af8}'), ('\u{11c00}', '\u{11c08}'), ('\u{11c0a}', '\u{11c2e}'), ('\u{11c40}', '\u{11c40}'), @@ -1308,10 +1349,12 @@ pub mod derived_property { ('\u{12000}', '\u{12399}'), ('\u{12400}', '\u{1246e}'), ('\u{12480}', '\u{12543}'), + ('\u{12f90}', '\u{12ff0}'), ('\u{13000}', '\u{1342e}'), ('\u{14400}', '\u{14646}'), ('\u{16800}', '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), + ('\u{16a70}', '\u{16abe}'), ('\u{16ad0}', '\u{16aed}'), ('\u{16b00}', '\u{16b2f}'), ('\u{16b40}', '\u{16b43}'), @@ -1326,7 +1369,10 @@ pub mod derived_property { ('\u{17000}', '\u{187f7}'), ('\u{18800}', '\u{18cd5}'), ('\u{18d00}', '\u{18d08}'), - ('\u{1b000}', '\u{1b11e}'), + ('\u{1aff0}', '\u{1aff3}'), + ('\u{1aff5}', '\u{1affb}'), + ('\u{1affd}', '\u{1affe}'), + ('\u{1b000}', '\u{1b122}'), ('\u{1b150}', '\u{1b152}'), ('\u{1b164}', '\u{1b167}'), ('\u{1b170}', '\u{1b2fb}'), @@ -1364,10 +1410,16 @@ pub mod derived_property { ('\u{1d78a}', '\u{1d7a8}'), ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}'), + ('\u{1df00}', '\u{1df1e}'), ('\u{1e100}', '\u{1e12c}'), ('\u{1e137}', '\u{1e13d}'), ('\u{1e14e}', '\u{1e14e}'), + ('\u{1e290}', '\u{1e2ad}'), ('\u{1e2c0}', '\u{1e2eb}'), + ('\u{1e7e0}', '\u{1e7e6}'), + ('\u{1e7e8}', '\u{1e7eb}'), + ('\u{1e7ed}', '\u{1e7ee}'), + ('\u{1e7f0}', '\u{1e7fe}'), ('\u{1e800}', '\u{1e8c4}'), ('\u{1e900}', '\u{1e943}'), ('\u{1e94b}', '\u{1e94b}'), @@ -1404,8 +1456,8 @@ pub mod derived_property { ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'), - ('\u{20000}', '\u{2a6dd}'), - ('\u{2a700}', '\u{2b734}'), + ('\u{20000}', '\u{2a6df}'), + ('\u{2a700}', '\u{2b738}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2b820}', '\u{2cea1}'), ('\u{2ceb0}', '\u{2ebe0}'),