diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-14 08:40:24 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-14 08:40:24 +0000 |
commit | d46888e96a5b5964371116002f3bd696846731c2 (patch) | |
tree | fabf23842abeb1091a1d9edaa14c897620da39dc /gcc/ada/par-util.adb | |
parent | b8d0503fc28984d30fe773b54c5b825ceb496fb7 (diff) | |
download | gcc-d46888e96a5b5964371116002f3bd696846731c2.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127423 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-util.adb')
-rw-r--r-- | gcc/ada/par-util.adb | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb index 0dd7f0bbc72..2971f563386 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 -- --------------------- |