Concretely, using the grammar g, how do I parse the string s ? What arguments should I give ? I've tried many calls and always got errors.
Also, since I'm not sure yet which one I will use later, would there be any difference using phrase_parse
instead ?
namespace qi = boost::spirit::qi;
int main() {
My_grammar<std::string::const_iterator> g;
std::string s = "a"; // string to parse
if (qi::parse( /*...*/ )) {
std::cout << "String parsed !";
} else {
std::cout << "String doesn't parse !";
}
return EXIT_SUCCESS;
}