* bug#22601: guile.texi section on ice-9 match [not found] ` <87io1zueog.fsf@gnu.org> @ 2016-02-08 21:04 ` Matt Wette 2016-08-07 11:38 ` Andy Wingo 2017-03-19 23:00 ` Matt Wette 0 siblings, 2 replies; 6+ messages in thread From: Matt Wette @ 2016-02-08 21:04 UTC (permalink / raw) To: 22601 [-- Attachment #1: Type: text/plain, Size: 697 bytes --] One problem I have with the ref’ manual is the section on (ice-9 match). The grammar has terms like “string” where I don’t know if this means the literal term “string” or a string literal. It would be nicer to have a grammar where the literal term “string” is in code-case and a string literal is described by “string” in italics. I have worked on rewriting the match match grammar as @example and as @table. Does either of these look better to you? See the PDF attached. I am willing to complete the whole mess in another format, but I need to know which one is preferred, if any, and someone has to verify that the new grammar specification is accurate. Matt [-- Attachment #2: guile_match.pdf --] [-- Type: application/pdf, Size: 158789 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#22601: guile.texi section on ice-9 match 2016-02-08 21:04 ` bug#22601: guile.texi section on ice-9 match Matt Wette @ 2016-08-07 11:38 ` Andy Wingo 2017-02-28 14:50 ` Andy Wingo 2017-03-19 23:00 ` Matt Wette 1 sibling, 1 reply; 6+ messages in thread From: Andy Wingo @ 2016-08-07 11:38 UTC (permalink / raw) To: Matt Wette; +Cc: 22601 On Mon 08 Feb 2016 22:04, Matt Wette <matthew.wette@verizon.net> writes: > One problem I have with the ref’ manual is the section on (ice-9 > match). The grammar has terms like “string” where I don’t know if > this means the literal term “string” or a string literal. It would be > nicer to have a grammar where the literal term “string” is in > code-case and a string literal is described by “string” in italics. I > have worked on rewriting the match match grammar as @example and as > @table. > > Does either of these look better to you? See the PDF attached. I am > willing to complete the whole mess in another format, but I need to > know which one is preferred, if any, and someone has to verify that > the new grammar specification is accurate. Would you mind attaching a .texi diff? I am having trouble getting context here. Thanks :) Andy ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#22601: guile.texi section on ice-9 match 2016-08-07 11:38 ` Andy Wingo @ 2017-02-28 14:50 ` Andy Wingo 0 siblings, 0 replies; 6+ messages in thread From: Andy Wingo @ 2017-02-28 14:50 UTC (permalink / raw) To: Matt Wette; +Cc: 22601 On Sun 07 Aug 2016 13:38, Andy Wingo <wingo@pobox.com> writes: > On Mon 08 Feb 2016 22:04, Matt Wette <matthew.wette@verizon.net> writes: > >> One problem I have with the ref’ manual is the section on (ice-9 >> match). The grammar has terms like “string” where I don’t know if >> this means the literal term “string” or a string literal. It would be >> nicer to have a grammar where the literal term “string” is in >> code-case and a string literal is described by “string” in italics. I >> have worked on rewriting the match match grammar as @example and as >> @table. >> >> Does either of these look better to you? See the PDF attached. I am >> willing to complete the whole mess in another format, but I need to >> know which one is preferred, if any, and someone has to verify that >> the new grammar specification is accurate. > > Would you mind attaching a .texi diff? I am having trouble getting > context here. Thanks :) Ping :) Cheers, Andy ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#22601: guile.texi section on ice-9 match 2016-02-08 21:04 ` bug#22601: guile.texi section on ice-9 match Matt Wette 2016-08-07 11:38 ` Andy Wingo @ 2017-03-19 23:00 ` Matt Wette 2017-03-19 23:42 ` Matt Wette 1 sibling, 1 reply; 6+ messages in thread From: Matt Wette @ 2017-03-19 23:00 UTC (permalink / raw) To: 22601 I can’t find my fixes. I will start working this again., — Matt ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#22601: guile.texi section on ice-9 match 2017-03-19 23:00 ` Matt Wette @ 2017-03-19 23:42 ` Matt Wette 2017-03-20 1:56 ` Matt Wette 0 siblings, 1 reply; 6+ messages in thread From: Matt Wette @ 2017-03-19 23:42 UTC (permalink / raw) To: 22601 [-- Attachment #1: Type: text/plain, Size: 61 bytes --] Patch for guile-2.2.0, wrt doc/ref/match.texi, is attached. [-- Attachment #2: match.texi.patch --] [-- Type: application/octet-stream, Size: 6774 bytes --] --- doc/ref/match.texi-orig 2015-04-11 13:07:14.000000000 -0700 +++ doc/ref/match.texi 2017-03-19 16:40:08.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 +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 + +ooo ::= + ... zero or more + | ___ zero or more + | ..1 1 or more + + quasi-patterns: matches: + +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}, ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#22601: guile.texi section on ice-9 match 2017-03-19 23:42 ` Matt Wette @ 2017-03-20 1:56 ` Matt Wette 0 siblings, 0 replies; 6+ messages in thread From: Matt Wette @ 2017-03-20 1:56 UTC (permalink / raw) To: 22601 [-- Attachment #1: Type: text/plain, Size: 253 bytes --] > On Mar 19, 2017, at 4:42 PM, Matt Wette <matt.wette@gmail.com> wrote: > > Patch for guile-2.2.0, wrt doc/ref/match.texi, is attached. > > <match.texi.patch> Updated patch. Upon proofread, I found an error wrt “ooo” in the original. [-- Attachment #2: match.texi.patch --] [-- Type: application/octet-stream, Size: 6780 bytes --] --- 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}, ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-20 1:56 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CA+tCiVbOjcjdK8_GYHUkEiq+5ZSsZiCjEO+1e0kwccsJ8BNWNw@mail.gmail.com> [not found] ` <87twlno63d.fsf@gnu.org> [not found] ` <CA+tCiVZ0F-T1Xtjo-FLpwjN7shUr28rpT2W_kYCpcfX26ibDiw@mail.gmail.com> [not found] ` <877figyxb2.fsf@dustycloud.org> [not found] ` <87si13k4nn.fsf@gnu.org> [not found] ` <87twljxbuq.fsf@dustycloud.org> [not found] ` <87io1zueog.fsf@gnu.org> 2016-02-08 21:04 ` bug#22601: guile.texi section on ice-9 match Matt Wette 2016-08-07 11:38 ` Andy Wingo 2017-02-28 14:50 ` Andy Wingo 2017-03-19 23:00 ` Matt Wette 2017-03-19 23:42 ` Matt Wette 2017-03-20 1:56 ` Matt Wette
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).