MCPcopy Create free account
hub / github.com/boostorg/parser / main

Function main

test/disable_trace.cpp:14–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#include <boost/parser/parser.hpp>
13
14int main()
15{
16 namespace bp = boost::parser;
17 {
18 auto const parser =
19 bp::string("FOO") >> -(bp::string("bar") | bp::string("foo"));
20
21 auto result = bp::parse("FOOfoo", parser);
22 BOOST_TEST(result);
23 BOOST_TEST(bp::get(*result, bp::llong<0>{}) == std::string("FOO"));
24 BOOST_TEST(bp::get(*result, bp::llong<1>{}) == std::string("foo"));
25 }
26 return boost::report_errors();
27}

Callers

nothing calls this directly

Calls 3

stringClass · 0.50
parseFunction · 0.50
getFunction · 0.50

Tested by

no test coverage detected