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!.POSTED!not-for-mail From: Bob Duff Newsgroups: comp.lang.ada Subject: Re: Ada reference manual rule for doubled parentheses around if_expression? Date: Fri, 31 Jul 2015 14:29:00 -0400 Organization: A noiseless patient Spider Message-ID: <87r3nokwpf.fsf@theworld.com> References: <864mkkz2hy.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="dbf438bd48d425cc74f5c312318b1ef1"; logging-data="27892"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+31EUkVkI8GgQsLOoHDD5P" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:7buIIeTeJgjPtR3whLouDyn5NXs= sha1:h7mdcHjTkpPYynwgrkTmJDxsAP4= Xref: news.eternal-september.org comp.lang.ada:27275 Date: 2015-07-31T14:29:00-04:00 List-Id: Stephen Leake writes: > A question recently came up on the Emacs ada-mode list; my Emacs > ada-mode parser rejects this if_expression in an association list: > > Tmp : Boolean := Id (if True then True else True); > > but accepts this: > > Tmp : Boolean := Id ((if True then True else True)); > > 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. - Bob