Ada 3.0.1
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 () |
std::optional< errors > | compute_protocol_matches_special_scheme_flag () |
bool | next_is_authority_slashes () |
bool | is_an_identity_terminator () |
bool | is_pathname_start () |
bool | is_password_prefix () |
bool | is_an_ipv6_open () |
bool | is_an_ipv6_close () |
bool | is_port_prefix () |
Static Public Member Functions | |
static tl::expected< url_pattern_init, errors > | parse (std::string_view input) |
Definition at line 152 of file url_pattern_helpers.h.
|
strong |
Enumerator | |
---|---|
INIT | |
PROTOCOL | |
AUTHORITY | |
USERNAME | |
PASSWORD | |
HOSTNAME | |
PORT | |
PATHNAME | |
SEARCH | |
HASH | |
DONE |
Definition at line 170 of file url_pattern_helpers.h.
|
inlineexplicit |
Definition at line 153 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 799 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 | ( | ) |
Definition at line 291 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_an_ipv6_close | ( | ) |
Definition at line 319 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_an_ipv6_open | ( | ) |
Definition at line 312 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_group_close | ( | ) | const |
Definition at line 142 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 135 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 53 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_password_prefix | ( | ) |
Definition at line 305 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_pathname_start | ( | ) |
Definition at line 298 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_port_prefix | ( | ) |
Definition at line 326 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_protocol_suffix | ( | ) |
Definition at line 164 of file url_pattern_helpers-inl.h.
bool ada::url_pattern_helpers::constructor_string_parser< regex_provider >::is_search_prefix | ( | ) |
Definition at line 60 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 | ( | ) |
Definition at line 149 of file url_pattern_helpers-inl.h.
|
static |
Definition at line 827 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 45 of file url_pattern_helpers-inl.h.