with Io_Exceptions;
with Compilation;
with Tape_Tools;
with Io;
procedure Parse_From_Tape (Volume_Id : String := "";
                           Into_Library : String := "") is
    package Sio renames Io;

    Tape : Tape_Tools.Logical_Device;
    File_Name : constant String := "temp_File";
    File : Sio.File_Type;
begin
    Tape_Tools.Initialize (Tape, "VAX/VMS");
    Sio.Create (File, Sio.Out_File, File_Name);
    Tape_Tools.Connect_For_Input (Tape, Volume_Id);

    while not Tape_Tools.End_Of_Tape (Tape) loop
        Tape_Tools.Open (Tape);

        while not Tape_Tools.End_Of_File (Tape) loop
            Sio.Put_Line (File, Tape_Tools.Get_Line (Tape));
        end loop;

        Tape_Tools.Close (Tape);
    end loop;

    Sio.Close (File);
    begin
        Tape_Tools.Disconnect (Tape);
    exception
        when Io_Exceptions.Status_Error =>
            null;
    end;

    Compilation.Parse (File_Name, Directory => Into_Library);

end Parse_From_Tape;