The problem of documentation is that it’s either too small to warrant a separate manual, so it fits within the source file, or that it’s big enough to warrant a mostly separate file documenting the design. The only information that’s shared between the source files and the documentation are the documentations of functions. This small tool extracts those as Texinfo macros.
All continuous comments with three semicolons just before a definition line is taken as the documentation for the defined value. A Texinfo macro is emitted whose name is DOCthedefinname (with many special chars removed, due to Texinfo limitations). The output can be redirected into a file which can serve as an include file for the Texinfo manual.
Comment lines with two semicolons are completely ignored—contrary to other lines, they don’t make docfish forget the comment read so far, for example.
docfish requires SCSH, the Scheme Shell.