diff options
author | Robert Dewar <dewar@adacore.com> | 2008-03-26 08:37:49 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-03-26 08:37:49 +0100 |
commit | 3b8d33ef1d3979b83e0085ab8a87b06b48399441 (patch) | |
tree | 9d1f0e5b1c9f80ad8a1def0a2041c72ffa1a6555 /gcc/ada/par-util.adb | |
parent | 14f1ec15bd8860dee913a2207f598baddf13ae94 (diff) | |
download | gcc-3b8d33ef1d3979b83e0085ab8a87b06b48399441.zip gcc-3b8d33ef1d3979b83e0085ab8a87b06b48399441.tar.gz gcc-3b8d33ef1d3979b83e0085ab8a87b06b48399441.tar.bz2 |
par.adb (Check_No_Right_Paren): Removed no longer used
2008-03-26 Robert Dewar <dewar@adacore.com>
* par.adb (Check_No_Right_Paren): Removed no longer used
* par-ch10.adb (N_Pragma): Chars field removed, use Chars
(Pragma_Identifier (.. instead.
* par-ch10.adb (P_Subunit): Improvement in error recovery and message
* par-tchk.adb, par-ch5.adb, par-ch6.adb, par-ch3.adb,
par-ch4.adb: Minor improvements in error recovery and messages.
* erroutc.adb (Test_Style_Warning_Serious_Msg): Treat style msgs as
non-serious
* par-ch9.adb: Minor improvements in error recovery and messages
(P_Protected): Better error recovery for "protected type x;"
* par-util.adb: Minor improvements in error recovery and messages
(Check_No_Right_Paren): Removed no longer used
From-SVN: r133557
Diffstat (limited to 'gcc/ada/par-util.adb')
-rw-r--r-- | gcc/ada/par-util.adb | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb index e4b690f..98f66c6 100644 --- a/gcc/ada/par-util.adb +++ b/gcc/ada/par-util.adb @@ -109,7 +109,7 @@ package body Util is and then S = Name_Buffer (1 .. SL) then Scan_Ptr := Token_Ptr + S'Length; - Error_Msg_S ("missing space"); + Error_Msg_S ("|missing space"); Token := T; return True; end if; @@ -176,18 +176,6 @@ 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 -- ----------------------------- @@ -343,7 +331,7 @@ package body Util is <<Assume_Comma>> Restore_Scan_State (Scan_State); - Error_Msg_SC (""";"" illegal here, replaced by "","""); + Error_Msg_SC ("|"";"" should be "","""); Scan; -- past the semicolon return True; @@ -391,38 +379,33 @@ package body Util is procedure Ignore (T : Token_Type) is begin - if Token = T then + while Token = T loop if T = Tok_Comma then - Error_Msg_SC ("unexpected "","" ignored"); + Error_Msg_SC ("|extra "","" ignored"); elsif T = Tok_Left_Paren then - Error_Msg_SC ("unexpected ""("" ignored"); + Error_Msg_SC ("|extra ""("" ignored"); elsif T = Tok_Right_Paren then - Error_Msg_SC ("unexpected "")"" ignored"); + Error_Msg_SC ("|extra "")"" ignored"); elsif T = Tok_Semicolon then - Error_Msg_SC ("unexpected "";"" ignored"); + Error_Msg_SC ("|extra "";"" ignored"); + + elsif T = Tok_Colon then + Error_Msg_SC ("|extra "":"" ignored"); else declare Tname : constant String := Token_Type'Image (Token); - Msg : String := "unexpected keyword ????????????????????????"; - begin - -- Loop to copy characters of keyword name (ignoring Tok_) - - for J in 5 .. Tname'Last loop - Msg (J + 14) := Fold_Upper (Tname (J)); - end loop; - - Msg (Tname'Last + 15 .. Tname'Last + 22) := " ignored"; - Error_Msg_SC (Msg (1 .. Tname'Last + 22)); + Error_Msg_SC + ("|extra " & Tname (5 .. Tname'Last) & "ignored"); end; end if; Scan; -- Scan past ignored token - end if; + end loop; end Ignore; ---------------------------- @@ -438,7 +421,6 @@ package body Util is declare Ident_Casing : constant Casing_Type := Identifier_Casing (Current_Source_File); - Key_Casing : constant Casing_Type := Keyword_Casing (Current_Source_File); |