|
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: 27648 (0x6c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Error4, seg_048675
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Text_Io, Lex, Moving_String; use Lex, Moving_String; package body Error4 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; Write_Error_File (Moving_String.Image (Adjust & "^")); end Position_Error; procedure Delimitor is begin 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 then -- Position_Error2; --plus besoin si erreur reecrite dans fichier 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; -- on peut pas confondre avec mots-cle when Equal => Lex.Write_Error_File ("Symbole '=' manquant."); Test_If_Keyword; -- meme chose when Substract => Lex.Write_Error_File ("Symbole '-' manquant."); Test_If_Keyword; when Colon => Lex.Write_Error_File ("Symbole ':' manquant."); Test_If_Keyword; -- meme chose when Number => Lex.Write_Error_File ("Il faut imperativement une valeur entiere."); Test_If_Keyword; -- meme chose 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; -- meme chose 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; -- meme chose 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; --2eme alternative --while not (Follow (Lex.Get_Token)) loop -- Lex.Next; --end loop; Lex.Write_Error_File ("Resynchro : " & Token'Image (Lex.Get_Token)); 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 sujet, 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 Wrong_Compare_Kind => Lex.Write_Error_File ("Attention, l'operation " & False_Part & " n'est pas permise !"); 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 Attribute_And_Expression_Not_Same_Type => Lex.Write_Error_File ("Attention, l'attribut et l'expression n'ont pas le meme type !"); end case; Delimitor; Last_Error_Line := Lex.Get_Line; end if; end Sem; end Error4;
nblk1=1a nid=10 hdr6=2a [0x00] rec0=26 rec1=00 rec2=01 rec3=074 [0x01] rec0=1e rec1=00 rec2=09 rec3=012 [0x02] rec0=07 rec1=00 rec2=0b rec3=060 [0x03] rec0=13 rec1=00 rec2=0a rec3=06c [0x04] rec0=14 rec1=00 rec2=0d rec3=038 [0x05] rec0=00 rec1=00 rec2=19 rec3=00e [0x06] rec0=10 rec1=00 rec2=08 rec3=040 [0x07] rec0=13 rec1=00 rec2=07 rec3=048 [0x08] rec0=16 rec1=00 rec2=14 rec3=03c [0x09] rec0=10 rec1=00 rec2=1a rec3=046 [0x0a] rec0=14 rec1=00 rec2=03 rec3=03e [0x0b] rec0=09 rec1=00 rec2=18 rec3=02e [0x0c] rec0=0f rec1=00 rec2=12 rec3=06e [0x0d] rec0=11 rec1=00 rec2=04 rec3=052 [0x0e] rec0=12 rec1=00 rec2=02 rec3=028 [0x0f] rec0=13 rec1=00 rec2=0f rec3=004 [0x10] rec0=02 rec1=00 rec2=13 rec3=06e [0x11] rec0=12 rec1=00 rec2=05 rec3=046 [0x12] rec0=10 rec1=00 rec2=06 rec3=038 [0x13] rec0=11 rec1=00 rec2=11 rec3=002 [0x14] rec0=05 rec1=00 rec2=17 rec3=000 [0x15] rec0=06 rec1=00 rec2=10 rec3=000 [0x16] rec0=00 rec1=00 rec2=00 rec3=000 [0x17] rec0=00 rec1=00 rec2=00 rec3=000 [0x18] rec0=00 rec1=00 rec2=00 rec3=000 [0x19] rec0=00 rec1=00 rec2=00 rec3=000 tail 0x21545975286596e480566 0x42a00088462060003 Free Block Chain: 0x10: 0000 00 0c 00 7b 80 12 20 20 20 20 20 20 20 20 44 65 ┆ { De┆ 0xc: 0000 00 15 03 fc 80 23 20 20 20 20 20 20 20 20 20 20 ┆ # ┆ 0x15: 0000 00 0e 00 17 80 0c 6f 74 5f 42 65 6c 6f 6e 67 20 ┆ ot_Belong ┆ 0xe: 0000 00 16 03 fc 80 30 20 20 20 20 20 20 20 20 20 20 ┆ 0 ┆ 0x16: 0000 00 00 00 13 00 10 20 20 20 20 20 20 20 20 20 20 ┆ ┆