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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.58.2 with SMTP id m2mr2988384obq.13.1449770383407; Thu, 10 Dec 2015 09:59:43 -0800 (PST) X-Received: by 10.182.250.169 with SMTP id zd9mr203629obc.1.1449770383380; Thu, 10 Dec 2015 09:59:43 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!feed118.news.tele.dk!mv3no11159913igc.0!news-out.google.com!f6ni19000igq.0!nntp.google.com!mv3no14356675igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 10 Dec 2015 09:59:43 -0800 (PST) In-Reply-To: <874mfqz0qr.fsf@theworld.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=90.198.100.141; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 90.198.100.141 References: <874mfqz0qr.fsf@theworld.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <02d6416b-57a8-4d99-bfb3-3baa5f30531c@googlegroups.com> Subject: Re: Placement of pragmas in the grammar (language laywers required) From: Lucretia Injection-Date: Thu, 10 Dec 2015 17:59:43 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:28756 Date: 2015-12-10T09:59:43-08:00 List-Id: 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.