par-ch9.adb (P_Task, [...]): Indicate that single task and single protected declarati...
authorEd Schonberg <schonberg@adacore.com>
Mon, 4 Jul 2005 13:28:50 +0000 (15:28 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 4 Jul 2005 13:28:50 +0000 (15:28 +0200)
2005-07-04  Ed Schonberg  <schonberg@adacore.com>

* par-ch9.adb (P_Task, P_Protected): Indicate that single task and
single protected declarations can have an interface list.
(P_Entry_Declaration): Add handler for Error_Resync, which can be raised
with seriously malformed entry declarations, and lead to compilation
abandoned messages.

From-SVN: r101583

gcc/ada/par-ch9.adb

index 75c536834d5eb07c32cdb9d83417ecc2243809dd..57ba12402bad98065ded984e7f8a76a910da8c3b 100644 (file)
@@ -56,7 +56,8 @@ package body Ch9 is
    --      [is [new INTERFACE_LIST with] TASK_DEFINITION];
 
    --  SINGLE_TASK_DECLARATION ::=
-   --    task DEFINING_IDENTIFIER [is TASK_DEFINITION];
+   --    task DEFINING_IDENTIFIER
+   --      [is [new INTERFACE_LIST with] TASK_DEFINITION];
 
    --  TASK_BODY ::=
    --    task body DEFINING_IDENTIFIER is
@@ -348,7 +349,8 @@ package body Ch9 is
    --      is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
 
    --  SINGLE_PROTECTED_DECLARATION ::=
-   --    protected DEFINING_IDENTIFIER is PROTECTED_DEFINITION;
+   --    protected DEFINING_IDENTIFIER
+   --    is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
 
    --  PROTECTED_BODY ::=
    --    protected body DEFINING_IDENTIFIER is
@@ -860,6 +862,11 @@ package body Ch9 is
 
       TF_Semicolon;
       return Decl_Node;
+
+   exception
+      when Error_Resync =>
+         Resync_Past_Semicolon;
+         return Error;
    end P_Entry_Declaration;
 
    -----------------------------