Boost C++ Libraries

...one 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.
PrevUpHomeNext

Parser Operators

Alternative Parser (a | b)
And-Predicate Parser (&a)
Difference Parser (a - b)
Expectation Operator (a > b)
Kleene Parser (*a)
List Parser (a % b)
Not-Predicate Parser (!a)
Optional Parser (-a)
Permutation Parser (a ^ b)
Plus Parser (+a)
Sequence Parser (a >> b)
Sequential Or Parser (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.


PrevUpHomeNext