[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pattern matching issues
From: |
Marco Maggi |
Subject: |
Re: Pattern matching issues |
Date: |
Wed, 13 Jul 2011 07:40:38 +0200 |
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.
HTH
--
Marco Maggi