From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.31.48.215 with SMTP id w206mr7277063vkw.12.1472327280601; Sat, 27 Aug 2016 12:48:00 -0700 (PDT) X-Received: by 10.157.44.69 with SMTP id f63mr716975otb.2.1472327280560; Sat, 27 Aug 2016 12:48:00 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!j37no11062205qta.0!news-out.google.com!b4ni1817iti.0!nntp.google.com!j128no486315ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 27 Aug 2016 12:48:00 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=50.250.26.106; posting-account=3pYsyQoAAACcI-ym7XtMOI2PDU8gRZS5 NNTP-Posting-Host: 50.250.26.106 References: <60637c3a-c699-4e4c-9fd3-1a081cb6152c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5fef75a7-2232-472e-a4e0-03921e1b5eb9@googlegroups.com> Subject: Re: Select + Accept syntax question From: Andrew Shvets Injection-Date: Sat, 27 Aug 2016 19:48:00 +0000 Content-Type: text/plain; charset=UTF-8 X-Received-Bytes: 2366 X-Received-Body-CRC: 756270081 Xref: news.eternal-september.org comp.lang.ada:31611 Date: 2016-08-27T12:48:00-07:00 List-Id: 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.