separate (Find_Unit.Build_Ada_Compilation_Unit)
procedure End_Package_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   =
    -- the end of a package body. This subprogram will check the   =
    -- first keyword to see if it is 'begin' or 'end'. Different   =
    -- productions will be invoked for each.                       =
    -- The grammar :                                               =
    --     <End_Package_Body> =                                    =
    --         <Begin_Statement> <End_Unit> |                      =
    --         <End_Unit>                                          =
    --                                                             =
    -- written  by  GER  with  help  from  b2  and  JM             =
    -- May 1985  at EVB Software Engineering                       =
    --==============================================================

    Peek_Token : Token_Package.Token;
    -- A token that will later be gotten by
    -- Get_Next_Significant_Token

begin
    -- End_Package_Body

    -- Set the peek back to the beginnning

    Token_Package.Set_Peek_Back;

    -- Peek at the first token to see if it is 'begin' or 'end'

    Peek_Next_Significant_Token (Significant_Token => Peek_Token);

    case Token_Package.Value_Of (Peek_Token) is
        when Token_Package.Begin_Token =>
            Begin_Statement (Current_Unit => Current_Unit);
            End_Unit (Current_Unit => Current_Unit);
        when Token_Package.End_Token =>
            End_Unit (Current_Unit => Current_Unit);
        when others =>

            -- This is an unknown program unit

            raise Build_Syntax_Error;
    end case;

end End_Package_Body;