|
|
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 - metrics - downloadIndex: B T
Length: 3847 (0xf07)
Types: TextFile
Names: »B«
└─⟦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⟧
separate (Compilation_Unit.Produce_Metrics)
procedure Entry_Declaration_Continued
(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
--======================================================
-- Entry_Declaration_Continued ::=
-- $ 3rd token is ":" or "," $
-- 1. Formal_Part
-- 2. "(" Expression ")" [ Formal_Part ]
--======================================================
Current_Token : Token_Package.Token;
Number_Of_Parameters : Natural := 0;
begin
-- Entry_Declaration_Continued
case Token_Package.Value_Of
(Peek (From => Current_Compilation_Unit, Offset => 3)) is
when Token_Package.Colon_Token | Token_Package.Comma_Token =>
Formal_Part (Current_Compilation_Unit => Current_Compilation_Unit,
Program_Unit => Program_Unit,
Halstead => Halstead,
Loc => Loc,
Mccabe => Mccabe,
Formal_Parameters_Count => Number_Of_Parameters);
when others =>
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));
-- 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.Right_Parenthesis_Token));
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;
if Token_Package.Value_Of (Peek
(From => Current_Compilation_Unit)) =
Token_Package.Left_Parenthesis_Token then
Formal_Part
(Current_Compilation_Unit => Current_Compilation_Unit,
Program_Unit => Program_Unit,
Halstead => Halstead,
Loc => Loc,
Mccabe => Mccabe,
Formal_Parameters_Count => Number_Of_Parameters);
end if;
end case;
if Number_Of_Parameters > 0 then
-- increment LOC data declaration count by Number_Of_Parameters
Loc.Change_Data_Declarations_Count
(The_Amount_To_Change => Number_Of_Parameters);
-- calculate Halstead V* for this ENTRY statement
-- based on Number_Of_Parameters
Halstead.Change_Parameters_Count
(The_Amount_To_Change => Number_Of_Parameters);
end if;
--** added 11/19/85 by J. Margono
--** reason: V* was always equal to zero because these two
--** steps were left out
Halstead.Calculate_Potential_Operator;
Halstead.Calculate_Potential_Operand;
Halstead.Calculate_Entry_Potential_Program_Volume;
end Entry_Declaration_Continued;