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

⟦8d33cbfb2⟧ Ada Source

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

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 Player_Interface, Dictionnary, Unbounded_String, Player_Error;

package body Player_Commande_Analyzer is


    package Unlimited_String is new Unbounded_String (1);

    type Word_Attributs is
        record
            Value : Unlimited_String.Variable_String;
            Kind : Word_Kinds;
        end record;
    Tab_Words : array (1 .. Player_Interface.Max_Word) of Word_Attributs;



    procedure Get_Command is
    begin
        Player_Interface.Get_Command;
    end Get_Command;


    procedure Set_Kind_Of_Words is
        use Player_Interface;  
    begin  
        for Index_Word in 1 .. Max_Word loop
            Tab_Words (Index_Word).Value :=
               Unlimited_String.Value (Player_Interface.Get_Word (Index_Word));

            if (Unlimited_String.Length (Tab_Words (Index_Word).Value) = 0) then
                Tab_Words (Index_Word).Kind := Empty;

            elsif Dictionnary.Is_Verb (Unlimited_String.Image
                                          (Tab_Words (Index_Word).Value)) then
                Tab_Words (Index_Word).Kind := Verbe;

            elsif Dictionnary.Is_Complement
                     (Unlimited_String.Image
                         (Tab_Words (Index_Word).Value)) then
                Tab_Words (Index_Word).Kind := Complement;
            else  
                Player_Error.Set_Type_Error
                   (Player_Error.Bad_Word_Kind, Index_Word);
                raise Player_Error.Excep_Raise;

            end if;
        end loop;
    end Set_Kind_Of_Words;


    function Get_Word
                (Position : Player_Interface.Word_Positions) return String is
    begin
        return Unlimited_String.Image (Tab_Words (Position).Value);
    end Get_Word;


    function Get_Word_Kind (Position : Player_Interface.Word_Positions)
                           return Word_Kinds is
    begin
        return Tab_Words (Position).Kind;
    end Get_Word_Kind;


end Player_Commande_Analyzer;

E3 Meta Data

    nblk1=4
    nid=2
    hdr6=6
        [0x00] rec0=23 rec1=00 rec2=01 rec3=00c
        [0x01] rec0=1c rec1=00 rec2=04 rec3=01a
        [0x02] rec0=04 rec1=00 rec2=03 rec3=000
        [0x03] rec0=01 rec1=00 rec2=04 rec3=000
    tail 0x2154346e88651639a2fd5 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 00 00 1c 80 10 74 65 64 5f 53 74 72 69 6e 67  ┆      ted_String┆