summaryrefslogtreecommitdiff
path: root/test/manual/etags/ada-src/etags-test-for.ada
blob: 09e5a1ec9bf9b4600e9def616ef671da6ea22725 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
   type LL_Task_Procedure_Access is access procedure (Arg : System.Address);

   function Body_Required
      (N : Node_Id) return Boolean is
   begin
      pragma Assert (False
          or else NT (N).Nkind = N_Compilation_Unit);
      return Flag13 (N);
   end Body_Required;

   type Type_Specific_Data is record
      Idepth        : Natural;
      Expanded_Name : Cstring_Ptr;
      External_Tag  : Cstring_Ptr;
      HT_Link       : Tag;
      Ancestor_Tags : Tag_Table (Natural);
   end record;

   function "abs"   (Right : Complex) return Real'Base renames Modulus;

   type Barrier_Function_Pointer is access
     function
       (O : System.Address;
        E : Protected_Entry_Index)
        return Boolean;

   function "=" (L, R : System.Address) return Boolean
     renames System."=";

   type usfreelock_ptr is access
     procedure (lock : ulock_t; arena : usptr_t_ptr);

   function p pragma Import (C,
                  "pthread_mutexattr_setprio_ceiling",
                  "pthread_mutexattr_setprio_ceiling");
   pragma Import ()
   procedure LL_Wrapper (T : TCB_Ptr);

function p ("p");

-- This file is an Ada file containing test data
-- for etags (Ada83 and Ada95 support).

package Pkg1 is

  type Private_T is private;

  package Inner1 is
    procedure Private_T;
  end Inner1;

  package Inner2 is
    task Private_T;
  end Inner2;

  type Public_T is
    record
      A : Integer;
      B : Integer;
    end record;

  procedure Pkg1_Proc1;

  procedure Pkg1_Proc2 (I : Integer);

  function Pkg1_Func1 return Boolean;

  function Pkg1_Func2 (Ijk : Integer; Z : Integer) return Natural;


  package Pkg1_Pkg1 is
    procedure Pkg1_Pkg1_Proc1;
  end Pkg1_Pkg1;

  task type Task_Type is
    entry Entry1;
    entry Entry2 (I : Integer);
  end;

private

  type Private_T is
    record
      Z : Integer;
      W : Boolean;
    end record;
end Pkg1;

package body Pkg1 is

  procedure Pkg1_Proc1 is
  begin
    null;
  end;

  package body Inner1 is
    procedure Private_T is
    begin
      null;
    end;
  end Inner1;

  package body Inner2 is
    task body Private_T is
    begin
      loop
        null;
      end loop;
    end;
  end Inner2;

  task body Task_Type is
  begin
    select
      accept Entry1 do
        null;
      end;
    or
      accept Entry2 (I : Integer) do
        null;
      end;
    end select;
  end;


  procedure Pkg1_Proc2 (I : Integer) is
  begin
    null;
  end Pkg1_Proc2;


  function Pkg1_Func1 return Boolean is separate;

  function Pkg1_Func2 (Ijk : Integer; Z : Integer) return Natural is
  begin
    return 1;
  end;


  package body Pkg1_Pkg1 is separate;


end Pkg1;

separate (Pkg1)
package body Pkg1_Pkg1 is
  procedure Pkg1_Pkg1_Proc1 is
  begin
    null;
  end;
end Pkg1_Pkg1;


separate (Pkg1)
function  Pkg1_Func1 return Boolean is
begin
  return False;
end;


-- from now on, this is Ada 95 specific.
package Truc is
  I : Integer;
end Truc;

package Truc.Bidule is

  protected Bidule is
    entry Basar;
  end Bidule;

  protected type Machin_T is
    entry Truc;
  end Machin_T;

end Truc.Bidule;

package body Truc.Bidule is
  protected body Bidule is
    entry Basar is
    begin
      null;
    end;
  end Bidule;

  protected Machin_T is
    entry Truc is
    begin
      null;
    end;
  end Machin_T;

end Truc.Bidule;