自己完結型の例にそれを作る:
は、それがLive On Wandbox
#include <boost/spirit/include/qi.hpp>
namespace test {
using namespace boost::spirit::qi;
rule<std::string::const_iterator> rule = lit("data") > '{' > '}';
}
int main() {
std::string const input("data{");
bool ok = parse(input.begin(), input.end(), test::rule);
}
スロー期待の失敗を参照してくださいい。スペースのスキッパーを使用した場合
はでも、それはまだスロー:
はそれをLive On Wandboxを参照してくださいあまりにも
#include <boost/spirit/include/qi.hpp>
namespace test {
using namespace boost::spirit::qi;
rule<std::string::const_iterator, space_type> rule = lit("data") > '{' > '}';
}
int main() {
std::string const input("data{");
bool ok = phrase_parse(input.begin(), input.end(), test::rule, test::space);
}
簡単なスタンドアロン例えば – sehe