...one of the most highly
regarded and expertly designed C++ library projects in the
world. — Herb Sutter and Andrei
The Parser is the most fundamental concept. A Parser
has a member function,
that accepts a first-last
ForwardIterator pair and returns
bool as its result. The iterators delimit the data being parsed. The
the parse succeeds, in which case the first iterator is advanced accordingly.
Each Parser can represent a specific pattern or algorithm, or it can
be a more complex parser formed as a composition of other Parsers.
The parser's Context type.
The parser's Context, or
A skip Parser, or
A Compatible Attribute, or
In the expressions below, the behavior of the parser,
attrib are handled by
p, are left unspecified in the base
Parser concept. These
are specified in subsequent, more refined concepts and by the actual
For any Parser the following expressions must be valid:
p.parse(f, l, context, skip, attr)
Match the input sequence starting from
Get information about a Parser.
The Parser's expected attribute.
Metafunction that evaluates to
Upon return from
p.parse the following post conditions
fis positioned one past the last matching character/token.
fis restored to its original position prior to entry.
skipparser is not
fis positioned one past the last character/token matching
attribstate is undefined.
skipcharacters/tokens will not be skipped.
All parsers in Spirit.Qi are models of the Parser concept.