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-ch3.adb | |
parent | b8d0503fc28984d30fe773b54c5b825ceb496fb7 (diff) | |
download | ppe42-gcc-d46888e96a5b5964371116002f3bd696846731c2.tar.gz ppe42-gcc-d46888e96a5b5964371116002f3bd696846731c2.zip |
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-ch3.adb')
-rw-r--r-- | gcc/ada/par-ch3.adb | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb index 54c514911f6..53b3c35554b 100644 --- a/gcc/ada/par-ch3.adb +++ b/gcc/ada/par-ch3.adb @@ -61,15 +61,14 @@ package body Ch3 is Done : out Boolean; In_Spec : Boolean); -- Scans out a single declarative item, or, in the case of a declaration - -- with a list of identifiers, a list of declarations, one for each of - -- the identifiers in the list. The declaration or declarations scanned - -- are appended to the given list. Done indicates whether or not there - -- may be additional declarative items to scan. If Done is True, then - -- a decision has been made that there are no more items to scan. If - -- Done is False, then there may be additional declarations to scan. - -- In_Spec is true if we are scanning a package declaration, and is used - -- to generate an appropriate message if a statement is encountered in - -- such a context. + -- with a list of identifiers, a list of declarations, one for each of the + -- identifiers in the list. The declaration or declarations scanned are + -- appended to the given list. Done indicates whether or not there may be + -- additional declarative items to scan. If Done is True, then a decision + -- has been made that there are no more items to scan. If Done is False, + -- then there may be additional declarations to scan. In_Spec is true if + -- we are scanning a package declaration, and is used to generate an + -- appropriate message if a statement is encountered in such a context. procedure P_Identifier_Declarations (Decls : List_Id; @@ -2410,7 +2409,7 @@ package body Ch3 is begin Constraint_Node := New_Node (N_Digits_Constraint, Token_Ptr); Scan; -- past DIGITS - Expr_Node := P_Expression_No_Right_Paren; + Expr_Node := P_Expression; Check_Simple_Expression_In_Ada_83 (Expr_Node); Set_Digits_Expression (Constraint_Node, Expr_Node); @@ -2442,7 +2441,7 @@ package body Ch3 is begin Constraint_Node := New_Node (N_Delta_Constraint, Token_Ptr); Scan; -- past DELTA - Expr_Node := P_Expression_No_Right_Paren; + Expr_Node := P_Expression; Check_Simple_Expression_In_Ada_83 (Expr_Node); Set_Delta_Expression (Constraint_Node, Expr_Node); @@ -3505,7 +3504,8 @@ package body Ch3 is else begin - Expr_Node := No_Right_Paren (P_Expression_Or_Range_Attribute); + Expr_Node := P_Expression_Or_Range_Attribute; + Check_No_Right_Paren; if Token = Tok_Colon and then Nkind (Expr_Node) = N_Identifier @@ -3602,7 +3602,7 @@ package body Ch3 is if Abstract_Present then Error_Msg_SP ("ABSTRACT not allowed in interface type definition " & - "('R'M' 3.9.4(2/2))"); + "(RM 3.9.4(2/2))"); end if; Scan; -- past INTERFACE @@ -3983,7 +3983,9 @@ package body Ch3 is Scan_State : Saved_Scan_State; begin - if Style_Check then Style.Check_Indentation; end if; + if Style_Check then + Style.Check_Indentation; + end if; case Token is |