• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Parser Directives</title>
5<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../../index.html" title="Spirit 2.5.8">
8<link rel="up" href="../qi_parsers.html" title="Qi Parsers">
9<link rel="prev" href="auto.html" title="Auto Parsers">
10<link rel="next" href="operator.html" title="Parser Operators">
11</head>
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>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="auto.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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="operator.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h5 class="title">
27<a name="spirit.qi.quick_reference.qi_parsers.directive"></a><a class="link" href="directive.html" title="Parser Directives">Parser
28          Directives</a>
29</h5></div></div></div>
30<div class="informaltable"><table class="table">
31<colgroup>
32<col>
33<col>
34<col>
35</colgroup>
36<thead><tr>
37<th>
38                    <p>
39                      Expression
40                    </p>
41                  </th>
42<th>
43                    <p>
44                      Attribute
45                    </p>
46                  </th>
47<th>
48                    <p>
49                      Description
50                    </p>
51                  </th>
52</tr></thead>
53<tbody>
54<tr>
55<td>
56                    <p>
57                      <a class="link" href="../../reference/directive/lexeme.html" title="Parser Directive Inhibiting Skipping (lexeme[])"><code class="computeroutput"><span class="identifier">lexeme</span></code></a><code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
58                    </p>
59                  </td>
60<td>
61                    <p>
62                      <code class="computeroutput"><span class="identifier">A</span></code>
63                    </p>
64                  </td>
65<td>
66                    <p>
67                      Disable skip parsing for <code class="computeroutput"><span class="identifier">a</span></code>,
68                      does pre-skipping
69                    </p>
70                  </td>
71</tr>
72<tr>
73<td>
74                    <p>
75                      <a class="link" href="../../reference/directive/no_skip.html" title="Parser Directive Inhibiting Skipping Without Pre-skip (no_skip[])"><code class="computeroutput"><span class="identifier">no_skip</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
76                    </p>
77                  </td>
78<td>
79                    <p>
80                      <code class="computeroutput"><span class="identifier">A</span></code>
81                    </p>
82                  </td>
83<td>
84                    <p>
85                      Disable skip parsing for <code class="computeroutput"><span class="identifier">a</span></code>,
86                      no pre-skipping
87                    </p>
88                  </td>
89</tr>
90<tr>
91<td>
92                    <p>
93                      <a class="link" href="../../reference/directive/no_case.html" title="Parser Directive Inhibiting Case Sensitivity (no_case[])"><code class="computeroutput"><span class="identifier">no_case</span></code></a><code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
94                    </p>
95                  </td>
96<td>
97                    <p>
98                      <code class="computeroutput"><span class="identifier">A</span></code>
99                    </p>
100                  </td>
101<td>
102                    <p>
103                      Inhibits case-sensitivity for <code class="computeroutput"><span class="identifier">a</span></code>
104                    </p>
105                  </td>
106</tr>
107<tr>
108<td>
109                    <p>
110                      <a class="link" href="../../reference/directive/omit.html" title="Parser Directive Ignoring Attribute (omit[])"><code class="computeroutput"><span class="identifier">omit</span></code></a><code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
111                    </p>
112                  </td>
113<td>
114                    <p>
115                      <code class="computeroutput"><span class="identifier">Unused</span></code>
116                    </p>
117                  </td>
118<td>
119                    <p>
120                      Ignores the attribute type of <code class="computeroutput"><span class="identifier">a</span></code>
121                    </p>
122                  </td>
123</tr>
124<tr>
125<td>
126                    <p>
127                      <a class="link" href="../../reference/directive/matches.html" title="Directive Testing if Parser Succeeded (matches[])"><code class="computeroutput"><span class="identifier">matches</span></code></a><code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
128                    </p>
129                  </td>
130<td>
131                    <p>
132                      <code class="computeroutput"><span class="keyword">bool</span></code>
133                    </p>
134                  </td>
135<td>
136                    <p>
137                      Return if the embedded parser <code class="computeroutput"><span class="identifier">a</span></code>
138                      matched its input
139                    </p>
140                  </td>
141</tr>
142<tr>
143<td>
144                    <p>
145                      <a class="link" href="../../reference/directive/as.html" title="Parser Directives Forcing Atomic Assignment (as&lt;T&gt;, as_string[], as_wstring[])"><code class="computeroutput"><span class="identifier">as</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;[]</span></code></a><code class="computeroutput"><span class="special">()[</span><span class="identifier">a</span><span class="special">]</span></code>
146                    </p>
147                  </td>
148<td>
149                    <p>
150                      <code class="computeroutput"><span class="identifier">A</span></code>
151                    </p>
152                  </td>
153<td>
154                    <p>
155                      Force atomic assignment for arbitrary attribute types
156                    </p>
157                  </td>
158</tr>
159<tr>
160<td>
161                    <p>
162                      <a class="link" href="../../reference/directive/as.html" title="Parser Directives Forcing Atomic Assignment (as&lt;T&gt;, as_string[], as_wstring[])"><code class="computeroutput"><span class="identifier">as_string</span><span class="special">[]</span></code></a><code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
163                    </p>
164                  </td>
165<td>
166                    <p>
167                      <code class="computeroutput"><span class="identifier">A</span></code>
168                    </p>
169                  </td>
170<td>
171                    <p>
172                      Force atomic assignment for string attributes
173                    </p>
174                  </td>
175</tr>
176<tr>
177<td>
178                    <p>
179                      <a class="link" href="../../reference/directive/as.html" title="Parser Directives Forcing Atomic Assignment (as&lt;T&gt;, as_string[], as_wstring[])"><code class="computeroutput"><span class="identifier">as_wstring</span><span class="special">[]</span></code></a><code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
180                    </p>
181                  </td>
182<td>
183                    <p>
184                      <code class="computeroutput"><span class="identifier">A</span></code>
185                    </p>
186                  </td>
187<td>
188                    <p>
189                      Force atomic assignment for wide character string attributes
190                    </p>
191                  </td>
192</tr>
193<tr>
194<td>
195                    <p>
196                      <a class="link" href="../../reference/directive/raw.html" title="Directive for Transduction Parsing (raw[])"><code class="computeroutput"><span class="identifier">raw</span></code></a><code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
197                    </p>
198                  </td>
199<td>
200                    <p>
201                      <a href="../../../../../../../../libs/range/doc/html/range/reference/utilities/iterator_range.html" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_range</span></code></a><code class="computeroutput"><span class="special">&lt;</span><span class="identifier">I</span><span class="special">&gt;</span></code>
202                    </p>
203                  </td>
204<td>
205                    <p>
206                      Presents the transduction of <code class="computeroutput"><span class="identifier">a</span></code>
207                      as an iterator range
208                    </p>
209                  </td>
210</tr>
211<tr>
212<td>
213                    <p>
214                      <a class="link" href="../../reference/directive/expect.html" title="Expectation Directive (expect[])"><code class="computeroutput"><span class="identifier">expect</span></code></a><code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
215                    </p>
216                  </td>
217<td>
218                    <p>
219                      <code class="computeroutput"><span class="identifier">A</span></code>
220                    </p>
221                  </td>
222<td>
223                    <p>
224                      Throw an exception if parsing <code class="computeroutput"><span class="identifier">a</span></code>
225                      fails
226                    </p>
227                  </td>
228</tr>
229<tr>
230<td>
231                    <p>
232                      <a class="link" href="../../reference/directive/repeat.html" title="Repetition Parser Directive (repeat[])"><code class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
233                    </p>
234                  </td>
235<td>
236                    <p>
237                      <code class="computeroutput"><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span></code>
238                    </p>
239                  </td>
240<td>
241                    <p>
242                      Repeat <code class="computeroutput"><span class="identifier">a</span></code> zero
243                      or more times
244                    </p>
245                  </td>
246</tr>
247<tr>
248<td>
249                    <p>
250                      <a class="link" href="../../reference/directive/repeat.html" title="Repetition Parser Directive (repeat[])"><code class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">N</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></code></a>
251                    </p>
252                  </td>
253<td>
254                    <p>
255                      <code class="computeroutput"><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span></code>
256                    </p>
257                  </td>
258<td>
259                    <p>
260                      Repeat <code class="computeroutput"><span class="identifier">a</span></code> <code class="computeroutput"><span class="identifier">N</span></code> times
261                    </p>
262                  </td>
263</tr>
264<tr>
265<td>
266                    <p>
267                      <a class="link" href="../../reference/directive/repeat.html" title="Repetition Parser Directive (repeat[])"><code class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">N</span><span class="special">,</span>
268                      <span class="identifier">M</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></code></a>
269                    </p>
270                  </td>
271<td>
272                    <p>
273                      <code class="computeroutput"><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span></code>
274                    </p>
275                  </td>
276<td>
277                    <p>
278                      Repeat <code class="computeroutput"><span class="identifier">a</span></code> <code class="computeroutput"><span class="identifier">N</span></code> to <code class="computeroutput"><span class="identifier">M</span></code>
279                      times
280                    </p>
281                  </td>
282</tr>
283<tr>
284<td>
285                    <p>
286                      <a class="link" href="../../reference/directive/repeat.html" title="Repetition Parser Directive (repeat[])"><code class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">N</span><span class="special">,</span>
287                      <span class="identifier">inf</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></code></a>
288                    </p>
289                  </td>
290<td>
291                    <p>
292                      <code class="computeroutput"><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span></code>
293                    </p>
294                  </td>
295<td>
296                    <p>
297                      Repeat <code class="computeroutput"><span class="identifier">a</span></code> <code class="computeroutput"><span class="identifier">N</span></code> or more times
298                    </p>
299                  </td>
300</tr>
301<tr>
302<td>
303                    <p>
304                      <a class="link" href="../../reference/directive/skip.html" title="Parser Directive Re-Establishing Skipping (skip[])"><code class="computeroutput"><span class="identifier">skip</span></code></a><code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
305                    </p>
306                  </td>
307<td>
308                    <p>
309                      <code class="computeroutput"><span class="identifier">A</span></code>
310                    </p>
311                  </td>
312<td>
313                    <p>
314                      Re-establish the skipper that got inhibited by lexeme or no_skip.
315                    </p>
316                  </td>
317</tr>
318<tr>
319<td>
320                    <p>
321                      <a class="link" href="../../reference/directive/skip.html" title="Parser Directive Re-Establishing Skipping (skip[])"><code class="computeroutput"><span class="identifier">skip</span></code></a><code class="computeroutput"><span class="special">(</span><span class="identifier">p</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></code>
322                    </p>
323                  </td>
324<td>
325                    <p>
326                      <code class="computeroutput"><span class="identifier">A</span></code>
327                    </p>
328                  </td>
329<td>
330                    <p>
331                      Use <code class="computeroutput"><span class="identifier">p</span></code> as a
332                      skipper for parsing <code class="computeroutput"><span class="identifier">a</span></code>
333                    </p>
334                  </td>
335</tr>
336</tbody>
337</table></div>
338<p>
339            ]
340          </p>
341</div>
342<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
343<td align="left"></td>
344<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
345        Distributed under the Boost Software License, Version 1.0. (See accompanying
346        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>)
347      </p>
348</div></td>
349</tr></table>
350<hr>
351<div class="spirit-nav">
352<a accesskey="p" href="auto.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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="operator.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
353</div>
354</body>
355</html>
356