DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦dbec0bc45⟧ TextFile

    Length: 3051 (0xbeb)
    Types: TextFile
    Names: »B«

Derivation

└─⟦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⟧ 

TextFile

separate (Find_Unit.Build_Ada_Compilation_Unit)
procedure Package_Spec_Or_Instantiation
             (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  =
    -- either a package specification or a generic package         =
    -- instantiation. If the next keyword is 'new', then we will   =
    -- parse a generic package instantiation, else a package       =
    -- specification. Any errors will cause the exception          =
    -- Build_Syntax_Error to be raised.                            =
    -- The grammar :                                               =
    --     <Package_Spec_Or_Instantiation> =                       =
    --         'NEW' * ';' |                                       =
    --         <Package_Spec>                                      =
    --                                                             =
    -- written  by  GER  with  help  from  b2  and  JM             =
    -- May 1985  at EVB Software Engineering                       =
    --==============================================================

    Current_Token : Token_Package.Token;
    -- the current token read from the ada source code file
    Peek_Token : Token_Package.Token;
    -- A token that will later be gotten by
    -- Get_Next_Significant_Token
    End_Of_Instantiation : Boolean := False;
    -- Set to true when the end of the package instantiation is
    -- found

begin
    -- Package_Spec_Or_Instantiation

    -- Set the peek back to the beginnning

    Token_Package.Set_Peek_Back;

    -- Peek at the next token to see if it is a package instantiation

    Peek_Next_Significant_Token (Significant_Token => Peek_Token);

    if Token_Package.Value_Of (Peek_Token) = Token_Package.New_Token then

        -- Parse a generic package instantiation. Look for the
        -- semicolon that ends the instantiation

        Find_Semicolon:
            loop
                Get_Next_Significant_Token (Significant_Token => Current_Token,
                                            Current_Unit => Current_Unit);

                if Token_Package.Class_Of (Current_Token) =
                   Token_Package.End_Of_File then
                    raise Build_Syntax_Error;
                else
                    Compilation_Unit.Add_Token_To_Compilation_Unit
                       (Token_To_Add => Current_Token,
                        Unit_To_Add_To => Current_Unit);
                end if;

                exit Find_Semicolon when
                   Token_Package.Value_Of (Current_Token) =
                      Token_Package.Semicolon_Token;
            end loop Find_Semicolon;

    else
        -- Must be package specification

        Package_Spec (Current_Unit => Current_Unit);

    end if;

end Package_Spec_Or_Instantiation;