1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2001 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, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, 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 child package contains a routine to read and process Source_File_Name
28 -- pragmas from the gnat.adc file in the current directory. In order to use
29 -- the routines in package Fname.UF, it is required that Source_File_Name
30 -- pragmas be processed. There are two places where such processing takes
33 -- The compiler front end (par-prag.adb), which is the general circuit
34 -- for processing all pragmas, including Source_File_Name.
36 -- The stand alone routine in this unit, which is convenient to use
37 -- from tools that do not want to include the compiler front end.
39 -- Note that this unit does depend on several of the compiler front-end
40 -- sources, including osint. If it is necessary to scan source file name
41 -- pragmas with less dependence on such sources, look at unit SFN_Scan.
45 procedure Read_Source_File_Name_Pragmas
;
46 -- This procedure is called to read the gnat.adc file and process any
47 -- Source_File_Name pragmas contained in this file. All other pragmas
48 -- are ignored. The result is appropriate calls to routines in the
49 -- package Fname.UF to register the pragmas so that subsequent calls
50 -- to Get_File_Name work correctly.
52 -- Note: The caller must have made an appropriate call to the
53 -- Osint.Initialize routine to initialize Osint before calling
56 -- If a syntax error is detected while scanning the gnat.adc file,
57 -- then the exception SFN_Scan.Syntax_Error_In_GNAT_ADC is raised
58 -- and SFN_Scan.Cursor contains the approximate index relative to
59 -- the start of the gnat.adc file of the error.