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

⟦901e3db85⟧ Ada Source

    Length: 15360 (0x3c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Main_Syntaxe, seg_0485dd

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 Text_Io;
with Lexical;  
with File;  
with Syntax_Error;
with Compiler_Token;
use Compiler_Token;

with Le_Jeu;

with Personnages;
with Rooms;  
with Items;
with Complements;
with Counters;
with Tests;

procedure Main_Syntaxe is
    C : Character;
    The_File : Text_Io.File_Type;
    Un_Test : Tests.Type_Test;
    Un_Effet : Tests.Type_Effect;

begin
    Text_Io.Open (The_File, Text_Io.In_File, "Scenario_test");
    Text_Io.Put_Line ("-- Execution --");
    Lexical.Open (The_File);
    Lexical.Create_Error_Report;
    --  B2:
    --   loop
    --       if Lexical.At_End then
    --           exit B2;
    --       end if;
    --       Lexical.Next;

    --        Text_Io.Put_Line (Lexical.Get_Value & "      " &
    --Token'Image (Lexical.Get_Token);
    --    end loop B2;
    Le_Jeu.Parse;
    if Personnages.Exists ("Spock") then
        Text_Io.Put_Line ("Spock existe");
        Text_Io.Put_Line ("Son commentaire est: " &
                          Personnages.Get_Comment ("Spock"));
    else
        Text_Io.Put_Line ("********** Pas Spock ************");
    end if;

    if Complements.Exists ("Debut") and
       Complements."=" (Complements.Kind_Of ("Debut"), Complements.Room) then
        Text_Io.Put_Line ("Debut est bien un complement, et c'est une piece");
    else
        Text_Io.Put_Line ("********** Probleme Complements *****************");
    end if;

    Rooms.Set_Current_Room ("Debut");
    Rooms.First_Communication;  
    if not Rooms.At_End_Communication then
        Text_Io.Put_Line ("On n'est pas a la fin des acces");
        Text_Io.Put_Line ("Nom du premier acces a Debut: " &
                          Rooms.Get_Communication_Way);
        Text_Io.Put_Line ("Destination du premier acces a Debut: " &
                          Rooms.Get_Communication_Destination);
        Text_Io.Put_Line ("Commentaire du premier acces a Debut: " &
                          Rooms.Get_Communication_Comment);
        if Rooms."=" (Rooms.Unlock, Rooms.Get_Communication_Mode) then
            Text_Io.Put_Line ("C'est ouvert");
        end if;
        if Rooms."=" (Rooms.Lock, Rooms.Get_Communication_Mode) then
            Text_Io.Put_Line ("C'est ferme");
        end if;  
        if Rooms."=" (Rooms.Visible, Rooms.Get_Communication_Visibility) then
            Text_Io.Put_Line ("C'est visible");
        end if;
        if Rooms."=" (Rooms.Unvisible, Rooms.Get_Communication_Visibility) then
            Text_Io.Put_Line ("C'est invisible");
        end if;  
    else
        Text_Io.Put_Line ("On est a la fin des acces");
    end if;

    Rooms.Next_Communication;

    if not Rooms.At_End_Communication then
        Text_Io.Put_Line ("On n'est pas a la fin des acces");
        Text_Io.Put_Line ("Nom du deuxieme acces a Debut: " &
                          Rooms.Get_Communication_Way);
        Text_Io.Put_Line ("Destination du deuxieme acces a Debut: " &
                          Rooms.Get_Communication_Destination);
        Text_Io.Put_Line ("Commentaire du deuxieme acces a Debut: " &
                          Rooms.Get_Communication_Comment);
        if Rooms."=" (Rooms.Unlock, Rooms.Get_Communication_Mode) then
            Text_Io.Put_Line ("C'est ouvert");
        end if;
        if Rooms."=" (Rooms.Lock, Rooms.Get_Communication_Mode) then
            Text_Io.Put_Line ("C'est ferme");
        end if;
        if Rooms."=" (Rooms.Visible, Rooms.Get_Communication_Visibility) then
            Text_Io.Put_Line ("C'est visible");
        end if;
        if Rooms."=" (Rooms.Unvisible, Rooms.Get_Communication_Visibility) then
            Text_Io.Put_Line ("C'est invisible");
        end if;  
    else
        Text_Io.Put_Line ("On est a la fin des acces");
    end if;

    Text_Io.Put_Line ("Commentaire de Levier_Generateurs: " &
                      Items.Get_Comment ("Levier_Generateurs"));
    Text_Io.Put_Line ("Commentaire de Lampe_De_Poche: " &
                      Items.Get_Comment ("Lampe_De_Poche"));
    Text_Io.Put_Line ("Commentaire de Oeuf: " & Items.Get_Comment ("Oeuf"));

    if Rooms.In_State ("Generateurs_Electriques", "Eclairee") then
        Text_Io.Put_Line ("Generateurs_Electriques est Eclairee");
    else
        Text_Io.Put_Line ("Generateurs_Electriques n'est PAS Eclairee");
    end if;
    if Rooms.In_State ("Controle_Teleporteur", "eClairee") then
        Text_Io.Put_Line ("Controle_Teleporteur est eclairee");
    else
        Text_Io.Put_Line ("Controle_Teleporteur n'est PAS eclairee");
    end if;
    if Personnages.In_State ("Spock", "En_Pesanteur") then
        Text_Io.Put_Line ("Spock est en pesanteur");
    else
        Text_Io.Put_Line ("Spock n'est pas en pesanteur");
    end if;
    if Items.In_State ("Oeuf", "Endormi") then
        Text_Io.Put_Line ("L'oeuf est Endormi");
    else
        Text_Io.Put_Line ("L'oeuf n'est pas Endormi");
    end if;
    if Items.In_State ("Oeuf", "Inquietant") then
        Text_Io.Put_Line ("L'oeuf est Inquietant");
    else
        Text_Io.Put_Line ("L'oeuf n'est pas Inquietant");
    end if;
    if Items.In_State ("Oeuf", "Craquele") then
        Text_Io.Put_Line ("L'oeuf est Craquele");
    else
        Text_Io.Put_Line ("L'oeuf n'est pas Craquele");
    end if;
    if Items.In_State ("Oeuf", "Rose") then
        Text_Io.Put_Line ("L'oeuf est Rose");
    else
        Text_Io.Put_Line ("L'oeuf n'est pas Rose");
    end if;

    if Items.Exists ("Oeuf") then
        Text_Io.Put_Line ("L'oeuf existe");
    else
        Text_Io.Put_Line ("L'oeuf n'existe pas");
    end if;
    Text_Io.Put_Line ("Sa position est: " & Items.Get_Position ("Oeuf"));

    if Counters.Exists ("Pile_Lampe") then
        Text_Io.Put_Line ("Pile_Lampe existe, sa valeur est: " &
                          Integer'Image (Counters.Get_Value ("Pile_Lampe")));
    end if;
    if Counters.Exists ("Reveille_Oeuf") then
        Text_Io.Put_Line ("Reveille_Oeuf existe, sa valeur est: " &
                          Integer'Image (Counters.Get_Value ("Reveille_Oeuf")));
    end if;

    Tests.Beginner;
    while not Tests.At_End loop
        Text_Io.Put_Line ("");
        Text_Io.Put_Line ("Les tests ....................");
        Tests.First_Test;
        while not Tests.At_End_Sup loop
            Text_Io.Put_Line ("");
            Un_Test := Tests.Get_Test;  
            case Un_Test.Kind is
                when Tests.Is_A_Verb =>
                    Text_Io.Put_Line ("Kind: Is_A_Verb");
                when Tests.Is_A_Complement =>
                    Text_Io.Put_Line ("Kind: Is_A_Complement");
                when Tests.Is_In_State =>
                    Text_Io.Put_Line ("Kind: Is_In_State");
                when Tests.Is_Equal =>
                    Text_Io.Put_Line ("Kind: Is_Equal");
                when Tests.Is_Greater =>
                    Text_Io.Put_Line ("Kind: Is_Greater");
                when Tests.Is_Less =>
                    Text_Io.Put_Line ("Kind: Is_Less");
                when Tests.Is_In_Position =>
                    Text_Io.Put_Line ("Kind: Is_In_Position");
                when Tests.Always =>
                    Text_Io.Put_Line ("Kind: Always");
            end case;
            Text_Io.Put_Line ("Name: " & Tests.Identifier.Image (Un_Test.Name));
            Text_Io.Put_Line ("State: " &
                              Tests.Identifier.Image (Un_Test.State));
            Text_Io.Put_Line ("Value: " & Integer'Image (Un_Test.Value));
            Tests.Test_Sup;
        end loop;

        Tests.First_Effect;  
        Text_Io.Put_Line ("");
        Text_Io.Put_Line ("Les effets ....................");
        while not Tests.At_End_Effect loop
            Text_Io.Put_Line ("");
            Un_Effet := Tests.Get_Effect;
            case Un_Effet.Kind is
                when Tests.Increase =>
                    Text_Io.Put_Line ("Kind: Increase");
                when Tests.Decrease =>
                    Text_Io.Put_Line ("Kind: Decrease");
                when Tests.Value =>
                    Text_Io.Put_Line ("Kind: Value");
                when Tests.Print =>
                    Text_Io.Put_Line ("Kind: Print");
                when Tests.Comment =>
                    Text_Io.Put_Line ("Kind: Comment");
                when Tests.Game_Over =>
                    Text_Io.Put_Line ("Kind: Game_Over");
                when Tests.Change =>
                    Text_Io.Put_Line ("Kind: Change");
                when Tests.Position =>
                    Text_Io.Put_Line ("Kind: Position");
            end case;
            Text_Io.Put_Line ("Name: " &
                              Tests.Identifier.Image (Un_Effet.Name));
            Text_Io.Put_Line ("State: " &
                              Tests.Identifier.Image (Un_Effet.State));
            Text_Io.Put_Line ("Other_State: " &
                              Tests.Identifier.Image (Un_Effet.Other_State));
            Text_Io.Put_Line ("Position: " &
                              Tests.Identifier.Image (Un_Effet.Position));
            Text_Io.Put_Line ("Value: " & Integer'Image (Un_Effet.Value));
            Tests.Next_Effect;
        end loop;
        Tests.Next;
    end loop;



    Text_Io.Put_Line ("Erreurs syntaxiques survenues: " &
                      Integer'Image (Syntax_Error.Nb_Erreurs_Syntaxiques));
    Text_Io.Put_Line ("Erreurs semantiques survenues: " &
                      Integer'Image (Syntax_Error.Nb_Erreurs_Semantiques));

    Text_Io.Close (The_File);
    File.Close_Error_Report;
    Text_Io.Put_Line (Ascii.Lf & "-- Fin d'execution --");  
end Main_Syntaxe;


E3 Meta Data

    nblk1=e
    nid=a
    hdr6=1a
        [0x00] rec0=2a rec1=00 rec2=01 rec3=058
        [0x01] rec0=02 rec1=00 rec2=04 rec3=010
        [0x02] rec0=15 rec1=00 rec2=08 rec3=05c
        [0x03] rec0=17 rec1=00 rec2=03 rec3=074
        [0x04] rec0=16 rec1=00 rec2=02 rec3=026
        [0x05] rec0=0b rec1=00 rec2=05 rec3=058
        [0x06] rec0=1d rec1=00 rec2=06 rec3=006
        [0x07] rec0=19 rec1=00 rec2=07 rec3=01e
        [0x08] rec0=13 rec1=00 rec2=0c rec3=024
        [0x09] rec0=02 rec1=00 rec2=0b rec3=010
        [0x0a] rec0=17 rec1=00 rec2=0e rec3=036
        [0x0b] rec0=16 rec1=00 rec2=09 rec3=072
        [0x0c] rec0=07 rec1=00 rec2=0d rec3=000
        [0x0d] rec0=c0 rec1=00 rec2=00 rec3=002
    tail 0x2154597ca86597101d9f2 0x42a00088462060003
Free Block Chain:
  0xa: 0000  00 00 03 fc 80 12 5f 49 6f 2e 50 75 74 5f 4c 69  ┆      _Io.Put_Li┆