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

⟦8fd4ba566⟧ TextFile

    Length: 4567 (0x11d7)
    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 Name_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

    --=================================================================
    -- Name_Statement ::=
    --    $ 1st token is <IDENTIFIER> and 2nd token is ":" $
    --        1. < IDENTIFIER> ":" LOOP_Statement
    --        2.  Name [ ( ":=" Expression | "'" Aggregate ) ] ";"
    --=================================================================

    Current_Token : Token_Package.Token;
    Dummy_Name_Kind : Name_Kind;
    Dummy_Count : Positive;

begin
    -- Name_Statement

    if Token_Package.Class_Of (Peek (From => Current_Compilation_Unit)) =
       Token_Package.Identifier and then

       Token_Package.Value_Of
          (Peek (From => Current_Compilation_Unit, Offset => 2)) =
       Token_Package.Colon_Token then

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

        -- increment Halstead operand count
        Halstead.Store_Operand (Halstead_Operand.Definition
                                   (Token_Package.Value_Of
                                       (This_Token => Current_Token)));


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

        -- increment Halstead COLON operator count
        Halstead.Store_Operator ((Kind => Halstead_Operator.Colon_Halstead));

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

    else
        -- use 2nd production

        Name (Current_Compilation_Unit => Current_Compilation_Unit,
              Program_Unit => Program_Unit,
              Halstead => Halstead,
              Loc => Loc,
              Mccabe => Mccabe,
              Out_Name_Kind => Dummy_Name_Kind);

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

            when Token_Package.Assignment_Token =>

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

                -- increment Halstead ASSIGNMENT operator count
                Halstead.Store_Operator
                   ((Kind => Halstead_Operator.Assignment_Halstead));

                -- until ";" is found
                Expression
                   (Current_Compilation_Unit => Current_Compilation_Unit,
                    Program_Unit => Program_Unit,
                    Halstead => Halstead,
                    Loc => Loc,
                    Mccabe => Mccabe,
                    Terminate_Tokens =>
                       Set_Of_Tokens'(1 => Token_Package.Semicolon_Token));

            when Token_Package.Apostrophe_Token =>

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

                -- increment Halstead TICK operator count
                Halstead.Store_Operator ((Kind =>
                                             Halstead_Operator.Tick_Halstead));

                Aggregate (Current_Compilation_Unit => Current_Compilation_Unit,
                           Program_Unit => Program_Unit,
                           Halstead => Halstead,
                           Loc => Loc,
                           Mccabe => Mccabe,
                           Number_Of_Components => Dummy_Count);

            when others =>
                null;

        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.Semicolon_Token) then
            raise Syntax_Error;
        end if;

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

    end if;

end Name_Statement;