Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.


Alternative (a | b)
And-Predicate (&a)
Difference (a - b)
Expectation (a > b)
Kleene (*a)
List (a % b)
Not-Predicate (!a)
Optional (-a)
Permutation (a ^ b)
Plus (+a)
Sequence (a >> b)
Sequential Or (a || b)

Operators are used as a means for object composition and embedding. Simple parsers may be composed to form composites through operator overloading, crafted to approximate the syntax of Parsing Expression Grammar (PEG). An expression such as:

a | b

yields a new parser type which is a composite of its operands, a and b.

This module includes different parsers which get instantiated if one of the overloaded operators is used with more primitive parser constructs. It includes Alternative (|), And-predicate (unary &), Difference (-), Expect (>), Kleene star (unary *), Lists (%), Not-predicate (!), Optional (unary -), Permutation (^), Plus (unary +), Sequence (>>), and Sequential-Or (||).

Module Header
// forwards to <boost/spirit/home/qi/operator.hpp>
#include <boost/spirit/include/qi_operator.hpp>

Also, see Include Structure.