6#if defined(_GLIBCXX_DEBUG) 
    7#define BOOST_PHOENIX_USING_LIBCPP 
    9#include <ossia/network/base/name_validation.hpp> 
   10#include <ossia/network/value/value.hpp> 
   12#include <boost/fusion/adapted.hpp> 
   13#include <boost/fusion/adapted/std_array.hpp> 
   14#include <boost/spirit/home/x3.hpp> 
   16BOOST_FUSION_ADAPT_STRUCT(ossia::impulse)
 
   17namespace ossia::detail::parse
 
   19using namespace boost::fusion;
 
   20namespace x3 = boost::spirit::x3;
 
   27struct BoolParse_map : x3::symbols<bool>
 
   31    add(
"bool: true", 
true)(
"bool: false", 
false)(
"bool: 1", 
true)(
"bool: 0", 
false);
 
   35const x3::rule<class value_, ossia::value> value_ = 
"value";
 
   36const x3::rule<class o_impulse_, ossia::impulse> o_impulse_ = 
"impulse";
 
   37const x3::rule<class o_str_, std::string> o_str_ = 
"str";
 
   38const x3::rule<class o_vec2_, std::array<float, 2>> o_vec2_ = 
"vec2";
 
   39const x3::rule<class o_vec3_, std::array<float, 3>> o_vec3_ = 
"vec3";
 
   40const x3::rule<class o_vec4_, std::array<float, 4>> o_vec4_ = 
"vec4";
 
   41const x3::rule<class o_list_, std::vector<ossia::value>> o_list_ = 
"list";
 
   43struct EscapedChar : x3::symbols<const char>
 
   45  EscapedChar() { add(
"\\\"", 
'\"'); }
 
   47using float_p = real_parser<float, x3::real_policies<float>>;
 
   49const auto o_impulse__def = x3::lit(
"impulse")[([](
auto&) { 
return ossia::impulse{}; })];
 
   51    = 
"string: \"" >> (x3::lexeme[*(EscapedChar() | (char_ - 
'"'))]) >> 
'"';
 
   52const auto o_vec2__def = 
"vec2f: [" >> float_p() >> 
"," >> float_p() >> 
"]";
 
   54    = 
"vec3f: [" >> float_p() >> 
"," >> float_p() >> 
"," >> float_p() >> 
"]";
 
   55const auto o_vec4__def = 
"vec4f: [" >> float_p() >> 
"," >> float_p() >> 
"," >> float_p()
 
   56                         >> 
"," >> float_p() >> 
"]";
 
   57const auto o_list__def = 
"list: [" >> *(value_ % x3::lit(
",")) >> 
"]";
 
   59BOOST_SPIRIT_DEFINE(o_impulse_)
 
   60BOOST_SPIRIT_DEFINE(o_str_)
 
   61BOOST_SPIRIT_DEFINE(o_vec2_)
 
   62BOOST_SPIRIT_DEFINE(o_vec3_)
 
   63BOOST_SPIRIT_DEFINE(o_vec4_)
 
   64BOOST_SPIRIT_DEFINE(o_list_)
 
   66const auto value__def = (
"float: " >> float_p()) | (
"char: '" >> (char_ - 
"'") >> 
"'")
 
   67                        | (
"int: " >> int_) | BoolParse_map{} | o_impulse_ | o_str_
 
   68                        | o_vec2_ | o_vec3_ | o_vec4_ | o_list_;
 
   70BOOST_SPIRIT_DEFINE(value_)
 
   72const x3::rule<class address_, std::string> address_ = 
"address";
 
   73const auto address__def = x3::lexeme[(
 
   74    +(
"/" >> +x3::char_(std::string{ossia::net::name_characters()})) | 
"/")];
 
   75BOOST_SPIRIT_DEFINE(address_)
 
   77const x3::rule<class preset_pair_, std::pair<std::string, ossia::value>> preset_pair_
 
   79const auto preset_pair__def
 
   80    = x3::lexeme[+x3::char_(std::string{ossia::net::path_characters()}) >> x3::lit(
"\t")]
 
   82BOOST_SPIRIT_DEFINE(preset_pair_)
 
   84const x3::rule<class preset_, std::vector<std::pair<std::string, ossia::value>>> preset_
 
   86const auto preset__def = *(preset_pair_ % x3::lexeme[x3::eol]);
 
   87BOOST_SPIRIT_DEFINE(preset_)