-- --
-- S p e c --
-- --
--- Copyright (C) 2002, Free Software Foundation, Inc. --
+-- Copyright (C) 2002-2008, 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. --
with GNAT.Dynamic_Tables;
-with Types; use Types;
+with Namet; use Namet;
+with Types; use Types;
package Prep is
Table_Index_Type => Symbol_Id,
Table_Low_Bound => 1,
Table_Initial => 10,
- Table_Increment => 10);
+ Table_Increment => 100);
-- The table of all symbols
Mapping : Symbol_Table.Instance;
type New_EOL_Proc is access procedure;
- procedure Initialize
+ procedure Initialize;
+ -- Initialize the preprocessor's global structures
+
+ procedure Setup_Hooks
(Error_Msg : Error_Msg_Proc;
Scan : Scan_Proc;
Set_Ignore_Errors : Set_Ignore_Errors_Proc;
Put_Char : Put_Char_Proc;
New_EOL : New_EOL_Proc);
+ -- Set the i/o hooks used by the preprocessor
procedure Parse_Def_File;
-- Parse the definition file. The definition file must have already been
-- loaded and the scanner initialized.
- procedure Preprocess;
+ procedure Preprocess (Source_Modified : out Boolean);
-- Preprocess the input file. The input file must have already been loaded
- -- and the scanner initialized.
+ -- and the scanner initialized. Source_Modified is set to True iff the
+ -- preprocessor modified the source text.
procedure Check_Command_Line_Symbol_Definition
(Definition : String;
-- Tok_Identifier with the corresponding Token_Name.
procedure List_Symbols (Foreword : String);
- -- List the symbols used por preprocessing a file, with their values.
+ -- List the symbols used for preprocessing a file, with their values.
-- If Foreword is not empty, Output Foreword before the list.
end Prep;