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.13.212.132 with SMTP id w126mr4737100ywd.57.1449733604676; Wed, 09 Dec 2015 23:46:44 -0800 (PST) X-Received: by 10.182.112.135 with SMTP id iq7mr155842obb.10.1449733604635; Wed, 09 Dec 2015 23:46:44 -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!news.glorb.com!f78no7541029qge.1!news-out.google.com!f6ni18583igq.0!nntp.google.com!mv3no14122565igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 9 Dec 2015 23:46:44 -0800 (PST) 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 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Placement of pragmas in the grammar (language laywers required) From: Lucretia Injection-Date: Thu, 10 Dec 2015 07:46:44 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28748 Date: 2015-12-09T23:46:44-08:00 List-Id: Hi, I'm looking at the 2012 grammar in the AARM/LRM and I just don't get why yo= u designers don't include pragma's in their correct places instead of sayin= g: 5 Pragmas are only allowed at the following places in a program:=20 6 After a semicolon delimiter, but not within a formal_part or discriminant= _part. 7/3 {AI05-0100-1} {AI05-0163-1} At any place where the syntax rules allow a= construct defined by a syntactic category whose name ends with "declaratio= n", "item", "statement", "clause", or "alternative", or one of the syntacti= c categories variant or exception_handler; but not in place of such a const= ruct if the construct is required, or is part of a list that is required to= have at least one such construct. Also at any place where a compilation_un= it would be allowed. 7.1/3 {AI05-0163-1} In place of a statement in a sequence_of_statements. 7.2/3 {AI05-0100-1} At any place where a compilation_unit is allowed.=20 etc. So, for basic_declaration, do I add pragma as follows: basic_declaration ::=3D=20 type_declaration | subtype_declaration | object_declaration | number_declaration | subprogram_declaration | abstract_subprogram_declaration | null_procedure_declaration | expression_function_declaration | package_declaration | renaming_declaration | exception_declaration | generic_declaration | generic_instantiation | pragma and then inside each of the above *_declaration's, e.g. type_declaration: type_declaration ::=3D full_type_declaration | incomplete_type_declaration | private_type_declaration | private_extension_declaration | pragma and again inside the above *_declaration's? And then, e.g component_item: component_item ::=3D component_declaration | aspect_clause | pragma and agian inside the component_declaration rule? Seems overkill. I must be missing something here. Thanks, Luke.