~ubuntu-branches/ubuntu/karmic/asis/karmic

« back to all changes in this revision

Viewing changes to tools/asistant/asistant-common.ads

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Quinot
  • Date: 2002-03-03 19:55:58 UTC
  • Revision ID: james.westby@ubuntu.com-20020303195558-g7dp4vaq1zdkf814
Tags: upstream-3.14p
ImportĀ upstreamĀ versionĀ 3.14p

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
------------------------------------------------------------------------------
 
2
--                                                                          --
 
3
--             ASIS Tester And iNTerpreter (ASIStant) COMPONENTS            --
 
4
--                                                                          --
 
5
--                      A S I S T A N T . C O M M O N                       --
 
6
--                                                                          --
 
7
--                                 S p e c                                  --
 
8
--                                                                          --
 
9
--          Copyright (c) 1997-1999, Free Software Foundation, Inc.         --
 
10
--                                                                          --
 
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.                                              --
 
21
--                                                                          --
 
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" --
 
28
--                                                                          --
 
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
------------------------------------------------------------------------------
 
33
 
 
34
with Asis;
 
35
with Asis.Compilation_Units.Relations;
 
36
with Asis.Text;
 
37
with Asis.Data_Decomposition;
 
38
 
 
39
package ASIStant.Common is
 
40
 
 
41
------------------------------------------------------------------------------
 
42
--  This package contains definitions common to ASIStant packages. By changing
 
43
--  some of the constants here, ASIStant flexibility can be adjusted.
 
44
------------------------------------------------------------------------------
 
45
 
 
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).
 
49
 
 
50
 
 
51
   MAX_VARIABLES     : constant Positive := 100;
 
52
   --  Size of initial ASIStant variable table; see ASIStant.Table
 
53
 
 
54
 
 
55
   MAX_TREENODES     : constant Positive := 500;
 
56
   --  Size of ASIStant statement trees; see ASIStant.S_Parser
 
57
 
 
58
 
 
59
   MAX_SCRIPTDEPTH   : constant Positive := 5;
 
60
   --  Depth of script enclosing; see ASIStant.Text_IO
 
61
 
 
62
 
 
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
 
77
   --  in ASIStant.XTable
 
78
 
 
79
 
 
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
 
83
 
 
84
   ASIStant_ASIS_ERROR : exception;
 
85
   --  This exception is raised any time ASIStant encounters an ASIS error
 
86
 
 
87
   subtype Name_String is Wide_String (1 .. MAX_ID_LENGTH);
 
88
   --  Type to represent ASIStant IDs
 
89
 
 
90
   package DDA renames Asis.Data_Decomposition;
 
91
 
 
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;
 
100
 
 
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;
 
112
 
 
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;
 
124
 
 
125
   type Error_Type is (
 
126
      ERR_INTERNAL,
 
127
      ERR_NOTIMPLEMENTED,
 
128
      ERR_NOTSUPPORTED,
 
129
 
 
130
      ERR_NOSCRIPT,
 
131
      ERR_NEEDFILENAME,
 
132
 
 
133
      ERR_BADBOOLEAN,
 
134
      ERR_BADEXPR,
 
135
      ERR_BADID,
 
136
      ERR_BADINTEGER,
 
137
      ERR_BADLISTELEM,
 
138
      ERR_BADPARAM,
 
139
      ERR_BADPARAMLIST,
 
140
      ERR_BADSTRING,
 
141
      ERR_BADVARTYPE,
 
142
      ERR_NEEDCHAR,
 
143
      ERR_NEEDFUNCTION,
 
144
      ERR_NEEDPARAM,
 
145
      ERR_NOTINRANGE,
 
146
      ERR_TOOMANYPARAMS,
 
147
      ERR_UNKNOWNVAR,
 
148
 
 
149
      ERR_TABLEFULL,
 
150
 
 
151
      ERR_UNKNOWNSYNTAX,
 
152
      ERR_UNKNOWNQUERY
 
153
      );
 
154
   --  All possible errors
 
155
 
 
156
 
 
157
   LastErr : Error_Type;
 
158
 
 
159
   DebugPrint : Boolean := True;
 
160
 
 
161
   procedure Print_ASIStant_Header;
 
162
   --  Prints the ASIStant copyright header
 
163
 
 
164
   procedure Error (ErrNo  : Error_Type;
 
165
                    ErrStr : Wide_String := "";
 
166
                    Level  : Natural := 5);
 
167
   --  Debug output function
 
168
   pragma No_Return (Error);
 
169
 
 
170
end ASIStant.Common;
 
 
b'\\ No newline at end of file'