source: trunk/ada-2012/src/asis/asis-extensions-flat_kinds.ads@ 399

Last change on this file since 399 was 399, checked in by Maxim Reznik, 5 years ago

Make distinction between index and disriminant constraint

File size: 16.4 KB
Line 
1package Asis.Extensions.Flat_Kinds is
2 pragma Preelaborate;
3
4 type Element_Flat_Kind is
5 (Not_An_Element,
6 -- A_Pragma,
7 An_All_Calls_Remote_Pragma,
8 An_Assert_Pragma,
9 An_Assertion_Policy_Pragma,
10 An_Asynchronous_Pragma,
11 An_Atomic_Pragma,
12 An_Atomic_Components_Pragma,
13 An_Attach_Handler_Pragma,
14 A_Controlled_Pragma,
15 A_Convention_Pragma,
16 A_Detect_Blocking_Pragma,
17 A_Discard_Names_Pragma,
18 An_Elaborate_Pragma,
19 An_Elaborate_All_Pragma,
20 An_Elaborate_Body_Pragma,
21 An_Export_Pragma,
22 An_Import_Pragma,
23 An_Inline_Pragma,
24 An_Inspection_Point_Pragma,
25 An_Interrupt_Handler_Pragma,
26 An_Interrupt_Priority_Pragma,
27 A_Linker_Options_Pragma,
28 A_List_Pragma,
29 A_Locking_Policy_Pragma,
30 A_No_Return_Pragma,
31 A_Normalize_Scalars_Pragma,
32 An_Optimize_Pragma,
33 A_Pack_Pragma,
34 A_Page_Pragma,
35 A_Partition_Elaboration_Policy_Pragma,
36 A_Preelaborable_Initialization_Pragma,
37 A_Preelaborate_Pragma,
38 A_Priority_Pragma,
39 A_Priority_Specific_Dispatching_Pragma,
40 A_Profile_Pragma,
41 A_Pure_Pragma,
42 A_Queuing_Policy_Pragma,
43 A_Relative_Deadline_Pragma,
44 A_Remote_Call_Interface_Pragma,
45 A_Remote_Types_Pragma,
46 A_Restrictions_Pragma,
47 A_Reviewable_Pragma,
48 A_Shared_Passive_Pragma,
49 A_Storage_Size_Pragma,
50 A_Suppress_Pragma,
51 A_Task_Dispatching_Policy_Pragma,
52 An_Unchecked_Union_Pragma,
53 An_Unsuppress_Pragma,
54 A_Volatile_Pragma,
55 A_Volatile_Components_Pragma,
56 An_Implementation_Defined_Pragma,
57 An_Unknown_Pragma,
58 -- A_Defining_Name,
59 A_Defining_Identifier,
60 A_Defining_Character_Literal,
61 A_Defining_Enumeration_Literal,
62 -- A_Defining_Operator_Symbol,
63 A_Defining_And_Operator,
64 A_Defining_Or_Operator,
65 A_Defining_Xor_Operator,
66 A_Defining_Equal_Operator,
67 A_Defining_Not_Equal_Operator,
68 A_Defining_Less_Than_Operator,
69 A_Defining_Less_Than_Or_Equal_Operator,
70 A_Defining_Greater_Than_Operator,
71 A_Defining_Greater_Than_Or_Equal_Operator,
72 A_Defining_Plus_Operator,
73 A_Defining_Minus_Operator,
74 A_Defining_Concatenate_Operator,
75 A_Defining_Unary_Plus_Operator,
76 A_Defining_Unary_Minus_Operator,
77 A_Defining_Multiply_Operator,
78 A_Defining_Divide_Operator,
79 A_Defining_Mod_Operator,
80 A_Defining_Rem_Operator,
81 A_Defining_Exponentiate_Operator,
82 A_Defining_Abs_Operator,
83 A_Defining_Not_Operator,
84 A_Defining_Expanded_Name,
85 -- A_Declaration,
86 An_Ordinary_Type_Declaration,
87 A_Task_Type_Declaration,
88 A_Protected_Type_Declaration,
89 An_Incomplete_Type_Declaration,
90 A_Private_Type_Declaration,
91 A_Private_Extension_Declaration,
92 A_Subtype_Declaration,
93 A_Variable_Declaration,
94 A_Constant_Declaration,
95 A_Deferred_Constant_Declaration,
96 A_Single_Task_Declaration,
97 A_Single_Protected_Declaration,
98 An_Integer_Number_Declaration,
99 A_Real_Number_Declaration,
100 An_Enumeration_Literal_Specification,
101 A_Discriminant_Specification,
102 A_Component_Declaration,
103 A_Return_Object_Specification,
104 A_Loop_Parameter_Specification,
105 A_Procedure_Declaration,
106 A_Function_Declaration,
107 A_Parameter_Specification,
108 A_Procedure_Body_Declaration,
109 A_Function_Body_Declaration,
110 A_Package_Declaration,
111 A_Package_Body_Declaration,
112 An_Object_Renaming_Declaration,
113 An_Exception_Renaming_Declaration,
114 A_Package_Renaming_Declaration,
115 A_Procedure_Renaming_Declaration,
116 A_Function_Renaming_Declaration,
117 A_Generic_Package_Renaming_Declaration,
118 A_Generic_Procedure_Renaming_Declaration,
119 A_Generic_Function_Renaming_Declaration,
120 A_Task_Body_Declaration,
121 A_Protected_Body_Declaration,
122 An_Entry_Declaration,
123 An_Entry_Body_Declaration,
124 An_Entry_Index_Specification,
125 A_Procedure_Body_Stub,
126 A_Function_Body_Stub,
127 A_Package_Body_Stub,
128 A_Task_Body_Stub,
129 A_Protected_Body_Stub,
130 An_Exception_Declaration,
131 A_Choice_Parameter_Specification,
132 A_Generic_Procedure_Declaration,
133 A_Generic_Function_Declaration,
134 A_Generic_Package_Declaration,
135 A_Package_Instantiation,
136 A_Procedure_Instantiation,
137 A_Function_Instantiation,
138 A_Formal_Object_Declaration,
139 A_Formal_Type_Declaration,
140 A_Formal_Procedure_Declaration,
141 A_Formal_Function_Declaration,
142 A_Formal_Package_Declaration,
143 A_Formal_Package_Declaration_With_Box,
144 -- A_Definition,
145 -- A_Type_Definition,
146 A_Derived_Type_Definition,
147 A_Derived_Record_Extension_Definition,
148 An_Enumeration_Type_Definition,
149 A_Signed_Integer_Type_Definition,
150 A_Modular_Type_Definition,
151 -- A_Root_Type_Definition,
152 A_Root_Integer_Definition,
153 A_Root_Real_Definition,
154 A_Universal_Integer_Definition,
155 A_Universal_Real_Definition,
156 A_Universal_Fixed_Definition,
157 A_Universal_Access_Definition,
158 A_Floating_Point_Definition,
159 An_Ordinary_Fixed_Point_Definition,
160 A_Decimal_Fixed_Point_Definition,
161 An_Unconstrained_Array_Definition,
162 A_Constrained_Array_Definition,
163 A_Record_Type_Definition,
164 A_Tagged_Record_Type_Definition,
165 -- An_Interface_Type_Definition,
166 An_Ordinary_Interface,
167 A_Limited_Interface,
168 A_Task_Interface,
169 A_Protected_Interface,
170 A_Synchronized_Interface,
171 -- An_Access_Type_Definition,
172 A_Pool_Specific_Access_To_Variable,
173 An_Access_To_Variable,
174 An_Access_To_Constant,
175 An_Access_To_Procedure,
176 An_Access_To_Protected_Procedure,
177 An_Access_To_Function,
178 An_Access_To_Protected_Function,
179 A_Subtype_Indication,
180 -- A_Constraint,
181 A_Range_Attribute_Reference,
182 A_Simple_Expression_Range,
183 A_Digits_Constraint,
184 A_Delta_Constraint,
185 An_Index_Constraint,
186 A_Discriminant_Constraint,
187 A_Component_Definition,
188 -- A_Discrete_Subtype_Definition,
189 A_Discrete_Subtype_Indication,
190 A_Discrete_Range_Attribute_Reference,
191 A_Discrete_Simple_Expression_Range,
192 -- A_Discrete_Range,
193 A_Discrete_Subtype_Indication_DR,
194 A_Discrete_Range_Attribute_Reference_DR,
195 A_Discrete_Simple_Expression_Range_DR,
196 An_Unknown_Discriminant_Part,
197 A_Known_Discriminant_Part,
198 A_Record_Definition,
199 A_Null_Record_Definition,
200 A_Null_Component,
201 A_Variant_Part,
202 A_Variant,
203 An_Others_Choice,
204 -- An_Access_Definition,
205 An_Anonymous_Access_To_Variable,
206 An_Anonymous_Access_To_Constant,
207 An_Anonymous_Access_To_Procedure,
208 An_Anonymous_Access_To_Protected_Procedure,
209 An_Anonymous_Access_To_Function,
210 An_Anonymous_Access_To_Protected_Function,
211 An_Incomplete_Type_Definition,
212 A_Tagged_Incomplete_Type_Definition,
213 A_Private_Type_Definition,
214 A_Tagged_Private_Type_Definition,
215 A_Private_Extension_Definition,
216 A_Task_Definition,
217 A_Protected_Definition,
218 -- A_Formal_Type_Definition,
219 A_Formal_Private_Type_Definition,
220 A_Formal_Tagged_Private_Type_Definition,
221 A_Formal_Derived_Type_Definition,
222 A_Formal_Discrete_Type_Definition,
223 A_Formal_Signed_Integer_Type_Definition,
224 A_Formal_Modular_Type_Definition,
225 A_Formal_Floating_Point_Definition,
226 A_Formal_Ordinary_Fixed_Point_Definition,
227 A_Formal_Decimal_Fixed_Point_Definition,
228 A_Formal_Unconstrained_Array_Definition,
229 A_Formal_Constrained_Array_Definition,
230 -- A_Formal_Access_Type_Definition,
231 A_Formal_Pool_Specific_Access_To_Variable,
232 A_Formal_Access_To_Variable,
233 A_Formal_Access_To_Constant,
234 A_Formal_Access_To_Procedure,
235 A_Formal_Access_To_Protected_Procedure,
236 A_Formal_Access_To_Function,
237 A_Formal_Access_To_Protected_Function,
238 -- A_Formal_Interface_Type_Definition,
239 A_Formal_Ordinary_Interface,
240 A_Formal_Limited_Interface,
241 A_Formal_Task_Interface,
242 A_Formal_Protected_Interface,
243 A_Formal_Synchronized_Interface,
244 -- An_Expression,
245 A_Box_Expression,
246 An_Integer_Literal,
247 A_Real_Literal,
248 A_String_Literal,
249 An_Identifier,
250 -- An_Operator_Symbol,
251 An_And_Operator,
252 An_Or_Operator,
253 An_Xor_Operator,
254 An_Equal_Operator,
255 A_Not_Equal_Operator,
256 A_Less_Than_Operator,
257 A_Less_Than_Or_Equal_Operator,
258 A_Greater_Than_Operator,
259 A_Greater_Than_Or_Equal_Operator,
260 A_Plus_Operator,
261 A_Minus_Operator,
262 A_Concatenate_Operator,
263 A_Unary_Plus_Operator,
264 A_Unary_Minus_Operator,
265 A_Multiply_Operator,
266 A_Divide_Operator,
267 A_Mod_Operator,
268 A_Rem_Operator,
269 An_Exponentiate_Operator,
270 An_Abs_Operator,
271 A_Not_Operator,
272 A_Character_Literal,
273 An_Enumeration_Literal,
274 An_Explicit_Dereference,
275 A_Function_Call,
276 An_Indexed_Component,
277 A_Slice,
278 A_Selected_Component,
279 -- An_Attribute_Reference,
280 An_Access_Attribute,
281 An_Address_Attribute,
282 An_Adjacent_Attribute,
283 An_Aft_Attribute,
284 An_Alignment_Attribute,
285 A_Base_Attribute,
286 A_Bit_Order_Attribute,
287 A_Body_Version_Attribute,
288 A_Callable_Attribute,
289 A_Caller_Attribute,
290 A_Ceiling_Attribute,
291 A_Class_Attribute,
292 A_Component_Size_Attribute,
293 A_Compose_Attribute,
294 A_Constrained_Attribute,
295 A_Copy_Sign_Attribute,
296 A_Count_Attribute,
297 A_Definite_Attribute,
298 A_Delta_Attribute,
299 A_Denorm_Attribute,
300 A_Digits_Attribute,
301 An_Exponent_Attribute,
302 An_External_Tag_Attribute,
303 A_First_Attribute,
304 A_First_Bit_Attribute,
305 A_Floor_Attribute,
306 A_Fore_Attribute,
307 A_Fraction_Attribute,
308 An_Identity_Attribute,
309 An_Image_Attribute,
310 An_Input_Attribute,
311 A_Last_Attribute,
312 A_Last_Bit_Attribute,
313 A_Leading_Part_Attribute,
314 A_Length_Attribute,
315 A_Machine_Attribute,
316 A_Machine_Emax_Attribute,
317 A_Machine_Emin_Attribute,
318 A_Machine_Mantissa_Attribute,
319 A_Machine_Overflows_Attribute,
320 A_Machine_Radix_Attribute,
321 A_Machine_Rounding_Attribute,
322 A_Machine_Rounds_Attribute,
323 A_Max_Attribute,
324 A_Max_Size_In_Storage_Elements_Attribute,
325 A_Min_Attribute,
326 A_Mod_Attribute,
327 A_Model_Attribute,
328 A_Model_Emin_Attribute,
329 A_Model_Epsilon_Attribute,
330 A_Model_Mantissa_Attribute,
331 A_Model_Small_Attribute,
332 A_Modulus_Attribute,
333 An_Output_Attribute,
334 A_Partition_ID_Attribute,
335 A_Pos_Attribute,
336 A_Position_Attribute,
337 A_Pred_Attribute,
338 A_Priority_Attribute,
339 A_Range_Attribute,
340 A_Read_Attribute,
341 A_Remainder_Attribute,
342 A_Round_Attribute,
343 A_Rounding_Attribute,
344 A_Safe_First_Attribute,
345 A_Safe_Last_Attribute,
346 A_Scale_Attribute,
347 A_Scaling_Attribute,
348 A_Signed_Zeros_Attribute,
349 A_Size_Attribute,
350 A_Small_Attribute,
351 A_Storage_Pool_Attribute,
352 A_Storage_Size_Attribute,
353 A_Stream_Size_Attribute,
354 A_Succ_Attribute,
355 A_Tag_Attribute,
356 A_Terminated_Attribute,
357 A_Truncation_Attribute,
358 An_Unbiased_Rounding_Attribute,
359 An_Unchecked_Access_Attribute,
360 A_Val_Attribute,
361 A_Valid_Attribute,
362 A_Value_Attribute,
363 A_Version_Attribute,
364 A_Wide_Image_Attribute,
365 A_Wide_Value_Attribute,
366 A_Wide_Wide_Image_Attribute,
367 A_Wide_Wide_Value_Attribute,
368 A_Wide_Wide_Width_Attribute,
369 A_Wide_Width_Attribute,
370 A_Width_Attribute,
371 A_Write_Attribute,
372 An_Implementation_Defined_Attribute,
373 An_Unknown_Attribute,
374 A_Record_Aggregate,
375 An_Extension_Aggregate,
376 A_Positional_Array_Aggregate,
377 A_Named_Array_Aggregate,
378 An_And_Then_Short_Circuit,
379 An_Or_Else_Short_Circuit,
380 An_In_Range_Membership_Test,
381 A_Not_In_Range_Membership_Test,
382 An_In_Type_Membership_Test,
383 A_Not_In_Type_Membership_Test,
384 A_Null_Literal,
385 A_Parenthesized_Expression,
386 A_Type_Conversion,
387 A_Qualified_Expression,
388 An_Allocation_From_Subtype,
389 An_Allocation_From_Qualified_Expression,
390 -- An_Association,
391 A_Pragma_Argument_Association,
392 A_Discriminant_Association,
393 A_Record_Component_Association,
394 An_Array_Component_Association,
395 A_Parameter_Association,
396 A_Generic_Association,
397 -- A_Statement,
398 A_Null_Statement,
399 An_Assignment_Statement,
400 An_If_Statement,
401 A_Case_Statement,
402 A_Loop_Statement,
403 A_While_Loop_Statement,
404 A_For_Loop_Statement,
405 A_Block_Statement,
406 An_Exit_Statement,
407 A_Goto_Statement,
408 A_Procedure_Call_Statement,
409 A_Simple_Return_Statement,
410 An_Extended_Return_Statement,
411 An_Accept_Statement,
412 An_Entry_Call_Statement,
413 A_Requeue_Statement,
414 A_Requeue_Statement_With_Abort,
415 A_Delay_Until_Statement,
416 A_Delay_Relative_Statement,
417 A_Terminate_Alternative_Statement,
418 A_Selective_Accept_Statement,
419 A_Timed_Entry_Call_Statement,
420 A_Conditional_Entry_Call_Statement,
421 An_Asynchronous_Select_Statement,
422 An_Abort_Statement,
423 A_Raise_Statement,
424 A_Code_Statement,
425 -- A_Path,
426 An_If_Path,
427 An_Elsif_Path,
428 An_Else_Path,
429 A_Case_Path,
430 A_Select_Path,
431 An_Or_Path,
432 A_Then_Abort_Path,
433 -- A_Clause,
434 A_Use_Package_Clause,
435 A_Use_Type_Clause,
436 A_With_Clause,
437 -- A_Representation_Clause,
438 An_Attribute_Definition_Clause,
439 An_Enumeration_Representation_Clause,
440 A_Record_Representation_Clause,
441 An_At_Clause,
442 A_Component_Clause,
443 An_Exception_Handler);
444
445 subtype A_Pragma is Element_Flat_Kind range
446 An_All_Calls_Remote_Pragma .. An_Unknown_Pragma;
447
448 subtype A_Defining_Name is Element_Flat_Kind range
449 A_Defining_Identifier .. A_Defining_Expanded_Name;
450
451 subtype A_Defining_Operator_Symbol is Element_Flat_Kind range
452 A_Defining_And_Operator .. A_Defining_Not_Operator;
453
454 subtype A_Declaration is Element_Flat_Kind range
455 An_Ordinary_Type_Declaration .. A_Formal_Package_Declaration_With_Box;
456
457 subtype A_Definition is Element_Flat_Kind range
458 A_Derived_Type_Definition .. A_Formal_Synchronized_Interface;
459
460 subtype A_Type_Definition is Element_Flat_Kind range
461 A_Derived_Type_Definition .. An_Access_To_Protected_Function;
462
463 subtype A_Constraint is Element_Flat_Kind range
464 A_Range_Attribute_Reference .. A_Discriminant_Constraint;
465
466 subtype A_Discrete_Subtype_Definition is Element_Flat_Kind range
467 A_Discrete_Subtype_Indication .. A_Discrete_Simple_Expression_Range;
468
469 subtype A_Discrete_Range is Element_Flat_Kind range
470 A_Discrete_Subtype_Indication_DR .. A_Discrete_Simple_Expression_Range_DR;
471
472 subtype An_Access_Definition is Element_Flat_Kind range
473 An_Anonymous_Access_To_Variable
474 .. An_Anonymous_Access_To_Protected_Function;
475
476 subtype A_Formal_Type_Definition is Element_Flat_Kind range
477 A_Formal_Private_Type_Definition .. A_Formal_Access_To_Protected_Function;
478
479 subtype An_Expression is Element_Flat_Kind range
480 A_Box_Expression .. An_Allocation_From_Qualified_Expression;
481
482 subtype An_Association is Element_Flat_Kind range
483 A_Pragma_Argument_Association .. A_Generic_Association;
484
485 subtype A_Statement is Element_Flat_Kind range
486 A_Null_Statement .. A_Code_Statement;
487
488 subtype A_Path is Element_Flat_Kind range
489 An_If_Path .. A_Then_Abort_Path;
490
491 subtype A_Clause is Element_Flat_Kind range
492 A_Use_Package_Clause .. A_With_Clause;
493
494 subtype An_Operator_Symbol is Element_Flat_Kind range
495 An_And_Operator .. A_Not_Operator;
496
497 subtype An_Attribute_Reference is Element_Flat_Kind range
498 An_Access_Attribute .. An_Unknown_Attribute;
499
500 subtype A_Representation_Clause is Element_Flat_Kind range
501 An_Attribute_Definition_Clause .. An_At_Clause;
502
503 subtype A_Root_Type_Definition is Element_Flat_Kind range
504 A_Root_Integer_Definition .. A_Universal_Access_Definition;
505
506 subtype An_Interface_Type_Definition is Element_Flat_Kind range
507 An_Ordinary_Interface .. A_Synchronized_Interface;
508
509 subtype An_Access_Type_Definition is Element_Flat_Kind range
510 A_Pool_Specific_Access_To_Variable .. An_Access_To_Protected_Function;
511
512 function Flat_Kind (Element : Asis.Element) return Element_Flat_Kind;
513
514end Asis.Extensions.Flat_Kinds;
Note: See TracBrowser for help on using the repository browser.