From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: docstrings and snarfing Date: Sat, 15 Jul 2006 17:19:52 -0400 Message-ID: <23454634.1152998392102.JavaMail.root@web22> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1152998412 24289 80.91.229.2 (15 Jul 2006 21:20:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2006 21:20:12 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jul 15 23:20:09 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G1rYR-0005Pm-KC for guile-user@m.gmane.org; Sat, 15 Jul 2006 23:20:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G1rYQ-0004T6-V4 for guile-user@m.gmane.org; Sat, 15 Jul 2006 17:20:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G1rYM-0004SY-JJ for guile-user@gnu.org; Sat, 15 Jul 2006 17:19:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G1rYK-0004Rw-Op for guile-user@gnu.org; Sat, 15 Jul 2006 17:19:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G1rYK-0004Rt-M1 for guile-user@gnu.org; Sat, 15 Jul 2006 17:19:56 -0400 Original-Received: from [68.168.78.205] (helo=mta11.adelphia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G1rad-00008v-1q for guile-user@gnu.org; Sat, 15 Jul 2006 17:22:19 -0400 Original-Received: from web22 ([68.168.75.54]) by mta11.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060715211952.CBLX14561.mta11.adelphia.net@web22>; Sat, 15 Jul 2006 17:19:52 -0400 Original-To: Kevin Ryde X-Priority: 3 (Normal) Sensitivity: Normal X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5402 Archived-At: ---- Kevin Ryde wrote: > "Dave Griffiths" writes: > > > > I tried running the example through the C preprocessor, and it seems > > the docstring is lost anyway: > > There's some magic with a "-DSCM_MAGIC_SNARF_DOCS" to get them, then > the scripts/snarf-check-and-output-texi program picks them out from > the code. (Or something like that.) Not documented in the manual > though (alas). Doc snarfing of C code is done in several stages. 1. The first stage is to extract all the docstrings from the C files using the C preprocessor. (The guile-snarf-docs shell script) 2. Then a filter program (guile_filter_doc_snarfage compiled from c-tokenize.lex) is used to convert the extracted strings into easily parsed scheme data. These are the .doc files. Because these files are basically scheme data structures, they can be easily read and manipulated with scheme. 3. The next stage concatenates all the .doc files together and generates texinfo source. (guile script scripts/snarf-check-and-output-texi) Two texinfo files are created: guile.texi and guile-procedures.texi. They are basically the same except the guile.texi file has extra C function names for Scheme primitives. 4. Finally makeinfo is used to process guile-procedures.texi into a text file. (guile-procedures.txt) The text file is used for Guile online help documentation. -Dale _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user