From 7dc5f546f00b73ed1400033e3d17416373f668da Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Tue, 14 Aug 2007 10:40:24 +0200 Subject: par.ads, par.adb: Improve handling of extra right parens. 2007-08-14 Robert Dewar Ed Schonberg * 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 --- gcc/ada/par.adb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'gcc/ada/par.adb') 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) -- cgit v1.1