public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Duncan Mak <duncanmak@gmail.com>
To: kawa mailing list <kawa@sourceware.org>
Subject: Reader handling of the @ character
Date: Sun, 28 Jun 2020 21:44:15 -0400	[thread overview]
Message-ID: <CABgWrqrwUBMqgM7rhoiFrOxXewGzvLj2NFLd99VE7wo4VvCjtA@mail.gmail.com> (raw)

Hello all,

I'm playing with the Alex Shinn match.scm macro again and I noticed that it
doesn't load in Kawa,

I think it's failing because of the handling of the @ character, probably
due to how the splice operator was implemented.

I tried the following in Chez, this is what I see with this test
syntax-rules macro:

$ chez
Chez Scheme Version 9.5.2
Copyright 1984-2019 Cisco Systems, Inc.
> (define-syntax test
    (syntax-rules (@)
      ((test @ x y z) (list x y z))))
> (test @ 1 2 3)
(1 2 3)
> (test 1 2 3)
Exception: invalid syntax (test 1 2 3)
Type (debug) to enter the debugger.
>


The same macro doesn't work in Kawa 3.1.1:

$ kawa
#|kawa:1|# (define-syntax test
#|.....2|#   (syntax-rules (@)
#|.....3|#     ((test @ x y z) (list x y z))))
#|.....4|#
/dev/tty:2:20: invalid character #\)
#|kawa:5|# (test @ 1 2 3)
/dev/tty:5:2: warning - no declaration seen for test
/dev/tty:5:2: unbound location: test
at gnu.mapping.DynamicLocation.get(DynamicLocation.java:36)
at atInteractiveLevel-2.run(tty:5)
at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:290)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:211)
at kawa.Shell.run(Shell.java:289)
at kawa.Shell.run(Shell.java:196)
at kawa.Shell.run(Shell.java:183)
at kawa.repl.processArgs(repl.java:724)
at kawa.repl.main(repl.java:830)

-- 
Duncan.

             reply	other threads:[~2020-06-29  1:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29  1:44 Duncan Mak [this message]
2020-06-29  3:04 ` Per Bothner
2020-06-29 14:05   ` Per Bothner
2020-06-29 22:52     ` Damien MATTEI
2020-06-29 22:56       ` Per Bothner

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

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

  git send-email \
    --in-reply-to=CABgWrqrwUBMqgM7rhoiFrOxXewGzvLj2NFLd99VE7wo4VvCjtA@mail.gmail.com \
    --to=duncanmak@gmail.com \
    --cc=kawa@sourceware.org \
    /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).