comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: 'raise' in aspects?
Date: Wed, 22 Oct 2014 13:08:09 -0500
Date: 2014-10-22T13:08:09-05:00	[thread overview]
Message-ID: <85h9ywasfq.fsf@stephe-leake.org> (raw)
In-Reply-To: 85siilc88t.fsf@stephe-leake.org

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> The Ada mode 5.0 parser rejects this code:
>
>    subtype Integer_String is String
>      with Dynamic_Predicate => Integer'Value (Integer_String) in Integer
>             or else raise Constraint_Error with "not an integer string";
>
> It complains that 'raise' is not allowed here.
>
> ALRM Annex P says the syntax for an aspect is:
>
>      aspect_specification ::= 
>         with aspect_mark [=> aspect_definition] {,
>                 aspect_mark [=> aspect_definition] }
>
>      aspect_mark ::= aspect_identifier['Class]
>
>      aspect_definition ::= name | expression | identifier
>
>
> And you can't put 'raise' in an expression, which is why the Ada mode
> parser rejects it.
>
> But GNAT GPL 2014 accepts it.
>
> Can anyone point me to RM language that allows 'raise' in aspects?

For the record:

ai12-0022 adds "raise_expression" to the "relation" syntax. It's a
binding interpretation on Ada 2012

http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0022-1.txt?rev=1.13

-- 
-- Stephe

  parent reply	other threads:[~2014-10-22 18:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-18 22:40 'raise' in aspects? Stephen Leake
2014-10-22  5:42 ` Simon Wright
2014-10-22  5:45   ` Simon Wright
2014-10-22 18:08 ` Stephen Leake [this message]
2014-10-23 22:42   ` Randy Brukardt
2014-10-24  3:22     ` Shark8
2014-10-24  7:20     ` Simon Wright
2014-10-26  5:16       ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox