From: Panicz Maciej Godek <godek.maciek@gmail.com>
To: Marco Maggi <marco.maggi-ipsu@poste.it>
Cc: guile-user@gnu.org
Subject: Re: Pattern matching issues
Date: Wed, 13 Jul 2011 12:42:09 +0200 [thread overview]
Message-ID: <CAMFYt2ZoHYU+06JMxXwbFtdAxMJz5=CZvB+i+w4oENNKZuvsUQ@mail.gmail.com> (raw)
In-Reply-To: <87wrfmzqjt.fsf@rapitore.luna>
2011/7/13 Marco Maggi <marco.maggi-ipsu@poste.it>:
> Panicz Maciej Godek wrote:
>
>> I've been wondering if there is a way to represent this
>> sort of pattern for the pattern matcher provided by Wright
>> (and Guile).
>
> The syntax should be something like:
>
> (match '(Mr Hulot and I need a vacation)
> ((?x ... 'need ?y ...)
> (write (list ?x ?y))
> (newline)))
>
> but at present multiple ellipses are not supported at the
> same level (that is in the same list or the same vector).
> It is possible to do it, but a policy (greedy/non-greedy)
> must be adopted to solve ambiguous cases and it gets
> complicated.
I agree that it could get complicated for the ambiguous cases,
but it should at least be possible for the simple ones. I think that
the lack of this capability is a serious limitation of a pattern
matcher. I'm not well acquainted with regular expressions, but
I could try to resolve this issue upon the book that I'm currently
reading -- provided that there's no one dealing with it at the
moment
Regards
M.
next prev parent reply other threads:[~2011-07-13 10:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-12 21:05 Pattern matching issues Panicz Maciej Godek
2011-07-12 22:21 ` Ludovic Courtès
2011-07-13 5:40 ` Marco Maggi
2011-07-13 10:42 ` Panicz Maciej Godek [this message]
2011-07-23 18:44 ` Linas Vepstas
2011-07-25 10:44 ` Andy Wingo
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='CAMFYt2ZoHYU+06JMxXwbFtdAxMJz5=CZvB+i+w4oENNKZuvsUQ@mail.gmail.com' \
--to=godek.maciek@gmail.com \
--cc=guile-user@gnu.org \
--cc=marco.maggi-ipsu@poste.it \
/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).