Some parsers (e.g. primitives and non-terminals) may take in additional
attributes. Such parsers take the form:

p(a1,a2,...,aN)

where p is a parser. Each
of the arguments (a1 ... aN) can either be an immediate value, or a function,
f, with signature:

Tf(Unused,Context)

where T, the function's
return value, is compatible with the argument type expected and Context is the parser's Context type
(The first argument is unused
to make the Context the
second argument. This is done for uniformity with Semantic Actions).

Some parsers need to know which character set a char
or wchar_t is operating on.
For example, the alnum
parser works differently with ISO8859.1 and ASCII encodings. Where necessary,
Spirit encodes (tags) the parser with the character set.

We have a namespace for each character set Spirit will be supporting. That
includes ascii, iso8859_1, standard
and standard_wide (and
in the future, unicode).
In each of the character encoding namespaces, we place tagged versions
of parsers such as alnum,
space etc.

Example:

usingboost::spirit::ascii::space;// use the ASCII space parser

Namespaces:

boost::spirit::ascii

boost::spirit::iso8859_1

boost::spirit::standard

boost::spirit::standard_wide

For ease of use, the components in this namespaces are also brought into
the qi sub-namespaces with the same names:

All sections in the reference present some real world examples. The examples
use a common test harness to keep the example code as minimal and direct
to the point as possible. The test harness is presented below.

The namespace boost::spirit::traits is open for users to provide their
own specializations. The customization points implemented by Spirit.Qi
usable to customize the behavior of parsers are described in the section
Customization of Attribute Handling.