|
|
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: 3387 (0xd3b)
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 (Find_Unit.Build_Ada_Compilation_Unit)
procedure Function_End_Unit (Current_Unit : in out
Compilation_Unit.Ada_Compilation_Unit) is
--==============================================================
-- This procedure builds the next part of the grammar for an =
-- Ada compilation unit. Based on the next token, we will =
-- complete different productions. At present, we are parsing =
-- the end of a function compilation unit. We will get the =
-- 'end' followed by an optional identifier or string followed =
-- by a semicolon. If a syntax error is found, then raise the =
-- exception Build_Syntax_Error. =
-- The grammar : =
-- <Function_End_Unit> = =
-- 'END' [<Id>] ';' =
-- =
-- written by GER with help from b2 and JM =
-- May 1985 at EVB Software Engineering =
--==============================================================
Current_Token : Token_Package.Token;
-- Holds the current token
begin
-- Function_End_Unit
-- Get the 'End' of the function compilation unit
Get_Next_Significant_Token (Significant_Token => Current_Token,
Current_Unit => Current_Unit);
if Token_Package.Value_Of (Current_Token) = Token_Package.End_Token then
Compilation_Unit.Add_Token_To_Compilation_Unit
(Token_To_Add => Current_Token, Unit_To_Add_To => Current_Unit);
else
-- Not the end of the function compilation unit
raise Build_Syntax_Error;
end if;
Get_Next_Significant_Token (Significant_Token => Current_Token,
Current_Unit => Current_Unit);
if Token_Package.Value_Of (Current_Token) =
Token_Package.Semicolon_Token then
-- End of the function compilation unit
Compilation_Unit.Add_Token_To_Compilation_Unit
(Token_To_Add => Current_Token, Unit_To_Add_To => Current_Unit);
elsif Token_Package.Class_Of (Current_Token) = Token_Package.Identifier or
Token_Package.Class_Of (Current_Token) =
Token_Package.Standard_String_Literal or
Token_Package.Class_Of (Current_Token) =
Token_Package.Alternate_String_Literal then
-- Add the designator to the compilation unit and look for
-- the final semicolon
Compilation_Unit.Add_Token_To_Compilation_Unit
(Token_To_Add => Current_Token, Unit_To_Add_To => Current_Unit);
Get_Next_Significant_Token (Significant_Token => Current_Token,
Current_Unit => Current_Unit);
if Token_Package.Value_Of (Current_Token) =
Token_Package.Semicolon_Token then
Compilation_Unit.Add_Token_To_Compilation_Unit
(Token_To_Add => Current_Token, Unit_To_Add_To => Current_Unit);
else
-- Not the end of the compilation unit or accept
raise Build_Syntax_Error;
end if;
else
-- Not the end of the function compilation unit
raise Build_Syntax_Error;
end if;
end Function_End_Unit;