DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦c370cce44⟧ Ada Source

    Length: 16384 (0x4000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Automate, package body Lex, package body Look_Ahead, package body Standard_String, seg_02eecf

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Text_Io;
package body Lex is

    package Standard_String is
        type Object is private;

        procedure Clear (S : in out Standard_String.Object);
        procedure Append (C : Character; To : in out Standard_String.Object);
        function Get (From : Standard_String.Object) return String;
    private
        String_Size : constant := 80;

        type Object is
            record
                Length : Natural := 0;
                Content : String (1 .. String_Size);
            end record;
    end Standard_String;


    package Look_Ahead is  
        function Exist return Boolean;
        function Get return Character;
        procedure Set (To : Character);
    end Look_Ahead;


    package Automate is
        function Start return Token;
        function Get return Standard_String.Object;
    end Automate;


    The_File : Text_Io.File_Type;  
    Current_Token : Token;



--
--
    function Get_Next_Character
                (The_File : Text_Io.File_Type) return Character is  
        C : Character;
    begin
        if Look_Ahead.Exist then
            return Look_Ahead.Get;
        else
            if Text_Io.End_Of_File (File => The_File) then
                return Ascii.Eot;
            elsif Text_Io.End_Of_Line (File => The_File) then  
                Text_Io.Skip_Line (File => The_File);
                return Ascii.Cr;
            else
                Text_Io.Get (File => The_File, Item => C);
                return C;
            end if;
        end if;
    end Get_Next_Character;



--
--
    function Is_A_Keyword (The_String : String) return Boolean is
        T : Token;
    begin
        T := Token'Value (The_String);
        return True;
    exception
        when Constraint_Error =>
            return False;
    end Is_A_Keyword;


--
--
    procedure Open (Thename : String) is
    begin
        Text_Io.Open (File => The_File,
                      Mode => Text_Io.In_File,
                      Name => Thename,
                      Form => "");
    end Open;



--
--
    procedure Close is
    begin
        Text_Io.Close (File => The_File);
    end Close;



--
--
    function Get_Value return String is
    begin
        return Standard_String.Get (From => Automate.Get);
    end Get_Value;



--
--
    function Get_Token return Token is
    begin
        return Current_Token;
    end Get_Token;



--
--
    function At_End return Boolean is
    begin
        return Current_Token = Eof;
    end At_End;



--
--
    procedure Next is
    begin  
        Current_Token := Automate.Start;
        if Current_Token = Id then
            if Is_A_Keyword (Get_Value) then
                Current_Token := Token'Value (Get_Value);
            end if;
        end if;
    end Next;



--
--
    package body Standard_String is separate;
    package body Look_Ahead is separate;
    package body Automate is separate;
end Lex;

E3 Meta Data

    nblk1=f
    nid=7
    hdr6=8
        [0x00] rec0=2a rec1=00 rec2=01 rec3=014
        [0x01] rec0=26 rec1=00 rec2=08 rec3=010
        [0x02] rec0=3b rec1=00 rec2=0a rec3=004
        [0x03] rec0=05 rec1=00 rec2=0c rec3=000
        [0x04] rec0=18 rec1=00 rec2=0a rec3=000
        [0x05] rec0=03 rec1=00 rec2=0c rec3=000
        [0x06] rec0=12 rec1=00 rec2=04 rec3=018
        [0x07] rec0=16 rec1=00 rec2=03 rec3=02c
        [0x08] rec0=15 rec1=00 rec2=0b rec3=01e
        [0x09] rec0=15 rec1=00 rec2=0c rec3=038
        [0x0a] rec0=18 rec1=00 rec2=0d rec3=000
        [0x0b] rec0=15 rec1=00 rec2=0c rec3=038
        [0x0c] rec0=18 rec1=00 rec2=0d rec3=000
        [0x0d] rec0=14 rec1=00 rec2=0d rec3=000
        [0x0e] rec0=00 rec1=00 rec2=00 rec3=249
    tail 0x2172787b084857ddffc52 0x42a00088462060003
Free Block Chain:
  0x7: 0000  00 0b 00 07 80 04 54 68 65 5f 04 05 00 13 20 20  ┆      The_      ┆
  0xb: 0000  00 0d 00 06 80 03 72 61 63 03 78 74 5f 49 6f 2e  ┆      rac xt_Io.┆
  0xd: 0000  00 03 03 fc 80 08 61 73 65 20 43 20 69 73 08 00  ┆      ase C is  ┆
  0x3: 0000  00 04 00 16 80 13 20 20 20 20 20 20 20 20 20 20  ┆                ┆
  0x4: 0000  00 05 00 27 80 15 74 65 20 3a 3d 20 53 74 61 74  ┆   '  te := Stat┆
  0x5: 0000  00 02 00 1c 80 0c 65 6e 20 6f 74 68 65 72 73 20  ┆      en others ┆
  0x2: 0000  00 06 00 05 80 02 74 61 02 74 61 05 20 20 20 63  ┆      ta ta    c┆
  0x6: 0000  00 09 03 fc 80 0b 20 43 68 61 72 61 63 74 65 72  ┆       Character┆
  0x9: 0000  00 0f 00 29 80 08 6f 6b 65 6e 29 20 69 73 08 00  ┆   )  oken) is  ┆
  0xf: 0000  00 0e 03 fc 00 2c 20 20 20 20 20 20 20 20 20 20  ┆     ,          ┆
  0xe: 0000  00 00 00 2e 00 2b 20 20 20 20 20 20 20 20 20 20  ┆   . +          ┆