On 12 July 2011 16:05, Panicz Maciej Godek <godek.mac...@gmail.com> wrote:

> As we all know, The guile module (ice-9 match) includes an
> implementation for a pattern matcher as specified by Andrew K. Wright.
> I've recently been reading a book by Peter Norvig, where he came up
> with the following notation for what he called "Segment Pattern
> Matching" (in Common Lisp):
>
> (pat-match '((?* ?p) need (?* ?x)) '(Mr Hulot and I need a vacation))

out of curiosity, do either the guile pattern matcher, or Norvig's,
operate on structures (lists of lists, etc) rather than just on strings?

Just asking out of curiosity; I maintain a pattern matcher for a
different project; it does pattern matching on arbitrary directed
graphs (equivalently, more or less, on terms in a term algebra).
Its used to implement queries against a database-like collection
of terms. (this is for the OpenCog project)

--linas

Reply via email to