46 :
public hfp_impl::token_producer_t
53 ep_impl::source_t::content_consumer_t consumer{ from };
54 const auto result = hfp_impl::token_producer_t::try_parse( from );
57 if(
'*' == *(result->rbegin()) )
61 consumer.started_at() + result->size() - 1,
62 error_reason_t::unexpected_character
88 :
public hfp_impl::token_producer_t
95 ep_impl::source_t::content_consumer_t consumer{ from };
96 const auto result = hfp_impl::token_producer_t::try_parse( from );
99 if(
'*' != *(result->rbegin()) )
103 consumer.started_at(),
104 error_reason_t::pattern_not_found
132 return hfp_impl::is_alpha(actual)
133 || hfp_impl::is_digit(actual)
165 return ep_impl::symbol_producer_template_t< mime_charsetc_predicate_t >{};
190 return hfp_impl::is_alpha(actual)
191 || hfp_impl::is_digit(actual)
209 return ep_impl::symbol_producer_template_t< language_predicate_t >{};
229 return hfp_impl::is_alpha(actual)
230 || hfp_impl::is_digit(actual)
261 return ep_impl::symbol_producer_template_t< attr_char_predicate_t >{};
309 hfp_details::pct_encoded_symbols_p() >>
310 hfp_details::pct_encoded_symbols_consumer_t{} )
367 regular_token_producer_t{}
368 >>
to_lower() >> ¶meter_t::first,
371 token_p() >> ¶meter_t::second,
376 ext_token_producer_t{}
377 >>
to_lower() >> ¶meter_t::first,
379 ext_parameter_value_p() >> ¶meter_t::second
Utilities for parsing values of http-fields.
Information about parsing error.
A producer for token that is an "extended parameter name" in sense of RCF6266 and RCF5987.
expected_t< result_type, parse_error_t > try_parse(ep_impl::source_t &from) const
A producer for token that is a "regular parameter name" in sense of RCF6266 and RCF5987.
expected_t< result_type, parse_error_t > try_parse(ep_impl::source_t &from) const
auto to_container()
A factory function to create a to_container_consumer.
auto symbol(char expected) noexcept
A factory function to create a clause that expects the speficied symbol, extracts it and then skips i...
expected_t< typename Producer::result_type, parse_error_t > try_parse(string_view_t from, Producer producer)
Perform the parsing of the specified content by using specified value producer.
auto symbol_p(char expected) noexcept
A factory function to create a symbol_producer.
auto to_lower() noexcept
A factory function to create a to_lower_transformer.
auto alternatives(Clauses &&... clauses)
A factory function to create an alternatives clause.
auto produce(Clauses &&... clauses)
A factory function to create a producer that creates an instance of the target type by using specifie...
constexpr std::size_t N
A special marker that means infinite repetitions.
auto repeat(std::size_t min_occurences, std::size_t max_occurences, Clauses &&... clauses)
A factory function to create repetitor of subclauses.
auto sequence(Clauses &&... clauses)
A factory function to create a sequence of subclauses.
auto ext_parameter_value_p()
A producer for an "extended parameter value" in sense of RCF6266 and RCF5987.
auto language_symbol_p()
A factory for producer that extracts language symbols.
auto mime_charsetc_symbol_p()
A factory for producer that extracts mime-charsetc symbols.
auto attr_char_symbol_p()
A factory for producer that extracts attr-char symbols.
auto token_p() noexcept
A factory function to create a token_producer.
auto ows() noexcept
A factory function to create an OWS clause.
std::pair< std::string, std::string > parameter_with_mandatory_value_t
A type that describes a parameter with mandatory value.
auto quoted_string_p() noexcept
A factory function to create a quoted_string_producer.
std::vector< parameter_with_mandatory_value_t > parameter_with_mandatory_value_container_t
A type of container for parameters with mandatory values.
std::string_view string_view_t
nonstd::expected< T, E > expected_t
Stuff related to percent-encoded symbols.
A preducate for symbol_producer_template that checks that a symbol is attr-char symbol from RCF5987.
bool operator()(const char actual) const noexcept
A preducate for symbol_producer_template that checks that a symbol is language symbol from RCF5646.
bool operator()(const char actual) const noexcept
A preducate for symbol_producer_template that checks that a symbol is mime-charsetc symbol from RCF59...
bool operator()(const char actual) const noexcept
Tools for working with the value of Content-Disposition HTTP-field.
static auto make_parser()
A factory function for a parser of Content-Disposition value.
static expected_t< content_disposition_value_t, restinio::easy_parser::parse_error_t > try_parse(string_view_t what)
An attempt to parse Content-Disposition HTTP-field.
parameter_with_mandatory_value_container_t parameter_container_t
parameter_container_t parameters
parameter_with_mandatory_value_t parameter_t