111
|
1 ------------------------------------------------------------------------------
|
|
2 -- --
|
|
3 -- GNAT COMPILER COMPONENTS --
|
|
4 -- --
|
|
5 -- P U T _ S P A R K _ X R E F S --
|
|
6 -- --
|
|
7 -- S p e c --
|
|
8 -- --
|
|
9 -- Copyright (C) 2011-2016, 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 ------------------------------------------------------------------------------
|
|
25
|
|
26 -- This package contains the function used to read SPARK cross-reference
|
|
27 -- information from the internal tables defined in package SPARK_Xrefs, and
|
|
28 -- output text information for the ALI file. The interface allows control over
|
|
29 -- the destination of the output, so that this routine can also be used for
|
|
30 -- debugging purposes.
|
|
31
|
|
32 with Types; use Types;
|
|
33
|
|
34 generic
|
|
35 -- The following procedures are used to output text information. The
|
|
36 -- destination of the text information is thus under control of the
|
|
37 -- particular instantiation. In particular, this procedure is used to
|
|
38 -- write output to the ALI file, and also for debugging output.
|
|
39
|
|
40 with function Write_Info_Col return Positive is <>;
|
|
41 -- Return the column in which the next character will be written
|
|
42
|
|
43 with procedure Write_Info_Char (C : Character) is <>;
|
|
44 -- Output one character
|
|
45
|
|
46 with procedure Write_Info_Str (Val : String) is <>;
|
|
47 -- Output string stored in string pointer
|
|
48
|
|
49 with procedure Write_Info_Initiate (Key : Character) is <>;
|
|
50 -- Initiate write of new line to output file, the parameter is the
|
|
51 -- keyword character for the line.
|
|
52
|
|
53 with procedure Write_Info_Nat (N : Nat) is <>;
|
|
54 -- Write image of N to output file with no leading or trailing blanks
|
|
55
|
|
56 with procedure Write_Info_Terminate is <>;
|
|
57 -- Terminate current info line and output lines built in Info_Buffer
|
|
58
|
|
59 procedure Put_SPARK_Xrefs;
|
|
60 -- Read information from SPARK tables (SPARK_Xrefs.SPARK_Xref_Table,
|
|
61 -- SPARK_Xrefs.SPARK_Scope_Table and SPARK_Xrefs.SPARK_File_Table) and output
|
|
62 -- corresponding information in ALI format using the Write_Info procedures.
|