From: Andrew Shvets <andrew.shvets@gmail.com>
Subject: Re: Select + Accept syntax question
Date: Sat, 27 Aug 2016 12:48:00 -0700 (PDT)
Date: 2016-08-27T12:48:00-07:00 [thread overview]
Message-ID: <5fef75a7-2232-472e-a4e0-03921e1b5eb9@googlegroups.com> (raw)
In-Reply-To: <npsq41$7or$1@dont-email.me>
On Saturday, August 27, 2016 at 3:36:35 PM UTC-4, Jeffrey R. Carter wrote:
> On 08/27/2016 11:26 AM, Andrew Shvets wrote:
> >
> > Why does this happen? Why can't I have code right before the accept? I can
> > see a compilation error if there is no accept...
>
> The definition of a selective accept doesn't allow this. This definition is in
> ARM 9.7.1(2-7)
>
> http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-9-7-1.html
>
> 2
> selective_accept ::=
> select
> [guard]
> select_alternative
> { or
> [guard]
> select_alternative }
> [ else
> sequence_of_statements ]
> end select;
> 3
> guard ::= when condition =>
> 4
> select_alternative ::=
> accept_alternative
> | delay_alternative
> | terminate_alternative
> 5
> accept_alternative ::=
> accept_statement [sequence_of_statements]
> 6
> delay_alternative ::=
> delay_statement [sequence_of_statements]
> 7
> terminate_alternative ::= terminate;
>
> So the 1st thing after "select [guard]" or "or [guard]" has to be an accept,
> delay, or terminate statement.
>
> --
> Jeff Carter
> "Monsieur Arthur King, who has the brain of a duck, you know."
> Monty Python & the Holy Grail
> 09
I see, thank you.
next prev parent reply other threads:[~2016-08-27 19:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-27 18:26 Select + Accept syntax question Andrew Shvets
2016-08-27 19:20 ` Niklas Holsti
2016-08-27 19:47 ` Andrew Shvets
2016-08-28 6:52 ` Niklas Holsti
2016-08-27 19:36 ` Jeffrey R. Carter
2016-08-27 19:48 ` Andrew Shvets [this message]
2016-08-27 23:22 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox