#include namespace ecgp { namespace qi = boost::spirit::qi; namespace ascii = boost::spirit::ascii; template struct ident: qi::grammar { ident(): ident::base_type(start) { using namespace qi; start %= lexeme[('_' | alpha) >> *(digit | alpha | '_' | '-')]; } qi::rule start; }; template struct idlist: qi::grammar { ecgp::ident id; idlist(): idlist::base_type(start) { using namespace qi; start %= id >> (char_(',') >> id); // line A //start %= id >> *(char_(',') >> id); // line B } qi::rule start; }; }