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

⟦db6a2b4be⟧ TextFile

    Length: 3184 (0xc70)
    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 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 compilation unit or an accept statement. We    =
    -- will get the 'end' followed by an optional identifier       =
    -- followed by a semicolon. If a syntax error is found, then   =
    -- raise the exception Build_Syntax_Error.                     =
    -- The grammar :                                               =
    --      <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
    -- End_Unit

    -- Get the 'End' of the accept statement or 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 accept statement or 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 compilation unit or accept statement

        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 then

        -- Add the identifier 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 accept statement or compilation unit
        raise Build_Syntax_Error;
    end if;

end End_Unit;