]> code.delx.au - gnu-emacs/blob - test/manual/etags/ada-src/waroquiers.ada
Merge from origin/emacs-25
[gnu-emacs] / test / manual / etags / ada-src / waroquiers.ada
1 -- This file is an Ada file containing test data
2 -- for etags (Ada83 and Ada95 support).
3 package Pkg1 is
4
5 type Private_T is private;
6
7 package Inner1 is
8 procedure Private_T;
9 end Inner1;
10
11 package Inner2 is
12 task Private_T;
13 end Inner2;
14
15 type Public_T is
16 record
17 A : Integer;
18 B : Integer;
19 end record;
20
21 procedure Pkg1_Proc1;
22
23 procedure Pkg1_Proc2 (I : Integer);
24
25 function Pkg1_Func1 return Boolean;
26
27 function Pkg1_Func2 (Ijk : Integer; Z : Integer) return Natural;
28
29
30 package Pkg1_Pkg1 is
31 procedure Pkg1_Pkg1_Proc1;
32 end Pkg1_Pkg1;
33
34 task type Task_Type is
35 entry Entry1;
36 entry Entry2 (I : Integer);
37 end;
38 private
39
40 type Private_T is
41 record
42 Z : Integer;
43 W : Boolean;
44 end record;
45 end Pkg1;
46 package body Pkg1 is
47
48 procedure Pkg1_Proc1 is
49 begin
50 null;
51 end;
52
53 package body Inner1 is
54 procedure Private_T is
55 begin
56 null;
57 end;
58 end Inner1;
59
60 package body Inner2 is
61 task body Private_T is
62 begin
63 loop
64 null;
65 end loop;
66 end;
67 end Inner2;
68 task body Task_Type is
69 begin
70 select
71 accept Entry1 do
72 null;
73 end;
74 or
75 accept Entry2 (I : Integer) do
76 null;
77 end;
78 end select;
79 end;
80
81
82 procedure Pkg1_Proc2 (I : Integer) is
83 begin
84 null;
85 end Pkg1_Proc2;
86
87
88 function Pkg1_Func1 return Boolean is separate;
89
90 function Pkg1_Func2 (Ijk : Integer; Z : Integer) return Natural is
91 begin
92 return 1;
93 end;
94
95
96 package body Pkg1_Pkg1 is separate;
97
98 end Pkg1;
99 separate (Pkg1)
100 package body Pkg1_Pkg1 is
101 procedure Pkg1_Pkg1_Proc1 is
102 begin
103 null;
104 end;
105 end Pkg1_Pkg1;
106 separate (Pkg1)
107 function Pkg1_Func1 return Boolean is
108 begin
109 return False;
110 end;
111 -- from now on, this is Ada 95 specific.
112 package Truc is
113 I : Integer;
114 end Truc;
115 with Pkg1;
116 package Truc.Bidule is
117 use type Pkg1.Public_T;
118 use Pkg1;
119 use
120 type Pkg1.Public_T;
121 use -- comment
122 type -- comment
123 Pkg1.Public_T;
124
125 protected Bidule is
126 entry Basar;
127 private
128 Ok : Boolean;
129 end Bidule;
130
131 protected type Machin_T is
132 entry Truc;
133 private
134 Ok : Boolean;
135 end Machin_T;
136
137 end Truc.Bidule;
138 package body Truc.Bidule is
139 protected body Bidule is
140 entry Basar when Ok is
141 begin
142 null;
143 end;
144 end Bidule;
145
146 protected body Machin_T is
147 entry Truc when Ok is
148 begin
149 null;
150 end;
151 end Machin_T;
152
153 end Truc.Bidule;