From: Lucretia <laguest9000@googlemail.com>
Subject: Re: Placement of pragmas in the grammar (language laywers required)
Date: Thu, 10 Dec 2015 09:59:43 -0800 (PST)
Date: 2015-12-10T09:59:43-08:00 [thread overview]
Message-ID: <02d6416b-57a8-4d99-bfb3-3baa5f30531c@googlegroups.com> (raw)
In-Reply-To: <874mfqz0qr.fsf@theworld.com>
On Thursday, 10 December 2015 17:12:30 UTC, Bob Duff wrote:
> That won't work without additional checks, because of the "not in place
> of" wording. This is syntactically illegal:
>
> type T is record
> pragma Listing(Off);
> end record;
I would assume the check to make sure pragma is "not in place of" something should be part of the semantic steps?
So far, I've modified the following from the EBNF in the manual:
-- 3.8
component_item =
component_declaration
| aspect_clause
| pragma
;
-- 3.11
basic_declarative_item =
basic_declaration
| aspect_clause
| use_clause
| pragma
;
-- 9.1
task_item =
entry_declaration
| aspect_clause
| pragma
;
-- 9.4
protected_operation_item =
subprogram_declaration
| subprogram_body
| entry_body
| aspect_clause
| pragma
;
-- 10.1.1
library_item =
[private] library_unit_declaration
| library_unit_body
| [private] library_unit_renaming_declaration
| pragma
;
The pragma in library_item seems to cover context_item as well due to:
compilation_unit ::=
context_clause library_item
| context_clause subunit
Where library_item reduces to pragma and context_clause would reduce to the empty string. I mean, I could put it in every case, but that seems like overkill.
next prev parent reply other threads:[~2015-12-10 17:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 7:46 Placement of pragmas in the grammar (language laywers required) Lucretia
2015-12-10 14:39 ` Lucretia
2015-12-10 17:12 ` Bob Duff
2015-12-10 17:59 ` Lucretia [this message]
2015-12-10 18:19 ` Bob Duff
2015-12-10 23:47 ` 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