From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Getting source location information Date: Wed, 30 Nov 2005 17:04:28 +0100 Organization: LAAS-CNRS Message-ID: <87psoixgtv.fsf@laas.fr> References: <200511272025.32395.bruce.korb@gmail.com> <200511300600.54799.bruce.korb@gmail.com> <878xv62o13.fsf_-_@laas.fr> <200511300730.44076.bruce.korb@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133373586 11472 80.91.229.2 (30 Nov 2005 17:59:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2005 17:59:46 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Nov 30 18:59:36 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EhVhn-0002P6-Ug for guile-devel@m.gmane.org; Wed, 30 Nov 2005 18:25:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhVhn-0004gO-85 for guile-devel@m.gmane.org; Wed, 30 Nov 2005 12:25:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EhUS8-0000BJ-0I for guile-devel@gnu.org; Wed, 30 Nov 2005 11:05:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EhUS2-0000Aa-LB for guile-devel@gnu.org; Wed, 30 Nov 2005 11:05:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhUS1-0000AH-QG for guile-devel@gnu.org; Wed, 30 Nov 2005 11:04:58 -0500 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EhUS1-0008PV-8M for guile-devel@gnu.org; Wed, 30 Nov 2005 11:04:57 -0500 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id jAUG4odR025502; Wed, 30 Nov 2005 17:04:52 +0100 (CET) Original-To: Bruce Korb X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 10 Frimaire an 214 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: Bruce Korb , guile-devel@gnu.org In-Reply-To: <200511300730.44076.bruce.korb@gmail.com> (Bruce Korb's message of "Wed, 30 Nov 2005 07:30:43 -0800") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5433 Archived-At: Bruce Korb writes: > That read function reads an s-expr. How can that work if > the non-Scheme text in the file is not an s-expr? I don't see another > function for getting text from a port. Am I missing something? > Especially troubling is the phrase, "Any whitespace before the > next token is discarded." I do not want tokenized input. I want raw > text. I have my own methods for determining when something needs > a Scheme evaluation. That the input file does not contain only Scheme source wasn't clear to me. Then, in fact, it would make sense to use `scm_c_eval_string ()', provided your tool is able to determine the boundaries of the Scheme expression (if it's not, you'd better use `scm_read ()'). After the `scm_c_eval_string ()', you can `printf ()' whatever location information you want. If you want to use source locations in a Guile-friendly way (so that Guile can, for instance, display location information in backtraces), then you may want to use `scm_set_source_property_x (sexp, key, datum)' (where KEY may be one of SCM_SYM_FILENAME, SCM_SYM_LINE, SCM_SYM_COLUMN) which is defined in `srcprop.h'. But again, this is a problem (and a solution) relevant to your tool, not to Guile in general. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel