Next: guile-tools lexer-repl, Previous: guile-tools gxsed, Up: Miscellaneous Tools
See Doc Extraction from C Headers, for discussion.
Usage: h2doc [-o OUTFILE] HEADER
Scan file HEADER for docstrings and display them to stdout in GDFv1 format.
Optional arg --output OUTFILE means write output to OUTFILE instead of to
stdout.
Currently only C macros are recognized. They must be in the form:
/*:DOCSTRING-1
...
DOCSTRING-N
*/
#define MACRO(ARGS,...) ...
Specifically, the "/*:", the closing "*/" and the "#define" must begin in
column zero (flush left). The macro's arguments must be on the same line.
The docstring comprises lines DOCSTRING-1 through DOCSTRING-N, with the
first three characters deleted.
TODO: Handle other elements besides macros.
Parameterize input format recognition.