This commit is contained in:
Eric Mertens 2023-05-03 14:09:22 -07:00
parent fce18c81b3
commit f12f1d6f67

View File

@ -44,11 +44,11 @@ struct Monkey {
struct Grammar : public qi::grammar<std::string::const_iterator, std::vector<Monkey>()> { struct Grammar : public qi::grammar<std::string::const_iterator, std::vector<Monkey>()> {
qi::rule<iterator_type, Monkey()> monkey; qi::rule<iterator_type, Monkey()> monkey;
qi::rule<iterator_type, std::vector<Monkey>()> monkies; qi::rule<iterator_type, std::vector<Monkey>()> monkeys;
Grammar() : base_type{monkies} { Grammar() : base_type{monkeys} {
using namespace qi::labels; using namespace qi::labels;
monkies = monkey % "\n"; monkeys = monkey % "\n";
monkey = monkey =
"Monkey " >> "Monkey " >>
qi::omit[qi::ulong_long] >> qi::omit[qi::ulong_long] >>