1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 2002-2003, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, USA. --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
25 ------------------------------------------------------------------------------
27 -- This package stores all preprocessing data for the compiler
29 with Types
; use Types
;
33 procedure Add_Dependencies
;
34 -- Add dependencies on the preprocessing data file and the
35 -- preprocessing definition files, if any.
37 procedure Add_Symbol_Definition
(Def
: String);
38 -- Add a symbol definition from the command line.
39 -- Fail if definition is illegal.
41 procedure Check_Symbols
;
42 -- Check if there are preprocessing symbols on the command line and
43 -- set preprocessing if there are some: all files are preprocessed with
44 -- these symbols. This procedure should not be called if there is a
45 -- preprocessing data file specified on the command line. Procedure
46 -- Parse_Preprocessing_Data_File should be called instead.
48 procedure Parse_Preprocessing_Data_File
(N
: File_Name_Type
);
49 -- Parse a preprocessing data file, specified with a -gnatep= switch.
51 procedure Prepare_To_Preprocess
52 (Source
: File_Name_Type
;
53 Preprocessing_Needed
: out Boolean);
54 -- Prepare, if necessary, the preprocessor for a source file.
55 -- If the source file needs to be preprocessed, Preprocessing_Needed
56 -- is set to True. Otherwise, Preprocessing_Needed is set to False
57 -- and no preprocessing needs to be done.
59 procedure Process_Command_Line_Symbol_Definitions
;
60 -- Check symbol definitions that have been added by calls to procedure
61 -- Add_Symbol_Definition and stored as pointers to string, and put them in
62 -- a table. The reason the definitions were stored as pointer to strings is
63 -- that the name table is not yest initialized when we process the command
64 -- line switches. These symbol definitions will be later used in
65 -- the call to Prepare_To_Preprocess.