From patchwork Wed Nov 18 10:06:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 545938 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 52D94141448 for ; Wed, 18 Nov 2015 21:06:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=PtXAxTER; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=EA88VEnmJKYCNI86DkCxuZthmQqPSBg07uMPQQybnPQRmLVjyB EIdzfRd4bZdU5/5WTJT3BzRThxPH7haMbJuPSjJvp0eLUhGwO3CInUZ3w7mHf5hz XSdJdYHePbW7rWFFl78bQAbFKRAGRkabO0BYwnI6tVwrW5jNvJbmUdAfY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=np38UGvpXKb9Hbr7B/2tsaBu3SE=; b=PtXAxTERyJuO/O0oevvW BVMK5bgT2t+f+oCUcHKrHY0KyQQkqdfcjovbrxHY5gc2IE11ADseTR2HiBNyXtCE g03QFqsNLN1kniWu26FNmvMtjlPy03KwTfATWKEH1Y9T1cl7Q7rzgtNyZz3ZJANn SNlNojrynpV5QBtU6upIVPU= Received: (qmail 26132 invoked by alias); 18 Nov 2015 10:06:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 26036 invoked by uid 89); 18 Nov 2015 10:06:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL, BAYES_40, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, T_FILL_THIS_FORM_SHORT, UPPERCASE_50_75 autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 18 Nov 2015 10:06:11 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 9878E2998F; Wed, 18 Nov 2015 05:06:09 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cd2Ug-mXkVAM; Wed, 18 Nov 2015 05:06:09 -0500 (EST) Received: from tron.gnat.com (tron.gnat.com [205.232.38.10]) by rock.gnat.com (Postfix) with ESMTP id 8808F2952A; Wed, 18 Nov 2015 05:06:09 -0500 (EST) Received: by tron.gnat.com (Postfix, from userid 4192) id 8792236E; Wed, 18 Nov 2015 05:06:09 -0500 (EST) Date: Wed, 18 Nov 2015 05:06:09 -0500 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Hristian Kirtchev Subject: [Ada] Malformed argument with pragma Refined_State Message-ID: <20151118100609.GA16783@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) This patch modifies the grammars of pragmas Abstract_State, Depends, Global, Initializes, Refined_Depends, Refined_Global and Refined_State to explicitly request a single argument. No need for a test as this is a documentation enhancement. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-11-18 Hristian Kirtchev * sem_prag.adb (Analyze_Pragma): Update the grammars of pragmas Abstract_State, Depends, Global, Initializes, Refined_Depends, Refined_Global and Refined_State. Index: sem_prag.adb =================================================================== --- sem_prag.adb (revision 230522) +++ sem_prag.adb (working copy) @@ -9998,7 +9998,7 @@ -- ABSTRACT_STATE_LIST ::= -- null -- | STATE_NAME_WITH_OPTIONS - -- | (STATE_NAME_WITH_OPTIONS {, STATE_NAME_WITH_OPTIONS} ) + -- | (STATE_NAME_WITH_OPTIONS {, STATE_NAME_WITH_OPTIONS}) -- STATE_NAME_WITH_OPTIONS ::= -- STATE_NAME @@ -10018,7 +10018,7 @@ -- EXTERNAL_PROPERTY_LIST ::= -- EXTERNAL_PROPERTY - -- | (EXTERNAL_PROPERTY {, EXTERNAL_PROPERTY} ) + -- | (EXTERNAL_PROPERTY {, EXTERNAL_PROPERTY}) -- EXTERNAL_PROPERTY ::= -- Async_Readers [=> boolean_EXPRESSION] @@ -13412,8 +13412,8 @@ -- pragma Depends (DEPENDENCY_RELATION); -- DEPENDENCY_RELATION ::= - -- null - -- | DEPENDENCY_CLAUSE {, DEPENDENCY_CLAUSE} + -- null + -- | (DEPENDENCY_CLAUSE {, DEPENDENCY_CLAUSE}) -- DEPENDENCY_CLAUSE ::= -- OUTPUT_LIST =>[+] INPUT_LIST @@ -14945,9 +14945,9 @@ -- pragma Global (GLOBAL_SPECIFICATION); -- GLOBAL_SPECIFICATION ::= - -- null - -- | GLOBAL_LIST - -- | MODED_GLOBAL_LIST {, MODED_GLOBAL_LIST} + -- null + -- | (GLOBAL_LIST) + -- | (MODED_GLOBAL_LIST {, MODED_GLOBAL_LIST}) -- MODED_GLOBAL_LIST ::= MODE_SELECTOR => GLOBAL_LIST @@ -15689,20 +15689,18 @@ -- Initializes -- ----------------- - -- pragma Initializes (INITIALIZATION_SPEC); + -- pragma Initializes (INITIALIZATION_LIST); - -- INITIALIZATION_SPEC ::= null | INITIALIZATION_LIST - -- INITIALIZATION_LIST ::= - -- INITIALIZATION_ITEM - -- | (INITIALIZATION_ITEM {, INITIALIZATION_ITEM}) + -- null + -- | (INITIALIZATION_ITEM {, INITIALIZATION_ITEM}) -- INITIALIZATION_ITEM ::= name [=> INPUT_LIST] -- INPUT_LIST ::= - -- null - -- | INPUT - -- | (INPUT {, INPUT}) + -- null + -- | INPUT + -- | (INPUT {, INPUT}) -- INPUT ::= name @@ -19287,8 +19285,8 @@ -- pragma Refined_Depends (DEPENDENCY_RELATION); -- DEPENDENCY_RELATION ::= - -- null - -- | DEPENDENCY_CLAUSE {, DEPENDENCY_CLAUSE} + -- null + -- | (DEPENDENCY_CLAUSE {, DEPENDENCY_CLAUSE}) -- DEPENDENCY_CLAUSE ::= -- OUTPUT_LIST =>[+] INPUT_LIST @@ -19363,9 +19361,9 @@ -- pragma Refined_Global (GLOBAL_SPECIFICATION); -- GLOBAL_SPECIFICATION ::= - -- null - -- | GLOBAL_LIST - -- | MODED_GLOBAL_LIST {, MODED_GLOBAL_LIST} + -- null + -- | (GLOBAL_LIST) + -- | (MODED_GLOBAL_LIST {, MODED_GLOBAL_LIST}) -- MODED_GLOBAL_LIST ::= MODE_SELECTOR => GLOBAL_LIST @@ -19488,15 +19486,14 @@ -- pragma Refined_State (REFINEMENT_LIST); -- REFINEMENT_LIST ::= - -- REFINEMENT_CLAUSE - -- | (REFINEMENT_CLAUSE {, REFINEMENT_CLAUSE}) + -- (REFINEMENT_CLAUSE {, REFINEMENT_CLAUSE}) -- REFINEMENT_CLAUSE ::= state_NAME => CONSTITUENT_LIST -- CONSTITUENT_LIST ::= - -- null - -- | CONSTITUENT - -- | (CONSTITUENT {, CONSTITUENT}) + -- null + -- | CONSTITUENT + -- | (CONSTITUENT {, CONSTITUENT}) -- CONSTITUENT ::= object_NAME | state_NAME