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

⟦28471e433⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Compiler, seg_047d5c

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 Lexical_Analyzer, Scenario, Unbounded_String, Error, Text_Io;

package body Compiler is

    package Unlimited_String is new Unbounded_String (10);


    function Get_File_Name return String is
        Name, Dir_Name : String (1 .. 100);  
        Length, Dir_Lenght : Natural;
        Dir_Fichier_Defaut_Lenght : constant Natural := 19;
    begin  
        Text_Io.Put_Line ("CHOIX DU REPERTOIRE:");
        Text_Io.Put_Line
           ("Le repertoire 'Dir_Fichier_De_Jeux' sera pris par defaut.");
        Text_Io.Put_Line
           ("Si vous desirez acceder a ce repertoire, taper simplement F8");
        Text_Io.Put_Line
           ("Si vous desiderez acceder a un autre repertoire, veuillez entrer le nouveau nom du ");
        Text_Io.Put_Line
           ("repertoire ou se trouve le fichier contenant le scenario, et valider par F8");
        Text_Io.Get_Line (Dir_Name, Dir_Lenght);

        if Dir_Lenght = 0 then  
            Dir_Lenght := Dir_Fichier_Defaut_Lenght;
            Dir_Name := ("Dir_Fichier_De_Jeux") &
                           (Dir_Fichier_Defaut_Lenght + 1 .. 100 => ' ');  
        end if;
        Text_Io.New_Line;

        Text_Io.Put_Line ("CHOIX DU FICHIER:");
        Text_Io.Put_Line
           ("Veuillez entrer le nom du fichier contenant le scenario, et valider par F8");
        Text_Io.Get_Line (Name, Length);
        Text_Io.New_Line;

        return (Dir_Name (1 .. Dir_Lenght) & '.' & Name (1 .. Length));
    end Get_File_Name;


    procedure Open_File (Name : String) is
    begin
        Lexical_Analyzer.Open (Name);  
        Lexical_Analyzer.Next;
    exception
        when Lexical_Analyzer.Excep_Eof =>
            -- si le fichier est vide
            Error.Set_Type_Error (Error.Decl_Vie_Expected);  
            Error.Treat;
            raise Error.Excep_Syntaxe_Aborded;  
    end Open_File;


    procedure Close_File is
    begin
        Lexical_Analyzer.Close;
    end Close_File;


    procedure Go (List_Init, List_Vie : in out Action_List.Object) is
        Name : Unlimited_String.Variable_String;
    begin
        Name := Unlimited_String.Value (Get_File_Name);
        Open_File (Unlimited_String.Image (Name));
        Text_Io.Put_Line
           (" Patientez S.V.P., la construction du jeu est en cours ... ");
        Text_Io.Put_Line
           ("     ------------------------------------------------------------    ");
        Text_Io.New_Line;
        Scenario.Parse (List_Init, List_Vie);
        Close_File;

    exception
        when Error.Excep_Syntaxe_Aborded =>
            Text_Io.Put_Line
               ("L'instanciation du scenario de jeu a echoue pour cause d'erreurs.");
            Text_Io.Put_Line
               (" Patientez S.V.P., je construis le fichier d'erreurs ");
            Error.Make_Error_File (Unlimited_String.Image (Name));  
            Text_Io.New_Line;
            Text_Io.Put_Line (" Veuillez consulter le fichier " &  
                              (Unlimited_String.Image (Name)) &
                              "_error pour corriger les erreurs.");
            raise Failed;

        when Lexical_Analyzer.File_Does_Not_Exist =>  
            Text_Io.New_Line;
            Text_Io.Put_Line ("Le fichier " & Unlimited_String.Image (Name) &
                              " n'existe pas");  
            raise Failed;

    end Go;
end Compiler;

E3 Meta Data

    nblk1=5
    nid=2
    hdr6=8
        [0x00] rec0=1a rec1=00 rec2=01 rec3=044
        [0x01] rec0=1f rec1=00 rec2=04 rec3=030
        [0x02] rec0=19 rec1=00 rec2=05 rec3=02a
        [0x03] rec0=0d rec1=00 rec2=03 rec3=000
        [0x04] rec0=80 rec1=00 rec2=00 rec3=100
    tail 0x21544ded4865759bc6a3f 0x42a00088462060003
Free Block Chain:
  0x2: 0000  00 00 00 19 80 07 20 20 62 65 67 69 6e 07 00 0c  ┆        begin   ┆