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

⟦180ee3726⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Abstract_Tree, seg_044c30

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 Lexical, Bounded_String;

use Lexical, Bounded_String;

package Abstract_Tree is

    Bad_Type : exception;

    type Node_Type is (Struct_Type, Enumeration_Type, Integer_Type,
                       Boolean_Type, State_Type, Entry_Type, Other_Type);

    type Object is private;

    -- Operateur binaire (comparaison,mathematique et logique) ---------------

    function Make_Node (Operation : Token; Left, Right : Object) return Object;


    -- Operateur unaire ------------------------------------------------------

    function Make_Node (Operation : Token; Down : Object) return Object;


    -- Entier ----------------------------------------------------------------

    function Make_Node (Value : Integer) return Object;


    -- Booleen et etat de lien/connexion -------------------------------------

    function Make_Node (Value : Token) return Object;


    -- Variable et enumere ---------------------------------------------------

    function Make_Node (Name, Extension : String) return Object;


    -- Instruction -----------------------------------------------------------

    function Make_Node (Name : Token; Param1, Param2 : String) return Object;


    -- Entree utilisateur ----------------------------------------------------

    function Make_Node (Entry1, Entry2, Entry3 : String) return Object;


    -- Destruction de l'arbre ------------------------------------------------

    procedure Destroy (Node : in out Object);


    -- Evaluation d'entier et enumere ----------------------------------------

    function Evaluate_Node (Node : Object) return Integer;


    -- Evaluation de booleen -------------------------------------------------

    function Evaluate_Node (Node : Object) return Boolean;


    -- Evaluation de lien/connexion et nom de structure ----------------------

    function Evaluate_Node (Node : Object) return String;


    -- Renvoie le type d'un noeud --------------------------------------------

    function What_Type (Node : Object) return Node_Type;


    -- Affichage de l'arbre --------------------------------------------------

    procedure Dump (Node : Object);

private
    type Cell_Type is (Binary_Operator, Unary_Operator,
                       Integer_Data, Boolean_Data, State_Data,
                       Var_Data, Instruction, Player_Entry);

    type Cell (Kind : Cell_Type := Binary_Operator);

    type Object is access Cell;

    type Cell (Kind : Cell_Type := Binary_Operator) is
        record
            Return_Type : Node_Type;
            case Kind is
                when Binary_Operator =>
                    Binary_Kind : Token;
                    Left_Node, Right_Node : Object;
                when Unary_Operator =>
                    Unary_Kind : Token;
                    Down_Node : Object;
                when Integer_Data =>
                    Integer_Value : Integer;
                when Boolean_Data =>
                    Boolean_Value : Boolean;
                when State_Data =>
                    State_Value : Token;
                when Var_Data =>
                    Var_Name, Var_Extension : Variable_String (32);
                when Instruction =>
                    Instruction_Name : Token;
                    Param1, Param2 : Variable_String (32);
                when Player_Entry =>
                    Nb_Param : Integer;
                    Entry1, Entry2, Entry3 : Variable_String (32);
            end case;
        end record;

end Abstract_Tree;

E3 Meta Data

    nblk1=6
    nid=6
    hdr6=a
        [0x00] rec0=23 rec1=00 rec2=01 rec3=038
        [0x01] rec0=20 rec1=00 rec2=05 rec3=03c
        [0x02] rec0=03 rec1=00 rec2=03 rec3=044
        [0x03] rec0=1d rec1=00 rec2=02 rec3=050
        [0x04] rec0=11 rec1=00 rec2=04 rec3=000
        [0x05] rec0=10 rec1=10 rec2=10 rec3=080
    tail 0x2174602f68643513819d0 0x42a00088462060003
Free Block Chain:
  0x6: 0000  00 00 00 25 00 22 20 20 20 20 2d 2d 20 52 65 6e  ┆   % "    -- Ren┆