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.
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
is positioned one past the last matching character/token.
f is restored to
its original position prior to entry.
parser is not
f is positioned one
past the last character/token matching
state is undefined.
characters/tokens will not be skipped.
All parsers in Spirit.Qi are models of the Parser concept.