1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Generator Operators</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="../primitive_generators.html" title="Karma Generators"> 9<link rel="prev" href="auto.html" title="Auto Generators"> 10<link rel="next" href="directives.html" title="Generator Directives"> 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="../primitive_generators.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="directives.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.karma.quick_reference.primitive_generators.operators"></a><a class="link" href="operators.html" title="Generator Operators">Generator 28 Operators</a> 29</h5></div></div></div> 30<p> 31 See here for more information about <a class="link" href="../../reference/operator.html" title="Generator Operators">Generator 32 Operators</a>. 33 </p> 34<div class="informaltable"><table class="table"> 35<colgroup> 36<col> 37<col> 38<col> 39</colgroup> 40<thead><tr> 41<th> 42 <p> 43 Expression 44 </p> 45 </th> 46<th> 47 <p> 48 Attribute 49 </p> 50 </th> 51<th> 52 <p> 53 Description 54 </p> 55 </th> 56</tr></thead> 57<tbody> 58<tr> 59<td> 60 <p> 61 <a class="link" href="../../reference/operator/not_predicate.html" title="Not-Predicate Generator (!a)"><code class="computeroutput"><span class="special">!</span><span class="identifier">a</span></code></a> 62 </p> 63 </td> 64<td> 65 <p> 66 <code class="computeroutput"><span class="identifier">A</span></code> 67 </p> 68 </td> 69<td> 70 <p> 71 Not predicate. Ensure that <code class="computeroutput"><span class="identifier">a</span></code> 72 does not succeed generating, but don't create any output 73 </p> 74 </td> 75</tr> 76<tr> 77<td> 78 <p> 79 <a class="link" href="../../reference/operator/and_predicate.html" title="And-Predicate Generator (&a)"><code class="computeroutput"><span class="special">&</span><span class="identifier">a</span></code></a> 80 </p> 81 </td> 82<td> 83 <p> 84 <code class="computeroutput"><span class="identifier">A</span></code> 85 </p> 86 </td> 87<td> 88 <p> 89 And predicate. Ensure that <code class="computeroutput"><span class="identifier">a</span></code> 90 does succeed generating, but don't create any output 91 </p> 92 </td> 93</tr> 94<tr> 95<td> 96 <p> 97 <a class="link" href="../../reference/operator/optional.html" title="Optional Generator (-a)"><code class="computeroutput"><span class="special">-</span><span class="identifier">a</span></code></a> 98 </p> 99 </td> 100<td> 101 <p> 102 <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> 103 </p> 104 </td> 105<td> 106 <p> 107 Optional. Generate <code class="computeroutput"><span class="identifier">a</span></code> 108 zero or one time 109 </p> 110 </td> 111</tr> 112<tr> 113<td> 114 <p> 115 <a class="link" href="../../reference/operator/kleene.html" title="Kleene Star Generator (*a)"><code class="computeroutput"><span class="special">*</span><span class="identifier">a</span></code></a> 116 </p> 117 </td> 118<td> 119 <p> 120 <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> 121 </p> 122 </td> 123<td> 124 <p> 125 Kleene. Generate <code class="computeroutput"><span class="identifier">a</span></code> 126 zero or more times 127 </p> 128 </td> 129</tr> 130<tr> 131<td> 132 <p> 133 <a class="link" href="../../reference/operator/plus.html" title="Plus Generator (+a)"><code class="computeroutput"><span class="special">+</span><span class="identifier">a</span></code></a> 134 </p> 135 </td> 136<td> 137 <p> 138 <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> 139 </p> 140 </td> 141<td> 142 <p> 143 Plus. Generate <code class="computeroutput"><span class="identifier">a</span></code> 144 one or more times 145 </p> 146 </td> 147</tr> 148<tr> 149<td> 150 <p> 151 <a class="link" href="../../reference/operator/alternative.html" title="Alternative Generator (a | b)"><code class="computeroutput"><span class="identifier">a</span> <span class="special">|</span> 152 <span class="identifier">b</span></code></a> 153 </p> 154 </td> 155<td> 156 <p> 157 <code class="computeroutput"><span class="identifier">variant</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> 158 <span class="identifier">B</span><span class="special">></span></code> 159 </p> 160 </td> 161<td> 162 <p> 163 Alternative. Generate <code class="computeroutput"><span class="identifier">a</span></code> 164 or <code class="computeroutput"><span class="identifier">b</span></code> 165 </p> 166 </td> 167</tr> 168<tr> 169<td> 170 <p> 171 <a class="link" href="../../reference/operator/sequence.html" title="Sequence Generator (a << b)"><code class="computeroutput"><span class="identifier">a</span> <span class="special"><<</span> 172 <span class="identifier">b</span></code></a> 173 </p> 174 </td> 175<td> 176 <p> 177 <code class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> 178 <span class="identifier">B</span><span class="special">></span></code> 179 </p> 180 </td> 181<td> 182 <p> 183 Sequence. Generate <code class="computeroutput"><span class="identifier">a</span></code> 184 followed by <code class="computeroutput"><span class="identifier">b</span></code> 185 </p> 186 </td> 187</tr> 188<tr> 189<td> 190 <p> 191 <a class="link" href="../../reference/operator/list.html" title="List Generator (a % b)"><code class="computeroutput"><span class="identifier">a</span> <span class="special">%</span> 192 <span class="identifier">b</span></code></a> 193 </p> 194 </td> 195<td> 196 <p> 197 <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> 198 </p> 199 </td> 200<td> 201 <p> 202 List. Generate <code class="computeroutput"><span class="identifier">a</span></code> 203 delimited <code class="computeroutput"><span class="identifier">b</span></code> 204 one or more times 205 </p> 206 </td> 207</tr> 208</tbody> 209</table></div> 210<div class="blockquote"><blockquote class="blockquote"><p> 211 For more information about the attribute propagation rules implemented 212 by the compound generators please see <a class="link" href="../compound_attribute_rules.html" title="Compound Attribute Rules">Generator 213 Compound Attribute Rules</a>. 214 </p></blockquote></div> 215</div> 216<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 217<td align="left"></td> 218<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p> 219 Distributed under the Boost Software License, Version 1.0. (See accompanying 220 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>) 221 </p> 222</div></td> 223</tr></table> 224<hr> 225<div class="spirit-nav"> 226<a accesskey="p" href="auto.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="directives.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 227</div> 228</body> 229</html> 230