|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package Expression_Fonction, seg_0480fd, seg_048c31, seg_048c9e, seg_048dce
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧ └─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Nos_Chaines; ---------------------------------------------------------------------------------------- -- paquetage definissant: -- les structures permettant de memoriser les parametres d'une fonction predefinie a executer -- les types des parametres autorises dans cette fonction -- la structure de memorisation d'une expression numerique --------------------------------------------------------------------------------------- package Expression_Fonction is ----------------cas d'une fonction predefinie ------------------------- -- type des parametre q'une instruction peut contenir type T_Parameter is (Communication, Compteur, Lieu, Objet, Personnage, Joueur, Positioncourante, Etat, Possession, Contenu, Sens1, Sens2, Vers, Sortie, Est, Texte, Unknown); -- renvoie le type de parametre d une valeur function Wich_Type (T : Nos_Chaines.String_Text) return T_Parameter; -- verifie la compatibilite de deux parametres successifs function Compatible (A : T_Parameter; B : T_Parameter) return Boolean; -- structure de la memorisation d'un parametre type T_Data is record Typ : T_Parameter; Value : Nos_Chaines.String_Text; end record; type T_Tab_Of_Parameter is array (Positive range 1 .. 5) of T_Data; ---------------cas d'une expression numerique------------------------ type Selecteur is (Type_Node, Type_Leaf_Id, Type_Leaf_Numeric); type Numeric_Operator is (Plus, Moins, Div, Mult, Modulo); type T_Node (Typ : Selecteur := Type_Node) is private; type P_Node is access T_Node; function To_Numeric_Operator (P : Nos_Chaines.String_Text) return Numeric_Operator; ------------------- instruction en general -------------------- type Selecteur_Instruction is (Type_Variable, Type_Function); type T_Instruction (Typ : Selecteur_Instruction := Type_Variable) is record Name : Nos_Chaines.String_Text; case Typ is when Type_Function => Parameters : T_Tab_Of_Parameter; Number_Of_Parameters : Integer; when Type_Variable => Tree_To_Evalue : P_Node; end case; end record; -- subtype T_Expression is T_Instruction (Type_Variable); subtype T_Fonction_Predefinie is T_Instruction (Type_Function); subtype T_Numeric_Function is P_Node; --- evalue une expresssion numerique function Evaluate (P : T_Numeric_Function) return Integer; ---- execute une fonction predefinie procedure Execute_Function (The_Function : T_Fonction_Predefinie); --- cree une nouvelle feuille function Make_Node (Typ : Selecteur; Val : Nos_Chaines.String_Text) return P_Node; --- cree un nouveu noeud function Make_Node (Op : Numeric_Operator; Left_Node : P_Node; Right_Node : P_Node) return P_Node; --------------- donne privee de l'arbre d'evaluation --------- private type T_Node (Typ : Selecteur := Type_Node) is record Result : Integer; case Typ is when Type_Node => Left, Right : P_Node := null; Operator : Numeric_Operator; when Type_Leaf_Numeric => Value : Integer; when Type_Leaf_Id => Id : Nos_Chaines.String_Text; end case; end record; end Expression_Fonction;
nblk1=5 nid=0 hdr6=a [0x00] rec0=17 rec1=00 rec2=01 rec3=008 [0x01] rec0=00 rec1=00 rec2=03 rec3=01c [0x02] rec0=1d rec1=00 rec2=05 rec3=050 [0x03] rec0=1d rec1=00 rec2=04 rec3=018 [0x04] rec0=1c rec1=00 rec2=02 rec3=000 tail 0x2174c14fe8658442ab7ba 0x42a00088462060003