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

⟦d5e80e637⟧ Ada Source

    Length: 4096 (0x1000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body More_Unary, seg_03505e, seg_0363b7, seg_03690f

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 Object, Message, Scanner, Printer;
package body More_Unary is

    type Node_Structure is
        record
            Rule : Natural range 0 .. 1 := 0;
            More : More_Unary.Node := Empty_Node;
            Mess : Message.Tiny_String;
            Line : Natural;
        end record;



    procedure Parse (N : in out Node) is
        use Scanner;
    begin  
        N := new Node_Structure;
        N.Line := Scanner.Get_Line_Number;
        N.Mess := Scanner.Get_Value;  
        Scanner.Next;
        if Is_First (Scanner.Get_Token) then
            N.Rule := 1;
            Parse (N.More);
        end if;
    end Parse;

    procedure Unparse (N : in Node) is
    begin
        Scanner.Set_Line_Number (N.Line);
        Printer.Write (N.Mess);
        if N.Rule = 1 then
            Unparse (N.More);
        end if;
    end Unparse;

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

    function Interpret (N : Node; Inherited : Object.Reference)
                       return Object.Reference is
        Result : Object.Reference;
    begin  
        Scanner.Set_Line_Number (N.Line);
        case N.Rule is
            when 0 =>  
                Result := Message.Send (Inherited, N.Mess);
            when 1 =>  
                Result := Message.Send (Inherited, N.Mess);
                Result := Interpret (N.More, Result);
        end case;
        return (Result);
    end Interpret;
end More_Unary;

E3 Meta Data

    nblk1=3
    nid=2
    hdr6=4
        [0x00] rec0=27 rec1=00 rec2=01 rec3=00e
        [0x01] rec0=13 rec1=00 rec2=03 rec3=000
        [0x02] rec0=02 rec1=00 rec2=02 rec3=000
    tail 0x21731913084d84d9f6d2d 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 00 00 15 00 0f 65 6e 64 20 4d 6f 72 65 5f 55  ┆      end More_U┆