-- --
-- B o d y --
-- --
--- Copyright (C) 2003-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 2003-2009, 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- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
+-- Public License distributed with GNAT; see file COPYING3. If not, go to --
+-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
Source_Index_Of_Preproc_Data_File : Source_File_Index := No_Source_File;
- -- The following variable should be a constant, but this is not
- -- possible. Warnings are Off because it is never assigned a value.
+ -- The following variable should be a constant, but this is not possible
+ -- because its type GNAT.Dynamic_Tables.Instance has a component P of
+ -- unitialized private type GNAT.Dynamic_Tables.Table_Private and there
+ -- are no exported values for this private type. Warnings are Off because
+ -- it is never assigned a value.
pragma Warnings (Off);
No_Mapping : Prep.Symbol_Table.Instance;
-- Table to store the dependencies on preprocessing files
procedure Add_Command_Line_Symbols;
- -- Add the command line symbol definitions, if any, to the
- -- Prep.Mapping table.
+ -- Add the command line symbol definitions, if any, to Prep.Mapping table
procedure Skip_To_End_Of_Line;
-- Ignore errors and scan up to the next end of line or the end of file
if Source_Index_Of_Preproc_Data_File = No_Source_File then
Get_Name_String (N);
- Fail ("preprocessing data file """,
- Name_Buffer (1 .. Name_Len),
- """ not found");
+ Fail ("preprocessing data file """
+ & Name_Buffer (1 .. Name_Len)
+ & """ not found");
end if;
- -- Initialize the sanner and set its behavior for a processing data file
+ -- Initialize scanner and set its behavior for processing a data file
Scn.Scanner.Initialize_Scanner (Source_Index_Of_Preproc_Data_File);
Scn.Scanner.Set_End_Of_Line_As_Token (True);
-- with an underline or a digit.
if Name_Buffer (2) = '_'
- or Name_Buffer (2) in '0' .. '9'
+ or else Name_Buffer (2) in '0' .. '9'
then
Error_Msg ("symbol expected", Token_Ptr + 1);
Skip_To_End_Of_Line;
if Total_Errors_Detected > T then
Errout.Finalize (Last_Call => True);
Errout.Output_Messages;
- Fail ("errors found in preprocessing data file """,
- Get_Name_String (N),
- """");
+ Fail ("errors found in preprocessing data file """
+ & Get_Name_String (N) & """");
end if;
-- Record the dependency on the preprocessor data file
begin
if Deffile = No_Source_File then
- Fail ("definition file """,
- Get_Name_String (N),
- """ cannot be found");
+ Fail ("definition file """
+ & Get_Name_String (N)
+ & """ not found");
end if;
-- Initialize the preprocessor and set the characteristics of the
-- scanner for a definition file.
- Prep.Initialize
+ Prep.Setup_Hooks
(Error_Msg => Errout.Error_Msg'Access,
Scan => Scn.Scanner.Scan'Access,
Set_Ignore_Errors => Errout.Set_Ignore_Errors'Access,
if T /= Total_Errors_Detected then
Errout.Finalize (Last_Call => True);
Errout.Output_Messages;
- Fail ("errors found in definition file """,
- Get_Name_String (N),
- """");
+ Fail ("errors found in definition file """
+ & Get_Name_String (N)
+ & """");
end if;
for Index in 1 .. Dependencies.Last loop
Check_Command_Line_Symbol_Definition
(Definition => Symbol_Definitions (Index).all,
- Data => Symbol_Data);
+ Data => Symbol_Data);
Found := False;
-- If there is already a definition for this symbol, replace the old