DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦88390f6da⟧ TextFile

    Length: 4027 (0xfbb)
    Types: TextFile
    Names: »V«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Lexical;
package Nodes is
    type Nodelist is (Activer, Desactiver, Modifier, Evoluer, Expressionprime,
                      Termeprime, Expression, Terme, Facteur,
                      Id, Nombre, Affect, Faire, Repeter, Si,
                      Sinon, Autemps, Attendre, Condition, None);
    type Operator is (Add, Sub, Mul, Div, Modulo, None);
    type Op_Rel is (Inf, Sup, Eq, Inf_Eq, Sup_Eq, Diff, None);

    type Node (Anodetype : Nodelist);
    type Pnode is access Node;
    type Node (Anodetype : Nodelist) is
        record
            Thetype : Nodelist := None;
            Next : Pnode := null;
            case Anodetype is
                when Activer =>
                    Act_Id1, Act_Id2 : Pnode;
                when Desactiver =>
                    Des_Id1, Des_Id2 : Pnode;
                when Modifier =>
                    Mod_Id1, Mod_Id2, Mod_Expr : Pnode;
                when Evoluer =>
                    Evo_Id1, Evo_Id2, Evo_Expr1, Evo_Expr2 : Pnode;
                when Expressionprime =>
                    Expp_Exprprime, Expp_Term : Pnode;
                    Expp_Op : Operator;
                when Termeprime =>
                    Terp_Termprime, Terp_Fact : Pnode;
                    Terp_Op : Operator;
                when Expression =>
                    Exp_Exprprime, Exp_Term : Pnode;
                when Terme =>
                    Ter_Termprime, Ter_Fact : Pnode;
                when Facteur =>
                    Fac_Node : Pnode;
                when Id =>
                    Id_Val : Lexical.Lexeme;  -- niveau le plus bas
                when Nombre =>
                    Nb_Val : Integer;
                when Affect =>
                    Aff_Id, Aff_Expr : Pnode;
                when Faire =>
                    Fai_Id1, Fai_Id2 : Pnode;
                when Repeter =>
                    Rep_Expr, Rep_Instr : Pnode;
                when Si =>
                    Si_Cond, Si_Instr, Si_Sinon : Pnode;
                when Sinon =>
                    Sin_Instr : Pnode;
                when Autemps =>
                    Aut_Expr, Aut_Instr : Pnode;
                when Attendre =>
                    Att_Expr : Pnode;
                when Condition =>
                    Con_Expr1, Con_Expr2 : Pnode;
                    Con_Op : Op_Rel;
                    Con_Val : Boolean := True;
                when None =>
                    null;
            end case;
        end record;

    function Mkactivernode (Id1, Id2 : Pnode) return Pnode;
    function Mkdesactivernode (Id1, Id2 : Pnode) return Pnode;
    function Mkmodifiernode (Id1, Id2, Expr : Pnode) return Pnode;
    function Mkevoluernode (Id1, Id2, Expr1, Expr2 : Pnode) return Pnode;

    function Mkexprnode (Term, Exprprime : Pnode) return Pnode;
    function Mktermnode (Fact, Termprime : Pnode) return Pnode;
    function Mkexprprimenode
                (Term, Exprprime : Pnode; Anoperator : Operator) return Pnode;
    function Mktermprimenode
                (Fact, Termprime : Pnode; Anoperator : Operator) return Pnode;

    function Mkfactnode (Anode : Pnode) return Pnode;
    function Mkidnode (Val : Lexical.Lexeme) return Pnode;
    function Mknbnode (Val : Integer) return Pnode;

    function Mkaffectnode (Id, Expr : Pnode) return Pnode;
    function Mkfairenode (Id1, Id2 : Pnode) return Pnode;
    function Mkrepeternode (Expr, Instr : Pnode) return Pnode;
    function Mksinode (Cond, Instr, Sinon : Pnode) return Pnode;
    function Mksinonnode (Instr : Pnode) return Pnode;
    function Mkautempsnode (Expr, Instr : Pnode) return Pnode;
    function Mkattendrenode (Expr : Pnode) return Pnode;
    function Mkcondnode (Expr1, Expr2 : Pnode; Anoprel : Op_Rel) return Pnode;

-- acces
    function Idgetlex (Aidnode : Pnode) return Lexical.Lexeme;
    function Nbgetvalue (Anbnode : Pnode) return Integer;
-- affectation
    procedure Idsetvalue (Aidnode : Pnode; Aval : Lexical.Lexeme);

-- affichage
    procedure Printtree (Anode : Pnode);

end Nodes;