diff options
author | Robert Dewar <dewar@adacore.com> | 2007-08-14 10:40:24 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-08-14 10:40:24 +0200 |
commit | 7dc5f546f00b73ed1400033e3d17416373f668da (patch) | |
tree | fabf23842abeb1091a1d9edaa14c897620da39dc /gcc/ada/par.adb | |
parent | 3355aa3e72ad9cc9cad23709967d82e897fb6bdf (diff) | |
download | gcc-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.adb')
-rw-r--r-- | gcc/ada/par.adb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb index f33d8ad..370dfbf 100644 --- a/gcc/ada/par.adb +++ b/gcc/ada/par.adb @@ -51,8 +51,7 @@ with Tbuild; use Tbuild; --------- function Par - (Configuration_Pragmas : Boolean; - From_Limited_With : Boolean := False) return List_Id + (Configuration_Pragmas : Boolean) return List_Id is Num_Library_Units : Natural := 0; -- Count number of units parsed (relevant only in syntax check only mode, @@ -1042,6 +1041,10 @@ is -- it is returned unchanged. Otherwise an error message is issued -- and Error is returned. + procedure Check_No_Right_Paren; + -- Called to check that the current token is not a right paren. If it + -- is, then an error is given, and the right parenthesis is scanned out. + function Comma_Present return Boolean; -- Used in comma delimited lists to determine if a comma is present, or -- can reasonably be assumed to have been present (an error message is @@ -1089,10 +1092,6 @@ is -- parameter. If a constraint is present, an error message is posted, -- and the constraint is scanned and discarded. - function No_Right_Paren (Expr : Node_Id) return Node_Id; - -- Function to check for no right paren at end of expression, returns - -- its argument if no right paren, else flags paren and returns Error. - procedure Push_Scope_Stack; pragma Inline (Push_Scope_Stack); -- Push a new entry onto the scope stack. Scope.Last (the stack pointer) |