1------------------------------------------------------------------------------ 2-- -- 3-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS -- 4-- -- 5-- A S I S . E X T E N S I O N S . F L A T _ K I N D S -- 6-- -- 7-- S p e c -- 8-- -- 9-- Copyright (C) 1995-2014, Free Software Foundation, Inc. -- 10-- -- 11-- ASIS-for-GNAT 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. ASIS-for-GNAT is distributed in the hope that it will be use- -- 15-- ful, 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 ASIS-for-GNAT; see file -- 19-- COPYING. If not, write to the Free Software Foundation, 51 Franklin -- 20-- Street, Fifth Floor, Boston, MA 02110-1301, USA. -- 21-- -- 22-- -- 23-- -- 24-- -- 25-- -- 26-- -- 27-- -- 28-- -- 29-- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the -- 30-- Software Engineering Laboratory of the Swiss Federal Institute of -- 31-- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the -- 32-- Scientific Research Computer Center of Moscow State University (SRCC -- 33-- MSU), Russia, with funding partially provided by grants from the Swiss -- 34-- National Science Foundation and the Swiss Academy of Engineering -- 35-- Sciences. ASIS-for-GNAT is now maintained by AdaCore -- 36-- (http://www.adacore.com). -- 37-- -- 38------------------------------------------------------------------------------ 39 40pragma Ada_2012; 41 42-- This package provides the "flat" Element classification as a part of ASIS 43-- extensions provided by ASIS-for-GNAT. This classification is equivalent 44-- to the element classification hierarchy defined in the Asis package. 45 46with A4G.Int_Knds; 47 48package Asis.Extensions.Flat_Kinds is 49 50 type Flat_Element_Kinds is new A4G.Int_Knds.Internal_Element_Kinds 51 range Not_An_Element .. An_Exception_Handler; 52 -- This type provides the flat Element classification for using in ASIS 53 -- applications. The main reasons to define it as a type derived from 54 -- the type providing similar flat classification for implementation 55 -- purposes are to hide the implementation-specific values added to 56 -- the internal flat classification (they are of no use for applications) 57 -- and to simplify the possible maintenance problems by having only one 58 -- set of enumeration literals representing the flat Element 59 -- classification. The set of enumeration literals inherited by the 60 -- Flat_Element_Kinds type is given below as a "commented" copy of 61 -- a part of the declaration of the A4G.Int_Knds.Internal_Element_Kinds 62 -- type. 63 -- 64 -- The way how the flat classification is obtained from the hierarchy is 65 -- strightforward: all the enumeration values of the ASIS Element_Kinds 66 -- type, which represent kinds having subordinate subkinds are recursively 67 -- replaced with the enumeration values of the subordinate kinds 68 -- (excluding Not_A_... starting values). A very few exceptions corresponds 69 -- to the situation where in the ASIS-defined Element classification we 70 -- have not hierarchy, but some kind of a net (for example, there is a 71 -- classification of access types applied bot to ordinary type definitions 72 -- and to formal type definitions. For such cases, the flat classification 73 -- introduces new (self-descriptive) names. 74 -- 75 -- In the definition of Internal_Element_Kinds we keep most of the 76 -- documentation from the Element classification hierarchy as it is defined 77 -- in the Asis package, slightly reformatted to staicfy the GNAT coding 78 -- style. 79 -- 80 -- Below is the commented copy of a part of the definition of the 81 -- Internal_Element_Kinds type. 82 83 ---------------------------------------------------------- 84 -- Element_Kinds Hierarchy, as defined by Asis package: -- 85 ---------------------------------------------------------- 86 -- 87 -- Element_Kinds -> Subordinate Kinds 88 --------------------------------------------------------------------- 89 -- 90 -- Key: Read "->" as "can be further categorized by its" 91 -- 92 -- A_Pragma -> Pragma_Kinds 93 -- 94 -- A_Defining_Name -> Defining_Name_Kinds 95 -- -> Operator_Kinds 96 -- 97 -- A_Declaration -> Declaration_Kinds 98 -- -> Trait_Kinds 99 -- -> Declaration_Origin 100 -- -> Mode_Kinds 101 -- -> Default_Kinds 102 -- 103 -- A_Definition -> Definition_Kinds 104 -- -> Trait_Kinds 105 -- -> Type_Kinds 106 -- -> Trait_Kinds 107 -- -> Formal_Type_Kinds 108 -- -> Trait_Kinds 109 -- -> Access_Type_Kinds 110 -- -> Root_Type_Kinds 111 -- -> Constraint_Kinds 112 -- -> Discrete_Range_Kinds 113 -- 114 -- An_Expression -> Expression_Kinds 115 -- -> Operator_Kinds 116 -- -> Attribute_Kinds 117 -- 118 -- An_Association -> Association_Kinds 119 -- 120 -- A_Statement -> Statement_Kinds 121 -- 122 -- A_Path -> Path_Kinds 123 -- 124 -- A_Clause -> Clause_Kinds 125 -- -> Representation_Clause_Kinds 126 -- 127 -- An_Exception_Handler 128 -- 129 ------------------------------------------------------------------------- 130 131 -- type Internal_Element_Kinds is 132 133 -- (Not_An_Element, -- Nil_Element 134 135 -- All the other Not_A_XXX values for subordinate kinds are not included 136 -- in the flat element classification - they just are not needed. 137 138 ------------------------------------------------------------- 139 140 -- A_Pragma, -- Asis.Elements 141 142 -- Detailed classification for Asis.Element_Kinds (A_Pragma) literal, 143 -- corresponds to subtype Internal_Pragma_Kinds 144 ------------------------------------------------------------ 145 146 -- An_All_Calls_Remote_Pragma, -- E.2.3(4) 147 -- An_Asynchronous_Pragma, -- E.4.1(2) 148 -- An_Atomic_Pragma, -- C.6(2) 149 -- An_Atomic_Components_Pragma, -- C.6(2) 150 -- An_Attach_Handler_Pragma, -- C.3.1(3) 151 -- A_Controlled_Pragma, -- 13.11.3(2) 152 -- A_Convention_Pragma, -- B.1(4) 153 -- A_Discard_Names_Pragma, -- C.5(2), 154 -- An_Elaborate_Pragma, -- 10.2.1(19), 155 -- An_Elaborate_All_Pragma, -- 10.2.1(19) 156 -- An_Elaborate_Body_Pragma, -- 10.2.1(19) 157 -- An_Export_Pragma, -- B.1(4) 158 -- An_Import_Pragma, -- B.1(4) 159 -- An_Inline_Pragma, -- 6.3.2(2) 160 -- An_Inspection_Point_Pragma, -- H.3.2(2) 161 -- An_Interrupt_Handler_Pragma, -- C.3.1(1) 162 -- An_Interrupt_Priority_Pragma, -- D.1(4) 163 -- A_Linker_Options_Pragma, -- B.1(4), 164 -- A_List_Pragma, -- 2.8(20) 165 -- A_Locking_Policy_Pragma, -- D.3(2) 166 -- A_Normalize_Scalars_Pragma, -- H.1(2) 167 -- An_Optimize_Pragma, -- 2.8(20) 168 -- A_Pack_Pragma, -- 13.2(2) 169 -- A_Page_Pragma, -- 2.8(20) 170 -- A_Preelaborate_Pragma, -- 10.2.1(2) 171 -- A_Priority_Pragma, -- D.1(2) 172 -- A_Pure_Pragma, -- 10.2.1(13) 173 -- A_Queuing_Policy_Pragma, -- D.4(2) 174 -- A_Remote_Call_Interface_Pragma, -- E.2.3(2) 175 -- A_Remote_Types_Pragma, -- E.2.2(2) 176 -- A_Restrictions_Pragma, -- 13.12(2) 177 -- A_Reviewable_Pragma, -- H.3.1(2) 178 -- A_Shared_Passive_Pragma, -- E.2.1(2) 179 -- A_Storage_Size_Pragma, -- 13.3(62), 180 -- A_Suppress_Pragma, -- 11.5(3) 181 -- A_Task_Dispatching_Policy_Pragma, -- D.2.2(2) 182 -- A_Volatile_Pragma, -- C.6(2) 183 -- A_Volatile_Components_Pragma, -- C.6(2) 184 -- 185 -- An_Implementation_Defined_Pragma, -- Vendor Appendix M 186 187 -- An_Unknown_Pragma, -- Unknown to the compiler. 188 189 ------------------------------------------------------------ 190 191 -- A_Defining_Name, -- Asis.Declarations 192 193 -- Detailed classification for Asis.Element_Kinds (A_Defining_Name) 194 -- literal, corresponds to subtype Internal_Defining_Name_Kinds 195 ------------------------------------------------------------ 196 197 -- A_Defining_Identifier, -- 3.1 198 -- A_Defining_Character_Literal, -- 3.5.1 199 -- A_Defining_Enumeration_Literal, -- 3.5.1 200 201 -- A_Defining_Operator_Symbol 202 203 -- Detailed classification for 204 -- Asis.Operator_Kinds (A_Defining_Operator_Symbol) literal, 205 -- corresponds to subtype Internal_Defining_Operator_Kinds 206 207 -- A_Defining_And_Operator, -- and 208 -- A_Defining_Or_Operator, -- or 209 -- A_Defining_Xor_Operator, -- xor 210 -- A_Defining_Equal_Operator, -- = 211 -- A_Defining_Not_Equal_Operator, -- /= 212 -- A_Defining_Less_Than_Operator, -- < 213 -- A_Defining_Less_Than_Or_Equal_Operator, -- <= 214 -- A_Defining_Greater_Than_Operator, -- > 215 -- A_Defining_Greater_Than_Or_Equal_Operator, -- >= 216 -- A_Defining_Plus_Operator, -- + 217 -- A_Defining_Minus_Operator, -- - 218 -- A_Defining_Concatenate_Operator, -- & 219 -- A_Defining_Unary_Plus_Operator, -- + 220 -- A_Defining_Unary_Minus_Operator, -- - 221 -- A_Defining_Multiply_Operator, -- * 222 -- A_Defining_Divide_Operator, -- / 223 -- A_Defining_Mod_Operator, -- mod 224 -- A_Defining_Rem_Operator, -- rem 225 -- A_Defining_Exponentiate_Operator, -- ** 226 -- A_Defining_Abs_Operator, -- abs 227 -- A_Defining_Not_Operator, -- not 228 -- 229 -- A_Defining_Expanded_Name, 230 -- 6.1 program_unit_name.defining_identifier 231 -- 232 ------------------------------------------------------------ 233 234 -- A_Declaration, -- Asis.Declarations 235 236 -- Detailed classification for 237 -- Asis.Element_Kinds (A_Declaration) literal 238 -- corresponds to subtype Internal_Declaration_Kinds 239 ------------------------------------------------------------ 240 241 -- An_Ordinary_Type_Declaration, -- 3.2.1 242 -- A_Task_Type_Declaration, -- 3.2.1 243 -- A_Protected_Type_Declaration, -- 3.2.1 244 -- An_Incomplete_Type_Declaration, -- 3.2.1 245 -- A_Private_Type_Declaration, -- 3.2.1 246 -- A_Private_Extension_Declaration, -- 3.2.1 247 -- 248 -- A_Subtype_Declaration, -- 3.2.2 249 -- 250 -- A_Variable_Declaration, -- 3.3.1 -> Trait_Kinds 251 -- A_Constant_Declaration, -- 3.3.1 -> Trait_Kinds 252 -- A_Deferred_Constant_Declaration, -- 3.3.1 -> Trait_Kinds 253 -- A_Single_Task_Declaration, -- 3.3.1 254 -- A_Single_Protected_Declaration, -- 3.3.1 255 -- 256 -- An_Integer_Number_Declaration, -- 3.3.2 257 -- A_Real_Number_Declaration, -- 3.3.2 258 -- 259 -- An_Enumeration_Literal_Specification, -- 3.5.1 260 -- 261 -- A_Discriminant_Specification, -- 3.7 -> Trait_Kinds 262 -- 263 -- A_Component_Declaration, -- 3.8 264 -- 265 -- A_Loop_Parameter_Specification, -- 5.5 -> Trait_Kinds 266 -- A_Generalized_Iterator_Specification, -- 5.5.2 -> Trait_Kinds 267 -- An_Element_Iterator_Specification, -- 5.5.2 -> Trait_Kinds 268 -- 269 -- A_Procedure_Declaration, -- 6.1 -> Trait_Kinds 270 -- A_Function_Declaration, -- 6.1 -> Trait_Kinds 271 -- 272 -- A_Parameter_Specification, -- 6.1 -> Trait_Kinds 273 -- -- -> Mode_Kinds 274 -- 275 -- A_Procedure_Body_Declaration, -- 6.3 276 -- A_Function_Body_Declaration, -- 6.3 277 -- 278 -- A_Package_Declaration, -- 7.1 279 -- A_Package_Body_Declaration, -- 7.2 280 -- 281 -- An_Object_Renaming_Declaration, -- 8.5.1 282 -- An_Exception_Renaming_Declaration, -- 8.5.2 283 -- A_Package_Renaming_Declaration, -- 8.5.3 284 -- A_Procedure_Renaming_Declaration, -- 8.5.4 285 -- A_Function_Renaming_Declaration, -- 8.5.4 286 -- A_Generic_Package_Renaming_Declaration, -- 8.5.5 287 -- A_Generic_Procedure_Renaming_Declaration, -- 8.5.5 288 -- A_Generic_Function_Renaming_Declaration, -- 8.5.5 289 -- 290 -- A_Task_Body_Declaration, -- 9.1 291 -- A_Protected_Body_Declaration, -- 9.4 292 -- 293 -- An_Entry_Declaration, -- 9.5.2 294 -- An_Entry_Body_Declaration, -- 9.5.2 295 -- An_Entry_Index_Specification, -- 9.5.2 296 -- 297 -- A_Procedure_Body_Stub, -- 10.1.3 298 -- A_Function_Body_Stub, -- 10.1.3 299 -- A_Package_Body_Stub, -- 10.1.3 300 -- A_Task_Body_Stub, -- 10.1.3 301 -- A_Protected_Body_Stub, -- 10.1.3 302 -- 303 -- An_Exception_Declaration, -- 11.1 304 -- A_Choice_Parameter_Specification, -- 11.2 305 -- 306 -- A_Generic_Procedure_Declaration, -- 12.1 307 -- A_Generic_Function_Declaration, -- 12.1 308 -- A_Generic_Package_Declaration, -- 12.1 309 -- 310 -- A_Package_Instantiation, -- 12.3 311 -- A_Procedure_Instantiation, -- 12.3 312 -- A_Function_Instantiation, -- 12.3 313 -- 314 -- A_Formal_Object_Declaration, -- 12.4 -> Mode_Kinds 315 -- A_Formal_Type_Declaration, -- 12.5 316 -- A_Formal_Procedure_Declaration, -- 12.6 -> Default_Kinds 317 -- A_Formal_Function_Declaration, -- 12.6 -> Default_Kinds 318 -- A_Formal_Package_Declaration, -- 12.7 319 -- A_Formal_Package_Declaration_With_Box, -- 12.7 320 -- 321 ------------------------------------------------------------ 322 323 -- A_Definition, -- Asis.Definitions 324 -- 325 -- Detailed classification for Asis.Element_Kinds (A_Definition) 326 -- literal, corresponds to subtype Internal_Definition_Kinds 327 ------------------------------------------------------------ 328 329 -- A_Type_Definition, -- 3.2.1 -> Type_Kinds 330 331 -- Detailed classification for Asis.Definition_Kinds (A_Type_Definition) 332 -- literal, corresponds to subtype Internal_Type_Kinds 333 334 -- A_Derived_Type_Definition, -- 3.4 -> Trait_Kinds 335 -- A_Derived_Record_Extension_Definition, -- 3.4 -> Trait_Kinds 336 -- 337 -- An_Enumeration_Type_Definition, -- 3.5.1 338 -- 339 -- A_Signed_Integer_Type_Definition, -- 3.5.4 340 -- A_Modular_Type_Definition, -- 3.5.4 341 -- 342 -- A_Root_Type_Definition, -- 3.5.4(10), 3.5.6(4) 343 -- -> Root_Type_Kinds 344 -- Detailed classification for Asis.Type_Kinds (A_Root_Type_Definition) 345 -- literal, corresponds to subtype Internal_Root_Type_Kinds 346 347 -- A_Root_Integer_Definition, -- 3.5.4(9) 348 -- A_Root_Real_Definition, -- 3.5.6(2) 349 -- 350 -- A_Universal_Integer_Definition, -- 3.5.4(10) 351 -- A_Universal_Real_Definition, -- 3.5.6(4) 352 -- A_Universal_Fixed_Definition, -- 3.5.6(4) 353 -- 354 -- 355 -- A_Floating_Point_Definition, -- 3.5.7 356 -- 357 -- An_Ordinary_Fixed_Point_Definition, -- 3.5.9 358 -- A_Decimal_Fixed_Point_Definition, -- 3.5.9 359 -- 360 -- An_Unconstrained_Array_Definition, -- 3.6 361 -- A_Constrained_Array_Definition, -- 3.6 362 -- 363 -- A_Record_Type_Definition, -- 3.8 -> Trait_Kinds 364 -- A_Tagged_Record_Type_Definition, -- 3.8 -> Trait_Kinds 365 366 -- An_Access_Type_Definition, -- 3.10 -> Access_Type_Kinds 367 368 -- Detailed classification for 369 -- Asis.Type_Kinds (An_Access_Type_Definition) literal, 370 -- corresponds to subtype Internal_Access_Type_Kinds 371 372 -- A_Pool_Specific_Access_To_Variable, -- access subtype_indication 373 -- An_Access_To_Variable, -- access all subtype_indication 374 -- An_Access_To_Constant, -- access constant subtype_indication 375 -- 376 -- An_Access_To_Procedure, -- access procedure 377 -- An_Access_To_Protected_Procedure, -- access protected procedure 378 -- An_Access_To_Function, -- access function 379 -- An_Access_To_Protected_Function, -- access protected function 380 381 -- A_Subtype_Indication, -- 3.2.2 382 383 -- A_Constraint, -- 3.2.2 -> Constraint_Kinds 384 385 -- Detailed classification for Asis.Definition_Kinds (A_Constraint) 386 -- literal, corresponds to subtype Internal_Constraint_Kinds 387 388 -- A_Range_Attribute_Reference, -- 3.2.2, 3.5 389 -- A_Simple_Expression_Range, -- 3.2.2, 3.5 390 -- A_Digits_Constraint, -- 3.2.2, 3.5.9 391 -- A_Delta_Constraint, -- 3.2.2, N.3 392 -- An_Index_Constraint, -- 3.2.2, 3.6.1 393 -- A_Discriminant_Constraint, -- 3.2.2 394 -- 395 -- A_Component_Definition, -- 3.6 396 397 -- A_Discrete_Subtype_Definition, -- 3.6 -> Discrete_Range_Kinds 398 399 -- Detailed classification for 400 -- Asis.Definition_Kinds (A_Discrete_Subtype_Definition) literal, 401 -- corresponds to subtype Internal_Discrete_Subtype_Definition_Kinds 402 403 -- A_Discrete_Subtype_Indication_As_Subtype_Definition, -- 3.6.1, 3.2.2 404 -- A_Discrete_Range_Attribute_Reference_As_Subtype_Definition, 405 -- -- 3.6.1, 3.5 406 -- A_Discrete_Simple_Expression_Range_As_Subtype_Definition, 407 -- -- 3.6.1, 3.5 408 409 -- There is no syntactical difference between 410 -- A_Discrete_Subtype_Definition kinds and A_Discrete_Range kinds, the 411 -- difference is in the context in which they occur - the first defines 412 -- subtype in an array type definition, the second should corresponds to 413 -- some existing subtype in a range constraint 414 -- 415 -- This is the case when in the ASIS-defined Element classification 416 -- we have a net instead of a hierarchy 417 418 -- A_Discrete_Range, -- 3.6.1 -> Discrete_Range_Kinds 419 420 -- Detailed classification for Asis.Definition_Kinds (A_Discrete_Range) 421 -- literal, corresponds to subtype Internal_Discrete_Range_Kinds 422 423 -- A_Discrete_Subtype_Indication, -- 3.6.1, 3.2.2 424 -- A_Discrete_Range_Attribute_Reference, -- 3.6.1, 3.5 425 -- A_Discrete_Simple_Expression_Range, -- 3.6.1, 3.5 426 -- 427 -- 428 -- An_Unknown_Discriminant_Part, -- 3.7 429 -- A_Known_Discriminant_Part, -- 3.7 430 -- 431 -- A_Record_Definition, -- 3.8 432 -- A_Null_Record_Definition, -- 3.8 433 -- 434 -- A_Null_Component, -- 3.8 435 -- A_Variant_Part, -- 3.8 436 -- A_Variant, -- 3.8 437 -- 438 -- An_Others_Choice, -- 3.8.1, 4.3.1, 4.3.3, 11.2 439 -- 440 -- A_Private_Type_Definition, -- 7.3 -> Trait_Kinds 441 -- A_Tagged_Private_Type_Definition, -- 7.3 -> Trait_Kinds 442 -- A_Private_Extension_Definition, -- 7.3 -> Trait_Kinds 443 -- 444 -- A_Task_Definition, -- 9.1 445 -- A_Protected_Definition, -- 9.4 446 -- 447 -- A_Formal_Type_Definition, -- 12.5 -> Formal_Type_Kinds 448 449 -- Detailed classification for 450 -- Asis.Definition_Kinds (A_Formal_Type_Definition) literal, 451 -- corresponds to subtype Internal_Formal_Type_Kinds 452 453 -- A_Formal_Private_Type_Definition, -- 12.5.1 -> Trait_Kinds 454 -- A_Formal_Tagged_Private_Type_Definition, -- 12.5.1 -> Trait_Kinds 455 -- 456 -- A_Formal_Derived_Type_Definition, -- 12.5.1 -> Trait_Kinds 457 -- 458 -- A_Formal_Discrete_Type_Definition, -- 12.5.2 459 -- 460 -- A_Formal_Signed_Integer_Type_Definition, -- 12.5.2 461 -- A_Formal_Modular_Type_Definition, -- 12.5.2 462 -- 463 -- A_Formal_Floating_Point_Definition, -- 12.5.2 464 -- 465 -- A_Formal_Ordinary_Fixed_Point_Definition, -- 12.5.2 466 -- A_Formal_Decimal_Fixed_Point_Definition, -- 12.5.2 467 -- 468 -- A_Formal_Unconstrained_Array_Definition, -- 12.5.3 469 -- A_Formal_Constrained_Array_Definition, -- 12.5.3 470 471 -- A_Formal_Access_Type_Definition, -- 12.5.4 -> Access_Type_Kinds 472 473 -- Detailed classification for 474 -- Asis.Definition_Kinds.Internal_Formal_Type_Kinds 475 -- (A_Formal_Access_Type_Definition) literal, 476 -- corresponds to subtype Internal_Formal_Access_Type_Kinds 477 478 -- A_Formal_Pool_Specific_Access_To_Variable, 479 -- -- access subtype_indication 480 -- A_Formal_Access_To_Variable, -- access all subtype_indication 481 -- A_Formal_Access_To_Constant, -- access constant subtype_indication 482 -- 483 -- A_Formal_Access_To_Procedure, -- access procedure 484 -- A_Formal_Access_To_Protected_Procedure, -- access protected procedure 485 -- A_Formal_Access_To_Function, -- access function 486 -- A_Formal_Access_To_Protected_Function, -- access protected function 487 -- An_Aspect_Specification, -- Ada 2012 488 489 ------------------------------------------------------------ 490 491 -- An_Expression, -- Asis.Expressions 492 493 -- Detailed classification for Asis.Element_Kinds (An_Expression) 494 -- literal corresponds to subtype Internal_Expression_Kinds 495 ------------------------------------------------------------ 496 497 -- A_Box_Expression 498 -- An_Integer_Literal, -- 2.4 499 -- A_Real_Literal, -- 2.4.1 500 -- A_String_Literal, -- 2.6 501 502 -- An_Identifier, -- 4.1 503 504 -- An_Operator_Symbol, -- 4.1 505 506 -- Detailed classification for 507 -- Asis.Expression_Kinds (An_Operator_Symbol) literal 508 -- corresponds to subtype Internal_Operator_Symbol_Kinds 509 510 -- An_And_Operator, -- and 511 -- An_Or_Operator, -- or 512 -- An_Xor_Operator, -- xor 513 -- An_Equal_Operator, -- = 514 -- A_Not_Equal_Operator, -- /= 515 -- A_Less_Than_Operator, -- < 516 -- A_Less_Than_Or_Equal_Operator, -- <= 517 -- A_Greater_Than_Operator, -- > 518 -- A_Greater_Than_Or_Equal_Operator, -- >= 519 -- A_Plus_Operator, -- + 520 -- A_Minus_Operator, -- - 521 -- A_Concatenate_Operator, -- & 522 -- A_Unary_Plus_Operator, -- + 523 -- A_Unary_Minus_Operator, -- - 524 -- A_Multiply_Operator, -- * 525 -- A_Divide_Operator, -- / 526 -- A_Mod_Operator, -- mod 527 -- A_Rem_Operator, -- rem 528 -- An_Exponentiate_Operator, -- ** 529 -- An_Abs_Operator, -- abs 530 -- A_Not_Operator, -- not 531 -- 532 -- A_Character_Literal, -- 4.1 533 -- An_Enumeration_Literal, -- 4.1 534 -- An_Explicit_Dereference, -- 4.1 535 -- A_Function_Call, -- 4.1 536 -- 537 -- An_Indexed_Component, -- 4.1.1 538 -- A_Slice, -- 4.1.2 539 -- A_Selected_Component, -- 4.1.3 540 -- 541 -- An_Attribute_Reference, -- 4.1.4 542 543 -- Detailed classification for 544 -- Asis.Expression_Kinds (An_Attribute_Reference) literal 545 -- corresponds to subtype Internal_Attribute_Reference_Kinds 546 547 -- An_Access_Attribute, -- 3.10.2(24), 3.10.2(32), K(2), K(4) 548 -- An_Address_Attribute, -- 13.3(11), J.7.1(5), K(6) 549 -- An_Adjacent_Attribute, -- A.5.3(48), K(8) 550 -- An_Aft_Attribute, -- 3.5.10(5), K(12) 551 -- An_Alignment_Attribute, -- 13.3(23), K(14) 552 -- A_Base_Attribute, -- 3.5(15), K(17) 553 -- A_Bit_Order_Attribute, -- 13.5.3(4), K(19) 554 -- A_Body_Version_Attribute, -- E.3(4), K(21) 555 -- A_Callable_Attribute, -- 9.9(2), K(23) 556 -- A_Caller_Attribute, -- C.7.1(14), K(25) 557 -- A_Ceiling_Attribute, -- A.5.3(33), K(27) 558 -- A_Class_Attribute, -- 3.9(14), 7.3.1(9), K(31), K(34) 559 -- A_Component_Size_Attribute, -- 13.3(69), K(36) 560 -- A_Compose_Attribute, -- A.5.3(24), K(38) 561 -- A_Constrained_Attribute, -- 3.7.2(3), J.4(2), K(42) 562 -- A_Copy_Sign_Attribute, -- A.5.3(51), K(44) 563 -- A_Count_Attribute, -- 9.9(5), K(48) 564 -- A_Definite_Attribute, -- 12.5.1(23), K(50) 565 -- A_Delta_Attribute, -- 3.5.10(3), K(52) 566 -- A_Denorm_Attribute, -- A.5.3(9), K(54) 567 -- A_Digits_Attribute, -- 3.5.8(2), 3.5.10(7), K(56), K(58) 568 -- An_Exponent_Attribute, -- A.5.3(18), K(60) 569 -- An_External_Tag_Attribute, -- 13.3(75), K(64) 570 -- A_First_Attribute, -- 3.5(12), 3.6.2(3), K(68), K(70) 571 -- A_First_Bit_Attribute, -- 13.5.2(3), K(72) 572 -- A_Floor_Attribute, -- A.5.3(30), K(74) 573 -- A_Fore_Attribute, -- 3.5.10(4), K(78) 574 -- A_Fraction_Attribute, -- A.5.3(21), K(80) 575 -- An_Identity_Attribute, -- 11.4.1(9), C.7.1(12), K(84), K(86) 576 -- An_Image_Attribute, -- 3.5(35), K(88) 577 -- An_Input_Attribute, -- 13.13.2(22), 13.13.2(32), K(92), K(96) 578 -- A_Last_Attribute, -- 3.5(13), 3.6.2(5), K(102), K(104) 579 -- A_Last_Bit_Attribute, -- 13.5.2(4), K(106) 580 -- A_Leading_Part_Attribute, -- A.5.3(54), K(108) 581 -- A_Length_Attribute, -- 3.6.2(9), K(117) 582 -- A_Machine_Attribute, -- A.5.3(60), K(119) 583 -- A_Machine_Emax_Attribute, -- A.5.3(8), K(123) 584 -- A_Machine_Emin_Attribute, -- A.5.3(7), K(125) 585 -- A_Machine_Mantissa_Attribute, -- A.5.3(6), K(127) 586 -- A_Machine_Overflows_Attribute, -- A.5.3(12), A.5.4(4), K(129), K(131) 587 -- A_Machine_Radix_Attribute, -- A.5.3(2), A.5.4(2), K(133), K(135) 588 -- A_Machine_Rounds_Attribute, -- A.5.3(11), A.5.4(3), K(137), K(139) 589 -- A_Max_Attribute, -- 3.5(19), K(141) 590 -- A_Max_Size_In_Storage_Elements_Attribute, -- 13.11.1(3), K(145) 591 -- A_Min_Attribute, -- 3.5(16), K(147) 592 -- A_Model_Attribute, -- A.5.3(68), G.2.2(7), K(151) 593 -- A_Model_Emin_Attribute, -- A.5.3(65), G.2.2(4), K(155) 594 -- A_Model_Epsilon_Attribute, -- A.5.3(66), K(157) 595 -- A_Model_Mantissa_Attribute, -- A.5.3(64), G.2.2(3), K(159) 596 -- A_Model_Small_Attribute, -- A.5.3(67), K(161) 597 -- A_Modulus_Attribute, -- 3.5.4(17), K(163) 598 -- An_Output_Attribute, -- 13.13.2(19), 13.13.2(29), K(165), K(169) 599 -- A_Partition_ID_Attribute, -- E.1(9), K(173) 600 -- A_Pos_Attribute, -- 3.5.5(2), K(175) 601 -- A_Position_Attribute, -- 13.5.2(2), K(179) 602 -- A_Pred_Attribute, -- 3.5(25), K(181) 603 -- A_Range_Attribute, -- 3.5(14), 3.6.2(7), K(187), K(189) 604 -- A_Read_Attribute, -- 13.13.2(6), 13.13.2(14), K(191), K(195) 605 -- A_Remainder_Attribute, -- A.5.3(45), K(199) 606 -- A_Round_Attribute, -- 3.5.10(12), K(203) 607 -- A_Rounding_Attribute, -- A.5.3(36), K(207) 608 -- A_Safe_First_Attribute, -- A.5.3(71), G.2.2(5), K(211) 609 -- A_Safe_Last_Attribute, -- A.5.3(72), G.2.2(6), K(213) 610 -- A_Scale_Attribute, -- 3.5.10(11), K(215) 611 -- A_Scaling_Attribute, -- A.5.3(27), K(217) 612 -- A_Signed_Zeros_Attribute, -- A.5.3(13), K(221) 613 -- A_Size_Attribute, -- 13.3(40), 13.3(45), K(223), K(228) 614 -- A_Small_Attribute, -- 3.5.10(2), K(230) 615 -- A_Storage_Pool_Attribute, -- 13.11(13), K(232) 616 -- A_Storage_Size_Attribute, -- 13.3(60), 13.11(14), J.9(2), K(234), 617 -- -- K(236) 618 -- A_Succ_Attribute, -- 3.5(22), K(238) 619 -- A_Tag_Attribute, -- 3.9(16), 3.9(18), K(242), K(244) 620 -- A_Terminated_Attribute, -- 9.9(3), K(246) 621 -- A_Truncation_Attribute, -- A.5.3(42), K(248) 622 -- An_Unbiased_Rounding_Attribute, -- A.5.3(39), K(252) 623 -- An_Unchecked_Access_Attribute, -- 13.10(3), H.4(18), K(256) 624 -- A_Val_Attribute, -- 3.5.5(5), K(258) 625 -- A_Valid_Attribute, -- 13.9.2(3), H(6), K(262) 626 -- A_Value_Attribute, -- 3.5(52), K(264) 627 -- A_Version_Attribute, -- E.3(3), K(268) 628 -- A_Wide_Image_Attribute, -- 3.5(28), K(270) 629 -- A_Wide_Value_Attribute, -- 3.5(40), K(274) 630 -- A_Wide_Width_Attribute, -- 3.5(38), K(278) 631 -- A_Width_Attribute, -- 3.5(39), K(280) 632 -- A_Write_Attribute, -- 13.13.2(3), 13.13.2(11), K(282), K(286) 633 -- 634 -- An_Implementation_Defined_Attribute, -- Vendor Annex M 635 -- An_Unknown_Attribute, 636 -- 637 -- A_Record_Aggregate, -- 4.3 638 -- An_Extension_Aggregate, -- 4.3 639 -- A_Positional_Array_Aggregate, -- 4.3 640 -- A_Named_Array_Aggregate, -- 4.3 641 -- 642 -- An_And_Then_Short_Circuit, -- 4.4 643 -- An_Or_Else_Short_Circuit, -- 4.4 644 -- 645 -- An_In_Membership_Test, -- 4.4 Ada 2012 646 -- A_Not_In_Membership_Test, -- 4.4 Ada 2012 647 -- 648 -- A_Null_Literal, -- 4.4 649 -- A_Parenthesized_Expression, -- 4.4 650 -- 651 -- A_Type_Conversion, -- 4.6 652 -- A_Qualified_Expression, -- 4.7 653 -- 654 -- An_Allocation_From_Subtype, -- 4.8 655 -- An_Allocation_From_Qualified_Expression, -- 4.8 656 -- 657 ------------------------------------------------------------ 658 659 -- An_Association, -- Asis.Expressions 660 661 -- Detailed classification for Asis.Element_Kinds (An_Association) 662 -- literal corresponds to subtype Internal_Association_Kinds 663 ------------------------------------------------------------ 664 665 -- A_Pragma_Argument_Association, -- 2.8 666 -- A_Discriminant_Association, -- 3.7.1 667 -- A_Record_Component_Association, -- 4.3.1 668 -- An_Array_Component_Association, -- 4.3.3 669 -- A_Parameter_Association, -- 6.4 670 -- A_Generic_Association, -- 12.3 671 -- 672 ------------------------------------------------------------ 673 674 -- A_Statement, -- Asis.Statements 675 676 -- Detailed classification for Asis.Element_Kinds (A_Statement) literal 677 -- corresponds to subtype Internal_Statement_Kinds 678 ------------------------------------------------------------ 679 680 -- A_Null_Statement, -- 5.1 681 -- An_Assignment_Statement, -- 5.2 682 -- An_If_Statement, -- 5.3 683 -- A_Case_Statement, -- 5.4 684 -- 685 -- A_Loop_Statement, -- 5.5 686 -- A_While_Loop_Statement, -- 5.5 687 -- A_For_Loop_Statement, -- 5.5 688 689 -- A_Block_Statement, -- 5.6 690 -- An_Exit_Statement, -- 5.7 691 -- A_Goto_Statement, -- 5.8 692 -- 693 -- A_Procedure_Call_Statement, -- 6.4 694 -- A_Return_Statement, -- 6.5 695 -- 696 -- An_Accept_Statement, -- 9.5.2 697 -- An_Entry_Call_Statement, -- 9.5.3 698 -- 699 -- A_Requeue_Statement, -- 9.5.4 700 -- A_Requeue_Statement_With_Abort, -- 9.5.4 701 -- 702 -- A_Delay_Until_Statement, -- 9.6 703 -- A_Delay_Relative_Statement, -- 9.6 704 -- 705 -- A_Terminate_Alternative_Statement, -- 9.7.1 706 -- 707 -- A_Selective_Accept_Statement, -- 9.7.2 708 -- A_Timed_Entry_Call_Statement, -- 9.7.3 709 -- A_Conditional_Entry_Call_Statement, -- 9.7.3 710 -- An_Asynchronous_Select_Statement, -- 9.7.4 711 -- 712 -- An_Abort_Statement, -- 9.8 713 -- A_Raise_Statement, -- 11.3 714 -- A_Code_Statement, -- 13.8 715 716 ------------------------------------------------------------ 717 -- Path_Kinds 718 -- Literals -- Ada RM 719 -- 720 -- Detailed classification for Asis.Element_Kinds (A_Path) literal 721 -- corresponds to subtype Internal_Path_Kinds 722 ------------------------------------------------------------ 723 724 -- An_If_Path, -- 5.3: 725 -- if condition then 726 -- sequence_of_statements 727 728 -- An_Elsif_Path, -- 5.3: 729 -- elsif condition then 730 -- sequence_of_statements 731 732 -- An_Else_Path, -- 5.3, 9.7.1, 9.7.3: 733 -- else sequence_of_statements 734 735 -- A_Case_Path, -- 5.4: 736 -- when discrete_choice_list => 737 -- sequence_of_statements 738 739 -- A_Select_Path, -- 9.7.1: 740 -- select [guard] select_alternative 741 -- 9.7.2, 9.7.3: 742 -- select entry_call_alternative 743 -- 9.7.4: 744 -- select triggering_alternative 745 746 -- An_Or_Path, -- 9.7.1: 747 -- or [guard] select_alternative 748 -- 9.7.2: 749 -- or delay_alternative 750 751 -- A_Then_Abort_Path, -- 9.7.4 752 -- then abort sequence_of_statements 753 754 ------------------------------------------------------------ 755 756 -- A_Clause, -- Asis.Clauses 757 758 -- Detailed classification for Asis.Element_Kinds (A_Clause) literal 759 -- corresponds to subtype Internal_Clause_Kinds 760 ------------------------------------------------------------ 761 762 -- A_Use_Package_Clause, -- 8.4 763 -- A_Use_Type_Clause, -- 8.4 764 -- A_With_Clause, -- 10.1.2 765 766 -- A_Representation_Clause, -- 13.1 -> Representation_Clause_Kinds 767 768 -- Detailed classification for 769 -- Asis.Clause_Kinds (A_Representation_Clause) literal, 770 -- corresponds to subtype Internal_Representation_Clause_Kinds 771 772 -- An_Attribute_Definition_Clause, -- 13.3.1 773 -- An_Enumeration_Representation_Clause, -- 13.4 774 -- A_Record_Representation_Clause, -- 13.5.3 775 -- An_At_Clause, -- N.7 776 -- 777 -- A_Component_Clause, -- 13.5.3 778 -- 779 ------------------------------------------------------------ 780 781 -- An_Exception_Handler, -- Asis.Statements 782 783 -- The rest of the A4G.Int_Knds.Internal_Element_Kinds values are the 784 -- special values added the ASIS implementation needs. 785 786 -- The subtype definitions below define ranges corresponding to the 787 -- positions (subordinate kinds) in the original Element kinds 788 -- classification hierarchy defined in the Asis package, as well as 789 -- some other ranges which may be useful for applications 790 791 subtype Flat_Pragma_Kinds is Flat_Element_Kinds 792 range An_All_Calls_Remote_Pragma .. An_Unknown_Pragma; 793 794 subtype Flat_Defining_Name_Kinds is Flat_Element_Kinds 795 range A_Defining_Identifier .. A_Defining_Expanded_Name; 796 797 subtype Flat_Defining_Simple_Name_Kinds is Flat_Defining_Name_Kinds 798 range A_Defining_Identifier .. A_Defining_Not_Operator; 799 800 subtype Flat_Usage_Name_Kinds is Flat_Element_Kinds 801 range An_Identifier .. An_Enumeration_Literal; 802 803 subtype Flat_Defining_Operator_Kinds is Flat_Defining_Name_Kinds 804 range A_Defining_And_Operator .. A_Defining_Not_Operator; 805 806 subtype Flat_Declaration_Kinds is Flat_Element_Kinds range 807 An_Ordinary_Type_Declaration .. A_Formal_Package_Declaration_With_Box; 808 809 subtype A_Flat_Type_Declaration is Flat_Declaration_Kinds 810 range An_Ordinary_Type_Declaration .. A_Private_Extension_Declaration; 811 812 subtype A_Flat_Full_Type_Declaration is Flat_Declaration_Kinds 813 range An_Ordinary_Type_Declaration .. A_Protected_Type_Declaration; 814 815 subtype A_Flat_Object_Declaration is Flat_Declaration_Kinds 816 range A_Variable_Declaration .. A_Single_Protected_Declaration; 817 818 subtype A_Flat_Number_Declaration is Flat_Declaration_Kinds 819 range An_Integer_Number_Declaration .. A_Real_Number_Declaration; 820 821 subtype A_Flat_Renaming_Declaration is Flat_Declaration_Kinds 822 range An_Object_Renaming_Declaration .. 823 A_Generic_Function_Renaming_Declaration; 824 825 subtype A_Flat_Body_Stub is Flat_Declaration_Kinds 826 range A_Procedure_Body_Stub .. A_Protected_Body_Stub; 827 828 subtype A_Flat_Generic_Declaration is Flat_Declaration_Kinds 829 range A_Generic_Procedure_Declaration .. A_Generic_Package_Declaration; 830 831 subtype A_Flat_Generic_Instantiation is Flat_Declaration_Kinds 832 range A_Package_Instantiation .. A_Function_Instantiation; 833 834 subtype A_Flat_Formal_Declaration is Flat_Declaration_Kinds range 835 A_Formal_Object_Declaration .. A_Formal_Package_Declaration_With_Box; 836 837 subtype Flat_Definition_Kinds is Flat_Element_Kinds range 838 A_Derived_Type_Definition .. An_Aspect_Specification; 839 840 subtype Flat_Type_Kinds is Flat_Definition_Kinds 841 range A_Derived_Type_Definition .. An_Access_To_Protected_Function; 842 843 subtype Flat_Interface_Kinds is Flat_Type_Kinds range 844 An_Ordinary_Interface .. A_Synchronized_Interface; 845 846 subtype Flat_Access_Type_Kinds is Flat_Type_Kinds range 847 A_Pool_Specific_Access_To_Variable .. An_Access_To_Protected_Function; 848 849 subtype Flat_Access_To_Object_Definition is Flat_Access_Type_Kinds 850 range A_Pool_Specific_Access_To_Variable .. An_Access_To_Constant; 851 852 subtype Flat_Access_To_Subprogram_Definition is Flat_Access_Type_Kinds 853 range An_Access_To_Procedure .. An_Access_To_Protected_Function; 854 855 subtype Flat_Access_Definition_Kinds is Flat_Definition_Kinds 856 range An_Anonymous_Access_To_Variable .. 857 An_Anonymous_Access_To_Protected_Function; 858 859 subtype Flat_Root_Type_Kinds is Flat_Type_Kinds 860 range A_Root_Integer_Definition .. A_Universal_Fixed_Definition; 861 862 subtype Flat_Constraint_Kinds is Flat_Definition_Kinds 863 range A_Range_Attribute_Reference .. A_Discriminant_Constraint; 864 865 subtype Flat_Discrete_Subtype_Definition_Kinds is Flat_Definition_Kinds 866 range A_Discrete_Subtype_Indication_As_Subtype_Definition .. 867 A_Discrete_Simple_Expression_Range_As_Subtype_Definition; 868 869 subtype Flat_Discrete_Range_Kinds is Flat_Definition_Kinds range 870 A_Discrete_Subtype_Indication .. A_Discrete_Simple_Expression_Range; 871 872 subtype Flat_Formal_Type_Kinds is Flat_Definition_Kinds 873 range A_Formal_Private_Type_Definition .. 874 A_Formal_Access_To_Protected_Function; 875 876 subtype Flat_Formal_Interface_Kinds is Flat_Formal_Type_Kinds 877 range A_Formal_Ordinary_Interface .. A_Formal_Synchronized_Interface; 878 879 subtype Flat_Formal_Access_Type_Kinds is Flat_Formal_Type_Kinds 880 range A_Formal_Pool_Specific_Access_To_Variable .. 881 A_Formal_Access_To_Protected_Function; 882 883 subtype Flat_Association_Kinds is Flat_Element_Kinds 884 range A_Pragma_Argument_Association .. A_Generic_Association; 885 886 subtype Flat_Expression_Kinds is Flat_Element_Kinds 887 range A_Box_Expression .. A_For_Some_Quantified_Expression; 888 889 subtype Flat_Operator_Symbol_Kinds is Flat_Expression_Kinds 890 range An_And_Operator .. A_Not_Operator; 891 892 subtype Flat_Attribute_Reference_Kinds is Flat_Expression_Kinds 893 range An_Access_Attribute .. An_Unknown_Attribute; 894 895 -- The following two subtypes are for attributes that can have an 896 -- expression, as in T'First(2), and those that cannot. 897 898 subtype Flat_Attr_Ref_With_Exp_Kinds is 899 Flat_Attribute_Reference_Kinds with 900 Predicate => Flat_Attr_Ref_With_Exp_Kinds in 901 A_First_Attribute | 902 A_Last_Attribute | 903 A_Length_Attribute | 904 A_Range_Attribute | 905 An_Implementation_Defined_Attribute | 906 An_Unknown_Attribute; 907 908 subtype Flat_Attr_Ref_Without_Exp_Kinds is 909 Flat_Attribute_Reference_Kinds with 910 Predicate => Flat_Attr_Ref_Without_Exp_Kinds not in 911 Flat_Attr_Ref_With_Exp_Kinds; 912 913 subtype Flat_Statement_Kinds is Flat_Element_Kinds 914 range A_Null_Statement .. A_Code_Statement; 915 916 subtype Flat_Loop_Statement is Flat_Statement_Kinds 917 range A_Loop_Statement .. A_For_Loop_Statement; 918 919 subtype Flat_Path_Kinds is Flat_Element_Kinds 920 range An_If_Path .. An_Else_Expression_Path; 921 922 subtype Flat_Expression_Path_Kinds is Flat_Element_Kinds 923 range A_Case_Expression_Path .. An_Else_Expression_Path; 924 925 subtype Flat_Clause_Kinds is Flat_Element_Kinds 926 range A_Use_Package_Clause .. A_Component_Clause; 927 928 subtype Flat_Use_Clause_Kinds is Flat_Clause_Kinds 929 range A_Use_Package_Clause .. A_Use_All_Type_Clause; 930 931 subtype Flat_Context_Clause_Kinds is Flat_Clause_Kinds 932 range A_Use_Package_Clause .. A_With_Clause; 933 934 subtype Flat_Representation_Clause_Kinds is Flat_Clause_Kinds 935 range An_Attribute_Definition_Clause .. An_At_Clause; 936 937 subtype Flat_List_Kinds is Flat_Element_Kinds'Base 938 range An_Element_List .. A_Variant_List; 939 940 subtype Flat_Abstract_Classes is Flat_Element_Kinds'Base 941 range An_Element_Class .. A_Statement_Class; 942 943 subtype Flat_Declarative_Item_Kinds is Flat_Element_Kinds with 944 Predicate => Flat_Declarative_Item_Kinds in 945 Flat_Declaration_Kinds | Flat_Pragma_Kinds | Flat_Clause_Kinds; 946 947 subtype Flat_Name_Kinds is Flat_Element_Kinds with 948 Predicate => Flat_Name_Kinds in 949 An_Identifier | A_Selected_Component; 950 951 subtype Flat_Range_Constraint_Kinds is Flat_Element_Kinds with 952 Predicate => Flat_Range_Constraint_Kinds in 953 A_Range_Attribute_Reference | A_Simple_Expression_Range; 954 955 subtype Flat_Record_Component_Kinds is Flat_Element_Kinds with 956 Predicate => Flat_Record_Component_Kinds in 957 Flat_Pragma_Kinds | 958 A_Component_Declaration | 959 A_Null_Component | 960 A_Variant_Part | 961 An_Attribute_Definition_Clause; 962 963 --------------------------------------------------------------- 964 -- Queries implementing the flat Element classification and -- 965 -- mapping it onto the ASIS-defined classification hierarchy -- 966 --------------------------------------------------------------- 967 968 function Flat_Element_Kind 969 (Element : Asis.Element) 970 return Flat_Element_Kinds; 971 -- Returns the Flat_Element_Kinds value of Element. Not_An_Element is 972 -- returned if and only if Element is Nil_Element 973 974 -- The following functions convert the value of Flat_Element_Kinds 975 -- given as their argument into the corresponding value of the 976 -- corresponding Asis Element Classification subordinate kind. 977 -- Not_A_XXX is returned if the argument does not belong to the 978 -- corresponding subordinate kind of the Element classification 979 -- hierarchy (and, thereforo to the corresponding flat classification 980 -- subtype. 981 982 function Asis_From_Flat_Kind 983 (Flat_Kind : Flat_Element_Kinds) 984 return Asis.Element_Kinds; 985 986 function Pragma_Kind_From_Flat 987 (Flat_Kind : Flat_Element_Kinds) 988 return Asis.Pragma_Kinds; 989 990 function Defining_Name_Kind_From_Flat 991 (Flat_Kind : Flat_Element_Kinds) 992 return Asis.Defining_Name_Kinds; 993 994 function Declaration_Kind_From_Flat 995 (Flat_Kind : Flat_Element_Kinds) 996 return Asis.Declaration_Kinds; 997 function Definition_Kind_From_Flat 998 (Flat_Kind : Flat_Element_Kinds) 999 return Asis.Definition_Kinds; 1000 1001 function Type_Kind_From_Flat 1002 (Flat_Kind : Flat_Element_Kinds) 1003 return Asis.Type_Kinds; 1004 1005 function Formal_Type_Kind_From_Flat 1006 (Flat_Kind : Flat_Element_Kinds) 1007 return Asis.Formal_Type_Kinds; 1008 1009 function Access_Type_Kind_From_Flat 1010 (Flat_Kind : Flat_Element_Kinds) 1011 return Asis.Access_Type_Kinds; 1012 1013 function Root_Type_Kind_From_Flat 1014 (Flat_Kind : Flat_Element_Kinds) 1015 return Asis.Root_Type_Kinds; 1016 1017 function Constraint_Kind_From_Flat 1018 (Flat_Kind : Flat_Element_Kinds) 1019 return Asis.Constraint_Kinds; 1020 1021 function Discrete_Range_Kind_From_Flat 1022 (Flat_Kind : Flat_Element_Kinds) 1023 return Asis.Discrete_Range_Kinds; 1024 1025 function Expression_Kind_From_Flat 1026 (Flat_Kind : Flat_Element_Kinds) 1027 return Asis.Expression_Kinds; 1028 1029 function Operator_Kind_From_Flat 1030 (Flat_Kind : Flat_Element_Kinds) 1031 return Asis.Operator_Kinds; 1032 1033 function Attribute_Kind_From_Flat 1034 (Flat_Kind : Flat_Element_Kinds) 1035 return Asis.Attribute_Kinds; 1036 1037 function Association_Kind_From_Flat 1038 (Flat_Kind : Flat_Element_Kinds) 1039 return Asis.Association_Kinds; 1040 1041 function Statement_Kind_From_Flat 1042 (Flat_Kind : Flat_Element_Kinds) 1043 return Asis.Statement_Kinds; 1044 1045 function Path_Kind_From_Flat 1046 (Flat_Kind : Flat_Element_Kinds) 1047 return Asis.Path_Kinds; 1048 1049 function Clause_Kind_From_Flat 1050 (Flat_Kind : Flat_Element_Kinds) 1051 return Asis.Clause_Kinds; 1052 1053 function Representation_Clause_Kind_From_Flat 1054 (Flat_Kind : Flat_Element_Kinds) 1055 return Asis.Representation_Clause_Kinds; 1056 1057 ------------------------------------- 1058 -- Additional Classification items -- 1059 ------------------------------------- 1060 1061 function Def_Operator_Kind 1062 (Op_Kind : Flat_Element_Kinds) 1063 return Flat_Element_Kinds; 1064 -- this function "converts" the value of Flat_Operator_Symbol_Kinds 1065 -- into the corresponding value of Flat_Defining_Operator_Kinds, 1066 -- implementing the "mapping" between usage and defining occurences of tthe 1067 -- operator signs. It is an error to call it to an Flat_Element_Kinds 1068 -- value which does not belong to Flat_Operator_Symbol_Kinds 1069 1070 function Is_Generic (Declaration : Asis.Declaration) return Boolean; 1071 -- True if Declaration is the declaration or body of a generic unit 1072 1073end Asis.Extensions.Flat_Kinds; 1074