spirit-reference.tex 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. % Reference Card for Boost.Spirit 2.5.8
  2. % Copyright (c) 2014 Richard Thomson. May be freely distributed.
  3. % Created Friday, October 31, 2014
  4. % Updated Tuesday, July 12, 2016
  5. % Thanks to Joseph H. Silverman for his TeX reference card on which
  6. % this reference card is based.
  7. % Thanks to Stephen Gildea for the multicolumn macro package
  8. % which Joseph Silverman modified from his GNU emacs reference card
  9. % TeX is a trademark of the American Mathematical Society
  10. %**start of header
  11. \newcount\columnsperpage
  12. % This file can be printed with 1, 2, or 3 columns per page (see below).
  13. % [For 2 or 3 columns, you'll need 6 and 8 point fonts.]
  14. % Specify how many you want here. Nothing else needs to be changed.
  15. \columnsperpage=3
  16. % Smaller (97%) pdf file with horizontal offset 1.5in
  17. % dvipdfm -l -m 0.97 -x 1.5in -o spirit-reference.pdf spirit-reference.dvi
  18. % There are a couple extra sections included at the end of the document
  19. % (after the \bye) that didn't fit into six columns.
  20. % It would be nice to have additional sections covering:
  21. % \hrules and \vrules, Registers
  22. % \input and \output files (including \read, \write, \message)
  23. % This reference card is distributed in the hope that it will be useful,
  24. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  26. % This file is intended to be processed by plain TeX (TeX82).
  27. %
  28. % The final reference card has six columns, three on each side.
  29. % This file can be used to produce it in any of three ways:
  30. % 1 column per page
  31. % produces six separate pages, each of which needs to be reduced to 80%.
  32. % This gives the best resolution.
  33. % 2 columns per page
  34. % produces three already-reduced pages.
  35. % You will still need to cut and paste.
  36. % 3 columns per page
  37. % produces two pages which must be printed sideways to make a
  38. % ready-to-use 8.5 x 11 inch reference card.
  39. % For this you need a dvi device driver that can print sideways.
  40. % Which mode to use is controlled by setting \columnsperpage above.
  41. %
  42. % Author:
  43. % Richard Thomson
  44. % Internet: legalize@xmission.com
  45. % (based on a reference card by Joseph H. Silverman)
  46. % (reference card macros due to Stephen Gildea)
  47. % History:
  48. % Version 1.0 - October 2014
  49. % Version 1.1 - July 2016
  50. \def\versionnumber{1.0} % Version of this reference card
  51. \def\year{2016}
  52. \def\month{July}
  53. \def\version{\month\ \year\ v\versionnumber}
  54. \def\shortcopyrightnotice{
  55. \vskip 0pt plus 2 fill\begingroup\parskip=0pt\small
  56. \centerline{\copyright\ \number\year\ Richard Thomson,
  57. Permissions on back. v\versionnumber}
  58. Send comments and corrections to Richard Thomson,
  59. $\langle$legalize@xmission.com$\rangle$
  60. \endgroup}
  61. \def\copyrightnotice{
  62. \vskip 1ex plus 2 fill\begingroup\parskip=0pt\small
  63. \centerline{Copyright \copyright\ \year\ Richard Thomson, \version}
  64. Permission is granted to make and distribute copies of
  65. this card provided the copyright notice and this permission notice
  66. are preserved on all copies.
  67. \endgroup}
  68. % make \bye not \outer so that the \def\bye in the \else clause below
  69. % can be scanned without complaint.
  70. \def\bye{\par\vfill\supereject\end}
  71. \newdimen\intercolumnskip
  72. \newbox\columna
  73. \newbox\columnb
  74. \def\ncolumns{\the\columnsperpage}
  75. \message{[\ncolumns\space
  76. column\if 1\ncolumns\else s\fi\space per page]}
  77. \def\scaledmag#1{ scaled \magstep #1}
  78. % This multi-way format was designed by Stephen Gildea
  79. % October 1986.
  80. \if 1\ncolumns
  81. \hsize 4in
  82. \vsize 10in
  83. \voffset -.7in
  84. \font\titlefont=\fontname\tenbf \scaledmag3
  85. \font\headingfont=\fontname\tenbf \scaledmag2
  86. \font\smallfont=\fontname\sevenrm
  87. \font\smallsy=\fontname\sevensy
  88. \footline{\hss\folio}
  89. \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
  90. \else
  91. \hsize 3.2in
  92. \vsize 7.95in
  93. \hoffset -.75in
  94. \voffset -.745in
  95. \font\titlefont=cmbx10 \scaledmag2
  96. \font\headingfont=cmbx10 \scaledmag1
  97. \font\smallfont=cmr6
  98. \font\smallsy=cmsy6
  99. \font\eightrm=cmr8
  100. \font\eighti=cmmi8
  101. \font\eightsy=cmsy8
  102. \font\eightbf=cmbx8
  103. \font\eighttt=cmtt8
  104. \font\eightit=cmti8
  105. \font\eightsl=cmsl8
  106. \textfont0=\eightrm
  107. \textfont1=\eighti
  108. \textfont2=\eightsy
  109. \def\rm{\eightrm}
  110. \def\bf{\eightbf}
  111. \def\tt{\eighttt}
  112. \def\it{\eightit}
  113. \def\sl{\eightsl}
  114. \normalbaselineskip=.8\normalbaselineskip
  115. \normallineskip=.8\normallineskip
  116. \normallineskiplimit=.8\normallineskiplimit
  117. \normalbaselines\rm %make definitions take effect
  118. \if 2\ncolumns
  119. \let\maxcolumn=b
  120. \footline{\hss\rm\folio\hss}
  121. \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
  122. \else \if 3\ncolumns
  123. \let\maxcolumn=c
  124. \nopagenumbers
  125. \else
  126. \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
  127. \errmessage{Illegal number of columns per page}
  128. \fi\fi
  129. \intercolumnskip=.46in
  130. \def\abc{a}
  131. \output={%
  132. % This next line is useful when designing the layout.
  133. %\immediate\write16{Column \folio\abc\space starts with \firstmark}
  134. \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
  135. \else\if a\abc
  136. \global\setbox\columna\columnbox \global\def\abc{b}
  137. %% in case we never use \columnb (two-column mode)
  138. \global\setbox\columnb\hbox to -\intercolumnskip{}
  139. \else
  140. \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
  141. \def\multicolumnformat{\shipout\vbox{\makeheadline
  142. \hbox{\box\columna\hskip\intercolumnskip
  143. \box\columnb\hskip\intercolumnskip\columnbox}
  144. \makefootline}\advancepageno}
  145. \def\columnbox{\leftline{\pagebody}}
  146. \def\bye{\par\vfill\supereject
  147. \if a\abc \else\null\vfill\eject\fi
  148. \if a\abc \else\null\vfill\eject\fi
  149. \end}
  150. \fi
  151. % ***** Verbatim typesetting *****
  152. % Verbatim typesetting is done by
  153. % \verbatim"stuff to verbatim typeset"
  154. % Any character can be used in place of ".
  155. % E.g. \verbatim?stuff? or \verbatim|stuff|. Cf. TeXbook pp.380-382
  156. \def\uncatcodespecials{\def\do##1{\catcode`##1=12}\dospecials}
  157. \def\setupverbatim{\tt%
  158. \def\par{\leavevmode\endgraf}\catcode`\`=\active%
  159. \obeylines\uncatcodespecials\obeyspaces}
  160. \def\verbatim{\begingroup\setupverbatim\doverbatim}
  161. \def\doverbatim#1{\def\next##1#1{##1\endgroup}\next}
  162. \def\\{\verbatim}
  163. \def\ds{\displaystyle}
  164. \def\SPC{\quad} % space between symbol and command
  165. \parindent 0pt
  166. \parskip 1ex plus .5ex minus .5ex
  167. \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
  168. \outer\def\newcolumn{\vfill\eject}
  169. \outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex minus.5ex}
  170. %\outer\def\section#1{\par\filbreak
  171. % \vskip 1ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}%
  172. % \vskip 1ex plus 1ex minus .5ex}
  173. \outer\def\section#1{\par\filbreak
  174. \vskip .75ex plus 1ex minus 2ex {\headingfont #1}\mark{#1}%
  175. \vskip .5ex plus .5ex minus .5ex}
  176. \def\paralign{\vskip\parskip\halign}
  177. \def\<#1>{$\langle${\rm #1}$\rangle$}
  178. \def\begintext{\par\leavevmode\begingroup\parskip0pt\rm}
  179. \def\endtext{\endgroup}
  180. \def\unused{$unused$}
  181. % ************ TEXT STARTS HERE **************************
  182. \title{Boost.Spirit 2.5.8 Reference Card}
  183. \section{Primitive Parsers}
  184. % ***** Three Column Format *****
  185. \paralign to\hsize{%
  186. #\hfil\SPC\tabskip=0pt
  187. &#\hfil\SPC\tabskip=0pt plus 1 fil
  188. &#\hfil\cr
  189. %----------- 3 Column Data -------------------
  190. \\|attr(a)|&Attribute&\\|A|\cr
  191. \\|eoi|&End of Input&\unused\cr
  192. \\|eol|&End of Line&\unused\cr
  193. \\|eps|&Epsilon&\unused\cr
  194. \\|eps(p)|&&\unused\cr
  195. \\|symbols<Ch,T,Lookup>|&Symbol Table&\\|T|\cr
  196. }
  197. \section{Unary Parsers}
  198. % ***** Three Column Format *****
  199. \paralign to\hsize{%
  200. #\hfil\SPC\tabskip=0pt plus 1 fil
  201. &#\hfil\SPC\tabskip=0pt plus 1 fil
  202. &#\hfil\cr
  203. %----------- 3 Column Data -------------------
  204. \\|&a|&And Predicate&\unused\cr
  205. \\|!a|&Not Predicate&\unused\cr
  206. \\|*a|&Zero or More&\\|vector<A>|\cr
  207. \\|*u|&&\unused\cr
  208. \\|-a|&Optional&\\|optional<A>|\cr
  209. \\|-u|&&\unused\cr
  210. \\|+a|&One or More&\\|vector<A>|\cr
  211. \\|+u|&&\unused\cr
  212. \\|attr_cast<T>(p)|&Attribute Cast&\\|T|\cr
  213. }
  214. \section{Binary Parsers}
  215. % ***** Three Column Format *****
  216. \paralign to\hsize{%
  217. #\hfil\SPC\tabskip=0pt plus 1 fil
  218. &#\hfil\SPC\tabskip=0pt plus 1 fil
  219. &#\hfil\cr
  220. %----------- 3 Column Data -------------------
  221. \\|a - b|&Difference&\\|A|\cr
  222. \\|u - b|&&\unused\cr
  223. \\|a % b|&Separated List&\\|vector<A>|\cr
  224. \\|u % b|&&\unused\cr
  225. }
  226. \section{N-ary Parsers}
  227. % ***** Three Column Format *****
  228. \paralign to\hsize{%
  229. #\hfil\SPC\tabskip=0pt plus 1 fil
  230. &#\hfil\SPC\tabskip=0pt plus 1 fil
  231. &#\hfil\cr
  232. %----------- 3 Column Data -------------------
  233. \\/a | b/&Alternative&\\|variant<A, B>|\cr
  234. \\/a | u/& &\\|optional<A>|\cr
  235. \\/a | b | u/& &\\|optional<variant<A,B>>|\cr
  236. \\/u | b/& &\\|optional<B>|\cr
  237. \\/u | u/& &\unused\cr
  238. \\/a | a/& &\\|A|\cr
  239. \\|a > b|&Expect&\\|tuple<A,B>|\cr
  240. \\|a > u|& &\\|A|\cr
  241. \\|u > b|& &\\|B|\cr
  242. \\|u > u|& &\unused\cr
  243. \\|a > vA|& &\\|vector<A>|\cr
  244. \\|vA > a|& &\\|vector<A>|\cr
  245. \\|vA > vA|& &\\|vector<A>|\cr
  246. \\|a ^ b|&Permute&\\|tuple<optional<A>,optional<B>>|\cr
  247. \\|a ^ u|& &\\|optional<A>|\cr
  248. \\|u ^ b|& &\\|optional<B>|\cr
  249. \\|u ^ u|& &\unused\cr
  250. \\|a >> b|&Sequence&\\|tuple<A,B>|\cr
  251. \\|a >> u|& &\\|A|\cr
  252. \\|u >> b|& &\\|B|\cr
  253. \\|u >> u|& &\unused\cr
  254. \\|a >> a|& &\\|vector<A>|\cr
  255. \\|a >> vA|& &\\|vector<A>|\cr
  256. \\|vA >> a|& &\\|vector<A>|\cr
  257. \\|vA >> vA|& &\\|vector<A>|\cr
  258. \\/a || b/&Sequence Or&\\|tuple<optional<A>,optional<B>>|\cr
  259. \\/a || u/& &\\|optional<A>|\cr
  260. \\/u || a/& &\\|optional<A>|\cr
  261. \\/u || u/& &\unused\cr
  262. \\/a || a/& &\\|vector<optional<A>>|\cr
  263. }
  264. \section{Nonterminal Parsers}
  265. \paralign to\hsize{
  266. #\hfil\SPC\tabskip=0pt plus 1 fil
  267. &#\hfil\SPC\tabskip=0pt plus 1 fil
  268. &#\hfil\cr
  269. \\|rule<It,RT(A1,...,An),Skip,Loc>|&Rule&\\|RT|\cr
  270. \\|rule<It>|& &\unused\cr
  271. \\|rule<It,Skip>|& &\unused\cr
  272. \\|rule<It,Loc>|& &\unused\cr
  273. \\|rule<It,Skip,Loc>|& &\unused\cr
  274. \\|grammar<It,RT(A1,...,An),Skip,Loc>|&Grammar&\\|RT|\cr
  275. \\|grammar<It>|& &\unused\cr
  276. \\|grammar<It,Skip>|& &\unused\cr
  277. \\|grammar<It,Loc>|& &\unused\cr
  278. \\|grammar<It,Skip,Loc>|& &\unused\cr
  279. }
  280. \section{Parser Directives}
  281. \paralign to\hsize{%
  282. #\hfil\SPC\tabskip=0pt plus 1 fil
  283. &#\hfil\SPC\tabskip=0pt plus 1 fil
  284. &#\hfil\cr
  285. \\|as<T>()[a]|&Atomic Assignment&\\|T|\cr
  286. \\|expect[a]|&Expectation&\\|A|\cr
  287. \\|expect[u]|&&\unused\cr
  288. \\|hold[a]|&Hold Attribute&\\|A|\cr
  289. \\|hold[u]|&&\unused\cr
  290. \\|lexeme[a]|&Lexeme&\\|A|\cr
  291. \\|lexeme[u]|&&\unused\cr
  292. \\|matches[a]|&Matches&\\|bool|\cr
  293. \\|no_case[a]|&Case Insensitive&\\|A|\cr
  294. \\|no_case[u]|&&\unused\cr
  295. \\|no_skip[a]|&No Skipping&\\|A|\cr
  296. \\|no_skip[u]|&&\unused\cr
  297. \\|omit[a]|&Omit Attribute&\unused\cr
  298. \\|raw[a]|&Raw Iterators&\\|iterator_range<It>|\cr
  299. \\|raw[u]|&&\unused\cr
  300. \\|repeat[a]|&Repeat&\\|vector<A>|\cr
  301. \\|repeat[u]|&&\unused\cr
  302. \\|repeat(n)[a]|&&\\|vector<A>|\cr
  303. \\|repeat(n)[u]|&&\unused\cr
  304. \\|repeat(min,max)[a]|&&\\|vector<A>|\cr
  305. \\|repeat(min,max)[u]|&&\unused\cr
  306. \\|repeat(min,inf)[a]|&&\\|vector<A>|\cr
  307. \\|repeat(min,inf)[u]|&&\unused\cr
  308. \\|skip[a]|&Skip Whitespace&\\|A|\cr
  309. \\|skip[u]|&&\unused\cr
  310. \\|skip(p)[a]|&&\\|A|\cr
  311. \\|skip(p)[u]|&&\unused\cr
  312. }
  313. \section{Semantic Actions}
  314. \paralign to\hsize{%
  315. #\hfil\SPC\tabskip=0pt plus 1 fil
  316. &#\hfil\SPC\tabskip=0pt plus 1 fil
  317. &#\hfil\cr
  318. \\|p[fa]|&Apply Semantic Action&\\|A|\cr
  319. \\|p[|$phoenix$ $lambda$\\|]|&&\\|A|\cr
  320. }
  321. \paralign to\hsize{%
  322. #\hfil\cr
  323. \\|template<typename Attrib>|\cr
  324. \\|void fa(Attrib& attr);|\cr
  325. \cr
  326. \\|template<typename Attrib, typename Context>|\cr
  327. \\|void fa(Attrib& attr, Context& context);|\cr
  328. \cr
  329. \\|template<typename Attrib, typename Context>|\cr
  330. \\|void fa(Attrib& attr, Context& context, bool& pass);|\cr
  331. }
  332. \section{Phoenix Placeholders}
  333. \paralign to\hsize{%
  334. #\hfil\SPC\tabskip=0pt plus 1 fil
  335. &#\hfil\cr
  336. \\|_1|, \\|_2|, $\dots$, \\|_N|&Nth Attribute of \\|p|\cr
  337. \\|_val|&Enclosing rule's synthesized attribute\cr
  338. \\|_r1|, \\|_r2|, $\dots$, \\|_rN|&Enclosing rule's Nth inherited
  339. attribute.\cr
  340. \\|_a|, \\|_b|, $\dots$, \\|_j|&Enclosing rule's local variables.\cr
  341. \\|_pass|&Assign \\|false| to \\|_pass| to force failure.\cr
  342. }
  343. \section{Iterator Parser API}
  344. \paralign to \hsize{#\cr
  345. \\|bool parse<It, Exp>(|\cr
  346. \\| It& first, It last, Exp const& expr);|\cr
  347. \\|bool parse<It, Exp, A1, ..., An>(|\cr
  348. \\| It& first, It last, Exp const& expr,|\cr
  349. \\| A1& a1, ..., An& an);|\cr
  350. \\|bool phrase_parse<It, Exp, Skipper>(|\cr
  351. \\| It& first, It last, Exp const& expr,|\cr
  352. \\| Skipper const& skipper,|\cr
  353. \\| skip_flag post_skip = postskip);|\cr
  354. \\|bool phrase_parse<It, Exp, Skipper, A1, ..., An>(|\cr
  355. \\| It& first, It last, Exp const& expr,|\cr
  356. \\| Skipper const& skipper,|\cr
  357. \\| A1& a1, ..., An& an);|\cr
  358. \\|bool phrase_parse<It, Exp, Skipper, A1, ..., An>(|\cr
  359. \\| It& first, It last, Exp const& expr,|\cr
  360. \\| Skipper const& skipper,|\cr
  361. \\| skip_flag post_skip,|\cr
  362. \\| A1& a1, ..., An& an);|\cr
  363. }
  364. \section{Stream Parser API}
  365. \paralign to\hsize{#\cr
  366. $unspecified$\\| match<Exp>(Exp const& expr);|\cr
  367. $unspecified$\\| match<Exp, A1, ..., An>(|\cr
  368. \\| Exp const& expr,|\cr
  369. \\| A1& a1, ..., An& an);|\cr
  370. $unspecified$\\| phrase_match<Exp, Skipper>(|\cr
  371. \\| Exp const& expr,|\cr
  372. \\| Skipper const& skipper,|\cr
  373. \\| skip_flag post_skip = postskip);|\cr
  374. $unspecified$\\| phrase_match<Exp, Skipper, A1, ..., An>(|\cr
  375. \\| Exp const& expr,|\cr
  376. \\| Skipper const& skipper,|\cr
  377. \\| skip_flag post_skip,|\cr
  378. \\| A1& a1, ..., An& an);|\cr
  379. }
  380. \shortcopyrightnotice
  381. \section{Binary Value Parsers}
  382. % ***** Three Column Format *****
  383. \paralign to\hsize{%
  384. #\hfil\SPC\tabskip=0pt plus 1 fil
  385. &#\hfil\SPC\tabskip=0pt plus 1 fil
  386. &#\hfil\cr
  387. \\|byte_|&Native Byte&\\|uint_least8_t|\cr
  388. \\|byte_(b)|&&\unused\cr
  389. \\|word|&Native Word&\\|uint_least16_t|\cr
  390. \\|word(w)|&&\unused\cr
  391. \\|dword|&Native Double Word&\\|uint_least32_t|\cr
  392. \\|dword(dw)|&&\unused\cr
  393. \\|qword|&Native Quad Word&\\|uint_least64_t|\cr
  394. \\|qword(qw)|&&\unused\cr
  395. \\|bin_float|&Native Float&\\|float|\cr
  396. \\|bin_float(f)|&&\unused\cr
  397. \\|bin_double|&Native Double&\\|double|\cr
  398. \\|bin_double(d)|&&\unused\cr
  399. \\|little_|$item$&Little Endian $item$&as above\cr
  400. \\|little_|$item$\\|(w)|&&\unused\cr
  401. \\|big_|$item$&Big Endian $item$&as above\cr
  402. \\|big_|$item$\\|(w)|&&\unused\cr
  403. }
  404. \section{Character Encodings}
  405. \paralign to\hsize{%
  406. #\hfil\SPC\tabskip=0pt plus 1 fil
  407. &#\hfil\cr
  408. \\|ascii|&7-bit ASCII\cr
  409. \\|iso8859_1|&ISO 8859-1\cr
  410. \\|standard|&Using \\|<cctype>|\cr
  411. \\|standard_wide|&Using \\|<cwctype>|\cr
  412. }
  413. \section{Character Parsers}
  414. \paralign to\hsize{%
  415. #\hfil\SPC\tabskip=0pt plus 1 fil
  416. &#\hfil\SPC\tabskip=0pt plus 1 fil
  417. &#\hfil\cr
  418. \\|c|&Character Literal&\unused\cr
  419. \\|lit(c)|&&\unused\cr
  420. \\|ns::char_|&Any Character&\\|ns::char_type|\cr
  421. \\|ns::char_(c)|&Character Value&\\|ns::char_type|\cr
  422. \\|ns::char_(f,l)|&Character Range&\\|ns::char_type|\cr
  423. \\|ns::char_(str)|&Any Character in String&\\|ns::char_type|\cr
  424. \\|~cp|&Characters not in \\|cp|&Attribute of \\|cp|\cr
  425. }
  426. \section{Character Class Parsers}
  427. \paralign to\hsize{%
  428. #\hfil\SPC\tabskip=0pt plus 1 fil
  429. &#\hfil\SPC\tabskip=0pt plus 1 fil
  430. &#\hfil\cr
  431. \\|ns::alnum|&Letters or Digits&\\|ns::char_type|\cr
  432. \\|ns::alpha|&Alphabetic&\\|ns::char_type|\cr
  433. \\|ns::blank|&Spaces or Tabs&\\|ns::char_type|\cr
  434. \\|ns::cntrl|&Control Characters&\\|ns::char_type|\cr
  435. \\|ns::digit|&Numeric Digits&\\|ns::char_type|\cr
  436. \\|ns::graph|&Non-space Printing Characters&\\|ns::char_type|\cr
  437. \\|ns::lower|&Lower Case Letters&\\|ns::char_type|\cr
  438. \\|ns::print|&Printing Characters&\\|ns::char_type|\cr
  439. \\|ns::punct|&Punctuation&\\|ns::char_type|\cr
  440. \\|ns::space|&White Space&\\|ns::char_type|\cr
  441. \\|ns::upper|&Upper Case Letters&\\|ns::char_type|\cr
  442. \\|ns::xdigit|&Hexadecimal Digits&\\|ns::char_type|\cr
  443. }
  444. \section{String Parsers}
  445. \paralign to\hsize{%
  446. #\hfil\SPC\tabskip=0pt plus 1 fil
  447. &#\hfil\SPC\tabskip=0pt plus 1 fil
  448. &#\hfil\cr
  449. \\|str|&String Literal&\unused\cr
  450. \\|lit(str)|&&\unused\cr
  451. \\|ns::string("str")|&String&\\|basic_string<char>|\cr
  452. \\|ns::string(L"str")|&&\\|basic_string<wchar_t>|\cr
  453. }
  454. \section{Unsigned Integer Parsers}
  455. \paralign to\hsize{%
  456. #\hfil\SPC\tabskip=0pt plus 1 fil
  457. &#\hfil\SPC\tabskip=0pt plus 1 fil
  458. &#\hfil\cr
  459. \\|lit(num)|&Integer Literal&\unused\cr
  460. \\|ushort_|&Short&\\|unsigned short|\cr
  461. \\|ushort_(num)|&Short Value&\\|unsigned short|\cr
  462. \\|uint_|&Integer&\\|unsigned int|\cr
  463. \\|uint_(num)|&Integer Value&\\|unsigned int|\cr
  464. \\|ulong_|&Long&\\|unsigned long|\cr
  465. \\|ulong_(num)|&Long Value&\\|unsigned long|\cr
  466. \\|ulong_long|&Long Long&\\|unsigned long long|\cr
  467. \\|ulong_long(num)|&Long Long Value&\\|unsigned long long|\cr
  468. \\|bin|&Binary Integer&\\|unsigned int|\cr
  469. \\|bin(num)|&Binary Integer Value&\\|unsigned int|\cr
  470. \\|oct|&Octal Integer&\\|unsigned int|\cr
  471. \\|oct(num)|&Octal Integer Value&\\|unsigned int|\cr
  472. \\|hex|&Hexadecimal Integer&\\|unsigned int|\cr
  473. \\|hex(num)|&Hex Integer Value&\\|unsigned int|\cr
  474. }
  475. \section{Generalized Unsigned Integer Parser}
  476. \paralign to\hsize{%
  477. #\hfil\SPC\tabskip=0pt plus 1 fil
  478. &#\hfil\cr
  479. \\|uint_parser<T,Radix,MinDigits,MaxDigits>|&\\|T|\cr
  480. \\|uint_parser<T,Radix,MinDigits,MaxDigits>(num)|&\\|T|\cr
  481. }
  482. \section{Signed Integer Parsers}
  483. \paralign to\hsize{%
  484. #\hfil\SPC\tabskip=0pt plus 1 fil
  485. &#\hfil\SPC\tabskip=0pt plus 1 fil
  486. &#\hfil\cr
  487. \\|lit(num)|&Integer Literal&\unused\cr
  488. \\|short_|&Short&\\|short|\cr
  489. \\|short_(num)|&Short Value&\\|short|\cr
  490. \\|int_|&Integer&\\|int|\cr
  491. \\|int_(num)|&Integer Value&\\|int|\cr
  492. \\|long_|&Long&\\|long|\cr
  493. \\|long_(num)|&Long Value&\\|long|\cr
  494. \\|long_long|&Long Long&\\|long long|\cr
  495. \\|long_long(num)|&Long Long Value&\\|long long|\cr
  496. }
  497. \section{Generalized Signed Integer Parser}
  498. \paralign to\hsize{%
  499. #\hfil\SPC\tabskip=0pt plus 1 fil
  500. &#\hfil\cr
  501. \\|int_parser<T,Radix,MinDigits,MaxDigits>|&\\|T|\cr
  502. \\|int_parser<T,Radix,MinDigits,MaxDigits>(num)|&\\|T|\cr
  503. }
  504. \section{Real Number Parsers}
  505. \paralign to\hsize{%
  506. #\hfil\SPC\tabskip=0pt plus 1 fil
  507. &#\hfil\SPC\tabskip=0pt plus 1 fil
  508. &#\hfil\cr
  509. \\|lit(num)|&Real Number Literal&\unused\cr
  510. \\|float_|&Float&\\|float|\cr
  511. \\|float_(num)|&Float Value&\\|float|\cr
  512. \\|double_|&Double&\\|double|\cr
  513. \\|double_(num)|&Double Value&\\|double|\cr
  514. \\|long_double|&Long Double&\\|long double|\cr
  515. \\|long_double(num)|&Long Double Value&\\|long double|\cr
  516. }
  517. \section{Generalized Real Number Parser}
  518. \paralign to\hsize{%
  519. #\hfil\SPC\tabskip=0pt plus 1 fil
  520. &#\hfil\cr
  521. \\|real_parser<T,RealPolicies>|&\\|T|\cr
  522. \\|real_parser<T,RealPolicies>(num)|&\\|T|\cr
  523. }
  524. \section{Boolean Parsers}
  525. \paralign to\hsize{%
  526. #\hfil\SPC\tabskip=0pt plus 1 fil
  527. &#\hfil\SPC\tabskip=0pt plus 1 fil
  528. &#\hfil\cr
  529. \\|lit(boolean)|&Boolean Literal&\unused\cr
  530. \\|false_|&Match ``\\|false|''&\\|bool|\cr
  531. \\|true_|&Match ``\\|true|''&\\|bool|\cr
  532. \\|bool_|&Boolean&\\|bool|\cr
  533. \\|bool_(boolean)|&Boolean Value&\\|bool|\cr
  534. }
  535. \section{Generalized Boolean Parser}
  536. \paralign to\hsize{%
  537. #\hfil\SPC\tabskip=0pt plus 1 fil
  538. &#\hfil\cr
  539. \\|bool_parser<T,BoolPolicies>|&\\|T|\cr
  540. \\|bool_parser<T,BoolPolicies>(boolean)|&\\|T|\cr
  541. }
  542. \copyrightnotice
  543. \bye