1 .\" $Id: mdoctree.1,v 1.7 2009/03/16 23:37:28 kristaps Exp $
3 .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@openbsd.org>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the
7 .\" above copyright notice and this permission notice appear in all
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11 .\" WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13 .\" AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16 .\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 .\" PERFORMANCE OF THIS SOFTWARE.
19 .Dd $Mdocdate: March 16 2009 $
25 .Nd mdoc macro compiler
30 .Op Fl f Ns Ar options...
39 manual pages and prints its syntax tree. It's commonly used to see the
40 syntax tree of a document when building new
42 utilities. The arguments are as follows:
43 .Bl -tag -width XXXXXXXXXXXX
46 Print verbose parsing output.
49 Print version and exit.
51 .It Fl f Ns Ar option...
52 Override default compiler behaviour. See
57 Print warning messages. May be set to
61 for groff/troff-compatibility warnings, or
63 for syntax warnings. If
65 is specified, warnings are considered errors and cause utility
68 arguments may be comma-separated, such as
69 .Fl W Ns Ar error,all .
82 utility is a formatting front-end for
90 into an abstract syntax tree. By default, it reads from stdin and
91 prints the syntax tree to stdout.
97 Default compiler behaviour may be overriden with the
99 flag. The available options are as follows:
100 .Bl -tag -width XXXXXXXXXXXX -offset XXXX
101 .It Fl f Ns Ar ign-scope
102 When rewinding the scope of a block macro, forces the compiler to ignore
103 scope violations. This can seriously mangle the resulting tree.
104 .It Fl f Ns Ar ign-escape
105 Ignore invalid escape sequences.
106 .It Fl f Ns Ar ign-macro
107 Ignore unknown macros at the start of input lines.
115 options may be grouped and delimited with a comma. Using
116 .Fl f Ns Ar ign-scope,ign-escape ,
117 for example, will try to ignore scope and character-escape errors.
122 utility expects its input to be 7-bit ASCII as defined in
124 The only non-graphing characters accepted are spaces,
128 Tabs are only accepted in literal block-displays and as column
131 Only Unix-style newlines (\en) are accepted; if the newline is escaped,
132 the line is concatenated with the next.
134 .Ss Character Escapes
137 doesn't format its output, character escapes are displayed as passed
141 To validate this manual page:
144 .D1 % mdoctree \-Wall,error mdoctree.1
156 utility was written by
157 .An Kristaps Dzonsons Aq kristaps@openbsd.org .
162 for a list of bugs, caveats, and incomplete macros.