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

Re: [Scheme-reports] <transformer spec> BNF



Hi Taylan,

On Mon, Sep 10, 2012 at 6:16 AM, Taylan Ulrich B.
<taylanbayirli@x> wrote:
> Section 4.3.2 (Pattern language) of R7RS draft 6 explains that "The
> <pattern> in a <syntax rule> is a list <pattern> whose first element is
> an identifier."
> Since there is no "should" or "must" used, what kind of restriction is
> this? The BNF in section 7.1.5 (Transformers) doesn't seem to include
> any such limitation. (It probably should, by using a different token in
> place of the initial <pattern>.)

"It is an error if <syntax rule> is not of the form (<pattern> <template>).
The <pattern> in a <syntax rule> is a list <pattern> whose first element
is an identifier."

Thus "it is an error,"  and implementations are free to do
whatever they want, though most will either ignore it or
signal an syntax error.

> By the way, I find the wording in the above quote from section 4.3.2
> confusing, since it is not clear at first what "a list <pattern>" is
> supposed to mean. Does anyone agree? (Using a different syntactic
> variable for the initial <pattern>, corresponding to the change in the
> BNF, would probably fix this issue.)

"List pattern" is simply a pattern which is a list, as
described further on in the section.  I don't think this
is confusing, but we're open to alternate suggestions.

> On an unrelated but very minor issue (it probably doesn't deserve its own
> mail), the word "template" on paragraph 3 of the "Syntax" section of
> section 4.3.2 (Pattern language) should be wrapped in angle brackets.

Thanks, fixed.

-- 
Alex

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