DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦35338b256⟧ TextFile

    Length: 3784 (0xec8)
    Types: TextFile
    Names: »B«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

separate (Compilation_Unit.Produce_Metrics)
procedure Select_Statement
             (Current_Compilation_Unit : in out Ada_Compilation_Unit;
              Program_Unit : in Program_Unit_State_Machine;
              Halstead : in Halstead_State_Machine;
              Loc : in Loc_State_Machine;
              Mccabe : in Mccabe_State_Machine) is

    --======================================================================
    -- Pragma_Clause can NOT occur BEFORE "WHEN"; it can only occur
    -- before "ACCEPT", "DELAY", "TERMINATE", or Name.

    -- SELECT_Statement ::=
    --   "SELECT"
    --      Pragma_Clause
    --      $ next token is "WHEN" or "ACCEPT" or "DELAY" or "TERMINATE" $
    --         1. Selective_Wait
    --         2. Conditional_Or_Timed_Entry_Call
    --   "END" "SELECT" ";"
    --======================================================================

    Current_Token : Token_Package.Token;

begin
    -- SELECT_Statement

    Get_Next_Token (Out_Token => Current_Token,
                    From => Current_Compilation_Unit,
                    Current_Loc => Loc);

    if "/=" (Token_Package.Value_Of (Current_Token),
             Token_Package.Select_Token) then
        raise Syntax_Error;
    end if;

    if Token_Package.Value_Of (Peek (From => Current_Compilation_Unit)) =
       Token_Package.Pragma_Token then

        Pragma_Clause (Current_Compilation_Unit => Current_Compilation_Unit,
                       Program_Unit => Program_Unit,
                       Halstead => Halstead,
                       Loc => Loc,
                       Mccabe => Mccabe);

        -- Pragma can NOT occur before "WHEN"
        if Token_Package.Value_Of (Peek (From => Current_Compilation_Unit)) =
           Token_Package.When_Token then
            raise Syntax_Error;
        end if;

    end if;

    case Token_Package.Value_Of (Peek (From => Current_Compilation_Unit)) is

        when Token_Package.When_Token | Token_Package.Accept_Token |
             Token_Package.Delay_Token | Token_Package.Terminate_Token =>

            Selective_Wait
               (Current_Compilation_Unit => Current_Compilation_Unit,
                Program_Unit => Program_Unit,
                Halstead => Halstead,
                Loc => Loc,
                Mccabe => Mccabe);

        when others =>
            Conditional_Or_Timed_Entry_Call
               (Current_Compilation_Unit => Current_Compilation_Unit,
                Program_Unit => Program_Unit,
                Halstead => Halstead,
                Loc => Loc,
                Mccabe => Mccabe);

    end case;

    Get_Next_Token (Out_Token => Current_Token,
                    From => Current_Compilation_Unit,
                    Current_Loc => Loc);

    if "/=" (Token_Package.Value_Of (Current_Token),
             Token_Package.End_Token) then
        raise Syntax_Error;
    end if;

    Get_Next_Token (Out_Token => Current_Token,
                    From => Current_Compilation_Unit,
                    Current_Loc => Loc);

    if "/=" (Token_Package.Value_Of (Current_Token),
             Token_Package.Select_Token) then
        raise Syntax_Error;
    end if;

    -- increment Halstead SELECT_END_SELECT operator count
    Halstead.Store_Operator ((Kind =>
                                 Halstead_Operator.Select_End_Select_Halstead));

    Get_Next_Token (Out_Token => Current_Token,
                    From => Current_Compilation_Unit,
                    Current_Loc => Loc);

    if "/=" (Token_Package.Value_Of (Current_Token),
             Token_Package.Semicolon_Token) then
        raise Syntax_Error;
    end if;

    -- increment Halstead SEMICOLON operator count
    Halstead.Store_Operator ((Kind => Halstead_Operator.Semicolon_Halstead));

end Select_Statement;