* gcc.c (getenv_spec_function): New function.
[official-gcc.git] / gcc / ada / prj-err.ads
blobba528f1f99a25258cc285b6261bebfbd24f7c171
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- P R J . E R R --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 2002-2005, Free Software Foundation, Inc. --
10 -- --
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. --
21 -- --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 -- --
25 ------------------------------------------------------------------------------
27 -- This package contains the routines to output error messages and the scanner
28 -- for the project files. It replaces Errout and Scn. It is not dependent on
29 -- the GNAT tree packages (Atree, Sinfo, ...). It uses exactly the same global
30 -- variables as Errout, located in package Err_Vars. Like Errout, it also uses
31 -- the common variables and routines in package Erroutc.
33 with Scng;
34 with Errutil;
36 package Prj.Err is
38 ---------------------------------------------------------
39 -- Error Message Text and Message Insertion Characters --
40 ---------------------------------------------------------
42 -- See errutil.ads
44 -----------------------------------------------------
45 -- Format of Messages and Manual Quotation Control --
46 -----------------------------------------------------
48 -- See errutil.ads
50 ------------------------------
51 -- Error Output Subprograms --
52 ------------------------------
54 procedure Initialize renames Errutil.Initialize;
55 -- Initializes for output of error messages. Must be called for each
56 -- file before using any of the other routines in the package.
58 procedure Finalize (Source_Type : String := "project")
59 renames Errutil.Finalize;
60 -- Finalize processing of error messages for one file and output message
61 -- indicating the number of detected errors.
63 procedure Error_Msg (Msg : String; Flag_Location : Source_Ptr)
64 renames Errutil.Error_Msg;
65 -- Output a message at specified location
67 procedure Error_Msg_S (Msg : String) renames Errutil.Error_Msg_S;
68 -- Output a message at current scan pointer location
70 procedure Error_Msg_SC (Msg : String) renames Errutil.Error_Msg_SC;
71 -- Output a message at the start of the current token, unless we are at
72 -- the end of file, in which case we always output the message after the
73 -- last real token in the file.
75 procedure Error_Msg_SP (Msg : String) renames Errutil.Error_Msg_SP;
76 -- Output a message at the start of the previous token
78 -------------
79 -- Scanner --
80 -------------
82 package Style renames Errutil.Style;
83 -- Instantiation of the generic style package, needed for the instantiation
84 -- of the generic scanner below.
86 procedure Obsolescent_Check (S : Source_Ptr);
87 -- Dummy null procedure for Scng instantiation
89 procedure Post_Scan;
90 -- Convert an Ada operator symbol into a standard string
92 package Scanner is new Scng
93 (Post_Scan => Post_Scan,
94 Error_Msg => Error_Msg,
95 Error_Msg_S => Error_Msg_S,
96 Error_Msg_SC => Error_Msg_SC,
97 Error_Msg_SP => Error_Msg_SP,
98 Obsolescent_Check => Obsolescent_Check,
99 Style => Style);
100 -- Instantiation of the generic scanner
102 end Prj.Err;