|
|
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: 4654 (0x122e)
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 Generic_Type_Definition
(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
--=======================================================
-- Generic_Type_Definition ::=
-- "(" "<> ")"
-- | ( [ "RANGE" | "DIGITS" | "DELTA" ] ) "<>"
-- | Array_Type_Definition
-- | Access_Type_Definition
-- | Private_Type_Definition
--=======================================================
Current_Token : Token_Package.Token;
begin
-- Generic_Type_Definition
case Token_Package.Value_Of (Peek (From => Current_Compilation_Unit)) is
when Token_Package.Left_Parenthesis_Token =>
Get_Next_Token (Out_Token => Current_Token,
From => Current_Compilation_Unit,
Current_Loc => Loc);
Get_Next_Token (Out_Token => Current_Token,
From => Current_Compilation_Unit,
Current_Loc => Loc);
if "/=" (Token_Package.Value_Of (Current_Token),
Token_Package.Box_Token) then
raise Syntax_Error;
end if;
-- increment Halstead BOX operator count
Halstead.Store_Operator ((Kind => Halstead_Operator.Box_Halstead));
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;
-- increment Halstead PARENTHESES operator count
Halstead.Store_Operator
((Kind => Halstead_Operator.Parentheses_Halstead));
when Token_Package.Range_Token | Token_Package.Digits_Token |
Token_Package.Delta_Token =>
Get_Next_Token (Out_Token => Current_Token,
From => Current_Compilation_Unit,
Current_Loc => Loc);
case Token_Package.Value_Of (Current_Token) is
when Token_Package.Range_Token =>
-- increment Halstead RANGE operator count
Halstead.Store_Operator
((Kind => Halstead_Operator.Range_Halstead));
when Token_Package.Digits_Token =>
-- increment Halstead DIGITS operator count
Halstead.Store_Operator
((Kind => Halstead_Operator.Digits_Halstead));
when Token_Package.Delta_Token =>
-- increment Halstead DELTA operator count
Halstead.Store_Operator
((Kind => Halstead_Operator.Delta_Halstead));
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.Box_Token) then
raise Syntax_Error;
end if;
-- increment Halstead BOX operator count
Halstead.Store_Operator ((Kind => Halstead_Operator.Box_Halstead));
when Token_Package.Array_Token =>
Array_Type_Definition
(Current_Compilation_Unit => Current_Compilation_Unit,
Program_Unit => Program_Unit,
Halstead => Halstead,
Loc => Loc,
Mccabe => Mccabe);
when Token_Package.Access_Token =>
Access_Type_Definition
(Current_Compilation_Unit => Current_Compilation_Unit,
Program_Unit => Program_Unit,
Halstead => Halstead,
Loc => Loc,
Mccabe => Mccabe);
when Token_Package.Limited_Token | Token_Package.Private_Token =>
Private_Type_Definition
(Current_Compilation_Unit => Current_Compilation_Unit,
Program_Unit => Program_Unit,
Halstead => Halstead,
Loc => Loc,
Mccabe => Mccabe);
when others =>
raise Syntax_Error;
end case;
end Generic_Type_Definition;