aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-util.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2007-08-14 10:40:24 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-08-14 10:40:24 +0200
commit7dc5f546f00b73ed1400033e3d17416373f668da (patch)
treefabf23842abeb1091a1d9edaa14c897620da39dc /gcc/ada/par-util.adb
parent3355aa3e72ad9cc9cad23709967d82e897fb6bdf (diff)
downloadgcc-7dc5f546f00b73ed1400033e3d17416373f668da.zip
gcc-7dc5f546f00b73ed1400033e3d17416373f668da.tar.gz
gcc-7dc5f546f00b73ed1400033e3d17416373f668da.tar.bz2
par.ads, par.adb: Improve handling of extra right parens.
2007-08-14 Robert Dewar <dewar@adacore.com> Ed Schonberg <schonberg@adacore.com> * par.ads, par.adb: Improve handling of extra right parens. (Par): Remove flag From_Limited_With_Clause. * par-util.adb, par-ch3.adb: Improve error recovery for bad constraint Improve handling of extra right parens. From-SVN: r127423
Diffstat (limited to 'gcc/ada/par-util.adb')
-rw-r--r--gcc/ada/par-util.adb29
1 files changed, 13 insertions, 16 deletions
diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb
index 0dd7f0b..2971f56 100644
--- a/gcc/ada/par-util.adb
+++ b/gcc/ada/par-util.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -176,6 +176,18 @@ package body Util is
end if;
end Check_Misspelling_Of;
+ --------------------------
+ -- Check_No_Right_Paren --
+ --------------------------
+
+ procedure Check_No_Right_Paren is
+ begin
+ if Token = Tok_Right_Paren then
+ Error_Msg_SC ("unexpected right parenthesis");
+ Scan; -- past unexpected right paren
+ end if;
+ end Check_No_Right_Paren;
+
-----------------------------
-- Check_Simple_Expression --
-----------------------------
@@ -587,21 +599,6 @@ package body Util is
end if;
end No_Constraint;
- --------------------
- -- No_Right_Paren --
- --------------------
-
- function No_Right_Paren (Expr : Node_Id) return Node_Id is
- begin
- if Token = Tok_Right_Paren then
- Error_Msg_SC ("unexpected right parenthesis");
- Resync_Expression;
- return Error;
- else
- return Expr;
- end if;
- end No_Right_Paren;
-
---------------------
-- Pop_Scope_Stack --
---------------------