From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: NYACC: getting source location info? Date: Sat, 11 Jul 2020 10:10:14 +0200 Message-ID: <20200711081014.GB2472@tuxteam.de> References: <20200710203743.GA10781@tuxteam.de> <85724108-5124-748b-c6b0-bf011ebf3a4a@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="A6N2fC+uXW/VQSAv" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20185"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) Cc: guile-user@gnu.org To: Matt Wette Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Jul 11 10:10:33 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1juAad-00057L-Ek for guile-user@m.gmane-mx.org; Sat, 11 Jul 2020 10:10:31 +0200 Original-Received: from localhost ([::1]:55286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juAac-0003Nz-Cn for guile-user@m.gmane-mx.org; Sat, 11 Jul 2020 04:10:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1juAaQ-0003Lv-RE for guile-user@gnu.org; Sat, 11 Jul 2020 04:10:18 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:48777) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1juAaO-0003ol-Qb for guile-user@gnu.org; Sat, 11 Jul 2020 04:10:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:Date; bh=C3+b4QiH1YmdcfSFGd+fAdk8aMY4/BUciwNve3so06o=; b=QOgPaM1and3tRI97I9PcuiHU2d1s0DLA21ex3gazafpcJJS2mal1DR7UFexnwzF2WwfPG9FjaTm7WK8wcZH1PVdPEoW86F2BJ1olmvDnK0pPyXsiEV+TDkJazXlv3GDgEC8D1N3j7v/6u1nT6E58EVYt9ZKsGw+jU9lzDcDiGYso/bM7pcPX/frbHxx44Uz28bWiIy3zj87MOmsRIm4Eoi6Vkj93UlOmrkh9Nd4jVSt7hR4Sz0A6LjsGfxHZYVib9bUEsTYz0HA6rwz8BH8xqFgOD1nWKKaEvmvauPySCUiBYXKZga28iTt2Y2R1yjqmPpzo+pCQAGQGxHBql9bLrQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1juAaM-0000r4-E8; Sat, 11 Jul 2020 10:10:14 +0200 Content-Disposition: inline In-Reply-To: <85724108-5124-748b-c6b0-bf011ebf3a4a@gmail.com> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/11 04:10:14 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16660 Archived-At: --A6N2fC+uXW/VQSAv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 10, 2020 at 08:00:15PM -0700, Matt Wette wrote: Hey, and thanks for your quick response! > On 7/10/20 1:37 PM, tomas@tuxteam.de wrote: > >Hi, > > > >I'm having some fun with NYACC (thanks, Matt!). > > > >To help debugging things and for errors and warnings, it'd be nice > >to "know" where the current LHS non-terminal starts in the source. [...] > I assume you mean providing source location information to the > values (i.e, $1, etc). Yes, basically. I was just looking from the other end of the rule (and pictured having a "special symbol" like $loc giving the "start point" of the curent LHS). Both would be equivalent, I think. > I've thought about that a few times but have > not arrived at anything intelligent.=C2=A0 Maybe using object properties > (see sec 6.11 in Guile Ref) in the lexical analyzer, as you mention. I didn't think of that -- it feels pretty "side-channel-y" at first, but perhaps it's an elegant solution, after all. Cheers -- t --A6N2fC+uXW/VQSAv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl8Jc+YACgkQBcgs9XrR2kYDJwCeKZLnUaLAkOHuzNSCWkBWi/uR Od4An1xxUEvo5F9zV+aZDxP0LfpJFPEs =mkXD -----END PGP SIGNATURE----- --A6N2fC+uXW/VQSAv--