3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>PrimitiveParser</title>
5 <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="../../../../index.html" title="Spirit 2.5.2">
8 <link rel="up" href="../parser_concepts.html" title="Parser Concepts">
9 <link rel="prev" href="parser.html" title="Parser">
10 <link rel="next" href="unaryparser.html" title="UnaryParser">
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
22 <div class="spirit-nav">
23 <a accesskey="p" href="parser.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unaryparser.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h5 class="title">
27 <a name="spirit.qi.reference.parser_concepts.primitiveparser"></a><a class="link" href="primitiveparser.html" title="PrimitiveParser">PrimitiveParser</a>
28 </h5></div></div></div>
30 <a name="spirit.qi.reference.parser_concepts.primitiveparser.h0"></a>
31 <span class="phrase"><a name="spirit.qi.reference.parser_concepts.primitiveparser.description"></a></span><a class="link" href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.description">Description</a>
34 <span class="emphasis"><em>PrimitiveParser</em></span> is the most basic building block
35 that the client uses to build more complex parsers.
38 <a name="spirit.qi.reference.parser_concepts.primitiveparser.h1"></a>
39 <span class="phrase"><a name="spirit.qi.reference.parser_concepts.primitiveparser.refinement_of"></a></span><a class="link" href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.refinement_of">Refinement
42 <div class="blockquote"><blockquote class="blockquote"><p>
43 <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
44 </p></blockquote></div>
46 <a name="spirit.qi.reference.parser_concepts.primitiveparser.h2"></a>
47 <span class="phrase"><a name="spirit.qi.reference.parser_concepts.primitiveparser.pre_skip"></a></span><a class="link" href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.pre_skip">Pre-skip</a>
50 Upon entry to the <code class="computeroutput"><span class="identifier">parse</span></code>
51 member function, a PrimitiveParser is required to do a pre-skip. Leading
52 <code class="computeroutput"><span class="identifier">skip</span></code> characters/tokens
53 will be skipped prior to parsing. Only PrimitiveParsers are required
54 to perform this pre-skip. This is typically carried out through a call
55 to <code class="computeroutput"><span class="identifier">qi</span><span class="special">::</span><span class="identifier">skip_over</span></code>:
57 <pre class="programlisting"><span class="identifier">qi</span><span class="special">::</span><span class="identifier">skip_over</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">skip</span><span class="special">);</span>
60 <a name="spirit.qi.reference.parser_concepts.primitiveparser.h3"></a>
61 <span class="phrase"><a name="spirit.qi.reference.parser_concepts.primitiveparser.type_expressions"></a></span><a class="link" href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.type_expressions">Type
64 <div class="informaltable"><table class="table">
84 <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_primitive_parser</span><span class="special"><</span><span class="identifier">P</span><span class="special">>::</span><span class="identifier">type</span></code>
89 Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
90 if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>,
91 is a PrimitiveParser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
92 otherwise (See <a href="../../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
93 Boolean Constant</a>).
99 <a name="spirit.qi.reference.parser_concepts.primitiveparser.h4"></a>
100 <span class="phrase"><a name="spirit.qi.reference.parser_concepts.primitiveparser.models"></a></span><a class="link" href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.models">Models</a>
102 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
103 <li class="listitem">
104 <a class="link" href="../auxiliary/attr.html" title="Attribute Parser (attr)"><code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">attrib</span><span class="special">)</span></code></a>
106 <li class="listitem">
107 <a class="link" href="../auxiliary/eoi.html" title="End of Input Parser (eoi)"><code class="computeroutput"><span class="identifier">eoi</span></code></a>
109 <li class="listitem">
110 <a class="link" href="../auxiliary/eol.html" title="End of Line Parser (eol)"><code class="computeroutput"><span class="identifier">eol</span></code></a>
112 <li class="listitem">
113 <a class="link" href="../auxiliary/eps.html" title="Epsilon Parser (eps)"><code class="computeroutput"><span class="identifier">eps</span></code></a>
115 <li class="listitem">
116 <a class="link" href="../string/symbols.html" title="Symbols Parser (symbols)"><code class="computeroutput"><span class="identifier">symbols</span><span class="special"><></span></code></a>
120 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
121 <td align="left"></td>
122 <td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
123 Distributed under the Boost Software License, Version 1.0. (See accompanying
124 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
129 <div class="spirit-nav">
130 <a accesskey="p" href="parser.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unaryparser.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>