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 in Backus-Naur-Form. This document is
13 intended to be a reference, complementing the doctoc language command
14 reference. A beginner should read the much more informally written
15 doctoc language introduction first before trying to understand either
16 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 toc = defs
58 TOC_BEGIN
59 contents
60 TOC_END
61 { <WHITE> }
62
63 defs = { INCLUDE | VSET | <WHITE> }
64 contents = defs (items | divisions)
65
66 items = ITEM defs { ITEM defs }
67 divisions = division defs { division defs }
68
69 division = DIVISION_START
70 contents
71 DIVISION_END
72
73
75 This document, will undoubtedly contain bugs and other problems.
76 Please report such in the category doctools of the Tcllib SF Trackers
77 [http://sourceforge.net/tracker/?group_id=12883]. Please also report
78 any ideas for enhancements you may have.
79
81 doctoc_intro, doctoc_lang_cmdref, doctoc_lang_faq, doctoc_lang_intro
82
84 doctoc commands, doctoc language, doctoc markup, doctoc syntax, markup,
85 semantic markup
86
88 Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net>
89
90
91
92
93doctools 1.0 doctoc_lang_syntax(n)