1doctoc_lang_syntax(n) Documentation tools doctoc_lang_syntax(n)
2
3
4
5______________________________________________________________________________
6
8 doctoc_lang_syntax - doctoc language syntax
9
11 This document contains the formal specification of the syntax of the
12 doctoc markup language, version 1.1 in Backus-Naur-Form. This document
13 is intended to be a reference, complementing the doctoc language com‐
14 mand reference. A beginner should read the much more informally writ‐
15 ten doctoc language introduction first before trying to understand ei‐
16 ther this document or the command reference.
17
19 In the broadest terms possible the doctoc markup language is like SGML
20 and similar languages. A document written in this language consists
21 primarily of markup commands, with text embedded into it at some
22 places.
23
24 Each markup command is a just Tcl command surrounded by a matching pair
25 of [ and ]. Which commands are available, and their arguments, i.e.
26 syntax is specified in the doctoc language command reference.
27
28 In this document we specify first the lexeme, and then the syntax, i.e.
29 how we can mix text and markup commands with each other.
30
32 In the syntax rules listed in the next section
33
34 [1] <TEXT> stands for all text except markup commands.
35
36 [2] Any XXX stands for the markup command [xxx] including its argu‐
37 ments. Each markup command is a Tcl command surrounded by a
38 matching pair of [ and ]. Inside of these delimiters the usual
39 rules for a Tcl command apply with regard to word quotation,
40 nested commands, continuation lines, etc.
41
42 [3] <WHITE> stands for all text consisting only of spaces, newlines,
43 tabulators and the comment markup command.
44
46 The rules listed here specify only the syntax of doctoc documents. The
47 lexical level of the language was covered in the previous section.
48
49 Regarding the syntax of the (E)BNF itself
50
51 [1] The construct { X } stands for zero or more occurrences of X.
52
53 [2] The construct [ X ] stands for zero or one occurrence of X.
54
55 The syntax:
56
57
58 toc = defs
59 TOC_BEGIN
60 contents
61 TOC_END
62 { <WHITE> }
63
64 defs = { INCLUDE | VSET | <WHITE> }
65 contents = { defs entry } [ defs ]
66
67 entry = ITEM | division
68
69 division = DIVISION_START
70 contents
71 DIVISION_END
72
73
75 This document, and the package it describes, will undoubtedly contain
76 bugs and other problems. Please report such in the category doctools
77 of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist]. Please
78 also report any ideas for enhancements you may have for either package
79 and/or documentation.
80
81 When proposing code changes, please provide unified diffs, i.e the out‐
82 put of diff -u.
83
84 Note further that attachments are strongly preferred over inlined
85 patches. Attachments can be made by going to the Edit form of the
86 ticket immediately after its creation, and then using the left-most
87 button in the secondary navigation bar.
88
90 doctoc_intro, doctoc_lang_cmdref, doctoc_lang_faq, doctoc_lang_intro
91
93 doctoc commands, doctoc language, doctoc markup, doctoc syntax, markup,
94 semantic markup
95
97 Documentation tools
98
100 Copyright (c) 2007-2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
101
102
103
104
105tcllib 1.0 doctoc_lang_syntax(n)