roar
Loading...
Searching...
No Matches
ipv4.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <roar/url/ipv4.hpp>
4
5#include <boost/spirit/home/x3.hpp>
6
7namespace Roar
8{
9 namespace Parser
10 {
11 struct Ipv4Tag;
12 const auto ipv4 = boost::spirit::x3::rule<Ipv4Tag, Ipv4>{"ipv4"};
13
14 namespace x3 = boost::spirit::x3;
15 using x3::uint_parser;
16
17 // Parses 0-255
18 struct Ipv4SectionTag;
19 const auto ipv4Section = x3::rule<Ipv4SectionTag, uint8_t>{"ipv4Section"} = uint_parser<uint8_t, 10, 1, 3>();
20
21 const auto ipv4_def = ipv4Section >> '.' >> ipv4Section >> '.' >> ipv4Section >> '.' >> ipv4Section;
22
24 } // namespace Parser
25} // namespace Roar
const auto ipv4Section
Definition ipv4.hpp:19
const auto ipv4
Definition ipv4.hpp:12
const auto ipv4_def
Definition ipv4.hpp:21
BOOST_SPIRIT_DEFINE(ipv4)
Definition authorization.hpp:10