SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
Common.h
Go to the documentation of this file.
1 /**
2  * @file Common.h
3  * @author Gereon Kremer <gereon.kremer@cs.rwth-aachen.de>
4  */
5 
6 #pragma once
7 
9 #include "theories/Common.h"
10 
11 #include <algorithm>
12 #include <functional>
13 #include <iostream>
14 #include <sstream>
15 
16 #include <boost/fusion/include/std_pair.hpp>
17 #define BOOST_SPIRIT_USE_PHOENIX_V3
18 #include <boost/spirit/include/qi.hpp>
19 #include <boost/spirit/include/qi_parse.hpp>
20 #include <boost/phoenix.hpp>
21 #include <boost/phoenix/core.hpp>
22 #include <boost/phoenix/object.hpp>
23 #include <boost/phoenix/operator.hpp>
24 #include <boost/phoenix/statement.hpp>
25 #include <boost/phoenix/stl.hpp>
26 #include <boost/spirit/include/support_line_pos_iterator.hpp>
27 
28 #include <carl-formula/model/Assignment.h>
29 
30 
31 #define PARSER_BITVECTOR
32 
33 #define EXIT_ON_ERROR
34 #ifdef EXIT_ON_ERROR
35 #define HANDLE_ERROR std::cout << "(unknown)" << std::endl; exit(123);
36 #else
37 #define HANDLE_ERROR
38 #endif
39 
40 namespace smtrat {
41 namespace parser {
42 
43  namespace spirit = boost::spirit;
44  namespace qi = boost::spirit::qi;
45  namespace px = boost::phoenix;
46 
47  typedef boost::spirit::istream_iterator BaseIteratorType;
48  typedef boost::spirit::line_pos_iterator<BaseIteratorType> PositionIteratorType;
50 
51  struct Skipper: public boost::spirit::qi::grammar<Iterator> {
52  Skipper(): Skipper::base_type(main, "skipper") {
53  main = (boost::spirit::qi::space | boost::spirit::qi::lit(";") >> *(boost::spirit::qi::char_ - boost::spirit::qi::eol) >> boost::spirit::qi::eol);
54  };
55  boost::spirit::qi::rule<Iterator> main;
56  };
57 
58 }
59 }
boost::spirit::line_pos_iterator< BaseIteratorType > PositionIteratorType
Definition: Common.h:48
boost::spirit::istream_iterator BaseIteratorType
Definition: Common.h:47
PositionIteratorType Iterator
Definition: Common.h:49
Class to create the formulas for axioms.
boost::spirit::qi::rule< Iterator > main
Definition: Common.h:54