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

⟦8b14b4385⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Expression_Node, seg_041232

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



package Expression_Node is

    package Kind is
        type Node_Kind is ('+', '-', '*', '/', Number,
                           Attribute, Enumerate, Unknown);
        subtype Operator is Node_Kind range '+' .. '/';
        subtype Value is Node_Kind range Number .. Enumerate;
    end Kind;

    use Kind;

    type Object (Kind : Node_Kind := Unknown) is private;

    type P_Object is access Object;

    procedure Make (The_Kind : in Operator;
                    Left_Node, Right_Node : in P_Object;
                    Father_Node : out P_Object;
                    Ok : out Boolean);
    procedure Make (The_Kind : in Value;
                    The_String : in String;
                    Node : out P_Object;
                    Ok : out Boolean);
    procedure Image (Item : in Object);
    function Evaluate (Item : in Object) return Integer;

    Null_Object : constant Object;

private  
    type Object (Kind : Node_Kind := Unknown) is
        record  
            case Kind is
                when '+' | '-' | '*' | '/' =>
                    Left, Right : P_Object;
                when Number =>
                    Value : Integer;
                when Attribute =>
                    Complement : Natural := 0;
                    Field : Natural := 0;
                when Enumerate =>
                    Enumeration : Natural := 0;
                    Literal : Natural := 0;
                when Unknown =>
                    null;
            end case;
        end record;  
    Null_Object : constant Object := (Kind => Unknown);

end Expression_Node;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=20 rec1=00 rec2=01 rec3=004
        [0x01] rec0=13 rec1=00 rec2=02 rec3=001
    tail 0x217416b10861352a0dae5 0x42a00088462060003