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

⟦490b4d9f2⟧ TextFile

    Length: 2918 (0xb66)
    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 Function_Spec_Or_Body (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 function specification, function body.     =
    -- This program will search for a semicolon or an 'is'. If a   =
    -- semicolon is found, then found the end of a funciton        =
    -- specification. If an 'IS' is found, then keep searching for =
    -- a function body or a generic function instantiation.        =
    -- Grammar :                                                   =
    --    <Function_Spec_Or_Body> =                                =
    --         ';' |                                               =
    --         'IS' <Function_Body_Or_Stub>                        =
    --                                                             =
    -- Written  by  GER  with  help  from  b2  and  JM             =
    -- May 1985  EVB Software Engineering Inc.                     =
    --==============================================================

    Current_Token : Token_Package.Token;
    -- Holds the current token

begin
    -- Function_Spec_Or_Body

    -- Repeatly get significant tokens until a 'is' or semicolon
    -- is found

    Search_For_Is_Or_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
                -- just keep add the token
                Compilation_Unit.Add_Token_To_Compilation_Unit
                   (Token_To_Add => Current_Token,
                    Unit_To_Add_To => Current_Unit);
            end if;

            exit Search_For_Is_Or_Semicolon when
               Token_Package.Value_Of (Current_Token) =
                  Token_Package.Semicolon_Token or
               Token_Package.Value_Of (Current_Token) = Token_Package.Is_Token;
        end loop Search_For_Is_Or_Semicolon;

    case Token_Package.Value_Of (Current_Token) is
        when Token_Package.Semicolon_Token =>

            -- The end of a function specification has been found

            null;
        when Token_Package.Is_Token =>

            -- Either a function body or a body stub

            Function_Body_Or_Stub (Current_Unit => Current_Unit);
        when others =>

            -- Unknown token at this level of the grammar

            raise Build_Syntax_Error;
    end case;

end Function_Spec_Or_Body;