Re: Pattern matching issues

2011-07-25 Thread Andy Wingo
On Sat 23 Jul 2011 20:44, Linas Vepstas linasveps...@gmail.com writes: out of curiosity, do either the guile pattern matcher, or Norvig's, operate on structures (lists of lists, etc) rather than just on strings? Yes. http://www.gnu.org/software/guile/manual/html_node/Pattern-Matching.html

Re: Pattern matching issues

2011-07-23 Thread Linas Vepstas
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

Re: Pattern matching issues

2011-07-13 Thread Panicz Maciej Godek
2011/7/13 Marco Maggi marco.maggi-i...@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)  

Pattern matching issues

2011-07-12 Thread Panicz Maciej Godek
Long time no see! 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

Re: Pattern matching issues

2011-07-12 Thread Ludovic Courtès
Hello, Panicz Maciej Godek godek.mac...@gmail.com skribis: (pat-match '((?* ?p) need (?* ?x)) '(Mr Hulot and I need a vacation)) should return ((?P MR HULLOT AND I) (?X A VACATION)) I've been wondering if there is a way to represent this sort of pattern for the pattern matcher provided by

Re: Pattern matching issues

2011-07-12 Thread Marco Maggi
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))