Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / ada / prj-err.ads
blobe937c353f322bea73163aa579ab3cc2a7169d8f3
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-2007, 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 3, 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 COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
20 -- --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
23 -- --
24 ------------------------------------------------------------------------------
26 -- This package contains the routines to output error messages and the scanner
27 -- for the project files. It replaces Errout and Scn. It is not dependent on
28 -- the GNAT tree packages (Atree, Sinfo, ...). It uses exactly the same global
29 -- variables as Errout, located in package Err_Vars. Like Errout, it also uses
30 -- the common variables and routines in package Erroutc.
32 with Scng;
33 with Errutil;
35 package Prj.Err is
37 ---------------------------------------------------------
38 -- Error Message Text and Message Insertion Characters --
39 ---------------------------------------------------------
41 -- See errutil.ads
43 -----------------------------------------------------
44 -- Format of Messages and Manual Quotation Control --
45 -----------------------------------------------------
47 -- See errutil.ads
49 ------------------------------
50 -- Error Output Subprograms --
51 ------------------------------
53 procedure Initialize renames Errutil.Initialize;
54 -- Initializes for output of error messages. Must be called for each
55 -- file before using any of the other routines in the package.
57 procedure Finalize (Source_Type : String := "project")
58 renames Errutil.Finalize;
59 -- Finalize processing of error messages for one file and output message
60 -- indicating the number of detected errors.
62 procedure Error_Msg (Msg : String; Flag_Location : Source_Ptr)
63 renames Errutil.Error_Msg;
64 -- Output a message at specified location
66 procedure Error_Msg_S (Msg : String) renames Errutil.Error_Msg_S;
67 -- Output a message at current scan pointer location
69 procedure Error_Msg_SC (Msg : String) renames Errutil.Error_Msg_SC;
70 -- Output a message at the start of the current token, unless we are at
71 -- the end of file, in which case we always output the message after the
72 -- last real token in the file.
74 procedure Error_Msg_SP (Msg : String) renames Errutil.Error_Msg_SP;
75 -- Output a message at the start of the previous token
77 -------------
78 -- Scanner --
79 -------------
81 package Style renames Errutil.Style;
82 -- Instantiation of the generic style package, needed for the instantiation
83 -- of the generic scanner below.
85 procedure Obsolescent_Check (S : Source_Ptr);
86 -- Dummy null procedure for Scng instantiation
88 procedure Post_Scan;
89 -- Convert an Ada operator symbol into a standard string
91 package Scanner is new Scng
92 (Post_Scan => Post_Scan,
93 Error_Msg => Error_Msg,
94 Error_Msg_S => Error_Msg_S,
95 Error_Msg_SC => Error_Msg_SC,
96 Error_Msg_SP => Error_Msg_SP,
97 Obsolescent_Check => Obsolescent_Check,
98 Style => Style);
99 -- Instantiation of the generic scanner
101 end Prj.Err;