|
|
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 - metrics - download
Length: 21504 (0x5400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Error, seg_04af0f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Lex, Moving_String;
use Moving_String;
package body Error is
subtype Keyword_Token is Token range Entier .. Fin;
Last_Error_Line : Natural := 0;
use Lex.Visible;
procedure Position_Error2 is
begin
Lex.Write_Error_File ("*** Erreur a la ligne " &
Integer'Image (Lex.Get_Line) & ", colonne " &
Integer'Image (Lex.Get_Column) & " ***");
end Position_Error2;
procedure Position_Error is
Position : Positive := Lex.Get_Column;
Adjust : Moving_String.Object;
begin
while Position /= 1 loop
Position := Position - 1;
Adjust := Adjust & " ";
end loop;
Lex.Write_Error_File (Moving_String.Image (Adjust & "^"));
end Position_Error;
procedure Delimitor is
begin
Lex.Write_Error_File
("----------------------------------------------------------------------------------");
end Delimitor;
use Lex.Visible;
procedure Test_If_Keyword is
begin
if Lex.Get_Token in Keyword_Token then
Lex.Write_Error_File (Token'Image (Lex.Get_Token) &
" est un mot reserve !");
end if;
end Test_If_Keyword;
use Lex.Visible;
procedure Syn (An_Error : in Syn_Error; Follow : Token_To_Boolean_Array) is
begin
if Lex.Get_Line /= Last_Error_Line or An_Error = Jeu_Aventure then
Position_Error;
Delimitor;
case An_Error is
when Wrong_Sentence =>
Lex.Write_Error_File
("Il manque des guillemets en fin de phrase.");
when Sentence =>
Lex.Write_Error_File
("Il manque une chaine a cet endroit.");
when Closing_Bracket =>
Lex.Write_Error_File ("Parenthese fermante omise.");
Test_If_Keyword;
when Equal =>
Lex.Write_Error_File ("Symbole '=' manquant.");
Test_If_Keyword;
when Substract =>
Lex.Write_Error_File ("Symbole '-' manquant.");
Test_If_Keyword;
when Colon =>
Lex.Write_Error_File ("Symbole ':' manquant.");
Test_If_Keyword;
when Diese =>
Lex.Write_Error_File ("Symbole ':' manquant.");
Test_If_Keyword;
when Number =>
Lex.Write_Error_File
("Il faut imperativement une valeur entiere.");
Test_If_Keyword;
when Id =>
Lex.Write_Error_File
("Il faut imperativement un identificateur a cette position.");
Test_If_Keyword;
when Type_Base =>
Lex.Write_Error_File ("Ce n'est pas un type de base. ");
Lex.Write_Error_File
("Types autorises : 'ENTIER', 'CHAINE', enumere.");
Test_If_Keyword;
when Type_Structure =>
Lex.Write_Error_File ("Ce n'est pas un type de stucture. ");
Lex.Write_Error_File
("types possibles: 'ENTITE', 'LIEU', 'ANIME', nom de structure.");
Test_If_Keyword;
when Valeur =>
Lex.Write_Error_File ("Ce n'est pas une valeur.");
Lex.Write_Error_File
("Exemples de valeurs: 10, 100, R2D2, Casimir_1er, ""Hello"".");
Test_If_Keyword;
when Chaine =>
Lex.Write_Error_File
("Seule une chaine peut suivre un '&' dans ce cas. ");
Test_If_Keyword;
when Facteur =>
Lex.Write_Error_File
("Un facteur commence par une '(', un nombre, ou un identificateur.");
Test_If_Keyword;
when Single_Objet =>
Lex.Write_Error_File
("Un objet commence par 'HEROS', 'LIEU', ou un identificateur.");
Test_If_Keyword;
when Tests =>
Lex.Write_Error_File
("Vous avez oubliez le mot-cle 'EXISTE' ou un symbole de comparaison.");
Lex.Write_Error_File
("Les symboles de comparaison possibles sont '=', '<>', '<', '>', '<=', '>='.");
Test_If_Keyword;
when Suite_Condition_Forte =>
Lex.Write_Error_File
("Vous devez continuer avec 'DE', 'PAS', 'DANS' ou 'EXISTE'.");
Test_If_Keyword;
when Condition_Forte =>
Lex.Write_Error_File
("Une condition commence par un identificateur, un nombre, ou l'un des mots-cle suivants:");
Lex.Write_Error_File ("'HEROS', 'LIEU', 'RENCONTRE'.");
Test_If_Keyword;
when Change =>
Lex.Write_Error_File
("Change peut etre suivi d'un identificateur, de 'HEROS' ou de 'LIEU'");
Test_If_Keyword;
when Quoi_Afficher =>
Lex.Write_Error_File
("Vous pouvez afficher un nombre, une chaine ou un identificateur.");
Lex.Write_Error_File
("Ou utiliser l'un des mots-cle suivants: 'ISSUE', 'ISSUES' ou 'CONTENU');");
Test_If_Keyword;
when Jeu_Aventure =>
Lex.Write_Error_File (Token'Image (Lex.Get_Token) &
" mal place ou en trop.");
when Too_Many_Complements =>
Lex.Write_Error_File
("L'ordre contient plus de quatre complements.");
when Identifier_Place =>
Lex.Write_Error_File
("Il faut imperativement un identificateur ou le mot-cle lieu.");
Test_If_Keyword;
when Instruction =>
Lex.Write_Error_File
("Il faut imperativement une instruction.");
Test_If_Keyword;
when others =>
Lex.Write_Error_File ("Le mot-cle '" &
Visible.Syn_Error'Image (An_Error) &
"' doit figurer a cette position.");
end case;
Delimitor;
Last_Error_Line := Lex.Get_Line;
if not (Lex.Get_Token = End_Of_Text) then
loop
Lex.Next;
exit when Lex.Get_Token = End_Of_Text or else
Follow (Lex.Get_Token);
end loop;
end if;
end if;
end Syn;
procedure Sem (An_Error : in Sem_Error; False_Part : in String) is
begin
if Lex.Get_Line /= Last_Error_Line then
Delimitor;
case An_Error is
when Identifier_Belong_List =>
Lex.Write_Error_File
("Vous avez declare l'identificateur " & False_Part &
" a plusieurs reprises dans la meme liste.");
when Message =>
Lex.Write_Error_File ("Le message d'erreur " &
False_Part & " existe deja !");
when Enumere =>
Lex.Write_Error_File ("Le litteral enumere '" & False_Part &
"' n'a pu etre stocke !");
when Special_In_Normal =>
Lex.Write_Error_File
("Le litteral '" & False_Part &
" appartient deja au type le lien NORMAL !");
when Subject_Exist_In_Group =>
Lex.Write_Error_File
("Attention, le complement '" & False_Part &
" est nomme plusieurs fois dans ce groupe !");
when Structure_Not_Exist =>
Lex.Write_Error_File
("Attention, la structure '" & False_Part &
"' n'a pas ete declaree precedemment!");
when Complement_Exist =>
Lex.Write_Error_File ("Attention, le complement " &
False_Part & " existe deja !");
when Complement_Not_Exist =>
Lex.Write_Error_File ("Attention, le complement " &
False_Part & " n'existe pas !");
when Complement_Not_A_Word =>
Lex.Write_Error_File ("Attention, le complement " &
False_Part & " n'est pas un mot !");
when Complement_Not_A_Place =>
Lex.Write_Error_File ("Attention, le complement " &
False_Part & " n'est pas un lieu !");
when Complement_Not_An_Animate =>
Lex.Write_Error_File ("Attention, le complement " &
False_Part & " n'est pas un anime !");
when Complement_Not_An_Entity =>
Lex.Write_Error_File
("Attention, le complement " &
False_Part & " n'est pas une entite !");
when Complement_Not_Entity_Or_Animate =>
Lex.Write_Error_File
("Attention, le complement " & False_Part &
" n'est pas ni une entite, ni un anime !");
when Field_Exist =>
Lex.Write_Error_File ("Attention, le champ " &
False_Part & " existe deja !");
when Field_Not_Exist =>
Lex.Write_Error_File ("Attention, le champ " &
False_Part & " n'existe pas !");
when Field_Not_Belong =>
Lex.Write_Error_File
("Attention, le champ " & False_Part &
" n'a pas ete defini pour ce complement !");
when Field_Not_A_Number =>
Lex.Write_Error_File ("Attention, le champ " & False_Part &
" n'est pas un nombre !");
when Field_Not_A_Sentence =>
Lex.Write_Error_File ("Attention, le champ " & False_Part &
" n'est pas une chaine !");
when Field_Not_An_Enumerate =>
Lex.Write_Error_File ("Attention, le champ " & False_Part &
" n'est pas un enumere !");
when Literal_Exist =>
null;
Lex.Write_Error_File ("Attention, le literal " &
False_Part & " existe deja !");
when Literal_Not_Exist =>
Lex.Write_Error_File ("Attention, le literal " &
False_Part & " n'existe pas !");
when Word_Exist =>
Lex.Write_Error_File ("Attention, le mot " &
False_Part & " existe deja !");
when Verb_Exist =>
Lex.Write_Error_File ("Attention, le verb " &
False_Part & " existe deja !");
when Group_Is_Complement =>
Lex.Write_Error_File
("Attention, vous ne pouvez declarer ce groupe car l'identificateur " &
False_Part & " est deja utilise pour un complement !");
when Enumeration_Exist =>
Lex.Write_Error_File ("Attention, le type enumere " &
False_Part & " existe deja !");
when Enumeration_Not_Exist =>
Lex.Write_Error_File ("Attention, le type enumere " &
False_Part & " n'existe pas !");
when Group_Exist =>
Lex.Write_Error_File ("Attention, le groupe " &
False_Part & " est redeclare !");
when Neither_A_Subject_Nor_A_Group =>
Lex.Write_Error_File
("Attention, l'identificateur " & False_Part &
" n'est ni un sujet, ni un groupe !");
when Neither_A_Complement_Nor_A_Group =>
Lex.Write_Error_File
("Attention, l'identificateur " & False_Part &
" n'est ni un complement, ni un groupe !");
when Neither_An_Entity_Nor_An_Animate =>
Lex.Write_Error_File
("Attention, l'identificateur " & False_Part &
" n'est ni une entite, ni un anime !");
when Neither_A_Place_Nor_A_Group =>
Lex.Write_Error_File
("Attention, l'identificateur " & False_Part &
" n'est ni un lieu, ni un groupe !");
when Neither_A_Field_Nor_A_Group =>
Lex.Write_Error_File
("Attention, l'identificateur " & False_Part &
" n'est ni un champ, ni un groupe !");
when Number_Of_Repeat_Null =>
Lex.Write_Error_File
("Attention, le nombre de repetition est nul !");
when Expression_Not_Same_Type =>
Lex.Write_Error_File
("Attention, l'expression contient des nombres et des enumeres !");
when Number_Of_Actions_Null =>
Lex.Write_Error_File
("Attention, l'expression contient des nombres et des enumeres !");
when An_Exit =>
Lex.Write_Error_File ("Attention, la sortie " & False_Part &
" de ce lieu est deja utilisee !");
when Field_Belong =>
Lex.Write_Error_File ("Attention, le champ " &
False_Part & " existe deja !");
when Order_Exist =>
Lex.Write_Error_File ("Attention, l'ordre " & False_Part &
" est defini deux fois!");
when Order_List_Group_Failure =>
Lex.Write_Error_File
("Attention, les ordres ne contienent pas tous les memes complements !");
when Animate_Has_A_Trip =>
Lex.Write_Error_File ("Attention, l'anime " & False_Part &
" a deja un itineraire !");
when Complement_Has_A_Group =>
Lex.Write_Error_File ("Attention, le complement " &
False_Part & " a deja un groupe !");
when Wrong_Compare_Symbol =>
Lex.Write_Error_File
("Attention, vous ne pouvez pas faire de test " &
False_Part & " sur un enumere !");
end case;
Delimitor;
Last_Error_Line := Lex.Get_Line;
end if;
end Sem;
end Error;
nblk1=14
nid=0
hdr6=28
[0x00] rec0=26 rec1=00 rec2=01 rec3=070
[0x01] rec0=1d rec1=00 rec2=11 rec3=022
[0x02] rec0=14 rec1=00 rec2=10 rec3=090
[0x03] rec0=03 rec1=00 rec2=12 rec3=06a
[0x04] rec0=14 rec1=00 rec2=0f rec3=030
[0x05] rec0=0f rec1=00 rec2=0e rec3=00a
[0x06] rec0=10 rec1=00 rec2=0d rec3=048
[0x07] rec0=14 rec1=00 rec2=04 rec3=000
[0x08] rec0=16 rec1=00 rec2=05 rec3=02a
[0x09] rec0=14 rec1=00 rec2=07 rec3=01c
[0x0a] rec0=10 rec1=00 rec2=08 rec3=062
[0x0b] rec0=11 rec1=00 rec2=09 rec3=03e
[0x0c] rec0=12 rec1=00 rec2=03 rec3=00e
[0x0d] rec0=01 rec1=00 rec2=13 rec3=034
[0x0e] rec0=11 rec1=00 rec2=0a rec3=026
[0x0f] rec0=12 rec1=00 rec2=06 rec3=04a
[0x10] rec0=00 rec1=00 rec2=14 rec3=00a
[0x11] rec0=11 rec1=00 rec2=0b rec3=09e
[0x12] rec0=10 rec1=00 rec2=0c rec3=04a
[0x13] rec0=0f rec1=00 rec2=02 rec3=000
tail 0x2174f96488677975950eb 0x42a00088462060003