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

⟦64bcbcc1b⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Block, seg_0330b4

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 Scanner;
with Object;
with Symbols;
with Arguments, Statements;
with Class_Block;
with Bounded_String;

package body Block is

    type Node_Structure is
        record
            Table : Symbols.Table := Symbols.Create;
            Kwd : Object.Unary;
            Ident : Object.Unary;
            Stat : Statements.Node := Statements.Empty_Node;
            Parent : Block.Node := Block.Empty_Node;
        end record;

    Current_Node : Block.Node;

    function Get_Ident (N : Node) return Object.Unary is
    begin
        return N.Ident;
    end Get_Ident;

    function Get_Kwd (N : Node) return Object.Unary is
    begin
        return N.Kwd;
    end Get_Kwd;

    function Get_Table (N : Node) return Symbols.Table is
    begin
        return N.Table;
    end Get_Table;

    procedure Put_Table (This_Object : Object.Reference;
                         Named : Object.Tiny_String;
                         Into : in out Node) is
    begin
        Symbols.Put (This_Object, Named, Into.Table);
    end Put_Table;

    function Get_Current_Node return Node is
    begin
        return Current_Node;
    end Get_Current_Node;

    function Get_Current_Table return Symbols.Table is
    begin
        return Current_Node.Table;
    end Get_Current_Table;

    procedure Put_Current_Table (This_Object : Object.Reference;
                                 Named : Object.Tiny_String) is
    begin
        Symbols.Put (This_Object, Named, Current_Node.Table);
    end Put_Current_Table;

    function Get_Parent (N : Node) return Node is
    begin
        return N.Parent;
    end Get_Parent;

    function Is_Nil (N : Node) return Boolean is
    begin
        return N = Empty_Node;
    end Is_Nil;

    procedure Parse (N : in out Node; Error : out Boolean) is
        Failed : Boolean := False;
    begin  
        N := new Node_Structure;
        N.Parent := Current_Node;
        Current_Node := N;
        if Bounded_String.Image (Scanner.Get_Value) = "{" then
            Scanner.Next;  
            Arguments.Parse (N, N.Ident, N.Kwd, Failed);
            if not Failed then
                Statements.Parse (N.Stat, Failed);
                if not Failed and then
                   Bounded_String.Image (Scanner.Get_Value) = "}" then
                    Scanner.Next;
                end if;
            end if;
            Current_Node := N.Parent;
        end if;
        Error := Failed;
    end Parse;

    function Is_First (T : Scanner.Token) return Boolean is
        use Scanner;
    begin
        return T = Special;
    end Is_First;

    function Interpret (N : Node) return Object.Reference is
        Result : Object.Reference := Object.Void_Reference;
        Node : Block.Node := Block.Current_Node;
    begin  
        Current_Node := N;
        Result := Statements.Interpret (N.Stat);
        Current_Node := Node;
        return Result;
    end Interpret;

begin
    Current_Node := new Node_Structure;

end Block;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=27 rec1=00 rec2=01 rec3=054
        [0x01] rec0=0f rec1=00 rec2=02 rec3=01c
        [0x02] rec0=1c rec1=00 rec2=03 rec3=07a
        [0x03] rec0=1d rec1=00 rec2=04 rec3=000
    tail 0x2172eb42884cd48899336 0x42a00088462060003