|
|
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: 3977 (0xf89)
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 Accept_Statement_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
--======================================================
-- Accept_Statement_Continued ::=
-- $ 3rd token is ":" or "," $
-- 1. Formal_Part
-- 2. "(" Expression ")" [ Formal_Part ]
--======================================================
Current_Token : Token_Package.Token;
Number_Of_Parameters : Natural := 0;
Current_Unit_Kind : Program_Unit_Kind;
begin
-- Accept_Statement_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;
Program_Unit.Get_Kind_Of_Program_Unit
(The_Kind_Of_Program_Unit => Current_Unit_Kind);
-- if program unit kind is not TASK_BODY, disregard the following
if Current_Unit_Kind = Task_Body then
-- calculate Halstead V* for this ACCEPT statement
-- based on Number_Of_Parameters
if Number_Of_Parameters > 0 then
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 if;
end Accept_Statement_Continued;