[m-rev.] for review: Overhaul of the Syntax chapter of the reference manual

Mark Brown mark at mercurylang.org
Wed Sep 7 18:52:08 AEST 2022


Hi,

Attached is another diff - it's the full diff as the relative diff is
no shorter. Also attached is the html that results from
--split=chapter.

On Sun, Sep 4, 2022 at 12:34 PM Peter Wang <novalazy at gmail.com> wrote:
>
> On Sat, 03 Sep 2022 17:20:22 +1000 Mark Brown <mark at mercurylang.org> wrote:
> > On Fri, Sep 2, 2022 at 5:32 PM Peter Wang <novalazy at gmail.com> wrote:
> ...
> >
> > So here's another structure, also for the sake of discussion:
> >
> > 2. Syntax
> >   2.1 Character set
> >   2.2 Whitespace
> >   2.3 Comments
> >   2.4 Line number directives
> >   2.5 Variables
> >   2.6 Names
> >   2.7 Literals
> >   2.8 Punctuation
> >   2.9 Operators
> >   2.10 Terms
> >   2.11 Items
> >
> > The literals section could also be split.
> >
>
> That looks fine to me. I'd want to move Line number directives later,
> after Operators.

The reason for putting it there is that whitespace, comments, and line
number directives play a common role in separating tokens, whereas the
next four sections _are_ the tokens. So it made sense to group the
sections that way.

I've followed Julien's suggestion in avoiding "Semantics" in the name
of chapter 3 - it is now "Clauses". I've still kept the section that
covers declarative and operational semantics, because I think we need
to do that, but I've adjusted the tone to be more matter-of-fact and
made the content more focused on Mercury specifically.

I tried making "State variables" its own chapter but the result didn't
seem right - it really made more sense under "Clauses". I did,
however, move it after "Expressions" since it refers to expressions a
lot more than the other way around.

I've made "Definite clause grammars" its own section, which covers the
transformation to the head as well as the body. I've put it at the end
of the section since it has pretty much been superseded by state
variables. It could go earlier, though, it just should be after state
variables.

Cheers,
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: application/octet-stream
Size: 126595 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220907/1b9cd682/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mercury_ref.tar.gz
Type: application/gzip
Size: 174786 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220907/1b9cd682/attachment-0001.gz>


More information about the reviews mailing list