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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!1.eu.feeder.erje.net!news.ripco.com!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Ada reference manual rule for doubled parentheses around if_expression? References: <864mkkz2hy.fsf@stephe-leake.org> <87r3nokwpf.fsf@theworld.com> Date: Sat, 01 Aug 2015 04:11:13 -0500 Message-ID: <86r3nnjrv2.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) Cancel-Lock: sha1:1nOhNghmQcxcigq6xQff1t5t75A= MIME-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: ca1f455bc8d34e97f808432744 X-Received-Bytes: 1530 X-Received-Body-CRC: 3115298836 Xref: news.eternal-september.org comp.lang.ada:27290 Date: 2015-08-01T04:11:13-05:00 List-Id: Bob Duff writes: > Stephen Leake writes: > >> I remember seeing some rule in the Ada reference manual that says the >> doubled parens are not needed here. But now I can't find the rule, and I >> don't want to edit my grammar without a reference. >> >> Anyone know where that rule is? or what to search for? > > 4.5.7(7). This is a syntax rule, despite not being written in BNF. > I suggest you read the AARM annotations. Thanks. There's a similar rule for quantified expressions in 4.5.8(4). GNAT also accepts this: function Expression_Function_1 (V : Integer) return Boolean is (V = V and then True) or else True; I think that's a bug, because there are no parens surrounding the entire expression. -- -- Stephe