unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: <tomas@tuxteam.de>
To: Matt Wette <matt.wette@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: NYACC: getting source location info?
Date: Sat, 11 Jul 2020 10:10:14 +0200	[thread overview]
Message-ID: <20200711081014.GB2472@tuxteam.de> (raw)
In-Reply-To: <85724108-5124-748b-c6b0-bf011ebf3a4a@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]

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.  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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

      reply	other threads:[~2020-07-11  8:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 20:37 NYACC: getting source location info? tomas
2020-07-11  3:00 ` Matt Wette
2020-07-11  8:10   ` tomas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200711081014.GB2472@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=guile-user@gnu.org \
    --cc=matt.wette@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).