parse.ipp
1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
// Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/url
//
#ifndef BOOST_URL_IMPL_PARSE_IPP
#define BOOST_URL_IMPL_PARSE_IPP
#include <boost/url/parse.hpp>
#include <boost/url/rfc/absolute_uri_rule.hpp>
#include <boost/url/rfc/relative_ref_rule.hpp>
#include <boost/url/rfc/uri_rule.hpp>
#include <boost/url/rfc/uri_reference_rule.hpp>
#include <boost/url/rfc/origin_form_rule.hpp>
#include <boost/url/grammar/parse.hpp>
namespace boost {
namespace urls {
result<url_view>
parse_absolute_uri(
string_view s)
{
return grammar::parse(
s, absolute_uri_rule);
}
result<url_view>
parse_origin_form(
string_view s)
{
return grammar::parse(
s, origin_form_rule);
}
result<url_view>
parse_relative_ref(
string_view s)
{
return grammar::parse(
s, relative_ref_rule);
}
result<url_view>
parse_uri(
string_view s)
{
return grammar::parse(
s, uri_rule);
}
result<url_view>
parse_uri_reference(
string_view s)
{
return grammar::parse(
s, uri_reference_rule);
}
} // urls
} // boost
#endif