|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Compiler_File, seg_047550
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Text_Io, Io_Exceptions; package body Compiler_File is Current_File : Text_Io.File_Type; File_Is_Opened : Boolean := False; Current_Char : Character; Lookahead : Boolean; Current_Line_In_File, Current_Position_In_Line : Natural; Is_End_Of_Line : Boolean; procedure Open (File_Name : String) is begin if (File_Is_Opened) then raise A_File_Is_Already_Opened; end if; Lookahead := False; Is_End_Of_Line := False; Current_Line_In_File := 1; Current_Position_In_Line := 0; Text_Io.Open (Current_File, Text_Io.In_File, File_Name); File_Is_Opened := True; exception when Io_Exceptions.Device_Error | Io_Exceptions.Name_Error | Io_Exceptions.Mode_Error => raise File_Does_Not_Exist; end Open; procedure Close is begin if (not File_Is_Opened) then raise File_Has_Never_Been_Opened; end if; Text_Io.Close (Current_File); File_Is_Opened := False; end Close; procedure Next is begin if (not File_Is_Opened) then raise File_Has_Never_Been_Opened; end if; if (Lookahead = False) then Text_Io.Get (Current_File, Current_Char); Is_End_Of_Line := Text_Io.End_Of_Line (Current_File); Current_Position_In_Line := Natural (Text_Io.Col (Current_File)) - 1; Current_Line_In_File := Natural (Text_Io.Line (Current_File)); else Lookahead := False; end if; exception when Text_Io.End_Error => raise End_Of_File; end Next; procedure Unget is begin if (not File_Is_Opened) then raise File_Has_Never_Been_Opened; end if; Lookahead := True; end Unget; function Get_Value return Character is begin if (not File_Is_Opened) then raise File_Has_Never_Been_Opened; end if; return Current_Char; end Get_Value; function Get_Position_In_Line return Natural is begin if (not File_Is_Opened) then raise File_Has_Never_Been_Opened; end if; return Current_Position_In_Line; end Get_Position_In_Line; function Get_Line_In_File return Natural is begin if (not File_Is_Opened) then raise File_Has_Never_Been_Opened; end if; return Current_Line_In_File; end Get_Line_In_File; function End_Of_Line return Boolean is begin if (not File_Is_Opened) then raise File_Has_Never_Been_Opened; end if; return Is_End_Of_Line; end End_Of_Line; end Compiler_File;
nblk1=4 nid=0 hdr6=8 [0x00] rec0=24 rec1=00 rec2=01 rec3=02e [0x01] rec0=02 rec1=00 rec2=03 rec3=02e [0x02] rec0=21 rec1=00 rec2=02 rec3=048 [0x03] rec0=20 rec1=00 rec2=04 rec3=000 tail 0x215445a7a86539ac37a15 0x42a00088462060003