On 10/21/2016 07:52 AM, Reuben Thomas wrote:
> Since the regexp code is widely used, with mechanically-defined syntax
> variants, in GNU grep, GNU sed etc., it would seem possible to have a
> mechanically-generated manual, which takes a set of GNU regexp syntax
> flags, as taken by re_set_syntax, and spits out suitably-configured
> documentation.
> 
> This could be either incorporated into other programs' manuals, or, perhaps
> better, supplied as standalone info files and man pages, suitable for
> cross-referencing from other programs' manuals, rather like a user-level
> version of the current gnulib/regex.texi.
> 
> In principle it would be possible to compile a manual for every possible
> syntax variant, but in practice I imagine one would want to supply one for
> POSIX BREs and EREs, GNU-extended EREs (i.e. GNU egrep syntax) and Emacs.

In fact, such documentation already exists, and IS used in other GNU
manuals: at least findutils and m4 use the regexprops-generic module,
which generates the gnulib file doc/regexprops-generic.texi as a
human-readable user description of all regex flavors.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to