split grammar into two rules (VS2017)

This commit is contained in:
artemp 2017-07-06 16:02:47 +02:00
parent 55776f0b8c
commit cd0c746a42

View file

@ -38,8 +38,9 @@ namespace visual_tests {
namespace x3 = boost::spirit::x3;
using x3::ulong_;
auto const map_sizes_grammar = x3::rule<class map_sizes_grammar_type, std::vector<map_size> >{} =
(ulong_ >> ',' >> ulong_) % ';' ;
auto const map_size_rule = x3::rule<class map_size_rule, map_size> {} = ulong_ >> ',' >> ulong_;
auto const map_sizes_grammar = x3::rule<class map_sizes_grammar_type, std::vector<map_size> > {} =
map_size_rule % ';' ;
void parse_map_sizes(std::string const & str, std::vector<map_size> & sizes)
{