5 #if defined(_GLIBCXX_DEBUG)
6 #define BOOST_PHOENIX_USING_LIBCPP
10 #define BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
11 #include <boost/config.hpp>
18 #include <State/Value.hpp>
20 #include <ossia/network/base/name_validation.hpp>
21 #include <ossia/network/dataspace/dataspace_parse.hpp>
23 #include <boost/fusion/adapted.hpp>
24 #include <boost/fusion/include/at.hpp>
25 #include <boost/fusion/sequence/intrinsic/at.hpp>
26 #include <boost/spirit/include/qi.hpp>
27 #include <boost/spirit/include/qi_eoi.hpp>
28 #include <boost/spirit/include/qi_lit.hpp>
29 #include <boost/spirit/include/qi_real.hpp>
30 #include <boost/spirit/repository/include/qi_confix.hpp>
31 #include <boost/variant/recursive_wrapper.hpp>
45 struct is_container<QString> : mpl::true_
51 struct container_value<QString> : mpl::identity<QChar>
57 struct push_back_container<QString, QChar>
59 static bool call(QString& c, QChar
const& val)
68 struct is_empty_container<QString>
70 static bool call(QString
const& c) {
return c.isEmpty(); }
74 template <
typename Out,
typename Enable>
75 struct print_attribute_debug<Out, QString, Enable>
77 static void call(Out& out, QString
const& val) { out << val.toStdString(); }
86 namespace qi = boost::spirit::qi;
88 using boost::spirit::qi::rule;
91 struct BoolParse_map : qi::symbols<char, bool>
93 BoolParse_map() { add(
"true",
true)(
"false",
false); }
95 template <
typename Iterator>
96 struct Value_parser : qi::grammar<Iterator, ossia::value()>
99 : Value_parser::base_type(start)
101 using boost::spirit::int_;
102 using boost::spirit::qi::char_;
103 using boost::spirit::qi::real_parser;
104 using boost::spirit::qi::skip;
107 char_parser %=
"'" >> (char_ -
"'") >>
"'";
108 str_parser %=
'"' >> qi::lexeme[*(char_ -
'"')] >>
'"';
111 list_parser %= skip(boost::spirit::standard::space)[
"[" >> start %
"," >>
"]"];
112 start %= real_parser<float, boost::spirit::qi::strict_real_policies<float>>() | int_
113 | bool_parser | char_parser | str_parser | list_parser;
116 BoolParse_map bool_parser;
118 qi::rule<Iterator, std::vector<ossia::value>()> list_parser;
119 qi::rule<
Iterator, char()> char_parser;
120 qi::rule<
Iterator, std::string()> str_parser;
121 qi::rule<
Iterator, ossia::value()> start;
Definition: lv2_atom_helpers.hpp:99