From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.bugs Subject: bug#22601: guile.texi section on ice-9 match Date: Sun, 19 Mar 2017 18:56:33 -0700 Message-ID: <199A3D39-E75D-407A-BE14-63DE692C5CCF@gmail.com> References: <70AB27D7-FFFA-4447-8AAF-7A1C9295E1D7@gmail.com> <590DEFE0-5B65-4691-8A6F-00142B3E0473@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_30A69841-A478-43CE-9B82-3CC0FD40D196" X-Trace: blaine.gmane.org 1489975034 22254 195.159.176.226 (20 Mar 2017 01:57:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 20 Mar 2017 01:57:14 +0000 (UTC) To: 22601@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Mar 20 02:57:10 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpmZH-00050I-Eo for guile-bugs@m.gmane.org; Mon, 20 Mar 2017 02:57:07 +0100 Original-Received: from localhost ([::1]:58907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpmZN-0002Cn-BE for guile-bugs@m.gmane.org; Sun, 19 Mar 2017 21:57:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpmZF-0002CV-2o for bug-guile@gnu.org; Sun, 19 Mar 2017 21:57:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cpmZC-00017h-2t for bug-guile@gnu.org; Sun, 19 Mar 2017 21:57:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37542) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cpmZB-00017Y-Tn for bug-guile@gnu.org; Sun, 19 Mar 2017 21:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cpmZB-00063q-NO for bug-guile@gnu.org; Sun, 19 Mar 2017 21:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matt Wette Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 20 Mar 2017 01:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22601 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 22601-submit@debbugs.gnu.org id=B22601.148997500523274 (code B ref 22601); Mon, 20 Mar 2017 01:57:01 +0000 Original-Received: (at 22601) by debbugs.gnu.org; 20 Mar 2017 01:56:45 +0000 Original-Received: from localhost ([127.0.0.1]:35741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpmYu-00063J-Rw for submit@debbugs.gnu.org; Sun, 19 Mar 2017 21:56:45 -0400 Original-Received: from mail-pf0-f172.google.com ([209.85.192.172]:35156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpmYs-000636-J8 for 22601@debbugs.gnu.org; Sun, 19 Mar 2017 21:56:43 -0400 Original-Received: by mail-pf0-f172.google.com with SMTP id 20so11136510pfk.2 for <22601@debbugs.gnu.org>; Sun, 19 Mar 2017 18:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=228r2TaOtcgJlR/EzP35JTGB8fJq9JMpW1Ygj6zYhbg=; b=pSpc+65196rkxXOfULyCIW0y9pfVhPrr4m3F38CPD/1umzfnnMrVtDOPkSLTkM+0Pi JjdAPd7Kh2sQ9BlY5ttb92y59KiW/MtSDyV0wSobV2MQHwgStL3/gNB9bxMY+jNendVx IuvEKacDcSa6hWvtQf6eA3fsqK+wlqXzzXBApgIbE5jlHpS/C3E4o+uHZJAmcbhq00ex bEE+mquYc23tASqItPEKHaRQ6nsmkJ3zsAbRzzC+k+sJ9xn4v3j7s+jnhAenjTvnFcO4 wNdp04tCeTnT3VcJvEL9ZdMMUl1fH4aM6gFUZbNy/u24foD7/nKZ4gMfG0ogWyV+nuJ/ NFXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=228r2TaOtcgJlR/EzP35JTGB8fJq9JMpW1Ygj6zYhbg=; b=YIf6F3V972MPSMMiRUNUFYBes+PKFw3rSEXmuh1ZR83KlqZcbQqxwYjg6GKlpvZPqH wIPve9aTaKmfFm706J4AoGQStJnk0DfUKMb+xsbpVzog7XmXlQEkd+n3W9zwF6wwhceZ lKpVsqf8j6K6hCiZc9rnQqNS8asbINplETT2Ynwjz6jqEyEU3qhQTawmwCGXfz5s6w5f j+/NqWgKbnh1ZYzSJj1wjkbqHBoj+l9iioa7kNHJ6EHUWdRmi8iBxgx2vJDn5hU9kUD9 rWGQTXHthMrizfTqF0cawsOYrXAXewZpdWtFFS+Ilq4KizJDMYyvziVYBUAcYVL9sx3g XFPQ== X-Gm-Message-State: AFeK/H1sx6D1pixMWrkSIIXZcxOzRf38MzFlrL2tpV3Vdv545ZJIry5UB/bSYIBWq8iY/A== X-Received: by 10.84.253.15 with SMTP id z15mr37167783pll.142.1489974996449; Sun, 19 Mar 2017 18:56:36 -0700 (PDT) Original-Received: from [192.168.2.114] (216-165-236-44.championbroadband.com. [216.165.236.44]) by smtp.gmail.com with ESMTPSA id v79sm22997859pfi.120.2017.03.19.18.56.34 for <22601@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Mar 2017 18:56:35 -0700 (PDT) In-Reply-To: <590DEFE0-5B65-4691-8A6F-00142B3E0473@gmail.com> X-Mailer: Apple Mail (2.3259) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8715 Archived-At: --Apple-Mail=_30A69841-A478-43CE-9B82-3CC0FD40D196 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 19, 2017, at 4:42 PM, Matt Wette wrote: >=20 > Patch for guile-2.2.0, wrt doc/ref/match.texi, is attached. >=20 > Updated patch. Upon proofread, I found an error wrt =E2=80=9Cooo=E2=80=9D= in the original. --Apple-Mail=_30A69841-A478-43CE-9B82-3CC0FD40D196 Content-Disposition: attachment; filename=match.texi.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="match.texi.patch" Content-Transfer-Encoding: 7bit --- doc/ref/match.texi-orig 2015-04-11 13:07:14.000000000 -0700 +++ doc/ref/match.texi 2017-03-19 18:54:05.000000000 -0700 @@ -116,65 +116,68 @@ The syntax and interpretation of patterns is as follows: -@verbatim - patterns: matches: +@example + patterns: matches: -pat ::= identifier anything, and binds identifier - | _ anything - | () the empty list - | #t #t - | #f #f - | string a string - | number a number - | character a character - | 'sexp an s-expression - | 'symbol a symbol (special case of s-expr) - | (pat_1 ... pat_n) list of n elements - | (pat_1 ... pat_n . pat_{n+1}) list of n or more - | (pat_1 ... pat_n pat_n+1 ooo) list of n or more, each element - of remainder must match pat_n+1 - | #(pat_1 ... pat_n) vector of n elements - | #(pat_1 ... pat_n pat_n+1 ooo) vector of n or more, each element - of remainder must match pat_n+1 - | #&pat box - | ($ record-name pat_1 ... pat_n) a record - | (= field pat) a ``field'' of an object - | (and pat_1 ... pat_n) if all of pat_1 thru pat_n match - | (or pat_1 ... pat_n) if any of pat_1 thru pat_n match - | (not pat_1 ... pat_n) if all pat_1 thru pat_n don't match - | (? predicate pat_1 ... pat_n) if predicate true and all of - pat_1 thru pat_n match - | (set! identifier) anything, and binds setter - | (get! identifier) anything, and binds getter - | `qp a quasi-pattern - | (identifier *** pat) matches pat in a tree and binds - identifier to the path leading - to the object that matches pat - -ooo ::= ... zero or more - | ___ zero or more - | ..1 1 or more - - quasi-patterns: matches: - -qp ::= () the empty list - | #t #t - | #f #f - | string a string - | number a number - | character a character - | identifier a symbol - | (qp_1 ... qp_n) list of n elements - | (qp_1 ... qp_n . qp_{n+1}) list of n or more - | (qp_1 ... qp_n qp_n+1 ooo) list of n or more, each element - of remainder must match qp_n+1 - | #(qp_1 ... qp_n) vector of n elements - | #(qp_1 ... qp_n qp_n+1 ooo) vector of n or more, each element - of remainder must match qp_n+1 - | #&qp box - | ,pat a pattern - | ,@pat a pattern -@end verbatim +@i{pat} ::= + @i{identifier} anything, and binds identifier + | _ anything + | () the empty list + | #t #t + | #f #f + | @i{string} a string + | @i{number} a number + | @i{character} a character + | '@i{sexp} an s-expression + | '@i{symbol} a symbol (special case of s-expr) + | (@i{pat_1 ... pat_n}) list of n elements + | (@i{pat_1 ... pat_n} . @i{pat_{n+1}}) list of n or more + | (@i{pat_1 ... pat_n pat_n+1 ooo}) list of n or more, each element + of remainder must match pat_n+1 + | #(@i{pat_1 ... pat_n}) vector of n elements + | #(@i{pat_1 ... pat_n pat_n+1 ooo}) vector of n or more, each element + of remainder must match pat_n+1 + | #&@i{pat} box + | ($ @i{record-name} @i{pat_1 ... pat_n}) a record + | (= @i{field} @i{pat}) a ``field'' of an object + | (and @i{pat_1 ... pat_n}) if all of pat_1 thru pat_n match + | (or @i{pat_1 ... pat_n}) if any of pat_1 thru pat_n match + | (not @i{pat_1 ... pat_n}) if all pat_1 thru pat_n don't match + | (? @i{predicate} @i{pat_1 ... pat_n}) if predicate true and all of + pat_1 thru pat_n match + | (set! @i{identifier}) anything, and binds setter + | (get! @i{identifier}) anything, and binds getter + | `@i{qp} a quasi-pattern + | (@i{identifier} *** @i{pat}) matches pat in a tree and binds + identifier to the path leading + to the object that matches pat + +@i{ooo} ::= + ... zero or more + | ___ zero or more + | ..1 1 or more + + quasi-patterns: matches: + +@i{qp} ::= + () the empty list + | #t #t + | #f #f + | @i{string} a string + | @i{number} a number + | @i{character} a character + | @i{identifier} a symbol + | (@i{qp_1 ... qp_n}) list of n elements + | (@i{qp_1 ... qp_n} . @i{qp_{n+1}}) list of n or more + | (@i{qp_1 ... qp_n qp_n+1} ooo) list of n or more, each element + of remainder must match qp_n+1 + | #(@i{qp_1 ... qp_n}) vector of n elements + | #(@i{qp_1 ... qp_n qp_n+1} ooo) vector of n or more, each element + of remainder must match qp_n+1 + | #&@i{qp} box + | ,@i{pat} a pattern + | ,@@@i{pat} a pattern +@end example The names @code{quote}, @code{quasiquote}, @code{unquote}, @code{unquote-splicing}, @code{?}, @code{_}, @code{$}, @code{and}, --Apple-Mail=_30A69841-A478-43CE-9B82-3CC0FD40D196--