carl  24.04
Computer ARithmetic Library
Common.h
Go to the documentation of this file.
1 /**
2  * @file parser/Common.h
3  * @author Gereon Kremer <gereon.kremer@cs.rwth-aachen.de>
4  */
5 
6 #pragma once
7 
8 #include <tuple>
9 #include <vector>
10 
11 #define BOOST_SPIRIT_USE_PHOENIX_V3
12 #include <boost/spirit/include/qi.hpp>
13 #include <boost/spirit/include/phoenix.hpp>
14 
23 
24 namespace spirit = boost::spirit;
25 namespace qi = boost::spirit::qi;
26 namespace px = boost::phoenix;
27 
28 namespace carl::io {
29 namespace parser {
30 
31 using carl::operator<<;
32 
33 using Iterator = std::string::const_iterator;
34 using Skipper = boost::spirit::qi::space_type;
35 
36 template<typename Pol>
38 
39 template<typename Coeff>
40 struct RationalPolicies : qi::ureal_policies<Coeff> {
41  template <typename It, typename Attr>
42  static bool parse_nan(It&, It const&, Attr&) { return false; }
43  template <typename It, typename Attr>
44  static bool parse_inf(It&, It const&, Attr&) { return false; }
45 };
46 
47 }
48 }
boost::spirit::qi::space_type Skipper
Definition: Common.h:34
std::string::const_iterator Iterator
Definition: Common.h:33
static bool parse_inf(It &, It const &, Attr &)
Definition: Common.h:44
static bool parse_nan(It &, It const &, Attr &)
Definition: Common.h:42