[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] R7RS final (draft #10?) - question for section 4.3.2 Pattern language and 7.1.5 Transformers



Ok, I understand.

If the grammar was to be updated, would something like the following be correct?

> $ git diff -w -U
> diff --git a/spec/syn.tex b/spec/syn.tex
> index a620f91..a253a77 100644
> --- a/spec/syn.tex
> +++ b/spec/syn.tex
> @@ -381,7 +381,12 @@ un\-quo\-ta\-tion $D$} takes precedence.
>  \> (syntax-rules (\arbno{\meta{identifier}}) \arbno{\meta{syntax rule}})
>  \> \| (syntax-rules \meta{identifier} (\arbno{\meta{identifier}})
>  \> \> \ \ \arbno{\meta{syntax rule}})
> -\meta{syntax rule} \: (\meta{pattern} \meta{template})
> +\meta{syntax rule} \: (\meta{srpattern} \meta{template})
> +\meta{srpattern} \: (\arbno{\meta{pattern}})
> +\>  \| (\atleastone{\meta{pattern}} . \meta{pattern})
> +\>  \| (\arbno{\meta{pattern}} \meta{pattern} \meta{ellipsis} \arbno{\meta{pattern}})
> +\>  \| (\arbno{\meta{pattern}} \meta{pattern} \meta{ellipsis} \arbno{\meta{pattern}}
> +\> \> \ \ . \meta{pattern})
>  \meta{pattern} \: \meta{pattern identifier}
>  \>  \| \meta{underscore}
>  \>  \| (\arbno{\meta{pattern}})
> 


Thanks.

Joe N.

On 2013/08/21, at 0:57, John Cowan <cowan@x> wrote:

> Joseph Wayne Norton scripsit:
> 
>> For R7RS final (draft #10?), the definition of the <pattern> grammar
>> in section 7.1.5 Transformers does not match with the explanation
>> given in section 4.3.2 Pattern language.  Is this an intentional loose
>> definition of <pattern> or a bug with the definition of <pattern> ?
> 
> It's inherited from R5RS.  It's definitely correct that the top-level
> pattern has to be a list pattern, not a vector pattern or an identifier
> pattern, because that couldn't match the source code.  R6RS gives a more
> restricted syntactic definition of a top-level pattern, but we missed
> transcribing that into R7RS-small.
> 
> I don't think it's a serious error: the prose often sets further limits
> on what 7.1 permits.
> 
> -- 
> Note that nobody these days would clamor for fundamental laws        John Cowan
> of *the theory of kangaroos*, showing why pseudo-kangaroos are   cowan@x
> physically, logically, metaphysically impossible.    http://www.ccil.org/~cowan
> Kangaroos are wonderful, but not *that* wonderful.     --Dan Dennett on zombies


_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports