|
Ada 3.2.2
Fast spec-compliant URL parser
|
Classes | |
| struct | directions |
Enumerations | |
| enum | direction : uint8_t { NONE , BN , CS , ES , ON , EN , L , R , NSM , AL , AN , ET , WS , RLO , LRO , PDF , RLE , RLI , FSI , PDI , LRI , B , S , LRE } |
Functions | |
| size_t | utf8_to_utf32 (const char *buf, size_t len, char32_t *utf32_output) |
| size_t | utf8_length_from_utf32 (const char32_t *buf, size_t len) |
| size_t | utf32_length_from_utf8 (const char *buf, size_t len) |
| size_t | utf32_to_utf8 (const char32_t *buf, size_t len, char *utf8_output) |
| void | ascii_map (char *input, size_t length) |
| std::u32string | map (std::u32string_view input) |
| void | normalize (std::u32string &input) |
| bool | punycode_to_utf32 (std::string_view input, std::u32string &out) |
| bool | verify_punycode (std::string_view input) |
| bool | utf32_to_punycode (std::u32string_view input, std::string &out) |
| bool | is_label_valid (std::u32string_view label) |
| std::string | to_ascii (std::string_view ut8_string) |
| bool | contains_forbidden_domain_code_point (std::string_view ascii_string) |
| bool constexpr | is_ascii (std::u32string_view view) |
| bool constexpr | is_ascii (std::string_view view) |
| std::string | to_unicode (std::string_view input) |
| bool | valid_name_code_point (char32_t code_point, bool first) |
| uint32_t | find_range_index (uint32_t key) |
| std::pair< bool, size_t > | compute_decomposition_length (const std::u32string_view input) noexcept |
| void | decompose (std::u32string &input, size_t additional_elements) |
| uint8_t | get_ccc (char32_t c) noexcept |
| void | sort_marks (std::u32string &input) |
| void | decompose_nfc (std::u32string &input) |
| void | compose (std::u32string &input) |
| static constexpr int32_t | char_to_digit_value (char value) |
| static constexpr char | digit_to_char (int32_t digit) |
| static constexpr int32_t | adapt (int32_t d, int32_t n, bool firsttime) |
| static direction | find_direction (uint32_t code_point) noexcept |
| static size_t | find_last_not_of_nsm (const std::u32string_view label) noexcept |
| static bool | is_rtl_label (const std::u32string_view label) noexcept |
| bool | is_forbidden_domain_code_point (const char c) noexcept |
| static std::string | from_ascii_to_ascii (std::string_view ut8_string) |
| constexpr bool | is_ascii_letter (char32_t c) noexcept |
| constexpr bool | is_ascii_letter_or_digit (char32_t c) noexcept |
Variables | |
| const uint32_t | mappings [5236] |
| const uint32_t | table [8150][2] |
| const uint8_t | decomposition_index [4352] |
| const uint16_t | decomposition_block [67][257] |
| const char32_t | decomposition_data [9102] |
| const uint8_t | canonical_combining_class_index [4352] |
| const uint8_t | canonical_combining_class_block [67][256] |
| const uint8_t | composition_index [4352] |
| const uint16_t | composition_block [67][257] |
| const char32_t | composition_data [1883] |
| constexpr char32_t | hangul_sbase = 0xAC00 |
| constexpr char32_t | hangul_tbase = 0x11A7 |
| constexpr char32_t | hangul_vbase = 0x1161 |
| constexpr char32_t | hangul_lbase = 0x1100 |
| constexpr char32_t | hangul_lcount = 19 |
| constexpr char32_t | hangul_vcount = 21 |
| constexpr char32_t | hangul_tcount = 28 |
| constexpr char32_t | hangul_ncount = hangul_vcount * hangul_tcount |
| constexpr char32_t | hangul_scount |
| constexpr int32_t | base = 36 |
| constexpr int32_t | tmin = 1 |
| constexpr int32_t | tmax = 26 |
| constexpr int32_t | skew = 38 |
| constexpr int32_t | damp = 700 |
| constexpr int32_t | initial_bias = 72 |
| constexpr uint32_t | initial_n = 128 |
| static directions | dir_table [] |
| static constexpr uint8_t | is_forbidden_domain_code_point_table [] |
| const uint32_t | id_continue [1393][2] |
| const uint32_t | id_start [763][2] |
Unicode Standard Annex #15
UNICODE NORMALIZATION FORMS https://www.unicode.org/reports/tr15/
See https://github.com/uni-algo/uni-algo/blob/c612968c5ed3ace39bde4c894c24286c5f2c7fe2/include/uni_algo/impl/data/data_norm.h for reference.
| enum ada::idna::direction : uint8_t |
| Enumerator | |
|---|---|
| NONE | |
| BN | |
| CS | |
| ES | |
| ON | |
| EN | |
| L | |
| R | |
| NSM | |
| AL | |
| AN | |
| ET | |
| WS | |
| RLO | |
| LRO | |
| RLE | |
| RLI | |
| FSI | |
| PDI | |
| LRI | |
| B | |
| S | |
| LRE | |
Definition at line 8081 of file ada_idna.cpp.
|
staticconstexpr |
Definition at line 7872 of file ada_idna.cpp.
References base, damp, skew, tmax, and tmin.
Referenced by punycode_to_utf32(), utf32_to_punycode(), and verify_punycode().
| void ada::idna::ascii_map | ( | char * | input, |
| size_t | length ) |
Definition at line 2663 of file ada_idna.cpp.
Referenced by from_ascii_to_ascii().
|
staticconstexpr |
Definition at line 7862 of file ada_idna.cpp.
Referenced by punycode_to_utf32(), and verify_punycode().
| void ada::idna::compose | ( | std::u32string & | input | ) |
Compose the domain_name string to Unicode Normalization Form C.
Definition at line 7756 of file ada_idna.cpp.
References composition_block, composition_data, composition_index, get_ccc(), hangul_lbase, hangul_lcount, hangul_sbase, hangul_scount, hangul_tbase, hangul_tcount, hangul_vbase, and hangul_vcount.
Referenced by normalize().
|
noexcept |
Definition at line 7649 of file ada_idna.cpp.
References decomposition_block, decomposition_index, hangul_sbase, hangul_scount, and hangul_tcount.
Referenced by decompose_nfc().
| bool ada::idna::contains_forbidden_domain_code_point | ( | std::string_view | ascii_string | ) |
Definition at line 9453 of file ada_idna.cpp.
References is_forbidden_domain_code_point().
| void ada::idna::decompose | ( | std::u32string & | input, |
| size_t | additional_elements ) |
Definition at line 7679 of file ada_idna.cpp.
References decomposition_block, decomposition_data, decomposition_index, hangul_lbase, hangul_ncount, hangul_sbase, hangul_scount, hangul_tbase, hangul_tcount, and hangul_vbase.
Referenced by decompose_nfc().
| void ada::idna::decompose_nfc | ( | std::u32string & | input | ) |
Decompose the domain_name string to Unicode Normalization Form C.
Definition at line 7743 of file ada_idna.cpp.
References compute_decomposition_length(), decompose(), and sort_marks().
Referenced by normalize().
|
staticconstexpr |
Definition at line 7868 of file ada_idna.cpp.
Referenced by utf32_to_punycode().
|
inlinestaticnoexcept |
Definition at line 8843 of file ada_idna.cpp.
References dir_table, ada::idna::directions::final_code, and NONE.
Referenced by find_last_not_of_nsm(), is_label_valid(), and is_rtl_label().
|
inlinestaticnoexcept |
Definition at line 8859 of file ada_idna.cpp.
References find_direction(), and NSM.
Referenced by is_label_valid().
| uint32_t ada::idna::find_range_index | ( | uint32_t | key | ) |
|
static |
Definition at line 9458 of file ada_idna.cpp.
References ascii_map(), is_ascii(), is_label_valid(), map(), normalize(), and punycode_to_utf32().
Referenced by to_ascii().
|
noexcept |
Definition at line 7721 of file ada_idna.cpp.
References canonical_combining_class_block, and canonical_combining_class_index.
Referenced by compose(), and sort_marks().
|
constexpr |
Definition at line 9425 of file ada_idna.cpp.
|
constexpr |
Definition at line 9416 of file ada_idna.cpp.
Referenced by from_ascii_to_ascii(), to_ascii(), and to_unicode().
|
constexprnoexcept |
Definition at line 10239 of file ada_idna.cpp.
Referenced by valid_name_code_point().
|
constexprnoexcept |
Definition at line 10243 of file ada_idna.cpp.
Referenced by valid_name_code_point().
|
inlinenoexcept |
Definition at line 9449 of file ada_idna.cpp.
References is_forbidden_domain_code_point_table.
Referenced by contains_forbidden_domain_code_point().
| bool ada::idna::is_label_valid | ( | std::u32string_view | label | ) |
Definition at line 8880 of file ada_idna.cpp.
References AL, AN, BN, CS, EN, ES, ET, find_direction(), find_last_not_of_nsm(), is_rtl_label(), L, NSM, ON, and R.
Referenced by from_ascii_to_ascii(), and to_ascii().
|
inlinestaticnoexcept |
Definition at line 8869 of file ada_idna.cpp.
References AL, AN, find_direction(), and R.
Referenced by is_label_valid().
| std::u32string ada::idna::map | ( | std::u32string_view | input | ) |
Definition at line 2689 of file ada_idna.cpp.
References find_range_index(), mappings, and table.
Referenced by from_ascii_to_ascii(), and to_ascii().
| void ada::idna::normalize | ( | std::u32string & | input | ) |
Normalize the domain_name string to Unicode Normalization Form C.
Definition at line 7837 of file ada_idna.cpp.
References compose(), and decompose_nfc().
Referenced by from_ascii_to_ascii(), and to_ascii().
| bool ada::idna::punycode_to_utf32 | ( | std::string_view | input, |
| std::u32string & | out ) |
Definition at line 7887 of file ada_idna.cpp.
References adapt(), base, char_to_digit_value(), initial_bias, initial_n, and tmax.
Referenced by from_ascii_to_ascii(), to_ascii(), and to_unicode().
| void ada::idna::sort_marks | ( | std::u32string & | input | ) |
| std::string ada::idna::to_ascii | ( | std::string_view | ut8_string | ) |
Definition at line 9520 of file ada_idna.cpp.
References from_ascii_to_ascii(), is_ascii(), is_label_valid(), map(), normalize(), punycode_to_utf32(), utf32_length_from_utf8(), utf32_to_punycode(), and utf8_to_utf32().
Referenced by ada_idna_to_ascii(), and LLVMFuzzerTestOneInput().
| std::string ada::idna::to_unicode | ( | std::string_view | input | ) |
Definition at line 9623 of file ada_idna.cpp.
References is_ascii(), punycode_to_utf32(), utf32_to_utf8(), utf8_length_from_utf32(), and verify_punycode().
Referenced by ada_idna_to_unicode(), and LLVMFuzzerTestOneInput().
| size_t ada::idna::utf32_length_from_utf8 | ( | const char * | buf, |
| size_t | len ) |
Definition at line 121 of file ada_idna.cpp.
Referenced by to_ascii().
| bool ada::idna::utf32_to_punycode | ( | std::u32string_view | input, |
| std::string & | out ) |
Definition at line 8012 of file ada_idna.cpp.
References adapt(), base, digit_to_char(), initial_bias, initial_n, and tmax.
Referenced by to_ascii().
| size_t ada::idna::utf32_to_utf8 | ( | const char32_t * | buf, |
| size_t | len, | ||
| char * | utf8_output ) |
Definition at line 130 of file ada_idna.cpp.
Referenced by to_unicode().
| size_t ada::idna::utf8_length_from_utf32 | ( | const char32_t * | buf, |
| size_t | len ) |
Definition at line 108 of file ada_idna.cpp.
Referenced by to_unicode().
| size_t ada::idna::utf8_to_utf32 | ( | const char * | buf, |
| size_t | len, | ||
| char32_t * | utf32_output ) |
Definition at line 11 of file ada_idna.cpp.
Referenced by to_ascii().
| bool ada::idna::valid_name_code_point | ( | char32_t | code_point, |
| bool | first ) |
Definition at line 10248 of file ada_idna.cpp.
References id_continue, id_start, is_ascii_letter(), and is_ascii_letter_or_digit().
| bool ada::idna::verify_punycode | ( | std::string_view | input | ) |
Definition at line 7951 of file ada_idna.cpp.
References adapt(), base, char_to_digit_value(), initial_bias, initial_n, and tmax.
Referenced by to_unicode().
|
constexpr |
Definition at line 7854 of file ada_idna.cpp.
Referenced by adapt(), punycode_to_utf32(), utf32_to_punycode(), and verify_punycode().
| const uint8_t ada::idna::canonical_combining_class_block[67][256] |
Definition at line 5875 of file ada_idna.cpp.
Referenced by get_ccc().
| const uint8_t ada::idna::canonical_combining_class_index[4352] |
Definition at line 5644 of file ada_idna.cpp.
Referenced by get_ccc().
| const uint16_t ada::idna::composition_block[67][257] |
Definition at line 6950 of file ada_idna.cpp.
Referenced by compose().
| const char32_t ada::idna::composition_data[1883] |
Definition at line 7456 of file ada_idna.cpp.
Referenced by compose().
| const uint8_t ada::idna::composition_index[4352] |
Definition at line 6751 of file ada_idna.cpp.
Referenced by compose().
|
constexpr |
Definition at line 7858 of file ada_idna.cpp.
Referenced by adapt().
| const uint16_t ada::idna::decomposition_block[67][257] |
Definition at line 2986 of file ada_idna.cpp.
Referenced by compute_decomposition_length(), and decompose().
| const char32_t ada::idna::decomposition_data[9102] |
Definition at line 4630 of file ada_idna.cpp.
Referenced by decompose().
| const uint8_t ada::idna::decomposition_index[4352] |
Definition at line 2754 of file ada_idna.cpp.
Referenced by compute_decomposition_length(), and decompose().
|
static |
Definition at line 8114 of file ada_idna.cpp.
Referenced by find_direction().
|
constexpr |
Definition at line 7641 of file ada_idna.cpp.
Referenced by compose(), and decompose().
|
constexpr |
Definition at line 7642 of file ada_idna.cpp.
Referenced by compose().
|
constexpr |
Definition at line 7645 of file ada_idna.cpp.
Referenced by decompose().
|
constexpr |
Definition at line 7638 of file ada_idna.cpp.
Referenced by compose(), compute_decomposition_length(), and decompose().
|
constexpr |
Definition at line 7646 of file ada_idna.cpp.
Referenced by compose(), compute_decomposition_length(), and decompose().
|
constexpr |
Definition at line 7639 of file ada_idna.cpp.
Referenced by compose(), and decompose().
|
constexpr |
Definition at line 7644 of file ada_idna.cpp.
Referenced by compose(), compute_decomposition_length(), and decompose().
|
constexpr |
Definition at line 7640 of file ada_idna.cpp.
Referenced by compose(), and decompose().
|
constexpr |
Definition at line 7643 of file ada_idna.cpp.
Referenced by compose().
| const uint32_t ada::idna::id_continue[1393][2] |
Definition at line 9686 of file ada_idna.cpp.
Referenced by valid_name_code_point().
| const uint32_t ada::idna::id_start[763][2] |
Definition at line 10038 of file ada_idna.cpp.
Referenced by valid_name_code_point().
|
constexpr |
Definition at line 7859 of file ada_idna.cpp.
Referenced by punycode_to_utf32(), utf32_to_punycode(), and verify_punycode().
|
constexpr |
Definition at line 7860 of file ada_idna.cpp.
Referenced by punycode_to_utf32(), utf32_to_punycode(), and verify_punycode().
|
staticconstexpr |
Definition at line 9434 of file ada_idna.cpp.
Referenced by is_forbidden_domain_code_point().
| const uint32_t ada::idna::mappings[5236] |
Definition at line 202 of file ada_idna.cpp.
Referenced by map().
|
constexpr |
Definition at line 7857 of file ada_idna.cpp.
Referenced by adapt().
| const uint32_t ada::idna::table[8150][2] |
Definition at line 590 of file ada_idna.cpp.
Referenced by find_range_index(), and map().
|
constexpr |
Definition at line 7856 of file ada_idna.cpp.
Referenced by adapt(), punycode_to_utf32(), utf32_to_punycode(), and verify_punycode().
|
constexpr |
Definition at line 7855 of file ada_idna.cpp.
Referenced by adapt().