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

⟦22b926843⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Player_Dictionary, seg_049208, seg_049250, seg_04943f

Derivation

└─⟦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⟧ 

E3 Source Code



with Text_Io;

package body Player_Dictionary is

    -- Enumeres utilises pour la verification de la syntaxe de l'instruction.

    type Kind_Of_Typ is (Communication, Compteur, Lieu, Objet, Personnage,
                         Verbe, Preposition, Sans_Type, No_More,
                         Preposition_Ou_Complement, Complement);


------------------------------------------------------------------------------

    function Player_Sens (A_Word_Of_The_Command : Mots.Word; Pos : Natural)
                         return Boolean is
    begin
        if Pos = 2 then
            return True;
        else
            return not (Sans_Type =

                        Kind_Of_Typ'Val (Interface_Structure.Type_Of_Var'Pos
                                            (Interface_Structure.Get_Type
                                                (A_Word_Of_The_Command))));
        end if;
    exception
        when others =>
            Text_Io.Put_Line ("erreur player_sens);");
    end Player_Sens;

------------------------------------------------------------------------------

    function Player_Syntax (Player_Table_Of_Word : in Mots.T_Tab_Commande;
                            Number : Natural) return Boolean is

        Next_Command : Kind_Of_Typ := Sans_Type;
        Ok : Boolean := False;

        function Equal (A, B : Kind_Of_Typ) return Boolean is
        begin
            return (A = B);
        end Equal;

    begin
        for Row_Syntax in 1 .. Number loop
            Ok := False;

            case Kind_Of_Typ'Val
                    (Interface_Structure.Type_Of_Var'Pos
                        (Interface_Structure.Get_Type
                            (Player_Table_Of_Word (Row_Syntax)))) is
                when Verbe =>  
                    if ((Row_Syntax = 1) and then
                        Equal (Next_Command, Sans_Type)) then
                        Ok := True;
                        Next_Command := Complement;
                    else
                        Ok := False;
                        exit;
                    end if;  
                when Preposition =>  
                    if ((Row_Syntax = 3) and then
                        Equal (Next_Command, Preposition_Ou_Complement)) then
                        Ok := True;
                        Next_Command := Complement;
                    else
                        Ok := False;
                        exit;
                    end if;
                when Communication | Compteur | Lieu | Objet | Personnage =>
                    if ((Row_Syntax = 2) and then
                        Equal (Next_Command, Complement)) then
                        Ok := True;  
                        Next_Command := Preposition_Ou_Complement;
                    elsif ((Row_Syntax = 3) and then
                           Equal (Next_Command, Preposition_Ou_Complement)) then
                        Ok := True;
                        if (Preposition =

                            Kind_Of_Typ'Val (Interface_Structure.Type_Of_Var'Pos
                                                (Interface_Structure.Get_Type
                                                    (Player_Table_Of_Word
                                                        (Row_Syntax))))) then
                            Next_Command := Complement;
                        else
                            Next_Command := No_More;
                        end if;
                    elsif ((Row_Syntax = 4) and then
                           Equal (Next_Command, Complement)) then
                        Ok := True;
                        Next_Command := No_More;
                    else
                        Ok := False;
                        exit;
                    end if;
                when others =>
                    if ((Row_Syntax = 2) and then
                        Equal (Next_Command, Complement)) then
                        Ok := True;
                        Next_Command := No_More;
                    else
                        Ok := False;
                        exit;
                    end if;
            end case;
        end loop;
        return Ok;
    end Player_Syntax;

------------------------------------------------------------------------------

end Player_Dictionary;

E3 Meta Data

    nblk1=7
    nid=3
    hdr6=c
        [0x00] rec0=1d rec1=00 rec2=01 rec3=048
        [0x01] rec0=1c rec1=00 rec2=05 rec3=02e
        [0x02] rec0=03 rec1=00 rec2=06 rec3=02c
        [0x03] rec0=15 rec1=00 rec2=07 rec3=06e
        [0x04] rec0=14 rec1=00 rec2=02 rec3=05e
        [0x05] rec0=0d rec1=00 rec2=04 rec3=000
        [0x06] rec0=0d rec1=00 rec2=04 rec3=000
    tail 0x2154679ee865b4c6e498f 0x42a00088462060003
Free Block Chain:
  0x3: 0000  00 00 00 fd 80 18 74 72 75 63 74 75 72 65 2e 54  ┆      tructure.T┆