├── .github └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── COPYRIGHT ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── benches └── xid.rs ├── scripts └── unicode.py ├── src ├── lib.rs ├── tables.rs └── tests.rs └── tests └── exhaustive_tests.rs /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | pull_request: 6 | schedule: [cron: "40 1 * * *"] 7 | 8 | jobs: 9 | test: 10 | name: Rust ${{matrix.rust}} 11 | runs-on: ubuntu-latest 12 | strategy: 13 | fail-fast: false 14 | matrix: 15 | rust: [nightly, beta, stable] 16 | steps: 17 | - uses: actions/checkout@v2 18 | - uses: actions-rs/toolchain@v1 19 | with: 20 | toolchain: ${{matrix.rust}} 21 | profile: minimal 22 | override: true 23 | - run: cargo build --features bench 24 | if: matrix.rust == 'nightly' 25 | - run: cargo test --features bench 26 | if: matrix.rust == 'nightly' 27 | - run: cargo bench --features bench 28 | if: matrix.rust == 'nightly' 29 | - run: cargo build 30 | tables: 31 | name: Verify tables 32 | runs-on: ubuntu-latest 33 | steps: 34 | - uses: actions/checkout@v2 35 | - name: Verify regenerated files 36 | run: ./scripts/unicode.py && rustfmt tables.rs && diff tables.rs src/tables.rs 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | Cargo.lock 3 | scripts/tmp 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 0.2.6 4 | 5 | - Update to Unicode 16.0.0. 6 | 7 | ## 0.2.5 8 | 9 | - Update to Unicode 15.1.0. 10 | 11 | ## 0.2.4 12 | 13 | - Update to Unicode 15.0.0. 14 | - Replace `const` tables with `static` tables. 15 | 16 | ## 0.2.3 17 | 18 | - Update to Unicode 14.0.0. 19 | 20 | ## 0.2.2 21 | 22 | - Add an ASCII fast-path. 23 | 24 | ## 0.2.1 25 | 26 | - Update to Unicode 13.0.0. 27 | - Speed up lookup. 28 | 29 | ## 0.2.0 30 | 31 | - Update to Unicode 12.1.0. 32 | 33 | ## 0.1.0 34 | 35 | - Initial release. 36 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Licensed under the Apache License, Version 2.0 2 | or the MIT 4 | license , 5 | at your option. All files in the project carrying such 6 | notice may not be copied, modified, or distributed except 7 | according to those terms. 8 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = "unicode-xid" 4 | version = "0.2.6" 5 | authors = ["erick.tryzelaar ", 6 | "kwantam ", 7 | "Manish Goregaokar " 8 | ] 9 | 10 | homepage = "https://github.com/unicode-rs/unicode-xid" 11 | repository = "https://github.com/unicode-rs/unicode-xid" 12 | documentation = "https://unicode-rs.github.io/unicode-xid" 13 | license = "MIT OR Apache-2.0" 14 | keywords = ["text", "unicode", "xid"] 15 | readme = "README.md" 16 | description = """ 17 | Determine whether characters have the XID_Start 18 | or XID_Continue properties according to 19 | Unicode Standard Annex #31. 20 | """ 21 | exclude = ["/.github/**", "/scripts/*"] 22 | rust-version = "1.17" 23 | 24 | [features] 25 | default = [] 26 | no_std = [] 27 | bench = [] 28 | 29 | [dev-dependencies] 30 | criterion = "0.3" 31 | 32 | [[bench]] 33 | name = "xid" 34 | harness = false 35 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 The Rust Project Developers 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # unicode-xid 2 | 3 | Determine if a `char` is a valid identifier for a parser and/or lexer according to 4 | [Unicode Standard Annex #31](https://www.unicode.org/reports/tr31/) rules. 5 | 6 | [![Build Status](https://img.shields.io/github/actions/workflow/status/unicode-rs/unicode-xid/ci.yml?branch=master)](https://github.com/unicode-rs/unicode-xid/actions?query=branch%3Amaster) 7 | 8 | [Documentation](https://unicode-rs.github.io/unicode-xid/unicode_xid/index.html) 9 | 10 | ```rust 11 | extern crate unicode_xid; 12 | 13 | use unicode_xid::UnicodeXID; 14 | 15 | fn main() { 16 | let ch = 'a'; 17 | println!("Is {} a valid start of an identifier? {}", ch, UnicodeXID::is_xid_start(ch)); 18 | } 19 | ``` 20 | 21 | # features 22 | 23 | unicode-xid supports a `no_std` feature. This eliminates dependence 24 | on std, and instead uses equivalent functions from core. 25 | -------------------------------------------------------------------------------- /benches/xid.rs: -------------------------------------------------------------------------------- 1 | extern crate criterion; 2 | extern crate unicode_xid; 3 | 4 | use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput}; 5 | use unicode_xid::UnicodeXID; 6 | 7 | fn bench_unicode_xid(c: &mut Criterion) { 8 | let unicode_chars = chars(1..0x3000); 9 | let ascii_chars = chars(1..0x80); 10 | 11 | let mut group = c.benchmark_group("UnicodeXID"); 12 | group.throughput(Throughput::Bytes(unicode_chars.len() as u64)); 13 | group.bench_with_input( 14 | BenchmarkId::new("is_xid_start", "unicode"), 15 | &unicode_chars, 16 | |b, chars| b.iter(|| chars.iter().copied().map(UnicodeXID::is_xid_start).last()), 17 | ); 18 | group.throughput(Throughput::Bytes(ascii_chars.len() as u64)); 19 | group.bench_with_input( 20 | BenchmarkId::new("is_xid_start", "ascii"), 21 | &ascii_chars, 22 | |b, chars| b.iter(|| chars.iter().copied().map(UnicodeXID::is_xid_start).last()), 23 | ); 24 | group.throughput(Throughput::Bytes(unicode_chars.len() as u64)); 25 | group.bench_with_input( 26 | BenchmarkId::new("is_xid_continue", "unicode"), 27 | &unicode_chars, 28 | |b, chars| { 29 | b.iter(|| { 30 | chars 31 | .iter() 32 | .copied() 33 | .map(UnicodeXID::is_xid_continue) 34 | .last() 35 | }) 36 | }, 37 | ); 38 | group.throughput(Throughput::Bytes(ascii_chars.len() as u64)); 39 | group.bench_with_input( 40 | BenchmarkId::new("is_xid_continue", "ascii"), 41 | &ascii_chars, 42 | |b, chars| { 43 | b.iter(|| { 44 | chars 45 | .iter() 46 | .copied() 47 | .map(UnicodeXID::is_xid_continue) 48 | .last() 49 | }) 50 | }, 51 | ); 52 | group.finish(); 53 | } 54 | 55 | fn chars(range: std::ops::Range) -> Vec { 56 | range.filter_map(|i| std::char::from_u32(i)).collect() 57 | } 58 | 59 | criterion_group!(benches, bench_unicode_xid); 60 | criterion_main!(benches); 61 | -------------------------------------------------------------------------------- /scripts/unicode.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2011-2015 The Rust Project Developers. See the COPYRIGHT 4 | # file at the top-level directory of this distribution and at 5 | # http://rust-lang.org/COPYRIGHT. 6 | # 7 | # Licensed under the Apache License, Version 2.0 or the MIT license 9 | # , at your 10 | # option. This file may not be copied, modified, or distributed 11 | # except according to those terms. 12 | 13 | # This script uses the following Unicode tables: 14 | # - DerivedCoreProperties.txt 15 | # - ReadMe.txt 16 | # 17 | # Since this should not require frequent updates, we just store this 18 | # out-of-line and check the unicode.rs file into git. 19 | 20 | import fileinput, re, os, sys 21 | 22 | preamble = '''// Copyright 2012-2025 The Rust Project Developers. See the COPYRIGHT 23 | // file at the top-level directory of this distribution and at 24 | // https://www.rust-lang.org/policies/licenses. 25 | // 26 | // Licensed under the Apache License, Version 2.0 or the MIT license 28 | // , at your 29 | // option. This file may not be copied, modified, or distributed 30 | // except according to those terms. 31 | 32 | // NOTE: The following code was generated by "scripts/unicode.py", do not edit directly 33 | 34 | #![allow(missing_docs, non_upper_case_globals, non_snake_case)] 35 | ''' 36 | 37 | def fetch(f): 38 | if not os.path.exists(os.path.basename(f)): 39 | os.system("curl -O http://www.unicode.org/Public/UNIDATA/%s" 40 | % f) 41 | 42 | if not os.path.exists(os.path.basename(f)): 43 | sys.stderr.write("cannot load %s" % f) 44 | exit(1) 45 | 46 | def group_cat(cat): 47 | cat_out = [] 48 | letters = sorted(set(cat)) 49 | cur_start = letters.pop(0) 50 | cur_end = cur_start 51 | for letter in letters: 52 | assert letter > cur_end, \ 53 | "cur_end: %s, letter: %s" % (hex(cur_end), hex(letter)) 54 | if letter == cur_end + 1: 55 | cur_end = letter 56 | else: 57 | cat_out.append((cur_start, cur_end)) 58 | cur_start = cur_end = letter 59 | cat_out.append((cur_start, cur_end)) 60 | return cat_out 61 | 62 | def ungroup_cat(cat): 63 | cat_out = [] 64 | for (lo, hi) in cat: 65 | while lo <= hi: 66 | cat_out.append(lo) 67 | lo += 1 68 | return cat_out 69 | 70 | def format_table_content(f, content, indent): 71 | line = " "*indent 72 | first = True 73 | for chunk in content.split(","): 74 | if len(line) + len(chunk) < 98: 75 | if first: 76 | line += chunk 77 | else: 78 | line += ", " + chunk 79 | first = False 80 | else: 81 | f.write(line + ",\n") 82 | line = " "*indent + chunk 83 | f.write(line) 84 | 85 | def load_properties(f, interestingprops): 86 | fetch(f) 87 | props = {} 88 | re1 = re.compile("^ *([0-9A-F]+) *; *(\w+)") 89 | re2 = re.compile("^ *([0-9A-F]+)\.\.([0-9A-F]+) *; *(\w+)") 90 | 91 | for line in fileinput.input(os.path.basename(f)): 92 | prop = None 93 | d_lo = 0 94 | d_hi = 0 95 | m = re1.match(line) 96 | if m: 97 | d_lo = m.group(1) 98 | d_hi = m.group(1) 99 | prop = m.group(2) 100 | else: 101 | m = re2.match(line) 102 | if m: 103 | d_lo = m.group(1) 104 | d_hi = m.group(2) 105 | prop = m.group(3) 106 | else: 107 | continue 108 | if interestingprops and prop not in interestingprops: 109 | continue 110 | d_lo = int(d_lo, 16) 111 | d_hi = int(d_hi, 16) 112 | if prop not in props: 113 | props[prop] = [] 114 | props[prop].append((d_lo, d_hi)) 115 | 116 | # optimize if possible 117 | for prop in props: 118 | props[prop] = group_cat(ungroup_cat(props[prop])) 119 | 120 | return props 121 | 122 | def escape_char(c): 123 | return "'\\u{%x}'" % c 124 | 125 | def emit_bsearch_range_table(f): 126 | f.write(""" 127 | fn bsearch_range_table(c: char, r: &[(char,char)]) -> bool { 128 | use core::cmp::Ordering::{Equal, Less, Greater}; 129 | 130 | r.binary_search_by(|&(lo,hi)| { 131 | // Because ASCII ranges are at the start of the tables, a search for an 132 | // ASCII char will involve more `Greater` results (i.e. the `(lo,hi)` 133 | // table entry is greater than `c`) than `Less` results. And given that 134 | // ASCII chars are so common, it makes sense to favor them. Therefore, 135 | // the `Greater` case is tested for before the `Less` case. 136 | if lo > c { Greater } 137 | else if hi < c { Less } 138 | else { Equal } 139 | }).is_ok() 140 | }\n 141 | """) 142 | 143 | def emit_table(f, name, t_data, t_type = "&[(char, char)]", is_pub=True, 144 | pfun=lambda x: "(%s,%s)" % (escape_char(x[0]), escape_char(x[1])), is_const=True): 145 | pub_string = "const" 146 | if not is_const: 147 | pub_string = "let" 148 | if is_pub: 149 | pub_string = "static" 150 | f.write(" %s %s: %s = &[\n" % (pub_string, name, t_type)) 151 | data = "" 152 | first = True 153 | for dat in t_data: 154 | if not first: 155 | data += "," 156 | first = False 157 | data += pfun(dat) 158 | format_table_content(f, data, 8) 159 | f.write("\n ];\n\n") 160 | 161 | def emit_property_module(f, mod, tbl, emit): 162 | f.write("pub mod %s {\n" % mod) 163 | for cat in sorted(emit): 164 | emit_table(f, "%s_table" % cat, tbl[cat]) 165 | f.write(" pub fn %s(c: char) -> bool {\n" % cat) 166 | f.write(" super::bsearch_range_table(c, %s_table)\n" % cat) 167 | f.write(" }\n\n") 168 | f.write("}\n\n") 169 | 170 | if __name__ == "__main__": 171 | r = "tables.rs" 172 | if os.path.exists(r): 173 | os.remove(r) 174 | with open(r, "w") as rf: 175 | # write the file's preamble 176 | rf.write(preamble) 177 | 178 | # download and parse all the data 179 | fetch("ReadMe.txt") 180 | with open("ReadMe.txt") as readme: 181 | pattern = "for Version (\d+)\.(\d+)\.(\d+) of the Unicode" 182 | unicode_version = re.search(pattern, readme.read()).groups() 183 | rf.write(""" 184 | /// The version of [Unicode](http://www.unicode.org/) 185 | /// that this version of unicode-xid is based on. 186 | pub const UNICODE_VERSION: (u64, u64, u64) = (%s, %s, %s); 187 | """ % unicode_version) 188 | emit_bsearch_range_table(rf) 189 | 190 | want_derived = ["XID_Start", "XID_Continue"] 191 | derived = load_properties("DerivedCoreProperties.txt", want_derived) 192 | emit_property_module(rf, "derived_property", derived, want_derived) 193 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2012-2025 The Rust Project Developers. See the COPYRIGHT 2 | // file at the top-level directory of this distribution and at 3 | // https://www.rust-lang.org/policies/licenses. 4 | // 5 | // Licensed under the Apache License, Version 2.0 or the MIT license 7 | // , at your 8 | // option. This file may not be copied, modified, or distributed 9 | // except according to those terms. 10 | 11 | //! Determine if a `char` is a valid identifier for a parser and/or lexer according to 12 | //! [Unicode Standard Annex #31](http://www.unicode.org/reports/tr31/) rules. 13 | //! 14 | //! ```rust 15 | //! use unicode_xid::UnicodeXID; 16 | //! 17 | //! fn main() { 18 | //! assert_eq!(UnicodeXID::is_xid_start('a'), true); // 'a' is a valid start of an identifier 19 | //! assert_eq!(UnicodeXID::is_xid_start('△'), false); // '△' is a NOT valid start of an identifier 20 | //! } 21 | //! ``` 22 | //! 23 | //! # features 24 | //! 25 | //! unicode-xid supports a `no_std` feature. This eliminates dependence 26 | //! on std, and instead uses equivalent functions from core. 27 | //! 28 | 29 | #![forbid(unsafe_code)] 30 | #![deny(missing_docs)] 31 | #![doc( 32 | html_logo_url = "https://unicode-rs.github.io/unicode-rs_sm.png", 33 | html_favicon_url = "https://unicode-rs.github.io/unicode-rs_sm.png" 34 | )] 35 | #![no_std] 36 | #![cfg_attr(feature = "bench", feature(test, unicode_internals))] 37 | 38 | #[cfg(test)] 39 | #[macro_use] 40 | extern crate std; 41 | 42 | #[cfg(feature = "bench")] 43 | extern crate test; 44 | 45 | use tables::derived_property; 46 | pub use tables::UNICODE_VERSION; 47 | 48 | mod tables; 49 | 50 | #[cfg(test)] 51 | mod tests; 52 | 53 | /// Methods for determining if a character is a valid identifier character. 54 | pub trait UnicodeXID { 55 | /// Returns whether the specified character satisfies the 'XID_Start' 56 | /// Unicode property. 57 | /// 58 | /// 'XID_Start' is a Unicode Derived Property specified in 59 | /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), 60 | /// mostly similar to ID_Start but modified for closure under NFKx. 61 | fn is_xid_start(self) -> bool; 62 | 63 | /// Returns whether the specified `char` satisfies the 'XID_Continue' 64 | /// Unicode property. 65 | /// 66 | /// 'XID_Continue' is a Unicode Derived Property specified in 67 | /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), 68 | /// mostly similar to 'ID_Continue' but modified for closure under NFKx. 69 | fn is_xid_continue(self) -> bool; 70 | } 71 | 72 | impl UnicodeXID for char { 73 | #[inline] 74 | fn is_xid_start(self) -> bool { 75 | // Fast-path for ascii idents 76 | ('a' <= self && self <= 'z') 77 | || ('A' <= self && self <= 'Z') 78 | || (self > '\x7f' && derived_property::XID_Start(self)) 79 | } 80 | 81 | #[inline] 82 | fn is_xid_continue(self) -> bool { 83 | // Fast-path for ascii idents 84 | ('a' <= self && self <= 'z') 85 | || ('A' <= self && self <= 'Z') 86 | || ('0' <= self && self <= '9') 87 | || self == '_' 88 | || (self > '\x7f' && derived_property::XID_Continue(self)) 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/tables.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2012-2025 The Rust Project Developers. See the COPYRIGHT 2 | // file at the top-level directory of this distribution and at 3 | // https://www.rust-lang.org/policies/licenses. 4 | // 5 | // Licensed under the Apache License, Version 2.0 or the MIT license 7 | // , at your 8 | // option. This file may not be copied, modified, or distributed 9 | // except according to those terms. 10 | 11 | // NOTE: The following code was generated by "scripts/unicode.py", do not edit directly 12 | 13 | #![allow(missing_docs, non_upper_case_globals, non_snake_case)] 14 | 15 | /// The version of [Unicode](http://www.unicode.org/) 16 | /// that this version of unicode-xid is based on. 17 | pub const UNICODE_VERSION: (u64, u64, u64) = (16, 0, 0); 18 | 19 | fn bsearch_range_table(c: char, r: &[(char, char)]) -> bool { 20 | use core::cmp::Ordering::{Equal, Greater, Less}; 21 | 22 | r.binary_search_by(|&(lo, hi)| { 23 | // Because ASCII ranges are at the start of the tables, a search for an 24 | // ASCII char will involve more `Greater` results (i.e. the `(lo,hi)` 25 | // table entry is greater than `c`) than `Less` results. And given that 26 | // ASCII chars are so common, it makes sense to favor them. Therefore, 27 | // the `Greater` case is tested for before the `Less` case. 28 | if lo > c { 29 | Greater 30 | } else if hi < c { 31 | Less 32 | } else { 33 | Equal 34 | } 35 | }) 36 | .is_ok() 37 | } 38 | 39 | pub mod derived_property { 40 | static XID_Continue_table: &[(char, char)] = &[ 41 | ('\u{30}', '\u{39}'), 42 | ('\u{41}', '\u{5a}'), 43 | ('\u{5f}', '\u{5f}'), 44 | ('\u{61}', '\u{7a}'), 45 | ('\u{aa}', '\u{aa}'), 46 | ('\u{b5}', '\u{b5}'), 47 | ('\u{b7}', '\u{b7}'), 48 | ('\u{ba}', '\u{ba}'), 49 | ('\u{c0}', '\u{d6}'), 50 | ('\u{d8}', '\u{f6}'), 51 | ('\u{f8}', '\u{2c1}'), 52 | ('\u{2c6}', '\u{2d1}'), 53 | ('\u{2e0}', '\u{2e4}'), 54 | ('\u{2ec}', '\u{2ec}'), 55 | ('\u{2ee}', '\u{2ee}'), 56 | ('\u{300}', '\u{374}'), 57 | ('\u{376}', '\u{377}'), 58 | ('\u{37b}', '\u{37d}'), 59 | ('\u{37f}', '\u{37f}'), 60 | ('\u{386}', '\u{38a}'), 61 | ('\u{38c}', '\u{38c}'), 62 | ('\u{38e}', '\u{3a1}'), 63 | ('\u{3a3}', '\u{3f5}'), 64 | ('\u{3f7}', '\u{481}'), 65 | ('\u{483}', '\u{487}'), 66 | ('\u{48a}', '\u{52f}'), 67 | ('\u{531}', '\u{556}'), 68 | ('\u{559}', '\u{559}'), 69 | ('\u{560}', '\u{588}'), 70 | ('\u{591}', '\u{5bd}'), 71 | ('\u{5bf}', '\u{5bf}'), 72 | ('\u{5c1}', '\u{5c2}'), 73 | ('\u{5c4}', '\u{5c5}'), 74 | ('\u{5c7}', '\u{5c7}'), 75 | ('\u{5d0}', '\u{5ea}'), 76 | ('\u{5ef}', '\u{5f2}'), 77 | ('\u{610}', '\u{61a}'), 78 | ('\u{620}', '\u{669}'), 79 | ('\u{66e}', '\u{6d3}'), 80 | ('\u{6d5}', '\u{6dc}'), 81 | ('\u{6df}', '\u{6e8}'), 82 | ('\u{6ea}', '\u{6fc}'), 83 | ('\u{6ff}', '\u{6ff}'), 84 | ('\u{710}', '\u{74a}'), 85 | ('\u{74d}', '\u{7b1}'), 86 | ('\u{7c0}', '\u{7f5}'), 87 | ('\u{7fa}', '\u{7fa}'), 88 | ('\u{7fd}', '\u{7fd}'), 89 | ('\u{800}', '\u{82d}'), 90 | ('\u{840}', '\u{85b}'), 91 | ('\u{860}', '\u{86a}'), 92 | ('\u{870}', '\u{887}'), 93 | ('\u{889}', '\u{88e}'), 94 | ('\u{897}', '\u{8e1}'), 95 | ('\u{8e3}', '\u{963}'), 96 | ('\u{966}', '\u{96f}'), 97 | ('\u{971}', '\u{983}'), 98 | ('\u{985}', '\u{98c}'), 99 | ('\u{98f}', '\u{990}'), 100 | ('\u{993}', '\u{9a8}'), 101 | ('\u{9aa}', '\u{9b0}'), 102 | ('\u{9b2}', '\u{9b2}'), 103 | ('\u{9b6}', '\u{9b9}'), 104 | ('\u{9bc}', '\u{9c4}'), 105 | ('\u{9c7}', '\u{9c8}'), 106 | ('\u{9cb}', '\u{9ce}'), 107 | ('\u{9d7}', '\u{9d7}'), 108 | ('\u{9dc}', '\u{9dd}'), 109 | ('\u{9df}', '\u{9e3}'), 110 | ('\u{9e6}', '\u{9f1}'), 111 | ('\u{9fc}', '\u{9fc}'), 112 | ('\u{9fe}', '\u{9fe}'), 113 | ('\u{a01}', '\u{a03}'), 114 | ('\u{a05}', '\u{a0a}'), 115 | ('\u{a0f}', '\u{a10}'), 116 | ('\u{a13}', '\u{a28}'), 117 | ('\u{a2a}', '\u{a30}'), 118 | ('\u{a32}', '\u{a33}'), 119 | ('\u{a35}', '\u{a36}'), 120 | ('\u{a38}', '\u{a39}'), 121 | ('\u{a3c}', '\u{a3c}'), 122 | ('\u{a3e}', '\u{a42}'), 123 | ('\u{a47}', '\u{a48}'), 124 | ('\u{a4b}', '\u{a4d}'), 125 | ('\u{a51}', '\u{a51}'), 126 | ('\u{a59}', '\u{a5c}'), 127 | ('\u{a5e}', '\u{a5e}'), 128 | ('\u{a66}', '\u{a75}'), 129 | ('\u{a81}', '\u{a83}'), 130 | ('\u{a85}', '\u{a8d}'), 131 | ('\u{a8f}', '\u{a91}'), 132 | ('\u{a93}', '\u{aa8}'), 133 | ('\u{aaa}', '\u{ab0}'), 134 | ('\u{ab2}', '\u{ab3}'), 135 | ('\u{ab5}', '\u{ab9}'), 136 | ('\u{abc}', '\u{ac5}'), 137 | ('\u{ac7}', '\u{ac9}'), 138 | ('\u{acb}', '\u{acd}'), 139 | ('\u{ad0}', '\u{ad0}'), 140 | ('\u{ae0}', '\u{ae3}'), 141 | ('\u{ae6}', '\u{aef}'), 142 | ('\u{af9}', '\u{aff}'), 143 | ('\u{b01}', '\u{b03}'), 144 | ('\u{b05}', '\u{b0c}'), 145 | ('\u{b0f}', '\u{b10}'), 146 | ('\u{b13}', '\u{b28}'), 147 | ('\u{b2a}', '\u{b30}'), 148 | ('\u{b32}', '\u{b33}'), 149 | ('\u{b35}', '\u{b39}'), 150 | ('\u{b3c}', '\u{b44}'), 151 | ('\u{b47}', '\u{b48}'), 152 | ('\u{b4b}', '\u{b4d}'), 153 | ('\u{b55}', '\u{b57}'), 154 | ('\u{b5c}', '\u{b5d}'), 155 | ('\u{b5f}', '\u{b63}'), 156 | ('\u{b66}', '\u{b6f}'), 157 | ('\u{b71}', '\u{b71}'), 158 | ('\u{b82}', '\u{b83}'), 159 | ('\u{b85}', '\u{b8a}'), 160 | ('\u{b8e}', '\u{b90}'), 161 | ('\u{b92}', '\u{b95}'), 162 | ('\u{b99}', '\u{b9a}'), 163 | ('\u{b9c}', '\u{b9c}'), 164 | ('\u{b9e}', '\u{b9f}'), 165 | ('\u{ba3}', '\u{ba4}'), 166 | ('\u{ba8}', '\u{baa}'), 167 | ('\u{bae}', '\u{bb9}'), 168 | ('\u{bbe}', '\u{bc2}'), 169 | ('\u{bc6}', '\u{bc8}'), 170 | ('\u{bca}', '\u{bcd}'), 171 | ('\u{bd0}', '\u{bd0}'), 172 | ('\u{bd7}', '\u{bd7}'), 173 | ('\u{be6}', '\u{bef}'), 174 | ('\u{c00}', '\u{c0c}'), 175 | ('\u{c0e}', '\u{c10}'), 176 | ('\u{c12}', '\u{c28}'), 177 | ('\u{c2a}', '\u{c39}'), 178 | ('\u{c3c}', '\u{c44}'), 179 | ('\u{c46}', '\u{c48}'), 180 | ('\u{c4a}', '\u{c4d}'), 181 | ('\u{c55}', '\u{c56}'), 182 | ('\u{c58}', '\u{c5a}'), 183 | ('\u{c5d}', '\u{c5d}'), 184 | ('\u{c60}', '\u{c63}'), 185 | ('\u{c66}', '\u{c6f}'), 186 | ('\u{c80}', '\u{c83}'), 187 | ('\u{c85}', '\u{c8c}'), 188 | ('\u{c8e}', '\u{c90}'), 189 | ('\u{c92}', '\u{ca8}'), 190 | ('\u{caa}', '\u{cb3}'), 191 | ('\u{cb5}', '\u{cb9}'), 192 | ('\u{cbc}', '\u{cc4}'), 193 | ('\u{cc6}', '\u{cc8}'), 194 | ('\u{cca}', '\u{ccd}'), 195 | ('\u{cd5}', '\u{cd6}'), 196 | ('\u{cdd}', '\u{cde}'), 197 | ('\u{ce0}', '\u{ce3}'), 198 | ('\u{ce6}', '\u{cef}'), 199 | ('\u{cf1}', '\u{cf3}'), 200 | ('\u{d00}', '\u{d0c}'), 201 | ('\u{d0e}', '\u{d10}'), 202 | ('\u{d12}', '\u{d44}'), 203 | ('\u{d46}', '\u{d48}'), 204 | ('\u{d4a}', '\u{d4e}'), 205 | ('\u{d54}', '\u{d57}'), 206 | ('\u{d5f}', '\u{d63}'), 207 | ('\u{d66}', '\u{d6f}'), 208 | ('\u{d7a}', '\u{d7f}'), 209 | ('\u{d81}', '\u{d83}'), 210 | ('\u{d85}', '\u{d96}'), 211 | ('\u{d9a}', '\u{db1}'), 212 | ('\u{db3}', '\u{dbb}'), 213 | ('\u{dbd}', '\u{dbd}'), 214 | ('\u{dc0}', '\u{dc6}'), 215 | ('\u{dca}', '\u{dca}'), 216 | ('\u{dcf}', '\u{dd4}'), 217 | ('\u{dd6}', '\u{dd6}'), 218 | ('\u{dd8}', '\u{ddf}'), 219 | ('\u{de6}', '\u{def}'), 220 | ('\u{df2}', '\u{df3}'), 221 | ('\u{e01}', '\u{e3a}'), 222 | ('\u{e40}', '\u{e4e}'), 223 | ('\u{e50}', '\u{e59}'), 224 | ('\u{e81}', '\u{e82}'), 225 | ('\u{e84}', '\u{e84}'), 226 | ('\u{e86}', '\u{e8a}'), 227 | ('\u{e8c}', '\u{ea3}'), 228 | ('\u{ea5}', '\u{ea5}'), 229 | ('\u{ea7}', '\u{ebd}'), 230 | ('\u{ec0}', '\u{ec4}'), 231 | ('\u{ec6}', '\u{ec6}'), 232 | ('\u{ec8}', '\u{ece}'), 233 | ('\u{ed0}', '\u{ed9}'), 234 | ('\u{edc}', '\u{edf}'), 235 | ('\u{f00}', '\u{f00}'), 236 | ('\u{f18}', '\u{f19}'), 237 | ('\u{f20}', '\u{f29}'), 238 | ('\u{f35}', '\u{f35}'), 239 | ('\u{f37}', '\u{f37}'), 240 | ('\u{f39}', '\u{f39}'), 241 | ('\u{f3e}', '\u{f47}'), 242 | ('\u{f49}', '\u{f6c}'), 243 | ('\u{f71}', '\u{f84}'), 244 | ('\u{f86}', '\u{f97}'), 245 | ('\u{f99}', '\u{fbc}'), 246 | ('\u{fc6}', '\u{fc6}'), 247 | ('\u{1000}', '\u{1049}'), 248 | ('\u{1050}', '\u{109d}'), 249 | ('\u{10a0}', '\u{10c5}'), 250 | ('\u{10c7}', '\u{10c7}'), 251 | ('\u{10cd}', '\u{10cd}'), 252 | ('\u{10d0}', '\u{10fa}'), 253 | ('\u{10fc}', '\u{1248}'), 254 | ('\u{124a}', '\u{124d}'), 255 | ('\u{1250}', '\u{1256}'), 256 | ('\u{1258}', '\u{1258}'), 257 | ('\u{125a}', '\u{125d}'), 258 | ('\u{1260}', '\u{1288}'), 259 | ('\u{128a}', '\u{128d}'), 260 | ('\u{1290}', '\u{12b0}'), 261 | ('\u{12b2}', '\u{12b5}'), 262 | ('\u{12b8}', '\u{12be}'), 263 | ('\u{12c0}', '\u{12c0}'), 264 | ('\u{12c2}', '\u{12c5}'), 265 | ('\u{12c8}', '\u{12d6}'), 266 | ('\u{12d8}', '\u{1310}'), 267 | ('\u{1312}', '\u{1315}'), 268 | ('\u{1318}', '\u{135a}'), 269 | ('\u{135d}', '\u{135f}'), 270 | ('\u{1369}', '\u{1371}'), 271 | ('\u{1380}', '\u{138f}'), 272 | ('\u{13a0}', '\u{13f5}'), 273 | ('\u{13f8}', '\u{13fd}'), 274 | ('\u{1401}', '\u{166c}'), 275 | ('\u{166f}', '\u{167f}'), 276 | ('\u{1681}', '\u{169a}'), 277 | ('\u{16a0}', '\u{16ea}'), 278 | ('\u{16ee}', '\u{16f8}'), 279 | ('\u{1700}', '\u{1715}'), 280 | ('\u{171f}', '\u{1734}'), 281 | ('\u{1740}', '\u{1753}'), 282 | ('\u{1760}', '\u{176c}'), 283 | ('\u{176e}', '\u{1770}'), 284 | ('\u{1772}', '\u{1773}'), 285 | ('\u{1780}', '\u{17d3}'), 286 | ('\u{17d7}', '\u{17d7}'), 287 | ('\u{17dc}', '\u{17dd}'), 288 | ('\u{17e0}', '\u{17e9}'), 289 | ('\u{180b}', '\u{180d}'), 290 | ('\u{180f}', '\u{1819}'), 291 | ('\u{1820}', '\u{1878}'), 292 | ('\u{1880}', '\u{18aa}'), 293 | ('\u{18b0}', '\u{18f5}'), 294 | ('\u{1900}', '\u{191e}'), 295 | ('\u{1920}', '\u{192b}'), 296 | ('\u{1930}', '\u{193b}'), 297 | ('\u{1946}', '\u{196d}'), 298 | ('\u{1970}', '\u{1974}'), 299 | ('\u{1980}', '\u{19ab}'), 300 | ('\u{19b0}', '\u{19c9}'), 301 | ('\u{19d0}', '\u{19da}'), 302 | ('\u{1a00}', '\u{1a1b}'), 303 | ('\u{1a20}', '\u{1a5e}'), 304 | ('\u{1a60}', '\u{1a7c}'), 305 | ('\u{1a7f}', '\u{1a89}'), 306 | ('\u{1a90}', '\u{1a99}'), 307 | ('\u{1aa7}', '\u{1aa7}'), 308 | ('\u{1ab0}', '\u{1abd}'), 309 | ('\u{1abf}', '\u{1ace}'), 310 | ('\u{1b00}', '\u{1b4c}'), 311 | ('\u{1b50}', '\u{1b59}'), 312 | ('\u{1b6b}', '\u{1b73}'), 313 | ('\u{1b80}', '\u{1bf3}'), 314 | ('\u{1c00}', '\u{1c37}'), 315 | ('\u{1c40}', '\u{1c49}'), 316 | ('\u{1c4d}', '\u{1c7d}'), 317 | ('\u{1c80}', '\u{1c8a}'), 318 | ('\u{1c90}', '\u{1cba}'), 319 | ('\u{1cbd}', '\u{1cbf}'), 320 | ('\u{1cd0}', '\u{1cd2}'), 321 | ('\u{1cd4}', '\u{1cfa}'), 322 | ('\u{1d00}', '\u{1f15}'), 323 | ('\u{1f18}', '\u{1f1d}'), 324 | ('\u{1f20}', '\u{1f45}'), 325 | ('\u{1f48}', '\u{1f4d}'), 326 | ('\u{1f50}', '\u{1f57}'), 327 | ('\u{1f59}', '\u{1f59}'), 328 | ('\u{1f5b}', '\u{1f5b}'), 329 | ('\u{1f5d}', '\u{1f5d}'), 330 | ('\u{1f5f}', '\u{1f7d}'), 331 | ('\u{1f80}', '\u{1fb4}'), 332 | ('\u{1fb6}', '\u{1fbc}'), 333 | ('\u{1fbe}', '\u{1fbe}'), 334 | ('\u{1fc2}', '\u{1fc4}'), 335 | ('\u{1fc6}', '\u{1fcc}'), 336 | ('\u{1fd0}', '\u{1fd3}'), 337 | ('\u{1fd6}', '\u{1fdb}'), 338 | ('\u{1fe0}', '\u{1fec}'), 339 | ('\u{1ff2}', '\u{1ff4}'), 340 | ('\u{1ff6}', '\u{1ffc}'), 341 | ('\u{200c}', '\u{200d}'), 342 | ('\u{203f}', '\u{2040}'), 343 | ('\u{2054}', '\u{2054}'), 344 | ('\u{2071}', '\u{2071}'), 345 | ('\u{207f}', '\u{207f}'), 346 | ('\u{2090}', '\u{209c}'), 347 | ('\u{20d0}', '\u{20dc}'), 348 | ('\u{20e1}', '\u{20e1}'), 349 | ('\u{20e5}', '\u{20f0}'), 350 | ('\u{2102}', '\u{2102}'), 351 | ('\u{2107}', '\u{2107}'), 352 | ('\u{210a}', '\u{2113}'), 353 | ('\u{2115}', '\u{2115}'), 354 | ('\u{2118}', '\u{211d}'), 355 | ('\u{2124}', '\u{2124}'), 356 | ('\u{2126}', '\u{2126}'), 357 | ('\u{2128}', '\u{2128}'), 358 | ('\u{212a}', '\u{2139}'), 359 | ('\u{213c}', '\u{213f}'), 360 | ('\u{2145}', '\u{2149}'), 361 | ('\u{214e}', '\u{214e}'), 362 | ('\u{2160}', '\u{2188}'), 363 | ('\u{2c00}', '\u{2ce4}'), 364 | ('\u{2ceb}', '\u{2cf3}'), 365 | ('\u{2d00}', '\u{2d25}'), 366 | ('\u{2d27}', '\u{2d27}'), 367 | ('\u{2d2d}', '\u{2d2d}'), 368 | ('\u{2d30}', '\u{2d67}'), 369 | ('\u{2d6f}', '\u{2d6f}'), 370 | ('\u{2d7f}', '\u{2d96}'), 371 | ('\u{2da0}', '\u{2da6}'), 372 | ('\u{2da8}', '\u{2dae}'), 373 | ('\u{2db0}', '\u{2db6}'), 374 | ('\u{2db8}', '\u{2dbe}'), 375 | ('\u{2dc0}', '\u{2dc6}'), 376 | ('\u{2dc8}', '\u{2dce}'), 377 | ('\u{2dd0}', '\u{2dd6}'), 378 | ('\u{2dd8}', '\u{2dde}'), 379 | ('\u{2de0}', '\u{2dff}'), 380 | ('\u{3005}', '\u{3007}'), 381 | ('\u{3021}', '\u{302f}'), 382 | ('\u{3031}', '\u{3035}'), 383 | ('\u{3038}', '\u{303c}'), 384 | ('\u{3041}', '\u{3096}'), 385 | ('\u{3099}', '\u{309a}'), 386 | ('\u{309d}', '\u{309f}'), 387 | ('\u{30a1}', '\u{30ff}'), 388 | ('\u{3105}', '\u{312f}'), 389 | ('\u{3131}', '\u{318e}'), 390 | ('\u{31a0}', '\u{31bf}'), 391 | ('\u{31f0}', '\u{31ff}'), 392 | ('\u{3400}', '\u{4dbf}'), 393 | ('\u{4e00}', '\u{a48c}'), 394 | ('\u{a4d0}', '\u{a4fd}'), 395 | ('\u{a500}', '\u{a60c}'), 396 | ('\u{a610}', '\u{a62b}'), 397 | ('\u{a640}', '\u{a66f}'), 398 | ('\u{a674}', '\u{a67d}'), 399 | ('\u{a67f}', '\u{a6f1}'), 400 | ('\u{a717}', '\u{a71f}'), 401 | ('\u{a722}', '\u{a788}'), 402 | ('\u{a78b}', '\u{a7cd}'), 403 | ('\u{a7d0}', '\u{a7d1}'), 404 | ('\u{a7d3}', '\u{a7d3}'), 405 | ('\u{a7d5}', '\u{a7dc}'), 406 | ('\u{a7f2}', '\u{a827}'), 407 | ('\u{a82c}', '\u{a82c}'), 408 | ('\u{a840}', '\u{a873}'), 409 | ('\u{a880}', '\u{a8c5}'), 410 | ('\u{a8d0}', '\u{a8d9}'), 411 | ('\u{a8e0}', '\u{a8f7}'), 412 | ('\u{a8fb}', '\u{a8fb}'), 413 | ('\u{a8fd}', '\u{a92d}'), 414 | ('\u{a930}', '\u{a953}'), 415 | ('\u{a960}', '\u{a97c}'), 416 | ('\u{a980}', '\u{a9c0}'), 417 | ('\u{a9cf}', '\u{a9d9}'), 418 | ('\u{a9e0}', '\u{a9fe}'), 419 | ('\u{aa00}', '\u{aa36}'), 420 | ('\u{aa40}', '\u{aa4d}'), 421 | ('\u{aa50}', '\u{aa59}'), 422 | ('\u{aa60}', '\u{aa76}'), 423 | ('\u{aa7a}', '\u{aac2}'), 424 | ('\u{aadb}', '\u{aadd}'), 425 | ('\u{aae0}', '\u{aaef}'), 426 | ('\u{aaf2}', '\u{aaf6}'), 427 | ('\u{ab01}', '\u{ab06}'), 428 | ('\u{ab09}', '\u{ab0e}'), 429 | ('\u{ab11}', '\u{ab16}'), 430 | ('\u{ab20}', '\u{ab26}'), 431 | ('\u{ab28}', '\u{ab2e}'), 432 | ('\u{ab30}', '\u{ab5a}'), 433 | ('\u{ab5c}', '\u{ab69}'), 434 | ('\u{ab70}', '\u{abea}'), 435 | ('\u{abec}', '\u{abed}'), 436 | ('\u{abf0}', '\u{abf9}'), 437 | ('\u{ac00}', '\u{d7a3}'), 438 | ('\u{d7b0}', '\u{d7c6}'), 439 | ('\u{d7cb}', '\u{d7fb}'), 440 | ('\u{f900}', '\u{fa6d}'), 441 | ('\u{fa70}', '\u{fad9}'), 442 | ('\u{fb00}', '\u{fb06}'), 443 | ('\u{fb13}', '\u{fb17}'), 444 | ('\u{fb1d}', '\u{fb28}'), 445 | ('\u{fb2a}', '\u{fb36}'), 446 | ('\u{fb38}', '\u{fb3c}'), 447 | ('\u{fb3e}', '\u{fb3e}'), 448 | ('\u{fb40}', '\u{fb41}'), 449 | ('\u{fb43}', '\u{fb44}'), 450 | ('\u{fb46}', '\u{fbb1}'), 451 | ('\u{fbd3}', '\u{fc5d}'), 452 | ('\u{fc64}', '\u{fd3d}'), 453 | ('\u{fd50}', '\u{fd8f}'), 454 | ('\u{fd92}', '\u{fdc7}'), 455 | ('\u{fdf0}', '\u{fdf9}'), 456 | ('\u{fe00}', '\u{fe0f}'), 457 | ('\u{fe20}', '\u{fe2f}'), 458 | ('\u{fe33}', '\u{fe34}'), 459 | ('\u{fe4d}', '\u{fe4f}'), 460 | ('\u{fe71}', '\u{fe71}'), 461 | ('\u{fe73}', '\u{fe73}'), 462 | ('\u{fe77}', '\u{fe77}'), 463 | ('\u{fe79}', '\u{fe79}'), 464 | ('\u{fe7b}', '\u{fe7b}'), 465 | ('\u{fe7d}', '\u{fe7d}'), 466 | ('\u{fe7f}', '\u{fefc}'), 467 | ('\u{ff10}', '\u{ff19}'), 468 | ('\u{ff21}', '\u{ff3a}'), 469 | ('\u{ff3f}', '\u{ff3f}'), 470 | ('\u{ff41}', '\u{ff5a}'), 471 | ('\u{ff65}', '\u{ffbe}'), 472 | ('\u{ffc2}', '\u{ffc7}'), 473 | ('\u{ffca}', '\u{ffcf}'), 474 | ('\u{ffd2}', '\u{ffd7}'), 475 | ('\u{ffda}', '\u{ffdc}'), 476 | ('\u{10000}', '\u{1000b}'), 477 | ('\u{1000d}', '\u{10026}'), 478 | ('\u{10028}', '\u{1003a}'), 479 | ('\u{1003c}', '\u{1003d}'), 480 | ('\u{1003f}', '\u{1004d}'), 481 | ('\u{10050}', '\u{1005d}'), 482 | ('\u{10080}', '\u{100fa}'), 483 | ('\u{10140}', '\u{10174}'), 484 | ('\u{101fd}', '\u{101fd}'), 485 | ('\u{10280}', '\u{1029c}'), 486 | ('\u{102a0}', '\u{102d0}'), 487 | ('\u{102e0}', '\u{102e0}'), 488 | ('\u{10300}', '\u{1031f}'), 489 | ('\u{1032d}', '\u{1034a}'), 490 | ('\u{10350}', '\u{1037a}'), 491 | ('\u{10380}', '\u{1039d}'), 492 | ('\u{103a0}', '\u{103c3}'), 493 | ('\u{103c8}', '\u{103cf}'), 494 | ('\u{103d1}', '\u{103d5}'), 495 | ('\u{10400}', '\u{1049d}'), 496 | ('\u{104a0}', '\u{104a9}'), 497 | ('\u{104b0}', '\u{104d3}'), 498 | ('\u{104d8}', '\u{104fb}'), 499 | ('\u{10500}', '\u{10527}'), 500 | ('\u{10530}', '\u{10563}'), 501 | ('\u{10570}', '\u{1057a}'), 502 | ('\u{1057c}', '\u{1058a}'), 503 | ('\u{1058c}', '\u{10592}'), 504 | ('\u{10594}', '\u{10595}'), 505 | ('\u{10597}', '\u{105a1}'), 506 | ('\u{105a3}', '\u{105b1}'), 507 | ('\u{105b3}', '\u{105b9}'), 508 | ('\u{105bb}', '\u{105bc}'), 509 | ('\u{105c0}', '\u{105f3}'), 510 | ('\u{10600}', '\u{10736}'), 511 | ('\u{10740}', '\u{10755}'), 512 | ('\u{10760}', '\u{10767}'), 513 | ('\u{10780}', '\u{10785}'), 514 | ('\u{10787}', '\u{107b0}'), 515 | ('\u{107b2}', '\u{107ba}'), 516 | ('\u{10800}', '\u{10805}'), 517 | ('\u{10808}', '\u{10808}'), 518 | ('\u{1080a}', '\u{10835}'), 519 | ('\u{10837}', '\u{10838}'), 520 | ('\u{1083c}', '\u{1083c}'), 521 | ('\u{1083f}', '\u{10855}'), 522 | ('\u{10860}', '\u{10876}'), 523 | ('\u{10880}', '\u{1089e}'), 524 | ('\u{108e0}', '\u{108f2}'), 525 | ('\u{108f4}', '\u{108f5}'), 526 | ('\u{10900}', '\u{10915}'), 527 | ('\u{10920}', '\u{10939}'), 528 | ('\u{10980}', '\u{109b7}'), 529 | ('\u{109be}', '\u{109bf}'), 530 | ('\u{10a00}', '\u{10a03}'), 531 | ('\u{10a05}', '\u{10a06}'), 532 | ('\u{10a0c}', '\u{10a13}'), 533 | ('\u{10a15}', '\u{10a17}'), 534 | ('\u{10a19}', '\u{10a35}'), 535 | ('\u{10a38}', '\u{10a3a}'), 536 | ('\u{10a3f}', '\u{10a3f}'), 537 | ('\u{10a60}', '\u{10a7c}'), 538 | ('\u{10a80}', '\u{10a9c}'), 539 | ('\u{10ac0}', '\u{10ac7}'), 540 | ('\u{10ac9}', '\u{10ae6}'), 541 | ('\u{10b00}', '\u{10b35}'), 542 | ('\u{10b40}', '\u{10b55}'), 543 | ('\u{10b60}', '\u{10b72}'), 544 | ('\u{10b80}', '\u{10b91}'), 545 | ('\u{10c00}', '\u{10c48}'), 546 | ('\u{10c80}', '\u{10cb2}'), 547 | ('\u{10cc0}', '\u{10cf2}'), 548 | ('\u{10d00}', '\u{10d27}'), 549 | ('\u{10d30}', '\u{10d39}'), 550 | ('\u{10d40}', '\u{10d65}'), 551 | ('\u{10d69}', '\u{10d6d}'), 552 | ('\u{10d6f}', '\u{10d85}'), 553 | ('\u{10e80}', '\u{10ea9}'), 554 | ('\u{10eab}', '\u{10eac}'), 555 | ('\u{10eb0}', '\u{10eb1}'), 556 | ('\u{10ec2}', '\u{10ec4}'), 557 | ('\u{10efc}', '\u{10f1c}'), 558 | ('\u{10f27}', '\u{10f27}'), 559 | ('\u{10f30}', '\u{10f50}'), 560 | ('\u{10f70}', '\u{10f85}'), 561 | ('\u{10fb0}', '\u{10fc4}'), 562 | ('\u{10fe0}', '\u{10ff6}'), 563 | ('\u{11000}', '\u{11046}'), 564 | ('\u{11066}', '\u{11075}'), 565 | ('\u{1107f}', '\u{110ba}'), 566 | ('\u{110c2}', '\u{110c2}'), 567 | ('\u{110d0}', '\u{110e8}'), 568 | ('\u{110f0}', '\u{110f9}'), 569 | ('\u{11100}', '\u{11134}'), 570 | ('\u{11136}', '\u{1113f}'), 571 | ('\u{11144}', '\u{11147}'), 572 | ('\u{11150}', '\u{11173}'), 573 | ('\u{11176}', '\u{11176}'), 574 | ('\u{11180}', '\u{111c4}'), 575 | ('\u{111c9}', '\u{111cc}'), 576 | ('\u{111ce}', '\u{111da}'), 577 | ('\u{111dc}', '\u{111dc}'), 578 | ('\u{11200}', '\u{11211}'), 579 | ('\u{11213}', '\u{11237}'), 580 | ('\u{1123e}', '\u{11241}'), 581 | ('\u{11280}', '\u{11286}'), 582 | ('\u{11288}', '\u{11288}'), 583 | ('\u{1128a}', '\u{1128d}'), 584 | ('\u{1128f}', '\u{1129d}'), 585 | ('\u{1129f}', '\u{112a8}'), 586 | ('\u{112b0}', '\u{112ea}'), 587 | ('\u{112f0}', '\u{112f9}'), 588 | ('\u{11300}', '\u{11303}'), 589 | ('\u{11305}', '\u{1130c}'), 590 | ('\u{1130f}', '\u{11310}'), 591 | ('\u{11313}', '\u{11328}'), 592 | ('\u{1132a}', '\u{11330}'), 593 | ('\u{11332}', '\u{11333}'), 594 | ('\u{11335}', '\u{11339}'), 595 | ('\u{1133b}', '\u{11344}'), 596 | ('\u{11347}', '\u{11348}'), 597 | ('\u{1134b}', '\u{1134d}'), 598 | ('\u{11350}', '\u{11350}'), 599 | ('\u{11357}', '\u{11357}'), 600 | ('\u{1135d}', '\u{11363}'), 601 | ('\u{11366}', '\u{1136c}'), 602 | ('\u{11370}', '\u{11374}'), 603 | ('\u{11380}', '\u{11389}'), 604 | ('\u{1138b}', '\u{1138b}'), 605 | ('\u{1138e}', '\u{1138e}'), 606 | ('\u{11390}', '\u{113b5}'), 607 | ('\u{113b7}', '\u{113c0}'), 608 | ('\u{113c2}', '\u{113c2}'), 609 | ('\u{113c5}', '\u{113c5}'), 610 | ('\u{113c7}', '\u{113ca}'), 611 | ('\u{113cc}', '\u{113d3}'), 612 | ('\u{113e1}', '\u{113e2}'), 613 | ('\u{11400}', '\u{1144a}'), 614 | ('\u{11450}', '\u{11459}'), 615 | ('\u{1145e}', '\u{11461}'), 616 | ('\u{11480}', '\u{114c5}'), 617 | ('\u{114c7}', '\u{114c7}'), 618 | ('\u{114d0}', '\u{114d9}'), 619 | ('\u{11580}', '\u{115b5}'), 620 | ('\u{115b8}', '\u{115c0}'), 621 | ('\u{115d8}', '\u{115dd}'), 622 | ('\u{11600}', '\u{11640}'), 623 | ('\u{11644}', '\u{11644}'), 624 | ('\u{11650}', '\u{11659}'), 625 | ('\u{11680}', '\u{116b8}'), 626 | ('\u{116c0}', '\u{116c9}'), 627 | ('\u{116d0}', '\u{116e3}'), 628 | ('\u{11700}', '\u{1171a}'), 629 | ('\u{1171d}', '\u{1172b}'), 630 | ('\u{11730}', '\u{11739}'), 631 | ('\u{11740}', '\u{11746}'), 632 | ('\u{11800}', '\u{1183a}'), 633 | ('\u{118a0}', '\u{118e9}'), 634 | ('\u{118ff}', '\u{11906}'), 635 | ('\u{11909}', '\u{11909}'), 636 | ('\u{1190c}', '\u{11913}'), 637 | ('\u{11915}', '\u{11916}'), 638 | ('\u{11918}', '\u{11935}'), 639 | ('\u{11937}', '\u{11938}'), 640 | ('\u{1193b}', '\u{11943}'), 641 | ('\u{11950}', '\u{11959}'), 642 | ('\u{119a0}', '\u{119a7}'), 643 | ('\u{119aa}', '\u{119d7}'), 644 | ('\u{119da}', '\u{119e1}'), 645 | ('\u{119e3}', '\u{119e4}'), 646 | ('\u{11a00}', '\u{11a3e}'), 647 | ('\u{11a47}', '\u{11a47}'), 648 | ('\u{11a50}', '\u{11a99}'), 649 | ('\u{11a9d}', '\u{11a9d}'), 650 | ('\u{11ab0}', '\u{11af8}'), 651 | ('\u{11bc0}', '\u{11be0}'), 652 | ('\u{11bf0}', '\u{11bf9}'), 653 | ('\u{11c00}', '\u{11c08}'), 654 | ('\u{11c0a}', '\u{11c36}'), 655 | ('\u{11c38}', '\u{11c40}'), 656 | ('\u{11c50}', '\u{11c59}'), 657 | ('\u{11c72}', '\u{11c8f}'), 658 | ('\u{11c92}', '\u{11ca7}'), 659 | ('\u{11ca9}', '\u{11cb6}'), 660 | ('\u{11d00}', '\u{11d06}'), 661 | ('\u{11d08}', '\u{11d09}'), 662 | ('\u{11d0b}', '\u{11d36}'), 663 | ('\u{11d3a}', '\u{11d3a}'), 664 | ('\u{11d3c}', '\u{11d3d}'), 665 | ('\u{11d3f}', '\u{11d47}'), 666 | ('\u{11d50}', '\u{11d59}'), 667 | ('\u{11d60}', '\u{11d65}'), 668 | ('\u{11d67}', '\u{11d68}'), 669 | ('\u{11d6a}', '\u{11d8e}'), 670 | ('\u{11d90}', '\u{11d91}'), 671 | ('\u{11d93}', '\u{11d98}'), 672 | ('\u{11da0}', '\u{11da9}'), 673 | ('\u{11ee0}', '\u{11ef6}'), 674 | ('\u{11f00}', '\u{11f10}'), 675 | ('\u{11f12}', '\u{11f3a}'), 676 | ('\u{11f3e}', '\u{11f42}'), 677 | ('\u{11f50}', '\u{11f5a}'), 678 | ('\u{11fb0}', '\u{11fb0}'), 679 | ('\u{12000}', '\u{12399}'), 680 | ('\u{12400}', '\u{1246e}'), 681 | ('\u{12480}', '\u{12543}'), 682 | ('\u{12f90}', '\u{12ff0}'), 683 | ('\u{13000}', '\u{1342f}'), 684 | ('\u{13440}', '\u{13455}'), 685 | ('\u{13460}', '\u{143fa}'), 686 | ('\u{14400}', '\u{14646}'), 687 | ('\u{16100}', '\u{16139}'), 688 | ('\u{16800}', '\u{16a38}'), 689 | ('\u{16a40}', '\u{16a5e}'), 690 | ('\u{16a60}', '\u{16a69}'), 691 | ('\u{16a70}', '\u{16abe}'), 692 | ('\u{16ac0}', '\u{16ac9}'), 693 | ('\u{16ad0}', '\u{16aed}'), 694 | ('\u{16af0}', '\u{16af4}'), 695 | ('\u{16b00}', '\u{16b36}'), 696 | ('\u{16b40}', '\u{16b43}'), 697 | ('\u{16b50}', '\u{16b59}'), 698 | ('\u{16b63}', '\u{16b77}'), 699 | ('\u{16b7d}', '\u{16b8f}'), 700 | ('\u{16d40}', '\u{16d6c}'), 701 | ('\u{16d70}', '\u{16d79}'), 702 | ('\u{16e40}', '\u{16e7f}'), 703 | ('\u{16f00}', '\u{16f4a}'), 704 | ('\u{16f4f}', '\u{16f87}'), 705 | ('\u{16f8f}', '\u{16f9f}'), 706 | ('\u{16fe0}', '\u{16fe1}'), 707 | ('\u{16fe3}', '\u{16fe4}'), 708 | ('\u{16ff0}', '\u{16ff1}'), 709 | ('\u{17000}', '\u{187f7}'), 710 | ('\u{18800}', '\u{18cd5}'), 711 | ('\u{18cff}', '\u{18d08}'), 712 | ('\u{1aff0}', '\u{1aff3}'), 713 | ('\u{1aff5}', '\u{1affb}'), 714 | ('\u{1affd}', '\u{1affe}'), 715 | ('\u{1b000}', '\u{1b122}'), 716 | ('\u{1b132}', '\u{1b132}'), 717 | ('\u{1b150}', '\u{1b152}'), 718 | ('\u{1b155}', '\u{1b155}'), 719 | ('\u{1b164}', '\u{1b167}'), 720 | ('\u{1b170}', '\u{1b2fb}'), 721 | ('\u{1bc00}', '\u{1bc6a}'), 722 | ('\u{1bc70}', '\u{1bc7c}'), 723 | ('\u{1bc80}', '\u{1bc88}'), 724 | ('\u{1bc90}', '\u{1bc99}'), 725 | ('\u{1bc9d}', '\u{1bc9e}'), 726 | ('\u{1ccf0}', '\u{1ccf9}'), 727 | ('\u{1cf00}', '\u{1cf2d}'), 728 | ('\u{1cf30}', '\u{1cf46}'), 729 | ('\u{1d165}', '\u{1d169}'), 730 | ('\u{1d16d}', '\u{1d172}'), 731 | ('\u{1d17b}', '\u{1d182}'), 732 | ('\u{1d185}', '\u{1d18b}'), 733 | ('\u{1d1aa}', '\u{1d1ad}'), 734 | ('\u{1d242}', '\u{1d244}'), 735 | ('\u{1d400}', '\u{1d454}'), 736 | ('\u{1d456}', '\u{1d49c}'), 737 | ('\u{1d49e}', '\u{1d49f}'), 738 | ('\u{1d4a2}', '\u{1d4a2}'), 739 | ('\u{1d4a5}', '\u{1d4a6}'), 740 | ('\u{1d4a9}', '\u{1d4ac}'), 741 | ('\u{1d4ae}', '\u{1d4b9}'), 742 | ('\u{1d4bb}', '\u{1d4bb}'), 743 | ('\u{1d4bd}', '\u{1d4c3}'), 744 | ('\u{1d4c5}', '\u{1d505}'), 745 | ('\u{1d507}', '\u{1d50a}'), 746 | ('\u{1d50d}', '\u{1d514}'), 747 | ('\u{1d516}', '\u{1d51c}'), 748 | ('\u{1d51e}', '\u{1d539}'), 749 | ('\u{1d53b}', '\u{1d53e}'), 750 | ('\u{1d540}', '\u{1d544}'), 751 | ('\u{1d546}', '\u{1d546}'), 752 | ('\u{1d54a}', '\u{1d550}'), 753 | ('\u{1d552}', '\u{1d6a5}'), 754 | ('\u{1d6a8}', '\u{1d6c0}'), 755 | ('\u{1d6c2}', '\u{1d6da}'), 756 | ('\u{1d6dc}', '\u{1d6fa}'), 757 | ('\u{1d6fc}', '\u{1d714}'), 758 | ('\u{1d716}', '\u{1d734}'), 759 | ('\u{1d736}', '\u{1d74e}'), 760 | ('\u{1d750}', '\u{1d76e}'), 761 | ('\u{1d770}', '\u{1d788}'), 762 | ('\u{1d78a}', '\u{1d7a8}'), 763 | ('\u{1d7aa}', '\u{1d7c2}'), 764 | ('\u{1d7c4}', '\u{1d7cb}'), 765 | ('\u{1d7ce}', '\u{1d7ff}'), 766 | ('\u{1da00}', '\u{1da36}'), 767 | ('\u{1da3b}', '\u{1da6c}'), 768 | ('\u{1da75}', '\u{1da75}'), 769 | ('\u{1da84}', '\u{1da84}'), 770 | ('\u{1da9b}', '\u{1da9f}'), 771 | ('\u{1daa1}', '\u{1daaf}'), 772 | ('\u{1df00}', '\u{1df1e}'), 773 | ('\u{1df25}', '\u{1df2a}'), 774 | ('\u{1e000}', '\u{1e006}'), 775 | ('\u{1e008}', '\u{1e018}'), 776 | ('\u{1e01b}', '\u{1e021}'), 777 | ('\u{1e023}', '\u{1e024}'), 778 | ('\u{1e026}', '\u{1e02a}'), 779 | ('\u{1e030}', '\u{1e06d}'), 780 | ('\u{1e08f}', '\u{1e08f}'), 781 | ('\u{1e100}', '\u{1e12c}'), 782 | ('\u{1e130}', '\u{1e13d}'), 783 | ('\u{1e140}', '\u{1e149}'), 784 | ('\u{1e14e}', '\u{1e14e}'), 785 | ('\u{1e290}', '\u{1e2ae}'), 786 | ('\u{1e2c0}', '\u{1e2f9}'), 787 | ('\u{1e4d0}', '\u{1e4f9}'), 788 | ('\u{1e5d0}', '\u{1e5fa}'), 789 | ('\u{1e7e0}', '\u{1e7e6}'), 790 | ('\u{1e7e8}', '\u{1e7eb}'), 791 | ('\u{1e7ed}', '\u{1e7ee}'), 792 | ('\u{1e7f0}', '\u{1e7fe}'), 793 | ('\u{1e800}', '\u{1e8c4}'), 794 | ('\u{1e8d0}', '\u{1e8d6}'), 795 | ('\u{1e900}', '\u{1e94b}'), 796 | ('\u{1e950}', '\u{1e959}'), 797 | ('\u{1ee00}', '\u{1ee03}'), 798 | ('\u{1ee05}', '\u{1ee1f}'), 799 | ('\u{1ee21}', '\u{1ee22}'), 800 | ('\u{1ee24}', '\u{1ee24}'), 801 | ('\u{1ee27}', '\u{1ee27}'), 802 | ('\u{1ee29}', '\u{1ee32}'), 803 | ('\u{1ee34}', '\u{1ee37}'), 804 | ('\u{1ee39}', '\u{1ee39}'), 805 | ('\u{1ee3b}', '\u{1ee3b}'), 806 | ('\u{1ee42}', '\u{1ee42}'), 807 | ('\u{1ee47}', '\u{1ee47}'), 808 | ('\u{1ee49}', '\u{1ee49}'), 809 | ('\u{1ee4b}', '\u{1ee4b}'), 810 | ('\u{1ee4d}', '\u{1ee4f}'), 811 | ('\u{1ee51}', '\u{1ee52}'), 812 | ('\u{1ee54}', '\u{1ee54}'), 813 | ('\u{1ee57}', '\u{1ee57}'), 814 | ('\u{1ee59}', '\u{1ee59}'), 815 | ('\u{1ee5b}', '\u{1ee5b}'), 816 | ('\u{1ee5d}', '\u{1ee5d}'), 817 | ('\u{1ee5f}', '\u{1ee5f}'), 818 | ('\u{1ee61}', '\u{1ee62}'), 819 | ('\u{1ee64}', '\u{1ee64}'), 820 | ('\u{1ee67}', '\u{1ee6a}'), 821 | ('\u{1ee6c}', '\u{1ee72}'), 822 | ('\u{1ee74}', '\u{1ee77}'), 823 | ('\u{1ee79}', '\u{1ee7c}'), 824 | ('\u{1ee7e}', '\u{1ee7e}'), 825 | ('\u{1ee80}', '\u{1ee89}'), 826 | ('\u{1ee8b}', '\u{1ee9b}'), 827 | ('\u{1eea1}', '\u{1eea3}'), 828 | ('\u{1eea5}', '\u{1eea9}'), 829 | ('\u{1eeab}', '\u{1eebb}'), 830 | ('\u{1fbf0}', '\u{1fbf9}'), 831 | ('\u{20000}', '\u{2a6df}'), 832 | ('\u{2a700}', '\u{2b739}'), 833 | ('\u{2b740}', '\u{2b81d}'), 834 | ('\u{2b820}', '\u{2cea1}'), 835 | ('\u{2ceb0}', '\u{2ebe0}'), 836 | ('\u{2ebf0}', '\u{2ee5d}'), 837 | ('\u{2f800}', '\u{2fa1d}'), 838 | ('\u{30000}', '\u{3134a}'), 839 | ('\u{31350}', '\u{323af}'), 840 | ('\u{e0100}', '\u{e01ef}'), 841 | ]; 842 | 843 | pub fn XID_Continue(c: char) -> bool { 844 | super::bsearch_range_table(c, XID_Continue_table) 845 | } 846 | 847 | static XID_Start_table: &[(char, char)] = &[ 848 | ('\u{41}', '\u{5a}'), 849 | ('\u{61}', '\u{7a}'), 850 | ('\u{aa}', '\u{aa}'), 851 | ('\u{b5}', '\u{b5}'), 852 | ('\u{ba}', '\u{ba}'), 853 | ('\u{c0}', '\u{d6}'), 854 | ('\u{d8}', '\u{f6}'), 855 | ('\u{f8}', '\u{2c1}'), 856 | ('\u{2c6}', '\u{2d1}'), 857 | ('\u{2e0}', '\u{2e4}'), 858 | ('\u{2ec}', '\u{2ec}'), 859 | ('\u{2ee}', '\u{2ee}'), 860 | ('\u{370}', '\u{374}'), 861 | ('\u{376}', '\u{377}'), 862 | ('\u{37b}', '\u{37d}'), 863 | ('\u{37f}', '\u{37f}'), 864 | ('\u{386}', '\u{386}'), 865 | ('\u{388}', '\u{38a}'), 866 | ('\u{38c}', '\u{38c}'), 867 | ('\u{38e}', '\u{3a1}'), 868 | ('\u{3a3}', '\u{3f5}'), 869 | ('\u{3f7}', '\u{481}'), 870 | ('\u{48a}', '\u{52f}'), 871 | ('\u{531}', '\u{556}'), 872 | ('\u{559}', '\u{559}'), 873 | ('\u{560}', '\u{588}'), 874 | ('\u{5d0}', '\u{5ea}'), 875 | ('\u{5ef}', '\u{5f2}'), 876 | ('\u{620}', '\u{64a}'), 877 | ('\u{66e}', '\u{66f}'), 878 | ('\u{671}', '\u{6d3}'), 879 | ('\u{6d5}', '\u{6d5}'), 880 | ('\u{6e5}', '\u{6e6}'), 881 | ('\u{6ee}', '\u{6ef}'), 882 | ('\u{6fa}', '\u{6fc}'), 883 | ('\u{6ff}', '\u{6ff}'), 884 | ('\u{710}', '\u{710}'), 885 | ('\u{712}', '\u{72f}'), 886 | ('\u{74d}', '\u{7a5}'), 887 | ('\u{7b1}', '\u{7b1}'), 888 | ('\u{7ca}', '\u{7ea}'), 889 | ('\u{7f4}', '\u{7f5}'), 890 | ('\u{7fa}', '\u{7fa}'), 891 | ('\u{800}', '\u{815}'), 892 | ('\u{81a}', '\u{81a}'), 893 | ('\u{824}', '\u{824}'), 894 | ('\u{828}', '\u{828}'), 895 | ('\u{840}', '\u{858}'), 896 | ('\u{860}', '\u{86a}'), 897 | ('\u{870}', '\u{887}'), 898 | ('\u{889}', '\u{88e}'), 899 | ('\u{8a0}', '\u{8c9}'), 900 | ('\u{904}', '\u{939}'), 901 | ('\u{93d}', '\u{93d}'), 902 | ('\u{950}', '\u{950}'), 903 | ('\u{958}', '\u{961}'), 904 | ('\u{971}', '\u{980}'), 905 | ('\u{985}', '\u{98c}'), 906 | ('\u{98f}', '\u{990}'), 907 | ('\u{993}', '\u{9a8}'), 908 | ('\u{9aa}', '\u{9b0}'), 909 | ('\u{9b2}', '\u{9b2}'), 910 | ('\u{9b6}', '\u{9b9}'), 911 | ('\u{9bd}', '\u{9bd}'), 912 | ('\u{9ce}', '\u{9ce}'), 913 | ('\u{9dc}', '\u{9dd}'), 914 | ('\u{9df}', '\u{9e1}'), 915 | ('\u{9f0}', '\u{9f1}'), 916 | ('\u{9fc}', '\u{9fc}'), 917 | ('\u{a05}', '\u{a0a}'), 918 | ('\u{a0f}', '\u{a10}'), 919 | ('\u{a13}', '\u{a28}'), 920 | ('\u{a2a}', '\u{a30}'), 921 | ('\u{a32}', '\u{a33}'), 922 | ('\u{a35}', '\u{a36}'), 923 | ('\u{a38}', '\u{a39}'), 924 | ('\u{a59}', '\u{a5c}'), 925 | ('\u{a5e}', '\u{a5e}'), 926 | ('\u{a72}', '\u{a74}'), 927 | ('\u{a85}', '\u{a8d}'), 928 | ('\u{a8f}', '\u{a91}'), 929 | ('\u{a93}', '\u{aa8}'), 930 | ('\u{aaa}', '\u{ab0}'), 931 | ('\u{ab2}', '\u{ab3}'), 932 | ('\u{ab5}', '\u{ab9}'), 933 | ('\u{abd}', '\u{abd}'), 934 | ('\u{ad0}', '\u{ad0}'), 935 | ('\u{ae0}', '\u{ae1}'), 936 | ('\u{af9}', '\u{af9}'), 937 | ('\u{b05}', '\u{b0c}'), 938 | ('\u{b0f}', '\u{b10}'), 939 | ('\u{b13}', '\u{b28}'), 940 | ('\u{b2a}', '\u{b30}'), 941 | ('\u{b32}', '\u{b33}'), 942 | ('\u{b35}', '\u{b39}'), 943 | ('\u{b3d}', '\u{b3d}'), 944 | ('\u{b5c}', '\u{b5d}'), 945 | ('\u{b5f}', '\u{b61}'), 946 | ('\u{b71}', '\u{b71}'), 947 | ('\u{b83}', '\u{b83}'), 948 | ('\u{b85}', '\u{b8a}'), 949 | ('\u{b8e}', '\u{b90}'), 950 | ('\u{b92}', '\u{b95}'), 951 | ('\u{b99}', '\u{b9a}'), 952 | ('\u{b9c}', '\u{b9c}'), 953 | ('\u{b9e}', '\u{b9f}'), 954 | ('\u{ba3}', '\u{ba4}'), 955 | ('\u{ba8}', '\u{baa}'), 956 | ('\u{bae}', '\u{bb9}'), 957 | ('\u{bd0}', '\u{bd0}'), 958 | ('\u{c05}', '\u{c0c}'), 959 | ('\u{c0e}', '\u{c10}'), 960 | ('\u{c12}', '\u{c28}'), 961 | ('\u{c2a}', '\u{c39}'), 962 | ('\u{c3d}', '\u{c3d}'), 963 | ('\u{c58}', '\u{c5a}'), 964 | ('\u{c5d}', '\u{c5d}'), 965 | ('\u{c60}', '\u{c61}'), 966 | ('\u{c80}', '\u{c80}'), 967 | ('\u{c85}', '\u{c8c}'), 968 | ('\u{c8e}', '\u{c90}'), 969 | ('\u{c92}', '\u{ca8}'), 970 | ('\u{caa}', '\u{cb3}'), 971 | ('\u{cb5}', '\u{cb9}'), 972 | ('\u{cbd}', '\u{cbd}'), 973 | ('\u{cdd}', '\u{cde}'), 974 | ('\u{ce0}', '\u{ce1}'), 975 | ('\u{cf1}', '\u{cf2}'), 976 | ('\u{d04}', '\u{d0c}'), 977 | ('\u{d0e}', '\u{d10}'), 978 | ('\u{d12}', '\u{d3a}'), 979 | ('\u{d3d}', '\u{d3d}'), 980 | ('\u{d4e}', '\u{d4e}'), 981 | ('\u{d54}', '\u{d56}'), 982 | ('\u{d5f}', '\u{d61}'), 983 | ('\u{d7a}', '\u{d7f}'), 984 | ('\u{d85}', '\u{d96}'), 985 | ('\u{d9a}', '\u{db1}'), 986 | ('\u{db3}', '\u{dbb}'), 987 | ('\u{dbd}', '\u{dbd}'), 988 | ('\u{dc0}', '\u{dc6}'), 989 | ('\u{e01}', '\u{e30}'), 990 | ('\u{e32}', '\u{e32}'), 991 | ('\u{e40}', '\u{e46}'), 992 | ('\u{e81}', '\u{e82}'), 993 | ('\u{e84}', '\u{e84}'), 994 | ('\u{e86}', '\u{e8a}'), 995 | ('\u{e8c}', '\u{ea3}'), 996 | ('\u{ea5}', '\u{ea5}'), 997 | ('\u{ea7}', '\u{eb0}'), 998 | ('\u{eb2}', '\u{eb2}'), 999 | ('\u{ebd}', '\u{ebd}'), 1000 | ('\u{ec0}', '\u{ec4}'), 1001 | ('\u{ec6}', '\u{ec6}'), 1002 | ('\u{edc}', '\u{edf}'), 1003 | ('\u{f00}', '\u{f00}'), 1004 | ('\u{f40}', '\u{f47}'), 1005 | ('\u{f49}', '\u{f6c}'), 1006 | ('\u{f88}', '\u{f8c}'), 1007 | ('\u{1000}', '\u{102a}'), 1008 | ('\u{103f}', '\u{103f}'), 1009 | ('\u{1050}', '\u{1055}'), 1010 | ('\u{105a}', '\u{105d}'), 1011 | ('\u{1061}', '\u{1061}'), 1012 | ('\u{1065}', '\u{1066}'), 1013 | ('\u{106e}', '\u{1070}'), 1014 | ('\u{1075}', '\u{1081}'), 1015 | ('\u{108e}', '\u{108e}'), 1016 | ('\u{10a0}', '\u{10c5}'), 1017 | ('\u{10c7}', '\u{10c7}'), 1018 | ('\u{10cd}', '\u{10cd}'), 1019 | ('\u{10d0}', '\u{10fa}'), 1020 | ('\u{10fc}', '\u{1248}'), 1021 | ('\u{124a}', '\u{124d}'), 1022 | ('\u{1250}', '\u{1256}'), 1023 | ('\u{1258}', '\u{1258}'), 1024 | ('\u{125a}', '\u{125d}'), 1025 | ('\u{1260}', '\u{1288}'), 1026 | ('\u{128a}', '\u{128d}'), 1027 | ('\u{1290}', '\u{12b0}'), 1028 | ('\u{12b2}', '\u{12b5}'), 1029 | ('\u{12b8}', '\u{12be}'), 1030 | ('\u{12c0}', '\u{12c0}'), 1031 | ('\u{12c2}', '\u{12c5}'), 1032 | ('\u{12c8}', '\u{12d6}'), 1033 | ('\u{12d8}', '\u{1310}'), 1034 | ('\u{1312}', '\u{1315}'), 1035 | ('\u{1318}', '\u{135a}'), 1036 | ('\u{1380}', '\u{138f}'), 1037 | ('\u{13a0}', '\u{13f5}'), 1038 | ('\u{13f8}', '\u{13fd}'), 1039 | ('\u{1401}', '\u{166c}'), 1040 | ('\u{166f}', '\u{167f}'), 1041 | ('\u{1681}', '\u{169a}'), 1042 | ('\u{16a0}', '\u{16ea}'), 1043 | ('\u{16ee}', '\u{16f8}'), 1044 | ('\u{1700}', '\u{1711}'), 1045 | ('\u{171f}', '\u{1731}'), 1046 | ('\u{1740}', '\u{1751}'), 1047 | ('\u{1760}', '\u{176c}'), 1048 | ('\u{176e}', '\u{1770}'), 1049 | ('\u{1780}', '\u{17b3}'), 1050 | ('\u{17d7}', '\u{17d7}'), 1051 | ('\u{17dc}', '\u{17dc}'), 1052 | ('\u{1820}', '\u{1878}'), 1053 | ('\u{1880}', '\u{18a8}'), 1054 | ('\u{18aa}', '\u{18aa}'), 1055 | ('\u{18b0}', '\u{18f5}'), 1056 | ('\u{1900}', '\u{191e}'), 1057 | ('\u{1950}', '\u{196d}'), 1058 | ('\u{1970}', '\u{1974}'), 1059 | ('\u{1980}', '\u{19ab}'), 1060 | ('\u{19b0}', '\u{19c9}'), 1061 | ('\u{1a00}', '\u{1a16}'), 1062 | ('\u{1a20}', '\u{1a54}'), 1063 | ('\u{1aa7}', '\u{1aa7}'), 1064 | ('\u{1b05}', '\u{1b33}'), 1065 | ('\u{1b45}', '\u{1b4c}'), 1066 | ('\u{1b83}', '\u{1ba0}'), 1067 | ('\u{1bae}', '\u{1baf}'), 1068 | ('\u{1bba}', '\u{1be5}'), 1069 | ('\u{1c00}', '\u{1c23}'), 1070 | ('\u{1c4d}', '\u{1c4f}'), 1071 | ('\u{1c5a}', '\u{1c7d}'), 1072 | ('\u{1c80}', '\u{1c8a}'), 1073 | ('\u{1c90}', '\u{1cba}'), 1074 | ('\u{1cbd}', '\u{1cbf}'), 1075 | ('\u{1ce9}', '\u{1cec}'), 1076 | ('\u{1cee}', '\u{1cf3}'), 1077 | ('\u{1cf5}', '\u{1cf6}'), 1078 | ('\u{1cfa}', '\u{1cfa}'), 1079 | ('\u{1d00}', '\u{1dbf}'), 1080 | ('\u{1e00}', '\u{1f15}'), 1081 | ('\u{1f18}', '\u{1f1d}'), 1082 | ('\u{1f20}', '\u{1f45}'), 1083 | ('\u{1f48}', '\u{1f4d}'), 1084 | ('\u{1f50}', '\u{1f57}'), 1085 | ('\u{1f59}', '\u{1f59}'), 1086 | ('\u{1f5b}', '\u{1f5b}'), 1087 | ('\u{1f5d}', '\u{1f5d}'), 1088 | ('\u{1f5f}', '\u{1f7d}'), 1089 | ('\u{1f80}', '\u{1fb4}'), 1090 | ('\u{1fb6}', '\u{1fbc}'), 1091 | ('\u{1fbe}', '\u{1fbe}'), 1092 | ('\u{1fc2}', '\u{1fc4}'), 1093 | ('\u{1fc6}', '\u{1fcc}'), 1094 | ('\u{1fd0}', '\u{1fd3}'), 1095 | ('\u{1fd6}', '\u{1fdb}'), 1096 | ('\u{1fe0}', '\u{1fec}'), 1097 | ('\u{1ff2}', '\u{1ff4}'), 1098 | ('\u{1ff6}', '\u{1ffc}'), 1099 | ('\u{2071}', '\u{2071}'), 1100 | ('\u{207f}', '\u{207f}'), 1101 | ('\u{2090}', '\u{209c}'), 1102 | ('\u{2102}', '\u{2102}'), 1103 | ('\u{2107}', '\u{2107}'), 1104 | ('\u{210a}', '\u{2113}'), 1105 | ('\u{2115}', '\u{2115}'), 1106 | ('\u{2118}', '\u{211d}'), 1107 | ('\u{2124}', '\u{2124}'), 1108 | ('\u{2126}', '\u{2126}'), 1109 | ('\u{2128}', '\u{2128}'), 1110 | ('\u{212a}', '\u{2139}'), 1111 | ('\u{213c}', '\u{213f}'), 1112 | ('\u{2145}', '\u{2149}'), 1113 | ('\u{214e}', '\u{214e}'), 1114 | ('\u{2160}', '\u{2188}'), 1115 | ('\u{2c00}', '\u{2ce4}'), 1116 | ('\u{2ceb}', '\u{2cee}'), 1117 | ('\u{2cf2}', '\u{2cf3}'), 1118 | ('\u{2d00}', '\u{2d25}'), 1119 | ('\u{2d27}', '\u{2d27}'), 1120 | ('\u{2d2d}', '\u{2d2d}'), 1121 | ('\u{2d30}', '\u{2d67}'), 1122 | ('\u{2d6f}', '\u{2d6f}'), 1123 | ('\u{2d80}', '\u{2d96}'), 1124 | ('\u{2da0}', '\u{2da6}'), 1125 | ('\u{2da8}', '\u{2dae}'), 1126 | ('\u{2db0}', '\u{2db6}'), 1127 | ('\u{2db8}', '\u{2dbe}'), 1128 | ('\u{2dc0}', '\u{2dc6}'), 1129 | ('\u{2dc8}', '\u{2dce}'), 1130 | ('\u{2dd0}', '\u{2dd6}'), 1131 | ('\u{2dd8}', '\u{2dde}'), 1132 | ('\u{3005}', '\u{3007}'), 1133 | ('\u{3021}', '\u{3029}'), 1134 | ('\u{3031}', '\u{3035}'), 1135 | ('\u{3038}', '\u{303c}'), 1136 | ('\u{3041}', '\u{3096}'), 1137 | ('\u{309d}', '\u{309f}'), 1138 | ('\u{30a1}', '\u{30fa}'), 1139 | ('\u{30fc}', '\u{30ff}'), 1140 | ('\u{3105}', '\u{312f}'), 1141 | ('\u{3131}', '\u{318e}'), 1142 | ('\u{31a0}', '\u{31bf}'), 1143 | ('\u{31f0}', '\u{31ff}'), 1144 | ('\u{3400}', '\u{4dbf}'), 1145 | ('\u{4e00}', '\u{a48c}'), 1146 | ('\u{a4d0}', '\u{a4fd}'), 1147 | ('\u{a500}', '\u{a60c}'), 1148 | ('\u{a610}', '\u{a61f}'), 1149 | ('\u{a62a}', '\u{a62b}'), 1150 | ('\u{a640}', '\u{a66e}'), 1151 | ('\u{a67f}', '\u{a69d}'), 1152 | ('\u{a6a0}', '\u{a6ef}'), 1153 | ('\u{a717}', '\u{a71f}'), 1154 | ('\u{a722}', '\u{a788}'), 1155 | ('\u{a78b}', '\u{a7cd}'), 1156 | ('\u{a7d0}', '\u{a7d1}'), 1157 | ('\u{a7d3}', '\u{a7d3}'), 1158 | ('\u{a7d5}', '\u{a7dc}'), 1159 | ('\u{a7f2}', '\u{a801}'), 1160 | ('\u{a803}', '\u{a805}'), 1161 | ('\u{a807}', '\u{a80a}'), 1162 | ('\u{a80c}', '\u{a822}'), 1163 | ('\u{a840}', '\u{a873}'), 1164 | ('\u{a882}', '\u{a8b3}'), 1165 | ('\u{a8f2}', '\u{a8f7}'), 1166 | ('\u{a8fb}', '\u{a8fb}'), 1167 | ('\u{a8fd}', '\u{a8fe}'), 1168 | ('\u{a90a}', '\u{a925}'), 1169 | ('\u{a930}', '\u{a946}'), 1170 | ('\u{a960}', '\u{a97c}'), 1171 | ('\u{a984}', '\u{a9b2}'), 1172 | ('\u{a9cf}', '\u{a9cf}'), 1173 | ('\u{a9e0}', '\u{a9e4}'), 1174 | ('\u{a9e6}', '\u{a9ef}'), 1175 | ('\u{a9fa}', '\u{a9fe}'), 1176 | ('\u{aa00}', '\u{aa28}'), 1177 | ('\u{aa40}', '\u{aa42}'), 1178 | ('\u{aa44}', '\u{aa4b}'), 1179 | ('\u{aa60}', '\u{aa76}'), 1180 | ('\u{aa7a}', '\u{aa7a}'), 1181 | ('\u{aa7e}', '\u{aaaf}'), 1182 | ('\u{aab1}', '\u{aab1}'), 1183 | ('\u{aab5}', '\u{aab6}'), 1184 | ('\u{aab9}', '\u{aabd}'), 1185 | ('\u{aac0}', '\u{aac0}'), 1186 | ('\u{aac2}', '\u{aac2}'), 1187 | ('\u{aadb}', '\u{aadd}'), 1188 | ('\u{aae0}', '\u{aaea}'), 1189 | ('\u{aaf2}', '\u{aaf4}'), 1190 | ('\u{ab01}', '\u{ab06}'), 1191 | ('\u{ab09}', '\u{ab0e}'), 1192 | ('\u{ab11}', '\u{ab16}'), 1193 | ('\u{ab20}', '\u{ab26}'), 1194 | ('\u{ab28}', '\u{ab2e}'), 1195 | ('\u{ab30}', '\u{ab5a}'), 1196 | ('\u{ab5c}', '\u{ab69}'), 1197 | ('\u{ab70}', '\u{abe2}'), 1198 | ('\u{ac00}', '\u{d7a3}'), 1199 | ('\u{d7b0}', '\u{d7c6}'), 1200 | ('\u{d7cb}', '\u{d7fb}'), 1201 | ('\u{f900}', '\u{fa6d}'), 1202 | ('\u{fa70}', '\u{fad9}'), 1203 | ('\u{fb00}', '\u{fb06}'), 1204 | ('\u{fb13}', '\u{fb17}'), 1205 | ('\u{fb1d}', '\u{fb1d}'), 1206 | ('\u{fb1f}', '\u{fb28}'), 1207 | ('\u{fb2a}', '\u{fb36}'), 1208 | ('\u{fb38}', '\u{fb3c}'), 1209 | ('\u{fb3e}', '\u{fb3e}'), 1210 | ('\u{fb40}', '\u{fb41}'), 1211 | ('\u{fb43}', '\u{fb44}'), 1212 | ('\u{fb46}', '\u{fbb1}'), 1213 | ('\u{fbd3}', '\u{fc5d}'), 1214 | ('\u{fc64}', '\u{fd3d}'), 1215 | ('\u{fd50}', '\u{fd8f}'), 1216 | ('\u{fd92}', '\u{fdc7}'), 1217 | ('\u{fdf0}', '\u{fdf9}'), 1218 | ('\u{fe71}', '\u{fe71}'), 1219 | ('\u{fe73}', '\u{fe73}'), 1220 | ('\u{fe77}', '\u{fe77}'), 1221 | ('\u{fe79}', '\u{fe79}'), 1222 | ('\u{fe7b}', '\u{fe7b}'), 1223 | ('\u{fe7d}', '\u{fe7d}'), 1224 | ('\u{fe7f}', '\u{fefc}'), 1225 | ('\u{ff21}', '\u{ff3a}'), 1226 | ('\u{ff41}', '\u{ff5a}'), 1227 | ('\u{ff66}', '\u{ff9d}'), 1228 | ('\u{ffa0}', '\u{ffbe}'), 1229 | ('\u{ffc2}', '\u{ffc7}'), 1230 | ('\u{ffca}', '\u{ffcf}'), 1231 | ('\u{ffd2}', '\u{ffd7}'), 1232 | ('\u{ffda}', '\u{ffdc}'), 1233 | ('\u{10000}', '\u{1000b}'), 1234 | ('\u{1000d}', '\u{10026}'), 1235 | ('\u{10028}', '\u{1003a}'), 1236 | ('\u{1003c}', '\u{1003d}'), 1237 | ('\u{1003f}', '\u{1004d}'), 1238 | ('\u{10050}', '\u{1005d}'), 1239 | ('\u{10080}', '\u{100fa}'), 1240 | ('\u{10140}', '\u{10174}'), 1241 | ('\u{10280}', '\u{1029c}'), 1242 | ('\u{102a0}', '\u{102d0}'), 1243 | ('\u{10300}', '\u{1031f}'), 1244 | ('\u{1032d}', '\u{1034a}'), 1245 | ('\u{10350}', '\u{10375}'), 1246 | ('\u{10380}', '\u{1039d}'), 1247 | ('\u{103a0}', '\u{103c3}'), 1248 | ('\u{103c8}', '\u{103cf}'), 1249 | ('\u{103d1}', '\u{103d5}'), 1250 | ('\u{10400}', '\u{1049d}'), 1251 | ('\u{104b0}', '\u{104d3}'), 1252 | ('\u{104d8}', '\u{104fb}'), 1253 | ('\u{10500}', '\u{10527}'), 1254 | ('\u{10530}', '\u{10563}'), 1255 | ('\u{10570}', '\u{1057a}'), 1256 | ('\u{1057c}', '\u{1058a}'), 1257 | ('\u{1058c}', '\u{10592}'), 1258 | ('\u{10594}', '\u{10595}'), 1259 | ('\u{10597}', '\u{105a1}'), 1260 | ('\u{105a3}', '\u{105b1}'), 1261 | ('\u{105b3}', '\u{105b9}'), 1262 | ('\u{105bb}', '\u{105bc}'), 1263 | ('\u{105c0}', '\u{105f3}'), 1264 | ('\u{10600}', '\u{10736}'), 1265 | ('\u{10740}', '\u{10755}'), 1266 | ('\u{10760}', '\u{10767}'), 1267 | ('\u{10780}', '\u{10785}'), 1268 | ('\u{10787}', '\u{107b0}'), 1269 | ('\u{107b2}', '\u{107ba}'), 1270 | ('\u{10800}', '\u{10805}'), 1271 | ('\u{10808}', '\u{10808}'), 1272 | ('\u{1080a}', '\u{10835}'), 1273 | ('\u{10837}', '\u{10838}'), 1274 | ('\u{1083c}', '\u{1083c}'), 1275 | ('\u{1083f}', '\u{10855}'), 1276 | ('\u{10860}', '\u{10876}'), 1277 | ('\u{10880}', '\u{1089e}'), 1278 | ('\u{108e0}', '\u{108f2}'), 1279 | ('\u{108f4}', '\u{108f5}'), 1280 | ('\u{10900}', '\u{10915}'), 1281 | ('\u{10920}', '\u{10939}'), 1282 | ('\u{10980}', '\u{109b7}'), 1283 | ('\u{109be}', '\u{109bf}'), 1284 | ('\u{10a00}', '\u{10a00}'), 1285 | ('\u{10a10}', '\u{10a13}'), 1286 | ('\u{10a15}', '\u{10a17}'), 1287 | ('\u{10a19}', '\u{10a35}'), 1288 | ('\u{10a60}', '\u{10a7c}'), 1289 | ('\u{10a80}', '\u{10a9c}'), 1290 | ('\u{10ac0}', '\u{10ac7}'), 1291 | ('\u{10ac9}', '\u{10ae4}'), 1292 | ('\u{10b00}', '\u{10b35}'), 1293 | ('\u{10b40}', '\u{10b55}'), 1294 | ('\u{10b60}', '\u{10b72}'), 1295 | ('\u{10b80}', '\u{10b91}'), 1296 | ('\u{10c00}', '\u{10c48}'), 1297 | ('\u{10c80}', '\u{10cb2}'), 1298 | ('\u{10cc0}', '\u{10cf2}'), 1299 | ('\u{10d00}', '\u{10d23}'), 1300 | ('\u{10d4a}', '\u{10d65}'), 1301 | ('\u{10d6f}', '\u{10d85}'), 1302 | ('\u{10e80}', '\u{10ea9}'), 1303 | ('\u{10eb0}', '\u{10eb1}'), 1304 | ('\u{10ec2}', '\u{10ec4}'), 1305 | ('\u{10f00}', '\u{10f1c}'), 1306 | ('\u{10f27}', '\u{10f27}'), 1307 | ('\u{10f30}', '\u{10f45}'), 1308 | ('\u{10f70}', '\u{10f81}'), 1309 | ('\u{10fb0}', '\u{10fc4}'), 1310 | ('\u{10fe0}', '\u{10ff6}'), 1311 | ('\u{11003}', '\u{11037}'), 1312 | ('\u{11071}', '\u{11072}'), 1313 | ('\u{11075}', '\u{11075}'), 1314 | ('\u{11083}', '\u{110af}'), 1315 | ('\u{110d0}', '\u{110e8}'), 1316 | ('\u{11103}', '\u{11126}'), 1317 | ('\u{11144}', '\u{11144}'), 1318 | ('\u{11147}', '\u{11147}'), 1319 | ('\u{11150}', '\u{11172}'), 1320 | ('\u{11176}', '\u{11176}'), 1321 | ('\u{11183}', '\u{111b2}'), 1322 | ('\u{111c1}', '\u{111c4}'), 1323 | ('\u{111da}', '\u{111da}'), 1324 | ('\u{111dc}', '\u{111dc}'), 1325 | ('\u{11200}', '\u{11211}'), 1326 | ('\u{11213}', '\u{1122b}'), 1327 | ('\u{1123f}', '\u{11240}'), 1328 | ('\u{11280}', '\u{11286}'), 1329 | ('\u{11288}', '\u{11288}'), 1330 | ('\u{1128a}', '\u{1128d}'), 1331 | ('\u{1128f}', '\u{1129d}'), 1332 | ('\u{1129f}', '\u{112a8}'), 1333 | ('\u{112b0}', '\u{112de}'), 1334 | ('\u{11305}', '\u{1130c}'), 1335 | ('\u{1130f}', '\u{11310}'), 1336 | ('\u{11313}', '\u{11328}'), 1337 | ('\u{1132a}', '\u{11330}'), 1338 | ('\u{11332}', '\u{11333}'), 1339 | ('\u{11335}', '\u{11339}'), 1340 | ('\u{1133d}', '\u{1133d}'), 1341 | ('\u{11350}', '\u{11350}'), 1342 | ('\u{1135d}', '\u{11361}'), 1343 | ('\u{11380}', '\u{11389}'), 1344 | ('\u{1138b}', '\u{1138b}'), 1345 | ('\u{1138e}', '\u{1138e}'), 1346 | ('\u{11390}', '\u{113b5}'), 1347 | ('\u{113b7}', '\u{113b7}'), 1348 | ('\u{113d1}', '\u{113d1}'), 1349 | ('\u{113d3}', '\u{113d3}'), 1350 | ('\u{11400}', '\u{11434}'), 1351 | ('\u{11447}', '\u{1144a}'), 1352 | ('\u{1145f}', '\u{11461}'), 1353 | ('\u{11480}', '\u{114af}'), 1354 | ('\u{114c4}', '\u{114c5}'), 1355 | ('\u{114c7}', '\u{114c7}'), 1356 | ('\u{11580}', '\u{115ae}'), 1357 | ('\u{115d8}', '\u{115db}'), 1358 | ('\u{11600}', '\u{1162f}'), 1359 | ('\u{11644}', '\u{11644}'), 1360 | ('\u{11680}', '\u{116aa}'), 1361 | ('\u{116b8}', '\u{116b8}'), 1362 | ('\u{11700}', '\u{1171a}'), 1363 | ('\u{11740}', '\u{11746}'), 1364 | ('\u{11800}', '\u{1182b}'), 1365 | ('\u{118a0}', '\u{118df}'), 1366 | ('\u{118ff}', '\u{11906}'), 1367 | ('\u{11909}', '\u{11909}'), 1368 | ('\u{1190c}', '\u{11913}'), 1369 | ('\u{11915}', '\u{11916}'), 1370 | ('\u{11918}', '\u{1192f}'), 1371 | ('\u{1193f}', '\u{1193f}'), 1372 | ('\u{11941}', '\u{11941}'), 1373 | ('\u{119a0}', '\u{119a7}'), 1374 | ('\u{119aa}', '\u{119d0}'), 1375 | ('\u{119e1}', '\u{119e1}'), 1376 | ('\u{119e3}', '\u{119e3}'), 1377 | ('\u{11a00}', '\u{11a00}'), 1378 | ('\u{11a0b}', '\u{11a32}'), 1379 | ('\u{11a3a}', '\u{11a3a}'), 1380 | ('\u{11a50}', '\u{11a50}'), 1381 | ('\u{11a5c}', '\u{11a89}'), 1382 | ('\u{11a9d}', '\u{11a9d}'), 1383 | ('\u{11ab0}', '\u{11af8}'), 1384 | ('\u{11bc0}', '\u{11be0}'), 1385 | ('\u{11c00}', '\u{11c08}'), 1386 | ('\u{11c0a}', '\u{11c2e}'), 1387 | ('\u{11c40}', '\u{11c40}'), 1388 | ('\u{11c72}', '\u{11c8f}'), 1389 | ('\u{11d00}', '\u{11d06}'), 1390 | ('\u{11d08}', '\u{11d09}'), 1391 | ('\u{11d0b}', '\u{11d30}'), 1392 | ('\u{11d46}', '\u{11d46}'), 1393 | ('\u{11d60}', '\u{11d65}'), 1394 | ('\u{11d67}', '\u{11d68}'), 1395 | ('\u{11d6a}', '\u{11d89}'), 1396 | ('\u{11d98}', '\u{11d98}'), 1397 | ('\u{11ee0}', '\u{11ef2}'), 1398 | ('\u{11f02}', '\u{11f02}'), 1399 | ('\u{11f04}', '\u{11f10}'), 1400 | ('\u{11f12}', '\u{11f33}'), 1401 | ('\u{11fb0}', '\u{11fb0}'), 1402 | ('\u{12000}', '\u{12399}'), 1403 | ('\u{12400}', '\u{1246e}'), 1404 | ('\u{12480}', '\u{12543}'), 1405 | ('\u{12f90}', '\u{12ff0}'), 1406 | ('\u{13000}', '\u{1342f}'), 1407 | ('\u{13441}', '\u{13446}'), 1408 | ('\u{13460}', '\u{143fa}'), 1409 | ('\u{14400}', '\u{14646}'), 1410 | ('\u{16100}', '\u{1611d}'), 1411 | ('\u{16800}', '\u{16a38}'), 1412 | ('\u{16a40}', '\u{16a5e}'), 1413 | ('\u{16a70}', '\u{16abe}'), 1414 | ('\u{16ad0}', '\u{16aed}'), 1415 | ('\u{16b00}', '\u{16b2f}'), 1416 | ('\u{16b40}', '\u{16b43}'), 1417 | ('\u{16b63}', '\u{16b77}'), 1418 | ('\u{16b7d}', '\u{16b8f}'), 1419 | ('\u{16d40}', '\u{16d6c}'), 1420 | ('\u{16e40}', '\u{16e7f}'), 1421 | ('\u{16f00}', '\u{16f4a}'), 1422 | ('\u{16f50}', '\u{16f50}'), 1423 | ('\u{16f93}', '\u{16f9f}'), 1424 | ('\u{16fe0}', '\u{16fe1}'), 1425 | ('\u{16fe3}', '\u{16fe3}'), 1426 | ('\u{17000}', '\u{187f7}'), 1427 | ('\u{18800}', '\u{18cd5}'), 1428 | ('\u{18cff}', '\u{18d08}'), 1429 | ('\u{1aff0}', '\u{1aff3}'), 1430 | ('\u{1aff5}', '\u{1affb}'), 1431 | ('\u{1affd}', '\u{1affe}'), 1432 | ('\u{1b000}', '\u{1b122}'), 1433 | ('\u{1b132}', '\u{1b132}'), 1434 | ('\u{1b150}', '\u{1b152}'), 1435 | ('\u{1b155}', '\u{1b155}'), 1436 | ('\u{1b164}', '\u{1b167}'), 1437 | ('\u{1b170}', '\u{1b2fb}'), 1438 | ('\u{1bc00}', '\u{1bc6a}'), 1439 | ('\u{1bc70}', '\u{1bc7c}'), 1440 | ('\u{1bc80}', '\u{1bc88}'), 1441 | ('\u{1bc90}', '\u{1bc99}'), 1442 | ('\u{1d400}', '\u{1d454}'), 1443 | ('\u{1d456}', '\u{1d49c}'), 1444 | ('\u{1d49e}', '\u{1d49f}'), 1445 | ('\u{1d4a2}', '\u{1d4a2}'), 1446 | ('\u{1d4a5}', '\u{1d4a6}'), 1447 | ('\u{1d4a9}', '\u{1d4ac}'), 1448 | ('\u{1d4ae}', '\u{1d4b9}'), 1449 | ('\u{1d4bb}', '\u{1d4bb}'), 1450 | ('\u{1d4bd}', '\u{1d4c3}'), 1451 | ('\u{1d4c5}', '\u{1d505}'), 1452 | ('\u{1d507}', '\u{1d50a}'), 1453 | ('\u{1d50d}', '\u{1d514}'), 1454 | ('\u{1d516}', '\u{1d51c}'), 1455 | ('\u{1d51e}', '\u{1d539}'), 1456 | ('\u{1d53b}', '\u{1d53e}'), 1457 | ('\u{1d540}', '\u{1d544}'), 1458 | ('\u{1d546}', '\u{1d546}'), 1459 | ('\u{1d54a}', '\u{1d550}'), 1460 | ('\u{1d552}', '\u{1d6a5}'), 1461 | ('\u{1d6a8}', '\u{1d6c0}'), 1462 | ('\u{1d6c2}', '\u{1d6da}'), 1463 | ('\u{1d6dc}', '\u{1d6fa}'), 1464 | ('\u{1d6fc}', '\u{1d714}'), 1465 | ('\u{1d716}', '\u{1d734}'), 1466 | ('\u{1d736}', '\u{1d74e}'), 1467 | ('\u{1d750}', '\u{1d76e}'), 1468 | ('\u{1d770}', '\u{1d788}'), 1469 | ('\u{1d78a}', '\u{1d7a8}'), 1470 | ('\u{1d7aa}', '\u{1d7c2}'), 1471 | ('\u{1d7c4}', '\u{1d7cb}'), 1472 | ('\u{1df00}', '\u{1df1e}'), 1473 | ('\u{1df25}', '\u{1df2a}'), 1474 | ('\u{1e030}', '\u{1e06d}'), 1475 | ('\u{1e100}', '\u{1e12c}'), 1476 | ('\u{1e137}', '\u{1e13d}'), 1477 | ('\u{1e14e}', '\u{1e14e}'), 1478 | ('\u{1e290}', '\u{1e2ad}'), 1479 | ('\u{1e2c0}', '\u{1e2eb}'), 1480 | ('\u{1e4d0}', '\u{1e4eb}'), 1481 | ('\u{1e5d0}', '\u{1e5ed}'), 1482 | ('\u{1e5f0}', '\u{1e5f0}'), 1483 | ('\u{1e7e0}', '\u{1e7e6}'), 1484 | ('\u{1e7e8}', '\u{1e7eb}'), 1485 | ('\u{1e7ed}', '\u{1e7ee}'), 1486 | ('\u{1e7f0}', '\u{1e7fe}'), 1487 | ('\u{1e800}', '\u{1e8c4}'), 1488 | ('\u{1e900}', '\u{1e943}'), 1489 | ('\u{1e94b}', '\u{1e94b}'), 1490 | ('\u{1ee00}', '\u{1ee03}'), 1491 | ('\u{1ee05}', '\u{1ee1f}'), 1492 | ('\u{1ee21}', '\u{1ee22}'), 1493 | ('\u{1ee24}', '\u{1ee24}'), 1494 | ('\u{1ee27}', '\u{1ee27}'), 1495 | ('\u{1ee29}', '\u{1ee32}'), 1496 | ('\u{1ee34}', '\u{1ee37}'), 1497 | ('\u{1ee39}', '\u{1ee39}'), 1498 | ('\u{1ee3b}', '\u{1ee3b}'), 1499 | ('\u{1ee42}', '\u{1ee42}'), 1500 | ('\u{1ee47}', '\u{1ee47}'), 1501 | ('\u{1ee49}', '\u{1ee49}'), 1502 | ('\u{1ee4b}', '\u{1ee4b}'), 1503 | ('\u{1ee4d}', '\u{1ee4f}'), 1504 | ('\u{1ee51}', '\u{1ee52}'), 1505 | ('\u{1ee54}', '\u{1ee54}'), 1506 | ('\u{1ee57}', '\u{1ee57}'), 1507 | ('\u{1ee59}', '\u{1ee59}'), 1508 | ('\u{1ee5b}', '\u{1ee5b}'), 1509 | ('\u{1ee5d}', '\u{1ee5d}'), 1510 | ('\u{1ee5f}', '\u{1ee5f}'), 1511 | ('\u{1ee61}', '\u{1ee62}'), 1512 | ('\u{1ee64}', '\u{1ee64}'), 1513 | ('\u{1ee67}', '\u{1ee6a}'), 1514 | ('\u{1ee6c}', '\u{1ee72}'), 1515 | ('\u{1ee74}', '\u{1ee77}'), 1516 | ('\u{1ee79}', '\u{1ee7c}'), 1517 | ('\u{1ee7e}', '\u{1ee7e}'), 1518 | ('\u{1ee80}', '\u{1ee89}'), 1519 | ('\u{1ee8b}', '\u{1ee9b}'), 1520 | ('\u{1eea1}', '\u{1eea3}'), 1521 | ('\u{1eea5}', '\u{1eea9}'), 1522 | ('\u{1eeab}', '\u{1eebb}'), 1523 | ('\u{20000}', '\u{2a6df}'), 1524 | ('\u{2a700}', '\u{2b739}'), 1525 | ('\u{2b740}', '\u{2b81d}'), 1526 | ('\u{2b820}', '\u{2cea1}'), 1527 | ('\u{2ceb0}', '\u{2ebe0}'), 1528 | ('\u{2ebf0}', '\u{2ee5d}'), 1529 | ('\u{2f800}', '\u{2fa1d}'), 1530 | ('\u{30000}', '\u{3134a}'), 1531 | ('\u{31350}', '\u{323af}'), 1532 | ]; 1533 | 1534 | pub fn XID_Start(c: char) -> bool { 1535 | super::bsearch_range_table(c, XID_Start_table) 1536 | } 1537 | } 1538 | -------------------------------------------------------------------------------- /src/tests.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2012-2025 The Rust Project Developers. See the COPYRIGHT 2 | // file at the top-level directory of this distribution and at 3 | // https://www.rust-lang.org/policies/licenses. 4 | // 5 | // Licensed under the Apache License, Version 2.0 or the MIT license 7 | // , at your 8 | // option. This file may not be copied, modified, or distributed 9 | // except according to those terms. 10 | 11 | #[cfg(feature = "bench")] 12 | use std::iter; 13 | #[cfg(feature = "bench")] 14 | use std::prelude::v1::*; 15 | #[cfg(feature = "bench")] 16 | use test::Bencher; 17 | 18 | #[cfg(feature = "bench")] 19 | use UnicodeXID; 20 | 21 | #[cfg(feature = "bench")] 22 | #[bench] 23 | fn cargo_is_xid_start(b: &mut Bencher) { 24 | let string = iter::repeat('a').take(4096).collect::(); 25 | 26 | b.bytes = string.len() as u64; 27 | b.iter(|| string.chars().all(super::UnicodeXID::is_xid_start)); 28 | } 29 | 30 | #[cfg(feature = "bench")] 31 | #[bench] 32 | fn stdlib_is_xid_start(b: &mut Bencher) { 33 | let string = iter::repeat('a').take(4096).collect::(); 34 | 35 | b.bytes = string.len() as u64; 36 | b.iter(|| string.chars().all(char::is_xid_start)); 37 | } 38 | 39 | #[cfg(feature = "bench")] 40 | #[bench] 41 | fn cargo_xid_continue(b: &mut Bencher) { 42 | let string = iter::repeat('a').take(4096).collect::(); 43 | 44 | b.bytes = string.len() as u64; 45 | b.iter(|| string.chars().all(super::UnicodeXID::is_xid_continue)); 46 | } 47 | 48 | #[cfg(feature = "bench")] 49 | #[bench] 50 | fn stdlib_xid_continue(b: &mut Bencher) { 51 | let string = iter::repeat('a').take(4096).collect::(); 52 | 53 | b.bytes = string.len() as u64; 54 | b.iter(|| string.chars().all(char::is_xid_continue)); 55 | } 56 | 57 | #[test] 58 | fn test_is_xid_start() { 59 | let chars = ['A', 'Z', 'a', 'z', '\u{1000d}', '\u{10026}']; 60 | 61 | for ch in &chars { 62 | assert!(super::UnicodeXID::is_xid_start(*ch), "{}", ch); 63 | } 64 | } 65 | 66 | #[test] 67 | fn test_is_not_xid_start() { 68 | let chars = [ 69 | '\x00', '\x01', '0', '9', ' ', '[', '<', '{', '(', '\u{02c2}', '\u{ffff}', 70 | ]; 71 | 72 | for ch in &chars { 73 | assert!(!super::UnicodeXID::is_xid_start(*ch), "{}", ch); 74 | } 75 | } 76 | 77 | #[test] 78 | fn test_is_xid_continue() { 79 | let chars = ['0', '9', 'A', 'Z', 'a', 'z', '_', '\u{1000d}', '\u{10026}']; 80 | 81 | for ch in &chars { 82 | assert!(super::UnicodeXID::is_xid_continue(*ch), "{}", ch); 83 | } 84 | } 85 | 86 | #[test] 87 | fn test_is_not_xid_continue() { 88 | let chars = [ 89 | '\x00', '\x01', ' ', '[', '<', '{', '(', '\u{02c2}', '\u{ffff}', 90 | ]; 91 | 92 | for &ch in &chars { 93 | assert!(!super::UnicodeXID::is_xid_continue(ch), "{}", ch); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /tests/exhaustive_tests.rs: -------------------------------------------------------------------------------- 1 | extern crate unicode_xid; 2 | use unicode_xid::UnicodeXID; 3 | /// A `char` in Rust is a Unicode Scalar Value 4 | /// 5 | /// See: http://www.unicode.org/glossary/#unicode_scalar_value 6 | fn all_valid_chars() -> impl Iterator { 7 | (0u32..=0xD7FF).chain(0xE000u32..=0x10FFFF).map(|u| { 8 | core::convert::TryFrom::try_from(u) 9 | .expect("The selected range should be infallible if the docs match impl") 10 | }) 11 | } 12 | 13 | #[test] 14 | fn all_valid_chars_do_not_panic_for_is_xid_start() { 15 | for c in all_valid_chars() { 16 | let _ = UnicodeXID::is_xid_start(c); 17 | } 18 | } 19 | 20 | #[test] 21 | fn all_valid_chars_do_not_panic_for_is_xid_continue() { 22 | for c in all_valid_chars() { 23 | let _ = UnicodeXID::is_xid_continue(c); 24 | } 25 | } 26 | --------------------------------------------------------------------------------