|
|
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: 3680 (0xe60)
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 Declaration (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 some possible nested compilation unit. This routine =
-- will peek at the next keyword to see if it is a nested =
-- generic (recurse), a nested task (recurse), a subprogram =
-- (or just renames), or a package (or just renames). If a =
-- syntax error is found, then the exception Build_Syntax_Error=
-- will be raised. =
-- Grammar : =
-- <Declaration> = =
-- <Package_Or_Renames> | =
-- <Task_Unit> | =
-- <Procedure_Or_Renames> | =
-- <Generic_Unit> =
-- =
-- Written by GER with help from b2 and JM =
-- May 1985 EVB Software Engineering Inc. =
--==============================================================
Nested_Unit : Compilation_Unit.Ada_Compilation_Unit;
-- A compilation unit that is nested
Peek_Token : Token_Package.Token;
-- A future token to be used later
begin
-- Declaration
-- Set the peek token back to the beginning
Token_Package.Set_Peek_Back;
-- Peek at the next token to see if it is a nested compilation
-- unit or not
Peek_Next_Significant_Token (Significant_Token => Peek_Token);
case Token_Package.Value_Of (Peek_Token) is
when Token_Package.Generic_Token =>
-- Before recursing add on insignificant tokens
-- (Comments, new lines, and blank lines )
Add_On_Insignificant_Tokens (Current_Unit => Current_Unit);
-- A nested generic compilation unit, so recurse on
-- Get_Compilation_Unit
Get_Compilation_Unit (Current_Unit => Nested_Unit);
Compilation_Unit.Add_Compilation_Units
(Added_Unit => Nested_Unit, Unit_To_Add_To => Current_Unit);
when Token_Package.Task_Token =>
-- Before recursing add on insignificant tokens
-- (Comments, new lines, and blank lines )
Add_On_Insignificant_Tokens (Current_Unit => Current_Unit);
-- A nested task compilation unit, so recurse on
-- Get_Compilation_Unit
Get_Compilation_Unit (Current_Unit => Nested_Unit);
Compilation_Unit.Add_Compilation_Units
(Added_Unit => Nested_Unit, Unit_To_Add_To => Current_Unit);
when Token_Package.Package_Token =>
-- A nested package compilation unit, or just a
-- package renames
Package_Or_Renames (Current_Unit => Current_Unit);
when Token_Package.Procedure_Token | Token_Package.Function_Token =>
-- A nested subprogram compilation unit, or just a
-- subpgrogram renames
Subprogram_Or_Renames (Current_Unit => Current_Unit);
when others =>
-- This token is not recognizable at this point in grammar
raise Build_Syntax_Error;
end case;
end Declaration;