|
|
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: 13312 (0x3400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Error, seg_044e18
└─⟦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;
use Text_Io, Lex;
package body Error is
subtype Keyword_Token is Token range Entier .. Fin;
Last_Error_Line : Natural := 0;
use Lex.Visible;
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;
use Lex.Visible;
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;
use Lex.Visible;
procedure Syn (An_Error : in Visible.Error;
Follow : Token_To_Boolean_Array) is
begin
if Lex.Get_Line /= Last_Error_Line then
Position_Error;
case An_Error is
when Wrong_Sentence =>
Put_Line ("Il manque des guillemets en fin de phrase.");
when Sentence =>
Put_Line ("Il manque une chaine a cet endroit.");
when Closing_Bracket =>
Put ("Parenthese fermante omise.");
Test_If_Keyword; -- on peut pas confondre avec mots-cle
when Equal =>
Put_Line ("Symbole '=' manquant.");
Test_If_Keyword; -- meme chose
when Substract =>
Put_Line ("Symbole '-' manquant.");
Test_If_Keyword;
when Colon =>
Put_Line ("Symbole ':' manquant.");
Test_If_Keyword; -- meme chose
when Number =>
Put_Line ("Il faut imperativement une valeur entiere.");
Test_If_Keyword; -- meme chose
when Id =>
Put_Line
("Il faut imperativement un identificateur a cette position.");
Test_If_Keyword;
when Type_Base =>
Put_Line ("Ce n'est pas un type de base. ");
Put_Line ("Types autorises : 'ENTIER', 'CHAINE', enumere.");
Test_If_Keyword;
when Type_Structure =>
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 =>
Put_Line ("Ce n'est pas une valeur.");
Put_Line
("Exemples de valeurs: 10, 100, R2D2, Casimir_1er, ""Hello"".");
Test_If_Keyword;
when Chaine =>
Put_Line
("Seule une chaine peut suivre un '&' dans ce cas. ");
Test_If_Keyword; -- meme chose
when Facteur =>
Put_Line
("Un facteur commence par une '(', un nombre, ou un identificateur.");
Test_If_Keyword;
when Objet =>
Put_Line
("Un objet commence par 'HEROS', 'LIEU', ou un identificateur.");
Test_If_Keyword;
when Tests =>
Put_Line
("Vous avez oubliez le mot-cle 'EXISTE' ou un symbole de comparaison.");
Put_Line
("Les symboles de comparaison possibles sont '=', '<>', '<', '>', '<=', '>='.");
Test_If_Keyword; -- meme chose
when Suite_Condition_Forte =>
Put_Line
("Vous devez continuer avec 'DE', 'PAS', 'DANS' ou 'EXISTE'.");
Test_If_Keyword;
when Condition_Forte =>
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 =>
Put_Line
("Change peut etre suivi d'un identificateur, de 'HEROS' ou de 'LIEU'");
Test_If_Keyword;
when Quoi_Afficher =>
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 Jeu_Aventure =>
Put_Line (Token'Image (Lex.Get_Token) &
" mal place ou en trop.");
when others =>
Put_Line ("Le mot-cle '" & Visible.Error'Image (An_Error) &
"' doit figurer a cette position.");
end case;
Last_Error_Line := Lex.Get_Line;
loop
Lex.Next;
exit when Follow (Lex.Get_Token);
end loop;
Put_Line ("Resynchro : " & Token'Image (Lex.Get_Token));
end if;
end Syn;
procedure Sem (An_Error : in Visible.Error_Sem; False_Part : in String) is
begin
Position_Error;
case An_Error is
when Liste_Id =>
Put_Line ("Vous avez declare l'identificateur '" & False_Part &
"' a plusieurs reprises dans la meme liste.");
when Message =>
Put_Line ("Le message d'erreur """ &
False_Part & """ a ete mal stocke !");
when Enumere =>
Put_Line ("Le litteral enumere '" & False_Part &
"' n'a pu etre stocke !");
when Groupe =>
Put_Line ("Attention, le complement '" & False_Part &
"' n'a pas ete insere dand la T.D.S. !");
when others =>
null;
end case;
end Sem;
end Error;
nblk1=c
nid=9
hdr6=e
[0x00] rec0=26 rec1=00 rec2=01 rec3=03e
[0x01] rec0=13 rec1=00 rec2=03 rec3=038
[0x02] rec0=13 rec1=00 rec2=0a rec3=090
[0x03] rec0=14 rec1=00 rec2=06 rec3=030
[0x04] rec0=13 rec1=00 rec2=0b rec3=00a
[0x05] rec0=1c rec1=00 rec2=0c rec3=012
[0x06] rec0=0c rec1=00 rec2=02 rec3=000
[0x07] rec0=08 rec1=00 rec2=09 rec3=000
[0x08] rec0=19 rec1=00 rec2=0c rec3=000
[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 0x215410618864656eecc07 0x42a00088462060003
Free Block Chain:
0x9: 0000 00 08 00 91 80 07 70 65 20 21 22 29 3b 07 00 1a ┆ pe !"); ┆
0x8: 0000 00 07 03 fc 80 35 5f 4c 69 6e 65 20 28 22 49 6c ┆ 5_Line ("Il┆
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; ┆