unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Stefan Israelsson Tampe <INVALID.NOREPLY@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>, "Andy Wingo" <wingo@pobox.com>,
	"Stefan Israelsson Tampe" <stefan.itampe@gmail.com>,
	jim@benderweb.net, bug-guile@gnu.org
Subject: [bug #31691] Ellipsis not supported in nested `sxml-match' forms [1.9.13]
Date: Sun, 11 Sep 2011 21:54:45 +0000	[thread overview]
Message-ID: <20110911-215445.sv78157.19058@savannah.gnu.org> (raw)
In-Reply-To: <20110906-212726.sv15145.16521@savannah.gnu.org>

Follow-up Comment #7, bug #31691 (project guile):

I suspect that this bug is a feature request.

Anyway I coded another solution which sematics is more exact.
The idea is to quote ... and each match will remove one of the quotes around
.... So now this works,

(sxml-match '(a (b (c 1) (c 2 3)) (b (c 4)) (b (c 5)))
 ((a ,x ...) 
    (list (sxml-match x 
               ((b ,y '...) 
                   (list (sxml-match y 
                            ((c ,z ''...) z)) '...))) ...)))

$1 = (((1) (2 3)) ((4)) ((5)))

attached is a git diff of the code.

the bad thing with this code is that it's not possible to output
the '... symbol.

/Stefan

(file #23968)
    _______________________________________________________

Additional Item Attachment:

File name: sxml-match.ss.2.diff           Size:2 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31691>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




  parent reply	other threads:[~2011-09-11 21:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18  9:10 [bug #31691] Ellipsis not supported in nested `sxml-match' forms [1.9.13] anonymous
2010-11-19 16:28 ` Andy Wingo
2010-11-19 16:41   ` Andy Wingo
2011-07-15 11:36     ` Stefan Israelsson Tampe
2011-09-02 17:17       ` Andy Wingo
2011-09-05 13:40         ` Stefan Israelsson Tampe
2011-09-06 21:27           ` Ludovic Courtès
2011-09-07 11:13             ` Stefan Israelsson Tampe
2011-09-11 21:54             ` Stefan Israelsson Tampe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-11-19 22:56 Ludovic Courtès

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=20110911-215445.sv78157.19058@savannah.gnu.org \
    --to=invalid.noreply@gnu.org \
    --cc=bug-guile@gnu.org \
    --cc=jim@benderweb.net \
    --cc=ludo@gnu.org \
    --cc=stefan.itampe@gmail.com \
    --cc=wingo@pobox.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).