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

⟦512586f62⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Abstract_Tree, seg_0464e8

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;
with Models, Symbols;

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;
                        Models_Table : Models.Object;
                        Symbols_Table : Symbols.Object) 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;
                            Models_Table : Models.Object;
                            Symbols_Table : Symbols.Object) return Integer;


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

    function Evaluate_Node (Node : Object;
                            Models_Table : Models.Object;
                            Symbols_Table : Symbols.Object) return Boolean;


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

    function Evaluate_Node (Node : Object;
                            Models_Table : Models.Object;
                            Symbols_Table : Symbols.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) 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;

    type Object is access Cell;
end Abstract_Tree;

E3 Meta Data

    nblk1=7
    nid=0
    hdr6=e
        [0x00] rec0=24 rec1=00 rec2=01 rec3=05e
        [0x01] rec0=00 rec1=00 rec2=07 rec3=030
        [0x02] rec0=1d rec1=00 rec2=05 rec3=090
        [0x03] rec0=1d rec1=00 rec2=02 rec3=01c
        [0x04] rec0=02 rec1=00 rec2=06 rec3=024
        [0x05] rec0=19 rec1=00 rec2=03 rec3=00e
        [0x06] rec0=01 rec1=00 rec2=04 rec3=000
    tail 0x21748ade8865042269c1b 0x42a00088462060003