Ada 3.1.0
Fast spec-compliant URL parser
|
#include <url_pattern_helpers.h>
Public Types | |
enum class | State { INIT , PROTOCOL , AUTHORITY , USERNAME , PASSWORD , HOSTNAME , PORT , PATHNAME , SEARCH , HASH , DONE } |
Public Member Functions | |
constructor_string_parser (std::string_view new_input, std::vector< token > &&new_token_list) | |
void | rewind () |
bool | is_hash_prefix () |
bool | is_search_prefix () |
void | change_state (State state, size_t skip) |
bool | is_group_open () const |
bool | is_group_close () const |
bool | is_protocol_suffix () const |
std::optional< errors > | compute_protocol_matches_special_scheme_flag () |
bool | next_is_authority_slashes () const |
bool | is_an_identity_terminator () const |
bool | is_pathname_start () const |
bool | is_password_prefix () const |
bool | is_an_ipv6_open () const |
bool | is_an_ipv6_close () const |
bool | is_port_prefix () const |
Static Public Member Functions | |
static tl::expected< url_pattern_init, errors > | parse (std::string_view input) |
Definition at line 154 of file url_pattern_helpers.h.
|
strong |
Enumerator | |
---|---|
INIT | |
PROTOCOL | |
AUTHORITY | |
USERNAME | |
PASSWORD | |
HOSTNAME | |
PORT | |
PATHNAME | |
SEARCH | |
HASH | |
DONE |
Definition at line 172 of file url_pattern_helpers.h.
|
inlineexplicit |
Definition at line 155 of file url_pattern_helpers.h.
Referenced by parse().
void ada::url_pattern_helpers::constructor_string_parser< regex_provider >::change_state | ( | State | state, |
size_t | skip ) |
|
inline |
Definition at line 802 of file url_pattern_helpers-inl.h.
References ada::url_pattern_helpers::canonicalize_protocol(), ada::url_pattern_component< regex_provider >::compile(), compute_protocol_matches_special_scheme_flag(), ada::url_pattern_compile_component_options::DEFAULT, and ada::url_pattern_helpers::protocol_component_matches_special_scheme().
Referenced by compute_protocol_matches_special_scheme_flag().
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_an_identity_terminator | ( | ) | const |
Definition at line 294 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_an_ipv6_close | ( | ) | const |
Definition at line 323 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_an_ipv6_open | ( | ) | const |
Definition at line 316 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_group_close | ( | ) | const |
Definition at line 144 of file url_pattern_helpers-inl.h.
References ada::url_pattern_helpers::CLOSE.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_group_open | ( | ) | const |
Definition at line 137 of file url_pattern_helpers-inl.h.
References ada::url_pattern_helpers::OPEN.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_hash_prefix | ( | ) |
Definition at line 55 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_password_prefix | ( | ) | const |
Definition at line 309 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_pathname_start | ( | ) | const |
Definition at line 302 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_port_prefix | ( | ) | const |
Definition at line 330 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_protocol_suffix | ( | ) | const |
Definition at line 167 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_search_prefix | ( | ) |
Definition at line 62 of file url_pattern_helpers-inl.h.
References ADA_ASSERT_TRUE, ada::url_pattern_helpers::ASTERISK, ada::url_pattern_helpers::CLOSE, ada::url_pattern_helpers::NAME, and ada::url_pattern_helpers::REGEXP.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::next_is_authority_slashes | ( | ) | const |
Definition at line 151 of file url_pattern_helpers-inl.h.
|
static |
Definition at line 830 of file url_pattern_helpers-inl.h.
References AUTHORITY, constructor_string_parser(), DONE, ada::url_pattern_helpers::END, HASH, HOSTNAME, INIT, ada::url_pattern_helpers::lenient, PASSWORD, PATHNAME, PORT, PROTOCOL, SEARCH, ada::url_pattern_helpers::tokenize(), ada::unreachable(), and USERNAME.
Referenced by ada::url_aggregator::parse_url_pattern_impl.
void ada::url_pattern_helpers::constructor_string_parser< regex_provider >::rewind | ( | ) |
Definition at line 47 of file url_pattern_helpers-inl.h.