|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T V ┃
Length: 15959 (0x3e57) Types: TextFile Names: »V«
└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3 └─ ⟦fc9b38f02⟧ »DATA« └─⟦9b46a407a⟧ └─⟦c84a2ac9b⟧ └─⟦this⟧
with Ada_Program; with Declarations; package Statements is -- -- The use of this system is subject to the software license terms and -- conditions agreed upon between Rational and the Customer. -- -- Copyright 1987, 1988, 1989, 1990 by Rational. -- -- RESTRICTED RIGHTS LEGEND -- -- Use, duplication, or disclosure by the Government is subject to -- restrictions as set forth in subdivision (b)(3)(ii) of the Rights in -- Technical Data and Computer Software clause at 52.227-7013. -- -- -- Rational -- 3320 Scott Boulevard -- Santa Clara, California 95054 -- -- PROPRIETARY AND CONFIDENTIAL INFORMATION OF RATIONAL; -- USE OR COPYING WITHOUT EXPRESS WRITTEN AUTHORIZATION -- IS STRICTLY PROHIBITED. THIS MATERIAL IS PROTECTED AS -- AN UNPUBLISHED WORK UNDER THE U.S. COPYRIGHT ACT OF -- 1976. CREATED 1987, 1988, 1989, 1990. ALL RIGHTS RESERVED. -- -- LRM Chapter 5 -- Local Renames: subtype Association is Ada_Program.Association; subtype Declaration is Ada_Program.Declaration; subtype Expression is Ada_Program.Expression; subtype Identifier_Reference is Ada_Program.Identifier_Reference; subtype Name_Expression is Ada_Program.Name; subtype Name is Ada_Program.Name; subtype Statement is Ada_Program.Statement; subtype Association_Iterator is Ada_Program.Association_Iterator; subtype Choice_Iterator is Ada_Program.Choice_Iterator; subtype Declarative_Part_Iterator is Ada_Program. Declaration_Or_Context_Clause_Or_Representation_Clause_Or_Pragma_Iterator; subtype Expression_Iterator is Ada_Program.Expression_Iterator; subtype Name_Iterator is Ada_Program.Name_Iterator; subtype Statement_Part_Iterator is Ada_Program.Statement_Or_Pragma_Iterator; ------------------------------------------------------------------- function Is_Labeled (A_Statement : Statement) return Boolean; function Labels (A_Statement : Statement) return Name_Iterator; -- Returns an iterator on the names of the labels of a statement. A -- statement can have several labels. function Label_Name (A_Statement : Statement) return String; -- Returns the null string if no label is present. Use of this -- function is discouraged. function Is_Named_Statement (A_Statement : Statement) return Boolean; -- Returns true if applied to a loop or block that has a name. function Statement_Name (A_Statement : Statement) return Name; -- Returns the name of a block or loop. Returns Nil_Element if not -- a block or loop, or if no name is present. type Statement_Kinds is -- Simple statements: (A_Null_Statement, An_Assignment_Statement, A_Procedure_Call_Statement, An_Exit_Statement, A_Return_Statement, A_Goto_Statement, An_Entry_Call_Statement, A_Delay_Statement, An_Abort_Statement, A_Raise_Statement, A_Code_Statement, -- compound statements: An_If_Statement, A_Case_Statement, A_Loop_Statement, A_Block_Statement, An_Accept_Statement, A_Select_Statement, A_Conditional_Entry_Call_Statement, A_Timed_Entry_Call_Statement, Not_A_Statement); function Kind (A_Statement : Statement) return Statement_Kinds; --------------------------------------------------------------------- -- ASSIGNMENT STATEMENTS - LRM 5.2 function Object_Assigned_To (Assignment_Statement : Statement) return Name; -- Returns the name of object to which the assignment is being made. function Assignment_Expression (Assignment_Statement : Statement) return Expression; -- Returns the expression on the right hand side of the assignment. --------------------------------------------------------------------- -- EXIT STATEMENTS - LRM 5.7 function Exit_Label (Exit_Statement : Statement) return String; -- Returns the name of the exited loop if present, "" if not present function Exit_Condition (Exit_Statement : Statement) return Expression; -- Returns the when condition of the exit statement if present; -- returns a nil element if not present. function Loop_Exited (Exit_Statement : Statement) return Statement; -- Returns the loop statement exited by this exit statement. --------------------------------------------------------------------- -- RETURN STATEMENTS - LRM 5.8 function Return_Expression (Return_Statement : Statement) return Expression; -- Returns the expression returned in the statement. -- If no expression exists, a nil element is returned. --------------------------------------------------------------------- -- GOTO STATEMENTS - LRM 5.9 function Goto_Label (Goto_Statement : Statement) return String; -- Returns the name of label to which the goto statement may go. function Destination_Statement (Goto_Statement : Statement) return Statement; -- Returns the statement to which the goto statement may go. --------------------------------------------------------------------- -- IF STATEMENTS - LRM 5.3 subtype If_Statement_Arm is Ada_Program.Element; subtype If_Statement_Arm_Iterator is Ada_Program.Element_Iterator; function If_Arm_List (If_Statement : Statement) return If_Statement_Arm_Iterator; -- returns a list of the arms of the if statement function Is_Else_Arm (Arm : If_Statement_Arm) return Boolean; -- Returns true if the arm is an 'ELSE' arm, false if the arm is an -- 'IF' or 'ELSIF'. The function Condition_Expression below may be used -- on the arm in the false case. function Condition_Expression (If_Arm : If_Statement_Arm) return Expression; -- Returns the condition expression for an if statement or elsif arm. function If_Arm_Statements (Arm : If_Statement_Arm) return Statement_Part_Iterator; -- Returns a list of the statements and pragmas in an arm. --------------------------------------------------------------------- -- CASE STATEMENTS - LRM 5.4 function Case_Expression (Case_Statement : Statement) return Expression; -- Returns the expression of the case statement that determines -- which alternative will be taken. subtype Case_Statement_Alternative is Ada_Program.Element; subtype Case_Statement_Alternative_Iterator is Ada_Program.Element_Iterator; function Case_Arms_List (Case_Statement : Statement) return Case_Statement_Alternative_Iterator; -- Return a list of all alternatives of the case statement. function Is_When_Others (Case_Alternative : Case_Statement_Alternative) return Boolean; function Case_Alternative_Choices (Case_Alternative : Case_Statement_Alternative) return Choice_Iterator; -- Returns a list of the 'WHEN <choice> | <choice>' choices. -- Use the TYPE_INFORMATION package's CHOICES queries to extract -- further information about the <choice>s. function Case_Alternative_Statements (Case_Alternative : Case_Statement_Alternative) return Statement_Part_Iterator; -- Returns a list of the statements and pragmas in this alternative. --------------------------------------------------------------------- -- LOOP STATEMENTS - LRM 5.5 subtype For_Loop_Range is Ada_Program.Element; type Loop_Kinds is (A_For_Loop, A_While_Loop, A_Simple_Loop); function Loop_Kind (Loop_Statement : Statement) return Loop_Kinds; function While_Condition (Loop_Statement : Statement) return Expression; -- Returns the condition expression associated with the while loop. function For_Loop_Index (Loop_Statement : Statement) return For_Loop_Range; -- Returns the range for the loop index. -- Use the TYPE_INFORMATION package's operations for discrete ranges -- for more information. function For_Loop_Index_Variable (Loop_Statement : Statement) return String; -- Returns the name of the loop index variable. function Is_Reverse_Iterator (Loop_Statement : Statement) return Boolean; function Loop_Statements (Loop_Statement : Statement) return Statement_Part_Iterator; -- Returns a list of the statements pragmas in the body part of -- the loop statement. --------------------------------------------------------------------- -- BLOCK STATEMENTS - LRM 5.6 function Declarative_Items (Block_Statement : Statement) return Declarative_Part_Iterator; -- Returns a list of the declarations, pragmas, representation -- specifications, and use clauses in the declarative part of the block. -- A "Done" iterator indicates that there are no declarations. function Block_Body_Statements (Block_Statement : Statement) return Statement_Part_Iterator; -- Returns a list of the statements and pragmas in the body part of the -- block. subtype Exception_Handler_Arm is Ada_Program.Element; subtype Exception_Handler_Arm_Iterator is Ada_Program.Element_Iterator; function Block_Exception_Handler_Arms (Block_Statement : Statement) return Exception_Handler_Arm_Iterator; -- Returns a list of the exception handler arms of the block. function Exception_Choices (Exception_Arm : Exception_Handler_Arm) return Choice_Iterator; -- Returns a list of exception choices in the handler arm. -- Use the TYPE_INFORMATION package's CHOICES queries to extract -- further information about the <choice>s. function Handler_Statements (Exception_Arm : Exception_Handler_Arm) return Statement_Part_Iterator; -- Returns a list of the statements and pragmas in the body part of -- the handler. --------------------------------------------------------------------- -- PROCEDURE CALL STATEMENTS - LRM 6.4 function Called_Procedure (Procedure_Or_Entry_Call_Statement : Statement) return Declaration; -- Returns the declaration of the called procedure or entry. function Procedure_Call_Parameters (Procedure_Or_Entry_Call_Statement : Statement; Normalized : Boolean := False) return Association_Iterator; -- Returns a list of actual parameters for the call. -- If Normalized is set to true, the (unspecified) default -- parameters will also be included in the iterator. function Parameter_Expression (Parameter : Association) return Expression; -- Returns the expression passed in for the actual parameter. Use -- of this function is discouraged. Operations from package -- PARAMETER_ASSOCIATIONS should be used instead. --------------------------------------------------------------------- -- RAISE STATEMENTS - LRM 11.3 function Raised_Exception (Raise_Statement : Statement) return Name; -- Returns the name of the raised exception or NIL_ELEMENT if there is -- none. The NAMES_AND_EXPRESSIONS package can be used to decompose -- the name. --------------------------------------------------------------------- -- CODE STATEMENTS - LRM 13.8 function Qualified_Expression (Code_Statement : Statement) return Expression; -- Returns the qualified expression representing the code statement. --------------------------------------------------------------------- -- ENTRY CALL STATEMENTS - LRM 9.5 function Family_Index (Entry_Call_Or_Accept_Statement : Statement) return Expression; -- Returns NIL_ELEMENT if not a family call/accept. -- The operations on procedure calls and actual parameters defined above -- may be used to get more information about an entry calls. --------------------------------------------------------------------- -- ACCEPT STATEMENTS - LRM 9.5 function Accepted_Entry (Accept_Statement : Statement) return Declarations.Entry_Declaration; -- Returns the declaration of the entry accepted in this statement. function Accept_Body_Statements (Accept_Statement : Statement) return Statement_Part_Iterator; -- Returns a list of the statements and pragmas in the body part of -- the accept statement. --------------------------------------------------------------------- -- DELAY STATEMENTS - LRM 9.6 function Delay_Expression (Delay_Statement : Statement) return Expression; -- Returns the expression for the time of the delay --------------------------------------------------------------------- -- SELECT, CONDITIONAL ENTRY and TIMED ENTRY STATEMENTS - LRM 9.7 subtype Select_Alternative is Ada_Program.Element; subtype Select_Alternative_Iterator is Ada_Program.Element_Iterator; function Select_Alternatives (Selective_Wait : Statement) return Select_Alternative_Iterator; -- Returns a list of the alternatives in the selective_wait statement. function Is_Guarded (Alternative : Select_Alternative) return Boolean; -- Returns true if a select alternative has a guard. function Guard (Alternative : Select_Alternative) return Expression; -- Returns the conditional expression guarding the alternative. -- May return a nil element if there is no guard. type Select_Alternative_Kinds is (Accept_Alternative, Delay_Alternative, Terminate_Alternative, Not_A_Select_Alternative); function Select_Alternative_Kind (Alternative : Select_Alternative) return Select_Alternative_Kinds; function Select_Alternative_Statements (Accept_Or_Delay_Alternative : Select_Alternative) return Statement_Part_Iterator; -- Returns a list of the statements and pragmas in the the accept or -- delay alternative including the accept statement and delay statements -- themselves. function Else_Statements (Selective_Wait_Or_Conditional_Entry_Call : Statement) return Statement_Part_Iterator; -- Returns a list of statements and pragmas contained in the else -- part of a selective_wait or conditional_entry_call. If no else -- part exists, a "DONE" iterator is returned. function Timed_Statements (Timed_Entry_Call : Statement) return Statement_Part_Iterator; -- Returns a list of statements and pragmas contained in the or -- part of a timed entry call, including the delay statement itself. function Entry_Call_Statements (Conditional_Or_Timed_Entry_Call : Statement) return Statement_Part_Iterator; -- Returns the statement list associated with the conditional or -- timed entry call, including the actual entry call statement. Use -- the ELSE_STATEMENTS or TIMED_STATEMENTS selector functions the get -- the rest of the information about the call. --------------------------------------------------------------------- -- ABORT STATEMENTS - LRM 9.10 function Aborted_Tasks (Abort_Statement : Statement) return Name_Iterator; -- Returns a list of NAME_EXPRESSIONS for the aborted tasks. -- Use ADA_PROGRAM.DEFINITION to get to the task declaration, or -- the NAMES_AND_EXPRESSIONS package to decompose the names. pragma Subsystem (Design_Facility, Closed); pragma Module_Name (4, 3576); pragma Bias_Key (27); end Statements;