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

PrevUpHomeNext

Generator Operators

Sequence Generator (a << b)
Alternative Generator (a | b)
Kleene Star Generator (*a)
Plus Generator (+a)
List Generator (a % b)
Optional Generator (-a)
And-Predicate Generator (&a)
Not-Predicate Generator (!a)

Operators are used as a means for object composition and embedding. Simple generators 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 generator type which is a composite of its operands, a and b.

This module includes different generators which get instantiated if one of the overloaded operators is used with more primitive generator constructs. It includes sequences (a << b), alternatives (a | b), Kleene star (unary *), plus (unary +), optional (unary -), lists (a % b), and the two predicates, the and predicate (unary &) and the not predicate (unary !).

Module Header
// forwards to <boost/spirit/home/karma/operator.hpp>
#include <boost/spirit/include/karma_operator.hpp>

Also, see Include Structure.


PrevUpHomeNext