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 - download
Index: ┃ B T

⟦4ea1a3404⟧ TextFile

    Length: 1906 (0x772)
    Types: TextFile
    Names: »B«

Derivation

└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Text_Io;

package body Scanner is

    function At_End (File_Input : in Text_Io.File_Type) return Boolean is
    begin
        if Look_Ahead then
            return False;
        else
            return Text_Io.End_Of_File (File_Input);
        end if;
    end At_End;

    function Get_Token (File_Input : in Text_Io.File_Type) return Character is
    begin
        if Look_Ahead then
            Look_Ahead := False;
        else
            if At_End (File_Input) then
                Current_Char := Ascii.Eot;
            else
                if Text_Io.End_Of_Line (File_Input) then
                    Text_Io.Skip_Line (File_Input);
                    Current_Char := Ascii.Cr;
                else
                    Text_Io.Get (File_Input, Current_Char);
                end if;
            end if;
        end if;
        return Current_Char;
    end Get_Token;

    function Value (File_Input : in Text_Io.File_Type) return Character is
    begin
        return Current_Char;
    end Value;

    procedure Open (File_Input : in out Text_Io.File_Type; Name : in String) is
    begin
        Text_Io.Open (File_Input, Text_Io.In_File, Name);
        Look_Ahead := False;
    end Open;

    procedure Close (File_Input : in out Text_Io.File_Type) is
    begin
        Text_Io.Close (File_Input);
    end Close;

    procedure Next_Token (File_Input : in Text_Io.File_Type) is
    begin
        if Look_Ahead then
            Look_Ahead := False;
        else
            Text_Io.Get (File_Input, Current_Char);
        end if;
    end Next_Token;

    procedure Unget (File_Input : in Text_Io.File_Type) is
    begin
        Look_Ahead := True;
    end Unget;

    function Same_Token (Token_1, Token_2 : Token) return Boolean is
    begin
        if Token_1 = Token_2 then
            return True;
        else
            return False;
        end if;
    end Same_Token;


end Scanner;