1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" |
---|
3 | "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> |
---|
4 | <part |
---|
5 | id="quickbook" |
---|
6 | name="quickbook" |
---|
7 | dirname="quickbook" |
---|
8 | last-revision="$Date: 2005/02/14 06:36:16 $" |
---|
9 | xmlns:xi="http://www.w3.org/2001/XInclude"> |
---|
10 | <partinfo> |
---|
11 | <author> |
---|
12 | <firstname>Joel</firstname> |
---|
13 | <surname>de Guzman</surname> |
---|
14 | </author> |
---|
15 | <author> |
---|
16 | <firstname>Eric</firstname> |
---|
17 | <surname>Niebler</surname> |
---|
18 | </author> |
---|
19 | |
---|
20 | <copyright> |
---|
21 | <year>2002</year> |
---|
22 | <year>2004</year> |
---|
23 | <holder>Joel de Guzman, Eric Niebler</holder> |
---|
24 | </copyright> |
---|
25 | |
---|
26 | <legalnotice> |
---|
27 | <para> |
---|
28 | Distributed under the Boost Software License, Version 1.0. |
---|
29 | (See accompanying file LICENSE_1_0.txt or copy at |
---|
30 | <ulink url="http://www.boost.org/LICENSE_1_0.txt"> |
---|
31 | http://www.boost.org/LICENSE_1_0.txt |
---|
32 | </ulink>) |
---|
33 | |
---|
34 | </para> |
---|
35 | </legalnotice> |
---|
36 | |
---|
37 | <partpurpose> |
---|
38 | WikiWiki style documentation tool </partpurpose> |
---|
39 | |
---|
40 | <partcategory name="category:"></partcategory> |
---|
41 | |
---|
42 | </partinfo> |
---|
43 | |
---|
44 | <title>quickbook 1.1</title> |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | <section id="quickbook.intro"> |
---|
49 | <title> Introduction</title> |
---|
50 | <blockquote><para><emphasis role="bold"><emphasis>"Why program by hand in five days what you can spend five years of your |
---|
51 | life automating?"</emphasis></emphasis><sbr/> |
---|
52 | <sbr/> |
---|
53 | -- Terrence Parr, author ANTLR/PCCTS</para></blockquote><para> |
---|
54 | Well, QuickBook started as a weekend hack. It was originally intended to be a |
---|
55 | sample application using <ulink url="http://spirit.sourceforge.net">Spirit</ulink>. What is it? What you are viewing now, this |
---|
56 | documentation, is autogenerated by QuickBook. These files were generated from |
---|
57 | one master:</para> |
---|
58 | <blockquote><para><ulink url="../quickbook.qbk">quickbook.qbk</ulink></para></blockquote><para> |
---|
59 | Originally named QuickDoc, this funky tool that never dies evolved into a |
---|
60 | funkier tool thanks to Eric Niebler who resurrected the project making it |
---|
61 | generate <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink> instead of HTML. The <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink> documentation format |
---|
62 | is an extension of <ulink url="http://www.docbook.org/">DocBook</ulink>, an SGML- or XML- based format for describing |
---|
63 | documentation.</para> |
---|
64 | <para> |
---|
65 | QuickBook is a WikiWiki style documentation tool geared towards C++ |
---|
66 | documentation using simple rules and markup for simple formatting tasks. |
---|
67 | QuickBook extends the WikiWiki concept. Like the WikiWiki, QuickBook documents are |
---|
68 | simple text files. A single QuickBook document can generate a fully linked set |
---|
69 | of nice HTML and PostScript/PDF documents complete with images and syntax- |
---|
70 | colorized source code.</para> |
---|
71 | <para> |
---|
72 | Features include:</para> |
---|
73 | <itemizedlist> |
---|
74 | <listitem> |
---|
75 | generate <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink> xml, to generate HTML, PostScript and PDF |
---|
76 | </listitem><listitem> |
---|
77 | simple markup to link to Doxygen-generated entities |
---|
78 | </listitem><listitem> |
---|
79 | macro system for simple text substitution |
---|
80 | </listitem><listitem> |
---|
81 | simple markup for italics, bold, preformatted, blurbs, code samples, |
---|
82 | tables, URLs, anchors, images, etc. |
---|
83 | </listitem><listitem> |
---|
84 | automatic syntax coloring of code samples |
---|
85 | </listitem><listitem> |
---|
86 | CSS support |
---|
87 | </listitem> |
---|
88 | </itemizedlist></section> |
---|
89 | <section id="quickbook.syntax"> |
---|
90 | <title> Syntax Summary</title> |
---|
91 | <para> |
---|
92 | A QuickBook document is composed of one or more blocks. An example of |
---|
93 | a block is the paragraph or a C++ code snippet. Some blocks have |
---|
94 | special mark-ups. Blocks, except code snippets which have their own |
---|
95 | grammar (C++ or Python), are composed of one or more phrases. A phrase |
---|
96 | can be a simple contiguous run of characters. Phrases can have special |
---|
97 | mark-ups. Marked up phrases can recursively contain other phrases, but |
---|
98 | cannot contain blocks. A terminal is a self contained block-level or |
---|
99 | phrase- level element that does not nest anything.</para> |
---|
100 | <para> |
---|
101 | Blocks, in general, are delimited by two end-of-lines (the block terminator). |
---|
102 | Phrases in each block cannot contain a block terminator. This way, syntax errors |
---|
103 | such as un-matched closing brackets do not go haywire and corrupt anything past |
---|
104 | a single block.</para> |
---|
105 | <anchor id="syntax.comments" /><bridgehead renderas="sect2">Comments</bridgehead><para> |
---|
106 | Can be placed anywhere.</para> |
---|
107 | <programlisting><literal>[/ comment (no output generated) ] |
---|
108 | </literal></programlisting><anchor id="syntax.phrase_level_elements" /><bridgehead renderas="sect2">Phrase Level Elements</bridgehead><anchor id="syntax.font_styles" /><bridgehead renderas="sect3">Font Styles</bridgehead><programlisting><literal>['italic], [*bold], [_underline], [^teletype] |
---|
109 | </literal></programlisting><para> |
---|
110 | will generate:</para> |
---|
111 | <para> |
---|
112 | <emphasis>italic</emphasis>, <emphasis role="bold">bold</emphasis>, <emphasis role="underline">underline</emphasis>, <literal>teletype</literal></para> |
---|
113 | <para> |
---|
114 | Like all non-terminal phrase level elements, this can of course be nested:</para> |
---|
115 | <programlisting><literal>[*['bold-italic]] |
---|
116 | </literal></programlisting><para> |
---|
117 | will generate:</para> |
---|
118 | <para> |
---|
119 | <emphasis role="bold"><emphasis>bold-italic</emphasis></emphasis></para> |
---|
120 | <anchor id="syntax.simple_formatting" /><bridgehead renderas="sect3">Simple formatting</bridgehead><para> |
---|
121 | Simple markup for formatting text, common in many applications, is now supported:</para> |
---|
122 | <programlisting><literal>/italic/, *bold*, _underline_, =teletype= |
---|
123 | </literal></programlisting><para> |
---|
124 | will generate:</para> |
---|
125 | <para> |
---|
126 | <emphasis>italic</emphasis>, <emphasis role="bold">bold</emphasis>, <emphasis role="underline">underline</emphasis>, <literal>teletype</literal></para> |
---|
127 | <para> |
---|
128 | Unlike QuickBook's standard formatting scheme, the rules for simpler alternatives |
---|
129 | are much stricter.</para> |
---|
130 | <itemizedlist> |
---|
131 | <listitem> |
---|
132 | Simple markups cannot nest. You can combine a simple markup with a nestable markup. |
---|
133 | </listitem><listitem> |
---|
134 | A non-space character must follow the leading markup |
---|
135 | </listitem><listitem> |
---|
136 | A non-space character must precede the trailing markup |
---|
137 | </listitem><listitem> |
---|
138 | A space or a punctuation must follow the trailing markup |
---|
139 | </listitem><listitem> |
---|
140 | If the matching markup cannot be found within a line, the formatting |
---|
141 | will not be applied. This is to ensure that un-matched formatting markups, |
---|
142 | which can be a common mistake, does not corrupt anything past a single line. |
---|
143 | We do not want the rest of the document to be rendered bold just because we |
---|
144 | forgot a trailing '*'. |
---|
145 | </listitem><listitem> |
---|
146 | A line starting with the star will be interpreted as an unordered list. |
---|
147 | See <link linkend="syntax.unordered_lists">Unordered lists</link>. |
---|
148 | </listitem> |
---|
149 | </itemizedlist><informaltable frame="all"> |
---|
150 | <bridgehead renderas="sect4"><phrase role="table-title">More Formatting Samples</phrase></bridgehead> |
---|
151 | <tgroup cols="2"> |
---|
152 | <thead><row><entry>Markup</entry><entry>Result</entry></row> |
---|
153 | </thead> |
---|
154 | <tbody> |
---|
155 | <row><entry><literal>*Bold*</literal></entry><entry><emphasis role="bold">Bold</emphasis></entry></row> |
---|
156 | <row><entry><literal>*Is bold*</literal></entry><entry><emphasis role="bold">Is bold</emphasis></entry></row> |
---|
157 | <row><entry><literal>* Not bold* *Not bold * * Not bold *</literal></entry><entry>* Not bold* *Not bold * * Not bold *</entry></row> |
---|
158 | <row><entry><literal>This*Isn't*Bold (no bold)</literal></entry><entry>This*Isn't*Bold (no bold)</entry></row> |
---|
159 | <row><entry><literal>(*Bold Inside*) (parenthesis not bold)</literal></entry><entry>(<emphasis role="bold">Bold Inside</emphasis>) (parenthesis not bold)</entry></row> |
---|
160 | <row><entry><literal>*(Bold Outside)* (parenthesis bold)</literal></entry><entry><emphasis role="bold">(Bold Outside)</emphasis> (parenthesis bold)</entry></row> |
---|
161 | <row><entry><literal>3*4*5 = 60 (no bold)</literal></entry><entry>3*4*5 = 60 (no bold)</entry></row> |
---|
162 | <row><entry><literal>3 * 4 * 5 = 60 (no bold)</literal></entry><entry>3 * 4 * 5 = 60 (no bold)</entry></row> |
---|
163 | <row><entry><literal>3 *4* 5 = 60 (4 is bold)</literal></entry><entry>3 <emphasis role="bold">4</emphasis> 5 = 60 (4 is bold)</entry></row> |
---|
164 | <row><entry><literal>*This is bold* this is not *but this is*</literal></entry><entry><emphasis role="bold">This is bold</emphasis> this is not <emphasis role="bold">but this is</emphasis></entry></row> |
---|
165 | <row><entry><literal>*This is bold*.</literal></entry><entry><emphasis role="bold">This is bold</emphasis>.</entry></row> |
---|
166 | <row><entry><literal>*B*. (bold B)</literal></entry><entry><emphasis role="bold">B</emphasis>. (bold B)</entry></row> |
---|
167 | <row><entry><literal>['*Bold-Italic*]</literal></entry><entry><emphasis><emphasis role="bold">Bold-Italic</emphasis></emphasis></entry></row> |
---|
168 | </tbody> |
---|
169 | </tgroup> |
---|
170 | </informaltable> |
---|
171 | <informaltable frame="all"> |
---|
172 | <?dbhtml table-width="74%" ?> |
---|
173 | <tgroup cols="1"> |
---|
174 | <tbody> |
---|
175 | <row> |
---|
176 | <entry role="blurb"> |
---|
177 | <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject></inlinemediaobject> Thanks to David Barrett, author of |
---|
178 | <ulink url="http://quinthar.com/qwikiwiki/index.php?page=Home">Qwiki</ulink>, for sharing these samples |
---|
179 | and teaching me these obscure formatting rules. I wasn't sure at all if <ulink url="http://spirit.sourceforge.net">Spirit</ulink>, |
---|
180 | being more or less a formal EBNF parser, can handle the context sensitivity and ambiguity.</entry> |
---|
181 | </row> |
---|
182 | </tbody> |
---|
183 | </tgroup> |
---|
184 | </informaltable> |
---|
185 | <anchor id="syntax.inline_code" /><bridgehead renderas="sect3">Inline code</bridgehead><para> |
---|
186 | Inlining code in paragraphs is quite common when writing C++ documentation. We |
---|
187 | provide a very simple markup for this. For example, this:</para> |
---|
188 | <programlisting><literal>This text has inlined code `int main() { return 0; }` in it. |
---|
189 | </literal></programlisting><para> |
---|
190 | will generate:</para> |
---|
191 | <para> |
---|
192 | This text has inlined code <code><phrase role="keyword">int</phrase><phrase role="identifier"> main</phrase><phrase role="special">()</phrase><phrase role="special"> {</phrase><phrase role="keyword"> return</phrase><phrase role="number"> 0</phrase><phrase role="special">;</phrase><phrase role="special"> }</phrase></code> in it. The code will be |
---|
193 | syntax highlighted.</para> |
---|
194 | <informaltable frame="all"> |
---|
195 | <?dbhtml table-width="74%" ?> |
---|
196 | <tgroup cols="1"> |
---|
197 | <tbody> |
---|
198 | <row> |
---|
199 | <entry role="blurb"> |
---|
200 | <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject></inlinemediaobject> |
---|
201 | Note that we simply enclose the code with the tick: <literal>"`"</literal>, not the |
---|
202 | single quote: <code><phrase role="string">"'"</phrase></code>. Note too that <literal>`some code`</literal> is prefered over |
---|
203 | <literal>[^some code]</literal>. |
---|
204 | </entry> |
---|
205 | </row> |
---|
206 | </tbody> |
---|
207 | </tgroup> |
---|
208 | </informaltable> |
---|
209 | <anchor id="syntax.source_mode" /><bridgehead renderas="sect3">Source Mode</bridgehead><para> |
---|
210 | If a document contains more than one type of source code then the source mode |
---|
211 | may be changed dynamically as the document is processed. All QuickBook |
---|
212 | documents are initially in C++ mode by default, though an alternative initial value |
---|
213 | may be set in the <link linkend="syntax.document">Document Info</link> section.</para> |
---|
214 | <para> |
---|
215 | To change the source mode, use the <literal>[source-mode]</literal> markup, where |
---|
216 | <literal>source-mode</literal> is one of the supported modes. For example, this:</para> |
---|
217 | <programlisting><literal>Python's [python] `import` is rather like C++'s [c++] `#include`. A |
---|
218 | C++ comment `// looks like this` whereas a Python comment [python] |
---|
219 | `# looks like this`. |
---|
220 | </literal></programlisting><para> |
---|
221 | will generate:</para> |
---|
222 | <para> |
---|
223 | Python's <code><phrase role="keyword">import</phrase></code> is rather like C++'s <code><phrase role="preprocessor">#include</phrase></code>. A |
---|
224 | C++ comment <code><phrase role="comment">// looks like this</phrase></code> whereas a Python comment |
---|
225 | <code><phrase role="comment">#looks like this</phrase></code>.</para> |
---|
226 | <informaltable frame="all"> |
---|
227 | <bridgehead renderas="sect4"><phrase role="table-title">Supported Source Modes</phrase></bridgehead> |
---|
228 | <tgroup cols="2"> |
---|
229 | <thead><row><entry>Mode</entry><entry>Source Mode Markup</entry></row> |
---|
230 | </thead> |
---|
231 | <tbody> |
---|
232 | <row><entry>C++</entry><entry><literal>[c++]</literal></entry></row> |
---|
233 | <row><entry>Python</entry><entry><literal>[python]</literal></entry></row> |
---|
234 | </tbody> |
---|
235 | </tgroup> |
---|
236 | </informaltable> |
---|
237 | <informaltable frame="all"> |
---|
238 | <?dbhtml table-width="74%" ?> |
---|
239 | <tgroup cols="1"> |
---|
240 | <tbody> |
---|
241 | <row> |
---|
242 | <entry role="blurb"> |
---|
243 | <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject></inlinemediaobject> The source mode strings are lowercase.</entry> |
---|
244 | </row> |
---|
245 | </tbody> |
---|
246 | </tgroup> |
---|
247 | </informaltable> |
---|
248 | <anchor id="syntax.line_break" /><bridgehead renderas="sect3">line-break</bridgehead><programlisting><literal>[br] |
---|
249 | </literal></programlisting><informaltable frame="all"> |
---|
250 | <?dbhtml table-width="74%" ?> |
---|
251 | <tgroup cols="1"> |
---|
252 | <tbody> |
---|
253 | <row> |
---|
254 | <entry role="blurb"> |
---|
255 | <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject></inlinemediaobject> Note that <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code> is now preferred over <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase role="special">]</phrase></code>.</entry> |
---|
256 | </row> |
---|
257 | </tbody> |
---|
258 | </tgroup> |
---|
259 | </informaltable> |
---|
260 | <anchor id="syntax.anchors" /><bridgehead renderas="sect3">Anchors</bridgehead><programlisting><literal>[#named_anchor] |
---|
261 | </literal></programlisting><para> |
---|
262 | A named anchor is a hook that can be referenced by a link elsewhere in the |
---|
263 | document. You can then reference an anchor with <literal>[link named_anchor Some link text]</literal>. |
---|
264 | More on anchors <link linkend="syntax.anchor_links">here</link>, <link linkend="syntax.section">here</link> and |
---|
265 | <link linkend="syntax.headings">here</link>.</para> |
---|
266 | <anchor id="syntax.links" /><bridgehead renderas="sect3">Links</bridgehead><programlisting><literal>[@http://www.boost.org this is [*boost's] website....] |
---|
267 | </literal></programlisting><para> |
---|
268 | will generate:</para> |
---|
269 | <para> |
---|
270 | <ulink url="http://www.boost.org">this is <emphasis role="bold">boost's</emphasis> website....</ulink></para> |
---|
271 | <para> |
---|
272 | URL links where the link text is the link itself is common. Example:</para> |
---|
273 | <programlisting><literal>see http://spirit.sourceforge.net/ |
---|
274 | </literal></programlisting><para> |
---|
275 | so, when the text is absent in a link markup, the URL is assumed. Example:</para> |
---|
276 | <programlisting><literal>see [@http://spirit.sourceforge.net/] |
---|
277 | </literal></programlisting><para> |
---|
278 | will generate:</para> |
---|
279 | <para> |
---|
280 | see <ulink url="http://spirit.sourceforge.net/">http://spirit.sourceforge.net/</ulink></para> |
---|
281 | <anchor id="syntax.anchor_links" /><bridgehead renderas="sect3">Anchor links</bridgehead><para> |
---|
282 | You can link within a document using:</para> |
---|
283 | <programlisting><literal>[link section_id.normalized_header_text The link text] |
---|
284 | </literal></programlisting><para> |
---|
285 | See sections <link linkend="syntax.section">Section</link> and <link linkend="syntax.headings">Headings</link> |
---|
286 | for more info.</para> |
---|
287 | <anchor id="syntax.refentry_links" /><bridgehead renderas="sect3">refentry links</bridgehead><para> |
---|
288 | In addition, you can link internally to an XML refentry like:</para> |
---|
289 | <programlisting><literal>[link xml.refentry The link text] |
---|
290 | </literal></programlisting><para> |
---|
291 | This gets converted into <literal><link linkend="xml.refentry">The link text</link></literal>.</para> |
---|
292 | <para> |
---|
293 | Like URLs, the link text is optional. If this is not present, the link text will |
---|
294 | automatically be the refentry. Example:</para> |
---|
295 | <programlisting><literal>[link xml.refentry] |
---|
296 | </literal></programlisting><para> |
---|
297 | This gets converted into <literal><link linkend="xml.refentry">xml.refentry</link></literal>.</para> |
---|
298 | <anchor id="syntax.function__class__member__enum_or_header_links" /><bridgehead renderas="sect3">function, class, member, enum or header links</bridgehead><para> |
---|
299 | If you want to link to a function, class, member, enum or header in the reference |
---|
300 | section, you can use:</para> |
---|
301 | <programlisting><literal>[funcref fully::qualified::function_name The link text] |
---|
302 | [classref fully::qualified::class_name The link text] |
---|
303 | [memberref fully::qualified::member_name The link text] |
---|
304 | [enumref fully::qualified::enum_name The link text] |
---|
305 | [headerref path/to/header.hpp The link text] |
---|
306 | </literal></programlisting><para> |
---|
307 | Again, the link text is optional. If this is not present, the link text will |
---|
308 | automatically be the function, class, member or enum. Example:</para> |
---|
309 | <programlisting><literal>[classref boost::bar::baz] |
---|
310 | </literal></programlisting><para> |
---|
311 | would have "boost::bar::baz" as the link text.</para> |
---|
312 | <anchor id="syntax.escape" /><bridgehead renderas="sect3">Escape</bridgehead><para> |
---|
313 | The escape mark-up is used when we don't want to do any processing.</para> |
---|
314 | <programlisting><literal>''' |
---|
315 | escape (no processing/formatting) |
---|
316 | ''' |
---|
317 | </literal></programlisting><para> |
---|
318 | Escaping allows us to pass XML markup to <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink> or <ulink url="http://www.docbook.org/">DocBook</ulink>. For example:</para> |
---|
319 | <programlisting><literal>''' |
---|
320 | <emphasis role="bold">This is direct XML markup</emphasis> |
---|
321 | ''' |
---|
322 | </literal></programlisting><para> |
---|
323 | <emphasis role="bold">This is direct XML markup</emphasis> |
---|
324 | </para> |
---|
325 | <informaltable frame="all"> |
---|
326 | <?dbhtml table-width="74%" ?> |
---|
327 | <tgroup cols="1"> |
---|
328 | <tbody> |
---|
329 | <row> |
---|
330 | <entry role="blurb"> |
---|
331 | <inlinemediaobject><imageobject><imagedata fileref="images/alert.png"></imagedata></imageobject></inlinemediaobject> Be careful when using the escape. The text must conform to |
---|
332 | <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>/<ulink url="http://www.docbook.org/">DocBook</ulink> syntax.</entry> |
---|
333 | </row> |
---|
334 | </tbody> |
---|
335 | </tgroup> |
---|
336 | </informaltable> |
---|
337 | <anchor id="syntax.single_char_escape" /><bridgehead renderas="sect3">Single char escape</bridgehead><para> |
---|
338 | The backslash may be used to escape a single punctuation character. The |
---|
339 | punctuation immediately after the backslash is passed without any processing. |
---|
340 | This is useful when we need to escape QuickBook punctuations such as <code><phrase role="special">[</phrase></code> and <code><phrase role="special">]</phrase></code>. |
---|
341 | For example, how do you escape the triple quote? Simple: <literal>\'\'\'</literal></para> |
---|
342 | <para> |
---|
343 | <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code> has a special meaning. It is used to generate line breaks. Note that <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code> |
---|
344 | is now preferred over <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase role="special">]</phrase></code>.</para> |
---|
345 | <anchor id="syntax.images__terminal_" /><bridgehead renderas="sect3">Images (terminal)</bridgehead><programlisting><literal>[$image.jpg] |
---|
346 | </literal></programlisting><anchor id="syntax.block_level_elements" /><bridgehead renderas="sect2">Block Level Elements</bridgehead><anchor id="syntax.document" /><bridgehead renderas="sect3">Document</bridgehead><para> |
---|
347 | Every document must begin with a Document Info section, which should look |
---|
348 | like this:</para> |
---|
349 | <programlisting><literal>[document-type The Document Title |
---|
350 | [version 1.0] |
---|
351 | [id the_document_name] |
---|
352 | [dirname the_document_dir] |
---|
353 | [copyright 2000 2002 2003 Joe Blow, Jane Doe] |
---|
354 | [purpose The document's reason for being] |
---|
355 | [category The document's category] |
---|
356 | [authors [Blow, Joe], [Doe, Jane]] |
---|
357 | [license The document's license] |
---|
358 | [last-revision $Date: 2005/02/14 06:36:16 $] |
---|
359 | [source-mode source-type] |
---|
360 | ] |
---|
361 | </literal></programlisting><para> |
---|
362 | Where document-type is one of:</para> |
---|
363 | <itemizedlist> |
---|
364 | <listitem> |
---|
365 | book |
---|
366 | </listitem><listitem> |
---|
367 | library |
---|
368 | </listitem><listitem> |
---|
369 | part |
---|
370 | </listitem><listitem> |
---|
371 | article |
---|
372 | </listitem><listitem> |
---|
373 | chapter |
---|
374 | </listitem> |
---|
375 | </itemizedlist><para> |
---|
376 | and <literal>version</literal>, <literal>id</literal>, <literal>dirname</literal>, <literal>copyright</literal>, <literal>purpose</literal>, <literal>category</literal>, <literal>authors</literal>, |
---|
377 | <literal>license</literal>, <literal>last-revision</literal> and <literal>source-mode</literal> are optional information.</para> |
---|
378 | <para> |
---|
379 | Here <literal>source-type</literal> is a lowercase string setting the initial |
---|
380 | <link linkend="syntax.source_mode">source mode</link>. If the <literal>source-mode</literal> field is omitted, a |
---|
381 | default value of <literal>c++</literal> will be used.</para> |
---|
382 | <anchor id="syntax.section" /><bridgehead renderas="sect3">Section</bridgehead><para> |
---|
383 | Starting a new section is accomplished with:</para> |
---|
384 | <programlisting><literal>[section:id The Section Title] |
---|
385 | </literal></programlisting><para> |
---|
386 | where <emphasis>id</emphasis> is optional. id will be the filename of the generated section. |
---|
387 | If it is not present, "The Section Title" will be normalized and become the id. |
---|
388 | Valid characters are <literal>a-Z</literal>, <literal>A-Z</literal>, <literal>0-9</literal> and <literal>_</literal>. All non-valid characters are |
---|
389 | converted to underscore and all upper-case are converted to lower case. |
---|
390 | Thus: "The Section Title" will be normalized to "the_section_title".</para> |
---|
391 | <para> |
---|
392 | End a section with:</para> |
---|
393 | <programlisting><literal>[endsect] |
---|
394 | </literal></programlisting><para> |
---|
395 | Sections can nest, and that results in a hierarchy in the table of contents.</para> |
---|
396 | <anchor id="syntax.xinclude" /><bridgehead renderas="sect3">xinclude</bridgehead><para> |
---|
397 | You can include another XML file with:</para> |
---|
398 | <programlisting><literal>[xinclude file.xml] |
---|
399 | </literal></programlisting><para> |
---|
400 | This is useful when file.xml has been generated by Doxygen and contains your |
---|
401 | reference section.</para> |
---|
402 | <anchor id="syntax.paragraphs" /><bridgehead renderas="sect3">Paragraphs</bridgehead><para> |
---|
403 | Paragraphs start left-flushed and are terminated by two or more newlines. No |
---|
404 | markup is needed for paragraphs. QuickBook automatically detects paragraphs from |
---|
405 | the context.</para> |
---|
406 | <anchor id="syntax.ordered_lists" /><bridgehead renderas="sect3">Ordered lists</bridgehead><programlisting><literal># One |
---|
407 | # Two |
---|
408 | # Three |
---|
409 | </literal></programlisting><para> |
---|
410 | will generate:</para> |
---|
411 | <orderedlist> |
---|
412 | <listitem> |
---|
413 | One |
---|
414 | </listitem><listitem> |
---|
415 | Two |
---|
416 | </listitem><listitem> |
---|
417 | Three |
---|
418 | </listitem> |
---|
419 | </orderedlist><para> |
---|
420 | List hierarchies are supported. Example:</para> |
---|
421 | <programlisting><literal># One |
---|
422 | # Two |
---|
423 | # Three |
---|
424 | # Three.a |
---|
425 | # Three.b |
---|
426 | # Three.c |
---|
427 | # Four |
---|
428 | # Four.a |
---|
429 | # Four.a.i |
---|
430 | # Four.a.ii |
---|
431 | # Four.b |
---|
432 | </literal></programlisting><para> |
---|
433 | will generate:</para> |
---|
434 | <orderedlist> |
---|
435 | <listitem> |
---|
436 | One |
---|
437 | </listitem><listitem> |
---|
438 | Two |
---|
439 | </listitem><listitem> |
---|
440 | Three<orderedlist> |
---|
441 | <listitem> |
---|
442 | Three.a |
---|
443 | </listitem><listitem> |
---|
444 | Three.b |
---|
445 | </listitem><listitem> |
---|
446 | Three.c |
---|
447 | </listitem> |
---|
448 | </orderedlist> |
---|
449 | </listitem><listitem> |
---|
450 | Fourth<orderedlist> |
---|
451 | <listitem> |
---|
452 | Four.a<orderedlist> |
---|
453 | <listitem> |
---|
454 | Four.a.i |
---|
455 | </listitem><listitem> |
---|
456 | Four.a.ii |
---|
457 | </listitem> |
---|
458 | </orderedlist> |
---|
459 | </listitem><listitem> |
---|
460 | Four.b |
---|
461 | </listitem> |
---|
462 | </orderedlist> |
---|
463 | </listitem> |
---|
464 | </orderedlist><para> |
---|
465 | Long lines will be wrapped appropriately. Example:</para> |
---|
466 | <programlisting><literal># A short item. |
---|
467 | # A very long item. A very long item. A very long item. |
---|
468 | A very long item. A very long item. A very long item. |
---|
469 | A very long item. A very long item. A very long item. |
---|
470 | A very long item. A very long item. A very long item. |
---|
471 | A very long item. A very long item. A very long item. |
---|
472 | # A short item. |
---|
473 | </literal></programlisting><orderedlist> |
---|
474 | <listitem> |
---|
475 | A short item. |
---|
476 | </listitem><listitem> |
---|
477 | A very long item. A very long item. A very long item. |
---|
478 | A very long item. A very long item. A very long item. |
---|
479 | A very long item. A very long item. A very long item. |
---|
480 | A very long item. A very long item. A very long item. |
---|
481 | A very long item. A very long item. A very long item. |
---|
482 | </listitem><listitem> |
---|
483 | A short item. |
---|
484 | </listitem> |
---|
485 | </orderedlist><anchor id="syntax.unordered_lists" /><bridgehead renderas="sect3">Unordered lists</bridgehead><programlisting><literal>* First |
---|
486 | * Second |
---|
487 | * Third |
---|
488 | </literal></programlisting><para> |
---|
489 | will generate:</para> |
---|
490 | <itemizedlist> |
---|
491 | <listitem> |
---|
492 | First |
---|
493 | </listitem><listitem> |
---|
494 | Second |
---|
495 | </listitem><listitem> |
---|
496 | Third |
---|
497 | </listitem> |
---|
498 | </itemizedlist><para> |
---|
499 | Mixed lists (ordered and unordered) are supported. Example:</para> |
---|
500 | <programlisting><literal># One |
---|
501 | # Two |
---|
502 | # Three |
---|
503 | * Three.a |
---|
504 | * Three.b |
---|
505 | * Three.c |
---|
506 | </literal></programlisting><para> |
---|
507 | will generate:</para> |
---|
508 | <orderedlist> |
---|
509 | <listitem> |
---|
510 | One |
---|
511 | </listitem><listitem> |
---|
512 | Two |
---|
513 | </listitem><listitem> |
---|
514 | Three<itemizedlist> |
---|
515 | <listitem> |
---|
516 | Three.a |
---|
517 | </listitem><listitem> |
---|
518 | Three.b |
---|
519 | </listitem><listitem> |
---|
520 | Three.c |
---|
521 | </listitem> |
---|
522 | </itemizedlist> |
---|
523 | </listitem> |
---|
524 | </orderedlist><anchor id="syntax.code" /><bridgehead renderas="sect3">Code</bridgehead><para> |
---|
525 | Preformatted code starts with a space or a tab. The code will be |
---|
526 | syntax highlighted according to the current <link linkend="syntax.source_mode">source mode</link>:</para> |
---|
527 | <para> |
---|
528 | </para> |
---|
529 | <programlisting> |
---|
530 | <literal> |
---|
531 | <phrase role="preprocessor">#include</phrase><phrase role="special"> <</phrase><phrase role="identifier">iostream</phrase><phrase role="special">></phrase><phrase role="keyword"> |
---|
532 | |
---|
533 | int</phrase><phrase role="identifier"> main</phrase><phrase role="special">()</phrase><phrase role="special"> |
---|
534 | {</phrase><phrase role="comment"> |
---|
535 | // Sample code |
---|
536 | </phrase><phrase role="identifier"> std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase><phrase role="special"> <<</phrase><phrase role="string"> "Hello, World\n"</phrase><phrase role="special">;</phrase><phrase role="keyword"> |
---|
537 | return</phrase><phrase role="number"> 0</phrase><phrase role="special">;</phrase><phrase role="special"> |
---|
538 | }</phrase> |
---|
539 | </literal> |
---|
540 | </programlisting> |
---|
541 | <para> |
---|
542 | </para> |
---|
543 | <programlisting> |
---|
544 | <literal> |
---|
545 | <phrase role="keyword">import</phrase><phrase role="identifier"> cgi</phrase><phrase role="keyword"> |
---|
546 | |
---|
547 | def</phrase><phrase role="identifier"> cookForHtml</phrase><phrase role="special">(</phrase><phrase role="identifier">text</phrase><phrase role="special">):</phrase><phrase role="string"> |
---|
548 | '''"Cooks" the input text for HTML.'''</phrase><phrase role="keyword"> |
---|
549 | |
---|
550 | return</phrase><phrase role="identifier"> cgi</phrase><phrase role="special">.</phrase><phrase role="identifier">escape</phrase><phrase role="special">(</phrase><phrase role="identifier">text</phrase><phrase role="special">)</phrase></literal> |
---|
551 | </programlisting> |
---|
552 | <para> |
---|
553 | Macros that are already defined are expanded in source code. Example:</para> |
---|
554 | <programlisting><literal>[def __syntax_highlight__ [@quickbook/highlight.html syntax_highlight]] |
---|
555 | [def __quickbook__ [@index.html quickbook]] |
---|
556 | |
---|
557 | using __quickbook__::__syntax_highlight__; |
---|
558 | </literal></programlisting><para> |
---|
559 | Generates:</para> |
---|
560 | <programlisting> |
---|
561 | <literal> |
---|
562 | <phrase role="identifier">using</phrase> <ulink url="index.html">quickbook</ulink><phrase role="special">::</phrase><ulink url="quickbook/highlight.html">syntax_highlight</ulink><phrase role="special">;</phrase></literal> |
---|
563 | </programlisting> |
---|
564 | <anchor id="syntax.preformatted" /><bridgehead renderas="sect3">Preformatted</bridgehead><para> |
---|
565 | Sometimes, you don't want some preformatted text to be parsed as C++. In such |
---|
566 | cases, use the <literal>[pre ... ]</literal> markup block.</para> |
---|
567 | <programlisting><literal>[pre |
---|
568 | |
---|
569 | Some *preformatted* text Some *preformatted* text |
---|
570 | |
---|
571 | Some *preformatted* text Some *preformatted* text |
---|
572 | |
---|
573 | Some *preformatted* text Some *preformatted* text |
---|
574 | |
---|
575 | ] |
---|
576 | </literal></programlisting><para> |
---|
577 | Spaces, tabs and newlines are rendered as-is. Unlike all quickbook block level |
---|
578 | markup, pre (and Code) are the only ones that allow multiple newlines. The |
---|
579 | markup above will generate:</para> |
---|
580 | <programlisting><literal>Some <emphasis role="bold">preformatted</emphasis> text Some <emphasis role="bold">preformatted</emphasis> text |
---|
581 | |
---|
582 | Some <emphasis role="bold">preformatted</emphasis> text Some <emphasis role="bold">preformatted</emphasis> text |
---|
583 | |
---|
584 | Some <emphasis role="bold">preformatted</emphasis> text Some <emphasis role="bold">preformatted</emphasis> text |
---|
585 | |
---|
586 | </literal></programlisting><para> |
---|
587 | Notice that unlike Code, phrase markup such as font style is still permitted |
---|
588 | inside <literal>pre</literal> blocks.</para> |
---|
589 | <anchor id="syntax.blockquote" /><bridgehead renderas="sect3">Blockquote</bridgehead><programlisting><literal>[:sometext...] |
---|
590 | </literal></programlisting><blockquote><para>Indents the paragraph. This applies to one paragraph only.</para></blockquote><anchor id="syntax.headings" /><bridgehead renderas="sect3">Headings</bridgehead><programlisting><literal>[h1 Heading 1] |
---|
591 | [h2 Heading 2] |
---|
592 | [h3 Heading 3] |
---|
593 | [h4 Heading 4] |
---|
594 | [h5 Heading 5] |
---|
595 | [h6 Heading 6] |
---|
596 | </literal></programlisting><anchor id="syntax.heading_1" /><bridgehead renderas="sect1">Heading 1</bridgehead><anchor id="syntax.heading_2" /><bridgehead renderas="sect2">Heading 2</bridgehead><anchor id="syntax.heading_3" /><bridgehead renderas="sect3">Heading 3</bridgehead><anchor id="syntax.heading_4" /><bridgehead renderas="sect4">Heading 4</bridgehead><anchor id="syntax.heading_5" /><bridgehead renderas="sect5">Heading 5</bridgehead><anchor id="syntax.heading_6" /><bridgehead renderas="sect6">Heading 6</bridgehead><para> |
---|
597 | Headings 1-3 [h1 h2 and h3] will automatically have anchors with normalized |
---|
598 | names with <literal>name="section_id.normalized_header_text"</literal> (i.e. valid characters are |
---|
599 | <literal>a-z</literal>, <literal>A-Z</literal>, <literal>0-9</literal> and <literal>_</literal>. All non-valid characters are converted to underscore |
---|
600 | and all upper-case are converted to lower-case. For example: Heading |
---|
601 | 1 in section Section 2 will be normalized to <literal>section_2.heading_1</literal>). You can use:</para> |
---|
602 | <programlisting><literal>[link section_id.normalized_header_text The link text] |
---|
603 | </literal></programlisting><para> |
---|
604 | to link to them. See <link linkend="syntax.anchor_links">Anchor links</link> and |
---|
605 | <link linkend="syntax.section">Section</link> for more info.</para> |
---|
606 | <anchor id="syntax.macros" /><bridgehead renderas="sect3">Macros</bridgehead><programlisting><literal>[def macro_identifier some text] |
---|
607 | </literal></programlisting><para> |
---|
608 | When a macro is defined, the identifier replaces the text anywhere in the file, |
---|
609 | in paragraphs, in markups, etc. macro_identifier is a string of non- white space |
---|
610 | characters except ']' while the replacement text can be any phrase (even |
---|
611 | marked up). Example:</para> |
---|
612 | <programlisting><literal>[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]] |
---|
613 | sf_logo |
---|
614 | </literal></programlisting><para> |
---|
615 | Now everywhere the sf_logo is placed, the picture will be inlined.</para> |
---|
616 | <para> |
---|
617 | <inlinemediaobject><imageobject><imagedata fileref="http://sourceforge.net/sflogo.php?group_id=28447&type=1"></imagedata></imageobject></inlinemediaobject></para> |
---|
618 | <informaltable frame="all"> |
---|
619 | <?dbhtml table-width="74%" ?> |
---|
620 | <tgroup cols="1"> |
---|
621 | <tbody> |
---|
622 | <row> |
---|
623 | <entry role="blurb"> |
---|
624 | <inlinemediaobject><imageobject><imagedata fileref="images/tip.png"></imagedata></imageobject></inlinemediaobject> It's a good idea to use macro identifiers that are distinguishable. |
---|
625 | For instance, in this document, macro identifiers have two leading and trailing |
---|
626 | underscores (e.g. <literal>__spirit__</literal>). The reason is to avoid unwanted macro replacement.</entry> |
---|
627 | </row> |
---|
628 | </tbody> |
---|
629 | </tgroup> |
---|
630 | </informaltable> |
---|
631 | <para> |
---|
632 | Links (URLS) and images are good candidates for macros. <emphasis role="bold">1</emphasis>) They tend to |
---|
633 | change a lot. It is a good idea to place all links and images in one place near the top |
---|
634 | to make it easy to make changes. <emphasis role="bold">2</emphasis>) The syntax is not pretty. It's easier to read and |
---|
635 | write, e.g. <literal>__spirit__</literal> than <literal>[@http://spirit.sourceforge.net Spirit]</literal>.</para> |
---|
636 | <para> |
---|
637 | Some more examples:</para> |
---|
638 | <programlisting><literal>[def :-) [$theme/smiley.png]] |
---|
639 | [def __spirit__ [@http://spirit.sourceforge.net Spirit]] |
---|
640 | </literal></programlisting><para> |
---|
641 | (See <link linkend="syntax.images__terminal_">Images</link> |
---|
642 | and <link linkend="syntax.links">Links</link>)</para> |
---|
643 | <para> |
---|
644 | Invoking these macros:</para> |
---|
645 | <programlisting><literal>Hi __spirit__ :-) |
---|
646 | </literal></programlisting><para> |
---|
647 | will generate this:</para> |
---|
648 | <para> |
---|
649 | Hi <ulink url="http://spirit.sourceforge.net">Spirit</ulink> <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject></inlinemediaobject></para> |
---|
650 | <anchor id="syntax.predefined_macros" /><bridgehead renderas="sect3">Predefined Macros</bridgehead><para> |
---|
651 | Quickbook has some predefined macros that you can already use.</para> |
---|
652 | <informaltable frame="all"> |
---|
653 | <bridgehead renderas="sect4"><phrase role="table-title">Predefined Macros</phrase></bridgehead> |
---|
654 | <tgroup cols="3"> |
---|
655 | <thead><row><entry>Macro</entry><entry>Meaning</entry><entry>Example</entry></row> |
---|
656 | </thead> |
---|
657 | <tbody> |
---|
658 | <row><entry>__DATE__</entry><entry>Today's date</entry><entry>2005-Feb-14</entry></row> |
---|
659 | <row><entry>__TIME__</entry><entry>The current time</entry><entry>02:30:05 PM</entry></row> |
---|
660 | <row><entry>__FILENAME__</entry><entry>Quickbook source filename</entry><entry>C:\dev\boost\tools\quickbook\doc\quickbook.qbk</entry></row> |
---|
661 | </tbody> |
---|
662 | </tgroup> |
---|
663 | </informaltable> |
---|
664 | <anchor id="syntax.blurbs" /><bridgehead renderas="sect3">Blurbs</bridgehead><programlisting><literal>[blurb :-) [*An eye catching advertisement or note...]\n\n |
---|
665 | __spirit__ is an object-oriented recursive-descent parser generator framework |
---|
666 | implemented using template meta-programming techniques. Expression templates |
---|
667 | allow us to approximate the syntax of Extended Backus-Normal Form (EBNF) |
---|
668 | completely in C++. |
---|
669 | ] |
---|
670 | </literal></programlisting><para> |
---|
671 | will generate this:</para> |
---|
672 | <informaltable frame="all"> |
---|
673 | <?dbhtml table-width="74%" ?> |
---|
674 | <tgroup cols="1"> |
---|
675 | <tbody> |
---|
676 | <row> |
---|
677 | <entry role="blurb"> |
---|
678 | <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject></inlinemediaobject> <emphasis role="bold">An eye catching advertisement or note...</emphasis><sbr/> |
---|
679 | <sbr/> |
---|
680 | |
---|
681 | <ulink url="http://spirit.sourceforge.net">Spirit</ulink> is an object- oriented recursive-descent parser generator |
---|
682 | framework implemented using template meta-programming techniques. Expression |
---|
683 | templates allow us to approximate the syntax of Extended Backus- Normal Form |
---|
684 | (EBNF) completely in C++. |
---|
685 | </entry> |
---|
686 | </row> |
---|
687 | </tbody> |
---|
688 | </tgroup> |
---|
689 | </informaltable> |
---|
690 | <anchor id="syntax.tables" /><bridgehead renderas="sect3">Tables</bridgehead><programlisting><literal>[table A Simple Table |
---|
691 | [[Heading 1] [Heading 2] [Heading 3]] |
---|
692 | [[R0-C0] [R0-C1] [R0-C2]] |
---|
693 | [[R1-C0] [R1-C1] [R1-C2]] |
---|
694 | [[R2-C0] [R2-C1] [R2-C2]] |
---|
695 | ] |
---|
696 | </literal></programlisting><para> |
---|
697 | will generate:</para> |
---|
698 | <informaltable frame="all"> |
---|
699 | <bridgehead renderas="sect4"><phrase role="table-title">A Simple Table</phrase></bridgehead> |
---|
700 | <tgroup cols="3"> |
---|
701 | <thead><row><entry>Heading 1</entry><entry>Heading 2</entry><entry>Heading 3</entry></row> |
---|
702 | </thead> |
---|
703 | <tbody> |
---|
704 | <row><entry>R0-C0</entry><entry>R0-C1</entry><entry>R0-C2</entry></row> |
---|
705 | <row><entry>R2-C0</entry><entry>R2-C1</entry><entry>R2-C2</entry></row> |
---|
706 | <row><entry>R3-C0</entry><entry>R3-C1</entry><entry>R3-C2</entry></row> |
---|
707 | </tbody> |
---|
708 | </tgroup> |
---|
709 | </informaltable> |
---|
710 | <para> |
---|
711 | The first row of the table is automatically treated as the table header; that is, |
---|
712 | it is wrapped in <literal><thead>...</thead></literal> XML tags. Note that unlike the original QuickDoc, |
---|
713 | the columns are nested in [ cells... ]. The syntax is free-format and allows big |
---|
714 | cells to be formatted nicely. Example:</para> |
---|
715 | <programlisting><literal>[table Table with fat cells |
---|
716 | [[Heading 1] [Heading 2]] |
---|
717 | [ |
---|
718 | [Row 0, Col 0: a small cell] |
---|
719 | [ |
---|
720 | Row 0, Col 1: |
---|
721 | A very big cell...A very big cell...A very big cell... |
---|
722 | A very big cell...A very big cell...A very big cell... |
---|
723 | A very big cell...A very big cell...A very big cell... |
---|
724 | ] |
---|
725 | ] |
---|
726 | [ |
---|
727 | [Row 1, Col 0: a small cell] |
---|
728 | [Row 1, Col 1: a small cell] |
---|
729 | ] |
---|
730 | ] |
---|
731 | </literal></programlisting><para> |
---|
732 | and thus:</para> |
---|
733 | <informaltable frame="all"> |
---|
734 | <bridgehead renderas="sect4"><phrase role="table-title">Table with fat cells</phrase></bridgehead> |
---|
735 | <tgroup cols="2"> |
---|
736 | <thead><row><entry>Heading 1</entry><entry>Heading 2</entry></row> |
---|
737 | </thead> |
---|
738 | <tbody> |
---|
739 | <row><entry>Row 0, Col 0: a small cell</entry><entry> |
---|
740 | Row 0, Col 1: |
---|
741 | A very big cell...A very big cell...A very big cell... |
---|
742 | A very big cell...A very big cell...A very big cell... |
---|
743 | A very big cell...A very big cell...A very big cell... |
---|
744 | </entry></row> |
---|
745 | <row><entry>Row 1, Col 0: a small cell</entry><entry>Row 1, Col 1: a small cell</entry></row> |
---|
746 | </tbody> |
---|
747 | </tgroup> |
---|
748 | </informaltable> |
---|
749 | <anchor id="syntax.variable_lists" /><bridgehead renderas="sect3">Variable Lists</bridgehead><programlisting><literal>[variablelist A Variable List |
---|
750 | [[term 1] [The definition of term 1]] |
---|
751 | [[term 2] [The definition of term 2]] |
---|
752 | [[term 3] [The definition of term 3]] |
---|
753 | ] |
---|
754 | </literal></programlisting><para> |
---|
755 | will generate:</para> |
---|
756 | <variablelist> |
---|
757 | <title>A Variable List</title> |
---|
758 | <varlistentry><term>term 1</term><listitem>The definition of term 1</listitem></varlistentry> |
---|
759 | <varlistentry><term>term 2</term><listitem>The definition of term 2</listitem></varlistentry> |
---|
760 | <varlistentry><term>term 3</term><listitem>The definition of term 3</listitem></varlistentry> |
---|
761 | </variablelist> |
---|
762 | <para> |
---|
763 | The rules for variable lists are the same as for tables, except that |
---|
764 | only 2 "columns" are allowed. The first column contains the terms, and |
---|
765 | the second column contains the definitions. Those familiar with HTML |
---|
766 | will recognize this as a "definition list".</para> |
---|
767 | </section> |
---|
768 | <section id="quickbook.ref"> |
---|
769 | <title> Quick Reference</title> |
---|
770 | <informaltable frame="all"> |
---|
771 | <bridgehead renderas="sect4"><phrase role="table-title">Syntax Compendium</phrase></bridgehead> |
---|
772 | <tgroup cols="2"> |
---|
773 | <thead><row><entry>To do this...</entry><entry>Use this...</entry></row> |
---|
774 | </thead> |
---|
775 | <tbody> |
---|
776 | <row><entry>comment</entry><entry><literal>[/ some comment]</literal></entry></row> |
---|
777 | <row><entry><emphasis>italics</emphasis></entry><entry><literal>['italics] or /italics/</literal></entry></row> |
---|
778 | <row><entry><emphasis role="bold">bold</emphasis></entry><entry><literal>[*bold] or *bold*</literal></entry></row> |
---|
779 | <row><entry><emphasis role="underline">underline</emphasis></entry><entry><literal>[_underline] or _underline_</literal></entry></row> |
---|
780 | <row><entry><literal>teletype</literal></entry><entry><literal>[^teletype] or =teletype=</literal></entry></row> |
---|
781 | <row><entry>source mode</entry><entry><literal>[c++]</literal> or <literal>[python]</literal></entry></row> |
---|
782 | <row><entry>inline code</entry><entry><literal>`int main();`</literal></entry></row> |
---|
783 | <row><entry>line break</entry><entry><literal>[br]</literal></entry></row> |
---|
784 | <row><entry>line break</entry><entry><literal>\n</literal></entry></row> |
---|
785 | <row><entry>anchor</entry><entry><literal>[#anchor]</literal></entry></row> |
---|
786 | <row><entry>link</entry><entry><literal>[@http://www.boost.org Boost]</literal></entry></row> |
---|
787 | <row><entry>anchor link</entry><entry><literal>[link section.anchor Link text]</literal></entry></row> |
---|
788 | <row><entry>refentry link</entry><entry><literal>[link xml.refentry Link text]</literal></entry></row> |
---|
789 | <row><entry>function link</entry><entry><literal>[funcref fully::qualified::function_name Link text]</literal></entry></row> |
---|
790 | <row><entry>class link</entry><entry><literal>[classref fully::qualified::class_name Link text]</literal></entry></row> |
---|
791 | <row><entry>member link</entry><entry><literal>[memberref fully::qualified::member_name Link text]</literal></entry></row> |
---|
792 | <row><entry>enum link</entry><entry><literal>[enumref fully::qualified::enum_name Link text]</literal></entry></row> |
---|
793 | <row><entry>header link</entry><entry><literal>[headerref path/to/header.hpp Link text]</literal></entry></row> |
---|
794 | <row><entry>escape</entry><entry><literal>'''escaped text (no processing/formatting)'''</literal></entry></row> |
---|
795 | <row><entry>single char escape</entry><entry><literal>\c</literal></entry></row> |
---|
796 | <row><entry>images</entry><entry><literal>[$image.jpg]</literal></entry></row> |
---|
797 | <row><entry>begin section</entry><entry><literal>[section The Section Title]</literal></entry></row> |
---|
798 | <row><entry>end section</entry><entry><literal>[endsect]</literal></entry></row> |
---|
799 | <row><entry>paragraph</entry><entry>No markup. Paragraphs start left-flushed and are terminated by two or more newlines.</entry></row> |
---|
800 | <row><entry>ordered list</entry><entry><literal># one<sbr/> |
---|
801 | # two<sbr/> |
---|
802 | # three<sbr/> |
---|
803 | </literal></entry></row> |
---|
804 | <row><entry>unordered list</entry><entry><literal>* one<sbr/> |
---|
805 | * two<sbr/> |
---|
806 | * three<sbr/> |
---|
807 | </literal></entry></row> |
---|
808 | <row><entry>code</entry><entry>No markup. Preformatted code starts with a space or a tab.</entry></row> |
---|
809 | <row><entry>preformatted</entry><entry><literal>[pre preformatted]</literal></entry></row> |
---|
810 | <row><entry>block quote</entry><entry><literal>[:sometext...]</literal></entry></row> |
---|
811 | <row><entry>heading 1</entry><entry><literal>[h1 Heading 1]</literal></entry></row> |
---|
812 | <row><entry>heading 2</entry><entry><literal>[h2 Heading 2]</literal></entry></row> |
---|
813 | <row><entry>heading 3</entry><entry><literal>[h3 Heading 3]</literal></entry></row> |
---|
814 | <row><entry>heading 4</entry><entry><literal>[h4 Heading 4]</literal></entry></row> |
---|
815 | <row><entry>heading 5</entry><entry><literal>[h5 Heading 5]</literal></entry></row> |
---|
816 | <row><entry>heading 6</entry><entry><literal>[h6 Heading 6]</literal></entry></row> |
---|
817 | <row><entry>macro</entry><entry><literal>[def macro_identifier some text]</literal></entry></row> |
---|
818 | <row><entry>blurb</entry><entry><literal>[blurb advertisement or note...]</literal></entry></row> |
---|
819 | <row><entry>table</entry><entry><literal>[table Title<sbr/> |
---|
820 | [[a][b][c]]<sbr/> |
---|
821 | [[a][b][c]]<sbr/> |
---|
822 | ]</literal></entry></row> |
---|
823 | <row><entry>variablelist</entry><entry><literal>[variablelist Title<sbr/> |
---|
824 | [[a][b]]<sbr/> |
---|
825 | [[a][b]]<sbr/> |
---|
826 | ]</literal></entry></row> |
---|
827 | </tbody> |
---|
828 | </tgroup> |
---|
829 | </informaltable> |
---|
830 | </section> |
---|
831 | <section id="quickbook.docinfo"> |
---|
832 | <title> Library Document Grammar</title> |
---|
833 | <para> |
---|
834 | </para> |
---|
835 | <programlisting> |
---|
836 | <literal> |
---|
837 | <phrase role="identifier">doc_info</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
838 | space</phrase><phrase role="special"> |
---|
839 | >></phrase><phrase role="char"> '['</phrase><phrase role="special"> |
---|
840 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> str_p</phrase><phrase role="special">(</phrase><phrase role="string">"book"</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
841 | |</phrase><phrase role="string"> "article"</phrase><phrase role="special"> |
---|
842 | |</phrase><phrase role="string"> "library"</phrase><phrase role="special"> |
---|
843 | |</phrase><phrase role="string"> "chapter"</phrase><phrase role="special"> |
---|
844 | |</phrase><phrase role="string"> "part"</phrase><phrase role="special"> |
---|
845 | )</phrase><phrase role="special"> |
---|
846 | >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
847 | >></phrase><phrase role="special"> (</phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
848 | (</phrase><phrase role="identifier">ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'['</phrase><phrase role="special">)</phrase><phrase role="special"> |</phrase><phrase role="char"> ']'</phrase><phrase role="special"> |</phrase><phrase role="identifier"> eol_p</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
849 | )</phrase><phrase role="special"> |
---|
850 | )</phrase><phrase role="special"> |
---|
851 | >></phrase><phrase role="special"> *(</phrase><phrase role="identifier"> doc_version</phrase><phrase role="special"> |
---|
852 | |</phrase><phrase role="identifier"> doc_id</phrase><phrase role="special"> |
---|
853 | |</phrase><phrase role="identifier"> doc_dirname</phrase><phrase role="special"> |
---|
854 | |</phrase><phrase role="identifier"> doc_copyright</phrase><phrase role="special"> |
---|
855 | |</phrase><phrase role="identifier"> doc_purpose</phrase><phrase role="special"> |
---|
856 | |</phrase><phrase role="identifier"> doc_category</phrase><phrase role="special"> |
---|
857 | |</phrase><phrase role="identifier"> doc_authors</phrase><phrase role="special"> |
---|
858 | |</phrase><phrase role="identifier"> doc_license</phrase><phrase role="special"> |
---|
859 | |</phrase><phrase role="identifier"> doc_last_revision</phrase><phrase role="special"> |
---|
860 | )</phrase><phrase role="special"> |
---|
861 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
862 | ;</phrase><phrase role="identifier"> |
---|
863 | |
---|
864 | doc_version</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
865 | space</phrase><phrase role="special"> |
---|
866 | >></phrase><phrase role="string"> "[version"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
867 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
868 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
869 | ;</phrase><phrase role="identifier"> |
---|
870 | |
---|
871 | doc_id</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
872 | space</phrase><phrase role="special"> |
---|
873 | >></phrase><phrase role="string"> "[id"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
874 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
875 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
876 | ;</phrase><phrase role="identifier"> |
---|
877 | |
---|
878 | doc_dirname</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
879 | space</phrase><phrase role="special"> |
---|
880 | >></phrase><phrase role="string"> "[dirname"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
881 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
882 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
883 | ;</phrase><phrase role="identifier"> |
---|
884 | |
---|
885 | doc_copyright</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
886 | space</phrase><phrase role="special"> |
---|
887 | >></phrase><phrase role="string"> "[copyright"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
888 | >></phrase><phrase role="special"> +(</phrase><phrase role="identifier"> repeat_p</phrase><phrase role="special">(</phrase><phrase role="number">4</phrase><phrase role="special">)[</phrase><phrase role="identifier">digit_p</phrase><phrase role="special">]</phrase><phrase role="special"> |
---|
889 | >></phrase><phrase role="identifier"> space</phrase><phrase role="special"> |
---|
890 | )</phrase><phrase role="special"> |
---|
891 | >></phrase><phrase role="identifier"> space</phrase><phrase role="special"> |
---|
892 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
893 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
894 | ;</phrase><phrase role="identifier"> |
---|
895 | |
---|
896 | doc_purpose</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
897 | space</phrase><phrase role="special"> |
---|
898 | >></phrase><phrase role="string"> "[purpose"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
899 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
900 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
901 | ;</phrase><phrase role="identifier"> |
---|
902 | |
---|
903 | doc_category</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
904 | space</phrase><phrase role="special"> |
---|
905 | >></phrase><phrase role="string"> "[category"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
906 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
907 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
908 | ;</phrase><phrase role="identifier"> |
---|
909 | |
---|
910 | doc_author</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
911 | space</phrase><phrase role="special"> |
---|
912 | >></phrase><phrase role="char"> '['</phrase><phrase role="special"> >></phrase><phrase role="identifier"> space</phrase><phrase role="special"> |
---|
913 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ','</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
914 | >></phrase><phrase role="char"> ','</phrase><phrase role="special"> >></phrase><phrase role="identifier"> space</phrase><phrase role="special"> |
---|
915 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
916 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> |
---|
917 | ;</phrase><phrase role="identifier"> |
---|
918 | |
---|
919 | doc_authors</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
920 | space</phrase><phrase role="special"> |
---|
921 | >></phrase><phrase role="string"> "[authors"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
922 | >></phrase><phrase role="identifier"> doc_author</phrase><phrase role="special"> |
---|
923 | >></phrase><phrase role="special"> *(</phrase><phrase role="char"> ','</phrase><phrase role="special"> |
---|
924 | >></phrase><phrase role="identifier"> doc_author</phrase><phrase role="special"> |
---|
925 | )</phrase><phrase role="special"> |
---|
926 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
927 | ;</phrase><phrase role="identifier"> |
---|
928 | |
---|
929 | doc_license</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
930 | space</phrase><phrase role="special"> |
---|
931 | >></phrase><phrase role="string"> "[license"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
932 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
933 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
934 | ;</phrase><phrase role="identifier"> |
---|
935 | |
---|
936 | doc_last_revision</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
937 | space</phrase><phrase role="special"> |
---|
938 | >></phrase><phrase role="string"> "[last-revision"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
939 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
940 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
941 | ;</phrase><phrase role="identifier"> |
---|
942 | |
---|
943 | doc_source_mode</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
944 | space</phrase><phrase role="special"> |
---|
945 | >></phrase><phrase role="string"> "[source-mode"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
946 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> |
---|
947 | str_p</phrase><phrase role="special">(</phrase><phrase role="string">"c++"</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
948 | |</phrase><phrase role="string"> "python"</phrase><phrase role="special"> |
---|
949 | )</phrase><phrase role="special"> |
---|
950 | >></phrase><phrase role="identifier"> space</phrase><phrase role="special"> >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol_p</phrase><phrase role="special"> |
---|
951 | ;</phrase><phrase role="identifier"> |
---|
952 | |
---|
953 | comment</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
954 | "[/"</phrase><phrase role="special"> >></phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">)</phrase><phrase role="special"> >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> |
---|
955 | ;</phrase><phrase role="identifier"> |
---|
956 | |
---|
957 | space</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
958 | *(</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> comment</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
959 | ;</phrase><phrase role="identifier"> |
---|
960 | |
---|
961 | hard_space</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
962 | (</phrase><phrase role="identifier">eps_p</phrase><phrase role="special"> -</phrase><phrase role="special"> (</phrase><phrase role="identifier">alnum_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">))</phrase><phrase role="special"> >></phrase><phrase role="identifier"> space</phrase><phrase role="comment"> // must not be followed by |
---|
963 | </phrase><phrase role="special"> ;</phrase><phrase role="comment"> // alpha-numeric or underscore |
---|
964 | </phrase></literal> |
---|
965 | </programlisting> |
---|
966 | </section> |
---|
967 | <section id="quickbook.quickbook"> |
---|
968 | <title> QuickBook Grammar</title> |
---|
969 | <programlisting> |
---|
970 | <literal> |
---|
971 | <phrase role="identifier">library</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
972 | *(</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> comment</phrase><phrase role="special">)</phrase><phrase role="special"> >></phrase><phrase role="identifier"> blocks</phrase><phrase role="special"> >></phrase><phrase role="identifier"> blank</phrase><phrase role="special"> |
---|
973 | ;</phrase><phrase role="identifier"> |
---|
974 | |
---|
975 | blocks</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
976 | +(</phrase><phrase role="identifier"> block_markup</phrase><phrase role="special"> |
---|
977 | |</phrase><phrase role="identifier"> code</phrase><phrase role="special"> |
---|
978 | |</phrase><phrase role="identifier"> list</phrase><phrase role="special"> |
---|
979 | |</phrase><phrase role="identifier"> hr</phrase><phrase role="special"> |
---|
980 | |</phrase><phrase role="identifier"> comment</phrase><phrase role="special"> >></phrase><phrase role="special"> *</phrase><phrase role="identifier">eol</phrase><phrase role="special"> |
---|
981 | |</phrase><phrase role="identifier"> paragraph</phrase><phrase role="special"> |
---|
982 | |</phrase><phrase role="identifier"> eol</phrase><phrase role="special"> |
---|
983 | )</phrase><phrase role="special"> |
---|
984 | ;</phrase><phrase role="identifier"> |
---|
985 | |
---|
986 | space</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
987 | *(</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> comment</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
988 | ;</phrase><phrase role="identifier"> |
---|
989 | |
---|
990 | blank</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
991 | *(</phrase><phrase role="identifier">blank_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> comment</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
992 | ;</phrase><phrase role="identifier"> |
---|
993 | |
---|
994 | eol</phrase><phrase role="special"> =</phrase><phrase role="identifier"> blank</phrase><phrase role="special"> >></phrase><phrase role="identifier"> eol_p</phrase><phrase role="special"> |
---|
995 | ;</phrase><phrase role="identifier"> |
---|
996 | |
---|
997 | close_bracket</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
998 | ']'</phrase><phrase role="special"> |</phrase><phrase role="identifier"> |
---|
999 | if_p</phrase><phrase role="special">(</phrase><phrase role="identifier">var</phrase><phrase role="special">(</phrase><phrase role="identifier">is_not_preformatted</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1000 | [</phrase><phrase role="identifier"> |
---|
1001 | eol_p</phrase><phrase role="special"> >></phrase><phrase role="identifier"> eol_p</phrase><phrase role="comment"> // Make sure that we don't go |
---|
1002 | </phrase><phrase role="special"> ]</phrase><phrase role="comment"> // past a single block, except |
---|
1003 | </phrase><phrase role="special"> ;</phrase><phrase role="comment"> // when preformatted. |
---|
1004 | </phrase><phrase role="identifier"> |
---|
1005 | hard_space</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
1006 | (</phrase><phrase role="identifier">eps_p</phrase><phrase role="special"> -</phrase><phrase role="special"> (</phrase><phrase role="identifier">alnum_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">))</phrase><phrase role="special"> >></phrase><phrase role="identifier"> space</phrase><phrase role="comment"> // must not be followed by |
---|
1007 | </phrase><phrase role="special"> ;</phrase><phrase role="comment"> // alpha-numeric or underscore |
---|
1008 | </phrase><phrase role="identifier"> |
---|
1009 | comment</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1010 | "[/"</phrase><phrase role="special"> >></phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="char"> ']'</phrase><phrase role="special">)</phrase><phrase role="special"> >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> |
---|
1011 | ;</phrase><phrase role="identifier"> |
---|
1012 | |
---|
1013 | hr</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1014 | str_p</phrase><phrase role="special">(</phrase><phrase role="string">"----"</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1015 | >></phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="identifier"> eol</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1016 | >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol</phrase><phrase role="special"> |
---|
1017 | ;</phrase><phrase role="identifier"> |
---|
1018 | |
---|
1019 | block_markup</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1020 | '['</phrase><phrase role="special"> |
---|
1021 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> begin_section</phrase><phrase role="special"> |
---|
1022 | |</phrase><phrase role="identifier"> end_section</phrase><phrase role="special"> |
---|
1023 | |</phrase><phrase role="identifier"> headings</phrase><phrase role="special"> |
---|
1024 | |</phrase><phrase role="identifier"> blurb</phrase><phrase role="special"> |
---|
1025 | |</phrase><phrase role="identifier"> blockquote</phrase><phrase role="special"> |
---|
1026 | |</phrase><phrase role="identifier"> preformatted</phrase><phrase role="special"> |
---|
1027 | |</phrase><phrase role="identifier"> def_macro</phrase><phrase role="special"> |
---|
1028 | |</phrase><phrase role="identifier"> table</phrase><phrase role="special"> |
---|
1029 | |</phrase><phrase role="identifier"> variablelist</phrase><phrase role="special"> |
---|
1030 | |</phrase><phrase role="identifier"> xinclude</phrase><phrase role="special"> |
---|
1031 | )</phrase><phrase role="special"> |
---|
1032 | >></phrase><phrase role="special"> (</phrase><phrase role="special"> (</phrase><phrase role="char">']'</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1033 | |</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special"> |
---|
1034 | )</phrase><phrase role="special"> |
---|
1035 | ;</phrase><phrase role="identifier"> |
---|
1036 | |
---|
1037 | begin_section</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1038 | "section"</phrase><phrase role="special"> |
---|
1039 | >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1040 | >></phrase><phrase role="special"> (</phrase><phrase role="char">':'</phrase><phrase role="special"> >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">alnum_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1041 | |</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special"> |
---|
1042 | )</phrase><phrase role="special"> |
---|
1043 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="identifier"> |
---|
1044 | close_bracket</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1045 | ;</phrase><phrase role="identifier"> |
---|
1046 | |
---|
1047 | end_section</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1048 | str_p</phrase><phrase role="special">(</phrase><phrase role="string">"endsect"</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1049 | ;</phrase><phrase role="identifier"> |
---|
1050 | |
---|
1051 | headings</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1052 | h1</phrase><phrase role="special"> |</phrase><phrase role="identifier"> h2</phrase><phrase role="special"> |</phrase><phrase role="identifier"> h3</phrase><phrase role="special"> |</phrase><phrase role="identifier"> h4</phrase><phrase role="special"> |</phrase><phrase role="identifier"> h5</phrase><phrase role="special"> |</phrase><phrase role="identifier"> h6</phrase><phrase role="special"> |
---|
1053 | ;</phrase><phrase role="identifier"> |
---|
1054 | |
---|
1055 | h1</phrase><phrase role="special"> =</phrase><phrase role="string"> "h1"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="identifier"> |
---|
1056 | h2</phrase><phrase role="special"> =</phrase><phrase role="string"> "h2"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="identifier"> |
---|
1057 | h3</phrase><phrase role="special"> =</phrase><phrase role="string"> "h3"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="identifier"> |
---|
1058 | h4</phrase><phrase role="special"> =</phrase><phrase role="string"> "h4"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="identifier"> |
---|
1059 | h5</phrase><phrase role="special"> =</phrase><phrase role="string"> "h5"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="identifier"> |
---|
1060 | h6</phrase><phrase role="special"> =</phrase><phrase role="string"> "h6"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="identifier"> |
---|
1061 | |
---|
1062 | blurb</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1063 | "blurb"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1064 | >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special"> |
---|
1065 | ;</phrase><phrase role="identifier"> |
---|
1066 | |
---|
1067 | blockquote</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1068 | ':'</phrase><phrase role="special"> >></phrase><phrase role="identifier"> blank</phrase><phrase role="special"> >></phrase><phrase role="identifier"> |
---|
1069 | phrase</phrase><phrase role="special"> |
---|
1070 | ;</phrase><phrase role="identifier"> |
---|
1071 | |
---|
1072 | preformatted</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1073 | "pre"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1074 | >></phrase><phrase role="special"> !</phrase><phrase role="identifier">eol</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special"> |
---|
1075 | >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special"> |
---|
1076 | ;</phrase><phrase role="identifier"> |
---|
1077 | |
---|
1078 | def_macro</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1079 | "def"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1080 | >></phrase><phrase role="identifier"> identifier</phrase><phrase role="special"> |
---|
1081 | >></phrase><phrase role="identifier"> blank</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special"> |
---|
1082 | ;</phrase><phrase role="identifier"> |
---|
1083 | |
---|
1084 | table</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1085 | "table"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1086 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="identifier"> eol</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1087 | >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol</phrase><phrase role="special"> |
---|
1088 | >></phrase><phrase role="special"> *</phrase><phrase role="identifier">table_row</phrase><phrase role="special"> |
---|
1089 | >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special"> |
---|
1090 | ;</phrase><phrase role="identifier"> |
---|
1091 | |
---|
1092 | table_row</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1093 | space</phrase><phrase role="special"> |
---|
1094 | >></phrase><phrase role="identifier"> ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'['</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1095 | >></phrase><phrase role="special"> |
---|
1096 | (</phrase><phrase role="special"> |
---|
1097 | (</phrase><phrase role="special"> |
---|
1098 | *</phrase><phrase role="identifier">table_cell</phrase><phrase role="special"> |
---|
1099 | >></phrase><phrase role="identifier"> ch_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1100 | >></phrase><phrase role="identifier"> space</phrase><phrase role="special"> |
---|
1101 | )</phrase><phrase role="special"> |
---|
1102 | |</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special"> |
---|
1103 | )</phrase><phrase role="special"> |
---|
1104 | ;</phrase><phrase role="identifier"> |
---|
1105 | |
---|
1106 | table_cell</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1107 | space</phrase><phrase role="special"> |
---|
1108 | >></phrase><phrase role="identifier"> ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'['</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1109 | >></phrase><phrase role="special"> |
---|
1110 | (</phrase><phrase role="special"> |
---|
1111 | (</phrase><phrase role="identifier"> |
---|
1112 | phrase</phrase><phrase role="special"> |
---|
1113 | >></phrase><phrase role="identifier"> ch_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1114 | >></phrase><phrase role="identifier"> space</phrase><phrase role="special"> |
---|
1115 | )</phrase><phrase role="special"> |
---|
1116 | |</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special"> |
---|
1117 | )</phrase><phrase role="special"> |
---|
1118 | ;</phrase><phrase role="identifier"> |
---|
1119 | |
---|
1120 | variablelist</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1121 | "variablelist"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1122 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="identifier"> eol</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1123 | >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol</phrase><phrase role="special"> |
---|
1124 | >></phrase><phrase role="special"> *</phrase><phrase role="identifier">varlistentry</phrase><phrase role="special"> |
---|
1125 | >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special"> |
---|
1126 | ;</phrase><phrase role="identifier"> |
---|
1127 | |
---|
1128 | varlistentry</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1129 | space</phrase><phrase role="special"> |
---|
1130 | >></phrase><phrase role="identifier"> ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'['</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1131 | >></phrase><phrase role="special"> |
---|
1132 | (</phrase><phrase role="special"> |
---|
1133 | (</phrase><phrase role="identifier"> |
---|
1134 | varlistterm</phrase><phrase role="special"> |
---|
1135 | >></phrase><phrase role="special"> +</phrase><phrase role="identifier">varlistitem</phrase><phrase role="special"> |
---|
1136 | >></phrase><phrase role="identifier"> ch_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1137 | >></phrase><phrase role="identifier"> space</phrase><phrase role="special"> |
---|
1138 | )</phrase><phrase role="special"> |
---|
1139 | |</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special"> |
---|
1140 | )</phrase><phrase role="special"> |
---|
1141 | ;</phrase><phrase role="identifier"> |
---|
1142 | |
---|
1143 | varlistterm</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1144 | space</phrase><phrase role="special"> |
---|
1145 | >></phrase><phrase role="identifier"> ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'['</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1146 | >></phrase><phrase role="special"> |
---|
1147 | (</phrase><phrase role="special"> |
---|
1148 | (</phrase><phrase role="identifier"> |
---|
1149 | phrase</phrase><phrase role="special"> |
---|
1150 | >></phrase><phrase role="identifier"> ch_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1151 | >></phrase><phrase role="identifier"> space</phrase><phrase role="special"> |
---|
1152 | )</phrase><phrase role="special"> |
---|
1153 | |</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special"> |
---|
1154 | )</phrase><phrase role="special"> |
---|
1155 | ;</phrase><phrase role="identifier"> |
---|
1156 | |
---|
1157 | varlistitem</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1158 | space</phrase><phrase role="special"> |
---|
1159 | >></phrase><phrase role="identifier"> ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'['</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1160 | >></phrase><phrase role="special"> |
---|
1161 | (</phrase><phrase role="special"> |
---|
1162 | (</phrase><phrase role="identifier"> |
---|
1163 | phrase</phrase><phrase role="special"> |
---|
1164 | >></phrase><phrase role="identifier"> ch_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1165 | >></phrase><phrase role="identifier"> space</phrase><phrase role="special"> |
---|
1166 | )</phrase><phrase role="special"> |
---|
1167 | |</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special"> |
---|
1168 | )</phrase><phrase role="special"> |
---|
1169 | ;</phrase><phrase role="identifier"> |
---|
1170 | |
---|
1171 | xinclude</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1172 | "xinclude"</phrase><phrase role="special"> |
---|
1173 | >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1174 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="identifier"> |
---|
1175 | close_bracket</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1176 | ;</phrase><phrase role="identifier"> |
---|
1177 | |
---|
1178 | identifier</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
1179 | *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> (</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="char"> ']'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1180 | ;</phrase><phrase role="identifier"> |
---|
1181 | |
---|
1182 | source_mode</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
1183 | (</phrase><phrase role="identifier"> |
---|
1184 | str_p</phrase><phrase role="special">(</phrase><phrase role="string">"c++"</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1185 | |</phrase><phrase role="string"> "python"</phrase><phrase role="special"> |
---|
1186 | )</phrase><phrase role="special"> |
---|
1187 | ;</phrase><phrase role="identifier"> |
---|
1188 | |
---|
1189 | code</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
1190 | (</phrase><phrase role="identifier"> |
---|
1191 | code_line</phrase><phrase role="special"> |
---|
1192 | >></phrase><phrase role="special"> *(*</phrase><phrase role="identifier">eol</phrase><phrase role="special"> >></phrase><phrase role="identifier"> code_line</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1193 | )</phrase><phrase role="special"> |
---|
1194 | >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol</phrase><phrase role="special"> |
---|
1195 | ;</phrase><phrase role="identifier"> |
---|
1196 | |
---|
1197 | code_line</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
1198 | ((</phrase><phrase role="identifier">ch_p</phrase><phrase role="special">(</phrase><phrase role="char">' '</phrase><phrase role="special">)</phrase><phrase role="special"> |</phrase><phrase role="char"> '\t'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1199 | >></phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="identifier"> eol</phrase><phrase role="special">)</phrase><phrase role="special"> >></phrase><phrase role="identifier"> eol</phrase><phrase role="special"> |
---|
1200 | ;</phrase><phrase role="identifier"> |
---|
1201 | |
---|
1202 | list</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1203 | eps_p</phrase><phrase role="special">(</phrase><phrase role="identifier">ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'*'</phrase><phrase role="special">)</phrase><phrase role="special"> |</phrase><phrase role="char"> '#'</phrase><phrase role="special">)</phrase><phrase role="special"> >></phrase><phrase role="special"> |
---|
1204 | +(</phrase><phrase role="special"> |
---|
1205 | (*</phrase><phrase role="identifier">blank_p</phrase><phrase role="special"> |
---|
1206 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier">ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'*'</phrase><phrase role="special">)</phrase><phrase role="special"> |</phrase><phrase role="char"> '#'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1207 | >></phrase><phrase role="special"> *</phrase><phrase role="identifier">blank_p</phrase><phrase role="special"> |
---|
1208 | >></phrase><phrase role="identifier"> list_item</phrase><phrase role="special"> |
---|
1209 | )</phrase><phrase role="special"> |
---|
1210 | ;</phrase><phrase role="identifier"> |
---|
1211 | |
---|
1212 | list_item</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
1213 | *(</phrase><phrase role="identifier"> common</phrase><phrase role="special"> |
---|
1214 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1215 | (</phrase><phrase role="identifier"> eol_p</phrase><phrase role="special"> >></phrase><phrase role="special"> *</phrase><phrase role="identifier">blank_p</phrase><phrase role="special"> >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="identifier">ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'*'</phrase><phrase role="special">)</phrase><phrase role="special"> |</phrase><phrase role="char"> '#'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1216 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">eol</phrase><phrase role="special"> >></phrase><phrase role="identifier"> eol</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1217 | )</phrase><phrase role="special"> |
---|
1218 | )</phrase><phrase role="special"> |
---|
1219 | )</phrase><phrase role="special"> |
---|
1220 | >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol</phrase><phrase role="special"> |
---|
1221 | ;</phrase><phrase role="identifier"> |
---|
1222 | |
---|
1223 | common</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1224 | self</phrase><phrase role="special">.</phrase><phrase role="identifier">actions</phrase><phrase role="special">.</phrase><phrase role="identifier">macro</phrase><phrase role="special"> |
---|
1225 | |</phrase><phrase role="identifier"> phrase_markup</phrase><phrase role="special"> |
---|
1226 | |</phrase><phrase role="identifier"> inline_code</phrase><phrase role="special"> |
---|
1227 | |</phrase><phrase role="identifier"> simple_format</phrase><phrase role="special"> |
---|
1228 | |</phrase><phrase role="identifier"> escape</phrase><phrase role="special"> |
---|
1229 | |</phrase><phrase role="identifier"> comment</phrase><phrase role="special"> |
---|
1230 | ;</phrase><phrase role="identifier"> |
---|
1231 | |
---|
1232 | inline_code</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1233 | '`'</phrase><phrase role="special"> >></phrase><phrase role="special"> |
---|
1234 | (</phrase><phrase role="special"> |
---|
1235 | *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1236 | (</phrase><phrase role="char"> '`'</phrase><phrase role="special"> |
---|
1237 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">eol</phrase><phrase role="special"> >></phrase><phrase role="identifier"> eol</phrase><phrase role="special">)</phrase><phrase role="comment"> // Make sure that we don't go |
---|
1238 | </phrase><phrase role="special"> )</phrase><phrase role="comment"> // past a single block |
---|
1239 | </phrase><phrase role="special"> )</phrase><phrase role="special"> >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">'`'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1240 | )</phrase><phrase role="special"> |
---|
1241 | >></phrase><phrase role="char"> '`'</phrase><phrase role="special"> |
---|
1242 | ;</phrase><phrase role="identifier"> |
---|
1243 | |
---|
1244 | simple_format</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1245 | simple_bold</phrase><phrase role="special"> |
---|
1246 | |</phrase><phrase role="identifier"> simple_italic</phrase><phrase role="special"> |
---|
1247 | |</phrase><phrase role="identifier"> simple_underline</phrase><phrase role="special"> |
---|
1248 | |</phrase><phrase role="identifier"> simple_teletype</phrase><phrase role="special"> |
---|
1249 | ;</phrase><phrase role="identifier"> |
---|
1250 | |
---|
1251 | simple_bold</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1252 | '*'</phrase><phrase role="special"> >></phrase><phrase role="special"> |
---|
1253 | (</phrase><phrase role="special"> |
---|
1254 | (</phrase><phrase role="identifier"> graph_p</phrase><phrase role="special"> >></phrase><phrase role="comment"> // graph_p must follow '*' |
---|
1255 | </phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1256 | (</phrase><phrase role="identifier"> eol</phrase><phrase role="comment"> // Make sure that we don't go |
---|
1257 | </phrase><phrase role="special"> |</phrase><phrase role="special"> (</phrase><phrase role="identifier">graph_p</phrase><phrase role="special"> >></phrase><phrase role="char"> '*'</phrase><phrase role="special">)</phrase><phrase role="comment"> // past a single line |
---|
1258 | </phrase><phrase role="special"> )</phrase><phrase role="special"> |
---|
1259 | )</phrase><phrase role="special"> >></phrase><phrase role="identifier"> graph_p</phrase><phrase role="comment"> // graph_p must precede '*' |
---|
1260 | </phrase><phrase role="special"> >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">'*'</phrase><phrase role="special"> |
---|
1261 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> punct_p</phrase><phrase role="special">))</phrase><phrase role="comment"> // space_p or punct_p must |
---|
1262 | </phrase><phrase role="special"> )</phrase><phrase role="comment"> // follow '*' |
---|
1263 | </phrase><phrase role="special"> |</phrase><phrase role="special"> (</phrase><phrase role="identifier"> |
---|
1264 | graph_p</phrase><phrase role="comment"> // A single char. e.g. *c* |
---|
1265 | </phrase><phrase role="special"> >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">'*'</phrase><phrase role="special"> |
---|
1266 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> punct_p</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1267 | )</phrase><phrase role="special"> |
---|
1268 | )</phrase><phrase role="special"> |
---|
1269 | >></phrase><phrase role="char"> '*'</phrase><phrase role="special"> |
---|
1270 | ;</phrase><phrase role="identifier"> |
---|
1271 | |
---|
1272 | simple_italic</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1273 | '/'</phrase><phrase role="special"> >></phrase><phrase role="special"> |
---|
1274 | (</phrase><phrase role="special"> |
---|
1275 | (</phrase><phrase role="identifier"> graph_p</phrase><phrase role="special"> >></phrase><phrase role="comment"> // graph_p must follow '/' |
---|
1276 | </phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1277 | (</phrase><phrase role="identifier"> eol</phrase><phrase role="comment"> // Make sure that we don't go |
---|
1278 | </phrase><phrase role="special"> |</phrase><phrase role="special"> (</phrase><phrase role="identifier">graph_p</phrase><phrase role="special"> >></phrase><phrase role="char"> '/'</phrase><phrase role="special">)</phrase><phrase role="comment"> // past a single line |
---|
1279 | </phrase><phrase role="special"> )</phrase><phrase role="special"> |
---|
1280 | )</phrase><phrase role="special"> >></phrase><phrase role="identifier"> graph_p</phrase><phrase role="comment"> // graph_p must precede '/' |
---|
1281 | </phrase><phrase role="special"> >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">'/'</phrase><phrase role="special"> |
---|
1282 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> punct_p</phrase><phrase role="special">))</phrase><phrase role="comment"> // space_p or punct_p must |
---|
1283 | </phrase><phrase role="special"> )</phrase><phrase role="comment"> // follow '/' |
---|
1284 | </phrase><phrase role="special"> |</phrase><phrase role="special"> (</phrase><phrase role="identifier"> |
---|
1285 | graph_p</phrase><phrase role="comment"> // A single char. e.g. /c/ |
---|
1286 | </phrase><phrase role="special"> >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">'/'</phrase><phrase role="special"> |
---|
1287 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> punct_p</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1288 | )</phrase><phrase role="special"> |
---|
1289 | )</phrase><phrase role="special"> |
---|
1290 | >></phrase><phrase role="char"> '/'</phrase><phrase role="special"> |
---|
1291 | ;</phrase><phrase role="identifier"> |
---|
1292 | |
---|
1293 | simple_underline</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1294 | '_'</phrase><phrase role="special"> >></phrase><phrase role="special"> |
---|
1295 | (</phrase><phrase role="special"> |
---|
1296 | (</phrase><phrase role="identifier"> graph_p</phrase><phrase role="special"> >></phrase><phrase role="comment"> // graph_p must follow '_' |
---|
1297 | </phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1298 | (</phrase><phrase role="identifier"> eol</phrase><phrase role="comment"> // Make sure that we don't go |
---|
1299 | </phrase><phrase role="special"> |</phrase><phrase role="special"> (</phrase><phrase role="identifier">graph_p</phrase><phrase role="special"> >></phrase><phrase role="char"> '_'</phrase><phrase role="special">)</phrase><phrase role="comment"> // past a single line |
---|
1300 | </phrase><phrase role="special"> )</phrase><phrase role="special"> |
---|
1301 | )</phrase><phrase role="special"> >></phrase><phrase role="identifier"> graph_p</phrase><phrase role="comment"> // graph_p must precede '_' |
---|
1302 | </phrase><phrase role="special"> >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">'_'</phrase><phrase role="special"> |
---|
1303 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> punct_p</phrase><phrase role="special">))</phrase><phrase role="comment"> // space_p or punct_p must |
---|
1304 | </phrase><phrase role="special"> )</phrase><phrase role="comment"> // follow '_' |
---|
1305 | </phrase><phrase role="special"> |</phrase><phrase role="special"> (</phrase><phrase role="identifier"> |
---|
1306 | graph_p</phrase><phrase role="comment"> // A single char. e.g. _c_ |
---|
1307 | </phrase><phrase role="special"> >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">'_'</phrase><phrase role="special"> |
---|
1308 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> punct_p</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1309 | )</phrase><phrase role="special"> |
---|
1310 | )</phrase><phrase role="special"> |
---|
1311 | >></phrase><phrase role="char"> '_'</phrase><phrase role="special"> |
---|
1312 | ;</phrase><phrase role="identifier"> |
---|
1313 | |
---|
1314 | simple_teletype</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1315 | '='</phrase><phrase role="special"> >></phrase><phrase role="special"> |
---|
1316 | (</phrase><phrase role="special"> |
---|
1317 | (</phrase><phrase role="identifier"> graph_p</phrase><phrase role="special"> >></phrase><phrase role="comment"> // graph_p must follow '=' |
---|
1318 | </phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1319 | (</phrase><phrase role="identifier"> eol</phrase><phrase role="comment"> // Make sure that we don't go |
---|
1320 | </phrase><phrase role="special"> |</phrase><phrase role="special"> (</phrase><phrase role="identifier">graph_p</phrase><phrase role="special"> >></phrase><phrase role="char"> '='</phrase><phrase role="special">)</phrase><phrase role="comment"> // past a single line |
---|
1321 | </phrase><phrase role="special"> )</phrase><phrase role="special"> |
---|
1322 | )</phrase><phrase role="special"> >></phrase><phrase role="identifier"> graph_p</phrase><phrase role="comment"> // graph_p must precede '=' |
---|
1323 | </phrase><phrase role="special"> >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">'='</phrase><phrase role="special"> |
---|
1324 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> punct_p</phrase><phrase role="special">))</phrase><phrase role="comment"> // space_p or punct_p must |
---|
1325 | </phrase><phrase role="special"> )</phrase><phrase role="comment"> // follow '=' |
---|
1326 | </phrase><phrase role="special"> |</phrase><phrase role="special"> (</phrase><phrase role="identifier"> |
---|
1327 | graph_p</phrase><phrase role="comment"> // A single char. e.g. =c= |
---|
1328 | </phrase><phrase role="special"> >></phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">'='</phrase><phrase role="special"> |
---|
1329 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> |</phrase><phrase role="identifier"> punct_p</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1330 | )</phrase><phrase role="special"> |
---|
1331 | )</phrase><phrase role="special"> |
---|
1332 | >></phrase><phrase role="char"> '='</phrase><phrase role="special"> |
---|
1333 | ;</phrase><phrase role="identifier"> |
---|
1334 | |
---|
1335 | paragraph</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
1336 | *(</phrase><phrase role="identifier"> common</phrase><phrase role="special"> |
---|
1337 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="comment"> // Make sure we don't go past |
---|
1338 | </phrase><phrase role="special"> (</phrase><phrase role="identifier">eol</phrase><phrase role="special"> >></phrase><phrase role="identifier"> eol</phrase><phrase role="special">)</phrase><phrase role="comment"> // a single block. |
---|
1339 | </phrase><phrase role="special"> )</phrase><phrase role="special"> |
---|
1340 | )</phrase><phrase role="special"> |
---|
1341 | >></phrase><phrase role="special"> +</phrase><phrase role="identifier">eol</phrase><phrase role="special"> |
---|
1342 | ;</phrase><phrase role="identifier"> |
---|
1343 | |
---|
1344 | phrase</phrase><phrase role="special"> =</phrase><phrase role="special"> |
---|
1345 | *(</phrase><phrase role="identifier"> common</phrase><phrase role="special"> |
---|
1346 | |</phrase><phrase role="identifier"> comment</phrase><phrase role="special"> |
---|
1347 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="identifier"> |
---|
1348 | close_bracket</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1349 | )</phrase><phrase role="special"> |
---|
1350 | ;</phrase><phrase role="identifier"> |
---|
1351 | |
---|
1352 | phrase_markup</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1353 | '['</phrase><phrase role="special"> |
---|
1354 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> image</phrase><phrase role="special"> |
---|
1355 | |</phrase><phrase role="identifier"> url</phrase><phrase role="special"> |
---|
1356 | |</phrase><phrase role="identifier"> link</phrase><phrase role="special"> |
---|
1357 | |</phrase><phrase role="identifier"> anchor</phrase><phrase role="special"> |
---|
1358 | |</phrase><phrase role="identifier"> source_mode</phrase><phrase role="special"> |
---|
1359 | |</phrase><phrase role="identifier"> funcref</phrase><phrase role="special"> |
---|
1360 | |</phrase><phrase role="identifier"> classref</phrase><phrase role="special"> |
---|
1361 | |</phrase><phrase role="identifier"> memberref</phrase><phrase role="special"> |
---|
1362 | |</phrase><phrase role="identifier"> enumref</phrase><phrase role="special"> |
---|
1363 | |</phrase><phrase role="identifier"> headerref</phrase><phrase role="special"> |
---|
1364 | |</phrase><phrase role="identifier"> bold</phrase><phrase role="special"> |
---|
1365 | |</phrase><phrase role="identifier"> italic</phrase><phrase role="special"> |
---|
1366 | |</phrase><phrase role="identifier"> underline</phrase><phrase role="special"> |
---|
1367 | |</phrase><phrase role="identifier"> teletype</phrase><phrase role="special"> |
---|
1368 | |</phrase><phrase role="identifier"> str_p</phrase><phrase role="special">(</phrase><phrase role="string">"br"</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1369 | )</phrase><phrase role="special"> |
---|
1370 | >></phrase><phrase role="char"> ']'</phrase><phrase role="special"> |
---|
1371 | ;</phrase><phrase role="identifier"> |
---|
1372 | |
---|
1373 | escape</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1374 | str_p</phrase><phrase role="special">(</phrase><phrase role="string">"\\n"</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1375 | |</phrase><phrase role="char"> '\\'</phrase><phrase role="special"> >></phrase><phrase role="identifier"> punct_p</phrase><phrase role="special"> |
---|
1376 | |</phrase><phrase role="special"> (</phrase><phrase role="string"> |
---|
1377 | "'''"</phrase><phrase role="special"> >></phrase><phrase role="special"> !</phrase><phrase role="identifier">eol</phrase><phrase role="special"> |
---|
1378 | >></phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="string"> "'''"</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1379 | >></phrase><phrase role="string"> "'''"</phrase><phrase role="special"> |
---|
1380 | )</phrase><phrase role="special"> |
---|
1381 | ;</phrase><phrase role="identifier"> |
---|
1382 | |
---|
1383 | image</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1384 | '$'</phrase><phrase role="special"> >></phrase><phrase role="identifier"> blank</phrase><phrase role="special"> |
---|
1385 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="identifier"> |
---|
1386 | close_bracket</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1387 | ;</phrase><phrase role="identifier"> |
---|
1388 | |
---|
1389 | url</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1390 | '@'</phrase><phrase role="special"> |
---|
1391 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1392 | (</phrase><phrase role="char">']'</phrase><phrase role="special"> |</phrase><phrase role="identifier"> hard_space</phrase><phrase role="special">)))</phrase><phrase role="special"> |
---|
1393 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1394 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1395 | )</phrase><phrase role="special"> |
---|
1396 | ;</phrase><phrase role="identifier"> |
---|
1397 | |
---|
1398 | link</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1399 | "link"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1400 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1401 | (</phrase><phrase role="char">']'</phrase><phrase role="special"> |</phrase><phrase role="identifier"> hard_space</phrase><phrase role="special">)))</phrase><phrase role="special"> |
---|
1402 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1403 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1404 | )</phrase><phrase role="special"> |
---|
1405 | ;</phrase><phrase role="identifier"> |
---|
1406 | |
---|
1407 | anchor</phrase><phrase role="special"> =</phrase><phrase role="char"> |
---|
1408 | '#'</phrase><phrase role="special"> |
---|
1409 | >></phrase><phrase role="identifier"> blank</phrase><phrase role="special"> |
---|
1410 | >></phrase><phrase role="special"> (</phrase><phrase role="special"> *(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="identifier"> |
---|
1411 | close_bracket</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1412 | )</phrase><phrase role="special"> |
---|
1413 | ;</phrase><phrase role="identifier"> |
---|
1414 | |
---|
1415 | funcref</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1416 | "funcref"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1417 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1418 | (</phrase><phrase role="char">']'</phrase><phrase role="special"> |</phrase><phrase role="identifier"> hard_space</phrase><phrase role="special">)))</phrase><phrase role="special"> |
---|
1419 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1420 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1421 | )</phrase><phrase role="special"> |
---|
1422 | ;</phrase><phrase role="identifier"> |
---|
1423 | |
---|
1424 | classref</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1425 | "classref"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1426 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1427 | (</phrase><phrase role="char">']'</phrase><phrase role="special"> |</phrase><phrase role="identifier"> hard_space</phrase><phrase role="special">)))</phrase><phrase role="special"> |
---|
1428 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1429 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1430 | )</phrase><phrase role="special"> |
---|
1431 | ;</phrase><phrase role="identifier"> |
---|
1432 | |
---|
1433 | memberref</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1434 | "memberref"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1435 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1436 | (</phrase><phrase role="char">']'</phrase><phrase role="special"> |</phrase><phrase role="identifier"> hard_space</phrase><phrase role="special">)))</phrase><phrase role="special"> |
---|
1437 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1438 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1439 | )</phrase><phrase role="special"> |
---|
1440 | ;</phrase><phrase role="identifier"> |
---|
1441 | |
---|
1442 | enumref</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1443 | "enumref"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1444 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1445 | (</phrase><phrase role="char">']'</phrase><phrase role="special"> |</phrase><phrase role="identifier"> hard_space</phrase><phrase role="special">)))</phrase><phrase role="special"> |
---|
1446 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1447 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1448 | )</phrase><phrase role="special"> |
---|
1449 | ;</phrase><phrase role="identifier"> |
---|
1450 | |
---|
1451 | headerref</phrase><phrase role="special"> =</phrase><phrase role="string"> |
---|
1452 | "headerref"</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hard_space</phrase><phrase role="special"> |
---|
1453 | >></phrase><phrase role="special"> (*(</phrase><phrase role="identifier">anychar_p</phrase><phrase role="special"> -</phrase><phrase role="special"> |
---|
1454 | (</phrase><phrase role="char">']'</phrase><phrase role="special"> |</phrase><phrase role="identifier"> hard_space</phrase><phrase role="special">)))</phrase><phrase role="special"> |
---|
1455 | >></phrase><phrase role="special"> (</phrase><phrase role="identifier"> eps_p</phrase><phrase role="special">(</phrase><phrase role="char">']'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1456 | |</phrase><phrase role="special"> (</phrase><phrase role="identifier">hard_space</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1457 | )</phrase><phrase role="special"> |
---|
1458 | ;</phrase><phrase role="identifier"> |
---|
1459 | |
---|
1460 | bold</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1461 | ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'*'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1462 | >></phrase><phrase role="identifier"> blank</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special"> |
---|
1463 | ;</phrase><phrase role="identifier"> |
---|
1464 | |
---|
1465 | italic</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1466 | ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'\''</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1467 | >></phrase><phrase role="identifier"> blank</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special"> |
---|
1468 | ;</phrase><phrase role="identifier"> |
---|
1469 | |
---|
1470 | underline</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1471 | ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'_'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1472 | >></phrase><phrase role="identifier"> blank</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special"> |
---|
1473 | ;</phrase><phrase role="identifier"> |
---|
1474 | |
---|
1475 | teletype</phrase><phrase role="special"> =</phrase><phrase role="identifier"> |
---|
1476 | ch_p</phrase><phrase role="special">(</phrase><phrase role="char">'^'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1477 | >></phrase><phrase role="identifier"> blank</phrase><phrase role="special"> >></phrase><phrase role="identifier"> phrase</phrase><phrase role="special"> |
---|
1478 | ;</phrase> |
---|
1479 | </literal> |
---|
1480 | </programlisting> |
---|
1481 | </section> |
---|
1482 | <section id="quickbook.highlight"> |
---|
1483 | <title> C++ Syntax Highlighting Grammar</title> |
---|
1484 | <programlisting> |
---|
1485 | <literal> |
---|
1486 | <phrase role="identifier">program</phrase><phrase role="special"> |
---|
1487 | =</phrase><phrase role="special"> |
---|
1488 | *(</phrase><phrase role="identifier"> macro</phrase><phrase role="special"> |
---|
1489 | |</phrase><phrase role="identifier"> preprocessor</phrase><phrase role="special"> |
---|
1490 | |</phrase><phrase role="identifier"> comment</phrase><phrase role="special"> |
---|
1491 | |</phrase><phrase role="identifier"> keyword</phrase><phrase role="special"> |
---|
1492 | |</phrase><phrase role="identifier"> identifier</phrase><phrase role="special"> |
---|
1493 | |</phrase><phrase role="identifier"> special</phrase><phrase role="special"> |
---|
1494 | |</phrase><phrase role="identifier"> string_</phrase><phrase role="special"> |
---|
1495 | |</phrase><phrase role="identifier"> char_</phrase><phrase role="special"> |
---|
1496 | |</phrase><phrase role="identifier"> number</phrase><phrase role="special"> |
---|
1497 | |</phrase><phrase role="identifier"> space_p</phrase><phrase role="special"> |
---|
1498 | |</phrase><phrase role="identifier"> anychar_p</phrase><phrase role="special"> |
---|
1499 | )</phrase><phrase role="special"> |
---|
1500 | ;</phrase><phrase role="identifier"> |
---|
1501 | |
---|
1502 | macro</phrase><phrase role="special"> |
---|
1503 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="identifier"> self</phrase><phrase role="special">.</phrase><phrase role="identifier">macro</phrase><phrase role="special"> |
---|
1504 | ;</phrase><phrase role="identifier"> |
---|
1505 | |
---|
1506 | preprocessor</phrase><phrase role="special"> |
---|
1507 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="char"> '#'</phrase><phrase role="special"> >></phrase><phrase role="special"> ((</phrase><phrase role="identifier">alpha_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">)</phrase><phrase role="special"> >></phrase><phrase role="special"> *(</phrase><phrase role="identifier">alnum_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1508 | ;</phrase><phrase role="identifier"> |
---|
1509 | |
---|
1510 | comment</phrase><phrase role="special"> |
---|
1511 | =</phrase><phrase role="special"> +(*</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="special"> (</phrase><phrase role="identifier">comment_p</phrase><phrase role="special">(</phrase><phrase role="string">"//"</phrase><phrase role="special">)</phrase><phrase role="special"> |</phrase><phrase role="identifier"> comment_p</phrase><phrase role="special">(</phrase><phrase role="string">"/*"</phrase><phrase role="special">,</phrase><phrase role="string"> "*/"</phrase><phrase role="special">)))</phrase><phrase role="special"> |
---|
1512 | ;</phrase><phrase role="identifier"> |
---|
1513 | |
---|
1514 | keyword</phrase><phrase role="special"> |
---|
1515 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="identifier"> keyword_</phrase><phrase role="special"> >></phrase><phrase role="special"> (</phrase><phrase role="identifier">eps_p</phrase><phrase role="special"> -</phrase><phrase role="special"> (</phrase><phrase role="identifier">alnum_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1516 | ;</phrase><phrase role="comment"> // make sure we recognize whole words only |
---|
1517 | </phrase><phrase role="identifier"> |
---|
1518 | keyword_</phrase><phrase role="special"> |
---|
1519 | =</phrase><phrase role="string"> "and_eq"</phrase><phrase role="special">,</phrase><phrase role="string"> "and"</phrase><phrase role="special">,</phrase><phrase role="string"> "asm"</phrase><phrase role="special">,</phrase><phrase role="string"> "auto"</phrase><phrase role="special">,</phrase><phrase role="string"> "bitand"</phrase><phrase role="special">,</phrase><phrase role="string"> "bitor"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1520 | "bool"</phrase><phrase role="special">,</phrase><phrase role="string"> "break"</phrase><phrase role="special">,</phrase><phrase role="string"> "case"</phrase><phrase role="special">,</phrase><phrase role="string"> "catch"</phrase><phrase role="special">,</phrase><phrase role="string"> "char"</phrase><phrase role="special">,</phrase><phrase role="string"> "class"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1521 | "compl"</phrase><phrase role="special">,</phrase><phrase role="string"> "const_cast"</phrase><phrase role="special">,</phrase><phrase role="string"> "const"</phrase><phrase role="special">,</phrase><phrase role="string"> "continue"</phrase><phrase role="special">,</phrase><phrase role="string"> "default"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1522 | "delete"</phrase><phrase role="special">,</phrase><phrase role="string"> "do"</phrase><phrase role="special">,</phrase><phrase role="string"> "double"</phrase><phrase role="special">,</phrase><phrase role="string"> "dynamic_cast"</phrase><phrase role="special">,</phrase><phrase role="string"> "else"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1523 | "enum"</phrase><phrase role="special">,</phrase><phrase role="string"> "explicit"</phrase><phrase role="special">,</phrase><phrase role="string"> "export"</phrase><phrase role="special">,</phrase><phrase role="string"> "extern"</phrase><phrase role="special">,</phrase><phrase role="string"> "false"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1524 | "float"</phrase><phrase role="special">,</phrase><phrase role="string"> "for"</phrase><phrase role="special">,</phrase><phrase role="string"> "friend"</phrase><phrase role="special">,</phrase><phrase role="string"> "goto"</phrase><phrase role="special">,</phrase><phrase role="string"> "if"</phrase><phrase role="special">,</phrase><phrase role="string"> "inline"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1525 | "int"</phrase><phrase role="special">,</phrase><phrase role="string"> "long"</phrase><phrase role="special">,</phrase><phrase role="string"> "mutable"</phrase><phrase role="special">,</phrase><phrase role="string"> "namespace"</phrase><phrase role="special">,</phrase><phrase role="string"> "new"</phrase><phrase role="special">,</phrase><phrase role="string"> "not_eq"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1526 | "not"</phrase><phrase role="special">,</phrase><phrase role="string"> "operator"</phrase><phrase role="special">,</phrase><phrase role="string"> "or_eq"</phrase><phrase role="special">,</phrase><phrase role="string"> "or"</phrase><phrase role="special">,</phrase><phrase role="string"> "private"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1527 | "protected"</phrase><phrase role="special">,</phrase><phrase role="string"> "public"</phrase><phrase role="special">,</phrase><phrase role="string"> "register"</phrase><phrase role="special">,</phrase><phrase role="string"> "reinterpret_cast"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1528 | "return"</phrase><phrase role="special">,</phrase><phrase role="string"> "short"</phrase><phrase role="special">,</phrase><phrase role="string"> "signed"</phrase><phrase role="special">,</phrase><phrase role="string"> "sizeof"</phrase><phrase role="special">,</phrase><phrase role="string"> "static"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1529 | "static_cast"</phrase><phrase role="special">,</phrase><phrase role="string"> "struct"</phrase><phrase role="special">,</phrase><phrase role="string"> "switch"</phrase><phrase role="special">,</phrase><phrase role="string"> "template"</phrase><phrase role="special">,</phrase><phrase role="string"> "this"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1530 | "throw"</phrase><phrase role="special">,</phrase><phrase role="string"> "true"</phrase><phrase role="special">,</phrase><phrase role="string"> "try"</phrase><phrase role="special">,</phrase><phrase role="string"> "typedef"</phrase><phrase role="special">,</phrase><phrase role="string"> "typeid"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1531 | "typename"</phrase><phrase role="special">,</phrase><phrase role="string"> "union"</phrase><phrase role="special">,</phrase><phrase role="string"> "unsigned"</phrase><phrase role="special">,</phrase><phrase role="string"> "using"</phrase><phrase role="special">,</phrase><phrase role="string"> "virtual"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1532 | "void"</phrase><phrase role="special">,</phrase><phrase role="string"> "volatile"</phrase><phrase role="special">,</phrase><phrase role="string"> "wchar_t"</phrase><phrase role="special">,</phrase><phrase role="string"> "while"</phrase><phrase role="special">,</phrase><phrase role="string"> "xor_eq"</phrase><phrase role="special">,</phrase><phrase role="string"> "xor"</phrase><phrase role="special"> |
---|
1533 | ;</phrase><phrase role="identifier"> |
---|
1534 | |
---|
1535 | special</phrase><phrase role="special"> |
---|
1536 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">chset_p</phrase><phrase role="special">(</phrase><phrase role="string">"~!%^&*()+={[}]:;,<.>?/|\\-"</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1537 | ;</phrase><phrase role="identifier"> |
---|
1538 | |
---|
1539 | string_</phrase><phrase role="special"> |
---|
1540 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="special"> !</phrase><phrase role="identifier">as_lower_d</phrase><phrase role="special">[</phrase><phrase role="char">'l'</phrase><phrase role="special">]</phrase><phrase role="special"> >></phrase><phrase role="identifier"> confix_p</phrase><phrase role="special">(</phrase><phrase role="char">'"'</phrase><phrase role="special">,</phrase><phrase role="special"> *</phrase><phrase role="identifier">c_escape_ch_p</phrase><phrase role="special">,</phrase><phrase role="char"> '"'</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1541 | ;</phrase><phrase role="identifier"> |
---|
1542 | |
---|
1543 | char_</phrase><phrase role="special"> |
---|
1544 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="special"> !</phrase><phrase role="identifier">as_lower_d</phrase><phrase role="special">[</phrase><phrase role="char">'l'</phrase><phrase role="special">]</phrase><phrase role="special"> >></phrase><phrase role="identifier"> confix_p</phrase><phrase role="special">(</phrase><phrase role="char">'\''</phrase><phrase role="special">,</phrase><phrase role="special"> *</phrase><phrase role="identifier">c_escape_ch_p</phrase><phrase role="special">,</phrase><phrase role="char"> '\''</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1545 | ;</phrase><phrase role="identifier"> |
---|
1546 | |
---|
1547 | number</phrase><phrase role="special"> |
---|
1548 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="special"> |
---|
1549 | (</phrase><phrase role="identifier"> as_lower_d</phrase><phrase role="special">[</phrase><phrase role="string">"0x"</phrase><phrase role="special">]</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hex_p</phrase><phrase role="special"> |
---|
1550 | |</phrase><phrase role="char"> '0'</phrase><phrase role="special"> >></phrase><phrase role="identifier"> oct_p</phrase><phrase role="special"> |
---|
1551 | |</phrase><phrase role="identifier"> real_p</phrase><phrase role="special"> |
---|
1552 | )</phrase><phrase role="special"> |
---|
1553 | >></phrase><phrase role="special"> *</phrase><phrase role="identifier">as_lower_d</phrase><phrase role="special">[</phrase><phrase role="identifier">chset_p</phrase><phrase role="special">(</phrase><phrase role="string">"ldfu"</phrase><phrase role="special">)]</phrase><phrase role="special"> |
---|
1554 | ;</phrase><phrase role="identifier"> |
---|
1555 | |
---|
1556 | identifier</phrase><phrase role="special"> |
---|
1557 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="special"> ((</phrase><phrase role="identifier">alpha_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">)</phrase><phrase role="special"> >></phrase><phrase role="special"> *(</phrase><phrase role="identifier">alnum_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1558 | ;</phrase> |
---|
1559 | </literal> |
---|
1560 | </programlisting> |
---|
1561 | </section> |
---|
1562 | <section id="quickbook.pyhighlight"> |
---|
1563 | <title> Python Syntax Highlighting Grammar</title> |
---|
1564 | <para> |
---|
1565 | </para> |
---|
1566 | <programlisting> |
---|
1567 | <literal> |
---|
1568 | <phrase role="identifier">program</phrase><phrase role="special"> |
---|
1569 | =</phrase><phrase role="special"> |
---|
1570 | *(</phrase><phrase role="identifier"> macro</phrase><phrase role="special"> |
---|
1571 | |</phrase><phrase role="identifier"> comment</phrase><phrase role="special"> |
---|
1572 | |</phrase><phrase role="identifier"> keyword</phrase><phrase role="special"> |
---|
1573 | |</phrase><phrase role="identifier"> identifier</phrase><phrase role="special"> |
---|
1574 | |</phrase><phrase role="identifier"> special</phrase><phrase role="special"> |
---|
1575 | |</phrase><phrase role="identifier"> string_</phrase><phrase role="special"> |
---|
1576 | |</phrase><phrase role="identifier"> number</phrase><phrase role="special"> |
---|
1577 | |</phrase><phrase role="identifier"> space_p</phrase><phrase role="special"> |
---|
1578 | |</phrase><phrase role="identifier"> anychar_p</phrase><phrase role="special"> |
---|
1579 | )</phrase><phrase role="special"> |
---|
1580 | ;</phrase><phrase role="identifier"> |
---|
1581 | |
---|
1582 | acro</phrase><phrase role="special"> |
---|
1583 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="identifier"> self</phrase><phrase role="special">.</phrase><phrase role="identifier">macro</phrase><phrase role="special"> |
---|
1584 | ;</phrase><phrase role="identifier"> |
---|
1585 | |
---|
1586 | comment</phrase><phrase role="special"> |
---|
1587 | =</phrase><phrase role="special"> +(*</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="identifier"> comment_p</phrase><phrase role="special">(</phrase><phrase role="string">"#"</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1588 | ;</phrase><phrase role="identifier"> |
---|
1589 | |
---|
1590 | keyword</phrase><phrase role="special"> |
---|
1591 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="identifier"> keyword_</phrase><phrase role="special"> >></phrase><phrase role="special"> (</phrase><phrase role="identifier">eps_p</phrase><phrase role="special"> -</phrase><phrase role="special"> (</phrase><phrase role="identifier">alnum_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1592 | ;</phrase><phrase role="comment"> // make sure we recognize whole words only |
---|
1593 | </phrase><phrase role="identifier"> |
---|
1594 | keyword_</phrase><phrase role="special"> |
---|
1595 | =</phrase><phrase role="string"> |
---|
1596 | "and"</phrase><phrase role="special">,</phrase><phrase role="string"> "del"</phrase><phrase role="special">,</phrase><phrase role="string"> "for"</phrase><phrase role="special">,</phrase><phrase role="string"> "is"</phrase><phrase role="special">,</phrase><phrase role="string"> "raise"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1597 | "assert"</phrase><phrase role="special">,</phrase><phrase role="string"> "elif"</phrase><phrase role="special">,</phrase><phrase role="string"> "from"</phrase><phrase role="special">,</phrase><phrase role="string"> "lambda"</phrase><phrase role="special">,</phrase><phrase role="string"> "return"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1598 | "break"</phrase><phrase role="special">,</phrase><phrase role="string"> "else"</phrase><phrase role="special">,</phrase><phrase role="string"> "global"</phrase><phrase role="special">,</phrase><phrase role="string"> "not"</phrase><phrase role="special">,</phrase><phrase role="string"> "try"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1599 | "class"</phrase><phrase role="special">,</phrase><phrase role="string"> "except"</phrase><phrase role="special">,</phrase><phrase role="string"> "if"</phrase><phrase role="special">,</phrase><phrase role="string"> "or"</phrase><phrase role="special">,</phrase><phrase role="string"> "while"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1600 | "continue"</phrase><phrase role="special">,</phrase><phrase role="string"> "exec"</phrase><phrase role="special">,</phrase><phrase role="string"> "import"</phrase><phrase role="special">,</phrase><phrase role="string"> "pass"</phrase><phrase role="special">,</phrase><phrase role="string"> "yield"</phrase><phrase role="special">,</phrase><phrase role="string"> |
---|
1601 | "def"</phrase><phrase role="special">,</phrase><phrase role="string"> "finally"</phrase><phrase role="special">,</phrase><phrase role="string"> "in"</phrase><phrase role="special">,</phrase><phrase role="string"> "print"</phrase><phrase role="special">,</phrase><phrase role="comment"> |
---|
1602 | |
---|
1603 | // Technically "as" and "None" are not yet keywords (at Python |
---|
1604 | // 2.4). They are destined to become keywords, and we treat them |
---|
1605 | // as such for syntax highlighting purposes. |
---|
1606 | </phrase><phrase role="string"> |
---|
1607 | "as"</phrase><phrase role="special">,</phrase><phrase role="string"> "None"</phrase><phrase role="special"> |
---|
1608 | ;</phrase><phrase role="identifier"> |
---|
1609 | |
---|
1610 | special</phrase><phrase role="special"> |
---|
1611 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="special"> +</phrase><phrase role="identifier">chset_p</phrase><phrase role="special">(</phrase><phrase role="string">"~!%^&*()+={[}]:;,<.>/|\\-"</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1612 | ;</phrase><phrase role="identifier"> |
---|
1613 | |
---|
1614 | string_prefix</phrase><phrase role="special"> |
---|
1615 | =</phrase><phrase role="identifier"> as_lower_d</phrase><phrase role="special">[</phrase><phrase role="identifier">str_p</phrase><phrase role="special">(</phrase><phrase role="string">"u"</phrase><phrase role="special">)</phrase><phrase role="special"> >></phrase><phrase role="special"> !</phrase><phrase role="identifier"> str_p</phrase><phrase role="special">(</phrase><phrase role="string">"r"</phrase><phrase role="special">)]</phrase><phrase role="special"> |
---|
1616 | ;</phrase><phrase role="identifier"> |
---|
1617 | |
---|
1618 | string_</phrase><phrase role="special"> |
---|
1619 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="special"> !</phrase><phrase role="identifier"> string_prefix</phrase><phrase role="special"> >></phrase><phrase role="special"> (</phrase><phrase role="identifier">long_string</phrase><phrase role="special"> |</phrase><phrase role="identifier"> short_string</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1620 | ;</phrase><phrase role="identifier"> |
---|
1621 | |
---|
1622 | short_string</phrase><phrase role="special"> |
---|
1623 | =</phrase><phrase role="identifier"> confix_p</phrase><phrase role="special">(</phrase><phrase role="char">'"'</phrase><phrase role="special">,</phrase><phrase role="special"> *</phrase><phrase role="identifier"> c_escape_ch_p</phrase><phrase role="special">,</phrase><phrase role="char"> '"'</phrase><phrase role="special">)</phrase><phrase role="special"> |</phrase><phrase role="identifier"> |
---|
1624 | confix_p</phrase><phrase role="special">(</phrase><phrase role="char">'\''</phrase><phrase role="special">,</phrase><phrase role="special"> *</phrase><phrase role="identifier"> c_escape_ch_p</phrase><phrase role="special">,</phrase><phrase role="char"> '\''</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1625 | ;</phrase><phrase role="identifier"> |
---|
1626 | |
---|
1627 | long_string</phrase><phrase role="special"> |
---|
1628 | =</phrase><phrase role="identifier"> confix_p</phrase><phrase role="special">(</phrase><phrase role="string">"'''"</phrase><phrase role="special">,</phrase><phrase role="special"> *</phrase><phrase role="identifier"> lex_escape_ch_p</phrase><phrase role="special">,</phrase><phrase role="string"> "'''"</phrase><phrase role="special">)</phrase><phrase role="special"> |</phrase><phrase role="identifier"> |
---|
1629 | confix_p</phrase><phrase role="special">(</phrase><phrase role="string">"\"\"\""</phrase><phrase role="special">,</phrase><phrase role="special"> *</phrase><phrase role="identifier"> lex_escape_ch_p</phrase><phrase role="special">,</phrase><phrase role="string"> "\"\"\""</phrase><phrase role="special">)</phrase><phrase role="special"> |
---|
1630 | ;</phrase><phrase role="identifier"> |
---|
1631 | |
---|
1632 | number</phrase><phrase role="special"> |
---|
1633 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="special"> |
---|
1634 | (</phrase><phrase role="identifier"> |
---|
1635 | as_lower_d</phrase><phrase role="special">[</phrase><phrase role="string">"0x"</phrase><phrase role="special">]</phrase><phrase role="special"> >></phrase><phrase role="identifier"> hex_p</phrase><phrase role="special"> |
---|
1636 | |</phrase><phrase role="char"> '0'</phrase><phrase role="special"> >></phrase><phrase role="identifier"> oct_p</phrase><phrase role="special"> |
---|
1637 | |</phrase><phrase role="identifier"> real_p</phrase><phrase role="special"> |
---|
1638 | )</phrase><phrase role="special"> |
---|
1639 | >></phrase><phrase role="special"> *</phrase><phrase role="identifier">as_lower_d</phrase><phrase role="special">[</phrase><phrase role="identifier">chset_p</phrase><phrase role="special">(</phrase><phrase role="string">"lj"</phrase><phrase role="special">)]</phrase><phrase role="special"> |
---|
1640 | ;</phrase><phrase role="identifier"> |
---|
1641 | |
---|
1642 | identifier</phrase><phrase role="special"> |
---|
1643 | =</phrase><phrase role="special"> *</phrase><phrase role="identifier">space_p</phrase><phrase role="special"> >></phrase><phrase role="special"> ((</phrase><phrase role="identifier">alpha_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">)</phrase><phrase role="special"> >></phrase><phrase role="special"> *(</phrase><phrase role="identifier">alnum_p</phrase><phrase role="special"> |</phrase><phrase role="char"> '_'</phrase><phrase role="special">))</phrase><phrase role="special"> |
---|
1644 | ;</phrase> |
---|
1645 | </literal> |
---|
1646 | </programlisting> |
---|
1647 | </section> |
---|
1648 | </part> |
---|
1649 | |
---|