1------------------------------------------------------------------------------ 2-- -- 3-- ASIS Tester And iNTerpreter (ASIStant) COMPONENTS -- 4-- -- 5-- A S I S T A N T . F U N C E N U M -- 6-- -- 7-- S p e c -- 8-- -- 9-- Copyright (C) 1997-2014, 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 3, or ( at your option) any later -- 14-- version. GNATCHECK is distributed in the hope that it will be useful, -- 15-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- 16-- MERCHANTABILITY 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 COPYING3. If -- 19-- not, go to http://www.gnu.org/licenses for a complete copy of the -- 20-- license. -- 21-- -- 22-- ASIStant is an evolution of ASIStint tool that was created by Vasiliy -- 23-- 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 AdaCore (http://www.adacore.com). -- 31------------------------------------------------------------------------------ 32 33with Asis; 34with Asis.Compilation_Units.Relations; 35with Asis.Text; 36with Asis.Data_Decomposition; 37 38package ASIStant.FuncEnum is 39 40------------------------------------------------------------------------------ 41-- ASIS queries enumeration and template information 42------------------------------------------------------------------------------ 43 44------------------------------------------------------------------------------ 45-- All ASIS 95 queries must be supported, except a generic query 46-- Traverse_Element. Failure to recognize any query which is not in the 47-- Open Problems List is a bug, and the corresponding bug report will 48-- be greatly appreciated. 49------------------------------------------------------------------------------ 50 51------------------------------------------------------------------------------ 52-- OPEN PROBLEMS LIST (not implemented queries) 53-- Traverse_Element not supported due to major conceptual limitations 54-- Asis.Implementation.Set_Status 55-- package Asis.Ada_Environments.Containers (all queries & types) 56-- Asis.Compilation_Units.Enclosing_Container 57-- package Asis.Compilation_Units.Times 58-- package Asis.Ids 59-- package Asis.Data_Decomposition and <...>.Portable_Transfer 60------------------------------------------------------------------------------ 61 62 type Var_Type is 63 ( 64 Par_Absent, 65 66 Par_ATime, 67 Par_Boolean, 68 Par_Context, 69 Par_CUnit, 70 Par_CUnitList, 71 Par_ElemList, 72 Par_Element, 73 Par_Integer, 74 Par_Line, 75 Par_Line_List, 76 Par_Relationship, 77 Par_String, 78 Par_Span, 79 80 Par_DDA_Array_Component, 81 Par_DDA_Array_Component_List, 82 Par_DDA_Record_Component, 83 Par_DDA_Record_Component_List, 84 85 Par_XXXXX -- for not implemented types 86 ); 87 -- Type to represent variable types 88 89 package DDA renames Asis.Data_Decomposition; 90 91 type ElemList_Ptr is access all Asis.Element_List; 92 type CUnitList_Ptr is access all Asis.Compilation_Unit_List; 93 type Relship_Ptr is access all 94 Asis.Compilation_Units.Relations.Relationship; 95 type LineList_Ptr is access all Asis.Text.Line_List; 96 type String_Ptr is access all Wide_String; 97 type DDA_ArrCList_Ptr is access all DDA.Array_Component_List; 98 type DDA_RecCList_Ptr is access all DDA.Record_Component_List; 99 100 type Query_Result (RType : Var_Type := Par_Absent) is 101 record 102 case RType is 103 when Par_Absent => null; 104 when Par_String => S : String_Ptr; 105 when Par_Boolean => B : Boolean; 106 when Par_CUnit => C : Asis.Compilation_Unit; 107 when Par_CUnitList => CL : CUnitList_Ptr; 108 when Par_Element => E : Asis.Element; 109 when Par_ElemList => EL : ElemList_Ptr; 110 when Par_Context | Par_Integer 111 => I : Integer; 112 when Par_Line => L : Asis.Text.Line; 113 when Par_Line_List => LL : LineList_Ptr; 114 when Par_Relationship 115 => R : Relship_Ptr; 116 when Par_Span => Sp : Asis.Text.Span; 117 when Par_DDA_Array_Component 118 => AC : DDA.Array_Component; 119 120 when Par_DDA_Array_Component_List 121 => ACL : DDA_ArrCList_Ptr; 122 when Par_DDA_Record_Component 123 => RC : DDA.Record_Component; 124 when Par_DDA_Record_Component_List 125 => RCL : DDA_RecCList_Ptr; 126 127 when others => null; 128 end case; 129 end record; 130 -- Universal ASIStant expression representation 131 132------------------------------------------------------------------------------ 133-- For brevity sake, the following convention is used to identify a query 134-- profile: the types of query parameters are written one after another in 135-- an abbreviated form, then the portion Ret<Return Type Abbreviation> is 136-- appended. Below is a list of abbreviations: 137-- Bool - Boolean 138-- Ctx - Asis.Context 139-- CUnit - Asis.Compilation_Unit 140-- CUnitList - Asis.Compilation_Unit_List 141-- DDA_ArrC - DDA.Array_Component 142-- DDA_ArrCList - DDA.Array_Component_List 143-- DDA_RecC - DDA.Record_Component 144-- DDA_RecCList - DDA.Record_Component_List 145-- Elem - Asis.Element 146-- ElemList - Asis.Element_List 147-- Int - Integer/Asis.Asis_Integer 148-- Line - Asis.Text.Line 149-- LineList - Asis.Text.Line_List 150-- Null - (RetNull) Procedure 151-- Relship - Asis.Compilation_Units.Relationship 152-- Span - Asis.Text.Span 153-- 154-- FOR EXAMPLE, the profile 155-- (C : Asis.Compilation_Unit; I : Integer) return Asis.Element_List 156-- will be represented as 157-- CUnitIntRetElemList 158------------------------------------------------------------------------------ 159 160-- Enumeration of all parameter and result type profiles of all queries 161 type Func_Syntax_Enum is 162 (CtxRetBool_Syn, 163 CtxRetCUnitList_Syn, 164 CtxRetElemList_Syn, 165 CtxRetNull_Syn, 166 CtxRetString_Syn, 167 CtxStringStringRetNull_Syn, 168 CUnitBoolRetElemList_Syn, 169 CUnitCtxRetCUnit_Syn, 170 CUnitCtxRetCUnitList_Syn, 171 CUnitCUnitRetBool_Syn, 172 CUnitIntIntRetElem_Syn, 173 CUnitListCtxRetRelship_Syn, 174 CUnitListCUnitListCtxStringRetRelship_Syn, 175 CUnitListRetBool_Syn, 176 CUnitRetBool_Syn, 177 CUnitRetCtx_Syn, 178 CUnitRetCUnit_Syn, 179 CUnitRetCUnitList_Syn, 180 CUnitRetElem_Syn, 181 CUnitRetElemList_Syn, 182 CUnitRetString_Syn, 183 CUnitStringRetATime_Syn, 184 CUnitStringRetBool_Syn, 185 CUnitStringRetString_Syn, 186 DDA_ArrCRetDDA_ArrC_Syn, 187 DDA_ArrCRetDDA_RecCList_Syn, 188 DDA_ArrCRetElem_Syn, 189 DDA_RecCRetDDA_ArrC_Syn, 190 DDA_RecCRetDDA_RecCList_Syn, 191 DDA_RecCRetElem_Syn, 192 ElemBoolRetElemList_Syn, 193 ElemCtxRetElem_Syn, 194 ElemElemBoolRetBool_Syn, 195 ElemElemBoolRetElemList_Syn, 196 ElemElemRetBool_Syn, 197 ElemElemRetElem_Syn, 198 ElemIntIntRetLineList_Syn, 199 ElemListRetBool_Syn, 200 ElemRetBool_Syn, 201 ElemRetCUnit_Syn, 202 ElemRetDDA_ArrC_Syn, 203 ElemRetDDA_RecCList_Syn, 204 ElemRetElem_Syn, 205 ElemRetElemList_Syn, 206 ElemRetInt_Syn, 207 ElemRetLineList_Syn, 208 ElemRetSpan_Syn, 209 ElemRetString_Syn, 210 ElemSpanRetLineList_Syn, 211 IntIntRetBool_Syn, 212 IntIntRetInt_Syn, 213 LineRetString_Syn, 214 RelshipRetCUnitList_Syn, 215 RetBool_Syn, 216 RetCUnit_Syn, 217 RetCUnitList_Syn, 218 RetElem_Syn, 219 RetElemList_Syn, 220 RetLine_Syn, 221 RetRelship_Syn, 222 RetSpan_Syn, 223 RetString_Syn, 224 SpanRetBool_Syn, 225 SpanRetInt_Syn, 226 StringCtxRetCUnit_Syn, 227 StringRetNull_Syn, 228 StringStringRetBool_Syn, 229 StringStringRetString_Syn); 230 231-- Enumeration of all queries 232 type Switch_Index is ( 233 -- Placeholder 234 Invalid_Index, 235 -- CtxRetBool 236 Exists, 237 Is_Open, 238 Has_Associations, 239 -- CtxRetCUnitList 240 Compilation_Unit_Bodies, 241 Compilation_Units, 242 Library_Unit_Declarations, 243 -- CtxRetElemList 244 Configuration_Pragmas, 245 -- CtxRetNull 246 Close, 247 Dissociate, 248 Open, 249 -- CtxRetString 250 Debug_Image_Ctx, 251 Name, 252 Parameters, 253 -- CtxStringStringRetNull 254 Associate, 255 -- CUnitBoolRetElemList 256 Context_Clause_Elements, 257 -- CUnitCtxRetCUnit 258 Corresponding_Body_CU_Ctx, 259 Corresponding_Declaration_CU_Ctx, 260 Corresponding_Parent_Declaration_Ctx, 261 Corresponding_Subunit_Parent_Body_Ctx, 262 -- CUnitCtxRetCUnitList 263 Corresponding_Children_Ctx, 264 Subunits_Ctx, 265 -- CUnitCUnitRetBool 266 Is_Equal_CU, 267 Is_Identical_CU, 268 -- CUnitIntIntRetElem 269 Find_Element, 270 -- CUnitListCtxRetRelship 271 Elaboration_Order, 272 -- CUnitListCUnitListCtxStringRetRelship 273 Semantic_Dependence_Order, 274 -- CUnitListRetBool 275 Is_Nil_CUL, 276 -- CUnitRetBool 277 Can_Be_Main_Program, 278 Exists_CU, 279 Has_Limited_View_Only, -- ASOS 2005 280 Is_Body_Required, 281 Is_Nil_CU, 282 -- CUnitRetCtx 283 Enclosing_Context, 284 -- CUnitRetCUnit 285 Corresponding_Body_CU, 286 Corresponding_Declaration_CU, 287 Corresponding_Parent_Declaration, 288 Corresponding_Subunit_Parent_Body, 289 -- CUnitRetCUnitList 290 Corresponding_Children, 291 Subunits, 292 -- CUnitRetElem 293 Browse_CU, 294 Unit_Declaration, 295 -- CUnitRetElemList 296 Compilation_Pragmas, 297 -- CUnitRetString 298 Compilation_Command_Line_Options, 299 Debug_Image_CU, 300 Object_Form, 301 Object_Name, 302 Text_Form, 303 Text_Name, 304 Unit_Class, 305 Unit_Full_Name, 306 Unit_Kind, 307 Unit_Origin, 308 Unique_Name, 309 -- CUnitStringRetATime 310 Attribute_Time, 311 -- CUnitStringRetBool 312 Has_Attribute, 313 -- CUnitStringRetString 314 Attribute_Values, 315 -- DDA_ArrCRetDDA_ArrC 316 DDA_Array_Components_2, 317 -- DDA_ArrCRetDDA_RecCList 318 DDA_Discriminant_Components_2, 319 DDA_Record_Components_2, 320 -- DDA_ArrCRetElem 321 DDA_Component_Indication, 322 -- DDA_RecCRetDDA_ArrC 323 DDA_Array_Components_1, 324 -- DDA_RecCRetDDA_RecCList 325 DDA_Discriminant_Components_1, 326 DDA_Record_Components_1, 327 -- DDA_RecCRetElem 328 DDA_Component_Declaration, 329 -- ElemBoolRetElemList 330 Accept_Body_Exception_Handlers, 331 Accept_Body_Statements, 332 Block_Declarative_Items, 333 Block_Exception_Handlers, 334 Block_Statements, 335 Body_Declarative_Items, 336 Body_Exception_Handlers, 337 Body_Statements, 338 Call_Statement_Parameters, 339 Component_Clauses, 340 Discriminant_Associations, 341 Extended_Return_Exception_Handlers, -- ASIS 2005 342 Extended_Return_Statements, -- ASIS 2005 343 Function_Call_Parameters, 344 Generic_Actual_Part, 345 Generic_Formal_Part, 346 Handler_Statements, 347 Loop_Statements, 348 Private_Part_Declarative_Items, 349 Private_Part_Items, 350 Protected_Operation_Items, 351 Record_Component_Associations, 352 Record_Components, 353 Sequence_Of_Statements, 354 Statement_Paths, 355 Variants, 356 Visible_Part_Declarative_Items, 357 Visible_Part_Items, 358 -- ElemCtxRetElem 359 Corresponding_Body_Ctx, 360 Corresponding_Body_Stub_Ctx, 361 Corresponding_Declaration_Ctx, 362 Corresponding_Subunit_Ctx, 363 Corresponding_Type_Declaration_Ctx, 364 -- ElemElemBoolRetBool 365 Is_Referenced, 366 -- ElemElemBoolRetElemList 367 References, 368 -- ElemElemRetBool 369 Is_Equal, 370 Is_Identical, 371 -- ElemElemRetElem 372 Enclosing_Element_EEE, 373 -- ElemIntIntRetLineList 374 Lines_2, 375 -- ElemListRetBool 376 Is_Nil_EL, 377 -- ElemRetBool 378 Declarations_Is_Private_Present, 379 Definitions_Is_Private_Present, 380 Has_Abstract, -- ASIS 2005 381 Has_Aliased, -- ASIS 2005 382 Has_Limited, -- ASIS 2005 383 Has_Null_Exclusion, -- ASIS 2005 384 Has_Private, -- ASIS 2005 385 Has_Protected, -- ASIS 2005 386 Has_Reverse, -- ASIS 2005 387 Has_Synchronized, -- ASIS 2005 388 Has_Tagged, -- ASIS 2005 389 Has_Task, -- ASIS 2005 390 Is_Declare_Block, 391 Is_Dispatching_Call, 392 Is_Defaulted_Association, 393 Is_From_Limited_View, -- ASIS 2005 394 Is_Generalized_Indexing, -- ASIS 2012 395 Declarations_Is_Name_Repeated, 396 Statements_Is_Name_Repeated, 397 Is_Nil, 398 Is_Not_Null_Return, -- ASIS 2005 399 Is_Not_Overriding_Declaration, -- ASIS 2005 400 Is_Normalized, 401 Is_Overriding_Declaration, -- ASIS 2005 402 Is_Part_Of_Implicit, 403 Is_Part_Of_Inherited, 404 Is_Part_Of_Instance, 405 Is_Prefix_Call, 406 Is_Prefix_Notation, -- ASIS 2005 407 Is_Private_Present, 408 Is_Subunit, 409 Is_Dispatching_Operation, 410 Is_Text_Available, 411 -- ElemRetCUnit 412 Enclosing_Compilation_Unit, 413 -- ElemRetDDA_ArrC 414 DDA_Array_Components, 415 -- ElemRetDDA_RecCList 416 DDA_Discriminant_Components, 417 DDA_Record_Components, 418 -- ElemRetElem 419 Accept_Entry_Direct_Name, 420 Accept_Entry_Index, 421 Access_To_Function_Result_Profile, 422 Access_To_Object_Definition, 423 Actual_Parameter, 424 Allocator_Qualified_Expression, 425 Allocator_Subtype_Indication, 426 Ancestor_Subtype_Indication, 427 Anonymous_Access_To_Object_Subtype_Mark, -- ASIS 2005 428 Array_Component_Definition, 429 Aspect_Definition, -- ASIS 2012 430 Aspect_Mark, -- ASIS 2012 431 Assignment_Expression, 432 Assignment_Variable_Name, 433 Associated_Message, -- ASIS 2005 434 Attribute_Designator_Identifier, 435 Body_Block_Statement, 436 Browse, 437 Called_Name, 438 Case_Expression, 439 Choice_Parameter_Specification, 440 Component_Clause_Position, 441 Component_Clause_Range, 442 Component_Definition_View, -- ASIS 2005 443 Component_Expression, 444 Component_Subtype_Indication, 445 Condition_Expression, 446 Converted_Or_Qualified_Expression, 447 Converted_Or_Qualified_Subtype_Mark, 448 Corresponding_Base_Entity, 449 Corresponding_Body, 450 Corresponding_Body_Stub, 451 Corresponding_Called_Entity, 452 Corresponding_Called_Function, 453 Corresponding_Constant_Declaration, 454 Corresponding_Declaration, 455 Corresponding_Destination_Statement, 456 Corresponding_End_Name, 457 Corresponding_Entry, 458 Corresponding_Equality_Operator, 459 Corresponding_Expression_Type, 460 Corresponding_Expression_Type_Definition, -- ASIS 2005 461 Corresponding_First_Subtype, 462 Corresponding_Generic_Element, 463 Corresponding_Last_Constraint, 464 Corresponding_Last_Subtype, 465 Corresponding_Loop_Exited, 466 Corresponding_Name_Declaration, 467 Corresponding_Name_Definition, 468 Corresponding_Parent_Subtype, 469 Corresponding_Root_Type, 470 Corresponding_Subprogram_Derivation, 471 Corresponding_Subunit, 472 Corresponding_Type, 473 Corresponding_Type_Completion, 474 Corresponding_Type_Declaration, 475 Corresponding_Type_Partial_View, 476 Corresponding_Type_Structure, 477 Declaration_Subtype_Mark, 478 Defining_Prefix, 479 Defining_Selector, 480 Delay_Expression, 481 Delta_Expression, 482 Digits_Expression, 483 Discriminant_Direct_Name, 484 Discriminant_Expression, 485 Discriminant_Part, 486 Enclosing_Element, 487 Entry_Barrier, 488 Entry_Family_Definition, 489 Entry_Index_Specification, 490 Exit_Condition, 491 Exit_Loop_Name, 492 Expression_Parenthesized, 493 Extension_Aggregate_Expression, 494 For_Loop_Parameter_Specification, 495 Formal_Parameter, 496 Formal_Subprogram_Default, 497 Generic_Unit_Name, 498 Get_Nonlimited_View, -- ASIS 2005 499 Goto_Label, 500 Guard, 501 Initialization_Expression, 502 Integer_Constraint, 503 Iteration_Scheme_Name, -- Ada 2012 query name - ??? 504 Iterator_Specification, -- Ada 2012 query name - ??? 505 Lower_Bound, 506 Membership_Test_Expression, 507 Membership_Test_Range, 508 Membership_Test_Subtype_Mark, 509 Mod_Clause_Expression, 510 Mod_Static_Expression, 511 Object_Declaration_View, 512 Parent_Subtype_Indication, 513 Predicate, -- Ada 2012 514 Dependent_Expression, -- Ada 2012 515 Prefix, 516 Qualified_Expression, 517 Raised_Exception, 518 Range_Attribute, 519 Real_Range_Constraint, 520 Record_Definition, 521 Renamed_Entity, 522 Representation_Clause_Expression, 523 Representation_Clause_Name, 524 Requeue_Entry_Name, 525 Result_Expression, -- Ada 2012 526 Result_Profile, 527 Return_Expression, 528 Return_Object_Declaration, -- ASIS 2005 529 Selector, 530 Short_Circuit_Operation_Left_Expression, 531 Short_Circuit_Operation_Right_Expression, 532 Slice_Range, 533 Specification_Subtype_Definition, 534 Statement_Identifier, 535 Subpool_Name, -- Ada 2012 query name - ?? 536 Subtype_Constraint, 537 Subtype_Indication, -- Ada 2012 query name - ??? 538 Subtype_Mark, 539 Type_Declaration_View, 540 Upper_Bound, 541 While_Condition, 542 -- ElemRetElemList 543 Aborted_Tasks, 544 Accept_Parameters, 545 Access_To_Subprogram_Parameter_Profile, 546 Array_Component_Associations, 547 Array_Component_Choices, 548 Aspect_Specifications, -- ASIS 2012 549 Attribute_Designator_Expressions, 550 Case_Path_Alternative_Choices, 551 Case_Statement_Alternative_Choices, 552 Clause_Names, 553 Corresponding_Name_Definition_List, 554 Corresponding_Pragmas, 555 Corresponding_Representation_Clauses, 556 Corresponding_Type_Operators, 557 DDA_All_Named_Components, 558 Declaration_Interface_List, -- ASIS 2005 559 Definition_Interface_List, -- ASIS 2005 560 Discrete_Ranges, 561 Discrete_Subtype_Definitions, 562 Discriminant_Selector_Names, 563 Discriminants, 564 Enumeration_Literal_Declarations, 565 Exception_Choices, 566 Expression_Paths, 567 Implicit_Components, 568 Implicit_Inherited_Declarations, 569 Implicit_Inherited_Subprograms, 570 Index_Expressions, 571 Index_Subtype_Definitions, 572 Label_Names, 573 Membership_Test_Choices, 574 Names, 575 Parameter_Profile, 576 Pragma_Argument_Associations, 577 Pragmas, 578 Record_Component_Choices, 579 Variant_Choices, 580 -- ElemRetInt 581 First_Line_Number, 582 Hash, 583 Last_Line_Number, 584 -- ElemRetLineList 585 Lines, 586 -- ElemRetSpan 587 Compilation_Span, 588 Compilation_Unit_Span, 589 Element_Span, 590 -- ElemRetString (mainly additional queries to cover enum results) 591 Access_Type_Kind, 592 Access_Definition_Kind, 593 Association_Kind, 594 Attribute_Kind, 595 Clause_Kind, 596 Constraint_Kind, 597 Debug_Image, 598 Declaration_Kind, 599 Declaration_Origin, 600 Default_Kind, 601 Defining_Name_Image, 602 Defining_Name_Kind, 603 Definition_Kind, 604 Discrete_Range_Kind, 605 Element_Image, 606 Element_Kind, 607 Expression_Kind, 608 Formal_Type_Kind, 609 Interface_Kind, -- ASIS 2005 610 Mode_Kind, 611 Name_Image, 612 Operator_Kind, 613 Path_Kind, 614 Position_Number_Image, 615 Pragma_Kind, 616 Pragma_Name_Image, 617 Representation_Clause_Kind, 618 Representation_Value_Image, 619 Root_Type_Kind, 620 Statement_Kind, 621 Trait_Kind, 622 Type_Kind, 623 Value_Image, 624 -- ElemSpanRetLineList 625 Lines_1, 626 -- IntIntRetBool 627 Eq, 628 Gt, 629 Lt, 630 -- IntIntRetInt 631 Add, 632 Sub, 633 -- LineRetString 634 Comment_Image, 635 Debug_Image_L, 636 Line_Image, 637 Non_Comment_Image, 638 -- RelshipRetCUnitList 639 Consistent, 640 Inconsistent, 641 Missing, 642 Circular, 643 -- RetBool 644 Attributes_Are_Supported, 645 Default_In_Mode_Supported, 646 Discriminant_Associations_Normalized, 647 Function_Call_Parameters_Normalized, 648 Generic_Actual_Part_Normalized, 649 Generic_Macro_Expansion_Supported, 650 Implicit_Components_Supported, 651 Inherited_Declarations_Supported, 652 Inherited_Subprograms_Supported, 653 Is_Commentary_Supported, 654 Is_Finalized, 655 Is_Formal_Parameter_Named_Notation_Supported, 656 Is_Initialized, 657 Is_Line_Number_Supported, 658 Is_Prefix_Call_Supported, 659 Is_Span_Column_Position_Supported, 660 Object_Declarations_Normalized, 661 Predefined_Operations_Supported, 662 Record_Component_Associations_Normalized, 663 -- RetCUnit 664 Nil_Compilation_Unit, 665 -- RetCUnitList 666 Nil_Compilation_Unit_List, 667 -- RetElem 668 Nil_Element, 669 -- RetElemList 670 Nil_Element_List, 671 -- RetLine 672 Nil_Line, 673 -- RetRelship 674 Nil_Relationship, 675 -- RetSpan 676 Nil_Span, 677 -- RetString 678 Asis_Implementor, 679 Asis_Implementor_Information, 680 Asis_Implementor_Version, 681 Asis_Version, 682 Attribute_Value_Delimiter, 683 Default_Name, 684 Default_Parameters, 685 Delimiter_Image, 686 Diagnosis, 687 Status, 688 -- SpanRetBool 689 Is_Nil_Sp, 690 -- SpanRetInt 691 First_Column, 692 First_Line, 693 Last_Column, 694 Last_Line, 695 -- StringCtxRetCUnit 696 Compilation_Unit_Body, 697 Library_Unit_Declaration, 698 -- StringRetNull 699 Finalize, 700 Initialize, 701 -- StringStringRetBool 702 Eq_SS, 703 Gt_SS, 704 Lt_SS, 705 -- StringStringRetString 706 Concat 707 ); 708 709 pragma Ordered (Switch_Index); 710 711 subtype Func_Param is Var_Type; 712 713 type Profile_Range is new Integer range 0 .. 4; 714 715 type Func_Syntax is array (Profile_Range) of Func_Param; 716 -- 0 is the type of return value, 1..4 - of params 1..4 717 718 type Switch_Node is record 719 From, To : Switch_Index; 720 SelectID : Func_Syntax_Enum; 721 Synt : Func_Syntax; 722 end record; 723 724 type Switch_Info_Array is array (Positive range <>) of Switch_Node; 725 726 Switch_Info : constant Switch_Info_Array := ( 727-- CtxRetBool 728 (Exists, Has_Associations, 729 CtxRetBool_Syn, 730 (Par_Boolean, Par_Context, Par_Absent, Par_Absent, Par_Absent)), 731-- CtxRetCUnitList 732 (Compilation_Unit_Bodies, Library_Unit_Declarations, 733 CtxRetCUnitList_Syn, 734 (Par_CUnitList, Par_Context, Par_Absent, Par_Absent, Par_Absent)), 735-- CtxRetElemList 736 (Configuration_Pragmas, Configuration_Pragmas, 737 CtxRetElemList_Syn, 738 (Par_ElemList, Par_Context, Par_Absent, Par_Absent, Par_Absent)), 739-- CtxRetNull 740 (Close, Open, 741 CtxRetNull_Syn, 742 (Par_Absent, Par_Context, Par_Absent, Par_Absent, Par_Absent)), 743-- CtxRetString 744 (Debug_Image_Ctx, Parameters, 745 CtxRetString_Syn, 746 (Par_String, Par_Context, Par_Absent, Par_Absent, Par_Absent)), 747-- CtxStringStringRetNull 748 (Associate, Associate, 749 CtxStringStringRetNull_Syn, 750 (Par_Absent, Par_Context, Par_String, Par_String, Par_Absent)), 751-- CUnitBoolRetElemList 752 (Context_Clause_Elements, Context_Clause_Elements, 753 CUnitBoolRetElemList_Syn, 754 (Par_ElemList, Par_CUnit, Par_Boolean, Par_Absent, Par_Absent)), 755-- CUnitCtxRetCUnit 756 (Corresponding_Body_CU_Ctx, Corresponding_Subunit_Parent_Body_Ctx, 757 CUnitCtxRetCUnit_Syn, 758 (Par_CUnit, Par_CUnit, Par_Context, Par_Absent, Par_Absent)), 759-- CUnitCtxRetCUnitList 760 (Corresponding_Children_Ctx, Subunits_Ctx, 761 CUnitCtxRetCUnitList_Syn, 762 (Par_CUnitList, Par_CUnit, Par_Context, Par_Absent, Par_Absent)), 763-- CUnitCUnitRetBool 764 (Is_Equal_CU, Is_Identical_CU, 765 CUnitCUnitRetBool_Syn, 766 (Par_Boolean, Par_CUnit, Par_CUnit, Par_Absent, Par_Absent)), 767-- CUnitIntIntRetElem 768 (Find_Element, Find_Element, 769 CUnitIntIntRetElem_Syn, 770 (Par_Element, Par_CUnit, Par_Integer, Par_Integer, Par_Absent)), 771-- CUnitListCtxRetRelship 772 (Elaboration_Order, Elaboration_Order, 773 CUnitListCtxRetRelship_Syn, 774 (Par_Relationship, Par_CUnitList, Par_Context, Par_Absent, Par_Absent)), 775-- CUnitListCUnitListCtxStringRetRelship 776 (Semantic_Dependence_Order, Semantic_Dependence_Order, 777 CUnitListCUnitListCtxStringRetRelship_Syn, 778 (Par_Relationship, Par_CUnitList, Par_CUnitList, Par_Context, Par_String) 779 ), 780-- CUnitListRetBool 781 (Is_Nil_CUL, Is_Nil_CUL, 782 CUnitListRetBool_Syn, 783 (Par_Boolean, Par_CUnitList, Par_Absent, Par_Absent, Par_Absent)), 784-- CUnitRetBool 785 (Can_Be_Main_Program, Is_Nil_CU, 786 CUnitRetBool_Syn, 787 (Par_Boolean, Par_CUnit, Par_Absent, Par_Absent, Par_Absent)), 788-- CUnitRetCtx 789 (Enclosing_Context, Enclosing_Context, 790 CUnitRetCtx_Syn, 791 (Par_Context, Par_CUnit, Par_Absent, Par_Absent, Par_Absent)), 792-- CUnitRetCUnit 793 (Corresponding_Body_CU, Corresponding_Subunit_Parent_Body, 794 CUnitRetCUnit_Syn, 795 (Par_CUnit, Par_CUnit, Par_Absent, Par_Absent, Par_Absent)), 796-- CUnitRetCUnitList 797 (Corresponding_Children, Subunits, 798 CUnitRetCUnitList_Syn, 799 (Par_CUnitList, Par_CUnit, Par_Absent, Par_Absent, Par_Absent)), 800-- CUnitRetElem 801 (Browse_CU, Unit_Declaration, 802 CUnitRetElem_Syn, 803 (Par_Element, Par_CUnit, Par_Absent, Par_Absent, Par_Absent)), 804-- CUnitRetElemList 805 (Compilation_Pragmas, Compilation_Pragmas, 806 CUnitRetElemList_Syn, 807 (Par_ElemList, Par_CUnit, Par_Absent, Par_Absent, Par_Absent)), 808-- CUnitRetString 809 (Compilation_Command_Line_Options, Unique_Name, 810 CUnitRetString_Syn, 811 (Par_String, Par_CUnit, Par_Absent, Par_Absent, Par_Absent)), 812-- CUnitStringRetATime 813 (Attribute_Time, Attribute_Time, 814 CUnitStringRetATime_Syn, 815 (Par_ATime, Par_CUnit, Par_String, Par_Absent, Par_Absent)), 816-- CUnitStringRetBool 817 (Has_Attribute, Has_Attribute, 818 CUnitStringRetBool_Syn, 819 (Par_Boolean, Par_CUnit, Par_String, Par_Absent, Par_Absent)), 820-- CUnitStringRetString 821 (Attribute_Values, Attribute_Values, 822 CUnitStringRetString_Syn, 823 (Par_String, Par_CUnit, Par_String, Par_Absent, Par_Absent)), 824-- DDA_ArrCRetDDA_ArrC 825 (DDA_Array_Components_2, DDA_Array_Components_2, 826 DDA_ArrCRetDDA_ArrC_Syn, 827 (Par_DDA_Array_Component, Par_DDA_Array_Component, Par_Absent, 828 Par_Absent, Par_Absent)), 829-- DDA_ArrCRetDDA_RecCList 830 (DDA_Discriminant_Components_2, DDA_Record_Components_2, 831 DDA_ArrCRetDDA_RecCList_Syn, 832 (Par_DDA_Record_Component_List, Par_DDA_Array_Component, Par_Absent, 833 Par_Absent, Par_Absent)), 834-- DDA_ArrCRetElem 835 (DDA_Component_Indication, DDA_Component_Indication, 836 DDA_ArrCRetElem_Syn, 837 (Par_Element, Par_DDA_Array_Component, Par_Absent, Par_Absent, 838 Par_Absent)), 839-- DDA_RecCRetDDA_ArrC 840 (DDA_Array_Components_1, DDA_Array_Components_1, 841 DDA_RecCRetDDA_ArrC_Syn, 842 (Par_DDA_Array_Component, Par_DDA_Record_Component, Par_Absent, 843 Par_Absent, Par_Absent)), 844-- DDA_RecCRetDDA_RecCList 845 (DDA_Discriminant_Components_1, DDA_Record_Components_1, 846 DDA_RecCRetDDA_RecCList_Syn, 847 (Par_DDA_Record_Component_List, Par_DDA_Record_Component, Par_Absent, 848 Par_Absent, Par_Absent)), 849-- DDA_RecCRetElem 850 (DDA_Component_Declaration, DDA_Component_Declaration, 851 DDA_RecCRetElem_Syn, 852 (Par_Element, Par_DDA_Record_Component, Par_Absent, Par_Absent, 853 Par_Absent)), 854-- ElemBoolRetElemList 855 (Accept_Body_Exception_Handlers, Visible_Part_Items, 856 ElemBoolRetElemList_Syn, 857 (Par_ElemList, Par_Element, Par_Boolean, Par_Absent, Par_Absent)), 858-- ElemCtxRetElem 859 (Corresponding_Body, Corresponding_Type_Declaration_Ctx, 860 ElemCtxRetElem_Syn, 861 (Par_Element, Par_Element, Par_Context, Par_Absent, Par_Absent)), 862-- ElemElemBoolRetBool 863 (Is_Referenced, Is_Referenced, 864 ElemElemBoolRetBool_Syn, 865 (Par_Boolean, Par_Element, Par_Element, Par_Boolean, Par_Absent)), 866-- ElemElemBoolRetElemList 867 (References, References, 868 ElemElemBoolRetElemList_Syn, 869 (Par_ElemList, Par_Element, Par_Element, Par_Boolean, Par_Absent)), 870-- ElemElemRetBool 871 (Is_Equal, Is_Identical, 872 ElemElemRetBool_Syn, 873 (Par_Boolean, Par_Element, Par_Element, Par_Absent, Par_Absent)), 874-- ElemElemRetElem 875 (Enclosing_Element_EEE, Enclosing_Element_EEE, 876 ElemElemRetElem_Syn, 877 (Par_Element, Par_Element, Par_Element, Par_Absent, Par_Absent)), 878-- ElemIntIntRetLineList 879 (Lines_2, Lines_2, 880 ElemIntIntRetLineList_Syn, 881 (Par_Line_List, Par_Element, Par_Integer, Par_Integer, Par_Absent)), 882-- ElemListRetBool 883 (Is_Nil_EL, Is_Nil_EL, 884 ElemListRetBool_Syn, 885 (Par_Boolean, Par_ElemList, Par_Absent, Par_Absent, Par_Absent)), 886-- ElemRetBool 887 (Declarations_Is_Private_Present, Is_Text_Available, 888 ElemRetBool_Syn, 889 (Par_Boolean, Par_Element, Par_Absent, Par_Absent, Par_Absent)), 890-- ElemRetCUnit 891 (Enclosing_Compilation_Unit, Enclosing_Compilation_Unit, 892 ElemRetCUnit_Syn, 893 (Par_CUnit, Par_Element, Par_Absent, Par_Absent, Par_Absent)), 894-- ElemRetDDA_ArrC 895 (DDA_Array_Components, DDA_Array_Components, 896 ElemRetDDA_ArrC_Syn, 897 (Par_DDA_Array_Component, Par_Element, Par_Absent, Par_Absent, 898 Par_Absent)), 899-- ElemRetDDA_RecCList 900 (DDA_Discriminant_Components, DDA_Record_Components, 901 ElemRetDDA_RecCList_Syn, 902 (Par_DDA_Record_Component_List, Par_Element, Par_Absent, Par_Absent, 903 Par_Absent)), 904-- ElemRetElem 905 (Accept_Entry_Direct_Name, While_Condition, 906 ElemRetElem_Syn, 907 (Par_Element, Par_Element, Par_Absent, Par_Absent, Par_Absent)), 908-- ElemRetElemList 909 (Aborted_Tasks, Variant_Choices, 910 ElemRetElemList_Syn, 911 (Par_ElemList, Par_Element, Par_Absent, Par_Absent, Par_Absent)), 912-- ElemRetInt 913 (First_Line_Number, Last_Line_Number, 914 ElemRetInt_Syn, 915 (Par_Integer, Par_Element, Par_Absent, Par_Absent, Par_Absent)), 916-- ElemRetLineList 917 (Lines, Lines, 918 ElemRetLineList_Syn, 919 (Par_Line_List, Par_Element, Par_Absent, Par_Absent, Par_Absent)), 920-- ElemRetSpan 921 (Compilation_Span, Element_Span, 922 ElemRetSpan_Syn, 923 (Par_Span, Par_Element, Par_Absent, Par_Absent, Par_Absent)), 924-- ElemRetString 925 (Access_Type_Kind, Value_Image, 926 ElemRetString_Syn, 927 (Par_String, Par_Element, Par_Absent, Par_Absent, Par_Absent)), 928-- ElemSpanRetLineList 929 (Lines_1, Lines_1, 930 ElemSpanRetLineList_Syn, 931 (Par_Line_List, Par_Element, Par_Span, Par_Absent, Par_Absent)), 932-- IntIntRetBool 933 (Eq, Lt, 934 IntIntRetBool_Syn, 935 (Par_Boolean, Par_Integer, Par_Integer, Par_Absent, Par_Absent)), 936-- IntIntRetInt 937 (Add, Sub, 938 IntIntRetInt_Syn, 939 (Par_Integer, Par_Integer, Par_Integer, Par_Absent, Par_Absent)), 940-- LineRetString 941 (Comment_Image, Non_Comment_Image, 942 LineRetString_Syn, 943 (Par_String, Par_Line, Par_Absent, Par_Absent, Par_Absent)), 944-- RelshipRetCUnitList 945 (Consistent, Circular, 946 RelshipRetCUnitList_Syn, 947 (Par_CUnitList, Par_Relationship, Par_Absent, Par_Absent, Par_Absent)), 948-- RetBool 949 (Attributes_Are_Supported, Record_Component_Associations_Normalized, 950 RetBool_Syn, 951 (Par_Boolean, Par_Absent, Par_Absent, Par_Absent, Par_Absent)), 952-- RetCUnit 953 (Nil_Compilation_Unit, Nil_Compilation_Unit, 954 RetCUnit_Syn, 955 (Par_CUnit, Par_Absent, Par_Absent, Par_Absent, Par_Absent)), 956-- RetCUnitList 957 (Nil_Compilation_Unit_List, Nil_Compilation_Unit_List, 958 RetCUnitList_Syn, 959 (Par_CUnitList, Par_Absent, Par_Absent, Par_Absent, Par_Absent)), 960-- RetElem 961 (Nil_Element, Nil_Element, 962 RetElem_Syn, 963 (Par_Element, Par_Absent, Par_Absent, Par_Absent, Par_Absent)), 964-- RetElemList 965 (Nil_Element_List, Nil_Element_List, 966 RetElemList_Syn, 967 (Par_ElemList, Par_Absent, Par_Absent, Par_Absent, Par_Absent)), 968-- RetLine 969 (Nil_Line, Nil_Line, 970 RetLine_Syn, 971 (Par_Line, Par_Absent, Par_Absent, Par_Absent, Par_Absent)), 972-- RetRelship 973 (Nil_Relationship, Nil_Relationship, 974 RetRelship_Syn, 975 (Par_Relationship, Par_Absent, Par_Absent, Par_Absent, Par_Absent)), 976-- RetSpan 977 (Nil_Span, Nil_Span, 978 RetSpan_Syn, 979 (Par_Span, Par_Absent, Par_Absent, Par_Absent, Par_Absent)), 980-- RetString 981 (Asis_Implementor, Status, 982 RetString_Syn, 983 (Par_String, Par_Absent, Par_Absent, Par_Absent, Par_Absent)), 984-- SpanRetBool 985 (Is_Nil_Sp, Is_Nil_Sp, 986 SpanRetBool_Syn, 987 (Par_Boolean, Par_Span, Par_Absent, Par_Absent, Par_Absent)), 988-- SpanRetInt 989 (First_Column, Last_Line, 990 SpanRetInt_Syn, 991 (Par_Integer, Par_Span, Par_Absent, Par_Absent, Par_Absent)), 992-- StringCtxRetCUnit 993 (Compilation_Unit_Body, Library_Unit_Declaration, 994 StringCtxRetCUnit_Syn, 995 (Par_CUnit, Par_String, Par_Context, Par_Absent, Par_Absent)), 996-- StringRetNull 997 (Finalize, Initialize, 998 StringRetNull_Syn, 999 (Par_Absent, Par_String, Par_Absent, Par_Absent, Par_Absent)), 1000-- StringStringRetBool 1001 (Eq_SS, Lt_SS, 1002 StringStringRetBool_Syn, 1003 (Par_Boolean, Par_String, Par_String, Par_Absent, Par_Absent)), 1004-- StringStringRetString 1005 (Concat, Concat, 1006 StringStringRetString_Syn, 1007 (Par_String, Par_String, Par_String, Par_Absent, Par_Absent)) 1008 ); 1009 1010 SI_LENGTH : constant Positive := Switch_Info'Length; 1011 1012end ASIStant.FuncEnum; 1013