[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Subject: Re: Building a troffparserRe: Building a troff parser
From: |
Doug McIlroy |
Subject: |
[Groff] Subject: Re: Building a troffparserRe: Building a troff parser |
Date: |
Thu, 26 Feb 2015 15:46:56 -0500 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
> I'm interested in building a troff parser to extract information from
> manpages (e.g. what do the flags mean when we say `rm -rf *`?).
> does troff have a specification that details troff formatting
The syntax of troff and of the man-pages macros is in
man 7 groff
man 7 groff_man
man 7 groff_mdoc
The markup, however, is not faithfully used. In groff -man, you'll
find boldface specified by .B , \fB, and perhaps .ft B or .ft 3.
And you'll find .I used for names of parameters as well as for
names of man pages (though parse context will usually resolve
the ambiguity. groff -mdoc tries for more precision than man, but I
suspect is sloppily used because there are so many details to learn.
Doug
- [Groff] Subject: Re: Building a troffparserRe: Building a troff parser,
Doug McIlroy <=