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

⟦918c4bcfe⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Dictionnary, seg_03fdc0

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Generic_Binary_Tree, Unbounded_String;


package body Dictionnary is

    package Unlimited_String is new Unbounded_String (10);

    function "<" (C1, C2 : Unlimited_String.Variable_String) return Boolean;
    function Are_Equal
                (C1, C2 : Unlimited_String.Variable_String) return Boolean;

    package Word_Tree is
       new Generic_Binary_Tree
              (Unlimited_String.Variable_String, "<", Are_Equal);

    Verbs_Dictionnary : Word_Tree.Object;
    Complements_Dictionnary : Word_Tree.Object;

    Storage_Kind : Kind_Of_Storage;

    function "<" (C1, C2 : Unlimited_String.Variable_String) return Boolean is
    begin
        return (Unlimited_String.Image (C1) < Unlimited_String.Image (C2));
    end "<";

    function Are_Equal
                (C1, C2 : Unlimited_String.Variable_String) return Boolean is
    begin
        return (Unlimited_String.Image (C1) = Unlimited_String.Image (C2));
    end Are_Equal;

    procedure Set_Kind_Of_Storage (Kind : Kind_Of_Storage) is
    begin
        Storage_Kind := Kind;
    end Set_Kind_Of_Storage;

    procedure Insert (S : String) is
    begin
        case Storage_Kind is
            when Verb =>
                Word_Tree.Insert (Verbs_Dictionnary,
                                  Unlimited_String.Value (S));  
            when Complement =>
                Word_Tree.Insert (Complements_Dictionnary,
                                  Unlimited_String.Value (S));  
        end case;
    end Insert;

    function Is_Verb (S : String) return Boolean is
    begin
        return Word_Tree.Exists (Verbs_Dictionnary, Unlimited_String.Value (S));
    end Is_Verb;

    function Is_Complement (S : String) return Boolean is
    begin  
        return Word_Tree.Exists (Complements_Dictionnary,
                                 Unlimited_String.Value (S));
    end Is_Complement;

end Dictionnary;

E3 Meta Data

    nblk1=4
    nid=2
    hdr6=4
        [0x00] rec0=21 rec1=00 rec2=01 rec3=006
        [0x01] rec0=1d rec1=00 rec2=03 rec3=000
        [0x02] rec0=05 rec1=00 rec2=02 rec3=000
        [0x03] rec0=03 rec1=6e rec2=d1 rec3=742
    tail 0x21539f398860c55caf7d7 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 04 00 03 00 00 00 01 00 00 00 00 00 00 00 00  ┆                ┆
  0x4: 0000  00 00 01 39 80 1f 20 43 6f 6d 6d 6f 6e 2e 57 6f  ┆   9   Common.Wo┆