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

⟦7ae174f12⟧ Ada Source

    Length: 10240 (0x2800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Feuille, seg_047981

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 Bounded_String, Text_Io;
package body Feuille is

    function Which (Acell : in Cell) return Tcell is
    begin
        return Acell.Kind;
    end Which;

    procedure Image (Acell : in Cell) is
    begin
        Text_Io.Put ("Type du noeud : ");
        Text_Io.Put_Line (Tcell'Image (Acell.Kind));
        Text_Io.Put ("Contient :");
        case Acell.Kind is
            when Verbe | Complement | Objet | Piece_Courante |
                 Personne | Lien | Direction | Enum =>
                Text_Io.Put_Line (Bounded_String.Image (Acell.Idattrib));
            when Iter =>
                Text_Io.Put_Line
                   (Bounded_String.Image
                       (Struct_Component.Liste_Attribut.Cellvalue (Acell.Aiter).
                        Name));
            when Iter_S =>
                Text_Io.Put_Line (Bounded_String.Image
                                     (Struct_Component.Liste_Structure.Cellvalue
                                         (Acell.Aiter_S).Name));
            when Chaine =>
                Text_Io.Put_Line (Bounded_String.Image (Acell.Phrase));  
            when Entier =>
                Text_Io.Put_Line (Natural'Image (Acell.Nbr));
            when Instruction =>
                Image (Acell.Listeinst);
            when others =>
                Text_Io.Put_Line ("");
        end case;
        if Acell.Left /= null then
            Text_Io.Put_Line ("<== Gauche.");
            Feuille.Image (Acell.Left.all);
        end if;
        if Acell.Right /= null then
            Text_Io.Put_Line ("Droite ==>");
            Feuille.Image (Acell.Right.all);
        end if;
    end Image;

    function Permute (List : in Liste_Instr.List) return Liste_Instr.List is
        Tmp_List : Liste_Instr.List;
        Iterator : Liste_Instr.Listiter;
        Tmptree : Pcell;
    begin
        Iterator := Liste_Instr.Makelistiter (List);
        while (Liste_Instr.More (Iterator)) loop
            Liste_Instr.Next (Iterator, Tmptree);
            Liste_Instr.Attach (Tmptree, Tmp_List);
        end loop;
        return Tmp_List;
    end Permute;

    function Permute (List : in Liste_Instr_Locale.List)
                     return Liste_Instr_Locale.List is
        Tmp_List : Liste_Instr_Locale.List;
        Iterator : Liste_Instr_Locale.Listiter;
        Tmplocale : Instr_Locale;
    begin
        Iterator := Liste_Instr_Locale.Makelistiter (List);
        while (Liste_Instr_Locale.More (Iterator)) loop
            Liste_Instr_Locale.Next (Iterator, Tmplocale);
            Liste_Instr_Locale.Attach (Tmplocale, Tmp_List);
        end loop;
        return Tmp_List;
    end Permute;

    procedure Image (Alist : Liste_Instr.List) is
        Tmpiter : Liste_Instr.Listiter;
        Tmptree : Pcell;
    begin
        Tmpiter := Liste_Instr.Makelistiter (Alist);
        while (Liste_Instr.More (Tmpiter)) loop
            Liste_Instr.Next (Tmpiter, Tmptree);
            Image (Tmptree.all);
        end loop;  
        Text_Io.New_Line;
    end Image;

    procedure Image (Alist : Liste_Instr_Locale.List) is
        Tmpiter : Liste_Instr_Locale.Listiter;
        Tmplocale : Instr_Locale;
    begin
        Tmpiter := Liste_Instr_Locale.Makelistiter (Alist);
        while (Liste_Instr_Locale.More (Tmpiter)) loop
            Text_Io.Put_Line
               ("Dans Piece : " &
                Bounded_String.Image
                   (Liste_Instr_Locale.Cellvalue (Tmpiter).Piece));
            Liste_Instr_Locale.Next (Tmpiter, Tmplocale);
            Image (Tmplocale.Liste);
        end loop;
    end Image;

    procedure Addleft (Pere : in out Cell; Fils : in Pcell) is
    begin
        Pere.Left := Fils;
    end Addleft;

    procedure Addright (Pere : in out Cell; Fils : in Pcell) is
    begin
        Pere.Right := Fils;
    end Addright;

    function Create (What : Tcell) return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        return Tmpcell;
    end Create;

    function Create (What : Tcell; Abool : Boolean) return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        if What = Booleen then
            Tmpcell.Bool := Abool;
        end if;
        return Tmpcell;
    end Create;

    function Create (What : Tcell; Anat : Natural) return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        if What = Entier then
            Tmpcell.Nbr := Anat;
        end if;
        return Tmpcell;
    end Create;

    function Create
                (What : Tcell; Astring : String_Table.I_String) return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        case What is
            when Chaine =>
                Bounded_String.Copy (Tmpcell.Phrase, Astring);
            when Objet =>
                Bounded_String.Copy (Tmpcell.Idattrib, Astring);
            when Direction =>
                Bounded_String.Copy (Tmpcell.Idattrib, Astring);
            when Piece_Courante =>
                Bounded_String.Copy (Tmpcell.Idattrib, Astring);
            when Personne =>
                Bounded_String.Copy (Tmpcell.Idattrib, Astring);
            when Lien =>
                Bounded_String.Copy (Tmpcell.Idattrib, Astring);
            when Verbe =>
                Bounded_String.Copy (Tmpcell.Idattrib, Astring);
            when Complement =>
                Bounded_String.Copy (Tmpcell.Idattrib, Astring);
            when Enum =>
                Bounded_String.Copy (Tmpcell.Idattrib, Astring);
            when others =>
                null;
        end case;
        return Tmpcell;
    end Create;

    function Create (What : Tcell;
                     Theiter : Struct_Component.Liste_Attribut.Listiter)
                    return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        Tmpcell.Aiter := Theiter;
        return Tmpcell;

    end Create;

    function Create (What : Tcell;
                     Theiter : Struct_Component.Liste_Structure.Listiter)
                    return Pcell is
        Tmpcell : Feuille.Pcell;
    begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        Tmpcell.Aiter_S := Theiter;
        return Tmpcell;
    end Create;

    function Create (What : Tcell; Thelist : Liste_Instr.List) return Pcell is  
        Tmpcell : Feuille.Pcell;   begin
        Tmpcell := new Feuille.Cell (What);
        Tmpcell.Left := null;
        Tmpcell.Right := null;
        Tmpcell.Listeinst := Thelist;
        return Tmpcell;
    end Create;

end Feuille;

E3 Meta Data

    nblk1=9
    nid=0
    hdr6=12
        [0x00] rec0=1b rec1=00 rec2=01 rec3=036
        [0x01] rec0=1a rec1=00 rec2=07 rec3=04c
        [0x02] rec0=1b rec1=00 rec2=09 rec3=024
        [0x03] rec0=1f rec1=00 rec2=08 rec3=03c
        [0x04] rec0=03 rec1=00 rec2=04 rec3=01a
        [0x05] rec0=21 rec1=00 rec2=06 rec3=012
        [0x06] rec0=17 rec1=00 rec2=05 rec3=014
        [0x07] rec0=21 rec1=00 rec2=02 rec3=002
        [0x08] rec0=09 rec1=00 rec2=03 rec3=000
    tail 0x2174b2ef68654777be3ed 0x42a00088462060003