
19 Feb
2008
19 Feb
'08
6:47 p.m.
sorry, I forgot the white space parser to add here: template <typename GrammarT> static void parse(GrammarT const& grammar, std::string expr) { std::string::iterator first = expr.begin(); sp::parse_infostd::string::iterator result = sp::parse(first, expr.end(), grammar, sp::space_p); if ( !result.hit ) { std::cerr << "\"" << expr << "\"" << std::endl; std::cerr << std::setw(result.stop - expr.begin() + 1) << "^-- error (" << "\"" << *result.stop << "\")" << std::endl; } else if ( !result.full ) { first = result.stop; } } Thanks, Olaf