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

⟦c302cfdb9⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Scanner, seg_032353

Derivation

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

E3 Meta Data

    nblk1=6
    nid=2
    hdr6=8
        [0x00] rec0=23 rec1=00 rec2=01 rec3=04a
        [0x01] rec0=12 rec1=00 rec2=04 rec3=050
        [0x02] rec0=14 rec1=00 rec2=05 rec3=01a
        [0x03] rec0=17 rec1=00 rec2=03 rec3=000
        [0x04] rec0=17 rec1=00 rec2=03 rec3=000
        [0x05] rec0=17 rec1=00 rec2=03 rec3=000
    tail 0x2172d207c84c482e33025 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 06 00 0f 80 0c 50 75 74 5f 4c 69 6e 65 20 28  ┆      Put_Line (┆
  0x6: 0000  00 00 00 6a 80 25 20 3d 3d 3d 3e 20 6a 65 20 6c  ┆   j % ===> je l┆