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

⟦29e7fd989⟧ TextFile

    Length: 2975 (0xb9f)
    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 Aggregate (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;
                     Number_Of_Components : out Positive) is

    --=============================================================
    -- Aggregate ::= "(" Expression { "," Expression } ")"
    --=============================================================

    Current_Token : Token_Package.Token;
    Is_Right_Parentheses_Found : Boolean := False;
    Hold_Count : Natural := 0;

begin
    -- Aggregate

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

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

    -- increment Halstead PARENTHESES operator count
    Halstead.Store_Operator ((Kind => Halstead_Operator.Parentheses_Halstead));

    Find_Right_Parenthesis:
        loop

            Expression (Current_Compilation_Unit => Current_Compilation_Unit,
                        Program_Unit => Program_Unit,
                        Halstead => Halstead,
                        Loc => Loc,
                        Mccabe => Mccabe,
                        Terminate_Tokens =>
                           Set_Of_Tokens'(Token_Package.Right_Parenthesis_Token,
                                          Token_Package.Comma_Token));

            -- increment number of components
            Hold_Count := Hold_Count + 1;

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

                when Token_Package.Comma_Token =>

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

                    -- increment Halstead COMMA operator count
                    Halstead.Store_Operator
                       ((Kind => Halstead_Operator.Comma_Halstead));

                when Token_Package.Right_Parenthesis_Token =>
                    Is_Right_Parentheses_Found := True;

                when others =>
                    raise Syntax_Error;

            end case;

            exit Find_Right_Parenthesis when Is_Right_Parentheses_Found;

        end loop Find_Right_Parenthesis;

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

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

    Number_Of_Components := Hold_Count;

end Aggregate;