1
------------------------------------------------------------------------------
3
-- ASIS Tester And iNTerpreter (ASIStant) COMPONENTS --
5
-- A S I S T A N T . C O M M O N --
9
-- Copyright (c) 1997-1999, Free Software Foundation, Inc. --
11
-- ASIStant is free software; you can redistribute it and/or modify it --
12
-- under terms of the GNU General Public License as published by the Free --
13
-- Software Foundation; either version 2, or (at your option) any later --
14
-- version. ASIStant is distributed in the hope that it will be useful, --
15
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MER- --
16
-- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General --
17
-- Public License for more details. You should have received a copy of the --
18
-- GNU General Public License distributed with GNAT; see file COPYING. If --
19
-- not, write to the Free Software Foundation, 59 Temple Place Suite 330, --
20
-- Boston, MA 02111-1307, USA. --
22
-- ASIStant is an evolution of ASIStint tool that was created by --
23
-- Vasiliy Fofanov as part of a collaboration between Software Engineering --
24
-- Laboratory of the Swiss Federal Institute of Technology in Lausanne, --
25
-- Switzerland, and the Scientific Research Computer Center of the Moscow --
26
-- University, Russia, supported by the Swiss National Science Foundation --
27
-- grant #7SUPJ048247, "Development of ASIS for GNAT with industry quality" --
29
-- ASIStant is distributed as a part of the ASIS implementation for GNAT --
30
-- (ASIS-for-GNAT) and is maintained by Ada Core Technologies Inc --
31
-- (http://www.gnat.com). --
32
------------------------------------------------------------------------------
35
with Asis.Compilation_Units.Relations;
37
with Asis.Data_Decomposition;
39
package ASIStant.Common is
41
------------------------------------------------------------------------------
42
-- This package contains definitions common to ASIStant packages. By changing
43
-- some of the constants here, ASIStant flexibility can be adjusted.
44
------------------------------------------------------------------------------
46
MAX_ID_LENGTH : constant Positive := 32;
47
-- The length of ASIStant identifier (may not be less than the longest
48
-- name of ASIS query).
51
MAX_VARIABLES : constant Positive := 100;
52
-- Size of initial ASIStant variable table; see ASIStant.Table
55
MAX_TREENODES : constant Positive := 500;
56
-- Size of ASIStant statement trees; see ASIStant.S_Parser
59
MAX_SCRIPTDEPTH : constant Positive := 5;
60
-- Depth of script enclosing; see ASIStant.Text_IO
63
MAX_ATIELEMENTS : Natural := 200;
64
MAX_ATIELEMLISTS : Natural := 100;
65
MAX_ATICUNITS : Natural := 100;
66
MAX_ATICUNITLISTS : Natural := 10;
67
MAX_ATICONTEXTS : Natural := 10;
68
MAX_ATISPANS : Natural := 100;
69
MAX_ATILINES : Natural := 100;
70
MAX_ATILINELISTS : Natural := 30;
71
MAX_ATIRELATIONSHIPS : Natural := 10;
72
MAX_DDA_ARRCOMPS : Natural := 100;
73
MAX_DDA_ARRCOMPLISTS : Natural := 10;
74
MAX_DDA_RECCOMPS : Natural := 100;
75
MAX_DDA_RECCOMPLISTS : Natural := 10;
76
-- These constants define the size of ASIS support arrays declared
80
ASIStant_ERROR : exception;
81
-- This exception is raised any time ASIStant encounters a non-ASIS error;
82
-- diagnosis of the type Error_Type is stored in LastErr
84
ASIStant_ASIS_ERROR : exception;
85
-- This exception is raised any time ASIStant encounters an ASIS error
87
subtype Name_String is Wide_String (1 .. MAX_ID_LENGTH);
88
-- Type to represent ASIStant IDs
90
package DDA renames Asis.Data_Decomposition;
92
type ElemList_Ptr is access all Asis.Element_List;
93
type CUnitList_Ptr is access all Asis.Compilation_Unit_List;
94
type Relship_Ptr is access all
95
Asis.Compilation_Units.Relations.Relationship;
96
type LineList_Ptr is access all Asis.Text.Line_List;
97
type String_Ptr is access all Wide_String;
98
type DDA_ArrCList_Ptr is access all DDA.Array_Component_List;
99
type DDA_RecCList_Ptr is access all DDA.Record_Component_List;
101
type ElemArray is array (Natural range <>) of Asis.Element;
102
type ElemListArray is array (Natural range <>) of ElemList_Ptr;
103
type CUnitArray is array (Natural range <>) of Asis.Compilation_Unit;
104
type CUnitListArray is array (Natural range <>) of CUnitList_Ptr;
105
type RelshipArray is array (Natural range <>) of Relship_Ptr;
106
type LineArray is array (Natural range <>) of Asis.Text.Line;
107
type LineListArray is array (Natural range <>) of LineList_Ptr;
108
type DDA_ArrCArray is array (Natural range <>) of DDA.Array_Component;
109
type DDA_ArrCListArray is array (Natural range <>) of DDA_ArrCList_Ptr;
110
type DDA_RecCArray is array (Natural range <>) of DDA.Record_Component;
111
type DDA_RecCListArray is array (Natural range <>) of DDA_RecCList_Ptr;
113
type ElemArray_Ptr is access all ElemArray;
114
type ElemListArray_Ptr is access all ElemListArray;
115
type CUnitArray_Ptr is access all CUnitArray;
116
type CUnitListArray_Ptr is access all CUnitListArray;
117
type RelshipArray_Ptr is access all RelshipArray;
118
type LineArray_Ptr is access all LineArray;
119
type LineListArray_Ptr is access all LineListArray;
120
type DDA_ArrCArray_Ptr is access all DDA_ArrCArray;
121
type DDA_ArrCListArray_Ptr is access all DDA_ArrCListArray;
122
type DDA_RecCArray_Ptr is access all DDA_RecCArray;
123
type DDA_RecCListArray_Ptr is access all DDA_RecCListArray;
154
-- All possible errors
157
LastErr : Error_Type;
159
DebugPrint : Boolean := True;
161
procedure Print_ASIStant_Header;
162
-- Prints the ASIStant copyright header
164
procedure Error (ErrNo : Error_Type;
165
ErrStr : Wide_String := "";
166
Level : Natural := 5);
167
-- Debug output function
168
pragma No_Return (Error);
b'\\ No newline at end of file'