|
|
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: 5799 (0x16a7)
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 Id_Type_Declaration
(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
--===========================================================
-- ID_Type_Declaration #::=
-- Constant_Declaration
-- | "EXCEPTION" [ "RENAMES" Expanded_Name ]
-- | Array_Type_Definition [ ":=" Expression ]
--** changed 11/19/85 by J. Margono
--** reason: "A : Some_Type := Some_Value" raised Syntax_Error
-- | Name [ (Renaming_Or_Range_Constraint | ":=" Expression) ]
--===========================================================
Current_Token : Token_Package.Token;
Dummy_Name_Kind : Name_Kind;
begin
-- ID_Type_Declaration
case Token_Package.Value_Of (Peek (From => Current_Compilation_Unit)) is
when Token_Package.Constant_Token =>
Constant_Declaration
(Current_Compilation_Unit => Current_Compilation_Unit,
Program_Unit => Program_Unit,
Halstead => Halstead,
Loc => Loc,
Mccabe => Mccabe);
when Token_Package.Exception_Token =>
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)));
if Token_Package.Value_Of (Peek
(From => Current_Compilation_Unit)) =
Token_Package.Renames_Token then
Get_Next_Token (Out_Token => Current_Token,
From => Current_Compilation_Unit,
Current_Loc => Loc);
-- increment Halstead RENAMES operator
Halstead.Store_Operator
((Kind => Halstead_Operator.Renames_Halstead));
Expanded_Name
(Current_Compilation_Unit => Current_Compilation_Unit,
Program_Unit => Program_Unit,
Halstead => Halstead,
Loc => Loc,
Mccabe => Mccabe);
end if;
when Token_Package.Array_Token =>
Array_Type_Definition
(Current_Compilation_Unit => Current_Compilation_Unit,
Program_Unit => Program_Unit,
Halstead => Halstead,
Loc => Loc,
Mccabe => Mccabe);
if Token_Package.Value_Of (Peek
(From => Current_Compilation_Unit)) =
Token_Package.Assignment_Token then
Get_Next_Token (Out_Token => Current_Token,
From => Current_Compilation_Unit,
Current_Loc => Loc);
-- increment Halstead ASSIGNMENT operator
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));
end if;
when others =>
--** see the new production above
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.Renames_Token | Token_Package.Range_Token =>
Renaming_Or_Range_Constraint
(Current_Compilation_Unit => Current_Compilation_Unit,
Program_Unit => Program_Unit,
Halstead => Halstead,
Loc => Loc,
Mccabe => Mccabe);
--** added 11/19/85 by J. Margono
--** reason: see new production above
when Token_Package.Assignment_Token =>
Get_Next_Token (Out_Token => Current_Token,
From => Current_Compilation_Unit,
Current_Loc => Loc);
-- increment Halstead ASSIGNMENT operator
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 others =>
null;
end case;
end case;
end Id_Type_Declaration;