DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 3185 (0xc71) Types: TextFile Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11 └─ ⟦129cab021⟧ »DATA« └─⟦this⟧
with Text_Io; with Lexical; use Lexical; package body Error is type The_Follow is array (Positive range <>) of Lexical.Token; Follow_Of_Show : constant The_Follow := (1 => L_Eof); Follow_Of_Bloc_Materiel : constant The_Follow := (1 => L_Implantation); Follow_Of_Corps_Materiel : constant The_Follow := (1 => L_Fin); procedure Handle (Message : in String; Internal : in Boolean) is begin if Internal then Text_Io.Put_Line ("Erreur : " & Message); else Text_Io.Put_Line ("Erreur : " & Message & " en " & Integer'Image (Lexical.Line_Number) & Integer'Image (Lexical.Column_Number)); end if; end Handle; function Is_In_Table (The_Token : in Lexical.Token; Item : Grammar) return Boolean is In_Table : Boolean := False; begin case Item is when Show => for I in Follow_Of_Show'Range loop if Follow_Of_Show (I) = The_Token then In_Table := True; exit; end if; end loop; return In_Table; when Bloc_Materiel => for I in Follow_Of_Bloc_Materiel'Range loop if Follow_Of_Bloc_Materiel (I) = The_Token then In_Table := True; exit; end if; end loop; return In_Table; when Corps_Materiel => for I in Follow_Of_Corps_Materiel'Range loop if Follow_Of_Corps_Materiel (I) = The_Token then In_Table := True; exit; end if; end loop; return In_Table; when others => null; end case; end Is_In_Table; procedure Handle (Message : in String; Item : in Grammar) is begin Error.Handle (Message, External); case Item is when Show => while not Is_In_Table (Lexical.Get, Show) loop Lexical.Next; end loop; when Bloc_Materiel => while not Is_In_Table (Lexical.Get, Bloc_Materiel) loop Lexical.Next; end loop; when Corps_Materiel => while not Is_In_Table (Lexical.Get, Corps_Materiel) loop Lexical.Next; end loop; when others => null; end case; end Handle; procedure Handle (Anerrorclass : in Collection) is begin case Anerrorclass is when Divide_By_Zero => Text_Io.Put_Line ("Erreur : Division par " & "zero."); when Negativ_Number => Text_Io.Put_Line ("Erreur : Parametre negatif."); when Bitbus_Error => Text_Io.Put_Line ("Erreur : Adresse > 99 ou " & " Parametres > 9999 , trame Bitbus incorrecte."); end case; end Handle; end Error;