Package: tcllib, Version: CVS HEAD
doctools_lang_syntax -
doctools language syntax
This document contains the formal specification of the syntax of the doctools markup language, version 1 in Backus-Naur-Form. This document is intended to be a reference, complementing the doctools language command reference. A beginner should read the much more informally written doctools language introduction first before trying to understand either this document or the command reference.
Each markup command is a just Tcl command surrounded by a matching pair of [ and ]. Which commands are available, and their arguments, i.e. syntax is specified in the doctools language command reference.
In this document we specify first the lexeme, and then the syntax, i.e. how we can mix text and markup commands with each other.
Regarding the syntax of the (E)BNF itself
manpage = defs MANPAGE_BEGIN header DESCRIPTION body MANPAGE_END { <WHITE> } defs = { INCLUDE | VSET | <WHITE> } header = { TITLEDESC | MODDESC | COPYRIGHT | REQUIRE | defs | xref } xref = KEYWORDS | SEE_ALSO | CATEGORY body = paras { SECTION sbody } sbody = paras { SUBSECTION ssbody } ssbody = paras paras = tblock { (PARA | NL) tblock } tblock = { <TEXT> | defs | markup | xref | an_example | a_list } markup = ARG | CLASS | CMD | CONST | EMPH | FILE | FUN | LB | METHOD | NAMESPACE | OPT | OPTION | PACKAGE | RB | SECTREF | STRONG | SYSCMD | TERM | TYPE | URI | USAGE | VAR | WIDGET example = EXAMPLE | EXAMPLE_BEGIN extext EXAMPLE_END extext = { <TEXT> | defs | markup } a_list = LIST_BEGIN<arguments> argd_list LIST_END | LIST_BEGIN<commands> cmdd_list LIST_END | LIST_BEGIN<definitions> def_list LIST_END | LIST_BEGIN<enumerated> enum_list LIST_END | LIST_BEGIN<itemized> item_list LIST_END | LIST_BEGIN<options> optd_list LIST_END | LIST_BEGIN<tkoptions> tkoptd_list LIST_END argd_list = [ <WHITE> ] { ARG_DEF paras } cmdd_list = [ <WHITE> ] { CMD_DEF paras } def_list = [ <WHITE> ] { (DEF|CALL) paras } enum_list = [ <WHITE> ] { ENUM paras } item_list = [ <WHITE> ] { ITEM paras } optd_list = [ <WHITE> ] { OPT_DEF paras } tkoptd_list = [ <WHITE> ] { TKOPTION_DEF paras }
doctools_intro, doctools_lang_intro, doctools_lang_cmdref, doctools_lang_faq
markup, semantic markup, doctools markup, doctools language, doctools syntax, doctools commands