quickref.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. <html>
  2. <head>
  3. <title>Quick Reference</title>
  4. <link rel="stylesheet" href="theme/style.css" type="text/css">
  5. </head>
  6. <body>
  7. <table width="100%" border="0" background="theme/bkd2.gif" cellspacing="2">
  8. <tr>
  9. <td width="10"> </td>
  10. <td width="85%"> <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>Quick
  11. Reference </b></font></td>
  12. <td width="112"><a href="http://spirit.sf.net"><img src="theme/spirit.gif" width="112" height="48" align="right" border="0"></a></td>
  13. </tr>
  14. </table>
  15. <br>
  16. <table border="0">
  17. <tr>
  18. <td width="10"></td>
  19. <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>
  20. <td width="30"><a href="error_handling.html"><img src="theme/l_arr.gif" border="0"></a></td>
  21. <td width="30"><a href="includes.html"><img src="theme/r_arr.gif" border="0"></a></td>
  22. </tr>
  23. </table>
  24. <p>This isn't intended to be a full, detailed reference; nor is it intended to
  25. be of any use to readers who aren't already familiar with Spirit. It's just
  26. a brief reminder of the syntax and behaviour of each component, with links to
  27. the full documentation. </p>
  28. <ul>
  29. <li><strong>Primitive parser generators</strong> <i>(action arguments are listed
  30. on the right)</i>
  31. <ul>
  32. <li><a href="quickref.html#null_parsers">Null parsers</a></li>
  33. <li><a href="quickref.html#character_parsers">Character parsers</a></li>
  34. <li><a href="quickref.html#number_parsers">Number parsers</a></li>
  35. <li><a href="quickref.html#otherlexeme_parsers">Other lexeme parsers</a></li>
  36. <li><a href="quickref.html#text_parsers">Text parsers</a><br>
  37. <br>
  38. </li>
  39. </ul>
  40. </li>
  41. <li><strong>Other parser elements</strong>
  42. <ul>
  43. <li><a href="quickref.html#compound_parsers">Compound parsers</a></li>
  44. <li><a href="quickref.html#general_directives">General directives</a></li>
  45. <li><a href="quickref.html#tree_specific_directives">Tree-specific directives</a><br>
  46. <br>
  47. </li>
  48. </ul>
  49. </li>
  50. <li><strong>Operators</strong>
  51. <ul>
  52. <li><a href="quickref.html#unary_operators">Unary operators</a></li>
  53. <li><a href="quickref.html#binary_operators">Binary operators</a> <i>(in order of precedence)<br>
  54. </i></li>
  55. </ul>
  56. </li>
  57. </ul>
  58. <table>
  59. <tr>
  60. <td valign="top">
  61. <table>
  62. <tr>
  63. <td class="table_title" colspan="3"><a name="null_parsers"></a>Null parsers</td>
  64. </tr>
  65. <tr>
  66. <td class="table_cells"><code><a href="primitives.html">end_p</a></code></td>
  67. <td class="table_cells">Matches EOF</td>
  68. <td class="table_cells"><i>iter,iter</i></td>
  69. </tr>
  70. <tr>
  71. <td class="table_cells"><code><a href="primitives.html">eps_p</a><br />
  72. <a href="primitives.html">eps_p</a>(P)</code></td>
  73. <td class="table_cells">Matches without consuming text</td>
  74. <td class="table_cells"><i>iter,iter</i></td>
  75. </tr>
  76. <tr>
  77. <td class="table_cells"><code><a href="primitives.html">epsilon_p</a><br />
  78. <a href="primitives.html">epsilon_p</a>(P)</code></td>
  79. <td class="table_cells">Synonym for <b>eps_p</b></td>
  80. <td class="table_cells"><i>iter,iter</i></td>
  81. </tr>
  82. <tr>
  83. <td class="table_cells"><code><a href="primitives.html">nothing_p</a></code></td>
  84. <td class="table_cells">Always fails</td>
  85. <td class="table_cells"><i>iter,iter</i></td>
  86. </tr>
  87. <tr>
  88. <td class="table_title" colspan="3"><a name="character_parsers"></a>Character parsers</td>
  89. </tr>
  90. <tr>
  91. <td class="table_cells"><code><a href="primitives.html">alnum_p</a></code></td>
  92. <td class="table_cells">Matches any alphanumeric character</td>
  93. <td class="table_cells"><i>char</i></td>
  94. </tr>
  95. <tr>
  96. <td class="table_cells"><code><a href="primitives.html">alpha_p</a></code></td>
  97. <td class="table_cells">Matches any letter</td>
  98. <td class="table_cells"><i>char</i></td>
  99. </tr>
  100. <tr>
  101. <td class="table_cells"><code><a href="primitives.html">anychar_p</a></code></td>
  102. <td class="table_cells">Matches any character</td>
  103. <td class="table_cells"><i>char</i></td>
  104. </tr>
  105. <tr>
  106. <td class="table_cells"><code><a href="primitives.html">blank_p</a></code></td>
  107. <td class="table_cells">Matches a space or tab</td>
  108. <td class="table_cells"><i>char</i></td>
  109. </tr>
  110. <tr>
  111. <td class="table_cells"><code><a href="primitives.html">ch_p</a>(char)</code></td>
  112. <td class="table_cells">Matches a character</td>
  113. <td class="table_cells"><i>char</i></td>
  114. </tr>
  115. <tr>
  116. <td class="table_cells"><code><a href="character_sets.html">chset_p</a>(charset)</code></td>
  117. <td class="table_cells">Matches a character in the set</td>
  118. <td class="table_cells"><i>char</i></td>
  119. </tr>
  120. <tr>
  121. <td class="table_cells"><code><a href="primitives.html">cntrl_p</a></code></td>
  122. <td class="table_cells">Matches any control character</td>
  123. <td class="table_cells"><i>char</i></td>
  124. </tr>
  125. <tr>
  126. <td class="table_cells"><code><a href="primitives.html">digit_p</a></code></td>
  127. <td class="table_cells">Matches any digit</td>
  128. <td class="table_cells"><i>char</i></td>
  129. </tr>
  130. <tr>
  131. <td class="table_cells"><code><a href="parametric_parsers.html">f_ch_p</a>(func)</code></td>
  132. <td class="table_cells">Matches a character</td>
  133. <td class="table_cells"><i>char</i></td>
  134. </tr>
  135. <tr>
  136. <td class="table_cells"><code><a href="parametric_parsers.html">f_range_p</a>(func1,
  137. func2)</code></td>
  138. <td class="table_cells">Matches any character in the inclusive range</td>
  139. <td class="table_cells"><i>char</i></td>
  140. </tr>
  141. <tr>
  142. <td class="table_cells"><code><a href="primitives.html">graph_p</a></code></td>
  143. <td class="table_cells">Matches any non-space printable character</td>
  144. <td class="table_cells"><i>char</i></td>
  145. </tr>
  146. <tr>
  147. <td class="table_cells"><code><a href="primitives.html">lower_p</a></code></td>
  148. <td class="table_cells">Matches any lower-case letter</td>
  149. <td class="table_cells"><i>char</i></td>
  150. </tr>
  151. <tr>
  152. <td class="table_cells"><code><a href="primitives.html">print_p</a></code></td>
  153. <td class="table_cells">Matches any printable character</td>
  154. <td class="table_cells"><i>char</i></td>
  155. </tr>
  156. <tr>
  157. <td class="table_cells"><code><a href="primitives.html">punct_p</a></code></td>
  158. <td class="table_cells">Matches any punctuation mark</td>
  159. <td class="table_cells"><i>char</i></td>
  160. </tr>
  161. <tr>
  162. <td class="table_cells"><code><a href="primitives.html">range_p</a>(char1,
  163. char2)</code></td>
  164. <td class="table_cells">Matches any character in the inclusive range</td>
  165. <td class="table_cells"><i>char</i></td>
  166. </tr>
  167. <tr>
  168. <td class="table_cells"><code><a href="numerics.html">sign_p</a></code></td>
  169. <td class="table_cells">Matches a plus or minus sign</td>
  170. <td class="table_cells"><i>bool</i></td>
  171. </tr>
  172. <tr>
  173. <td class="table_cells"><code><a href="primitives.html">space_p</a></code></td>
  174. <td class="table_cells">Matches any whitespace character</td>
  175. <td class="table_cells"><i>char</i></td>
  176. </tr>
  177. <tr>
  178. <td class="table_cells"><code><a href="primitives.html">upper_p</a></code></td>
  179. <td class="table_cells">Matches any upper-case letter</td>
  180. <td class="table_cells"><i>char</i></td>
  181. </tr>
  182. <tr>
  183. <td class="table_cells"><code><a href="primitives.html">xdigit_p</a></code></td>
  184. <td class="table_cells">Matches any hexadecimal digit</td>
  185. <td class="table_cells"><i>char</i></td>
  186. </tr>
  187. <tr>
  188. <td class="table_title" colspan="3"><a name="number_parsers"></a>Number parsers</td>
  189. </tr>
  190. <tr>
  191. <td class="table_cells"><code><a href="numerics.html">bin_p</a></code></td>
  192. <td class="table_cells">Matches an unsigned binary integer</td>
  193. <td class="table_cells"><i>numeric</i></td>
  194. </tr>
  195. <tr>
  196. <td class="table_cells"><code><a href="numerics.html">hex_p</a></code></td>
  197. <td class="table_cells">Matches an unsigned hexadecimal integer</td>
  198. <td class="table_cells"><i>numeric</i></td>
  199. </tr>
  200. <tr>
  201. <td class="table_cells"><code><a href="numerics.html">int_p</a></code></td>
  202. <td class="table_cells">Matches a signed decimal integer</td>
  203. <td class="table_cells"><i>numeric</i></td>
  204. </tr>
  205. <tr>
  206. <td class="table_cells"><code><a href="numerics.html">int_parser</a>&lt;type,
  207. base, min, max&gt;</code></td>
  208. <td class="table_cells">Matches a signed integer with <b>min</b> to <b>max</b> digits</td>
  209. <td class="table_cells"><i>numeric</i></td>
  210. </tr>
  211. <tr>
  212. <td class="table_cells"><code><a href="numerics.html">oct_p</a></code></td>
  213. <td class="table_cells">Matches an unsigned octal integer</td>
  214. <td class="table_cells"><i>numeric</i></td>
  215. </tr>
  216. <tr>
  217. <td class="table_cells"><code><a href="numerics.html">real_p</a></code></td>
  218. <td class="table_cells">Matches a floating point number</td>
  219. <td class="table_cells"><i>numeric</i></td>
  220. </tr>
  221. <tr>
  222. <td class="table_cells"><code><a href="numerics.html">real_parser</a>&lt;type,
  223. policy&gt;</code></td>
  224. <td class="table_cells">Matches a floating point number</td>
  225. <td class="table_cells"><i>numeric</i></td>
  226. </tr>
  227. <tr>
  228. <td class="table_cells"><code><a href="numerics.html">strict_real_p</a></code></td>
  229. <td class="table_cells">Matches a floating point number (requires decimal point)</td>
  230. <td class="table_cells"><i>numeric</i></td>
  231. </tr>
  232. <tr>
  233. <td class="table_cells"><code><a href="numerics.html">strict_ureal_p</a></code></td>
  234. <td class="table_cells">Matches an unsigned FP number (requires decimal point)</td>
  235. <td class="table_cells"><i>numeric</i></td>
  236. </tr>
  237. <tr>
  238. <td class="table_cells"><code><a href="numerics.html">uint_p</a></code></td>
  239. <td class="table_cells">Matches an unsigned decimal integer</td>
  240. <td class="table_cells"><i>numeric</i></td>
  241. </tr>
  242. <tr>
  243. <td class="table_cells"><code><a href="numerics.html">uint_parser</a>&lt;type,
  244. base, min, max&gt;</code></td>
  245. <td class="table_cells">Matches an unsigned integer with <b>min</b> to <b>max</b> digits</td>
  246. <td class="table_cells"><i>numeric</i></td>
  247. </tr>
  248. <tr>
  249. <td class="table_cells"><code><a href="numerics.html">ureal_p</a></code></td>
  250. <td class="table_cells">Matches an unsigned FP number</td>
  251. <td class="table_cells"><i>numeric</i></td>
  252. </tr>
  253. <tr>
  254. <td class="table_title" colspan="3" id="other_lexeme_parsers"><a name="otherlexeme_parsers"></a>Other lexeme parsers</td>
  255. </tr>
  256. <tr>
  257. <td class="table_cells"><code><a href="escape_char_parser.html">c_escape_ch_p</a></code></td>
  258. <td class="table_cells">Matches a C escape code</td>
  259. <td class="table_cells"><i>char</i></td>
  260. </tr>
  261. <tr>
  262. <td class="table_cells"><code><a href="confix.html">comment_p</a>(string)<br />
  263. <a href="confix.html">comment_p</a> (string1, string2)</code></td>
  264. <td class="table_cells">Matches C++ or C-style comments</td>
  265. <td class="table_cells"><i>iter,iter</i></td>
  266. </tr>
  267. <tr>
  268. <td class="table_cells"><code><a href="primitives.html">eol_p</a></code></td>
  269. <td class="table_cells">Matches CR, LF, or any combination</td>
  270. <td class="table_cells"><i>iter,iter</i></td>
  271. </tr>
  272. <tr>
  273. <td class="table_cells"><code><a href="parametric_parsers.html">f_str_p</a>(func1,
  274. func2)</code></td>
  275. <td class="table_cells">Matches a string</td>
  276. <td class="table_cells"><i>iter,iter</i></td>
  277. </tr>
  278. <tr>
  279. <td class="table_cells"><code><a href="escape_char_parser.html">lex_escape_ch_p</a></code></td>
  280. <td class="table_cells">Matches a C escape code or any backslash escape</td>
  281. <td class="table_cells"><i>char</i></td>
  282. </tr>
  283. <tr>
  284. <td class="table_cells"><code><a href="regular_expression_parser.html">regex_p</a>(regex)</code></td>
  285. <td class="table_cells">Matches a regular expression</td>
  286. <td class="table_cells"><i>iter,iter</i></td>
  287. </tr>
  288. <tr>
  289. <td class="table_cells"><code><a href="primitives.html">str_p</a>(string)<br />
  290. <a href="primitives.html">str_p</a>(iter1, iter2)</code></td>
  291. <td class="table_cells">Matches a string</td>
  292. <td class="table_cells"><i>iter,iter</i></td>
  293. </tr>
  294. <tr>
  295. <td class="table_title" colspan="3"><a name="text_parsers"></a>Text parsers</td>
  296. </tr>
  297. <tr>
  298. <td class="table_cells"><code><a href="primitives.html">chseq_p</a>(string)<br />
  299. <a href="primitives.html">chseq_p</a>(iter1, iter2)</code></td>
  300. <td class="table_cells">Matches a string, possibly with embedded whitespace</td>
  301. <td class="table_cells"><i>iter,iter</i></td>
  302. </tr>
  303. <tr>
  304. <td class="table_cells"><code><a href="parametric_parsers.html">f_chseq_p</a>(func1,
  305. func2)</code></td>
  306. <td class="table_cells">Matches a string, possibly with embedded whitespace</td>
  307. <td class="table_cells"><i>iter,iter</i></td>
  308. </tr>
  309. </table>
  310. </td>
  311. <td width="10">&nbsp;</td>
  312. <td valign="top">
  313. <table>
  314. <tr>
  315. <td class="table_title" colspan="2"><a name="compound_parsers"></a>Compound parsers</td>
  316. </tr>
  317. <tr>
  318. <td class="table_cells"><code><a href="confix.html">confix_p</a>(open,
  319. exp, close)</code></td>
  320. <td class="table_cells">Matches <b>open &gt;&gt; (exp - close) &gt;&gt; close</b></td>
  321. </tr>
  322. <tr>
  323. <td class="table_cells"><code><a href="dynamic_parsers.html">do_p</a>[P].<a href="dynamic_parsers.html">while_p</a>(cond)</code></td>
  324. <td class="table_cells">Matches while a condition is true (at least once)</td>
  325. </tr>
  326. <tr>
  327. <td class="table_cells"><code><a href="dynamic_parsers.html">for_p</a>(init,
  328. cond, step)[P]</code></td>
  329. <td class="table_cells">Matches in a loop</td>
  330. </tr>
  331. <tr>
  332. <td class="table_cells"><code><a href="functor_parser.html">functor_parser</a>&lt;func&gt;</code></td>
  333. <td class="table_cells">Wraps an external parser</td>
  334. </tr>
  335. <tr>
  336. <td class="table_cells"><code><a href="dynamic_parsers.html">if_p</a>(cond)[P]<br />
  337. <a href="dynamic_parsers.html">if_p</a>(cond)[P].<a href="dynamic_parsers.html">else_p</a>[P]</code></td>
  338. <td class="table_cells">Matches depending on a condition</td>
  339. </tr>
  340. <tr>
  341. <td class="table_cells"><code><a href="the_lazy_parser.html">lazy_p</a>(P)</code></td>
  342. <td class="table_cells">Evaluates a parser at run time</td>
  343. </tr>
  344. <tr>
  345. <td class="table_cells"><code><a href="list_parsers.html">list_p</a> <br />
  346. <a href="list_parsers.html">list_p</a>(del)<br />
  347. <a href="list_parsers.html">list_p</a>(item, del)<br />
  348. <a href="list_parsers.html">list_p</a>(item, del, end)</code></td>
  349. <td class="table_cells">Matches a delimited list</td>
  350. </tr>
  351. <tr>
  352. <td class="table_cells"><code><a href="loops.html">repeat_p</a>(num)[P]<br />
  353. <a href="loops.html">repeat_p</a>(min, max)[P]<br />
  354. <a href="loops.html">repeat_p</a>(min, <a href="loops.html">more</a>)[P]</code></td>
  355. <td class="table_cells">Matches multiple times</td>
  356. </tr>
  357. <tr>
  358. <td class="table_cells"><code><a href="dynamic_parsers.html">while_p</a> (cond) [P]</code></td>
  359. <td class="table_cells">Matches while a condition is true</td>
  360. </tr>
  361. <tr>
  362. <td class="table_title" colspan="2" id="general_directives"><a name="general_directives"></a>General directives</td>
  363. </tr>
  364. <tr>
  365. <td class="table_cells"><code><a href="directives.html">as_lower_d</a>[P]</code></td>
  366. <td class="table_cells">Converts text to lower case before matching</td>
  367. </tr>
  368. <tr>
  369. <td class="table_cells"><code><a href="refactoring.html">attach_action_d</a>[(P1
  370. op P2)[act]]</code></td>
  371. <td class="table_cells">Transforms to <b>P1 [act] op P2 [act]</b></td>
  372. </tr>
  373. <tr>
  374. <td class="table_cells"><code><a href="directives.html">lexeme_d</a>[P]</code></td>
  375. <td class="table_cells">Turns off whitespace skipping</td>
  376. </tr>
  377. <tr>
  378. <td class="table_cells"><code><a href="directives.html">limit_d</a>[P](min,
  379. max)</code></td>
  380. <td class="table_cells">Matches only if the value is within the range</td>
  381. </tr>
  382. <tr>
  383. <td class="table_cells"><code><a href="directives.html">longest_d</a>[P]</code></td>
  384. <td class="table_cells">Matches the longest of alternatives</td>
  385. </tr>
  386. <tr>
  387. <td class="table_cells"><code><a href="directives.html">max_limit_d</a>[P](max)</code></td>
  388. <td class="table_cells">Matches only if <b>value &lt;= max</b></td>
  389. </tr>
  390. <tr>
  391. <td class="table_cells"><code><a href="directives.html">min_limit_d</a>[P](min)</code></td>
  392. <td class="table_cells">Matches only if <b>value &gt;= min</b></td>
  393. </tr>
  394. <tr>
  395. <td class="table_cells"><code><a href="refactoring.html">refactor_action_d</a>[P1
  396. [act] op P2]</code></td>
  397. <td class="table_cells">Transforms to <b>(P1 op P2) [act]</b></td>
  398. </tr>
  399. <tr>
  400. <td class="table_cells"><code><a href="refactoring.html">refactor_unary_d</a>[op1
  401. P1 op2 P2]</code></td>
  402. <td class="table_cells">Transforms to <b>op1 (P1 op2 P2)</b></td>
  403. </tr>
  404. <tr>
  405. <td class="table_cells"><code><a href="scoped_lock.html">scoped_lock_d</a>[P](mutex)</code></td>
  406. <td class="table_cells">Locks a mutex while matching</td>
  407. </tr>
  408. <tr>
  409. <td class="table_cells"><code><a href="directives.html">shortest_d</a>[P]</code></td>
  410. <td class="table_cells">Matches the shortest of alternatives</td>
  411. </tr>
  412. <tr>
  413. <td class="table_title" colspan="2"><a name="tree_specific_directives"></a>Tree-specific directives</td>
  414. </tr>
  415. <tr>
  416. <td class="table_cells"><code><a href="trees.html">access_node_d</a>[P]</code></td>
  417. <td class="table_cells">Passes node value to action</td>
  418. </tr>
  419. <tr>
  420. <td class="table_cells"><code><a href="trees.html">discard_first_node_d</a>[P]</code></td>
  421. <td class="table_cells">Discards first node</td>
  422. </tr>
  423. <tr>
  424. <td class="table_cells"><code><a href="trees.html">discard_last_node_d</a>[P]</code></td>
  425. <td class="table_cells">Discards last node</td>
  426. </tr>
  427. <tr>
  428. <td class="table_cells"><code><a href="trees.html">discard_node_d</a>[P]</code></td>
  429. <td class="table_cells">Discards the generated node</td>
  430. </tr>
  431. <tr>
  432. <td class="table_cells"><code><a href="trees.html">infix_node_d</a>[P]</code></td>
  433. <td class="table_cells">Discards even-position nodes</td>
  434. </tr>
  435. <tr>
  436. <td class="table_cells"><code><a href="trees.html">inner_node_d</a>[P]</code></td>
  437. <td class="table_cells">Discards first and last nodes</td>
  438. </tr>
  439. <tr>
  440. <td class="table_cells"><code><a href="trees.html">leaf_node_d</a>[P]</code></td>
  441. <td class="table_cells">Generates a single node with no children</td>
  442. </tr>
  443. <tr>
  444. <td class="table_cells"><code><a href="trees.html">no_node_d</a>[P]</code></td>
  445. <td class="table_cells">Does not generate a node</td>
  446. </tr>
  447. <tr>
  448. <td class="table_cells"><code><a href="trees.html">root_node_d</a>[P]</code></td>
  449. <td class="table_cells">Identifies root nodes for an AST</td>
  450. </tr>
  451. <tr>
  452. <td class="table_cells"><code><a href="trees.html">token_node_d</a>[P]</code></td>
  453. <td class="table_cells">Synonym for <b>leaf_node_d</b></td>
  454. </tr>
  455. <tr>
  456. <td class="table_title" colspan="2"><a name="unary_operators"></a>Unary operators</td>
  457. </tr>
  458. <tr>
  459. <td class="table_cells"><code><a href="operators.html">!P</a></code></td>
  460. <td class="table_cells">Matches <b>P</b> or an empty string</td>
  461. </tr>
  462. <tr>
  463. <td class="table_cells"><code><a href="operators.html">*P</a></code></td>
  464. <td class="table_cells">Matches <b>P</b> zero or more times</td>
  465. </tr>
  466. <tr>
  467. <td class="table_cells"><code><a href="operators.html">+P</a></code></td>
  468. <td class="table_cells">Matches <b>P</b> one or more times</td>
  469. </tr>
  470. <tr>
  471. <td class="table_cells"><code><a href="primitives.html">~P</a></code></td>
  472. <td class="table_cells">Matches anything that does not match <b>P</b></td>
  473. </tr>
  474. <tr>
  475. <td class="table_title" colspan="2"><a name="binary_operators"></a>Binary operators</td>
  476. </tr>
  477. <tr>
  478. <td class="table_cells"><code><a href="operators.html">P1 % P2</a></code></td>
  479. <td class="table_cells">Matches one or more <b>P1</b> separated by <b>P2</b></td>
  480. </tr>
  481. <tr>
  482. <td class="table_cells"><code><a href="operators.html">P1 - P2</a></code></td>
  483. <td class="table_cells">Matches <b>P1</b> but not <b>P2</b></td>
  484. </tr>
  485. <tr>
  486. <td class="table_cells"><code><a href="operators.html">P1 &gt;&gt; P2</a></code></td>
  487. <td class="table_cells">Matches <b>P1</b> followed by <b>P2</b></td>
  488. </tr>
  489. <tr>
  490. <td class="table_cells"><code><a href="operators.html">P1 &amp; P2</a></code></td>
  491. <td class="table_cells">Matches both <b>P1</b> and <b>P2</b></td>
  492. </tr>
  493. <tr>
  494. <td class="table_cells"><code><a href="operators.html">P1 ^ P2</a></code></td>
  495. <td class="table_cells">Matches <b>P1</b> or <b>P2</b>, but not both</td>
  496. </tr>
  497. <tr>
  498. <td class="table_cells"><code><a href="operators.html">P1 | P2</a></code></td>
  499. <td class="table_cells">Matches <b>P1</b> or <b>P2</b></td>
  500. </tr>
  501. <tr>
  502. <td class="table_cells"><code><a href="operators.html">P1 &amp;&amp; P2</a></code></td>
  503. <td class="table_cells">Synonym for <b>P1 &gt;&gt; P2</b></td>
  504. </tr>
  505. <tr>
  506. <td class="table_cells"><code><a href="operators.html">P1 || P2</a></code></td>
  507. <td class="table_cells">Matches <b>P1 | P2 | P1 &gt;&gt; P2</b></td>
  508. </tr>
  509. </table>
  510. </td>
  511. </tr>
  512. </table>
  513. <br>
  514. <table border="0">
  515. <tr>
  516. <td width="10"></td>
  517. <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>
  518. <td width="30"><a href="error_handling.html"><img src="theme/l_arr.gif" border="0"></a></td>
  519. <td width="30"><a href="includes.html"><img src="theme/r_arr.gif" border="0"></a></td>
  520. </tr>
  521. </table>
  522. <hr size="1">
  523. <p class="copyright">Copyright &copy; 2003 Ross Smith<br>
  524. <br>
  525. <font size="2">Use, modification and distribution is subject to the Boost Software
  526. License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)</font></p>
  527. <p>&nbsp;</p>
  528. </body>
  529. </html>