From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Panicz Maciej Godek Newsgroups: gmane.lisp.guile.user Subject: Pattern matching issues Date: Tue, 12 Jul 2011 23:05:26 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1310504808 12031 80.91.229.12 (12 Jul 2011 21:06:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2011 21:06:48 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jul 12 23:06:44 2011 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QgkAF-00021W-Ue for guile-user@m.gmane.org; Tue, 12 Jul 2011 23:06:44 +0200 Original-Received: from localhost ([::1]:47297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgkAE-0004Od-GI for guile-user@m.gmane.org; Tue, 12 Jul 2011 17:06:42 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qgk93-0004Bh-G5 for guile-user@gnu.org; Tue, 12 Jul 2011 17:05:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qgk92-000379-9c for guile-user@gnu.org; Tue, 12 Jul 2011 17:05:29 -0400 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:55788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qgk92-00036x-0R for guile-user@gnu.org; Tue, 12 Jul 2011 17:05:28 -0400 Original-Received: by vxg38 with SMTP id 38so4820526vxg.0 for ; Tue, 12 Jul 2011 14:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=Dv/q91wpvFmfYnI4tUN4VaAlMrUY/3TMlqAi1Q1tYv8=; b=G4I9ILQnBEJtACohxcfgCPfBtUrctC3CHjUbbA9Po3IDSZhNtu0f1qv6H/b2zigcyB 046jf9aBDFr1yHOPMG1kTBdMmvESbhjG7p4ByYYfWroBL3KGC0VUgoTu8y3NirGqzdh5 Oy627ZwXFxYevJKfHLZJwveTJymXAEp71sDaA= Original-Received: by 10.52.175.7 with SMTP id bw7mr499814vdc.32.1310504726811; Tue, 12 Jul 2011 14:05:26 -0700 (PDT) Original-Received: by 10.220.182.129 with HTTP; Tue, 12 Jul 2011 14:05:26 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.169 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8680 Archived-At: 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 Common Lisp): (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 Wright (and Guile). Regards, M.