|
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: 13312 (0x3400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Error, seg_03f520
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Text_Io, Lex; use Text_Io, Lex; package body Error is subtype Keyword_Token is Token range Entier .. Fin; Last_Error_Line : Natural := 0; procedure Syn (An_Error : in Error; Follow : Token_To_Boolean_Array) is procedure Position_Error is begin Put_Line ("*** Erreur a la ligne " & Integer'Image (Lex.Get_Line) & ", colonne " & Integer'Image (Lex.Get_Column) & " ***"); end Position_Error; procedure Test_If_Keyword is begin if Lex.Get_Token in Keyword_Token then Put_Line (Token'Image (Lex.Get_Token) & " est un mot reserve !"); end if; end Test_If_Keyword; begin if Lex.Get_Line /= Last_Error_Line then case An_Error is when Wrong_Sentence => Position_Error; Put_Line ("Il manque des guillemets en fin de phrase."); when Sentence => Position_Error; Put_Line ("Il manque une chaine a cet endroit."); when Closing_Bracket => Position_Error; Put ("Parenthese fermante omise."); Test_If_Keyword; -- on peut pas confondre avec mots-cle when Equal => Position_Error; Put_Line ("Symbole '=' manquant."); Test_If_Keyword; -- meme chose when Colon => Position_Error; Put_Line ("Symbole ':' manquant."); Test_If_Keyword; -- meme chose when Number => Position_Error; Put_Line ("Il faut imperativement une valeur entiere."); Test_If_Keyword; -- meme chose when Identifier => Position_Error; Put_Line ("Il faut imperativement un identificateur a cette position."); Test_If_Keyword; when Type_Base => Position_Error; Put_Line ("Ce n'est pas un type de base. "); Put_Line ("Types autorises : 'ENTIER', 'CHAINE', enumere."); Test_If_Keyword; when Type_Structure => Position_Error; Put_Line ("Ce n'est pas un type de stucture. "); Put_Line ("types possibles: 'ENTITE', 'LIEU', 'ANIME', nom de structure."); Test_If_Keyword; when Valeur => Position_Error; Put_Line ("Ce n'est pas une valeur."); Put_Line ("Exemples de valeurs: 10, 100, R2D2, Casimir_1er, ""Hello""."); Test_If_Keyword; when Chaine => Position_Error; Put_Line ("Seule une chaine peut suivre un '&' dans ce cas. "); Test_If_Keyword; -- meme chose when Facteur => Position_Error; Put_Line ("Un facteur commence par une '(', un nombre, ou un identificateur."); Test_If_Keyword; when Objet => Position_Error; Put_Line ("Un objet commence par 'HEROS', 'LIEU', ou un identificateur."); Test_If_Keyword; when Symbole_Comparaison => Position_Error; Put_Line ("Les symboles de comparaison possibles sont '=', '<>', '<', '>', '<=', '>='."); Test_If_Keyword; -- meme chose when Suite_Condition_Forte => Position_Error; Put_Line ("Vous devez continuer avec 'DE', 'PAS', 'DANS' ou 'EXISTE'."); Test_If_Keyword; when Condition_Forte => Position_Error; Put_Line ("Une condition commence par un identificateur, un nombre, ou l'un des mots-cle suivants:"); Put_Line ("'HEROS', 'LIEU', 'RENCONTRE'."); Test_If_Keyword; when Change => Position_Error; Put_Line ("Change peut etre suivi d'un identificateur, de 'HEROS' ou de 'LIEU'"); Test_If_Keyword; when Quoi_Afficher => Position_Error; Put_Line ("Vous pouvez afficher un nombre, une chaine ou un identificateur."); Put_Line ("Ou utiliser l'un des mots-cle suivants: 'ISSUE', 'ISSUES' ou 'CONTENU');"); Test_If_Keyword; when others => Position_Error; Put_Line ("Le mot-cle '" & Error'Image (An_Error) & "' doit figurer a cette position."); end case; while not Follow (Lex.Get_Token) loop Lex.Next; end loop; Put_Line ("Resynchro : " & Token'Image (Lex.Get_Token)); Last_Error_Line := Lex.Get_Line; end if; end Syn; end Error;
nblk1=c nid=6 hdr6=10 [0x00] rec0=22 rec1=00 rec2=01 rec3=068 [0x01] rec0=14 rec1=00 rec2=09 rec3=034 [0x02] rec0=03 rec1=00 rec2=08 rec3=03e [0x03] rec0=14 rec1=00 rec2=02 rec3=028 [0x04] rec0=15 rec1=00 rec2=0a rec3=030 [0x05] rec0=01 rec1=00 rec2=0b rec3=038 [0x06] rec0=13 rec1=00 rec2=0c rec3=0a0 [0x07] rec0=11 rec1=00 rec2=03 rec3=001 [0x08] rec0=58 rec1=61 rec2=00 rec3=004 [0x09] rec0=c9 rec1=0b rec2=f8 rec3=5ab [0x0a] rec0=69 rec1=a4 rec2=40 rec3=000 [0x0b] rec0=99 rec1=00 rec2=00 rec3=000 tail 0x2173f03e2860a3544f12a 0x42a00088462060003 Free Block Chain: 0x6: 0000 00 07 03 fc 80 09 65 6e 64 20 63 61 73 65 3b 09 ┆ end case; ┆ 0x7: 0000 00 05 00 11 80 03 69 66 3b 03 00 08 20 20 20 20 ┆ if; ┆ 0x5: 0000 00 04 00 14 80 11 6e 5f 66 6f 72 74 65 20 28 41 ┆ n_forte (A┆ 0x4: 0000 00 00 00 11 80 09 65 6e 64 20 63 61 73 65 3b 09 ┆ end case; ┆