=================================================================== RCS file: /cvs/mandoc/Attic/mdoc.3,v retrieving revision 1.40 retrieving revision 1.43 diff -u -p -r1.40 -r1.43 --- mandoc/Attic/mdoc.3 2010/05/25 22:16:59 1.40 +++ mandoc/Attic/mdoc.3 2010/06/27 15:52:41 1.43 @@ -1,4 +1,4 @@ -.\" $Id: mdoc.3,v 1.40 2010/05/25 22:16:59 kristaps Exp $ +.\" $Id: mdoc.3,v 1.43 2010/06/27 15:52:41 kristaps Exp $ .\" .\" Copyright (c) 2009-2010 Kristaps Dzonsons .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 25 2010 $ +.Dd $Mdocdate: June 27 2010 $ .Dt MDOC 3 .Os .Sh NAME @@ -29,11 +29,17 @@ .Nd mdoc macro compiler library .Sh SYNOPSIS .In mandoc.h +.In regs.h .In mdoc.h .Vt extern const char * const * mdoc_macronames; .Vt extern const char * const * mdoc_argnames; .Ft "struct mdoc *" -.Fn mdoc_alloc "void *data" "int pflags" "mandocmsg msgs" +.Fo mdoc_alloc +.Fa "const struct regset *regs" +.Fa "void *data" +.Fa "int pflags" +.Fa "mandocmsg msgs" +.Fc .Ft int .Fn mdoc_endparse "struct mdoc *mdoc" .Ft void @@ -43,7 +49,11 @@ .Ft "const struct mdoc_node *" .Fn mdoc_node "const struct mdoc *mdoc" .Ft int -.Fn mdoc_parseln "struct mdoc *mdoc" "int line" "char *buf" +.Fo mdoc_parseln +.Fa "struct mdoc *mdoc" +.Fa "int line" +.Fa "char *buf" +.Fc .Ft int .Fn mdoc_reset "struct mdoc *mdoc" .Sh DESCRIPTION @@ -221,9 +231,7 @@ where capitalised non-terminals represent nodes. .It mnode \(<- BLOCK | ELEMENT | TEXT .It BLOCK -\(<- (HEAD [TEXT])+ [BODY [TEXT]] [TAIL [TEXT]] -.It BLOCK -\(<- BODY [TEXT] [TAIL [TEXT]] +\(<- HEAD [TEXT] (BODY [TEXT])+ [TAIL [TEXT]] .It ELEMENT \(<- TEXT* .It HEAD @@ -237,12 +245,14 @@ where capitalised non-terminals represent nodes. .El .Pp Of note are the TEXT nodes following the HEAD, BODY and TAIL nodes of -the BLOCK production. -These refer to punctuation marks. +the BLOCK production: these refer to punctuation marks. Furthermore, although a TEXT node will generally have a non-zero-length string, in the specific case of .Sq \&.Bd \-literal , an empty line will produce a zero-length string. +Multiple body parts are only found in invocations of +.Sq \&Bl \-column , +where a new body introduces a new phrase. .Sh EXAMPLES The following example reads lines from stdin and parses them, operating on the finished parse tree with