separate (Find_Unit.Build_Ada_Compilation_Unit)
procedure Procedure_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 JProcedure specification, Procedure body,  =
    -- or a generic Procedure instantiation. This program will     =
    -- use the peek ahead to determine whether this is an          =
    -- instantiation or one of the other productions.              =
    -- Grammar :                                                   =
    --    <Procedure_Or_Instantiation> =                           =
    --         <id> [<Left_Right_Paren>]                           =
    --         <Procedure_Spec_Or_Body> |                          =
    --         <id> 'IS' 'NEW' * ';'                               =
    --                                                             =
    -- Written  by  GER  with  help  from  b2  and  JM             =
    -- May 1985  EVB Software Engineering Inc.                     =
    --==============================================================

    Current_Token : Token_Package.Token;
    -- The current token read from the source file
    Peek_Token : Token_Package.Token;
    -- A future token to be used later

begin
    -- Procedure_Or_Instantiation

    -- Get the Procedure identifier

    Get_Next_Significant_Token (Significant_Token => Current_Token,
                                Current_Unit => Current_Unit);

    if Token_Package.Class_Of (Current_Token) = Token_Package.Identifier then
        Compilation_Unit.Add_Token_To_Compilation_Unit
           (Token_To_Add => Current_Token, Unit_To_Add_To => Current_Unit);
    else
        -- Not part of the legal grammar
        raise Build_Syntax_Error;
    end if;

    -- Peek ahead twice to see if this is a generic instantiation

    Peek_Next_Significant_Token (Significant_Token => Peek_Token);
    Peek_Next_Significant_Token (Significant_Token => Peek_Token);

    case Token_Package.Value_Of (Peek_Token) is
        when Token_Package.New_Token =>

            -- Must be a generic instantiation so repeatly get
            -- tokens until a semiclon is found

            Search_For_Semi_Colon:
                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
                        Compilation_Unit.Add_Token_To_Compilation_Unit
                           (Token_To_Add => Current_Token,
                            Unit_To_Add_To => Current_Unit);
                    else
                        -- Not part of the legal grammar
                        raise Build_Syntax_Error;
                    end if;

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

        when others =>

            -- Set the peek back to the beginning

            Token_Package.Set_Peek_Back;

            Peek_Next_Significant_Token (Significant_Token => Peek_Token);

            if Token_Package.Value_Of (Peek_Token) =
               Token_Package.Left_Parenthesis_Token then
                Left_Right_Paren (Current_Unit => Current_Unit);
            end if;

            Procedure_Spec_Or_Body (Current_Unit => Current_Unit);

    end case;

end Procedure_Or_Instantiation;