[Bese-devel] arnesi matcher and :greedy-star

Marco Baringer mb at bese.it
Sun Dec 7 14:49:51 UTC 2003


Andreas Fuchs <asf at boinkor.net> writes:

> hi all,
>
> I was thinking about using the arnesi matcher in a project of
> mine. This would involve matching an arbitrary number of :ANYTHINGs in
> a list, so I thought :GREEDY-STAR would be the perfect match (no pun
> intended).

since :greedy-star was never actually needed for what i used the
mathcer for i never actually fisinhed implementing it, so some wark is
still required. since greedy-star works within a sequence it requires
a function which returns the "next" element of a sequence and a
functio which returns the "current" element of a sequence. these two
functions are different if we're ematching against a list or a
vector. it's not a lot of work, i'll see what i can do.

> So, how should the :GREEDY-STAR matcher be used? Is it the right thing
> to use at all? And why does the :ANYTHING matcher match all elements
> at the end of a list, but only one element in any other position?

because (:LIST a b) is just a convience for writing (:CONS a (:CONS b
(:EQL 'nil))).

-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
     -Leonard Cohen





More information about the bese-devel mailing list