From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Bison-like source locations in LALR-parser Date: Mon, 11 Aug 2014 20:21:39 +0200 Message-ID: <878umusx8s.fsf@gnu.org> References: <1406966311-19014-1-git-send-email-janneke@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1407781347 21000 80.91.229.3 (11 Aug 2014 18:22:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2014 18:22:27 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Aug 11 20:22:19 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XGuEc-0005Eh-CN for guile-devel@m.gmane.org; Mon, 11 Aug 2014 20:22:18 +0200 Original-Received: from localhost ([::1]:37472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGuEb-0006en-Vy for guile-devel@m.gmane.org; Mon, 11 Aug 2014 14:22:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGuEQ-0006do-0l for guile-devel@gnu.org; Mon, 11 Aug 2014 14:22:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGuEK-0006vh-0j for guile-devel@gnu.org; Mon, 11 Aug 2014 14:22:05 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:54010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGuEJ-0006vZ-QJ for guile-devel@gnu.org; Mon, 11 Aug 2014 14:21:59 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XGuEH-00053J-96 for guile-devel@gnu.org; Mon, 11 Aug 2014 20:21:57 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Aug 2014 20:21:57 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Aug 2014 20:21:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Thermidor an 222 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:dTU+MDpr4+SWM7jWyiOYcgtcMhE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17321 Archived-At: Hi, Jan, Jan Nieuwenhuizen skribis: > I am using these patches to provide Bison-like source locations that we > need for error messages and the like. The output of the parser is a > plain scheme tree, now transparently annotated with source locations > that match the parsed input file. I don’t think this is needed. Lexers are expected to use ‘make-lexical-token’ and ‘make-source-location’ from (system base lalr) to preserve source location information. Besides, note that lalr.upstream.scm is a copy of the upstream lalr-scm, hosted at . HTH, Ludo’.