;;; doc-snarf --- Extract documentation from source files ;; Copyright (C) 2001, 2006, 2011 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License ;; as published by the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; Lesser General Public License for more details. ;; ;; You should have received a copy of the GNU Lesser General Public ;; License along with this software; see the file COPYING.LESSER. If ;; not, write to the Free Software Foundation, Inc., 51 Franklin ;; Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Author: Martin Grabmueller ;;; Commentary: ;; Usage: doc-snarf FILE ;; ;; This program reads in a Scheme source file and extracts docstrings ;; in the format specified below. Additionally, a procedure prototype ;; is inferred from the procedure definition line starting with ;; (define... ). ;; ;; Currently, two output modi are implemented: texinfo and plaintext. ;; Default is plaintext, texinfo can be switched on with the ;; `--texinfo, -t' command line option. ;; ;; Format: A docstring can span multiple lines and a docstring line ;; begins with `;; ' (two semicolons and a space). A docstring is ended ;; by either a line beginning with (define ...) or one or more lines ;; beginning with `;;-' (two semicolons and a dash). These lines are ;; called `options' and begin with a keyword, followed by a colon and ;; a string. ;; ;; Additionally, "standard internal docstrings" (for Scheme source) are ;; recognized and output as "options". The output formatting is likely ;; to change in the future. ;; ;; Example: ;; This procedure foos, or bars, depending on the argument @var{braz}. ;;-Author: Martin Grabmueller (define (foo/bar braz) (if braz 'foo 'bar)) ;;; Which results in the following docstring if texinfo output is ;;; enabled: #!