OSDN Git Service

* Makefile.in (html): Add html generation support.
[pf3gnuchains/gcc-fork.git] / gcc / ada / prj-err.ads
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-2003 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,  59 Temple Place - Suite 330,  Boston, --
20 -- MA 02111-1307, 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 ------------------------------------------------------------------------------
26
27 --  This package contains the routines to output error messages and the
28 --  scanner for the project files. It replaces Errout and Scn.
29 --  It is not dependent on the GNAT tree packages (Atree, Sinfo, ...).
30 --  It uses the same global variables as Errout, located in package
31 --  Err_Vars. Like Errout, it also uses the common variables and routines
32 --  in package Erroutc.
33
34 with Scng;
35 with Errutil;
36 with Types; use Types;
37
38 package Prj.Err is
39
40    ---------------------------------------------------------
41    -- Error Message Text and Message Insertion Characters --
42    ---------------------------------------------------------
43
44    --  See errutil.ads
45
46    -----------------------------------------------------
47    -- Format of Messages and Manual Quotation Control --
48    -----------------------------------------------------
49
50    --  See errutil.ads
51
52    ------------------------------
53    -- Error Output Subprograms --
54    ------------------------------
55
56    procedure Initialize renames Errutil.Initialize;
57    --  Initializes for output of error messages. Must be called for each
58    --  file before using any of the other routines in the package.
59
60    procedure Finalize (Source_Type : String := "project")
61                renames Errutil.Finalize;
62    --  Finalize processing of error messages for one file and output message
63    --  indicating the number of detected errors.
64
65    procedure Error_Msg (Msg : String; Flag_Location : Source_Ptr)
66                renames Errutil.Error_Msg;
67    --  Output a message at specified location.
68
69    procedure Error_Msg_S (Msg : String) renames Errutil.Error_Msg_S;
70    --  Output a message at current scan pointer location.
71
72    procedure Error_Msg_SC (Msg : String) renames Errutil.Error_Msg_SC;
73    --  Output a message at the start of the current token, unless we are at
74    --  the end of file, in which case we always output the message after the
75    --  last real token in the file.
76
77    procedure Error_Msg_SP (Msg : String) renames Errutil.Error_Msg_SP;
78    --  Output a message at the start of the previous token.
79
80    -------------
81    -- Scanner --
82    -------------
83
84    package Style renames Errutil.Style;
85    --  Instantiation of the generic style package, needed for the instantiation
86    --  of the generic scanner below.
87
88    procedure Post_Scan;
89    --  Convert an Ada operator symbol into a standard string
90
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       Style        => Style);
98    --  Instantiation of the generic scanner
99
100 end Prj.Err;