3 #include <boost/version.hpp>
15 template <
typename It,
typename Attr>
16 static bool parse_nan(It&, It
const&, Attr&) {
return false; }
17 template <
typename It,
typename Attr>
18 static bool parse_inf(It&, It
const&, Attr&) {
return false; }
34 struct HexadecimalParser:
public qi::grammar<Iterator, FixedWidthConstant<Integer>(), Skipper> {
35 typedef boost::iterator_range<Iterator>
ITRange;
44 qi::rule<Iterator, FixedWidthConstant<Integer>(),
Skipper, qi::locals<Integer>>
main;
51 struct BinaryParser:
public qi::grammar<Iterator, FixedWidthConstant<Integer>(), Skipper> {
52 typedef boost::iterator_range<Iterator>
ITRange;
61 qi::rule<Iterator, FixedWidthConstant<Integer>(),
Skipper, qi::locals<Integer>>
main;
68 struct StringParser:
public qi::grammar<Iterator, std::string(), Skipper> {
70 main = qi::lexeme[qi::char_(
'"') > +(
escapes | ~qi::char_(
'"')) > qi::char_(
'"')];
74 escapes.name(
"escape sequences");
92 main = qi::lexeme[ (qi::alpha | qi::char_(
"~!@$%^&*_+=<>.?/-")) > *(qi::alnum | qi::char_(
"~!@$%^&*_+=<>.?/-"))];
96 struct SymbolParser:
public qi::grammar<Iterator, std::string(), Skipper> {
100 quoted = qi::lit(
'|') > qi::no_skip[*(~qi::char_(
"|")) > qi::lit(
'|')];
101 quoted.name(
"quoted symbol");
111 struct KeywordParser:
public qi::grammar<Iterator, std::string(), Skipper> {
114 main.name(
"keyword");
123 namespace boost {
namespace spirit {
namespace traits {
124 #if BOOST_VERSION >= 105900
140 #if BOOST_VERSION < 107000
PositionIteratorType Iterator
Class to create the formulas for axioms.
carl::IntegralType< Rational >::type Integer
boost::iterator_range< Iterator > ITRange
qi::uint_parser< Integer, 2, 1,-1 > number
FixedWidthConstant< Integer > build(const ITRange &itr, const Integer &val)
qi::rule< Iterator, FixedWidthConstant< Integer >), Skipper > main2
qi::rule< Iterator, FixedWidthConstant< Integer >), Skipper, qi::locals< Integer > > main
Parses decimals: numeral.0*numeral
Represents a constant of a fixed width.
Parses hexadecimals: #x[0-9a-fA-F]+
boost::iterator_range< Iterator > ITRange
qi::rule< Iterator, FixedWidthConstant< Integer >), Skipper > main2
qi::uint_parser< Integer, 16, 1,-1 > number
qi::rule< Iterator, FixedWidthConstant< Integer >), Skipper, qi::locals< Integer > > main
FixedWidthConstant< Integer > build(const ITRange &itr, const Integer &val)
Parses keywords: :simple_symbol
qi::rule< Iterator, std::string(), Skipper > main
SimpleSymbolParser simple
Parses numerals: (0 | [1-9][0-9]*)
Specialization of qi::real_policies for a Rational.
static bool parse_nan(It &, It const &, Attr &)
static bool parse_inf(It &, It const &, Attr &)
Parses symbols: simple_symbol | quoted_symbol where.
qi::rule< Iterator, std::string(), Skipper > main
Parses strings: ".+" with escape sequences \\" and \\\\
qi::symbols< char, char > escapes
qi::rule< Iterator, std::string(), Skipper > main
SimpleSymbolParser simple
qi::rule< Iterator, std::string(), Skipper > quoted
qi::rule< Iterator, std::string(), Skipper > main