1docidx_lang_syntax(n) Documentation tools docidx_lang_syntax(n)
2
3
4
5______________________________________________________________________________
6
8 docidx_lang_syntax - docidx language syntax
9
11 This document contains the formal specification of the syntax of the
12 docidx markup language, version 1 in Backus-Naur-Form. This document is
13 intended to be a reference, complementing the docidx language command
14 reference. A beginner should read the much more informally written
15 docidx language introduction first before trying to understand either
16 this document or the command reference.
17
19 In the broadest terms possible the docidx 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 docidx 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 docidx 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 index = defs
59 INDEX_BEGIN
60 [ contents ]
61 INDEX_END
62 { <WHITE> }
63
64 defs = { INCLUDE | VSET | <WHITE> }
65 contents = keyword { keyword }
66
67 keyword = defs KEY ref { ref }
68 ref = MANPAGE | URL | defs
69
70 At last a rule we were unable to capture in the EBNF syntax, as it is
71 about the arguments of the markup commands, something which is not mod‐
72 eled here.
73
74 [1] The arguments of all markup commands have to be plain text,
75 and/or text markup commands, i.e. one of
76
77 [1] lb,
78
79 [2] rb, or
80
81 [3] vset (1-argument form).
82
84 This document, and the package it describes, will undoubtedly contain
85 bugs and other problems. Please report such in the category doctools
86 of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist]. Please
87 also report any ideas for enhancements you may have for either package
88 and/or documentation.
89
90 When proposing code changes, please provide unified diffs, i.e the out‐
91 put of diff -u.
92
93 Note further that attachments are strongly preferred over inlined
94 patches. Attachments can be made by going to the Edit form of the
95 ticket immediately after its creation, and then using the left-most
96 button in the secondary navigation bar.
97
99 docidx_intro, docidx_lang_cmdref, docidx_lang_faq, docidx_lang_intro
100
102 docidx commands, docidx language, docidx markup, docidx syntax, markup,
103 semantic markup
104
106 Documentation tools
107
109 Copyright (c) 2007-2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
110
111
112
113
114tcllib 1.0 docidx_lang_syntax(n)