From: Bob Duff <bobduff@theworld.com>
Subject: Re: Ada reference manual rule for doubled parentheses around if_expression?
Date: Sat, 01 Aug 2015 09:42:14 -0400
Date: 2015-08-01T09:42:14-04:00 [thread overview]
Message-ID: <87mvybktvt.fsf@theworld.com> (raw)
In-Reply-To: 86r3nnjrv2.fsf@stephe-leake.org
Stephen Leake <stephen_leake@stephe-leake.org> writes:
> Bob Duff <bobduff@theworld.com> writes:
>
>> Stephen Leake <stephen_leake@stephe-leake.org> 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.
You're welcome.
> There's a similar rule for quantified expressions in 4.5.8(4).
Right.
> 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.
I agree that's a bug. It doesn't seem to have anything to do with the
special rules about conditional/quantified expressions. Or does it?
If you report this to report@adacore.com, it will get fixed.
- Bob
next prev parent reply other threads:[~2015-08-01 13:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 17:00 Ada reference manual rule for doubled parentheses around if_expression? Stephen Leake
2015-07-31 18:29 ` Bob Duff
2015-08-01 7:36 ` Simon Wright
2015-08-01 9:11 ` Stephen Leake
2015-08-01 13:42 ` Bob Duff [this message]
2015-08-03 22:56 ` Randy Brukardt
2015-07-31 20:07 ` EGarrulo
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox