|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 7168 (0x1c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Compiler, seg_048cfd
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
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 := 0; 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:"); while Length = 0 loop 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; end loop; 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); Text_Io.New_Line; Close_File; exception when Error.Excep_Syntaxe_Aborded => Text_Io.New_Line; 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;
nblk1=6 nid=3 hdr6=8 [0x00] rec0=1a rec1=00 rec2=01 rec3=03a [0x01] rec0=1c rec1=00 rec2=06 rec3=000 [0x02] rec0=1c rec1=00 rec2=02 rec3=08a [0x03] rec0=10 rec1=00 rec2=05 rec3=000 [0x04] rec0=0d rec1=00 rec2=03 rec3=000 [0x05] rec0=43 rec1=2b rec2=a6 rec3=023 tail 0x215463798865a981d4f00 0x42a00088462060003 Free Block Chain: 0x3: 0000 00 04 01 f5 80 2e 75 74 5f 4c 69 6e 65 20 28 22 ┆ .ut_Line ("┆ 0x4: 0000 00 00 00 38 80 0e 20 43 6c 6f 73 65 5f 46 69 6c ┆ 8 Close_Fil┆