#ifndef idB6D0694FDF6B4902A244C7A51C9727FE #define idB6D0694FDF6B4902A244C7A51C9727FE #define BOOST_SPIRIT_USE_PHOENIX_V3 #include #include #include #include #include #include #include #include namespace dk { namespace implem { struct get_line_f { template struct result { typedef size_t type; }; template size_t operator()(const I& parStart, const I& parPosIter) const { return boost::spirit::get_column(parStart, parPosIter) - 1; } }; template struct AsciiMapGrammar : boost::spirit::qi::grammar()> { explicit AsciiMapGrammar ( const I& parItStart ); boost::spirit::qi::rule()> start; std::vector lengths; boost::phoenix::function getline; boost::spirit::qi::int_parser digit_int; }; template AsciiMapGrammar::AsciiMapGrammar (const I& parItStart) : AsciiMapGrammar::base_type(start) { using boost::phoenix::push_back; using boost::spirit::qi::_1; using boost::spirit::qi::eol; using boost::spirit::qi::eoi; using boost::spirit::qi::raw; using boost::phoenix::begin; using boost::spirit::qi::int_parser; start %= *digit_int % raw[ eol ][push_back(boost::phoenix::ref(lengths), getline(boost::phoenix::val(parItStart), begin(_1)))] ; } }} //namespace dk::implem #undef BOOST_SPIRIT_USE_PHOENIX_V3 #endif