...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
The omit[]
ignores the attribute of its subject parser replacing it with unused
.
// forwards to <boost/spirit/home/qi/directive/omit.hpp> #include <boost/spirit/include/qi_omit.hpp>
Also, see Include Structure.
Name |
---|
|
Notation
a
A Parser
.
Semantics of an expression is defined only where it differs from, or
is not defined in UnaryParser
.
Expression |
Semantics |
---|---|
|
Ignore the attribute of the subject parser, |
Expression |
Attribute |
---|---|
|
|
The complexity is defined by the complexity of the subject parser,
a
Note | |
---|---|
The test harness for the example(s) below is presented in the Basics Examples section. |
Some using declarations:
using boost::spirit::qi::omit; using boost::spirit::qi::int_; using boost::spirit::ascii::char_;
This parser ignores the first two characters and extracts the succeeding
int
:
int i; test_parser_attr("xx345", omit[char_ >> char_] >> int_, i); std::cout << i << std::endl; // should print 345