libs/url/include/boost/url/grammar/impl/token_rule.hpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) | ||
| 3 | // | ||
| 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
| 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
| 6 | // | ||
| 7 | // Official repository: https://github.com/boostorg/http_proto | ||
| 8 | // | ||
| 9 | |||
| 10 | #ifndef BOOST_URL_IMPL_GRAMMAR_TOKEN_RULE_HPP | ||
| 11 | #define BOOST_URL_IMPL_GRAMMAR_TOKEN_RULE_HPP | ||
| 12 | |||
| 13 | #include <boost/url/grammar/error.hpp> | ||
| 14 | |||
| 15 | namespace boost { | ||
| 16 | namespace urls { | ||
| 17 | namespace grammar { | ||
| 18 | |||
| 19 | template<class CharSet> | ||
| 20 | auto | ||
| 21 | 637 | implementation_defined::token_rule_t<CharSet>:: | |
| 22 | parse( | ||
| 23 | char const*& it, | ||
| 24 | char const* end | ||
| 25 | ) const noexcept -> | ||
| 26 | system::result<value_type> | ||
| 27 | { | ||
| 28 | 637 | auto const it0 = it; | |
| 29 |
8/14boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::alnum_chars_t>::parse(char const*&, char const*) const:
✗ Branch 0 not taken.
✓ Branch 1 taken 13 times.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::alpha_chars_t>::parse(char const*&, char const*) const:
✓ Branch 0 taken 6 times.
✓ Branch 1 taken 76 times.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::charset_ref<boost::urls::grammar::implementation_defined::alpha_chars_t> >::parse(char const*&, char const*) const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::digit_chars_t>::parse(char const*&, char const*) const:
✗ Branch 0 not taken.
✓ Branch 1 taken 25 times.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::hexdig_chars_t>::parse(char const*&, char const*) const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::vchars_t>::parse(char const*&, char const*) const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::lut_chars>::parse(char const*&, char const*) const:
✗ Branch 0 not taken.
✓ Branch 1 taken 499 times.
|
637 | if(it == end) |
| 30 | { | ||
| 31 | 6 | BOOST_URL_RETURN_EC( | |
| 32 | error::need_more); | ||
| 33 | } | ||
| 34 | 631 | auto const& cs = this->get(); | |
| 35 | 631 | it = grammar::find_if_not(it, end, cs); | |
| 36 |
10/14boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::alnum_chars_t>::parse(char const*&, char const*) const:
✓ Branch 0 taken 13 times.
✗ Branch 1 not taken.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::alpha_chars_t>::parse(char const*&, char const*) const:
✓ Branch 0 taken 73 times.
✓ Branch 1 taken 3 times.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::charset_ref<boost::urls::grammar::implementation_defined::alpha_chars_t> >::parse(char const*&, char const*) const:
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::digit_chars_t>::parse(char const*&, char const*) const:
✓ Branch 0 taken 4 times.
✓ Branch 1 taken 21 times.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::hexdig_chars_t>::parse(char const*&, char const*) const:
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::implementation_defined::vchars_t>::parse(char const*&, char const*) const:
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
boost::urls::grammar::implementation_defined::token_rule_t<boost::urls::grammar::lut_chars>::parse(char const*&, char const*) const:
✓ Branch 0 taken 474 times.
✓ Branch 1 taken 25 times.
|
631 | if(it != it0) |
| 37 | 582 | return core::string_view(it0, it - it0); | |
| 38 | 49 | BOOST_URL_RETURN_EC( | |
| 39 | error::mismatch); | ||
| 40 | } | ||
| 41 | |||
| 42 | } // grammar | ||
| 43 | } // urls | ||
| 44 | } // boost | ||
| 45 | |||
| 46 | #endif | ||
| 47 |