summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-09-26 12:56:04 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-09-26 12:56:04 +0000
commitec96c38d56e89a1c0dfed7b9a0fc436d19d67f2b (patch)
tree6c105e98ac2df8832326c347e90eaed9a1ce4e72
parent9d5e490d085f403abf3542c6607bcd6f69c8d4b9 (diff)
downloadmandoc-ec96c38d56e89a1c0dfed7b9a0fc436d19d67f2b.tar.gz
briefly document -T tree output
-rw-r--r--mandoc.140
1 files changed, 40 insertions, 0 deletions
diff --git a/mandoc.1 b/mandoc.1
index 477b8c95..ea095d4c 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -284,6 +284,8 @@ See
.Sx PostScript Output .
.It Fl T Cm tree
Produce an indented parse tree.
+See
+.Sx Syntax tree output .
.It Fl T Cm utf8
Encode output in the UTF\-8 multi-byte format.
See
@@ -490,6 +492,44 @@ to force a UTF\-8 locale.
See
.Sx Locale Output
for details and options.
+.Ss Syntax tree output
+Use
+.Fl T Cm tree
+to show a human readable representation of the syntax tree.
+It is useful for debugging the source code of manual pages.
+The exact format is subject to change, don't write parsers for it.
+Each output line shows one syntax tree node.
+Child nodes are indented with respect to their parent node.
+The columns are:
+.Pp
+.Bl -enum -compact
+.It
+For macro nodes, the macro name; for text and
+.Xr tbl 7
+nodes, the content. There is a special format for
+.Xr eqn 7
+nodes.
+.It
+Node type (text, elem, block, head, body, body-end, tail, tbl, eqn).
+.It
+Flags:
+.Bl -dash -compact
+.It
+An opening parenthesis if the node is an opening delimiter.
+.It
+An asterisk if the node starts a new input line.
+.It
+The input line number (starting at one).
+.It
+A colon.
+.It
+The input column number (starting at one).
+.It
+A closing parenthesis if the node is a closing delimiter.
+.It
+A full stop if the node ends a sentence.
+.El
+.El
.Sh ENVIRONMENT
.Bl -tag -width MANPAGER
.It Ev MANPAGER