PR c++/3637
[official-gcc.git] / gcc / ada / fname-sf.ads
blob7d8d6ef2ad47c16b36a1809f3ce39fb1a637e206
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- F N A M E . S F --
6 -- --
7 -- S p e c --
8 -- --
9 -- $Revision$
10 -- --
11 -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
12 -- --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
23 -- --
24 -- GNAT was originally developed by the GNAT team at New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
26 -- --
27 ------------------------------------------------------------------------------
29 -- This child package contains a routine to read and process Source_File_Name
30 -- pragmas from the gnat.adc file in the current directory. In order to use
31 -- the routines in package Fname.UF, it is required that Source_File_Name
32 -- pragmas be processed. There are two places where such processing takes
33 -- place:
35 -- The compiler front end (par-prag.adb), which is the general circuit
36 -- for processing all pragmas, including Source_File_Name.
38 -- The stand alone routine in this unit, which is convenient to use
39 -- from tools that do not want to include the compiler front end.
41 -- Note that this unit does depend on several of the compiler front-end
42 -- sources, including osint. If it is necessary to scan source file name
43 -- pragmas with less dependence on such sources, look at unit SFN_Scan.
45 package Fname.SF is
47 procedure Read_Source_File_Name_Pragmas;
48 -- This procedure is called to read the gnat.adc file and process any
49 -- Source_File_Name pragmas contained in this file. All other pragmas
50 -- are ignored. The result is appropriate calls to routines in the
51 -- package Fname.UF to register the pragmas so that subsequent calls
52 -- to Get_File_Name work correctly.
54 -- Note: The caller must have made an appropriate call to the
55 -- Osint.Initialize routine to initialize Osint before calling
56 -- this procedure.
58 -- If a syntax error is detected while scanning the gnat.adc file,
59 -- then the exception SFN_Scan.Syntax_Error_In_GNAT_ADC is raised
60 -- and SFN_Scan.Cursor contains the approximate index relative to
61 -- the start of the gnat.adc file of the error.
63 end Fname.SF;