1 #ifndef __OPENTREP_BAS_BASPARSERTYPES_HPP
2 #define __OPENTREP_BAS_BASPARSERTYPES_HPP
10 #include <boost/spirit/include/qi.hpp>
11 #include <boost/spirit/include/phoenix_core.hpp>
12 #include <boost/spirit/include/phoenix_operator.hpp>
13 #include <boost/spirit/include/support_multi_pass.hpp>
14 #include <boost/spirit/include/classic_position_iterator.hpp>
28 typedef boost::spirit::multi_pass<base_iterator_t>
iterator_t;
31 typedef boost::spirit::classic::position_iterator2<iterator_t>
pos_iterator_t;
40 typedef boost::spirit::qi::uint_parser<int, 10, 1, 1>
uint1_p_t;
43 typedef boost::spirit::qi::uint_parser<int, 10, 2, 2>
uint2_p_t;
46 typedef boost::spirit::qi::uint_parser<int, 10, 1, 2>
int1_2_p_t;
49 typedef boost::spirit::qi::uint_parser<int, 10, 4, 4>
uint4_p_t;
52 typedef boost::spirit::qi::int_parser<int, 10, 1, 5>
int1_5_p_t;
53 typedef boost::spirit::qi::int_parser<int, 10, 0, 5>
int0_5_p_t;
56 typedef boost::spirit::qi::uint_parser<int, 10, 1, 4>
uint1_4_p_t;
59 typedef boost::spirit::qi::uint_parser<int, 10, 1, 9>
uint1_9_p_t;
60 typedef boost::spirit::qi::uint_parser<int, 10, 0, 9>
uint0_9_p_t;
63 typedef boost::spirit::qi::uint_parser<hour_t, 10, 2, 2>
hour_p_t;
64 typedef boost::spirit::qi::uint_parser<minute_t, 10, 2, 2>
minute_p_t;
65 typedef boost::spirit::qi::uint_parser<second_t, 10, 2, 2>
second_p_t;
66 typedef boost::spirit::qi::uint_parser<year_t, 10, 4, 4>
year_p_t;
67 typedef boost::spirit::qi::uint_parser<month_t, 10, 2, 2>
month_p_t;
68 typedef boost::spirit::qi::uint_parser<day_t, 10, 2, 2>
day_p_t;
72 template <
typename Iterator,
typename Attribute>
73 static bool parse_true (Iterator& first, Iterator
const& last,
75 if (boost::spirit::qi::detail::string_parse (
"Y", first, last,
76 boost::spirit::qi::unused)) {
78 boost::spirit::traits::assign_to (
true, attr);
85 template <
typename Iterator,
typename Attribute>
86 static bool parse_false (Iterator& first, Iterator
const& last,
88 if (boost::spirit::qi::detail::string_parse (
"N", first, last,
89 boost::spirit::qi::unused)
91 boost::spirit::qi::detail::string_parse (
"Z", first, last,
92 boost::spirit::qi::unused)) {
94 boost::spirit::traits::assign_to (
false, attr);
101 typedef boost::spirit::qi::bool_parser<bool, short_bool_policies>
boolean_p_t;
104 #endif // __OPENTREP_BAS_BASPARSERTYPES_HPP
static bool parse_false(Iterator &first, Iterator const &last, Attribute &attr)
boost::spirit::qi::uint_parser< month_t, 10, 2, 2 > month_p_t
std::istreambuf_iterator< char > base_iterator_t
boost::spirit::qi::int_parser< int, 10, 0, 5 > int0_5_p_t
boost::spirit::qi::uint_parser< second_t, 10, 2, 2 > second_p_t
boost::spirit::qi::uint_parser< hour_t, 10, 2, 2 > hour_p_t
boost::spirit::qi::uint_parser< int, 10, 2, 2 > uint2_p_t
boost::spirit::qi::uint_parser< int, 10, 1, 9 > uint1_9_p_t
boost::spirit::qi::int_parser< int, 10, 1, 5 > int1_5_p_t
static bool parse_true(Iterator &first, Iterator const &last, Attribute &attr)
boost::spirit::qi::uint_parser< year_t, 10, 4, 4 > year_p_t
boost::spirit::qi::uint_parser< int, 10, 1, 1 > uint1_p_t
boost::spirit::qi::bool_parser< bool, short_bool_policies > boolean_p_t
boost::spirit::qi::uint_parser< int, 10, 1, 2 > int1_2_p_t
boost::spirit::qi::uint_parser< int, 10, 4, 4 > uint4_p_t
boost::spirit::qi::uint_parser< day_t, 10, 2, 2 > day_p_t
boost::spirit::qi::uint_parser< int, 10, 1, 4 > uint1_4_p_t
boost::spirit::qi::uint_parser< minute_t, 10, 2, 2 > minute_p_t
boost::spirit::multi_pass< base_iterator_t > iterator_t
boost::spirit::qi::uint_parser< int, 10, 0, 9 > uint0_9_p_t
boost::spirit::classic::position_iterator2< iterator_t > pos_iterator_t