DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦d2e00a68d⟧ TextFile

    Length: 3151 (0xc4f)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Scanner;
with Text_Io;
with Bounded_String;
with Object;  
with Table;
with Text_Io;
with Table;
with Object;
with Message;
use Scanner;


procedure Test_Scanner is
    The_Object : Object.Reference := Object.Void_Reference;
    Ma_Table : Table.Symbol_Kind;
    The_Token : Scanner.Token;  
    Trouve : Boolean := False;
    String_Lu : Message.Tiny_String;
begin
    Table.Initialize (Ma_Table);
    Scanner.Open ("New_File");
    while not Scanner.At_End loop
        Scanner.Next;  
        Bounded_String.Free (String_Lu);
        Text_Io.Put ("Chaine Lexeme Lu : ");  
        Text_Io.Put_Line (Bounded_String.Image (Scanner.Get_Value));
        The_Token := Scanner.Get_Token;
        case The_Token is
            when T_Identifier =>
                Text_Io.Put_Line
                   ("c'est_un identifier,je le met dans la table si je peu ");

                The_Object := Scanner.Get_Value;
                Bounded_String.Append
                   (String_Lu, Bounded_String.Image (Scanner.Get_Value));
                Table.Insert (Ma_Table, String_Lu, The_Object);
                Object.En_Texte (The_Object);
            when T_Integer =>  
                Text_Io.Put_Line ("c'est_un integer,je cree l'objet");

            when T_Dot =>  
                Text_Io.Put_Line
                   ("c'est_un point j'imprime la table des symboles");
                Table.En_Texte (Ma_Table);
                Text_Io.Put ("j'e recherche tata   ");
                Text_Io.Put (Bounded_String.Image (String_Lu));
                Bounded_String.Append (String_Lu, "tata");
                Table.Find (Ma_Table, String_Lu, The_Object, Trouve);
                if Trouve then
                    Text_Io.Put_Line ("  ===> je l'ai trouve dans la table");
                else
                    Text_Io.Put_Line ("  ===> !!! PAS  trouve dans la table");
                end if;
            when T_String =>
                Text_Io.Put_Line ("c'est une string ,je cree l'objet ");
                The_Object := Scanner.Get_Value;  
                Text_Io.Put ("ID_object:");
                Text_Io.Put_Line (Integer'Image
                                     (Object.Get_Value (The_Object)));
            when T_Pour =>
                Text_Io.Put_Line ("c'est un pour ");  
            when T_Avec =>
                Text_Io.Put_Line ("c'est un avec ");
            when T_Prendre =>  
                Text_Io.Put_Line ("c'est un prendre ");
                Text_Io.Put_Line ("!!!je detruit tata dans la table ");
                Bounded_String.Append (String_Lu, "tata");
                Table.Remove (Ma_Table, String_Lu);
            when T_Renvoyer =>
                Text_Io.Put_Line
                   ("c'est un renvoyer : je reinsere  tata dans la table pour voir");  
                Bounded_String.Append (String_Lu, "tata");
                Table.Insert (Ma_Table, String_Lu, The_Object);
            when T_Keyword =>
                Text_Io.Put_Line ("c'est un keyword ");

            when others =>
                Text_Io.Put_Line ("je ne comprend pas ");
        end case;


    end loop;











end Test_Scanner;