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

⟦f070f153f⟧ TextFile

    Length: 3454 (0xd7e)
    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 Component_List
             (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

    --==========================================================
    -- Component_List #::=
    --     "NULL" ";"
    --   | Variant_Part              -> "CASE"
    --   | Component_Declaration     -> <IDENTIFIER>
    --     { Component_Declaration }
    --     [ Variant_Part ]
    --==========================================================

    Current_Token : Token_Package.Token;
    No_More_Component_Declaration : Boolean := False;

begin
    -- Component_List

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

        when Token_Package.Null_Token =>
            Get_Next_Token (Out_Token => Current_Token,
                            From => Current_Compilation_Unit,
                            Current_Loc => Loc);

            -- increment Halstead NULL operator count
            Halstead.Store_Operator ((Kind => Halstead_Operator.Null_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));

        when Token_Package.Case_Token =>
            Variant_Part (Current_Compilation_Unit => Current_Compilation_Unit,
                          Program_Unit => Program_Unit,
                          Halstead => Halstead,
                          Loc => Loc,
                          Mccabe => Mccabe);

        when others =>

            Process_Component_Declaration:
                -- repeat for every Component
                loop

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

                    if "/=" (Token_Package.Class_Of
                                (Peek (From => Current_Compilation_Unit)),
                             Token_Package.Identifier) then
                        No_More_Component_Declaration := True;
                    end if;

                    exit Process_Component_Declaration when
                       No_More_Component_Declaration;

                end loop Process_Component_Declaration;

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

                Variant_Part
                   (Current_Compilation_Unit => Current_Compilation_Unit,
                    Program_Unit => Program_Unit,
                    Halstead => Halstead,
                    Loc => Loc,
                    Mccabe => Mccabe);
            end if;

    end case;

end Component_List;